text
stringlengths
2.85k
2.55M
label
class label
11 classes
arXiv:1412.3177v2 [math.DG] 6 Apr 2016 Killing Vector Fields of Constant Length on Riemannian Normal Homogeneous Spaces Ming Xu∗ & Joseph A. Wolf† Abstract Killing vector fields of constant length correspond to isometries of constant displacement. Those in turn have been used to study homogeneity of Riemannian and Finsler quotient manifolds. Almost all of that work has been done for group manifolds or, more generally, for symmetric spaces. This paper extends the scope of research on constant length Killing vector fields to a class of Riemannian normal homogeneous spaces. 1 Introduction An isometry ρ of a metric space (M, d) is called Clifford–Wolf (CW) if it moves each point the same distance, i.e. if the displacement function δ(x) = d(x, ρ(x)) is constant. W. K. Clifford [4] described such isometries for the 3–sphere, and G. Vincent [19] used the term Clifford translation for constant displacement isometries of round spheres in his study of spherical space forms S n /Γ with Γ metabelian. Later J. A. Wolf ([20], [21], [22]) extended the use of the term Clifford translation to the context of metric spaces, especially Riemannian symmetric spaces. There the point is his theorem [24] that a complete locally symmetric Riemannian manifold M is homogeneous if and only f → M = Γ\M f, the covering group Γ consists of Clifford if, in the universal cover M translations. In part Wolf’s argument was case by case, but later V. Ozols ([15],[17], [18]) gave a general argument for the situation where Γ is a cyclic subgroup of the f) of the isometry group I(M f). H. Freudenthal [14] discussed identity component I 0 (M f), and introduced the term Clifford–Wolf isometry (CW) the situation where Γ ⊂ I 0 (M for isometries of constant displacement. That seems to be the term in general usage. More recently, the result [24] for locally symmetric homogeneous Riemannian manifolds was extended to Finsler manifolds by S. Deng and J. A. Wolf [11]. In the setting of non–positive sectional curvature, isometries of bounded displacement are already CW [25]. Further there has been some work relating CW and homogeneity for pseudo–Riemannian manifolds ([22],[23]). ∗ Address: College of Mathematics, Tianjin Normal University, Tianjin 300387, P.R.China; e–mail: [email protected]. Research supported by NSFC no. 11271216, State Scholarship Fund of CSC (no. 201408120020), Science and Technology Development Fund for Universities and Colleges in Tianjin (no. 20141005), Doctor fund of Tianjin Normal University (no. 52XB1305). † Corresponding author. Address: Department of Mathematics, University of California, Berkeley, CA 94720–3840; e–mail: [email protected]. Research partially supported by a Simons Foundation grant and by the Dickson Emeriti Professorship at the University of California, Berkeley. 1 Recently, V. N. Berestovskii and Yu. G. Nikonorov classified all simply connected Riemannian homogeneous spaces such that the homogeneity can be achieved by CW translations, i.e. CW homogeneous spaces ([1], [2], [3]). Also, S. Deng and M. Xu studied CW isometries and CW homogeneous spaces in Finsler geometry ([5], [6], [7], [8], [9], [10]). Most of the research on CW translations has been concerned with Riemannian (and later Finsler) symmetric spaces. There we have a full understanding of CW translations ([24] and [11]), but little is known about CW translations on non-symmetric homogeneous Riemannian spaces. For example, there are not many examples of Clifford-Wolf translations on Riemannian normal homogeneous space G/H with G compact simple, except the those found on Riemannian symmetric spaces and in some closely related settings (see [12] and [13]). The infinitesimal version, apparently introduced by V. N. Berestovskii and Yu. G. Nikonorov, is that of Killing vector fields of constant length. We will refer to those Killing vector fields as Clifford–Killing vector fields or CK vector fields. They correspond (at least locally) to one parameter local groups of CW isometries. The purpose of this work is to study, and classify all CK vector fields on Riemannian normal homogeneous spaces M = G/H. We recall the general definition of Riemannian normal homogeneous spaces. Let G be a connected Lie group and H a compact subgroup, such that M = G/H carries a G–invariant Riemannian metric. Thus the Lie algebra g has an Ad (H)–invariant direct sum decomposition g = h + m where the natural projection π : G → G/H maps m onto the tangent space at the base point o = π(e), and the Riemannian metric corresponds to a positive definite inner product h· , ·im on m. The Riemannian manifold M is called naturally reductive if the Ad (H)–invariant decomposition g = h + m can be chosen so that hprm [u, v], wim + hv, prm [u, w]im = 0 for all u, v, w ∈ m where prm : g → m is the projection with kernel h. When h· , ·im is the restriction of an Ad (G)–invariant nondegenerate symmetric bilinear form h· , ·i on g such that h ⊥ m, M = G/H is a Riemannian normal homogeneous space. In this general definition, Riemannian normal homogeneous space is viewed as a generalization of Riemannian symmetric space, including the non-compact type. If we expect the Riemannian normal homogeneous space to be related to Riemannian isometric submersions, there is another definition of Riemannian normal homogeneous space, which require h·, ·im is the restriction of an Ad (G)-invariant (bi-invariant) inner product on g. In this definition, g must be compact, i.e. G is quasi-compact, or equivalently the universal cover of G is the product of a compact semi-simple Lie group and an Euclidean space (which can be 0). Note that, in both definition, the normal homogeneous metric on M depends on G. In this work, we will only consider the special case that G is a compact connected simple Lie group. Our main result is Theorem 1.1. Let G be a compact connected simple Lie group and H a closed subgroup with 0 < dim H < dim G. Fix a normal Riemannian metric on M = G/H . Suppose that there is a nonzero vector v ∈ g defining a CK vector field on M = G/H. Then M 2 is a complete locally symmetric Riemannian manifold, and its universal Riemannian cover is an odd dimensional sphere of constant curvature or a Riemannian symmetric space SU (2n)/Sp(n). It is obvious to see that when dim H = dim G, M is reduced to a single point, and when dim H = 0, M is locally Riemannian symmetric because it is covered by G with the bi-invariant Riemannian metric. Riemannian normal homogeneity is a much weaker condition than Riemannian symmetry or locally Riemannian symmetric homogeneity. Even in the case where G is a compact connected simple Lie group, every smooth coset space G/H has at least one invariant normal Riemannian metric, while of course the list of Riemannian symmetric spaces G/H is rather short. But Theorem 1.1 provides the same classification result for CK vector fields. It suggests that the existence of nontrivial CK vector fields and CW translations will impose very stronger restrictions on a Riemannian homogeneous space, at least when that space is Riemannian normal homogeneous. On the other hand, we do not have have comprehensive results when G is of noncompact type. When G is compact but not simple, generally speaking, a Riemannian normal homogeneous space M does not have a perfect local decomposition into symmetric spaces. Thus the study of CW translations and CK vector fields in this situation is still open. The proof of the Theorem 1.1 is organized as follows. In Section 2, we summarize the notations and preliminaries for the Riemannian normal homogeneous spaces we will consider. In Section 3, we present some preliminary lemmas, study the CK vector fields at the Cartan subalgebra level, and prove Theorem 1.1 in the easiest situations. In Section 4, we prove the Theorem 1.1 when G is an exceptional Lie group. From Section 5 to Section 8, we prove the Theorem 1.1 when G is a classical Lie group, i.e. of type an , bn , cn or dn . The first author thanks the Department of Mathematics at the University of California, Berkeley, for hospitality during the preparation of this paper. 2 Notations about normal homogeneous spaces Let G be a compact connected simple Lie group and H a closed subgroup with 0 < dim H < dim G. We denote g = Lie(G) and h = Lie(H). Fix a bi-invariant inner product h·, ·i of g. It defines a decomposition g = h+m with h ⊥ m and [h, m] ⊂ m. The orthogonal projection to each factor is denoted prh or prm respectively. We naturally identify m with the tangent space To (G/H) at o = π(e) where π : G → G/H is the usual projection. The restriction of h·, ·i to m is Ad(H)-invariant and defines a G-invariant Riemannian metric on M = G/H. A Riemannian metric defined in this way is called a normal homogeneous metric, and M together with a normal homogeneous metric is a Riemannian normal homogeneous space. Note the dependence on G. Here G is simple so the normal homogeneous metric on G/H is unique up to scalar multiplications. Any Cartan subalgebra of h can be expanded to a Cartan subalgebra t of g such that t = t∩ h+ t∩ m. As any two Cartan subalgebras of g are conjugate we can assume t is the standard one. For example when g = su(n + 1), t is the subalgebra of all diagonal 3  √ a b for a, b ∈ R. matrices. The standard u(n) ֒→ so(2n) comes from a + b −1 7→ −b a We view sp(n) as the space of all skew–Hermitian skew n×n quaternion matrices where q 7→ q is the usual√conjugation of H = R + Ri + Rj + Rk over R. Then u(n) ⊂ sp(n) when we identify −1 with i. With these descriptions the space of diagonal matrices in u(n) also provides the standard Cartan subalgebra t for the other classical compact simple Lie algebras. The standard Cartan subalgebra of so(2n) can also be viewed as that for so(2n + 1) with so(2n) identified with the block at the right down corner. Let ∆ = ∆(g, t) be the root system of g, and ∆+ be any positive root system in ∆. Because of the bi-invariant inner product on g, the roots of g can be viewed as elements of t instead of t∗ . We have the standard decomposition of g, X (2.1) g=t+ g , + ±α α∈∆ C in which each g±α is the real two dimensional root plane (gC α + g−α ) ∩ g. Considering the subalgebra h, we have another decomposition of g: X X b g±α . g±α′ = g±α′ where b (2.2) g=t+ + ′ ′ + α∈∆ ,prh (±α)=±α α ∈prh (∆ ) Both (2.1) and (2.2) are orthogonal decompositions. More importantly, we have orthogonal decompositions (2.3) (2.4) t = (t ∩ h) + (t ∩ m) and b g±α′ g±α′ ∩ m), = (b g±α′ ∩ h) + (b in which the summands are equal to the images of the projection maps prh and prm . Let ∆′ = ∆(h, t ∩ h) denote the root system of h and choose a positive subsystem ′+ ∆ ⊂ ∆′ . The restriction of the bi-invariant inner product of g to h is a bi-invariant inner product there, and ∆′ can be viewed as a subset of t ∩ h. For each root α′ ∈ ∆′+ , g±α′ ∩ h in (2.4). the two dimensional root plane b h±α′ is just the factor b For each simple Lie algebra g we recall the Bourbaki description of the root system ∆+ , and the root planes in the classical cases. (1) The case g = an = su(n + 1) for n > 0. Let {e1 , . . . , en+1 } denote the standard orthonormal basis of Rn+1 . Then t can be isometrically identified with the subspace (e1 + · · · + en+1 )⊥ ⊂ Rn+1 . The root system ∆ is (2.5) {±(ei − ej ) | 1 ≦ i < j ≦ n + 1}. Let Ei,j be the matrix with all zeros except for a 1 in the (i, j) place. Then √ −1Ei,i ∈ su(n + 1), and ei = √ g±(ei −ej ) = R(Ei,j − Ej,i ) + R −1(Ei,j + Ej,i ). (2) The case g = bn = so(2n + 1) for n > 1. The Cartan subalgebra t can be isometrically identified with Rn with the standard orthonormal basis {e1 , . . . , en }. The root system ∆ is (2.6) {±ei | 1 ≦ i ≦ n} ∪ {±ei ± ej | 1 ≦ i < j ≦ n}. 4 Using matrices, we have ei = E2i,2i+1 − E2i+1,2i , g±ei = R(E2i,1 − E1,2i ) + R(E2i+1,1 − E1,2i+1 ), g±(ei −ej ) = R(E2i,2j + E2i+1,2j+1 − E2j,2i − E2j+1,2i+1 ) + R(E2i,2j+1 − E2i+1,2j + E2j,2i+1 − E2j+1,2i ), and g±(ei +ej ) = R(E2i,2j − E2i+1,2j+1 − E2j,2i + E2j+1,2i+1 ) + R(E2i,2j+1 + E2i+1,2j − E2j,2i+1 − E2j+1,2i ). (3) The case g = cn = sp(n) for n > 2. As before t is isometrically identified with Rn with the standard orthonormal basis {e1 , . . . , en }. The root system ∆ is (2.7) {±2ei | 1 ≦ i ≦ n} ∪ {±ei ± ej | 1 ≦ i < j ≦ n}. Using matrices, we have ei = iEi,i , g±2ei = RjEi,i + RkEi,i , g±(ei −ej ) = R(Ei,j − Ej,i ) + Ri(Ei,j + Ej,i ), and g±(ei +ej ) = Rj(Ei,j + Ej,i ) + Rk(Ei,j + Ej,i ). Rn (4) The case g = dn = so(2n) for n > 3. The Cartan subalgebra t is identified with with the standard orthonormal basis {e1 , . . . , en }. The root system ∆ is (2.8) {±ei ± ej | 1 ≦ i < j ≦ n}. In matrices, we have formulas for the ei and for the root planes for ei ± ej similar to those in the case of bn , i.e. ei = E2i−1,2i − E2i,2i−1 , g±(ei −ej ) = R(E2i−1,2j−1 + E2i,2j − E2j−1,2i−1 − E2j,2i ) + R(E2i−1,2j − E2i,2j−1 + E2j−1,2i − E2j,2i−1 ), and g±(ei +ej ) = R(E2i−1,2j−1 − E2i,2j − E2j−1,2i−1 + E2j,2i ) + R(E2i−1,2j + E2i,2j−1 − E2j−1,2i − E2j,2i−1 ). R6 (5) The case g = e6 . The Cartan subalgebra t can be isometrically identified with with the standard orthonormal basis {e1 , . . . , e6 }. The root system is (2.9) {±ei ± ej | 1 ≦ i < j ≦ 5} ∪ {± 21 e1 ± · · · ± 12 e5 ± It contains a root system of type d5 . 5 √ 3 2 e6 with odd number of +’s}. (6) The case g = e7 . The Cartan subalgebra can be isometrically identified with R7 with the standard orthonormal basis {e1 , . . . , e7 }. The root system is √ √ {±ei ± ej | 1 ≦ i < j < 7} ∪ {± 2e7 ; 21 (±e1 ± · · · ± e6 ± 2e7 ) (2.10) with an odd number of plus signs among the first six coefficients}. It contains a root system of d6 . (7) The case g = e8 . The Cartan subalgebra can be isometrically identified with R8 with the standard orthonormal basis {e1 , . . . , e8 }. The root system ∆ is (2.11) {±ei ± ej | 1 ≦ i < j ≦ 8} ∪ { 12 (±e1 ± · · · ± e8 ) with an even number of +’s}. It contains a root system of d8 . (8) The case g = f4 . The Cartan subalgebra is isometrically identified with R4 with the standard orthonormal basis {e1 , . . . , e4 }. The root system is (2.12) {±ei | 1 ≦ i ≦ 4} ∪ {±ei ± ej | 1 ≦ i < j ≦ 4} ∪ { 12 (±e1 ± · · · ± e4 )}. It contains the root system of b4 . (9) The case g = g2 . The Cartan subalgebra is isometrically identified with R2 with the standard orthonormal basis {e1 , e2 }. The root system ∆ is √ √ √ (2.13) {(± 3, 0), (± 23 , ± 32 ), (0, ±1), (± 23 , ± 21 )}. There are many choices of the orthonormal basis {e1 , . . . , en } with respect to which the root systems have the same standard presentations as above, for example the ones obtained by applying elements of the Weyl group. In the classical cases this means any permutation of the ei , with any number of sign changes ei 7→ ±ei in cases b and c, an even number of sign changes in case d. For type d we can also use the outer automorphism and thus have ei 7→ ±ei with any number of sign changes. 3 CK vector fields on compact normal homogeneous spaces Assume M = G/H is a Riemannian normal homogeneous space in which G is a compact connected simple Lie group, and H is a closed subgroup with 0 < dim H < dim G. We keep all notation of the last section and further assume there is a nonzero vector v ∈ g that defines a Clifford–Killing vector field on M . The value of v at π(g), where π : G → G/H as usual, is π∗ |g ((Lg )∗ (Ad(g)v)) = g∗ π∗ |e (Ad(g)v). So the condition that v defines a nonzero CK vector field on M is that ||prm (Ad(g)v)|| is a positive constant function of g. For the bi-invariant inner product, ||v||2 = ||Ad(g)v||2 = ||prh (Ad(g)v)||2 + ||prm (Ad(g)v)||2 is a constant function of g ∈ G, so the same is true for ||prh (Ad(g)v)||. Suitably choosing v within its Ad(G)-orbit, we can assume v ∈ t (the standard special Cartan subalgebra 6 given in the last section). Now ||prh (ρ(v))|| and ||prm (ρ(v))|| are constant functions of ρ in the Weyl group. Because g is simple and v 6= 0, both the functions ||prh (Ad(g)(v))|| and ||prm (Ad(g))(v)|| for g ∈ G, (or the functions ||prh (ρ(v))|| and ||prm (ρ(v))|| for ρ in the Weyl group) are positive constant functions. From the above observations, it is easy to prove two special cases of Theorem 1.1: Proposition 3.1. Let G be a compact connected simple Lie group and H a closed subgroup with 0 < dim H < dim G. If g = a2 or g2 then there is no nonzero v ∈ g that defines a CK vector field on the Riemannian normal homogeneous space G/H. Proof. Consider g = a2 first. Assume conversely there is a nonzero CK vector field, defined by the nonzero vector v ∈ t. The subspaces t∩h and t∩m are a pair of orthogonal lines in t. Denote all different vectors in the Weyl group orbit of v as v1 = v, . . ., vk , k = 3 or 6, then k k k X X X prm (vi ) = 0. prh (vi ) = vi = i=1 i=1 i=1 All the vectors prm (vi ) have the same nonzero length, which only have two possible choices in t ∩ m. So we must have k = 6, and all vi can be divided into two set, such that, for example, prm (v1 ) = prm (v2 ) = prm (v3 ) and prm (v4 ) = prm (v5 ) = prm (v6 ) are opposite to each other. Obviously v1 + v2 + v3 6= 0, so there are two vi among them, v1 and v2 for example, such that v1 = ρ(v2 ), in which ρ is the reflection in some root of g. Thus t ∩ h, containing v1 − v2 , is linearly spanned by a root of g. Similar argument can also prove t ∩ m is spanned by a root of g. But for a2 , there do not exist a pair of orthogonal roots. This is a contradiction. The Weyl group of g2 contains that of a2 as its subgroup, so the statement for g2 also follows immediately the above argument. To prove Theorem 1.1 in general we need some preparation. Suppose that M = G/H is a Riemannian normal homogeneous space and v ∈ g defines a CK vector field on M . If ψ : G′ → G is a covering group and H ′ is an open subgroup of ψ −1 (H), then M ′ = G′ /H ′ is a Riemannian normal homogeneous space and a Riemannian covering manifold of M , and the same v ∈ g defines a CK vector field on M ′ . Thus we can always replace G by a covering group. Similarly we can go down to a certain class of subgroups: Lemma 3.2. Let M = G/H be a Riemannian normal homogeneous space such that v ∈ g defines a CK vector field on M . Let G′ be a closed subgroup of G whose Lie algebra g′ satisfies g′ = g′ ∩ h + g′ ∩ m. Let H ′ be a closed subgroup of G′ with Lie algebra h′ = g′ ∩ h. Then the restriction of the bi-invariant inner product of g to g′ defines a Riemannian normal homogeneous metric on M ′ = G′ /H ′ . If v = v ′ + v ′′ with v ′ ∈ g′ , hv ′′ , g′ i = 0, and [v ′′ , g′ ] = 0, then v ′ defines a CK vector field on M ′ = G′ /H ′ . Proof. Because of the decomposition g′ = (g′ ∩ h) + (g′ ∩ m), we also have g′⊥ = (g′⊥ ∩ h) + (g′⊥ ∩ m). The condition that v = v ′ + v ′′ defines a CK vector field for the 7 Riemannian normal homogeneous space M = G/H implies that ||prm (Ad(g′ )v)||2 = ||prm (Ad(g′ )v ′ ) + prm (Ad(g′ )v ′′ )||2 = ||prm (Ad(g′ )v ′ ) + prm (v ′′ )||2 = ||prm (Ad(g′ )v ′ )||2 + ||prm (v ′′ )||2 is a constant function for g′ ∈ G′ . And so does ||prm (Ad(g′ )v ′ )||2 , i.e. v ′ defines a CK vector field for the Riemannian normal homogeneous space M ′ = G′ /H ′ . We will frequently use Lemma 3.2 to reduce our considerations to smaller groups. Lemma 3.3. Suppose that 0 6= v ∈ t defines a CK vector field on M = G/H. Then (1) If the Weyl group orbit W (v) contains an orthogonal basis of t then ||prh (v)||2 dim(t ∩ h) . = 2 ||v|| dim t (2) If Ad(G)v contains an orthogonal basis of g then ||prh (v)||2 dim h . = 2 ||v|| dim g Proof. (1) For simplicity, we assume ||v|| = 1. Let {v1 , . . . , vn } ⊂ W (v) be P an orthogonal basis of t, and {u1 , . . . , uh } an orthonormal basis of t ∩ h. Expand ui = nj=1 aij vj ; P P then prh (vi ) = hj=1 aij uj and ||prh (vi )||2 = hj=1 a2ij . So ||prh (v)||2 1 = 2 ||v|| n n X i=1 ||prh (vi )||2 ! n = h h h 1 XX 1 XX h ||aij ||2 = ||aij ||2 = . n n n i=1 j=1 j=1 i=1 That proves the first assertion. The proof of the second is similar. Lemma 3.3 provides a useful tool when we deal the cases g = bn and g = dn . Lemma 3.4. Suppose that 0 6= v ∈ t defines a CK vector field on M = G/H. Let α, β ∈ ∆(g, t) such that hα, βi = 0 and α(v) 6= 0 6= β(v). Then hprh (α), prh (β)i = hprm (α), prm (β)i = 0. Proof. Let the reflections for the roots α and β be denoted ρα and ρβ respectively. Then the four points v1 = prh v, v2 = prh (ρα (v)) = prh (v) − v3 = prh (ρβ (v)) = prh (v) − 8 2hv, αi pr (α), hα, αi h 2hv, βi pr (α) hβ, βi h and v4 = prh (ρβ ρα (v)) = prh (v) − 2hv, βi 2hv, αi prh (α) − pr (α) hα, αi hβ, βi h belong to a two dimensional plane and have the same distance from 0. They are the vertices of a rectangle with adjacent edges parallel to prh (α) and prh (β) respectively. Those edges are orthogonal, in other words hprh (α), prh (β)i = 0. The other statement, hprm (α), prm (β)i = 0, follows immediately. Lemma 3.4 is the key to our study of the CK vector fields on the Cartan subalgebra level. The next proposition implies, at least for classical g, that a nonzero vector v which defines a CK vector field must would be very singular. Proposition 3.5. Suppose that g is classical, i.e. g = an for n > 0, bn for n > 1, cn for n > 2 or dn for n > 3. Suppose that 0 6= v ∈ t defines a CK vector field on the Riemannian normal homogeneous space M = G/H. Use the standard presentations for the Cartan subalgebra t and root system ∆ in (2.5)–(2.8). Then, for a suitable choice of the ei , v must be one of the following, up to multiplication by a nonzero scalar. (1) Let g = an with n > 2. Then v = ne1 − e2 − . . . − en+1 , or (if n is odd ) v = e1 + · · · + ek − ek+1 − · · · − en+1 for n = 2k − 1 . (2) Let g = bn or cn with n > 1, or let g = dn with n > 3. Then v = e1 or v = e1 + · · · + en . Proof. (1) Assume g = an with n > 2. If the Weyl group orbit of v contains a multiple of ne1 − e2 − · · · − en+1 , then Assertion (1) is proved. Now suppose that the Weyl group orbit of v does not contain a multiple of ne1 − e2 − · · · − en+1 . Then for any orthogonal pair of roots, α = ei − ej and β = ek − el with i, j, k and l distinct, we can replace v by a Weyl group conjugate and assume v = a1 e1 + · · · + an+1 en+1 where ai 6= aj and ak 6= al . Applying Lemma 3.4, we have 0 = hei − ej , ek − el i = hprh (ei − ej ), prh (ek − el )i = hprh (ei − ej ), ek − el i P for any k and l such that i, j, k and l are distinct. Express prh (ei − ej ) = rm em . Hold i and j fixed, and let k and ℓ vary over {1, . . . , n + 1} \ {i, j}. Then (3.6) shows that all such rk = rℓ . Thus we have constants a and b such that (3.6) prh (ei − ej ) = aei + bej + −a−b n−1 (e1 + · · · + en+1 − ei − ej ). prh (ek − el ) = ce3 + de4 + −c−d n−1 (e1 + · · · + en+1 − ek − el ). Similarly, Now (3.6) tells us (3.7) hprh (ei − ej ), prh (ek − el )i =  n−3 (n−1)2 − 2 n−1  (a + b)(c + d) = 0, i.e. either a + b = 0 or c + d = 0. If a + b = 0 then prh (ei − ej ) is a multiple of ei − ej , and if c + d = 0 then prh (ek − el ) is a multiple of ek − el . If a + b = 0, so 9 prh (ei − ej ) = r(ei − ej ), then pr2h (ei − ej ) = prh (ei − ej ) so r 2 = r; either r = 0 and ei − ej ∈ m or r = 1 and ei − ej ∈ h . Similarly if c + d = 0 then either ek − el ∈ m or ek − el ∈ h. So if there is a root α contained neither in h nor in m, then any roots orthogonal to it are contained either in h or in m. Suppose that there is a root α contained neither in h nor in m. Applying a Weyl group element we may assume α = e1 − e2 . Then any root ei − ej , 2 < i < j ≦ n + 1, is contained in h or m, and all such roots must be contained in the same subspace. Suppose they all belong to h; the argument will be the same if they all belong to m. Now e3 − e4 ∈ h and he1 − e3 , e3 − e4 i 6= 0 shows e1 − e3 ∈ / m. If e1 − e3 ∈ / h, then by the above argument, e2 − e4 ∈ h. Suitably permuting the ei , we see ei − ej ∈ h for 1 < iP < j ≦ n + 1, so m = R(ne1 − e2 − · · · − en+1 ). Recall v = a1 e1 + · · · + an+1 en+1 with ai = 0. All prm (ρ(v)) have the same length for any ρ in the Weyl group, in other words |a1 n − a2 − · · · − an+1 | = (n + 1)|a1 | is constant under permutations of the ai . Thus n is odd, say n = 2k − 1, and after a suitable permutation of the ei , v is a scalar multiple of (e1 + · · · + ek ) − (ek+1 + · · · + en+1 ). On the other hand suppose that every root α is contained in either h or m, say ∆ = ∆h ∪ ∆m . If ∆m = ∅ then t ⊂ h and the CK vector field v has a zero, forcing v = 0, which contradicts the hypothesis v 6= 0. If ∆h = ∅ then t ⊂ m, contradicting our construction of t, which starts with a Cartan subalgebra of h. Thus ∆h 6= ∅ and ∆m 6= ∅. Because h∆h , ∆m i = 0, this is a contradiction with the fact that g is simple. That completes the proof of Assertion (1). (2) Assume g = bn with n > 1. If the Weyl group orbit W (v) of v contains a multiple of e1 then Assertion (2) is proved for g = bn . Now suppose that W (v) does not contain a multiple of e1 . Express v = a1 e1 + · · · + an en ; then at least two of the coefficients ai are nonzero. Any two short roots, ei and ej with i 6= j, are orthogonal to each other, so we can suitably choose v from its Weyl group orbit such that ai 6= 0 and aj 6= 0. Applying Lemma 3.4, we see hprh (ei ), prh (ej )i = hprm (ei ), prm (ej )i = 0 whenever i 6= j. These can only be true when each ei is contained in either t ∩ h or t ∩ m. Then, suitably permute the ei , we can assume that {e1 , . . ., eh } spans t ∩ h, and {eh+1 . . . . , en } spans t ∩ m. All prh (ρ(v)), ρ in the Weyl group, have the same length. In particular v = a1 e1 + · · · + an en must satisfy |a1 | = · · · = |an |. By suitable scalar changes and Weyl group actions, we have v = e1 + · · · + en . That completes the proof of Assertion (2) for g = bn . The proof for g = cn is similar. Now assume g = dn with n > 3. The root system of dn contains two subsystems of type an−1 whose intersection is of type an−2 . If the Weyl group orbit W (v) contains a scalar multiple of e1 or of e1 or e1 + · · · + en then Assertion (2) follows. If it contains a scalar multiple of e1 + · · · + en−1 − en we apply the outer automorphism that restricts to e1 + · · · + en−1 − en 7→ e1 + · · · + en−1 + en , and Assertion (2) follows. Now suppose that neither of these holds: W (v) contains neither a multiple of e1 nor a multiple of e1 + · · · + en−1 ± en . Then v = a1 e1 + · · · + an en has two nonzero coefficients and not all the |ai | are equal. If i, j, k and l are distinct we have v ′ = a′1 e1 + · · · + a′n en ∈ W (v) such that a′i 6= ±a′j and a′k 6= a′l , and v ′′ = a′′1 e1 + · · · + a′′n en ∈ W (v) such that a′′i 6= ±a′′j 10 and a′′k 6= −a′′l . Apply Lemma 3.4 to α = ei ± ej and β = ek ± el , or α = ei + ej and β = ei − ej , the result is hprh (ei ± ej ), prh (ek ± el )i = hprm (ei ± ej ), prm (ek ± el )i = 0 and hprh (ei + ej ), prh (ei − ej )i = hprm (ei + ej ), prm (ei − ej )i = 0, whenever i, j, k and l are distinct. This is only possible when the each one of ±ei ± ej is contained in t ∩ h or t ∩ m. By an argument similar that used to prove (1), we have either t ⊂ h and the Riemannian normal homogeneous space M = G/H has no nonzero CK vector field, or t ∩ h = 0 which contradicts with our construction of t. Proposition 3.5 is the key step in the proof of Theorem 1.1. It reduces our discussion for each classical g to very few possibilities for the vector v. In the next section, we will apply this proposition to each exceptional g and show there does not exist any nonzero CK vector field in those cases. 4 Proof of Theorem 1.1 for g Exceptional In this section, we will apply Proposition 3.5 to prove Theorem 1.1 when g is a compact exceptional simple Lie algebra. The proof is a case by case discussion. (1) The case g = g2 has already been proven in Proposition 3.1. (2) Let g = f4 . We use the standard presentation (2.12) for its root system. Its root system has a subsystem of type b4 , which defines a subgroup W ′ of the Weyl group W . By the argument for the case of bn in Proposition 3.5, if 0 6= v ∈ g defines a CK vector field on M , we can re-scale it and use the W ′ action and assume that either v = e1 or v = 12 (e1 + · · · + e4 ). But those belong to the same orbit for W . Considering v = 21 (e1 + · · · + e4 ), it follows that each of t ∩ h and t ∩ m is linearly spanned by a non-empty subset of {e1 , . . . , e4 }. Then use v = e1 in the same Weyl group orbit, ||prm (ρ(v))|| varies with ρ ∈ W ′ , contradicting the CK property of v. We conclude that if g = f4 then M = G/H has no nonzero CK vector field. (3) Let g = e6 . We use the standard presentation (2.9) for its root system. Its root system has a subsystem of type d5 , which defines subgroup W ′ of the Weyl group W of g. Suppose that 0 6= v ∈ g defines a CK vector field on the Riemannian normal homogeneous space M = G/H. Using the reflections for roots of the form 12 (±e1 ±· · · ± √ e5 ± 3e6 ), we can assume that v = a1 e1 +· · ·+a6 e6 has three nonzero coefficients among the first five ai . By the argument in the dn case of Proposition 3.5, if 1 ≦ i < j ≦ 5 then prh (ei ± ej ) and prm (ei ± ej ) are four orthogonal vectors in Rei + Rej + Re6 . So if 1 ≦ i < j ≦ 5 then either ei + ej or ei − ej is contained in t ∩ h or in t ∩ m, and all those roots define the same subspace. We will argue the case where they are in t ∩ h; with very minor modifications our argument also works when they are in t ∩ m. In that case there are two possibilities: (1) there exist i and j with 1 ≦ i < j < 6 and both ±ei ± ej contained in t ∩ h, or (2) whenever 1 ≦ i < j < 6 either ei − ej or e1 + ej is not contained in t ∩ (h ∪ m). 11 Suppose that whenever 1 ≦ i < j < 6 either ei − ej or ei + ej is not contained in t ∩ (h ∪ m). By suitably choosing the first five ei , in the d5 where W ′ acts, we can assume ei − ej ∈ h and ei + ej ∈ /√h ∪ m for 1 ≦ i < j < 5. Let ρ be the reflection in the root 12 (e1 − e2 + e3 + e4 + e5 + 3e6 ). Denote e′i = ρ(ei ). Apply the above argument to the new basis {e′1 , · · · , e′6 }. Then for 1 ≦ i < j < 6, either e′i + e′j or e′i − e′j is not contained in t ∩ (h ∪ m). Because e′1 + e′2 = e√ 1 + e2 is not contained in t ∩ (h ∪ m), and because e′1 − e′2 = 21 (e1 − e2 − e3 − e4 − e5 − 3e6 ) is not orthogonal to e1 − e2 ∈ t ∩ h, we have √ 1 3e6 ) ∈ t ∩ h. (e − e − e − e − e − (4.1) 1 2 3 4 5 2 √ If we use the reflection in the root 12 (e1 − e2 − e3 − e4 + e5 + 3e6 ), the above argument shows √ 1 (4.2) 2 (e1 − e2 + e3 + e4 − e5 − 3e6 ) ∈ h. By (4.1) and (4.2), e3 + e4 ∈ t ∩ h, which contradicts our assumption. Thus there exist i and j such that 1 ≦ i < j < 6 and the ±ei ± ej are contained in t ∩ h, Then h = Re1 + · · · + Re5 and m = Re6 . √ Let ρ be the reflection in a root of the form 12 (±e1 ± e2 ± e3 ± e4 ± e5 ± 3e6 ), and denote e′i = ρ(ei ) for 1 ≦ i ≦ 6. The e′i are another orthonormal basis of t for which the root system ∆ is given by (2.9). In particular the ±e′i ± e′j , 1 ≦ i < j < 6 give a root system of d5 in ∆. The above argument also implies m = Re′6 . But Re′6 6= Re6 . This is a contradiction. We conclude that there is no nonzero vector v that defines a CK vector field for the Riemannian normal homogeneous space G/H. (3) Use the standard presentation (2.10) for the root system of e7 , and apply an argument similar to the one above for e6 . Arguing mutatis mutandis we see that, when g = e7 , there is no nonzero vector v that defines a CK vector field for the Riemannian normal homogeneous space G/H. (4) Let g = e8 . We use the standard presentation (2.11) for its root system. Its root system contains a root system of type d8 , and the Weyl group W ′ of that d8 is of course a subgroup of the Weyl group W of g. Suppose that a nonzero vector v ∈ t defines a CK vector field on the Riemannian normal homogeneous space G/H. The argument for the case of dn for Proposition 3.5 can be applied here to show that, up to scalar multiplications and the action of W ′ , either v = e1 or v = e1 + · · · + e7 ± e8 . In either case, the reflection in the root 21 (e1 + e2 − e3 − · · · − e8 ) maps v to another v ′ = a1 e1 + · · · + a8 e8 such that there are at least two nonzero ai s and not all |ai |s are the same. We have shown ||prh (ρ(v))|| is not a constant function for all ρ ∈ W ′ in the proof of Proposition 3.5. This contradicts our assumption on v. So there is no nonzero v ∈ g defining a CK vector field on M = G/H. In summary, we have proved Proposition 4.3. Let G be a compact connected exceptional simple Lie group, and H a closed subgroup with 0 < dim H < dim G. Then there is no nonzero vector v ∈ g that defines a CK vector field on the Riemannian normal homogeneous space M = G/H. 12 5 Proof of Theorem 1.1 for g = an In this section g = an = su(n + 1) and 0 6= v ∈ t defines a CK vector field on the Riemannian normal homogeneous space M = G/H. Proposition 3.5 says that, up to the action of the Weyl group, either v is a multiple of ne1 − e2 − · · · − en+1 or n + 1 = 2k and v is a multiple of (e1 + · · · + ek ) − (ek+1 + · · · + en+1 ). However we must see whether those vectors v actually define CK vector fields. The case n = 1 is trivial. If there are nonzero CK vectors fields, then dim H = 0. The case n = 2 has been proven in Proposition 3.1. So we assume n > 2. 5A The case n = 2k − 1 is odd and v = (e1 + · · · + ek ) − (ek+1 + · · · + en+1 ) From the argument in Proposition 3.5, either t ∩ h = R(ne1 − e2 − · · · − en+1 ), or t ∩ m = R(ne1 − e2 − · · · − en+1 ), up to the action of the Weyl group. Suppose t∩h = R(ne1 −e2 −· · ·−en+1 ). Then either h = R(ne1 −e2 −· · ·−en+1 ) or h is the a1 with Cartan subalgebra h∩ t = R(ne1 − e2 − · · · − en+1 ). In the a1 case the root plane j of h relative to t∩h is contained in g±(e1 −e2 ) +· · ·+g±(e1 −en+1 ) , Direct calculation shows [j, j] 6⊂ t∩h+j so t∩h+j is not a Lie algebra. This √eliminates the a1 case. Thus h = R(ne1 − e2 − · · · − en+1 ). Let g ∈ G with Ad (g)v = −1 diag(( 01 10 ) , 1, −1, · · · , 1, −1). Then hAd (g)v, ne1 −e2 −· · ·−en+1 i = 0 while hv, ne1 −e2 −· · ·−en+1 i = n+1, so v cannot define a CK vector field on M = G/H. We have proved t ∩ h 6= R(ne1 − e2 − · · · − en+1 ), so, up to the action of the Weyl group, we assume t ∩ m = R(ne1 − e2 − · · · − en+1 ). If 0 6= γ ∈ t∩h then γ ⊥ e1 so dim b g±γ = 0 or 2. The root planes of h are root planes of g for roots orthogonal to e1 . Consider one such, g±(ei −ej ) where 1 < i < j ≦ n + 1, which is not a root plane of h. Then it is contained in m. Permuting the el we may assume i = 3 and j = 4. Then we have √ v ′ = −1 diag(1, −1, ( 01 10 ) , 1, −1, · · · , 1, −1) ∈ Ad(G)v. But ||prm (v ′ )|| > ||prm (v)||, which is a contradiction. This proves g±(ei −ej ) ∈ h for 1 < i < j ≦ n + 1. The other root planes of g involve e1 in the root, so they are all contained in m. In conclusion h is a standard su(n) in g = su(n + 1), and the universal cover of M = G/H is S 2n+1 = SU(n + 1)/SU(n) with n > 1. Remark. The vector v = (e1 + · · · + ek ) − (ek+1 + · · · + en+1 ) defines a CK vector field on the sphere S 2n+1 = SO(2n + 2)/SO(2n + 1). However, the Riemannian normal homogeneous metric on S 2n+1 = SU(n + 1)/SU(n) is not Riemannian symmetric. The isotropy representation for S 2n+1 = SU(n+1)/SU(n) decomposes m = m0 +m1 , in which dim m0 = 1 with trivial Ad(H)-action. Let h·, ·ibi be the inner product on m which defines the Riemannian symmetric metric on S 2n+1 . The decomposition m = m0 + m1 is orthogonal for both h·, ·i and h·, ·ibi . By a suitable scalar change, h·, ·ibi coincides with h·, ·i on m1 , and differs on m0 . If the same v = (e1 + · · · + ek ) − (ek+1 + · · · + en+1 ) defines a CK vector field on S 2n+1 = SU(n + 1)/SU(n) for the Riemannian normal homogeneous metric, then by the general observations at the beginning of Section 3, Ad(G)v is contained in a hyperplane in g which is parallel to h + m1 . That would contradict the fact g is simple and v is nonzero. 13 The case v = ne1 − e2 − · · · − en+1 5B Suppose that some g±(ei −ej ) ⊂ m. We may assume i = 1 and j = 2. Then we have v ′ = −e1 + ne2 − e3 − · · · − en+1 ∈ Ad(G)v and v ′′ = √ −1 diag  (n−1)/2 (n+1)/2 (n+1)/2 (n−1)/2   , −1, . . . , −1 ∈ Ad(G)v. Note ||prh (v)|| = ||prh (v ′ )|| = ||prh (v ′′ )||. By construction, prh (v) + prh (v ′ ) = 2prh (v ′′ ), so prh (v) = prh (v ′ ), i.e. e1 − e2 ∈ t ∩ m. From this argument g±(ei −ej ) ⊂ m only when / t ∩ m, prh (ei − ej ) is a root of h. ei − ej ∈ t ∩ m. In particular, for any root ei − ej ∈ Similarly, g±(ei −ej ) ⊂ h only when ei − ej ∈ t ∩ h. It will be convenient to assume prh (e1 + · · · + en+1 ) = 0, so that prh is defined on the Euclidean space Rn+1 that contains t. Denote e′i = prh (ei ) for 1 ≦ i ≦ n + 1. Then e′i − e′j is 0 or a root of h. The e′i generate all the roots of h. It follows that h is a simple Lie algebra. Summarizing the above argument, we have Lemma 5.1. Assume g = an for n > 2 and suppose that v = ne1 − e2 − · · · − en+1 ∈ t defines a CK vector field on the normal homogeneous space M = G/H. Then (1) If g±(ei −ej ) ⊂ m, then ei − ej ∈ t ∩ m. (2) If g±(ei −ej ) ⊂ h, then ei − ej ∈ t ∩ h. (3) Denote e′i = prh (ei ) for 1 ≦ i ≦ n + 1. Then the root system of h is the set of all nonzero vectors of the form e′i − e′j . In particular, h is a compact simple Lie algebra. Now consider the case e′i − e′j = e′k − e′l 6= 0, in which e′i 6= e′k or e′j 6= e′l (both inequalities are satisfied). As we saw, e′i − e′j is a root of h, so e′j 6= e′k , for otherwise e′i − e′l = 2(e′i − e′j ) is a root of h; similarly e′i 6= e′l . Then for the roots α′ = e′i − e′j and β ′ = e′i − e′k of h, both α′ + β ′ = e′i − e′l and α′ − β ′ = e′k − e′j are roots of h. There are only two possibilities for this: (1) The roots α′ and β ′ of h are short and have an angle π 3 or 2π 3 , and h ∼ = g2 . (2) The roots α′ and β ′ of h are short, hα′ , β ′ i = 0, and ±α′ ± β ′ are long roots. Based on this observation, we will prove the following lemma. Lemma 5.2. Let g = an with n > 2 and suppose that v = ne1 − e2 − · · · − en+1 ∈ t defines a CK vector field on the Riemannian normal homogeneous space M = G/H. Denote e′i = prh (ei ), so e′1 + · · · + e′n+1 = 0. Then we have the following. (1) No two e′i are equal. (2) There exist distinct i, j, k and l such that e′i − e′j = e′k − e′l . (3) If i, j, k and l are distinct and satisfy e′i − e′j = e′k − e′l , then the roots α′ and β ′ of h are short, hα′ , β ′ i = 0, and ±α′ ± β ′ are long roots. 14 ′ Proof. (1) For simplicity, we call e′i single if its pre-image pr−1 h (ei ) consists of a single ′ ′ ′ element ei . If e′1 is not single, and pr−1 h (e1 ) = {e1 , . . . , ek }, k > 1, then e1 − ei is root ′ ′ of h for i > k. Permuting ei for i > k, we can assume e1 − ek+1 has the largest length ′ among all the roots of the form e′1 − e′i , and pr−1 h (ek+1 ) = ek+1 , . . . , ek+l , l > 0. If ′ ′ ′ ′ e1 − ek+1 = ei − ej with i > k, then by the observation before this lemma, either there is a root e′1 − e′j longer than e′1 − e′k+1 , which is a contradiction, or h = g2 and the angle between e′1 − e′k+1 and e′l − e′i is π3 or 2π 3 . We first assume there do not exist i and j such that i > k and e′1 − e′k+1 = e′i − e′j . P P g±(e′1 −e′k+1 ) = ki=1 lj=1 g±(ei −ek+j ) , and direct calculation shows Then h±(e′1 −e′k+1 ) ⊂ b e′1 − e′k+1 ∈ R(e1 − e2 ) + · · · + R(ek+l−1 − ek+l ). Let G′ be the closed subgroup of G with its algebra X X g′ = R(ei − ei+1 ) + g±(ei −ej ) . 1≤i<k+l 1≤i<j≤k+l It is the standard su(k + l) in g = su(n + 1) corresponding to the (k + l) × (k + l)block at the upper left corner. Let H ′ be the connected component of G′ ∩ H; its Lie algebra is h′ = g′ ∩ h. The restriction of the bi-invariant inner product of g to g′ defines a Riemannian normal homogeneous space G′ /H ′ . Then we have the orthogonal decomposition g′ = h′ + m′ , which coincides with g′ = g′ ∩ h + g′ ∩ m. Notice v = ne1 − e2 − · · · − en+1 can be decomposed as a sum of v′ = n+1 k+l ((k + l − 1)e1 − e2 − · · · − ek+l ) ∈ g′ and ′ v ′′ = ( n+1 k+l − 1)(e1 + · · · + ek+l ) − (ek+l+1 + · · · + en+1 ) ∈ cg (g ), with hv ′′ , g′ i = 0, so by Lemma 3.2, v ′ = (k + l − 1)e1 − e2 − · · · − ek+l defines a CK vector field on the Riemannian normal homogeneous space G′ /H ′ . The subalgebra h′ is isomorphic to a1 , which can be assumed to be linearly spanned by  √  √   0 A , and u = u1 = −1 aI0k bI0l , u2 = −A −1 A0∗ A0 , ∗ 0 3 in which ak + bl = 0, Ik and Il are k × k and l × l identity matrices respectively, and A is a k × l-complex matrix. Direct calculation for the condition [u2 , u3 ] ⊂ Ru1 indicates a = −b, k = l, and by suitable scalar changes and unitary conjugations, we can assume A = Ik . The orbit Ad(G′ )v ′ contains X √ Ei,i ) v1′ = −1((k − 1)(E1,1 + Ek+1,k+1 ) + k(E1,k+1 + Ek+1,1 ) − 16=i6=k+1 and v2′ = √ −1((k − 1)(E1,1 + E2k,2k ) + k(E1,2k + E2k,1 ) − X Ei,i ). 16=i6=2k Thus ||prh′ (v1′ )|| > ||prh′ (v2′ )|| = 0, which is a contradiction. We conclude that there do exist i and j such that i > k and e′1 − e′k+1 = e′i − e′j . Note then that i 6= j. 15 Now there exist i 6= j such that i > k and e′1 − e′k+1 = e′i − e′j . In this case h = g2 . For simplicity, we can suitably permute the ei ( not assuming e′1 = · · · = e′k any more), such that we have e′1 − e′2 = e′3 − e′4 , the angle between the short roots e′1 − e′2 = e′3 − e′4 ′ ′ ′ ′ and e′1 − e′3 = e′2 − e′4 of h is π3 or 2π 3 , and both e1 − e4 and e2 − e3 are roots of h ′ ′ such that one is long and the other is short. Assume e2 − e3 is the short root for example; assuming e′1 − e′4 to be the short root introduces only very minor changes in the following argument. If e′2 − e′3 = e′p − e′q , such that e′p 6= e′2 or e′q 6= e′3 , then either e′p or e′q must be different from the e′r s with 1 ≦ r ≦ 4. The short root e′2 − e′p = e′3 − e′q must be one of ±(e′1 − e′2 ) = ±(e′3 − e′4 ) or ±(e′1 − e′3 ) = ±(e′2 − e′4 ). Then the same e′2 or e′3 appears in different presentations of a short root of h, this contradicts our earlier observation. So there do not exist p and q such that e′2 − e′3 = e′p − e′q with either e′p 6= e′2 or e′q 6= e′3 . Thus X b g±(e′2 −e′3 ) = g±(ep −eq ) , ′ ′ ′ ′ ep =e2 ,eq =e3 Arguing as above, we see that both and e′3 are single. We can also get e′2 −e′3 6= e2 −e3 , otherwise e′2 − e′3 reaches the maximal possible length of h, which must be a long root, but we have assumedPit is a short root. By Lemma 5.1, h±(e′2 −e′3 ) is not a root plane of g, i.e. b g±(e′2 −e′3 ) = e′p =e′ ,e′q =e′ g±(ep −eq ) has dimension bigger than 2. So e′2 and e′3 2 3 cannot both be single. This is a contradiction. Assertion (1) of Lemma 5.2 is proved. (2) If there do not exist distinct indices i, j, k and l such that e′i − e′j = e′k − e′l , Then by Lemma 5.2(1) and Lemma 5.1, each root ei − ej is either contained in t ∩ h or t ∩ m. That is only possible when t ⊂ m or t ⊂ h, which we have seen is not the case. (3) follows from the argument of Lemma 5.2(1) which shows that h ∼ 6 g2 . = e′2 Now we determine h by the following lemma. Lemma 5.3. Let g = an with n > 2 and suppose that v = ne1 − e2 − · · · − en+1 ∈ t defines a CK vector field on the Riemannian normal homogeneous space M = G/H. Keep all relevant notations. Then for any 1 ≦ i ≦ n + 1, there is a unique j such that ei − ej = e′i − e′j ∈ h is a long root of h. Furthermore, n is odd. Proof. Since t is not contained in h, for any ei , there is another el such that ei − el ∈ / h. ′ ′ Then the root ei − el of h is not a root of g. By Lemma 5.1, h±(e′i −e′l ) is not a root plane of g and then dim b g±(e′i −e′l ) > 2. So we have e′i − e′l = e′k − e′j with k 6= i and l 6= j. By an earlier observation, and Lemma 5.2(3), e′i − e′j is a long root of h. There do not g±(e′i −e′j ) is exist p and q such that p 6= i, q 6= j and e′i − e′j = e′p − e′q . So h±(e′i −e′j ) = b ′ ′ a root plane of g. By Lemma 5.1(2), ei − ej = ei − ej ∈ t ∩ h. There does not exist another index p such that p 6= j and ei − ep ∈ h, because ei − ep is not orthogonal to ei + ej − el − ek ∈ m. Obviously the map from i to j 6= i maps j back to i. It follows immediately that n must be odd. After a suitable permutation of the ei we can assume h contains e1 − ek+1 , e2 − ek+2 , . . ., ek −en+1 , where k = (n+1)/2, and at the same time m contains e1 +ek+1 −e2 −ek+2 , e2 + ek+2 − e3 − ek+3 , . . ., ek−1 + e2k−1 − ek − en . Those are bases for the subspaces h and m. The root system of h is {±(ei −ei+k ) | 1 ≦ i ≦ k}∪{±(e′i −e′j ) | 1 ≦ i < j ≦ k}∪{±(e′i −e′j+k ) | 1 ≦ i < j ≦ k}. 16 Thus h is isomorphic to ck = sp(k). For the root planes, we have h±(ei −ei+k ) = b g±(ei −ei+k ) = g±(ei −ei+k ) , b g±(e′i −e′j ) = g±(ei −ej ) + g±(ei+k −ej+k ) for 1 ≦ i < j ≦ k and b g±(e′i −e′j+k ) = g±(ei −ej+k ) + g±(ej −ei+k ) , for 1 ≦ i < j ≦ k. We will see [m, m] ⊂ h, i.e. G/H is Riemannian symmetric. If α′ is a root of  h such 0 a on the g±α′ is the same −a g±α′ → b that b g±α′ ∩ m 6= 0, and u ∈ t ∩ m then ad (u) : b 0 g±α′ is a multiple of an root planes g±α where α restricts to α′ . Thus ad (u) : b g±α′ → b g±α′ ∩ m onto g±α′ ∩ m, and thus b isometry. For generic u, ad(u) maps b g±α′ ∩ h onto b b g±α′ ∩ h, because it maps orthocomplement to orthocomplement. There are no root planes of g contained in m, so the above argument proves [m ∩ t, m] = [m ∩ t, m ∩ t⊥ ] ⊂ h. (5.4) In particular [u, h] = m ∩ t⊥ and [u, m] ⊂ h for generic u ∈ t ∩ m. If w1 , w2 ∈ m ∩ t⊥ and u ∈ t ∩ m is generic, now [u, w1 ], [u, w2 ] ⊂ h, and [u, [w1 , w2 ]] = [[u, w1 ], w2 ] + [w1 , [u, w2 ]] ⊂ m, so h[w1 , w2 ], m ∩ t⊥ i = h[w1 , w2 ], [u, h]i = h[u, [w1 , w2 ]], hi = 0. Also we have h[w1 , w2 ], ui = hw1 , [w2 , u]i = 0, so h[w1 , w2 ], t ∩ mi = 0. Thus (5.5) [m ∩ t⊥ , m ∩ t⊥ ] ⊂ h. By (5.4) and (5.5), [m, m] ⊂ h, in other words G/H is a symmetric homogeneous space. It is locally Riemannian symmetric as well. To summarize, we have proved the following proposition. Proposition 5.6. Let G be a compact connect simple Lie group of type an and H a closed subgroup with 0 < dim H < dim G. If there is a nonzero vector v ∈ g = Lie(G) that defines a CK vector field on the Riemannian normal homogeneous space M = G/H, then M is a local Riemannian symmetric space with universal Riemannian covering space SU (2k)/Sp(k). 6 Proof of Theorem 1.1 for g = bn In this section g = bn = so(2n + 1) with n > 1, and 0 6= v ∈ t defines a CK vector field on the Riemannian normal homogeneous space M = G/H. Proposition 3.5 says that, up to the action of the Weyl group, either v is a multiple of e1 or a multiple of e1 + · · · + en . We must see whether those vectors v define CK vector fields on M . 17 The case v = e1 + · · · + en 6A Following the proof of Proposition 3.5 we may suitably permute the ei and assume h = Re1 + Ren−h+2 + · · · + Ren , and m = Re2 + · · · + Ren−h+1 . Let G′ be the connected Lie subgroup of G whose Lie algebra g′ is the centralizer of Ren−h+2 · · · + Ren in g. Let H ′ be the connected component of G′ ∩ H; its Lie algebra h′ = h ∩ g′ . We have a direct sum decomposition g′ = g′′ ⊕ c in which c is the center and g′′ = so(2n − 2h + 3) corresponding to the ei with 1 ≦ i ≦ n − h + 1. Here c = Ren−h+2 + · · · + Ren . We also have a direct sum decomposition h′ = h′′ ⊕ c, in which either h′′ = Re1 or h′′ is of type a1 with Cartan subalgebra t ∩ h′′ = Re1 . Let G′′ be the closed subgroup in the universal cover of G′ with Lie algebra g′′ , and H ′′ the closed connected subgroup of G′′ with Lie algebra h′′ . The restriction of the bi-invariant inner product of g to g′ and g′′ defines locally isometric Riemannian normal homogeneous metrics on G′ /H ′ and G′′ /H ′′ respectively. Thus we have orthogonal decompositions g′ = h′ + m′ and g′′ = h′′ + m′′ . (6.1) Since g′ is the centralizer of a subalgebra of h, the first decomposition in (6.1) coincides with g′ = (g′ ∩ h) + (g′ ∩ m). Since c ⊂ h′ is orthogonal to m′ , i.e. m′ ⊂ g′′ , the second decomposition in (6.1) coincides with g′′ = (g′′ ∩ h′ ) + (g′′ ∩ m′ ) = (g′′ ∩ h) + (g′′ ∩ m). The vector v can be decomposed as the sum of v ′′ = e1 + · · · + en−h+1 ∈ g′′ and vc = en−h+2 + · · · + en ∈ c, which is orthogonal to g′′ . So by Lemma 3.2, v ′′ defines a CK vector field on the Riemannian normal homogeneous space G′′ /H ′′ . If h′′ = Re1 we can find   0 0 1 0     0 1 0 1 0 0 01 v1′′ = diag 0, −1 , , . . . , ∈ m′′ ∩ Ad (G)v ′′ . 0 00 −1 0 −1 0 0 −1 0 0 Then ||prh′′ (v ′′ )|| > ||prh′′ (v1′′ )|| = 0, which contradicts the CK property of v. If h′′ ∼ = a1 , ′′ we use the Weyl group of G to change it to the standard so(3) ⊂ so(2n − 2h + 3) corresponding the 3 × 3-block at the upper left corner. The argument used for the case h′′ = Re1 also leads to a contradiction in this case. 6B The case v = e1 We now consider the case v = e1 in Proposition 3.5. Denote e′i = prh (ei ) for 1 ≦ i ≦ n; they all have the same length. We have E1,2i − E2i,1 and E1,2i+1 − E2i+1,1 in Ad (G)v ∩ g±ei . Thus, for 1 ≦ i ≦ n, e′i is a root of h, and dim b g±e′i > 2. Ad (G)v also contains E2i,2j − E2j,2i ∈ g±(ei +ej ) + g±(ei −ej ) for 1 ≦ i < j ≦ n, so either e′i + e′j or e′i − e′j is a root of h whenever i 6= j. Any root of h has form ±e′i or ±e′i ± e′j , and it follows that h is a compact simple Lie algebra. From the standard description of the roots of bn , cn , f4 and g2 , the ±e′i cannot be long roots, because all roots of h are of the form ±e′i ± e′j for i 6= j. 18 If i 6= j then e′i 6= ±e′j because that would give a root e′i ± e′j = 0 or 2e′j . Thus {±e′i } is a set of 2n distinct roots of h. Since dim b g±e′i > 2, and prh (±ej ) 6= e′i for i 6= j, there must be a root α of the form ±ej ± ek , such that prh (α) = e′i , i.e. e′i = ±e′k ± e′l . Summarizing the above argument, we have the following lemma. Lemma 6.2. Suppose that g = bn with n > 1 and that v = e1 ∈ t defines a CK vector field on the Riemannian normal homogeneous space M = G/H. Denote e′i = prh (ei ), then we have the following. (1) {±e′1 , . . . , ±e′n } consists of 2n different roots of h. If 1 ≦ i < j ≦ n then either e′i + e′j or e′i − e′j is a root of h. (2) The Lie algebra h is compact simple. If it is isomorphic to bn , cn , f4 or g2 then the ±e′i are short roots. (3) Any e′i can be expressed as e′i = ±e′j ± e′k in which i, j and k are different from each other. Because from the Ad(G)-orbit of v, we can find an orthonormal basis for t as well as an orthonormal basis for g, by Lemma 3.3, (6.3) 2n + 1 = dim h dim g = , dim t dim t ∩ h Denote h = dim t ∩ h. Then the right side of (6.3) is h + 2, 2h + 1, 2h + 1, 2h − 1, 13, 19, 31, 13 or 7, respectively, when h is isomorphic to ah , bh , ch , dh , e6 , e7 , e8 , f4 or g2 . Because h < n, h can only be e7 , e8 , f4 or g2 . First consider the cases where h is isomorphic to e7 , e8 or f4 . If e′i = ±e′j ± e′k , then ′ ′ and e′k have an angle π3 or 2π 3 , so the corresponding vector ±ej ± (−ek ) is not a root of h. Based on this observation, we have the following lemma. e′j Lemma 6.4. Assume g = bn , h = e7 , e8 or f4 , and v = e1 ∈ t defines a CK vector field on the Riemannian normal homogeneous space G/H. Then (6.5) whenever 1 ≤ i ≤ n. ||v||2 dim t = = dim b g±e′i − 1 ≥ 3, ||prh (v)||2 dim(t ∩ h) P Proof. Denote dim b g±e′i = 2k + 2 and b g±e′i = kj=1 g±αj . Consider any root αj of g in the above equality, and assume it has the form αj = ±ep ± eq with p < q. Denote ᾱ = ±ep ∓eq . Because h is not isomorphic to g2 , and all the e′p , e′q and prh (αj ) = ±e′p ±e′q are short roots of h, now prh (ᾱj ) = ±e′p ∓ e′q is not a root of h, i.e. g±ᾱj ⊂ m. P Let v = g±ei + kj=1 (g±αj + g±ᾱj ), then v = (v ∩ h) + (v ∩ m), and v ∩ h = h±e′i is real 2-dimensional. Because different roots αj correspond to different pairs {p, q} for αj = ±ep ± eq , all roots ᾱj of g are also different with each other. So v is a real 4k + 2-dimensional linear space. Inside Ad(G)v = Ad (G)e1 we have an orthonormal basis of v consisting of E1,2i − E2i,1 and E1,2i+1 − E2i+1,1 in g±ei and E2p,2q − E2q,2p , 19 E2p,2q+1 − E2q+1,2q , E2p+1,2q − E2q,2p+1 and E2p+1,2q+1 − E2q+1,2p+1 in each g±αj + g±ᾱj . By Lemma 6A, and using some arguments as before, we have dim t dim v ||v||2 = = = 2k + 1 = b g±e′i − 1. 2 ||prh || dim(t ∩ h) dim(v ∩ h) If h is e7 , e8 or f4 , then, by (6.3), n = dim t is 9, 15 or 6, respectively, contradicting (6.5). Finally we consider the case h = g2 and show it is possible. By (6.3), we have n = 3 for this case, with ±e1 , ±e2 and ±e3 corresponding to the three pairs of short roots. Suitably choosing ei and applying sign changes ei 7→ −ei as appropriate, we may assume t ∩ m = R(e1 + e2 + e3 ), and the root planes of h are h±(ei −ej ) = g±(ei −ej ) , for 1 ≦ i < j ≦ 3, and g± 1 (ei +ej −2ek ) = g±(ei +ej ) + g±ek for {i, j, k} = {1, 2, 3}. h± 1 (ei +ej −2ek ) ⊂ b 3 3 The subalgebra h is uniquely determined up to the action of Ad(G). Since the isotropy subgroup G2 is transitive on directions in the tangent space of S 7 = Spin(7)/G2 , the Spin(7)–invariant Riemannian metric on that space is the standard constant positive curvature metric. Now the vector v = e1 ∈ t does defines a CK vector field on S 7 = Spin(7)/G2 . It is well known that v ′ = e1 + · · · + e4 defines a CK vector field on the symmetric space S 7 = Spin(8)/Spin(7) for the standard imbedding so(7) ֒→ so(8). But if we change the setup by a suitable outer automorphism, using triality, v ′ can be changed to v = e1 , which belongs to the Cartan subalgebra t of the standard so(7) ⊂ so(8). Inside so(8) the intersection of the standard so(7) and the isotropic one is just the g2 . So v = e1 also defines a CK vector field on the Riemannian symmetric S 7 = Spin(7)/G2 . In summary, we have the following proposition. Proposition 6.6. Let G be a compact connected simple Lie group with g = bn where n > 1. Let H be closed subgroup with 0 < dim H < dim G, such that G/H is a Riemannian normal homogeneous space. Assume there is a nonzero vector v ∈ g that defines a CK vector field on M = G/H. Then M = G/H is a locally symmetric Riemannian manifold whose universal Riemannian covering is S 7 = Spin(7)/G2 . 7 The proof of Theorem 1.1 when g = cn In this section we assume that g = cn = sp(n) with n > 2, and that 0 6= v ∈ t defines a CK vector field on the Riemannian normal homogeneous space M = G/H. According to Proposition 3.5, we may assume that either v = e1 + · · · + en or v = e1 20 7A The case v = e1 + · · · + en After a suitable permutation of the ei we may assume h = Re1 + Rem+2 + · · · + Ren and m = Re2 + · · · + Rem+1 . Consider the closed subgroup G′ of G whose Lie algebra g′ is the centralizer of Rem+2 + · · · + Ren . Let H ′ be the identity component of G′ ∩ H. Then g′ = g′′ ⊕c where g′′ = sp(m+1) corresponds to {e1 , . . . , em+1 } and c = Rem+2 +· · ·+Ren is its center. The subalgebra h′ = h′′ ⊕ c where either h′′ = h ∩ g′′ = Re1 or h′′ ∼ = a1 ′′ with Cartan subalgebra Re1 and root plane RjE1,1 + RkE1,1 . Let G be the analytic subgroup of G′ for g′′ and let H ′′ be the analytic subgroup of G′′ for h′′ . They are closed subgroups. The restriction of the bi-invariant inner product of g to g′ and g′′ defines locally symmetric Riemannian normal homogeneous metrics on G′ /H ′ and G′′ /H ′′ respectively. As argued before, the orthogonal decomposition g′′ = h′′ + m′′ is the same as g′′ = (g′′ ∩ h) + (g′′ ∩ m). We can also decompose v as the sum of v ′′ = e1 + · · · + em+1 ∈ t ∩ g′′ and vc = em+2 + · · · + en ∈ c which is orthogonal to g′′ . By Lemma 3.2, v ′′ defines a CK vector field on the Riemannian normal homogeneous space G′′ /H ′′ . From the Ad(G′′ )-orbit of v ′′ we have v1′′ = i (diag (( 01 10 ) , 1, . . . , 1)) ∈ m′′ , i.e. ||prh′′ (v ′′ )|| > ||prh′′ (v1′′ )|| = 0, which is a contradiction. Remark. As in the case 5A in Section 5, for n > 2, v = e1 + · · · + en defines a CK vector field for the constant curvature metric on S 4n−1 . That metric is normal homogeneous for S 4n−1 = SO(4n)/SO(4n − 1), but it is not normal homogeneous for S 4n−1 = Sp(n)/Sp(n − 1). 7B The case v = e1 Here v = e1 in Proposition 3.5, and we denote e′i = prh (ei ) for 1 ≦ i ≦ n. The e′i all have the same length. The orbit Ad(G)v contains v ′ = jEi,i ⊂ g±2ei , and prh (v ′ ) 6= 0 6= prm (v ′ ), for 1 ≦ i ≦ n. So 2e′i is a root of h and dim b g±2e′i > 2, for 1 ≦ i ≦ n. Suitably choosing ei with any necessary sign changes ei 7→ −ei , we may assume, for 1 ≦ i < j ≦ n, that the roots ±2ei and ±2ej project to the same pair of roots of h only when e′i = e′j . In other words e′i + e′j 6= 0, for 1 ≦ i < j ≦ n. If we have a different presentation for the root 2e′i , e.g. 2e′i = ±e′j ± e′k , then the plus signs must be taken and e′j = e′k = e′i . ′ If e′i = e′j for some i 6= j, we can permute ei so that pr−1 h (e1 ) contains {e1 , . . ., ek }, where k > 1, and it does not contain any other ei . So X X b g±2e′1 = g±2ei + g±(ei +ej ) , 1≦i≦k 1≦i<j≦k in such a way that the root plane h±e′1 is linearly generated by two matrices u and w in sp(k) ⊂ sp(n) with nonzero elements only in the upper left k × k corner. So [u, w], which is a nonzero multiple of e′1 , is represented by a matrix in Re1 + · · · + Rek ∈ sp(k). Since ei − ej ∈ m for 1 ≦ i < j ≦ k, we have e′1 = k1 (e1 + · · · + ek ). Any root plane g±(ei −ej ) , 1 ≦ i < j ≦ k is contained in m. 21 Let G′ be the closed subgroup of G with Lie algebra g′ = sp(k) corresponding to {e1 , . . ., ek }, and H ′ the identity component of G′ ∩ H. The Lie algebra h′ = g′ ∩ h = Re′1 + h±e′1 . The restriction of the bi-invariant inner product of g to g′ defines a Riemannian normal homogeneous space M ′ = G′ /H ′ . The corresponding orthogonal decomposition g′ = h′ + m′ coincides with g′ = (g′ ∩ h) + (g′ ∩ m), v = e1 ∈ g′ defines a CK vector field on the normal homogeneous space G′ /H ′ , and h′ is spanned by w1 = iIk×k , w2 = jA + kB, and w3 = −jB + kA, where A and B are real symmetric k × k matrices. From w1 ∈ R[w2 , w3 ], we have AB = BA and A2 + B 2 = cI > 0. By a suitable Ad(G′ ) conjugation (which is a SO(k) conjugation on sp(k)) we diagonalize A and B simultaneously. By a suitable Ad(G′ ) conjugation and scalar multiplications, i.e. Sp(k)-conjugation, we may assume w2 = jIk×k and w3 = kIk×k . Notice  √ √    √ √   2 2 2 − 22 ′ 2 2 2 √ √ √ √ , 1, . . . , 1 · v · diag , 1, . . . , 1 v1 = diag 2 2 − 22 22 2 2    1 i − 12 i 2 , 0, . . . , 0 , and = diag −1i 1i 2 v2′ 2 = diag(1, −j, 1, . . . , 1) · v ′ · diag(1, j, 1, . . . , 1)    1 i − 21 k 2 = diag , 0, . . . , 0 −1k −1i 2 2 belong to Ad(G′ )v, but ||prh′ (v)|| > ||prh′ (v ′′ )|| = 0. This is a contradiction. So the e′i must all be distinct and b g±2e′i = g±2ei = h±2e′i for 1 ≦ i ≦ n. This contradicts our b earlier conclusion that dim g±2e′i > 2. In summary, we have proved Proposition 7.1. Let G be a compact connected simple Lie group with g = cn and n > 2. Let H be closed subgroup with 0 < dim H < dim G such that G/H is a Riemannian normal homogeneous space. Then there is no nonzero vector v ∈ g that defines a CK vector field on G/H. 8 The case g = dn In this section g = dn = so(2n) with n > 3, and 0 6= v ∈ g defines a CK vector field on the Riemannian normal homogeneous space G/H. 8A The case v = e1 + · · · + en We consider the case v = e1 + · · · en of Proposition 3.5 with n > 4. If n = 4, we can use the outer automorphism of g that changes v to e1 , which will be discussed in the next case. By an argument similar to that of Proposition 3.5(2), we show hprh (±ei ± ej ), ±ek ± el i = hprm (±ei ± ej ), ±ek ± el i = 0, 22 whenever i, j, k and l are different indices. Changing k and l arbitrarily, and taking linear combinations of these two equalities, prh (ei ) and prm (ei ) are contained in Rei + Rej . Change j as well, we get prh (ei ) and prm (ei ) are contained by ∩j6=i (Rei + Rej ) = Rei . So either ei ∈ h or ei ∈ m for each i. Let m = dim t ∩ m. We will prove m = 1. For if m > 1 we can suitably permute ei so that h ∩ t = Re1 + Rem+2 + · · · + Ren and m ∩ t = Re2 + · · · + Rem+1 . Let g′ be the centralizer of Rem+2 + · · · + Ren in g and G′ the analytic subgroup of G for g′ . Similarly h′ = g′ ∩ h and H ′ is the corresponding analytic subgroup. Then g′ = g′′ ⊕ c where g′′ ∼ = so(2m + 2) corresponds to the (2m + 2) × (2m + 2)-block in the upper left corner, and where c = Rem+1 + · · · + Ren is the center of g′ . Observe h′ = h′′ ⊕ c where h′′ = g′′ ∩ h′ is either the abelian subalgebra Re1 or is isomorphic to a1 with Cartan subalgebra Re1 . Let G′′ be the analytic subgroup of G′ with Lie algebra g′′ and H ′′ the analytic subgroup of G′′ for h′′ . As we argued in Section 6A, the restriction of the bi-invariant inner product of g to g′′ defines a Riemannian normal homogeneous metric on G′′ /H ′′ , such that the orthogonal decomposition g′′ = h′′ + m′′ coincides with g′′ = (g′′ ∩ h) + (g′′ ∩ m). For the corresponding decomposition v = v ′′ + vc , v ′′ = e1 + · · · + em+1 ∈ g′′ and vc = em+2 + · · · + en ∈ c ⊂ g′′⊥ , v ′′ defines a CK vector field on the normal homogeneous space M ′′ = G′′ /H ′′ . If h′′ is abelian, then we can choose     02×2 I2×2 0 1 ,..., 0 1 , v1′′ = diag ∈ m′′ ∩ Ad (G′′ )v ′′ . −1 0 −1 0 −I2×2 02×2 Then ||prh′′ (v ′′ )|| > ||prh′′ (v1′′ )|| = 0, which is a contradiction. If h′′ is not abelian, then we can use suitable Ad(G′ ) action, i.e. SO(2m + 2) conjugation, to move h′′ to the subalgebra so(3) for the 3 × 3-block in the upper left corner. We can choose     03×3 I3×3 0 1 ,..., 0 1 , v2′′ = diag ∈ m′′ ∩ Ad (G′′ )v ′′ . −1 0 −1 0 −I3×3 03×3 Then we again have ||prh′′ (v ′′ )|| > ||prh′ (v2′′ )|| = 0, which is a contradiction. This completes the proof that m = 1. Now we suitably permute ei so that t ∩ h = Re1 + · · · + Ren−1 and t ∩ m = Ren . Whenever 1 ≦ i < j < n, we have vectors X v′ = (E2k−1,2k − E2k,2k−1 ) + u′ ∈ Ad (G)v 1≦k≦n−1,i6=k6=j in which the possibilities for u′ are E2i−1,2j−1 + E2i,2j − E2j−1,2i−1 − E2j,2i and E2i−1,2j − E2i,2j−1 + E2j−1,2i − E2j,2i−1 in g±(ei −ej ) , and E2i−1,2j−1 − E2i,2j − E2j−1,2i−1 + E2j,2i and E2i−1,2j + E2i,2j−1 + E2j−1,2i + E2j,2i−1 in g±(ei +ej ) . The condition that ||prh (v)|| = ||prh (v ′ )|| for each choice of u′ indicates each u′ ∈ h, i.e. g±(ei ±ej ) ⊂ h for 1 ≦ i < j < n. A similar argument can also show 23 each ei is a root of h, and b g±ei = g±(ei +en ) + g±(ei −en ) . Now, up to the action of Ad(G), h is uniquely determined, and is the standard so(2n − 1) in so(2n). We can also use similar argument as for the case 5B in Section 5, to prove directly the homogeneous space is symmetric, i.e. [m, m] ⊂ h. Then G/H is Riemannian symmetric, covered by the sphere S 2n−1 = SO(2n)/SO(2n − 1) of positive constant curvature. It is well known fact that v = e1 + · · · + en defines a CK vector field on it, because its centralizer U(n) acts transitively on S 2n−1 . 8B The case v = e1 Finally we consider the case v = e1 in Proposition 3.5. Denote e′i = prh (ei ) for 1 ≦ i ≦ n. They all have the same length. Either e′i + e′j or e′i − e′j is a root of h because v ′ = E2i−1,2j−1 − E2j−1,2i−1 ∈ g±ei +ej + g±ei −ej belongs to the Ad(G)-orbit of v, i.e. ||prh (v ′ )|| = ||prh (v)|| > 0. Distinct Roots. We first prove that {±e′1 , . . . , ±e′n } consists of 2n distinct roots of h. For if not, then there are indices i 6= j such that one of e′i ± e′j = 0. Then 2e′i = e′i ∓ e′j is a root of h. If 2e′i = ±e′k ± e′l , then ||e′i || = ||e′k || = ||e′l || tells us that the pairs {±e′i }, {±e′k } and {±e′l } are equal. If e′i 6= ±e′k and e′i + e′k is a root of h then, using h2e′i , e′i + e′k i > 0, 2e′i − (e′i + e′k ) = e′i − e′k is a root of h. Similarly if e′i − e′k is a root of h then e′i + e′k is a root of h. Notice that 2e′i is a long root and e′i ± e′k are short roots orthogonal to each other. This can only happen in a subalgebra of type c2 . Thus 2(e′i + e′k ) − 2e′i = 2e′k is also a long root of h with he′i , e′k i = 0, and there must be an index l with e′k = ±e′l . From this argument all ±2e′i s are long roots of h. If there are exactly m different pairs {±e′i }, then h is isomorphic to cm . Suitably choosing ei , then we can assume e′i + e′j 6= 0 for i 6= j. Without loss of ′ generality, we may assume that pr−1 h (e1 ) contains {e1 , . . ., ek } but no other el and does not contain any −el . Then X g±(ei −ej ) ⊂ m, for 1 ≦ i < j ≦ k and h±2e′1 ⊂ b g±2e′1 = g±(ei +ej ) . 1≦i<j≦k Now e′1 ⊂ [h±2e′1 , h±2e′1 ] is realized as a matrix in so(2k) corresponding the left upper (2k × 2k)–block, i.e. e′1 ∈ Re1 + · · · + Rek . By our assumption, ei − ej ∈ t ∩ m for 1 ≦ i < j ≦ k, so e′1 = k1 (e1 + · · · + ek ). Let G′ be the analytic subgroup of G with Lie algebra g′ = so(2k) corresponding the upper left 2k ×2k corner and H ′ the analytic subgroup for h′ = g′ ∩h = Re′1 +h±2e′1 . Then h′ ∼ = a1 . Also, X X g′ ∩ m = R(ei+1 − ei ) + g±(ei −ej ) . 1≦i<k 1≦i<j≦k g′ The restriction to of the bi-invariant inner product on g defines a Riemannian normal homogeneous metric on G′ /H ′ . The orthogonal decomposition g′ = h′ + m′ coincides with the decomposition g′ = (g′ ∩ h) + (g′ ∩ m). So the vector v = e1 ∈ g′ defines a CK vector field on the Riemannian normal homogeneous space G′ /H ′ . The orbit Ad(G′ )v contains an orthonormal basis of g′ which in turn contains an orthonormal basis for t ∩ g′ . By Lemma 3.3, 2k − 1 = dim h′ dim g′ = = 3, so k = 2. dim(t ∩ g′ ) dim(h′ ∩ t) 24 Suitably permuting the ei , we can assume the distinct e′i are given by {e′1 = e′2 , e′3 = e′4 , . . . , e′n−1 = e′n }. Then dim b g±(e′1 ±e′3 ) = 8, in which 2 dimensions belong to h and the other 6 dimensions belong to m. The Ad(G)–orbit of v = e1 contains an orthonormal basis of t consisting of all the ei . It also contains an orthonormal basis of b g±(e1 +e3 ) + b g±(e1 −e3 ) . As in Lemma 3.3, we have dim(b g±(e1 +e3 ) + b g±(e1 −e3 ) ) dim t = , dim(t ∩ h) dim(h ∩ (b g±(e1 +e3 ) + b g±(e1 −e3 ) )) which is a contradiction because the left side is 2 and the right side is 4. In summary, we have proved Lemma 8.1. Suppose g = dn with n > 3. Suppose that v = e1 ∈ t defines a CK vector field on the Riemannian normal homogeneous space G/H. Denote e′i = prh (ei ) for 1 ≦ i ≦ n, then {±e′1 , . . . , ±e′n } has cardinality 2n. Second, we consider the case where one of e′i ± e′j is a root of h and the other is not, for any 1 ≦ i < j ≦ n. Given a root α′ of h, we denote dim b g±α′ = 2kα′ and Pkα′ dim(t ∩ h) = h, and we express b g±α′ = i=1 g±αi . By an argument similar to that of Lemma 6.4, we see dim t n = = dim b g±α′ = 2kα′ , i.e. n = 2kα′ h. h dim(t ∩ h) Thus k = kα′ is independent of the choice of α′ . Denote the number of roots of g and h by |∆| and |∆′ |, respectively. Then |∆| = 2k|∆′ |. But |∆| = 2n(n − 1), which implies |∆′ | = 2h(2kh − 1) ≧ 4h2 − 2h. Calculate |∆′ | and 4h2 − 2h for each simple Lie algebra: |∆′ | 4h2 − 2h aq q(q + 1) 4q 2 − 2q bq 2q 2 4q 2 − 2q cq 2q 2 4q 2 − 2q dq 2q(q − 1) 4q 2 − 2q g2 12 12 f4 48 56 e6 72 132 e7 126 182 e8 240 240 Now for any compact simple Lie algebra h of rank h, the number |∆′ | of all roots satisfies |∆′ | ≦ 4h2 − 2h, with equality if and only if k = 1 and h is isomorphic to a1 , g2 or e8 . If h is not simple, say h = h1 ⊕ · · · ⊕ hp ⊕ Rq , let hi denote the rank, and ∆′i the root system, of hi . Then (8.2) |∆′ | = p X i=1 |∆′i | ≦ p p p X X X hi ≦ 4h2 − 2h. hi )2 − 2 (4h2i − 2hi ) ≦ 4( i=1 i=1 i=1 If q > 0 the last ≦ in (8.2) is strict, and if p > 1 then the second to last ≦ in (8.2) is strict. So in those cases |∆′ | < 4h2 − 2h. Now h is simple. 25 Since h is simple, it is isomorphic to a1 , g2 or e8 , Here a1 would imply n = 2, while we are assuming n > 3, so h is g2 or e8 , With some sign changes ei 7→ −ei now every e′i − e′i+1 is a root of h. As dim b g±(e′i −e′i+1 ) = 2ke′i −e′i+1 = 2, i.e. h±(e′i −e′i+1 ) = g±(ei −ei+1 ) , e′i − e′i+1 ∈ [g±(ei −ei+1 ) , g±(ei −ei+1 ) ] ⊂ t ∩ h for 1 ≦ i < n. Thus dim(t ∩ h) ≧ n − 1 > h. This is a contradiction. Summarizing the above argument, Lemma 8.3. Assume g = dn with n > 3 and suppose that v = e1 ∈ t defines a CK vector field on the Riemannian normal homogeneous space G/H. Denote e′i = prh (ei ) for 1 ≦ i ≦ n. Then there exist i < j such that both e′i ± e′j are roots of h. h is simple. Third, we will prove that h is a compact simple Lie algebra. Suitably permuting e′i we can assume both e′1 +e′2 and e′1 −e′2 are roots of h. They are orthogonal. For each i > 2, either e′1 + e′i or e′1 − e′i is a root of h. Suitably replace some ei by its negative; then we can assume e′1 − e′i is a root of h. Then we have ci = ±1 for i > 2 such that hci e′2 , e′1 − e′i i ≥ 0. Then he′1 + ci e′2 , e′1 − e′i i ≥ he′1 , e′1 − e′i i > 0, in other words e′1 − e′i is a root for the same simple component of h as e′1 + ci e′2 . The roots {e′1 − e′i | 1 < i ≦ n} ∪ {e′1 + e′2 } of h generate t ∩ h, so h is semi-simple. If h is not simple then the above argument shows h = h1 ⊕ h2 where e′1 − e′2 is a root of h1 , e′1 + e′2 is a root of h2 , and h1 and h2 are simple. Suppose h = h1 ⊕ h2 as just described. Suppose that there are indices i 6= j, both > 2, e′1 − e′i is a root of h1 , and e′1 − e′j is a root of h2 . Because e′2 + e′i = / t ∩ (h1 ∪ h2 ) is not a root of h, e′2 − e′i ∈ t ∩ h1 is a root of h1 . (e′1 + e′2 ) − (e′1 − e′i ) ∈ Similarly, e′2 + e′j ∈ t ∩ h2 is a root of h2 . Then neither e′i + e′j = (e′i − e′2 ) + (e′2 + e′j ) nor e′i − e′j = (e′i − e′1 ) + (e′1 − e′j ) is contained in t ∩ (h1 ∪ h2 ), so they are not roots of h. That is a contradiction. So all e′1 − e′i for i > 2 are roots of the same h1 or h2 . Suitably choose e2 from ±e2 so that e′1 − e′i is a root of h1 for 1 < i ≦ n. It implies rkh1 = rkh − 1, and then h2 ∼ = a1 with the only roots ±(e′1 + e′2 ). There does not exist ′ ′ any root ei + ej of h for 2 < i < j ≤ n, because otherwise it is a root of h1 , and it implies t ∩ h1 = t ∩ h which is a contradiction. As e′1 + e′2 ⊥ e′1 − e′i , e′1 + e′2 ∈ h is orthogonal to e1 − ei = (e′1 − e′i ) + prm (e1 − ei ) as well, for 1 < i ≦ n. That implies e′1 + e′2 ∈ R(e1 + · · · + en ). Let G′ be the analytic subgroup of G with Lie algebra X X g±(ei −ej ) . g′ = R(ei − ei+1 ) + 1≦i<j≦n 1≤i<n It is the standard su(n − 1) in so(2n). The identity component H ′ of G′ ∩ H has Lie algebra h′ = h1 . The restriction of the bi-invariant inner product of g to g′ defines a normal homogeneous metric on G′ /H ′ . For (g′ , h′ ), we have the decomposition X b g′ = t ∩ g′ + g′±γ , γ∈t ∩h1 g±γ because hγ, e1 + · · · + en i = 0 whenever γ is a root in which b g′±γ coincides with b of h1 . The orthogonal decomposition g′ = h′ + m′ is given by g′ = (g′ ∩ h) + (g′ ∩ m). Decompose v = e1 as v ′ + vc where v ′ = n1 ((n − 1)e1 − e2 − · · · − en ) ∈ t ∩ g′ and 26 vc = n1 (e1 + · · · + en ) with [vc , g′ ] = 0 and hvc , g′ i = 0. So v ′ defines a CK vector field on the Riemannian normal homogeneous space G′ /H ′ . By Proposition 5.6, n is even, say n = 2k with k ≥ 2, and conjugation by an element of Ad (G′ ) carries h′ to the standard sp(k) in su(n). So h ∼ = ck ⊕ a1 . Since Ad(G)(v) contains an orthonormal basis for g as well as an orthonormal basis for t, Lemma 3.3 implies 2n − 1 = dim h 2k2 + k + 3 dim g = = , not an integer unless k = 3. dim t dim(t ∩ h) k+1 2 +k+3 But if k = 3 then 2n − 1 = 5 while 2k k+1 = 6. So in any case this is a contradiction. Summarizing the above arguments, we have proved Lemma 8.4. Assume g = dn with n > 3 and suppose that v = e1 ∈ t defines a CK vector field on the Riemannian normal homogeneous space G/H. Then the Lie algebra h is simple. √ √ ||e′ +e′ || Since h is simple, the ratio r = ||e1′ −e2′ || can only be ( 3)±1 , ( 2)±1 or 1. The e′i 1 2 cannot all be mutually orthogonal because that would imply t ⊂ h, a contradiction. If r 6= 1, so h has two root lengths and must be bh or ch with h = dim(t ∩ h), or f4 with h = 4, or g2 with h = 2. If r = 1 and we have e′i and e′j , such that i 6= j and he′i , e′j i = 6 0, ′ ′ ′ ′ ′ ′ either ei + ej or ei − ej is a root whose length is different from that of e1 ± e2 . So in that case also h is isomorphic to bh , ch , f4 or g2 . As seen earlier, Ad(G)(v) contains orthonormal bases of t and g. By Lemma 3.3, (8.5) 2n − 1 = dim(h) dim g = . dim t dim(t ∩ h) The g2 case. When h is isomorphic to g2 , the right side of (8.5) is 7, so n = 4. In this case e′i and e′j must have an angle π3 or 2π 3 , when i 6= j. The only possible choices for all ±e′i are ±e′1 , ±e′2 and the shorter pair among ±e′1 ± e′2 . One can’t have four different pairs of ±e′i . This is a contradiction. The bh and ch cases. When h is isomorphic to bh or ch , the right side of (8.5) is 2h + 1, so n = h + 1. Note that h ∩ t is a hyperplane in t, so the complement has 2 components. With suitable sign changes ei 7→ −ei we may suppose that all ei belong to the same component and they all have the same projection to m. So ei − ej ∈ h for i < j and m ∩ t = R(e1 + · · · + en ). √ Since e′1 − e′2 = e1 − e2 is a long root of h, with length 2, e′1 + e′2 can have length 1 only when n = 4. In that case ±(e′1 + e′2 ) = ∓(e′3 + e′4 ), ±(e′1 + e3 ) = ∓(e′2 + e′4 ) and ±(e′1 + e′4 ) = ∓(e′2 + e′3 ) are the only three possible pairs of short roots that are orthogonal to each other, so h is isomorphic to b3 , where the root system contains all above shorts roots and all long roots of the form ±(ei − ej ). Up to Ad(G) conjugacy now h is uniquely determined, and it satisfies the symmetric space condition [m, m] ⊂ h. By a suitable outer automorphism of d4 , it can be changed back to the standard so(7) inside g = so(8), and so G/H is a locally Riemannian symmetric space, covered by the round S 7 = Spin(8)/Spin(7) = SO(8)/SO(7). At the same time, the automorphism 27 changes v = e1 to a vector of the form ±e1 ± · · · ± e4 , which is well known to define a CK vector field on S 7 . The f4 case. For the rest of this section, h is isomorphic to f4 . Then the right side of (8.5) is 13, so n = 7. For simplicity, we rescale the inner product of g, so that ||e′i || = 1 for 1 ≦ i ≦ n. Then he′1 , e′2 i must be 0 or ± 13 . Our next step is to prove the case that e′1 ± e′2 are roots of h with he′1 , e′2 i = ± 13 is impossible. Assume conversely it happens, then one of e′1 ± e′2 is short with length √23 √ 2√ 2 . 3 √ 2√ 2 . So 3 and the other is long with length a root of h, with length √2 3 or For any indices i 6= j, either e′i + e′j or e′i − e′j is hei , ej i = ± 13 for 1 ≦ i < j ≦ n. We make appropriate sign changes ei 7→ −ei so that he′1 , e′i i = − 13 for all i > 1. So if − e′i is a root of h, it is a long root, and if e′1 + e′i is a root of h, it is a short root. e′1 π 4 For any i > 2, if e′1 + e′i is a short root of h, then e′1 + e′i has an angle long root e′1 − e′2 , because he′1 + e′i , e′1 − e′2 i = 1 − he′i , e′2 i > 0. So he′1 + e′i , e′1 − e′2 i = |e′1 + e′i | · |e′1 − e′2 | · cos π4 = √2 2 · √ 2√ 2 3 · √ 2 2 = 4 3 with the . That implies he′2 , e′i i = − 13 . If e′1 − e′i is a long root of h, then e′1 − e′i has an angle π4 with the short root e′1 + e′2 , because he′1 − e′i , e′1 + e′2 i = 1 − he′i , e′2 i > 0. Arguing as above, he′2 , e′i i = − 13 . Assume i 6= j with {i, j} ⊂ {3, . . . , n}. If e′1 − e′i and e′1 − e′j are both long roots of h, they must have an angle π3 because he′1 − e′i , e′1 − e′j i = 35 + he′i , e′j i > 0. So he′1 − e′i , e′1 − e′j i = 43 , which implies he′i , e′j i = − 13 . If e′1 − e′i is a long root and e′1 + e′j is short they must have an angle π4 because he′1 − e′i , e′1 + e′j i = 1 − he′i , e′j i > 0. So he′1 − e′i , e′1 + e′j i = 43 , which implies he′i , e′j i = − 31 . Based on the above observations, we see if there is e′i , i > 2, such that e′1 − e′i is a long root of h, we can suitably permute ej , j > 2 to make i = 3. Then the matrix (he′p , e′q i)1≦p,q≦5 must be of the form       1 − 31 − 31 − 31 − 31 − 13 1 − 13 − 13 − 13 − 31 − 13 1 − 31 − 31 − 31 − 31 − 31 1 − 31 − 31 − 31 1 3 1 1 3        or      1 − 13 − 13 − 13 − 13 − 31 1 − 31 − 31 − 31 − 13 − 13 1 − 13 − 13 − 31 − 31 − 13 1 − 31 − 31 − 31 − 31 − 31 1    ,   which is non-singular in either case. That contradicts dim(t ∩ h) = 4. So h has no long root of the form e′1 − e′i , i > 2. Furthermore, h has no long root of the form e′2 − e′i , i > 2; for if e′2 − e′i is a long root with i > 2, then it has an angle 2π 3 with the long root e′1 − e′2 of h, i.e. e′1 − e′i = (e′1 − e′2 ) + (e′2 − e′i ) is a long root of h, which contradicts our previous statement. The number of long roots with the form ±e′i ± e′j is at most 22, consisting of ±(e′1 − e′2 ), and at most a pair of long roots from each set {±e′i ± e′j } for 2 < i < j ≦ 7. The number of long roots of h can not reach 24, which is a contradiction. This completes the proof, in the f4 case, that we do not have roots e′1 ± e′2 of h with ′ he1 , e′2 i = ± 13 . 28 Next, in the f4 case, we consider the situation where he′1 , e′2 i = 0 and e′1 ± e′2 are roots of h. Since h has no root of length 2, any short root ±e′i ± e′j has the length 1 √ with he′i , e′j i = ± 12 , and any long root ±e′i ± e′j has the length 2 with he′i , e′j i = 0. If i, j and k are distinct, he′i , e′j i = 0, and he′i , e′k i = 0, then for suitable c1 = ±1 and c2 = ±1 the roots e′i + c1 e′j and e′i + c2 e′k of h are long. Because he′i + c1 e′j , e′i + c2 e′j i = 1 ± he′i , e′j i > 0, c2 e′j ) is a long root of h. That implies the combination c1 e′j − c2 e′k = (e′i + c1 e′j ) − (e′i + ` ′ ′ hej , ek i = 0. Now {1, . . . , 7} is a disjoint union a∈A Sa such that (i) if i 6= j in the same Sa then e′i ⊥ e′j and (ii) if i ∈ Sa and j ∈ Sb with a 6= b then hei , ej i = ± 12 . If i 6= j are in the same Sa , and ei ± ej are both long roots of h, then for whenever k ∈ Sa , i 6= k 6= j, there is a long root of the form ei ± ek . It has angle π3 with both ei + ej and ei − ej , so both ek ± ej are long roots of h. Similarly, both ei ± ek are long roots of h. Extending this argument, whenever k 6= l in the same Sa , both ek ± el are long roots of h. Each |Sa | ≦ 4. For if Sa contains five elements then dim t∩h > 4 which is impossible. Suppose |Sa | = 4 with {1, 2} ⊂ Sa . We may permute the ei so that Sa = {1, 2, 3, 4}. Then {e′1 , . . . , e′4 } is an orthonormal basis of t∩h. By our previous observation, ±e′i ±e′j provide all long roots of h. From the standard presentation (2.12) of f4 , we can see, for any orthogonal pair of long roots α′ and β ′ of h, 21 (α′ ± β ′ ) are short roots of h. Thus the ±e′i = ± 12 ((e′i + e′j ) + (e′i − e′j )), 1 ≦ i ≦ 4 and i 6= j, are short roots of h. But e′i = 12 (±e′1 ± · · · ± e′4 ) for i = 5, 6 and 7, so any short root ±e′i ± e′j of h , for 1 ≦ i ≦ 4 < j ≦ 7, is a vector of the form 12 (±e1 ± · · · ± e4 ). And each set {±e′j ± e′k }, 4 < j < k ≦ 7, contains at most one pair of short roots, resulting in 3 pairs in total. That is not enough for the presentation just above for all the ±e′i , 1 ≦ i ≦ 4. There is at least a short root e′i of h, 1 ≤ i ≤ 4, which can not be given as any ±e′j ± e′k . This is a contradiction to our observation for the root system of h. So there is no Sa with |Sa | = 4 and {1, 2} ⊂ Sa . Assume that one of the sets Sb satisfies |Sb | = 4 and it does not contain 1 and 2 . Then we can permute the ei so that Sb = {4, 5, 6, 7}. From argument above, if 4 < i < j ≦ 7, then either e′i + e′j or e′i − e′j is not a root of h. So Sb can at most provide 6 pairs of long roots of h. The only way that h can have 12 pairs of long roots is that 1, 2 and 3 must belong to the same Sa , and ±e′i ± e′j are long roots of h for 1 ≦ i < j ≦ 3. In that case we look at the short roots. Each set {±e′i ± e′j }, 1 ≦ i ≦ 4 < j ≦ 7, can only provide one pair of short roots, and in fact it must provide one pair to make the g±α′ is a root 12 pairs of short roots of h = f4 . Now, if α′ is a root of h, then h±α′ = b plane of g, say h±α′ = g±α . Then α′ is also a root of g because Rα′ = [h±α′ , h±α′ ] = [g±α , g±α ] = Rα, Then the root system of h is a subset of the root system of g. That is impossible because all the roots of g have the same length. This completes the argument that none of the Sa can contain more than 3 elements. 29 Since it has at most 3 elements, each Sa`can contribute no more than 12 long roots. For h to have 24 long roots, {1, . . . , 7} = a∈A Sa is the union of three subsets, two with three elements each, one with one element. Suitably permuting the ei we can assume A = {a, b, c}, Sa = {1, 2, 3}, Sb = {4, 5, 6}, and Sc = {7}. All ±ei ± ej must be long roots of h for 1 ≦ i < j ≦ 3 or 4 ≦ i < j ≦ 6; they give all 24 long roots of h. From above argument, ±e′i , 1 ≦ i < 7, are short roots of h, because they can be presented as 21 (±α′ ± β ′ ) for an orthogonal pair of long roots α′ and β ′ of h. So for 1 ≦ i < 7, we can find j and k, such that e′i = ±e′j ± e′k . It is easy to see, if i < 4, then j > 3 and k > 3, further more, j and k can not both be chosen from {4, 5, 6}, so one of them is from {4, 5, 6}, which must be different for different e′i s, and the other is just 7. So suitably substitute some e′i s by −e′i s, we can have e′1 + e′4 + e′7 = 0, e′2 + e′5 + e′7 = 0, and e′3 + e′6 + e′7 = 0, i.e. m is linearly spanned by e1 + e4 + e7 , e2 + e5 + e7 and e3 + e6 + e7 . Direct calculation shows, for v = e1 and v ′ = e7 in the Ad(G)-orbit of v, ||prm (v)|| < ||prm (v ′ )||, which is a contradiction. To summarize, we have the following proposition. Proposition 8.6. Suppose that G is a compact connected simple Lie group with g = Lie(G) = dn where n > 1, H is a closed subgroup with 0 < dim H < dim G, and G/H is a Riemannian normal homogeneous space. Assume there is a nonzero vector v ∈ g which defines a CK vector field on G/H. Then G/H is a locally Riemannian symmetric space which is covered by the sphere S 2n−1 = Spin(2n)/Spin(2n − 1) = SO(2n)/SO(2n − 1). Theorem 1.1 follows by combining Propositions 3.1, 4.3, 5.6, 6.6, 7.1 and 8.6. References [1] V. N. Berestovskii & Yu. G. Nikonorov, Killing vector fields of constant length on locally symmetric Riemannian manifolds. Transformation Groups, vol. 13 (2008), pp. 25–45. [2] ———- , On Clifford–Wolf homogeneous Riemannian manifolds. Doklady Mathematics, vol. 78 (2008), pp. 807–810. [3] ———- , Clifford–Wolf homogeneous Riemannian manifolds. J. Differential Geom. vol. 82 (2009), pp. 467–500. [4] W. K. Clifford, Preliminary sketch of biquaternions. Proc. London Math. Soc., vol. 3 (1893), pp. 381–395. [5] S. Deng & M. Xu, Clifford–Wolf translations of Finsler spaces. Forum Math, 2012 30 [6] ———- , Clifford–Wolf Homogeneous Randers spaces. J. Lie Theory vol. 23 (2013), pp. 837–845. [7] ———- , Clifford–Wolf homogeneous left invariant (α, β)-metrics on compact semi-simple Lie groups. Transformation Groups, vol. 20 (2015), pp. 395–416. [8] ———- , Clifford–Wolf homogeneous Finsler metrics on spheres. Annali di Matematica Pura ed Applicata, 2013 [9] ———- , Clifford–Wolf Homogeneous Randers spheres. Israel J. Math., vol. 199 (2014), pp. 507–525 [10] ———- , Clifford–Wolf translations of left invariant Randers metrics on compact Lie groups. Quarterly J. Math. vol. 65 (2014), pp. 133–148. [11] S. Deng & J. A. Wolf, Locally symmetric homogeneous Finsler spaces. International Mathematical Research Notes (IMRN), vol. 2013 (2012), pp. 4223–4242. [12] I. Dotti, R. J. Miatello & J. A. Wolf, Bounded isometries and homogeneous riemannian quotient manifolds. Geometriae Dedicata, vol. 21 (1986), pp. 21–28. [13] M. J. Druetta, Clifford translations in manifolds without focal points. Geometriae Dedicata, vol. 14 (1983), pp. 95–103. [14] H. Freudenthal, Clifford-Wolf-Isometrien symmetrischer Räume. Math. Ann. vol. 150 (1963), pp. 136–149. [15] V. Ozols, Critical points of the displacement function of an isometry. J. Differential Geometry vol. 3 (1969), pp. 411–432. [16] ———- , Critical points of the length of a Killing vector field. J. Differential Geometry vol. 7 (1972), pp. 143–148. [17] ———- , Critical sets of isometries. Differential geometry, Proc. Sympos. Pure Math., vol. 27 (1973), pp. 375–378. [18] ———- , Clifford translations of symmetric spaces. Proc. Amer. Math. Soc. vol. 44 (1974), pp. 169–175. [19] G. Vincent, Les groupes linéaires finis sans points fixes. Commentarii Mathematici Helvetici, vol. 20 (1947), pp. 117–171. [20] J. A. Wolf, Sur la classification des variétés riemanniènnes homogènes à courbure constante. C. R. Acad. Sci. Paris, vol. 250 (1960), pp. 3443–3445. [21] ———- , Vincent’s conjecture on Clifford translations of the sphere. Commentarii Mathematici Helvetici, vol. 36 (1961), pp. 33–41. [22] ———- , Homogeneous manifolds of constant curvature. Commentarii Mathematici Helvetici, vol. 36 (1961), pp. 112–147. 31 [23] ———- , The Clifford-Klein space forms of indefinite metric. Annals of Mathematics, vol. 75 (1962), pp. 77–80. [24] ———- , Locally symmetric homogeneous spaces. Commentarii Mathematici Helvetici, vol. 37 (1962), pp. 65–101. [25] ———- , Homogeneity and bounded isometries in manifolds of negative curvature. Illinois Journal of Mathematics, vol. 8 (1964), pp. 14–18. 32
4math.GR
A Lower Bound Technique for Communication in BSP∗ Gianfranco Bilardi† Michele Scquizzato‡ Francesco Silvestri† November 28, 2017 arXiv:1707.02229v2 [cs.DC] 25 Nov 2017 Abstract Communication is a major factor determining the performance of algorithms on current computing systems; it is therefore valuable to provide tight lower bounds on the communication complexity of computations. This paper presents a lower bound technique for the communication complexity in the bulk-synchronous parallel (BSP) model of a given class of DAG computations. The derived bound is expressed in terms of the switching potential of a DAG, that is, the number of permutations that the DAG can realize when viewed as a switching network. The proposed technique yields tight lower bounds for the fast Fourier transform (FFT), and for any sorting and permutation network. A stronger bound is also derived for the periodic balanced sorting network, by applying this technique to suitable subnetworks. Finally, we demonstrate that the switching potential captures communication requirements even in computational models different from BSP, such as the I/O model and the LPRAM. 1 Introduction A substantial fraction of the time and energy cost of a parallel algorithm is due to the exchange of information between processing and storage elements. As in all endeavors where performance is pursued, it is important to be able to evaluate the distance from optimality of a proposed solution. In this spirit, we consider lower bounds on the amount of communication that is required to solve some computational problems on a distributed-memory parallel system. We model the machine using the standard bulk-synchronous parallel (BSP) model of computation [49], which consists of a collection of p processors, each equipped with an unbounded private memory and communicating with each other through a communication network. We focus on a metric, called BSP communication complexity and denoted H, defined as the sum, over all the supersteps of a BSP algorithm, of the maximum number of messages sent or received by any processor (a quantity usually referred to as the degree of a superstep). This metric captures a relevant component of the cost of BSP computations. We propose the switching potential technique to derive lower bounds on the BSP communication complexity, which is applicable under a number of assumptions. (a) The computation can be modeled in terms of a directed acyclic graph (DAG), whose nodes represent operations (of both input/output and functional type) and whose arcs represent data dependencies. The resulting lower bound holds for all BSP evaluations of the given DAG, which vary depending on the superstep and the processor chosen for the evaluation of an operation, and the way (routing path and schedule of ∗ This work was supported, in part, by MIUR of Italy under project AMANDA, and by University of Padova under projects STPD08JA32, CPDA121378/12 and CPDA152255/15. A preliminary version of this work [18] was presented at the 18th International European Conference on Parallel and Distributed Computing (Euro-Par 2012). † University of Padova. E-mail: [email protected], [email protected]. ‡ KTH Royal Institute of Technology. E-mail: [email protected]. 1 the message along such a path) in which a value is sent from the processor that computes it to a processor that utilizes it. (b) The internal nodes of the DAG are restricted to have the same number of incoming and outgoing arcs, so that they can be thought of as switches that can establish any one-to-one relation between the incoming arcs and the outgoing arcs. The switching potential is the number of permutations that can be established, by means of arc-disjoint paths, between the arcs incident on the input nodes and those incident on the output nodes. (c) During the BSP computation, each node of the DAG is evaluated exactly once (no recomputation). (d) The number of input/output nodes that are mapped to the same BSP processor satisfies a suitable upper bound, essentially ensuring that the computation is distributed over at least two processors. We illustrate the versatility of the switching potential technique in several ways. We apply it to derive tight lower bounds on the BSP communication complexity of the fast Fourier transform (FFT), and of sorting and permutation networks. We also show how, for some DAGs, the lower bound on communication can be boosted by composing the results provided by the technique for suitable parts of the DAG. Finally, we demonstrate that the switching potential of a DAG captures communication requirements which can lead to lower bounds even in models different from BSP. 1.1 A Perspective on Previous Work The impact of communication on performance has been extensively investigated. Even a concise review of all the relevant work would go far beyond the scope of this paper. Here, we will simply attempt to place our work in the broader context and then review more closely the results more directly comparable to ours. A first division can be drawn between studies that consider the communication requirements inherent to computational problems and studies that consider the communication requirements of specific algorithms. Examples of results that apply to computational problems are the crossing-sequence lower bounds on time for Turing machines [30], Grigoriev’s flow lower bounds on space-time tradeoffs [43], and information-flow lower bounds on the area-time tradeoff in VLSI [53, 46, 16]. One ingredient of some of the lower bounds in our paper is based on the information flow of the cyclic shift problem, originally studied in [51]. Our switching potential approach targets lower bounds for classes of implementations of specific algorithms, typically modeled by computation DAGs, where nodes represent input and functional operations, and arcs represent data dependencies. A significant distinction lies in whether the rules defining the class of implementations allow for recomputation, that is, for the ability to evaluate a given functional node of the DAG multiple times. A number of efforts have focused on data movement between levels of the memory hierarchy, e.g., [31, 2, 43, 13, 42] (with recomputation) and [17, 42, 5, 6] (without recomputation). Other papers have investigated data movement between processing elements in distributed computing, e.g., [40, 1, 39] (with recomputation), and [28, 17, 33, 5, 6, 45] (without recomputation). Re-execution of operations is of interest because it is known that, in some models of computation, it can be exploited in order to asymptotically improve performance. For example, recomputation is known to have the potential to reduce the space requirements of computations in the context of classical pebbling games (see, e.g., [44]), to enhance the performance of simulations among networks (see [36] and references therein), to enable area-universal VLSI computations [10] with constant slowdown, and to reduce the number of write operations between levels of the memory hierarchy [19]. However, as in most of the present paper, recomputation is often ruled out, as a simplifying assumption that still affords the development of insights on the problem, when the general case proves hard to tackle. 2 The metrics capturing communication requirements are typically quite sensitive to the underlying model of computation; even within the same model, several metrics can be meaningful. In this paper, we will focus on models where the computation is carried out by a set of processors with local storage, interconnected by a communication medium. Examples of such models are bounded degree networks [38], BSP [49], LogP [24]. A pioneering paper in this area [40] introduced two important metrics and analyzed them for the diamond DAG: the total number c of messages exchanged among the processors, called communication, and the maximum number d of messages exchanged as part of the evaluation of some path of the DAG, called communication delay. Both metrics can be trivially minimized to zero by assigning the entire DAG to just one processor. However, interesting tradeoffs arise between the two metrics and the number of steps t of a parallel schedule. For example, for the diamond DAG with n inputs, c = Ω(n3 /t) and d = Ω(n2 /t), allowing for recomputation. Another interesting metric is the maximum number Ĥrc of messages received by any processor. Clearly, Ĥrc ≥ c/p, since each message is received by some processor. Next, we outline a lower bound technique for Ĥrc, based on the graph-theoretic notion of dominator. If W and U are sets of nodes of a given DAG, W is called a dominator of U if every path from an input node to a node of U includes a node of W . Let D(k) be the maximum size of a set U of nodes that has a dominator W of size k. In a seminal paper [31], formulating a framework for the study I/O complexity in hierarchical memories, the number Q(S) of data transfers between a “cache” of size S and “main memory” is shown to satisfy the lower bound Q(S) ≥ ⌊νS/D(2S)⌋, where ν is the number of (input and functional) nodes. The dominator technique can be adapted to establish that, if the DAG is evaluated by p processors, each of which initially stores at most q inputs, then at least one processor receives Ĥrc ≥ D −1 (ν/p) − q messages. The argument goes as follows: (a) a processor P can receive, as part of the input or from other processors, the value of at most (q + Ĥrc ) nodes of the DAG; (b) these nodes must dominate all the nodes whose value is computed by P ; (c) by definition of D, at most D(q + Ĥrc ) DAG nodes are dominated by any given set of (q + Ĥrc ) nodes; (d) at least one processor must compute no fewer than ν/p of the ν nodes in the DAG. Combining these premises one obtains that D(q + Ĥrc ) ≥ ν/p, whence the stated bound on Ĥrc. Variants of the outlined argument have been used, for matrix multiplication, in [1, 33, 45]. Dominator-based lower bounds do allow for recomputation. By definition, the BSP communication complexity H satisfies H ≥ Ĥrc. In particular, H can be larger than Ĥrc , if different processors receive messages in different supersteps. This difference can play a role, as in the case of the BSP computation of an n-input radix-two FFT DAG [23], with ν = n log(2n) nodes,1 a case which has motivated our work. An FFT implementation on BSP is known [49] for which   n log n , (1) H = O(Ĥrc ) = O p log(n/p) for 1 ≤ p ≤ n/2, with each processor initially holding n/p (consecutive) inputs. Valiant’s analysis is based on the well known property that, if s divides n (a power of 2), then the n-input FFT DAG can be viewed as a sequence of ⌈log n/ log s⌉ stages, each (i) consisting of n/s disjoint s-input FFTs (possibly incomplete in the last stage) and (ii) being connected to the next one by a permutation. Letting s = n/p and assigning the p (n/p)-input FFTs within a stage to different processors, the resulting BSP algorithms executes K = ⌈log n/ log(n/p)⌉ supersteps, each of degree O(n/p), yielding bound (1). Making use of the result [31] that in the FFT DAG k nodes dominate at most D(k) ≤ 2k log k nodes,2 the dominator technique yields 1 2 In this paper log x denotes the logarithm to the base two. In the Appendix we show that this bound can by improved to D(k) ≤ k log 2k. 3 the lower bound H ≥ Ĥrc = Ω   n log n , p log((n/p) log n) (2) assuming that at most q = β(n log n)/(p log((n/p) log n)) inputs are initially available to any processor, for a suitably small constant β. We observe that the lower bound (2) does not match the upper bound (1), for either H or Ĥrc, when p = n/2o(log log n) . An alternate dominator-based lower bound can be obtained when the local memory of each processor has at most m locations [4]. During an interval in which it receives m messages, a processor can evaluate the at most D(2m) nodes dominated by the (at most) m nodes whose value is received together with the (at most) m nodes whose value is locally stored at the beginning of the interval. Then, if ν nodes are evaluated by p processors, Ĥrc = Ω(m⌊ν/(pD(2m))⌋). For the FFT, ν = n log(2n) and D(2m) ≤ 2m log(4m), hence Ĥrc = Ω(m⌊(n log n)/(p2m log(4m))⌋). If we let m∗ denote the value of m for which the argument of the floor equals 1, we can see that, for m ≤ m∗ , Ĥrc = Ω((n log n)/(p log m)). In particular, for m = Θ(n/p), the lower bound matches the upper bound (1). For m > m∗ , the bound vanishes. At first, it may be puzzling that, for large enough m, the memory based bound does not reproduce bound (2); the reason is that, unlike the latter, the former bound does not depend upon the assumption that, initially, only a limited amount of input is available to each processor. A model with some similarities to BSP is the LPRAM of Aggarwal et al. [1], where p processors with unbounded local storage are synchronized by a global clock and communicate via a shared memory, rather than directly through a network. The communication metric is the number of steps (cycles) Tc in which at least one processor reads from or writes to the shared memory. A straightforward adaptation of a well-known decomposition strategy for the FFT achieves for Tc an upper bound of the same form as (1). A lower bound of the same form is also established. In addition to being developed for a different model, the argument follows a route different than ours: a lower bound of the same form is first established for sorting (assuming no input element is ever kept by two processors at the same time), then claimed (by analogy) for permutation networks, and finally adapted to the FFT network, by exploiting the property established in [52] that the cascade of three FFT networks has the topology of a full permutation network. Finally, we mention that, motivated by the investigation of area-time trade-offs in VLSI, a number of lower bounds have been established on the information flow of the (multidimensional) discrete Fourier transform (DFT) computed either exactly, on finite rings, or approximately, on the complex field (see, e.g., [12] and references therein). These results apply to any algorithm, rather than just to the radix-two specialization of the FFT considered in the present paper and related work. When adapted to computing the DFT on BSP, with information measured in words capable of encoding a ring element, the known Ω(n) word lower bound on the information flow through the bisection of the system does imply that H ≥ Ĥrc = Ω(n/p), assuming that no processor inputs (or outputs) more than n/2 values. This bound is of the same order as the dominator-based bound (2) when log((n/p) log n) = Ω(log n) and is weaker otherwise, but it does hold under less stringent constraints on the I/O protocol. In summary, with respect to the outlined state of the art, our objective is to develop lower bound techniques for the communication complexity in BSP, H, capable to close the gap between the dominator lower bound (2) and the best known upper bound (1) for the FFT, as well as to weaken the assumptions on the input protocol under which the lower bound is established. 4 1.2 Overview of Results The main contribution of this paper is the switching potential technique, to obtain communication lower bounds for DAG computations in the BSP model. The proposed technique applies to DAGs, named switching DAGs, with n input nodes where all nodes, except for inputs and outputs, have out-degree equal to the in-degree. Such a graph G = (V, E) can be viewed as a switching network [44] for which a switching size N and a switching potential γ are defined. The switching size N is the sum of the out-degrees of the input nodes or, equivalently, the sum of the in-degree of the output nodes. The switching potential γ is the number of different ways in which N tokens initially placed on the N outgoing arcs of the input nodes can be brought on the N incoming arcs of the output nodes, by moving them along arc-disjoint paths. Intuitively, the switching potential is a measure of the permuting ability of the graph. Its impact on the BSP communication complexity is quantified in the following theorem. Theorem 1. Let A be any algorithm that evaluates without recomputation a switching DAG G = (V, E) on a BSP with p processors. Let N , γ, and ∆ be respectively the switching size, the switching potential, and the maximum out-degree of any node of G. If the sum of the in-degree of the output nodes evaluated by every processor is at most U , then the BSP communication complexity of algorithm A satisfies   log(γ/(U !)N/U ) if p ≤ N/e, ∆p log(N/p) (3) HA ≥  e log(γ/(U !)N/U ) otherwise. ∆N log e where, by definition, γ ≤ N ! and N/p ≤ U ≤ N . For the proof, we introduce the envelope game, where a set of envelopes, initially positioned on the input nodes, are moved to the output nodes according to some given rules. The evaluation of a DAG in the BSP model is viewed as a run of this game; a lower bound is derived for any BSP algorithm playing the game. At the heart of the switching potential technique lies a counting argument in combination with an indistinguishability argument, somewhat similar to the approach used by Aggarwal and Vitter [2] to study the I/O complexity of computations, and later applied to study the complexity of communications in the LPRAM [1]. Our technique has the advantage that it can be directly applied to any specific (switching) DAG, while the former approaches require that a suitable combination of copies of the DAG under consideration yield a full permutation network. Even when γ is large, bound (3) may become weak due to high values of U . Intuitively, when U is high, many permutations can be realized by redistributing the data within the processors, without much interprocessor communication. On the other hand, if the different permutations realizable by a given DAG map somewhat uniformly the inputs to the outputs, then the communication complexity can be considerable, even for rather small values of γ. This phenomenon has been investigated in [51] for classes of permutations that form a transitive group. A special case is the class of the cyclic shifts, which are permutations where all input values are shifted by a given amount (we refer to Section 5 for a formal definition). We establish the following result: Theorem 2. Let G = (V, E) be a DAG with n input nodes and n output nodes, capable of realizing all the n cyclic shifts, with respect to some fixed correspondence between inputs and outputs. Let A be an algorithm that evaluates G (possibly, with recomputation) on a BSP with p ≥ 2 processors, such that initially each input is available to exactly one processor. Then, 5 if some processor initially stores (exactly) q inputs, or some processor evaluates (exactly) q outputs, the BSP communication complexity of algorithm A satisfies HA ≥ min{q, n − q} . 2 Some DAGs of interest happen to both exhibit a high switching potential γ and realize all cyclic shifts. For such DAGs, a combination of Theorems 1 and 2 yields communication lower bounds under very mild assumptions on the input/output protocol. An example is the n-input FFT, for which γ = 2n(log n−1) and the lower bound takes the form, when p ≤ 2n/e, HFFT > n log(n/2) , 8p log(2n/p) (4) as long as no processor evaluates more than n/2 output nodes, and there is no recomputation. Lower bound (4) is the first lower bound on the BSP communication complexity of the FFT that asymptotically matches upper bound (1) for any number of processors p ≤ 2n/e. The technique based on the capability of realizing all cyclic shifts also enables the extension of the dominator-based lower bound (2) to milder assumptions on the input/output protocol. The dominator-based bound is not asymptotically tight for p = n/2o(log log n) , but it remains of interest when recomputation is allowed. We illustrate the versatility of the switching potential technique by applying it to computations different from the FFT. Sorting and permutation networks naturally exhibit a high switching potential. The corresponding BSP communication complexity lower bound is asymptotically similar to bound (4), and to the best of our knowledge is the first known result for these computations. An asymptotically equivalent lower bound was previously derived for BSP sorting in [28], but only for algorithms with supersteps of degree Θ(n/p) and input evenly distributed among the processors. We also show how the switching potential analysis can some time yield higher lower bounds if separately applied to suitable parts of the DAG; in particular, we prove for the BSP communication complexity of the periodic balanced sorting network [26] a bound higher than the one derived for all sorting networks. The switching potential technique can be used, with some minor changes, to derive lower bounds in other computational models besides the BSP. Specifically, we apply the technique to a parallel variant of the I/O model which includes, as special cases, both the I/O model and the LPRAM model. In addition to the well-known general motivations for lower bound techniques, we stress that striving for tight bounds for the whole range of model’s parameters has special interest in the study of so-called oblivious algorithms, which are specified without reference to such parameters, but are designed with the goal of achieving (near) optimality for wide ranges of the parameters. Notable examples are cache-oblivious algorithms [27], multicore-oblivious algorithms [20], resource-oblivious algorithms [21, 22] and, closer to the scenario of this paper, network-oblivious algorithms [15], where algorithms are designed and analyzed on a BSP-like model. In fact, many BSP algorithms are only defined or analyzed for a number of processors p that is sufficiently small with respect to the input size n. For the analysis of the FFT DAG, √ it is often assumed p ≤ n, where the complexity is Θ(n/p). Our results allow for the removal of such restrictions. A preliminary version of this paper appeared in [18]. The current version contains an expanded discussion of previous work, and provides full proofs of all claims, a significantly simpler and slightly improved analysis of the switching potential technique, applications of this technique to more case studies, as well as an adaptation of it to a different model of computation. 6 1.3 Paper Organization Section 2 introduces the BSP model and the concept of switching DAG. Section 3 formulates the envelope game, a convenient framework for studying the communication occurring when evaluating a switching DAG. Section 4 develops the switching potential technique culminating with the proof of Theorem 1, which provides a lower bound on the BSP communication complexity of a switching DAG, in terms of its switching potential. Section 5 establishes Theorem 2, which provides a lower bound on the BSP communication complexity of a DAG that can realize all cyclic shifts. These two results are then applied, in Section 6, to the FFT DAG and to sorting and permutation networks. Section 7 extends the switching potential technique to computational models different from BSP. Finally, in Section 8, we draw some conclusions and discuss directions for further work. 2 Models of Computation This section introduces the BSP model of parallel computation and the class of computation DAGs for which our lower bound technique applies. 2.1 The BSP Model The bulk-synchronous parallel (BSP) model of computation was introduced by Valiant [49] as a “bridging model” for general-purpose parallel computing, providing an abstraction of both parallel hardware and software. It has been widely studied (see, e.g., [48] and references therein) together with a number of variants (such as D-BSP [25, 14], BSP* [8], E-BSP [34], and BSPRAM [47]) that aim at capturing data and communication locality by basing the cost function on different communication metrics. The architectural component of the model consists of p processors P1 , P2 , . . . , Pp , each equipped with an unbounded local memory, interconnected by a communication medium. The execution of a BSP algorithm consists of a sequence of phases, called supersteps: in one superstep, each processor can perform operations on data residing in its local memory, send/receive messages (each occupying a constant number of words) to/from other processing elements and, at the end, execute a global synchronization instruction. Messages sent during a superstep become visible to the receiver at the beginning of the next superstep. The running time of the j-th superstep is expressed in terms of two parameters, g and ℓ, as Tj = wj + hj g + ℓ, where wj is the maximum number of local operations performed by any processor in the j-th superstep, and hj (usually called the degree of superstep j) is the maximum number of messages sent or received by any processor in the j-th superstep. If the time unit is chosen to be the duration of a local operation, then parameter g is defined to be such that the communication medium can deliver the messages of a superstep of degree h in hg units of time, so that 1/g can be viewed as measuring the available bandwidth of the communication medium, whereas parameter ℓ is an upper bound on the time required for global barrier synchronization. The running time TA of a BSP algorithm A is the sum of the times of its supersteps can P and A wj is be expressed as WA + HA g + SA ℓ, where SA is the number of supersteps, WA = Sj=1 P A the local computation complexity, and HA = Sj=1 hj is the BSP communication complexity. In this paper, we study the latter metric, which often represents the dominant component of the running time. 7 2.2 Switching DAGs A computation DAG G = (V, E) is a directed acyclic graph where nodes represent input and functional operations and arcs represent data dependencies. More specifically, an arc (u, v) ∈ E indicates that the value produced by the operation associated with u is one of the operands of the operation associated with v, and we say that u is a predecessor of v and v a successor of u. The number of predecessors of a node v is called its in-degree and denoted δin (v), while the number of its successors is called its out-degree and denoted δout (v). A node v is called an input if δin (v) = 0 and an output if δout (v) = 0. We denote by Vin and Vout the set of input and output nodes, respectively. The remaining nodes are said to be internal and their set is denoted by Vint . Of special interest for our developments are situations where the computation executed by a given algorithm on a given input can be viewed as embedding an evaluation of a given computation DAG G. Informally, this means that, during that execution, all the nodes of G are evaluated, respecting the dependencies specified by the arcs. A bit more formally, we say that the execution of a BSP algorithm on a specific input x evaluates a given computation DAG if, to any v ∈ V , is associated a set S(v) of processor-time pairs such that: (a) if (t, P ) ∈ S(v), then, at time t, processor P evaluates node v, by either an input or a functional operation; (b) if (t, P ) ∈ S(v) and (u, v) ∈ E, then there is a (t′ , P ′ ) ∈ S(u) such that the result of the evaluation of u by P ′ at time t′ is effectively used as an operand by P at time t. Between time t′ and time t, the value of u in question may be moved to different processors and memory locations: the sequence of instructions implementing such moves will be denoted as S(t′ , P ′ , t, P ). Taken together, the sets S define the processing and communication schedule of the evaluation of G. We say that the evaluation is without recomputation if each node of G is evaluated exactly once, that is, if S(v) is a singleton for every v. A few observations may help provide some perspective on the above notions of evaluation and schedule. A little reflection will show that an algorithm execution that embeds an evaluation of G (possibly with recomputation) does not necessarily embed an evaluation of G without recomputation, whence forbidding recomputation effectively restricts lower bounds results. We remark that an execution of an algorithm that embeds an evaluation of G may well contain additional operations not modeled by G (for example the additional operations may be instrumental to constructing the DAG from the input, or the input size). In general, the execution of the same algorithm on different inputs may embed the evaluation of different DAGs or of different schedules of the same DAG. However, there are interesting algorithms that evaluate the same DAG, with the same schedule, for all inputs of the same size n. Notable examples include the FFT, network algorithms for sorting and permutations, standard matrix multiplication in a semiring, and Strassen’s matrix multiplication on a ring. A number of graph-theoretic properties of the DAG can be related to processing, storage, and communication requirements of the underlying algorithm, as well as to its amount of parallelism. One such property is the switching potential, which we introduce and relate to the communication complexity of a BSP algorithm that evaluates a DAG of the type defined next. Definition 1. A switching DAG G = (V, E) is a computation DAG where, for any internal node v ∈ Vint , we have δout (v) = δin (v). We refer to n = |Vin | as to the input size of G, and introduce the switching size N of G defined as X X δin (v), N= δout (v) = v∈Vin v∈Vout where the equality between the two summations is easily established. 8 (a) ρ = (5, 7, 1, 3, 2, 4, 6, 8). (b) ρ = (1, 7, 5, 3, 6, 8, 2, 4). Figure 1: Examples of two different sets of arc-disjoint paths in the FFT DAG on n = 4 inputs and switching size N = 8. Arcs in Ein and in Eout are numbered from 1 to N = 8, left to right. Consider the set of arcs Ein = E ∩ (Vin × V ), outgoing from the input nodes, and the set of arcs Eout = E ∩ (V × Vout ), incoming into the output nodes. Let us now number both the arcs in Ein and those in Eout from 1 to N , in some arbitrarily chosen order. Then, to any partition of E into a set of arc-disjoint paths there corresponds a permutation ρ = (ρ(1), ρ(2), . . . , ρ(N )) of (1, 2, . . . , N ), where ρ(j) is the (number of the) last arc (in Eout ) of the unique path whose first arc (in Ein ) is numbered j. See Figure 1. Definition 2. The switching potential γ of a switching DAG G = (V, E) is the number of permutations ρ corresponding to (one or more) partitions of E into arc-disjoint paths. Intuitively, if we think of each internal node v of the DAG as a switch that can be configured to connect its incoming arcs to its outgoing arcs in any one-to-one correspondence, then switch configurations uniquely correspond to partitions of E into arc-disjoint paths. Thus, N items initially positioned on the input nodes (specifically, δout (u) items on input u) can travel without conflicts and reach the output nodes. Indeed, in the special case where δout (u) = 1 for all input nodes and δin (v) = 1 for all output nodes, one has N = n = |Vin | = |Vout | and the switching DAG becomes a switching network in the traditional sense [44]. When all permutations can be realized, that is γ = n!, then the switching network is said to be a permutation (or, rearrangeable) network [44]. It is a simple exercise to establish that, for any switching DAG, Y Y δout (v) = δin (v), γ≤ v∈V \Vin v∈V \Vout where each products equals the number of distinct partitions into arc-disjoint paths. The inequality arises when distinct partitions lead to the same permutation. 3 The Envelope Game In this section we introduce the envelope game, to be played on a switching DAG. The goal of the game consists in moving to the output nodes some envelopes, initially placed on the input nodes, according to some rules. Informally, the rules force the envelopes to travel along arc-disjoint paths in a way that all the envelopes that go through a given node must be simultaneously at that node, at some time. The envelope game is meant to provide an abstraction of the evaluation of a DAG without recomputation, which will prove useful in the study of BSP communication 9 complexity. The spirit is similar to the one that motivated the introduction of the pebble game to study space requirements of computations [41, 32]. Definition 3. The envelope game on a switching DAG G is defined by the following rules, which characterize the (legal) runs of the game. 1. A set of N distinguishable envelopes is given, with exactly δout (u) envelopes initially placed on each input node u ∈ Vin (hence, N is the switching size of G). 2. The set of envelopes remains invariant during the game; at any stage each envelope is at exactly one node of G. 3. One move consists in moving one envelope from a node u to a node v along an arc (u, v) ∈ E. 4. An arc (u, v) can be used only in one move. 5. An envelope can be moved from a node u only after δin (u) envelopes (each arriving from a different incoming arc of u) have been placed on u. 6. The (run of the) game is completed when all envelopes have reached an output node (i.e., when exactly δin (w) envelopes are placed on each output node w ∈ Vout ). According to Rules 1, 2, 3, and 6, during one run, each envelope traverses a path from Vin to Vout . Due to Rule 4, paths traversed by different envelopes are arc-disjoint. Due to the property δout (v) = δin (v) of internal nodes of a switching DAG and to Rule 1 requiring that the number of envelopes equals the switching size N , the paths traversed by the envelopes yield a partition of the arc set E. Therefore, each run of the game uniquely identifies a permutation ρ contributing to the switching potential, according to Definition 2. Finally, we observe that Rule 5 requires that, for each node u, there is a time when all the envelopes going through u are on u. We observe that, in spite of some similarities, the envelope game differs from the pebbling game in various significant ways. In particular, while the number of pebbles on the DAG can change during the game and the goal is to minimize its (maximum) value, the number of envelopes is constant throughout the game and the goal is to count the mappings between the starting and the ending arcs of the envelope paths by playing the game in all possible ways. Furthermore, at any time, the number of pebbles on a DAG node is either 0 or 1, whereas the number of envelopes on any given node will typically go from 0 to the degree (by unit increments) and then back to 0 (by unit decrements). Intuitively, a run of the envelope game can be easily augmented into an evaluation of the DAG. We just need to imagine that each envelope carries a (rewritable) card where, when a node u is computed, its result is written on the card. Since the envelopes leaving from a node u are distinct even though in the process of DAG evaluation they would carry the same value, the communication of envelopes may result in an overcounting of messages, by a factor at most ∆ = maxv∈V δout (v). In fact, there are at most ∆ envelopes with the same card value moving out from a node. For many DAGs of interest, ∆ is a small constant (e.g., for the FFT, ∆ = 2), thus the overcounting is well bounded. At the same time, the distinguishability of the envelopes simplifies the analysis of the communication requirements of DAG evaluation. The next lemma establishes that communication lower bounds can be transferred from the envelope game to DAG evaluation, by showing how the former can be obtained from the latter. We say that a BSP algorithm plays the envelope game on a switching DAG G if it satisfies the following conditions: (a) each node v ∈ V is assigned to a processor P (v); (b) the envelopes 10 placed on input node u are initially in P (u); (c) whenever (u, v) ∈ E and P (u) 6= P (v), the envelope moved along (u, v) is sent from P (u) to P (v) (possibly via intermediate processors), after P (u) has received all the envelopes destined to u. Lemma 1. Let A be any algorithm that evaluates, without recomputation, a switching DAG G = (V, E) with ∆ = maxv∈V δout (v), on a BSP with p processors, and let HA be its BSP communication complexity. Then, there exists an algorithm B that plays the envelope game on G with BSP communication complexity HB ≤ ∆HA . Proof. In algorithm B, a node v ∈ V is assigned to the processor P (v) where v is evaluated by A, which is unique due to the hypothesis of no recomputation. (1) Initially, for every u ∈ Vin , δout (u) envelopes are placed on u (as required by Rule 1) and each envelope is univocally assigned to an outgoing arc of the respective input node. (2) The computation in each internal node u is replaced with a switch that sequentially forwards the δin (u) input envelopes to the δout (u) output arcs according to some permutation. (3) For each arc (u, v) where P (v) differs from P (v), a message is sent from P (u) to P (v) (possibly via intermediate processors) carrying the envelope moved along (u, v). We now show that algorithm B plays the envelope game. By construction, the N envelopes are set on the input nodes as required by Rule 1. Rule 2 is satisfied since recomputation is disallowed (i.e., no new envelope is added) and, in each internal node, all input envelopes are forwarded to the outgoing arcs (i.e., no envelope is deleted). Rules 3, 4, and 5 are complied with since a node u is computed in A only when all the δin (u) inputs are ready (i.e., every predecessor of u has sent an envelope to u in B) and the output values are propagated only to the δout (u) successors of u. Rule 6 is also obeyed since all output nodes in G are computed by A. We now show that the BSP communication complexity of B is at most ∆ times the BSP communication complexity of A. The first two modifications do not increase the communication (an envelope can be locally constructed by a processor and no communication is required for evaluating a switch). The third modification can increases the BSP communication complexity as analyzed next. Consider the case where a node u is processed by A on a processor, say P0 , while ℓ of its successors are processed on a different processor, say P1 , where 1 ≤ ℓ ≤ ∆. Then, one message from P0 to P1 is necessary and sufficient to send the output value of u to the ℓ successors in P1 since the output value of a node is the same for each successor. In contrast, since distinct envelopes are sent by u to its successors, ℓ messages must be sent by B in order to forward the ℓ envelopes from node u in P0 to the ℓ successors in P1 . Therefore, in the worst case, to each message in A there correspond ∆ messages in B. Typically, a BSP algorithm A that evaluates a DAG will implement the same schedule of operations and messages, for any input of the DAG size n; in such a case, the corresponding algorithm B that plays the envelope game will be the same for all inputs as well. However, Lemma 1 applies even if DAG G is evaluated by A in different ways for different inputs x, in which case the lemma inequality can be more explicitly written as HB(x) ≤ ∆HA(x) . 4 The Switching Potential Technique This section develops the proof of Theorem 1, a lower bound on the communication complexity of any BSP algorithm A that evaluates, without recomputation, a switching DAG G with switching potential γ. Technically, the lower bound individually applies to any execution of the 11 algorithm that embeds an evaluation of G. We recall that n denotes the input size and N the switching size of G. Some observations may be useful to build up intuition before entering the technical development, which focuses on the envelope game. One important point is that the communication requirements captured by Theorem 1 do not simply arise from the data movement implied by the γ permutations that contribute to the switching potential, but rather by the constraint that all those permutations must be realizable under the same schedule, in the sense defined in Section 2.2. In fact, from one run of the envelope game one can always obtain all other runs, by simply changing the envelope permutation locally applied at each node. Then, at any given time during the algorithm, the set of locations that contain envelopes is the same for all runs, although how the envelopes are distributed across those locations will differ from run to run. Similarly, at any given superstep, the set of (source, destination) pairs of the messages sent in that superstep is the same for all runs, although the envelope carried by a given message will generally vary from run to run. To appreciate the implications of a fixed schedule, let us consider the problem of permuting N records among p BSP processors, under an input/output protocol where at most qin records are initially held by any processor and at most qout records are destined to any processor. A simple BSP algorithm, executing just one superstep where each record is directly sent from the source processor to the destination processor, accomplishes the task with minimum BSP communication complexity max{qin , qout }, assuming that a record fits in one message. In particular, if the I/O protocol is balanced, i.e., qin = qout = N/p, then each permutation can be accomplished with communication complexity N/p. However, under this algorithm, each permutation will result in a different set of (source, destination) pairs for the N messages that carry the records, hence in a different communication schedule. On the other hand, a BSP algorithm that evaluates the DAG corresponding to a sorting or permutation network (see Section 6.2 for more details) has a fixed communication schedule, and the realization of a specific permutation depends only on the content of the messages. For the BSP model, we center our analysis around the following quantity. Definition 4. Given an algorithm B that plays the envelope game on a switching DAG G = (V, E), the redistribution potential at superstep j, denoted ηj , is the number of different placements of the N envelopes across the p processors at the beginning of the j-th superstep that are achievable, in different runs, while complying with the schedule of B. (The order of the envelopes within a processor is irrelevant.) We let ηK+1 denote the number of different placements just after the end of the last superstep. The plan to establish Theorem 1 is along the following lines: • First, we show that, without loss of generality, we can confine our analysis to algorithms where all supersteps have degree at most 1. This greatly simplifies the subsequent counting arguments. • Second, we establish that ηK+1 ≥ γ/(U !)N/U , for any algorithm B that plays the envelope game on DAG G with switching potential γ, in terms of the maximum number U of envelopes held by any processor at the end of the game. • Third, we establish that ηK+1 ≤ (N/p)pH , due to the structure of the BSP model. • Finally, Theorem 1 stems from a combination of the upper and the lower bounds on ηK+1 in the two previous points. The first three steps of the plan are each carried out by a separate lemma. 12 Lemma 2. For any BSP algorithm A with communication schedule independent of the input, there exists a BSP algorithm A′ with the following properties. • A′ and A compute the same function. • The communication schedule of A′ is independent of the input; furthermore, in any superstep, each processor sends at most one message and receives at most one message. • A′ has the same BSP communication complexity as A, that is, HA′ = HA . Proof. We obtain A′ from A by replacing each superstep S of degree h ≥ 1 with h supersteps of degree 1. (Supersteps where h = 0 are left unchanged.) Specifically, let the communication schedule of S be modeled by the bipartite message multigraph M = (S, D, F ), where S = {s1 , . . . , sp }, D = {d1 , . . . , dp }, and F ⊆ S × D where edge multiset F contains (si , dk ) with a multiplicity equal to the number of messages sent by Pi to Pk during S. Clearly, each node in S and in D has degree at most h. It is a simple matter to augment M with edges so as to obtain a regular bipartite multigraph M ′ = (S, D, F ′ ) of degree h. We recall that Hall’s theorem [29] ensures that any regular bipartite multigraph does admit a perfect matching. Therefore, by ′ repeated Ph applications of Hall’s theorem, F can be partitioned into h perfect matchings, i.e., ′ F = ν=1 Fν , where Mν = (S, D, Fν ) is regular of degree 1. Correspondingly, superstep S can be replaced by the equivalent sequence of supersteps (S1 , . . . , Sh ) where, for ν ∈ [h],3 superstep Sν includes the messages of S corresponding to the edges in Fν ∩ F . (No message corresponds to the edges in (F ′ − F ), which where added just to make Hall’s theorem directly applicable). All computations performed by S as well as the receive operations relative to messages sent by the superstep preceding S are assigned to S1 . It is then straightforward to verify that the sequence (S1 , . . . , Sh ) is equivalent to S and contributes h to the BSP communication complexity of A′ , since each of its h supersteps has degree 1. Lemma 3. Consider any algorithm B for a BSP with p processors that plays the envelope game on a switching DAG G = (V, E) in K supersteps. Let N and γ be the switching size and the switching potential of G, respectively. At the end of the algorithm, if each processor holds at most U ≤ N envelopes, the redistribution potential satisfies γ . (5) ηK+1 ≥ (U !)N/U Proof. Let Ui ≤ U denote the number of envelopes held by processor Pi just after the end of the last superstep of algorithm B. We know that, when varying the input-output correspondence for each internal node of G in all possible ways, γ different permutations of the envelopes over the arcs entering the outputs of G are generated. At most Πpi=1 (Ui !) envelope permutations can differ only by a rearrangement of the envelopes among arcs assigned to the same processor and thus result in the same placement of the envelopes across processors. Hence, γ . (6) ηK+1 ≥ Qp i=1 (Ui !) Considering that the quantity Πpi=1 (Ui !) is a superlinear function of the Ui ’s and that Σpi=1 Ui = N , a convexity argument reveals that the maximum value is reached when ⌊N/U ⌋ of the variables are set to the value U , one variable is set to (N mod U ), and the remaining variables are set to zero. Therefore, p Y (Ui !) ≤ (U !)⌊N/U ⌋ (N mod U )! ≤ (U !)⌊N/U ⌋ (U !)(N i=1 3 Throughout the paper, [x] denotes the set {1, 2, . . . , x}. 13 mod U )/U = (U !)N/U , where the second inequality follows since the function f (x) = log(x!)/x is increasing when x > 0, and hence f (N mod U ) ≤ f (U ). Then, by plugging inequality Πpi=1 (Ui !) ≤ (U !)N/U in (6), we obtain bound (5). Lemma 4. Consider any algorithm B for a BSP with p processors that plays the envelope game on a switching DAG G = (V, E), with communication complexity HB . Let N be the switching size of G. At the end of the algorithm, the redistribution potential satisfies  (N/p)pHB if p ≤ N/e, ηK+1 ≤ eN HB /e otherwise. Proof. For any i ∈ [p] and j ∈ [K +1], where K is the number of supersteps in B, we denote with tP i,j the number of envelopes held by processor Pi at the beginning of the j-th superstep. Clearly, p i=1 ti,j = N for every j, since, by Rule 2 of the envelope game (Definition 3), the number of envelopes is invariant and always equal to N . (This constraint would not necessarily hold if recomputation were allowed.) Let, for every j ∈ [K], Pj′ to be the set of processors holding at least one envelope at the beginning of the j-th superstep, that is, Pj′ = {Pi : ti,j ≥ 1}. We claim that, for every j ∈ [K], Y ηj+1 /ηj ≤ ti,j . (7) i∈[p]:ti,j ≥1 Thanks to Lemma 2, we can assume without loss of generality that all supersteps of B have degree at most one. Consider superstep j, and consider a processor Pi ∈ Pj′ . At the beginning of the j-th superstep, Pi holds ti,j ≥ 1 envelopes. From these, Pi can choose, in exactly ti,j ≥ 1 different ways, the envelope to send in the j-th superstep, if any. The claim then follows because any of the ηj+1 envelope placements immediately after superstep j correspond to one or more combinations of (a) one of the ηj placements achievable immediately before superstep j, and ′ ′ (b) for every j ∈ [K], P one communication choice for each processor. Let pj = |Pj |. Given that, ′ factors equal N/p′ , t = N , the right-hand side of (7) is maximized when all the p j j i∈[p]:ti,j ≥1 i,j and hence from (7) we obtain ′ ηj+1 /ηj ≤ (N/p′j )pj . ′ Standard calculus reveals that the function (N/p′j )pj has its maximum at p′j = N/e. Therefore, since we must have p′j ≤ p, we have  (N/p)p if p ≤ N/e, ηj+1 /ηj ≤ eN/e otherwise. Multiplying both sides of the preceding relation over the HB supersteps of degree one; considering that, for a superstep with h = 0, ηj+1 /ηj = 1; and observing that η1 = 1, since the only placement of envelopes among processors before the first superstep is the one corresponding to the input placement protocol, the claim follows. We are now ready to prove Theorem 1, which we recall for convenience. Theorem 1. Let A be any algorithm that evaluates without recomputation a switching DAG G = (V, E) on a BSP with p processors. Let N , γ, and ∆ be respectively the switching size, the switching potential, and the maximum out-degree of any node of G. If the sum of the in-degree of the output nodes evaluated by every processor is at most U , then the BSP communication complexity of algorithm A satisfies   log(γ/(U !)N/U ) if p ≤ N/e, ∆p log(N/p) (3) HA ≥ N/U  e log(γ/(U !) ) otherwise. ∆N log e 14 where, by definition, γ ≤ N ! and N/p ≤ U ≤ N . Proof. When p ≤ N/e, combining Lemma 3 and Lemma 4 yields (N/p)pHB ≥ γ . (U !)N/U Taking the logarithm of both sides, solving for HB , and recalling that, by Lemma 1, HA ≥ HB /∆, we conclude that log(γ/(U !)N/U ) . HA ≥ ∆p log(N/p) The case p > N/e is shown analogously. 5 The Cyclic Shift Technique As discussed in Section 1.2, the switching potential lower bound becomes weaker as the maximum number U of output nodes held by a processor grows. In fact, the larger is U , the larger is the number of permutations that can be realized without interprocessor communication. However, there are classes of permutations that, in spite of their small cardinality, do require high communication even for large values of U . One such class is that of the cyclic shifts of order n, i.e., the permutations σ0 , σ1 , . . . , σn−1 such that, for 0 ≤ k, i ≤ n − 1, we have σk (i) = (i + k) mod n. Intuitively, σk cyclically shifts to the right, by k positions. We say that a DAG G can realize all cyclic shifts of order n if 1) |Vin | = |Vout | = n; 2) there exist labelings ′ }, of the input nodes, Vin = {v0 , v1 , . . . , vn−1 }, and of the output nodes, Vout = {v0′ , v1′ , . . . , vn−1 such that, for any 0 ≤ k < n, there exists a set of n arc-disjoint paths connecting vi ∈ Vin to vσ′ k (i) ∈ Vout , for any 0 ≤ i < n. Several interesting computational DAGs do realize all cyclic shifts of a given order. We now quantify the communication required by algorithms that evaluate such DAGs. We need to introduce the following notation. Let P1 be one BSP processor, and let P0 be a virtual processor consisting of the other p − 1 processors. Denote by I1 and I0 the set of input nodes initially held by P1 and P0 , respectively. We also denote by O1 and O0 the set of output nodes evaluated by P1 and P0 , respectively. Lemma 5. Let G = (V, E) be a DAG with n input nodes and n output nodes, capable of realizing all the n cyclic shifts, with respect to some fixed labeling of inputs and outputs. Let A be an algorithm that evaluates G (possibly, with recomputation) on a BSP with p ≥ 2 processors, such that initially each input is available to exactly one processor. Then the BSP communication complexity of A satisfies |I0 ||O1 | + |I1 ||O0 | . HA ≥ 2n Proof. We use an argument patterned after Vuillemin [51]. There are |O1 | cyclic shifts that match an input node in I0 with every output node in O1 ; similarly, there are |O0 | cyclic shifts that match an input node in I1 with every output node in O0 . Summing over all cyclic shifts, we get that |I0 ||O1 | + |I1 ||O0 | input nodes are assigned to output nodes contained in a different processor. As there are n cyclic shifts, there must be a shift that matches F = ⌈(|I0 ||O1 | + |I1 ||O0 |)/n⌉ input nodes to output nodes contained in a different processor. Since at the beginning of the computation each input is available to exactly one processor, a total of F messages are exchanged between P0 and P1 . Therefore, P1 receives or sends at least F/2 messages, and hence HA ≥ F/2. As an immediate consequence of this lemma, we obtain the following. 15 Theorem 2. Let G = (V, E) be a DAG with n input nodes and n output nodes, capable of realizing all the n cyclic shifts, with respect to some fixed correspondence between inputs and outputs. Let A be an algorithm that evaluates G (possibly, with recomputation) on a BSP with p ≥ 2 processors, such that initially each input is available to exactly one processor. Then, if some processor initially stores (exactly) q inputs, or some processor evaluates (exactly) q outputs, the BSP communication complexity of algorithm A satisfies HA ≥ min{q, n − q} . 2 Proof. Since, by hypothesis, each input is initially available to exactly one processor, we have |I0 |+|I1 | = n. Moreover, since we can assume without loss of generality that each output node is computed only once, |O0 |+|O1 | = n. Thus, if we let F denote the quantity (|I0 ||O1 |+|I1 ||O0 |)/n, F = (n − |I1 |)|O1 | + |I1 |(n − |O1 |) ≥ min{|O1 |, n − |O1 |}. n Therefore, if |O1 | = q, then F ≥ min{q, n − q}. A symmetric argument yields the same bound if |I1 | = q. In conclusion, if |I1 | = q or |O1 | = q, by applying Lemma 5 we obtain HA ≥ F/2 ≥ min{q, n − q}/2, as desired. 6 Applications In this section, we show the versatility of the switching potential technique by applying it to the FFT DAG and to sorting and permutation networks. Further, we show that by applying the switching potential technique to some parts of a particular sorting network it is possible to obtain a lower bound stronger than the one obtained by applying the switching potential technique to the entire DAG. 6.1 Fast Fourier Transform Let n be a power of two. In the n-input FFT DAG, a node is a pair hw, li, with 0 ≤ w < n and 0 ≤ l ≤ log n, and there exists an arc from node hw, li to node hw′ , l′ i if and only if l′ = l + 1 and either w and w′ are identical or their binary representations differ exactly in the l′ -th least significant bit. See Figure 2 for an example. The n-input FFT DAG is a switching DAG since for any internal node v we have δin (v) = δout (v) = 2, and its switching size is N = 2n. Its switching potential is established by the following lemma. Lemma 6. The FFT DAG of input size n has switching potential γ = 2n(log n−1) . Proof. For each internal node, there exist two possible one-to-one relations between the incoming arcs and the outgoing arcs. A configuration of the internal nodes is given by specifying the relation of each internal node, and each configuration automatically defines a particular set of N = 2n arc-disjoint paths. Since there are n(log n − 1) internal nodes in the FFT DAG, there are 2n(log n−1) possible configurations of the internal nodes. No two configurations define the same set: this follows as a corollary of the property that in the FFT DAG there is a unique path between any input node and any output node [37].4 Now we show that the FFT DAG can realize all cyclic shifts. This will enable the application of the results of Section 5. 4 [37] discusses the property for the Omega network, which is isomorphic to the FFT network. 16 Figure 2: The FFT DAG on n = 8 inputs and switching size N = 16. The nodes hw, li are placed so that w = 0, . . . , 7 from left to right and l = 0, . . . , 3 from bottom to top. Lemma 7. The n-input FFT DAG can realize all cyclic shifts of order n. Proof. In an n-input FFT DAG there exists a path from hw, 0i to h(w + k) mod n, log ni, for any 0 ≤ w < n and 0 ≤ k < n. This path visits hf (w, l), li for each 0 ≤ l ≤ log n, where f (w, l) = ⌊w/2l ⌋2l + ((w + k) mod 2l ). We now show that each one of the above sequences of nodes is a connected path. Clearly, we have f (w, 0) = w and f (w, log n) = (w + k) mod n. The values f (w, l) and f (w, l + 1) differ at most in the (l + 1)-th least significant bit: indeed, the two values share the l least significant bits since f (w, l) ≡ f (w, l + 1) mod 2l , and they also share the log n − l − 1 most significant bits since ⌊f (w, l)/2l+1 ⌋ = ⌊f (w, l + 1)/2l+1 ⌋. Therefore the DAG nodes hf (w, l), li and hf (w, l + 1), l + 1i are connected and the path is well defined. Moreover, no two paths share a node for a given k: assume by contradiction that there exist two paths K1 = (hw, 0i, . . . , h(w + k) mod n, log ni) and K2 = (hw′ , 0i, . . . , h(w′ + k) mod n, log ni), with w 6= w′ , that share a node; then, there must exist a value l, with 0 < l < log n, such that f (w, l) = f (w′ , l); however, since w = f (w, l) − (k mod 2l ), it follows that w = w′ which is in contradiction with the initial assumption w 6= w′ ; we can thus conclude that paths K1 and K2 do not share any node. Therefore, we have that the FFT DAG can realize cyclic shifts for any 0 ≤ k < n, by suitably setting DAG nodes according to the set of n paths specified by k. We are now ready to prove Theorem 4, which provides the first lower bound on the BSP communication complexity required for evaluating a n-input FFT DAG that asymptotically matches upper bound (1) for any number of processors p ≤ 2n/e. Before this, we shall use the cyclic shift technique to complement the dominator technique in order to obtain, for the FFT, a lower bound of the same form of (2) in Section 1.1, but under milder assumptions on the input/output protocol. Since, like the dominator technique, the cyclic shift technique does allow for recomputation, this results in a strengthened lower bound for the general case when recomputation is allowed, and thus is of independent interest. Theorem 3. Let A be an algorithm that evaluates the n-input FFT DAG (possibly, with recomputation) on a BSP with p ≥ 2 processors, such that initially each input is available to exactly one processor. Then, if no processor evaluates more than n/ǫ outputs, for some constant ǫ > 1, the BSP communication complexity of A satisfies   n log n . HA = Ω p log((n/p) log n) 17 Proof. Since the n-input FFT DAG has n(log n − 1) internal nodes and n output nodes, at least one processor has to evaluate x = (n log n)/p nodes. Let P1 be one of such processors, and let P0 be a virtual processor consisting of the remaining p − 1 processors. Denote by I1 and I0 the set of input nodes initially held by P1 and P0 , respectively. We also denote by O1 and O0 the set of output nodes evaluated by P1 and P0 , respectively. If |I1 | ≤ βx/ log x, where β is a suitably small constant, then the lower bound in (2) applies, and the theorem follows. Otherwise, if |I1 | > βx/ log x, we shall leverage the hypothesis whereby no processor evaluates more than n/ǫ outputs, for some constant ǫ > 1. This gives |O1 | ≤ n/ǫ, which in turn implies |O0 | ≥ n − n/ǫ = n(ǫ − 1)/ǫ. Then, since by hypothesis each input is initially available to exactly one processor, and since by Lemma 7 the FFT DAG can realize all the n cyclic shifts, we can apply Lemma 5, obtaining   n log n |I1 ||O0 | βn log n · n(ǫ − 1) |I0 ||O1 | + |I1 ||O0 | ≥ > =Ω , HA ≥ 2n 2n 2n · p log((n/p) log n) · ǫ p log((n/p) log n) as desired. We now use the switching potential technique in synergy with the cyclic shift technique to derive a tight lower bound for the case when recomputation is disallowed. We shall consider only the case p ≤ N/e; nevertheless, Theorem 1 also encompasses the case p > N/e. This case can be analyzed in a similar way as we analyze the case p ≤ N/e. Theorem 4. Let A be any algorithm that evaluates without recomputation the n-input FFT DAG on a BSP with p ≤ 2n/e processors, and let q be the maximum number of output nodes evaluated by a processor. If initially each input is available to exactly one processor, then the communication complexity of algorithm A satisfies HA ≥ n log(n/(8q 2 )) min{q, n − q} + . 4p log(2n/p) 4 Moreover, if q ≤ n/2, HA > n log(n/2) . 8p log(2n/p) Proof. Since the in-degree of output nodes is two, we have that the sum of the in-degree of the output nodes evaluated by each processor is at most U ≤ 2q. As recomputation is ruled out, we can apply Theorem 1 with N = 2n, ∆ = 2, U ≤ 2q, and γ = 2n(log n−1) , obtaining, after some manipulations, n log(n/(8q 2 )) log(γ/(U !)N/U ) ≥ . HA ≥ ∆p log(N/p) 2p log(2n/p) By hypothesis, each input is initially available to exactly one processor, and there exists some processor which evaluates (exactly) q output nodes; moreover, by Lemma 7, the FFT DAG can realize all cyclic shifts. Therefore, we can apply Theorem 2, which gives HA ≥ (1/2) min{q, n − q}. By combining these two lower bounds we obtain the first claim of the theorem. Consider now the case q ≤ n/2. In this case we can write HA ≥ n log(n/(8q 2 )) q n log(n/(8q 2 )) q + > + . 4p log(2n/p) 4 8p log(2n/p) 4 Let us denote with H ′ (q) the rightmost term of the above inequality, that is, H ′ (q) = n log(n/(8q 2 )) q + . 8p log(2n/p) 4 18 By deriving H ′ (q) with respect to q, we can see that H ′ (q) is non-decreasing for q ≥ n/(p log(2n/p)). Therefore, since q ≥ n/p, and since n/p > n/(p log(2n/p)) (because of the p ≤ 2n/e hypothesis), we have that H ′ (q) ≥ H ′ (n/p), and thus HA > H ′ (q) ≥ H ′ (n/p) = n log(n/2) , 8p log(2n/p) which proves the second claim of the theorem. 6.2 Sorting and Permutation Networks In this section we apply our technique to bound from below the BSP communication complexity of the computation DAGs that correspond to sorting and permutation networks. These networks, such as the Beneš permutation network [9] and the bitonic [7] and AKS sorting networks [3], can be interpreted as switching DAGs and have the property that they can realize all the possible permutations, and thus the switching potential technique can be naturally applied to them. Since our technique abstracts the DAG under consideration by considering only one general parameter (its switching potential), the lower bound obtained in this section is universal in the sense that it holds for any sorting or permutation network. We now briefly recall the definitions of such networks. More complete descriptions can be found in [35, 38, 44]. A comparator network is an acyclic circuit of comparators. A comparator is a 2-input 2-output operator which returns the minimum of the two inputs on one output, and the maximum on the other. An n-input comparator network is called a sorting network if it produces the same output sequence on all n! permutations of the inputs. Thus, sorting networks can be seen as a simple model for data-oblivious sorting algorithms, that is, algorithms that perform the same set of operations for all values of the input data. A routing network is an acyclic circuit of switches. A switch is a 2-input 2-output operator which either passes its two inputs to its outputs, or it swaps them. An n-input routing network is called a permutation network if for each of the n! permutations of the inputs there exists a setting of the switches that creates n disjoint paths from the n inputs to the n outputs. Observe that, suitably modified to transmit messages, every sorting network is a permutation network, but the converse is not true. A sorting/permutation network can be naturally modeled as a computation DAG by associating to each comparator/switch a pair of (internal) nodes of the DAG. Both nodes have the same two predecessors, and thus receive in input the same two values a and b, and both nodes have out-degree two, but one node computes the function x = min{a, b} while the other computes the function y = max{a, b}. The resulting DAG is therefore a switching DAG of input size n, switching size N = 2n, and with ∆ = 2. The following lemma shows that the DAG of any sorting or permutation network has switching potential γ ≥ n!, and can realize all cyclic shifts. Lemma 8. The DAG of any sorting or permutation network with input size n has switching potential γ ≥ n! and can realize all cyclic shifts of order n. Proof. Since any sorting or permutation network can perform all the n! permutations of n inputs, there exist n! sets S of n arc-disjoint paths connecting input and output nodes. Each set S ∈ S of n arc-disjoint paths determines a set of n paths from n outgoing arcs of the input nodes to n incoming arcs of the output nodes. In order to get the claimed switching potential, we have to construct additional n paths from the n outgoing arcs of the input nodes to the n incoming arcs of the output nodes that are not used in S. We observe that each path in a S ∈ S uses only one of the two incoming arcs of each (non-input) node, and only one of the two 19 outgoing arcs of each (non-output) node. By exploiting the unused pair of incoming/outgoing arcs in each internal node, it is possible to uniquely construct the missing paths. Therefore, there exists n! sets of N = 2n arc-disjoint paths connecting input and output nodes, and the first part of the claim follows.5 Furthermore, the set S contains the set of n arc-disjoint paths of all the n cyclic shifts by definition of sorting and permutation networks, and the second part of the claim follows as well. We are therefore in a similar situation as for the FFT DAG, with a slightly different switching potential γ, and it is therefore sufficient to mimic the proof for Theorem 4. We have the following result. Theorem 5. Let N be any sorting or permutation network with n inputs. Let A be any algorithm that evaluates without recomputation the DAG corresponding to N on a BSP with p ≤ 2n/e processors, and let q be the maximum number of output nodes evaluated by a processor. Then the BSP communication complexity of algorithm A satisfies HA ≥ n log(n/(4eq 2 )) min{q, n − q} + . 4p log(2n/p) 4 Moreover, if q ≤ n/2, HA > n log(n/e) . 8p log(2n/p) Proof. Analogous to the proof of Theorem 4, with γ ≥ n! in place of γ = 2n(log n−1) . We observe that for sorting and permutation networks we are using a lower bound on the switching potential γ which is lower (when n ≥ 6) than the value of the switching potential of the FFT DAG, and then the resulting lower bound on the BSP communication complexity has a lower constant inside the logarithmic term at the numerator with respect to the one in Theorem 4. This is due to the generality of our argument that applies to the entire family of sorting and permutation networks. Better bounds can be obtained for specific networks. For example, in the case of the Beneš permutation network, the same bound of Theorem 4 applies since the corresponding DAG contains an n-input FFT DAG. Finally, we observe that the lower bound of Theorem 5 is asymptotically tight, as the computation DAG corresponding to the Beneš permutation network can be evaluated with the same strategy used for the FFT DAG, yielding a BSP communication complexity of O(n log n/(p log(n/p))). 6.3 Boosting the Switching Potential Technique Since γ ≤ N !, if applied to an entire switching DAG, Theorem 1 cannot yield a lower bound larger than Ω((N log N )/(p log(N/p))). However, by applying the theorem to suitable parts of the DAG and composing the results, it is sometime possible to obtain asymptotically larger lower bounds. To illustrate the approach, we study the DAG of the periodic balanced sorting network (PBSN) [26], which consists of a sequence of log n identical blocks. Specifically, we consider the case where n is a power of two and the block is the balanced merging network (BMN), as in [26]. (The analysis and the result would also apply when the block is the odd-even merging network). The DAG of an n-input BMN is the following: a node is a pair hw, li, with 0 ≤ w < n and 0 ≤ l ≤ log n; there exists an arc between two nodes hw, li and hw′ , l′ i if and only if l′ = l+1, and 5 In a DAG corresponding to a sorting or permutation network with n inputs and internal nodes of in-degree δ, the switching size is N = δn since there are δ outgoing edges per input node. Therefore, the switching potential γ can be as large as N ! = (δn)!. The present argument shows that γ is at least n!. 20 either w = w′ are identical or w′ = (i + 1)n/2l − j where i = ⌊w2l /n⌋ and j = i mod (n/2l ). The n-input BMN is a switching DAG since for any internal node v we have δin (v) = δout (v) = 2, and its switching size is N = 2n. The DAGs of the BMN and of the FFT are isomorphic, that is, there exists an arc-preserving bijection between the two node sets [11]. Hence, the BMN has the same switching potential of the FFT DAG (i.e., γ = 2n(log n−1) , see Lemma 6) and can realize all cyclic shifts of order n (see Lemma 7). As a consequence, the lower bounds stated in Theorem 4 for the FFT DAG apply unchanged to the DAG of the BMN. By separately applying the switching potential technique to each of the log n BMN blocks of a PBSN, we obtain the following result. Theorem 6. Let A be any algorithm that evaluates without recomputation the DAG of the n-input PBSN, where the block is a BMN, on a BSP with p ≤ 2n/e processors. Let q be the maximum number of output nodes of each block evaluated by a processor. If each input is initially available to exactly one processor and q ≤ n/2, then the BSP communication complexity of A satisfies   n log(n/2) log n . HA > 8p log(2n/p) 2 Proof. Consider the sequence s1 , s2 , . . . , slog n of BMNs in the PBSN. For any 1 ≤ i < log n − 1, the evaluations of si and si+2 in algorithm A cannot overlap in time: as BMN sorts any bitonic sequence [26], any input value can reach any output; therefore, no input value of si+2 is ready until all output values of si have been computed. It follows that the evaluations of the ⌈log n/2⌉ odd BMNs cannot overlap in time. Since, by hypothesis, no processor evaluates more than q ≤ n/2 output nodes of each BMN, we can apply (the second part of) Theorem 4 to each BMN, and the claim follows. Observe that the PBSN contains Θ(n log2 n) comparators, which is a factor log n more than the optimal value. Therefore, it is natural that the BSP communication complexity for evaluating a PBSN is a factor Ω(log n) larger than the lower bound that holds for any sorting network (Theorem 5). Nevertheless, a lower bound of the form of the one given in Theorem 6 cannot be derived by applying the switching potential technique to the entire DAG of a PBSN. We are not aware of any prior lower bounds of this form for computations that correspond to the evaluation of PBSN. 7 The Switching Potential Technique in a Parallel I/O Model In this section, we show how the switching potential technique can be adapted to yield lower bounds in computational models different from BSP. Specifically, we consider a parallel variant of the I/O model, which includes, as special cases, both the I/O model of Hong and Kung [31] and the LPRAM model of Aggarwal et al. [1]. Our parallel I/O model consists of p synchronous processors, each with a (fast) local memory of m words, which can access a (slow) shared memory of (potentially) unbounded size. In each step, all the processors perform the same instruction, which can be (i) an operation on data in the local memory, (ii) a move of a word from the shared to the local memory (i.e., a read operation) or (iii) vice versa (i.e., a write operation).6 The I/O complexity HA of an algorithm A is the number of steps where a read or write operation occurs.7 We assume the input and output of 6 Our lower bound can be trivially adjusted, dividing it by b, if an instruction can move b memory words instead of just one. 7 We use here the same notation HA for the I/O complexity as for the BSP communication complexity, to highlight the similar role of the two metrics in the context of the switching potential technique. 21 algorithm A to reside in the shared memory at the beginning and at the end of A, respectively; (if this is not the case, our lower bound may still apply, after suitable modifications). We refer to [50] for a survey on algorithms and data structures for the I/O model. Consider now an algorithm B, for the parallel I/O model, playing the envelope game on a switching DAG G = (V, E), with switching potential γ. We assume that each envelope occupies one memory word, whence there cannot be more than m envelopes in any local memory. Due to the restrictions of the I/O model, algorithm B can move the first envelope from a node u only when all the δin (u) input envelopes are in the local memory of the same processor. As for the BSP model, a crucial observation is that the switching potential technique does not simply arise from the data movement implied by the γ permutations that contribute to the switching potential, but rather by the constraint that all those permutations must be realizable under the same schedule. Formally, the schedule of an algorithm is defined by the sequence of read and write operations, and by the memory locations in the shared and local memories involved in each read and write operation. Since the schedule is given, only the content (not the source and the destination) of a read and write operation can vary across different runs of the envelope game that can result in the realization of different permutations. Thus, at any given time, the memory locations (both shared and local) that contain envelopes are independent of the run of the game, while the mapping of the envelopes to those location will generally differ across runs. This fact allows us to introduce a notion of redistribution potential, appropriate for the parallel I/O model: Definition 5. Consider an algorithm B for the parallel I/O model that plays the envelope game on a switching DAG G = (V, E). At any given step of the algorithm, the envelope placement is the specification, for each envelope, of either the (address of the) shared memory location or the (index of the) processor whose local memory contains that envelope. (The exact position of the envelope within a local memory is irrelevant.) The redistribution potential at the j-th read/write operation, denoted ηj , is the number of different envelope placements, before the j-th read/write operation, that are achievable in different runs, while complying with the schedule of B. From the initial and final conditions of the game, we have η1 = 1 and ηHB +1 ≥ γ. Intuitively, read and local operations do not increase the redistribution potential. On the other hand, the increase due to write operations is bounded by the amount of envelopes held locally by each processor. This amount is naturally bounded by the size m of the local memory, but it is also effectively bounded by N/p, since the p processors together can at most hold N envelopes, and it turns out that a balanced allocation of envelopes to processors can result in the maximum increase of redistribution potential. These statements are substantiated in the next lemma, leading to a lower bound on the number of write steps needed to bring the redistribution potential from 1 to γ, hence to the I/O complexity. Lemma 9. The I/O complexity of an algorithm B that plays the envelope game on a switching DAG G = (V, E) in the parallel I/O model with p processors, with local memory size m, satisfies HB ≥ log γ , p log min{m, N/p} where γ is the switching potential of G. Proof. An operation on data in the local memories cannot change the redistribution potential, since it does not affect the shared memory and does not change the set of envelopes present in each local memory. A read operation moves memory words from the shared memory to the local memories, in a way that is uniquely prescribed by the schedule of the algorithm. Hence, 22 to each envelope placement before the operation there correspond a unique placement after the operation, whence the redistribution potential does not increase. On the Q other hand, each write operation increases the redistribution potential by at most a factor pi=1 Ni , where Ni denotes the number of envelopes currently in the i-th processor. In fact, the envelope to be moved to shared memory by the i-th processor can only be one of the Ni envelopes in its local memory. (For clarity, we observe that the source and the target addresses of the write are actually fixed by the schedule. It is the envelope currently located at the source address that can differ across different runs of the game, due to permutations of envelopes within a local memory.) Qp p We now observe that, on the one hand, for each i, we have Ni ≤ m, whence Pp i=1 Ni ≤ m . On the other hand, by Q the invariance of the number of envelopes, we have i=1 Ni = N , a constraint under which pi=1 Ni ≤ (N/p)p , as can be established by standard techniques. We then have ηj+1 ≤ (min{m, N/p})p ηj , whence ηHB +1 ≤ min{m, N/p}pHB . Since ηHB +1 ≥ γ, the claim follows. We are now ready to provide a lower bound on the I/O complexity of any algorithm evaluating a switching DAG G without recomputation. Theorem 7. Let A be any algorithm that evaluates without recomputation a switching DAG G = (V, E) in the parallel I/O model with p processors and with local memory size m. Let N , γ, and ∆ be the switching size of G, the switching potential of G, and the maximum out-degree of any node of G, respectively. Then the I/O complexity of algorithm A satisfies HA ≥ log γ . ∆p log min{∆m, N/p} Proof. An algorithm A that evaluates G on the parallel I/O model with local memory size m and p processors can be transformed into an algorithm B that plays the envelope game on the parallel I/O model with local memory size ∆m and p processors. Algorithm B is obtained from A with the following three changes. (1) Initially, for every u ∈ Vin , δout (u) envelopes are placed on u and each envelope is univocally assigned to an outgoing arc of the respective input node. (2) The computation in each internal node u is replaced with a switch that sequentially forwards the δin (u) input envelopes to the δout (u) output arcs according to some permutation. This replacement requires that δout (u) ≤ ∆ words are available to store the envelopes forwarded by u, whereas only one word was required to store the single output of node u: since the local memory is ∆ times larger than the one used by algorithm A, there is enough space to store the at most ∆ envelopes for each of the m nodes kept in the local memory by A. (3) For each arc (u, v) where P (v) differs from P (v), the envelope is first written in the shared memory by P (u) and then read by P (v) (possibly, other processors can read and write the envelope between these two operations). As shown in Lemma 1, the above modifications guarantee that the six rules of the envelope game are satisfied. We now observe that HB ≤ ∆HA . The first two changes do not increase the I/O complexity. On the other hand, the third change increases the I/O complexity by a factor ∆: indeed, for each node u, the output values on the δout (u) outgoing edges can be stored by algorithm A in one word of the local/shared memory since the output values are indistinguishable; however, algorithm B requires δout (u) ≤ ∆ words since envelopes are distinct; therefore the I/O complexity of B is at most ∆HA . The theorem follows since, by Lemma 9, an algorithm B playing the envelope game on an ∆m-word local memory with p processors requires HB ≥ (log γ)/(p log min{∆m, N/p}) I/Os. Since HB ≤ ∆HA , the main claim follows. 23 We now analyze the above lower bounds for two special cases: the sequential I/O model [31] and the LPRAM [1]. The I/O model follows by the parallel I/O model by setting p = 1. If we consider the FFT DAG and assume that N ≥ 2m, we obtain a lower bound of n log(n/2)/(2 log(2m)), which asymptotically matches the lower bound in [31]. On the other hand, the LPRAM is obtained by setting m = +∞. In this case, we get for the FFT DAG a lower bound of n log(n/2)/(2p log(2n/p)), which asymptotically matches the lower bound in [1]. Interestingly, we observe that Theorem 7 gives a tight lower bound for the FFT DAG without additionally resorting to the cyclic shift technique, as we did in the BSP model. The reason for such behavior is that the I/O protocol requires envelopes to be stored in the shared memory at the beginning and end of the algorithm. Thus, the redistribution potential cannot be increased without I/O operations. In contrast, in the BSP model, envelopes are contained in the processors’ local memories since there is no “external storage” where to store envelopes at the beginning and at the end of the algorithm. Therefore, if each BSP processor contains at most U of the N envelopes, it is possible to get (U !)N/U permutations even without communication, by just rearranging envelopes within each processor (see the proof of Lemma 3). If U is sufficiently large compared to the switching potential γ, almost all permutations can be reached without communication and we then need the cyclic shift technique to reinforce the lower bound. 8 Conclusions In this paper we have studied some aspects of the complexity of communication of parallel algorithms. We have presented new techniques for deriving lower bounds on communication complexity for computations that can be represented by a certain class of DAGs. We have demonstrated the effectiveness of this technique by deriving novel, mostly tight lower bounds for the FFT and for sorting and permutation networks. The present work can be naturally extended in several directions, some of which are briefly outlined next. First, it would be interesting to apply the switching potential technique to other DAG computations beyond the few case studies of this paper. One example are DAGs that correspond to merging networks. We conjecture that the switching potential γ of any DAG corresponding to a merging network of input size n = 2k satisfies log γ = Ω(n log n); we also conjecture that the same bound holds for any network that can realize all cyclic shifts. It is also natural to explore the application of the switching potential technique to other models for distributed and hierarchical computation. Finally, one might ask whether the main lower bounds presented in this paper also hold when recomputation of intermediate values is allowed. As a broader consideration, our lower bound techniques, as well as others in the literature, crucially exploit the circumstance that the execution of some algorithms embeds the evaluation of the same DAG for different inputs. The development of communication lower bound techniques for algorithms (e.g., heapsort or quicksort) which do not fall in this class remains an open, challenging problem. Acknowledgements. The authors would like to thank Lorenzo De Stefani, Andrea Pietracaprina, and Geppino Pucci for insightful discussions. References [1] A. Aggarwal, A. K. Chandra, and M. Snir. Communication complexity of PRAMs. Theoret. Comput. Sci., 71(1):3–28, 1990. 24 [2] A. Aggarwal and J. S. Vitter. The input/output complexity of sorting and related problems. Comm. ACM, 31(9):1116–1127, 1988. [3] M. Ajtai, J. Komlós, and E. Szemerédi. Sorting in c log n parallel steps. Combinatorica, 3(1):1–19, 1983. [4] G. Ballard, J. Demmel, A. Gearhart, B. Lipshitz, Y. Oltchik, O. Schwartz, and S. Toledo. Network topologies and inevitable contention. In Proceedings of the 1st International Workshop on Communication Optimizations in HPC (COMHPC), pages 39–52, 2016. [5] G. Ballard, J. Demmel, O. Holtz, and O. Schwartz. Minimizing communication in numerical linear algebra. SIAM J. Matrix Anal. Appl., 32(3):866–901, 2011. [6] G. Ballard, J. Demmel, O. Holtz, and O. Schwartz. Graph expansion and communication costs of fast matrix multiplication. J. ACM, 59(6), 2012. [7] K. E. Batcher. Sorting networks and their applications. In Proceedings of the AFIPS Spring Joint Computer Conference, volume 32, pages 307–314, 1968. [8] A. Bäumker, W. Dittrich, and F. Meyer auf der Heide. Truly efficient parallel algorithms: 1optimal multisearch for an extension of the BSP model. Theoret. Comput. Sci., 203(2):175– 203, 1998. [9] V. E. Beneš. Permutation groups, complexes, and rearrangeable connecting networks. Bell System Tech. J., 43:1619–1640, 1964. [10] S. N. Bhatt, G. Bilardi, and G. Pucci. Area-time tradeoffs for universal VLSI circuits. Theoret. Comput. Sci., 408(2-3):143–150, 2008. [11] G. Bilardi. Merging and sorting networks with the topology of the omega network. IEEE Trans. Comput., 38(10):1396–1403, 1989. [12] G. Bilardi and C. Fantozzi. New area-time lower bounds for the multidimensional DFT. In Proceedings of the 17th Computing: The Australasian Theory Symposium (CATS), pages 111–120, 2011. [13] G. Bilardi, A. Pietracaprina, and P. D’Alberto. On the space and access complexity of computation DAGs. In Proceedings of the 26th International Workshop on Graph-Theoretic Concepts in Computer Science (WG), pages 47–58, 2000. [14] G. Bilardi, A. Pietracaprina, and G. Pucci. Decomposable BSP: a bandwidth-latency model for parallel and hierarchical computation. In Handbook of Parallel Computing: Models, Algorithms and Applications, pages 277–315. CRC Press, 2007. [15] G. Bilardi, A. Pietracaprina, G. Pucci, M. Scquizzato, and F. Silvestri. Network-oblivious algorithms. J. ACM, 63(1), 2016. [16] G. Bilardi and F. Preparata. Area-time lower-bound techniques with applications to sorting. Algorithmica, 1(1):65–91, 1986. [17] G. Bilardi and F. Preparata. Processor-time tradeoffs under bounded-speed message propagation: Part II, lower bounds. Theory Comput. Syst., 32(5):531–559, 1999. [18] G. Bilardi, M. Scquizzato, and F. Silvestri. A lower bound technique for communication on BSP with application to the FFT. In Proceedings of the 18th International European Conference on Parallel and Distributed Computing (Euro-Par), pages 676–687, 2012. 25 [19] G. E. Blelloch, J. T. Fineman, P. B. Gibbons, Y. Gu, and J. Shun. Efficient algorithms with asymmetric read and write costs. In Proceedings of the 24th Annual European Symposium on Algorithms (ESA), pages 14:1–14:18, 2016. [20] R. A. Chowdhury, V. Ramachandran, F. Silvestri, and B. Blakeley. Oblivious algorithms for multicores and networks of processors. J. Parallel Distrib. Comput., 73(7):911–925, 2013. [21] R. Cole and V. Ramachandran. Efficient resource oblivious algorithms for multicores with false sharing. In Proceedings of the 26th IEEE International Parallel and Distributed Processing Symposium (IPDPS), pages 201–214, 2012. [22] R. Cole and V. Ramachandran. Resource oblivious sorting on multicores. ACM Trans. Parallel Comput., 3(4), 2017. [23] J. W. Cooley and J. W. Tukey. An algorithm for the machine calculation of complex fourier series. Math. Comput., 19:297–301, 1965. [24] D. E. Culler, R. M. Karp, D. A. Patterson, A. Sahay, E. E. Santos, K. E. Schauser, R. Subramonian, and T. von Eicken. LogP: A practical model of parallel computation. Comm. ACM, 39(11):78–85, 1996. [25] P. de la Torre and C. P. Kruskal. Submachine locality in the bulk synchronous setting. In Proceedings of the 2nd International Conference on Parallel Processing (Euro-Par), pages 352–358, 1996. [26] M. Dowd, Y. Perl, L. Rudolph, and M. Saks. The periodic balanced sorting network. J. ACM, 36(4):738–757, 1989. [27] M. Frigo, C. E. Leiserson, H. Prokop, and S. Ramachandran. Cache-oblivious algorithms. ACM Trans. Algorithms, 8(1), 2012. [28] M. T. Goodrich. Communication-efficient parallel sorting. SIAM J. Comput., 29(2):416– 432, 1999. [29] P. Hall. On representatives of subsets. J. London Math. Soc., 10(1):26–30, 1935. [30] F. C. Hennie. One-tape, off-line Turing machine computations. Information and Control, 8(6):553–578, 1965. [31] J.-W. Hong and H. T. Kung. I/O complexity: The red-blue pebble game. In Proceedings of the 13th Annual ACM Symposium on Theory of Computing (STOC), pages 326–333, 1981. [32] J. E. Hopcroft, W. J. Paul, and L. G. Valiant. On time versus space. J. ACM, 24(2):332– 337, 1977. [33] D. Irony, S. Toledo, and A. Tiskin. Communication lower bounds for distributed-memory matrix multiplication. J. Parallel Distrib. Comput., 64(9):1017–1026, 2004. [34] B. H. H. Juurlink and H. A. G. Wijshoff. A quantitative comparison of parallel computation models. ACM Trans. Comput. Syst., 16(3):271–318, 1998. [35] D. E. Knuth. The Art of Computer Programming, Volume III: Sorting and Searching. Addison-Wesley, 2nd edition, 1973. 26 [36] R. R. Koch, F. T. Leighton, B. M. Maggs, S. B. Rao, A. L. Rosenberg, and E. J. Schwabe. Work-preserving emulations of fixed-connection networks. J. ACM, 44(1):104–147, 1997. [37] D. H. Lawrie. Access and alignment of data in an array processor. IEEE Trans. Comput., C-24(12):1145–1155, 1975. [38] F. T. Leighton. Introduction to Parallel Algorithms and Architectures: Arrays, Trees, Hypercubes. Morgan Kaufmann Publishers Inc., 1992. [39] P. D. MacKenzie and V. Ramachandran. Computational bounds for fundamental problems on general-purpose parallel models. In Proceedings of the 10th Annual ACM Symposium on Parallel Algorithms and Architectures (SPAA), pages 152–163, 1998. [40] C. H. Papadimitriou and J. D. Ullman. A communication-time tradeoff. SIAM J. Comput., 16(4):639–646, 1987. [41] M. S. Paterson and C. E. Hewitt. Comparative schematology. In Proceedings of the Project MAC Conference on Concurrent Systems and Parallel Computation, pages 119–127, 1970. [42] D. Ranjan, J. Savage, and M. Zubair. Strong I/O lower bounds for binomial and FFT computation graphs. In Proceedings of the 17th Annual International Conference on Computing and Combinatorics (COCOON), pages 134–145, 2011. [43] J. E. Savage. Extending the Hong-Kung model to memory hierarchies. In Proceedings of the 1st Annual International Conference on Computing and Combinatorics (COCOON), pages 270–281, 1995. [44] J. E. Savage. Models of Computation: Exploring the Power of Computing. Addison-Wesley Longman Publishing Co., Inc., 1998. [45] M. Scquizzato and F. Silvestri. Communication lower bounds for distributed-memory computations. In Proceedings of the 31st Symposium on Theoretical Aspects of Computer Science (STACS), pages 627–638, 2014. [46] D. C. Thompson. A Complexity Theory for VLSI. PhD thesis, Carnegie Mellon University, 1980. [47] A. Tiskin. The bulk-synchronous parallel random access machine. Theoret. Comput. Sci., 196(1-2):109–130, 1998. [48] A. Tiskin. BSP (bulk synchronous parallelism). In Encyclopedia of Parallel Computing, pages 192–199. Springer, 2011. [49] L. G. Valiant. A bridging model for parallel computation. Comm. ACM, 33(8):103–111, 1990. [50] J. S. Vitter. Algorithms and data structures for external memory. Foundations and Trends in Theoretical Computer Science, 2(4):305–474, 2006. [51] J. Vuillemin. A combinatorial limit to the computing power of VLSI circuits. IEEE Trans. Comput., 32(3):294–300, 1983. [52] C.-L. Wu and T.-Y. Feng. The universality of the shuffle-exchange network. IEEE Trans. Comput., 30(5):324–332, 1981. 27 [53] A. C.-C. Yao. Some complexity questions related to distributive computing. In Proceedings of the 11th Annual ACM Symposium on Theory of Computing (STOC), pages 209–213, 1979. APPENDIX A.1 An Improved Dominator Analysis for the FFT DAG Given a DAG, D(k) denotes the maximum size of a set U of nodes that has a dominator W of size k. Hong and Kung showed that, for the FFT DAG, D(k) ≤ 2k log k [31, Theorem 4.1]. In this section we show that this bound can be improved to D(k) ≤ k log 2k, which is tight for every k power of two. This can be done by modifying the inductive proof of Hong and Kung accordingly. In the proof we will use the following lemma. Lemma 10. If 0 ≤ x ≤ y and x + y ≤ m, then x log x + y log y + 2x ≤ m log m. Proof. Let m′ = x + y. Standard calculus shows that, in the interval 0 ≤ x ≤ m′ /2, x log x + (m′ − x) log(m′ − x) + 2x ≤ m′ log m′ . Since, by hypothesis, m′ ≤ m, we obtain x log x + y log y + 2x ≤ m′ log m′ ≤ m log m. We are now ready to show the result claimed at the beginning of this section. Proposition 1. For k ≥ 2, any node set U of the FFT DAG that has a dominator set of size no more than k can have at most k log 2k nodes. Proof. The proof is by induction on k. Since 2k log k = k log 2k when k = 2, the base case is the same as in the proof of Hong and Kung. We now mimic the inductive argument in the proof of Theorem 4.1 of [31]. We partition the nodes of the FFT DAG into three parts, A, B, and C, defined as follows. A = {nodes hw, li s.t. 0 ≤ w < n/2 and l < log n}, B = {nodes hw, li s.t. n/2 ≤ w < n and l < log n}, C = {nodes hw, li s.t. l = log n}. The set of nodes hw, li ∈ C such that 0 ≤ w < n/2 is said to be the upper half of part C, whereas the set of nodes hw, li ∈ C such that n/2 ≤ w < n is said to be the lower half of part C. (See also the figure depicted in the proof of Theorem 4.1 of [31].) The dominator is partitioned into three parts, DA , DB , and DC , which have dA , dB , and dC nodes respectively. Without loss of generality we assume dA ≤ dB . The set U is partitioned into three parts, UA , UB , and UC , which have uA , uB , and uC nodes respectively. If uC > dC + 2dA then either there are more than dA nodes of UC \ DC in the upper half of part C or there are more than dA nodes of UC \ DC in the lower half of part C. In either case, there are more than dA independent paths from the upper half inputs (i.e., the set of input nodes of the FFT DAG such that 0 ≤ w < n/2) to these nodes in UC \ DC . Since the set DA has only dA nodes, this is impossible. Therefore we have uC ≤ dC + 2dA . 28 By inductive hypothesis we have uA ≤ dA log 2dA , uB ≤ dB log 2dB . Thus |U | ≤ dA log 2dA + dB log 2dB + dC + 2dA . Combining Lemma 10 with the hypothesis x + y ≤ m yields x log 2x + y log 2y + 2x ≤ m log 2m. Since 0 ≤ dA ≤ dB and dA + dB ≤ k − dC , applying (8) yields |U | ≤ (k − dC ) log 2(k − dC ) + dC ≤ k log 2k, as desired. 29 (8)
8cs.DS
Clustering for Different Scales of Measurement - the Gap-Ratio Weighted K-means Algorithm Joris Guérin, Olivier Gibaru, Stéphane Thiery, and Eric Nyiri Laboratoire des Sciences de l’Information et des Systèmes (CNRS UMR 7296) Arts et Métiers ParisTech, Lille, France arXiv:1703.07625v1 [cs.LG] 22 Mar 2017 [email protected] ABSTRACT This paper describes a method for clustering data that are spread out over large regions and which dimensions are on different scales of measurement. Such an algorithm was developed to implement a robotics application consisting in sorting and storing objects in an unsupervised way. The toy dataset used to validate such application consists of Lego bricks of different shapes and colors. The uncontrolled lighting conditions together with the use of RGB color features, respectively involve data with a large spread and different levels of measurement between data dimensions. To overcome the combination of these two characteristics in the data, we have developed a new weighted K-means algorithm, called gap-ratio K-means, which consists in weighting each dimension of the feature space before running the K-means algorithm. The weight associated with a feature is proportional to the ratio of the biggest gap between two consecutive data points, and the average of all the other gaps. This method is compared with two other variants of K-means on the Lego bricks clustering problem as well as two other common classification datasets. K EYWORDS Unsupervised Learning, Weighted K-means, Scales of measurement, Robotics application 1. Introduction 1.1. Motivations In a relatively close future, we are likely to see industrial robots performing tasks on their own. In this perspective, we have developed a smart table cleaning application in which a robot sorts and store objects judiciously among the storage areas available. This clustering application can have different uses: workspaces can be organized before the workday, unsorted goods can be sorted before packaging, .... Even in domestic robotics, such an application, dealing with real objects, can be useful to perform household chores. As shown in Figure 1, a Kuka LBR iiwa collaborative robot equipped with a camera is presented a table cluttered with unsorted objects. Color and shape features of each object are extracted and the algorithm clusters the data in as many classes as there are storage bins. Once objects have been labelled with bin numbers, the robot physically cleans up the table. A better description of the experiment is given in the body of the article. This application was tested with Lego bricks of different colors and shapes (see section 4.2). A link to a demonstration video is given in the caption of Figure 1. Because such application is meant for ordinary environments, the clustering algorithm needs to be robust to unmastered light conditions, which is synonymous with widely spread datasets. Moreover, the features chosen are on different levels of measurement [1]: RGB-color features are interval type variables whereas lengths are on a ratio scale. Both these specificities of the clustering problem motivated the development of a new weighted K-means algorithm, which is the purpose of this paper. Figure 1: KUKA LBR iiwa performing the Lego bricks sorting application. Video at : https://www.youtube.com/watch?v=korkcYs1EHM 1.2. Introduction to the clustering problem The table cleaning problem described above boils down to a clustering problem [2,3]. Clustering is a subfield of Machine Learning also called unsupervised classification. Given an unlabelled dataset, the goal of clustering is to define groups among the entities. Members in one cluster should be as similar as possible to each other and as different as possible to other clusters members. In this paper, we are only concerned with parametric clustering, where the number of clusters is a fixed parameter passed to the algorithm. However, we note that recently, non-parametric Bayesian methods for clustering have been widely studied [4–6]. There are many possible definitions of similarity between data points. The choice of such definition, together with the choice of the metric to optimize, differentiates between the different clustering algorithms. The two surveys [7] and [8], give two slightly different classifications of the various clustering algorithms. After trying several clustering algorithms on simulated Lego bricks datasets using scikit-learn [9], K-means clustering 2. Preliminaries 2.1. K-means clustering 2.1.1. Notations All along this paper, we try to respect the following notations. The use of letters i represents indexing on data objects whereas letter j designates the features. Thus, • • • X = {x1 , ..., xi , ..., xM } represents the dataset to cluster, composed of M data points. F = {f1 , ..., fj , ..., fN } is the set of N features which characterize each data object. xij stands for the j th feature of object xi . A data object is represented by a vector in the feature space. Likewise, the use of letter k represents the different clusters and • C = {C1 , ..., Ck , ..., CK } is a set of K clusters. K-means clustering is based on the concept of centroids. Each cluster Ck , is represented by a cluster center, or centroid, denoted ck , which is simply a point in the feature space. We also introduce d, the function used to measure dissimilarity between a data object and a centroid. For K-means, such dissimilarity is quantified with Euclidean distance: v uN uX d(xi , ck ) = t (xij − ckj )2 . (1) j=1 2.1.2. Derivation Given a set of cluster centers c = {c1 , ..., ck , ..., cK }, cluster membership is defined by xi ∈ Cl ⇐⇒ d(xi , cl ) ≤ d(xi , ck ), ∀k ∈ {1, ..., K}. (2) The goal of K-means is to find the set of cluster centers c∗ which minimizes the sum of dissimilarities between each data object and its closest cluster center. Introducing the binary variable aik , which is 1 if xi belongs to Ck and 0 else, and the membership matrix A = (aik )i∈{1, ... M } . K-means can be written as an optimization problem: k∈{1, ... K} Minimize A, c subject to M X K X aik × d(xi , ck ), i=1 k=1 K X (3) aik = 1, ∀i ∈ {1, ..., M }, k=1 aik ∈ {0, 1}, ∀i, ∀k. In practice, (3) is optimized by solving iteratively two subproblems, one where the set c is fixed and one where A is fixed. The most widely used algorithm to implement K-means clustering is the Lloyd’s algorithm [10]. It is based on the method of Alternating Optimization [11], also used in the Expectation-Maximization algorithm [12]. The K-means optimization is composed of two main steps: • • The Expectation step (or E-step) : – Initial situation : centroids are fixed (i.e., c is fixed) – Action : Each data point in X is associated with a cluster following (2) (i.e., A is computed). The Maximization step (or M-step) : – Initial situation : Each data object is associated with a given cluster (i.e., A is fixed). – Action : For each cluster, the centroid that minimizes the total dissimilarity within the cluster is computed (i.e., c is computed). When the norm used for dissimilarity is the L2 norm, which is the case for K-means, it can be shown [13] that the M-step optimization is equivalent to computing the cluster mean: 1 ck = PM i=1 M X aik aik × xi . (4) i=1 2.1.3. Centroid initialization In order to start iterating between the expectation and maximization steps, initial centroids need to be defined. The choice of such initial cluster centers is crucial and motivates many research, as shown in the survey paper [14]. The idea is to choose the initial centroids among the data points. In our implementation, we use K-means++ algorithm [15] for clusters initialization (see Section 4.1). 2.1.4. Data normalization In most cases, running K-means algorithm on raw data does not work well. Indeed, features with largest scales are given more importance during dissimilarity calculation and clustering results are biased. To deal with this issue, a common practice is to normalize the data before running the clustering algorithm: xij − µj , ∀i, ∀j (5) xij ← σj Dataset 5200.0 Height (mm) Height (mm) 5200.0 5100.0 5000.0 4900.0 3.0 4.0 5.0 Width (m) Height (mm) 5200.0 6.0 Clustering without data normalization 5100.0 5000.0 4900.0 7.0 3.0 4.0 Clustering with data normalization 5.0 Width (m) 6.0 7.0 5100.0 5000.0 4900.0 3.0 4.0 5.0 Width (m) 6.0 7.0 Figure 2: Toy data set to illustrate the need for data normalization before K-means. where µj and σj represent respectively the empirical mean and variance of feature fj . The made-up, two dimensional toy dataset in Figure 2 illustrates the interest of using data normalization as a preprocessing to K-means. The two natural clusters in Figure 2 present similar mean and variance, but expressed in different units, which makes K-means results completely wrong without normalization. However, reducing each feature distribution to a Gaussian of variance 1 can involve a loss of valuable information for clustering. Weighted K-means [16] methods can solve such issue. The underlying idea is to capture with weights relevant information about important features. This information is reinjected in the data by multiplying each dimension with the corresponding weight after normalization. In this way, the most relevant features for clustering are enlarged and the others curtailed. In Sections 2.2.4 and 3, we propose two different weighted K-means methods: cv K-means [17] and a new method that we call gap-ratio K-means (gr K-means). These methods differ by the definition of the weights. We compare regular K-means, cv K-means and gr K-means experimentally in Section 4. 2.2. Weighted K-means 2.2.1. Issues with data normalization As explained above, data normalization is often necessary to obtain satisfactory clustering results, but involves a loss of information that can affect the quality of the clusters found. Weighted Kmeans is based on the idea that information about the data can be captured before normalization and reinjected in the normalized dataset. 2.2.2. Weighted K-means In a weighted K-means algorithm, weights are attributed to each feature, giving them different importance. Let us call wj the weight associated with feature fj . Then, the norm used in the E-step of weighted K-means is: v uN uX d(xi , ck ) = t wj (xij − ckj )2 j=1 The difference between weighted K-means algorithms lies in the choice of the weights. (6) 2.2.3. Exponential weighted K-means In this paper, we also propose an extension of weighted K-means that consists in raising the weights to the power of an integer p in the norm formula: v uN uX p d(xi , ck ) = t (7) w (xij − ckj )2 j j=1 By doing so, we emphasize even more the importance of features with large weights, which makes sense if the information captured by the weights is relevant. In practice, as the weights are between 0 and 1, p should not be too large to avoid considering only one feature. Influence of p in the clustering results is studied in Section 4. 2.2.4. A particular example : The cv K-means algorithm Weighted K-means based on coefficient of variation (cv K-means) [17] relies on the idea that the variance of a feature is an good indicator of its importance for clustering. Such approach makes sense, indeed, if two objects are of different nature because of a certain feature, the values of this feature come from different distributions, which increases the internal variance of the feature. In this way, the weights used for cv K-means are such that variance information is stored, so that it can be reinjected in the data after normalization. Hence, the cv weights are derived based on coefficient of variation, also called relative standard deviation. For a one dimensional dataset, it is defined by σ (8) cv = µ where µ and σ are respectively the mean and standard deviation of the dataset (computed empirically in practice). Then, coefficients of variation are normalized and weights are computed such that emphasis is placed on features with highest coefficient of variation: cvj wj = PN (9) cvj 0 j 0=1 cv K-means algorithm follows the same principle as regular K-means, but using norm (6) with weights (9) instead of norm (1). cv K-means assumes that a feature with high relative variance is more likely to involve objects being of different nature. Such approach works on several datasets but a highly noisy feature might have high variance and thwart cv K-means. However, on the original paper [17], authors test their algorithm on three well-known classification datasets (Iris, Wine and Balance scale) from UCI repository [18] and obtain better results than using regular K-means. 3. Gap ratio K-means 3.1. Interval scale issues To reason why cv weights do not fit the Lego bricks classification problem lies in the concept of levels of measurement [1]. More specifically, it comes from the difference between ratio scale and interval scale. Indeed, the notion of coefficient of variation only makes sense for data on a ratio scale and does not have any meaning for data on an interval scale. On an interval scale, it is not relevant to use coefficient of variation because when the mean decreases, the variance does not change accordingly. Therefore, at equal variance, features closer to zero have higher coefficients of variation for no reason, which biases the clustering process. In the table cleaning application defined above, the features chosen are colors (RGB) and lengths. RGB-colors are given by three variables, representing the amount of red, green and blue, distributed between 0 and 255. They are on an interval scale and thus should not be weighted using coefficient of variation. This duality in the features measurement scales motivated the development of gapratio weights, which is the purpose of this section. 3.2. the gr-K-means algorithm The idea behind gap-ratio K-means is fairly simple. When doing clustering, we want to distinguish if different feature values between two objects come from noise or from the fact that objects are of different nature. If we consider that the distribution of a certain feature differs between classes, this feature’s values should be more different between objects of different classes than between objects within a class. Gap-ratio weights come from this observation, their goal is to capture this information about the features. To formulate this concept mathematically, we sort the different values xij for each feature fj . Hence, for every j, we create a new data indexing, where integers i{j} are defined such that ∀j, xi{j}, j ≤ xi{j}0, j ⇔ i{j} ≤ i{j}0. (10) Then, we define the i{j}th gap of j th feature by: gi{j}, j = xi{j}+1, j − xi{j}, j (11) Obviously, if there are M data objects, there are M − 1 gaps for each feature. After computing all the gaps for feature fj , we define the biggest gap Gj and the average gap µgj as follows: Gj = max i{j}∈{1,...,M −1} µgj = 1 N gi{j},j , M −1 X gi{j},j , (12) i{j}=1 i{j}6=I{j} where I{j} is the index corresponding to Gj . Finally, we define the gap-ratio for feature fj by: grj = Gj . µgj (13) In other words, for a given feature, the gap ratio is the ratio between the highest gap and the mean of all other gaps. Then, as for cv K-means, gap-ratios are used to compute scaled weights: grj wj = PN j 0=1 grj 0 . (14) The dissimilarity measure for gr K-means is obtained by using weights (14) in (6). Likewise exponential cv K-means, we call exponential gr K-means the algorithm using dissimilarity measure (7) with weights (14). 3.3. Intuition behind gr K-means Figure 3 shows a simple two dimensional toy example where using gr weights is more appropriate than cv weights. In this example, the coefficient of variation along the x-axis is larger than for the y-axis. Indeed, mean values for both dimensions are approximately the same (around 10) whereas variance is higher for the x-axis. Thus, cv K-means focuses on the x-axis despite we can see it is not a good choice just by looking at the plots. The clusters found in the middle plot, together with the weights, confirm the wrong behavior of cv K-means. However, weights and groups obtained with gr K-means (bottom plot) indicate that the right information is stored in gap-ratio weights for such problem. The biggest gap along the y-axis is a lot bigger than average gaps whereas these two quantities are similar along the x-axis. dataset cv K-means clustering results 17.5 17.5 15.0 15.0 12.5 12.5 10.0 10.0 7.5 7.5 5.0 5.0 2.5 2.5 40 20 0 20 40 wx = 0.75 wy = 0.25 60 40 20 0 gr K-means clustering results 17.5 20 40 60 wx = 0.22 wy = 0.78 15.0 12.5 10.0 7.5 5.0 2.5 40 20 0 20 40 60 Figure 3: Comparison of cv K-means and gr K-means on a simple made up example. This is to illustrate cases where it seems more logical to deal with gaps rather than variances. 4. Experimental validation In the previous sections, we have introduced the K-means clustering method. We explained why data normalization is required and why it should not work on data with relatively high spread. Then, we presented cv K-means as a solution to capture important information about the data before normalization but showed that it is not compatible with interval scale data. Finally, we derived a new weighted K-means algorithm that should fit the kind of datasets we are interested in. In this section, we intend to validate the intuitive reasoning above. To do so, we compare the different weighted K-means algorithms (including regular K-means, with weights wj = 1, ∀j, and exponentiated weights) on different datasets. First, in Section 4.2, the Lego bricks dataset, used to demonstrate the table cleaning application, is clustered with the different methods. Then, in Section 4.3, two other famous classification datasets are used to investigate further the algorithms behaviors. 4.1. weighted K-means implementation In this validation section, we used the K-means implementation of scikit-learn [9], an open-source library, as is. This way, our results can be checked and further improvements can be tested easily. To implement weighted K-means algorithms, we also use scikit-learn implementation but on a modified dataset. After normalization, our data are transform using the following feature map: Φ : xij → √ ωj xij . (15) As the dissimilarity computation appears only in the E-step, the dataset modifications are equivalent to changing the norm. Indeed, (6) is the same as v uN uX √ √ d(xi , ck ) = t ( wj xij − wj ckj )2 . (16) j=1 By doing this, results obtained can be compared more reliably. Differences in the results is less likely to come from poor implementation as the K-means implementation used is always the same. 4.2. Results on the Lego classification problem 4.2.1. Experiment description The first dataset used to compare different algorithms is one composed of nine Lego bricks of different sizes and colors, as shown on Figure 4. As explained in the introduction, the original goal was to develop an intelligent robot table cleaning application that can choose where to store objects using clustering. Such application is tested by sorting sets of Lego bricks because it is easy and not subjective to draw natural classes and thus validate the robot choices. Figure 4 shows the kind of data sets we are dealing with, three classes can easily be found within these Lego bricks. Naturally, such set of bricks needs to be sorted within three boxes; the clustering algorithm needs to place the big green, small green and small red bricks in different bins. Furthermore, on Figure 4, we can see that among the four pictures, lighting varies a lot. Color features observed are really different between two runs of the application. The algorithm needs to be robust to poor lighting conditions and to be able to distinguish between red and green even when colors tend to be saturated (see bottom right image). A video showing the robot application running can be found at https://www.youtube.com/watch? v=korkcYs1EHM. Three different cases are illustrated: the one of Figure 4, one with a different object (not a Lego brick), and one with four natural classes with only three boxes. The experiment goes as follows: the robot sees all the objects to cluster and extract three color features (RGB) and two length features (length and width). Colors are extracted by averaging a square of pixels around the center of the brick. The dataset gathered is then passed to all variants of weighted K-means algorithms which return the classes assigned of each object. Finally, the robot physically sorts the objects (see video). For our experimental comparison of different algorithms, the experiment has been repeated 98 times with different arrangements of the Lego bricks presented on Figure 4, and with different lighting conditions. For each trial, if the algorithm misclassified one or more bricks, it is counted as a failure, else, it is a success. Figure 4: Data set to cluster under different light conditions. As explained in Section 4.2.2, clustering is tried with different weighted K-means algorithms but also with and without scaling. Different values of p for exponentiated weighted K-means are also tried. Figure 5 presents results obtained on the 98 trialsLego bricks datasets. The two left charts represent results on the original datasets and the right ones are results on the same dataset with a slight color modification. We removed 50 to the blue component of the bricks, which corresponds to using bricks of slightly different colors, in order to test the robustness of the algorithms. 4.2.2. Results interpretation Original dataset Scaling s ean K-m Scaling 96% 96% 96% 92% 19% Slightly modified dataset No scaling 92% 96% 96% 96% 83% 19% 3% s s ean ean -K m -K m gr cv No scaling s ean K-m s s ean ean -K m -K m gr cv ans s ean K-m gr e K-m cv s ean K-m s ean K-m gr s ean K-m cv s ean K-m 100.0 80.0 60.0 40.0 20.0 0.0 Original dataset cv K-means gr K-means Error rate (%) Error rate (%) Figure 5: Percentage of experiments with at least one misclassification. The experiment was run 98 times under different lightning conditions and with different layouts of the bricks. Error rates presented are averaged among these 98 runs. 1 2 3 4 5 6 7 8 9 1011121314 Weights exponent 100.0 80.0 60.0 40.0 20.0 0.0 Slightly modified dataset cv K-means gr K-means 1 2 3 4 5 6 7 8 9 1011121314 Weights exponent Figure 6: Exponent influence for Lego bricks clustering with exponentiated weighted K-means algorithms. We start by analyzing the influence of scaling the dataset. As we can see on Figure 5, without scaling (right column), error rates are all very large, around 95%. For this precise problem, Kmeans cannot perform good without a proper scaling of the dataset before running the clustering algorithm. Such observation makes sense as lengths (≈ 5cm) cannot be compared with colors (≈ 150) because they are totally differently scaled. K-means always put emphasis on data with the largest values (i.e., colors), which means that noise on the color has much more influence than different values of the length. Hence, for this practical example, we can assert that data scaling is required to have a decent classification. Then, let us compare the different algorithm. The first observation is that whatever preprocessing is used, regular K-means always results in very poor classification. One possible explanation for such bad behavior is the relatively high spread in the data (due to lighting conditions), which involve high variance in the features values and makes it difficult to differentiate between noise and true difference of nature. For this reason, emphasizing certain features is required and we can know compare cv and gr K-means. Looking at the left subplots of Figure 5, we can see that cv K-means performs particularly well on the original dataset. However, after little modifications, it falls into very bad behavior. Such issue with cv K-means comes from the fact that coefficient of variation is not appropriate for interval scale data. In other words, cv K-means can succeed on the original dataset only because the bricks used do not present RGB components too close to zero. On the other hand, gr K-means performs reasonably well (≈ 20% error rates), and is stable to dataset modifications. Another way to determine the relevance of the information stored in the weights is to look at different values of the exponent for exponentiated weighted K-means. Figure 6 shows such curves for both cv weights and gr weights with the original and the modified datasets. For gr weights, curves for both datasets are superimposable, gr K-means algorithm is insensitive to average values of the interval scaled features. As for cv K-means, it performs good under certain conditions (left figure) but is not robust to decreasing the mean value of one feature (bottom figure). Figure 6 left plot shows another interesting thing. For low value of p, cv K-means performs better than gr K-means (0% error rate for p = 3). Even if all we want is a certain exponent for which error is low, it is interesting to note that high exponents involve bad clustering results with cv weights. Such behavior shows that the weights are not so relevant because if they are given too much importance, clustering gets worse. On the other hand, with exponentiated gr K-means error rate tends to decrease when the exponent increases. Information carried by gr weights is good for such clustering problem and should be given more importance. Error rate falls to zero at p = 9 and remains stable to exponent increases until relatively high values of p (> 20); the balance between important components is well respected within the weights. For this kind of datasets, characterized by large spread, mixed scales of measurement and relatively independent features, exponentiated gr K-means with relatively high exponent seems to be a good solution for clustering. 4.3. Generalization to other data sets Gap-ratio weighted K-means was developed with Lego bricks classification task in mind, so it is not surprising that it performs good on such datasets. Now, we test this algorithm on other classification datasets of different nature to see how well it generalizes. Different weighted Kmeans methods are compared on two famous supervised learning datasets, so that we have labels to evaluate the clustering output. The two datasets chosen are the Fisher Iris dataset [19] and the Wine dataset, both taken from the UCI Machine Learning Repository [18]. Table 1 gives some important characteristics of both datasets. Table 1: Datasets descriptions. Dataset Number of instances Number of attributes Number of classes Is linearly separable? Data type Scale of measurement Iris 150 4 3 No Real Ratio Wine 178 13 3 Yes Real and Integers Ratio Table 2: Results on other data sets. IRIS DATASET Scaling No scaling K-means 17.05 % 10.67 % gr K-means 11.73 % 8.66 % cv K-means 4.12 % 5.62 % gr2 K-means 4.01 % 5.33 % cv2 K-means 4.01 % 4.12 % WINE DATASET Scaling No scaling K-means 3.36 % 29.78 % gr K-means 5.11 % 29.78 % cv K-means 7.01 % 29.78 % gr2 K-means 7.87 % 29.78 % cv2 K-means 7.30 % 29.78 % Error rates averaged over 1000 runs of the algorithms from different centroid initializations. gr2 and cv 2 denote the exponential versions of the algorithms (p = 2). Table 2 summarizes clustering results for both datasets, using all previously described implementations of different algorithms. For each configuration, we ran the algorithm 1000 times with different random initializations. The percentage reported in Table 2 corresponds to the average error rate over the different runs. We acknowledge that data normalization decreases errors for the Wine dataset but not for the Fisher Iris dataset. We explain such results by the fact that the values of the four Iris attributes are of the same order of magnitude. Hence, normalizing involves a loss of information that is not compensated by scaling the different features. Regarding the algorithms efficiency, For the Iris dataset, both gr and cv K-means implementations are better than regular K-means. Moreover, increasing the weights exponent improves the quality of the clustering. This means that both gap-ratio and coefficient of variation weights are able to capture the important information for clustering. However, for the Wine dataset, the best option is to stick to regular K-means. Finally, we also underline that for both K-means and cv K-means, we do not find the same results than in the original paper of cv K-means ([17]). Overall we obtain lower error rates. this might come from the K-means++ initialization, as in [17], all the points are initialized at random. In the conclusion, we propose a short recommendation section to help the reader selecting a weighted K-means algorithm given the properties of the dataset to cluster. 5. Conclusion 5.1. Recommendations Preprocessing the data by normalizing the features seems to be a good idea as long as the initial dimensions present different scales. On the other hand, if features already have the same order of magnitude, it is better to leave them unchanged, unless important information is already captured, with properly chosen weights for example. As for the choice of the algorithm, from what we have observed, we suggest to stick to regular K-means when your data appears to have high correlation and clusters do not come from only a few dimensions. This is more likely to happen with high dimensional data. In contrast, on relatively low dimensional data, it seems a smart idea to go for a weighted K-means algorithm. If patterns are to be found along isolated dimensions, gap-ratio seems to be a better indicator than coefficient of variation. However, for certain cases, such as Iris dataset, we acknowledged that cv K-means produces similar results. For data on different scales of measurement, cv K-means cannot be used and gap-ratio is the right choice; especially with wide spread data. Finally, regarding weights exponentiation, we found out that for linearly separable datasets, when weighted K-means makes improvements, it is better to raise the weights to a relatively high power. Information gathered in the weights is good and should be emphasized. However, the exponent should not be too large or the algorithm ends up considering a single feature. We should remain careful to avoid loosing the multidimensionality of the problem. The algorithm developed is a new approach for clustering data that are mixed between interval and ratio measurement scales and should be considered whenever facing such case. However, as for all other clustering problems, it works only for a certain range of problems and should not be used blindly. 5.2. Future work gr K-means - Regarding the gr K-means algorithm, we have several possibility of improvement in mind. First, combining data orthogonalization methods (such as ICA [20]) and gap-ratio indicator seems a promising idea and it might be fruitful to search in this direction. Indeed, gr weights are computed along different dimensions of the feature space and if features have strong correlation, gaps might disappear and variance might be spread along several dimensions. For this reason, it seems appealing to try to decorrelate data using orthogonalization methods. It could also be interesting to consider not only the largest gap along one dimension but also the next ones, according to the number of different classes desired. Indeed if within three classes the two separations come from the same features, even more importance should be given to this set of features. Some modifications of the equations in Section 3 should enable to try such approach. Automatic feature extraction - Regarding the table cleaning application which motivated this research, developing gr K-means enabled us to get the robot sorting judiciously Lego bricks, as well as other objects (see video). However, clustering is based on carefully selected features which are only valid for a range of objects. As a future research direction, we consider trying to develop the same application with automatic feature extraction, using transfer learning from a deep convolutional network trained on a large set of images [21]. Acknowledgements The authors would like to thank Dr. Harsh Gazula and Pr. Hamed Sari-Sarraf for their constructive reviews of this paper. References [1] S. S. Stevens, “On the theory of scales of measurement,” 1946. [2] S. Theodoridis and K. Koutroumbas, “Chapter 11-clustering: Basic concepts,” Pattern Recognition, pp. 595–625, 2006. [3] R. O. Duda, P. E. Hart, and D. G. Stork, “Unsupervised learning and clustering,” Pattern classification, pp. 519–598, 2001. [4] Z. Ghahramani, “Bayesian non-parametrics and the probabilistic approach to modelling,” Phil. Trans. R. Soc. A, vol. 371, no. 1984, p. 20110553, 2013. [5] S. J. Gershman and D. M. Blei, “A tutorial on bayesian nonparametric models,” Journal of Mathematical Psychology, vol. 56, no. 1, pp. 1–12, 2012. [6] D. M. Blei, T. L. Griffiths, and M. I. Jordan, “The nested chinese restaurant process and bayesian nonparametric inference of topic hierarchies,” Journal of the ACM (JACM), vol. 57, no. 2, p. 7, 2010. [7] R. Xu and D. Wunsch, “Survey of clustering algorithms,” IEEE Transactions on neural networks, vol. 16, no. 3, pp. 645–678, 2005. [8] P. Berkhin, “A survey of clustering data mining techniques,” in Grouping multidimensional data. Springer, 2006, pp. 25–71. [9] F. Pedregosa, G. Varoquaux, A. Gramfort, V. Michel, B. Thirion, O. Grisel, M. Blondel, P. Prettenhofer, R. Weiss, V. Dubourg, J. Vanderplas, A. Passos, D. Cournapeau, M. Brucher, M. Perrot, and E. Duchesnay, “Scikit-learn: Machine learning in Python,” Journal of Machine Learning Research, vol. 12, pp. 2825–2830, 2011. [10] S. Lloyd, “Least squares quantization in pcm,” IEEE transactions on information theory, vol. 28, no. 2, pp. 129–137, 1982. [11] J. C. Bezdek and R. J. Hathaway, Some Notes on Alternating Optimization. Berlin, Heidelberg: Springer Berlin Heidelberg, 2002, pp. 288–300. [Online]. Available: http://dx.doi.org/10.1007/3-540-45631-7 39 [12] A. P. Dempster, N. M. Laird, and D. B. Rubin, “Maximum likelihood from incomplete data via the em algorithm,” Journal of the royal statistical society. Series B (methodological), pp. 1–38, 1977. [13] S. Theodoridis and K. Koutroumbas, “Chapter 14-clustering algorithms iii: Schemes based on function optimization,” Pattern Recognition, pp. 701–763, 2006. [14] M. E. Celebi, H. A. Kingravi, and P. A. Vela, “A comparative study of efficient initialization methods for the k-means clustering algorithm,” Expert Systems with Applications, vol. 40, no. 1, pp. 200–210, 2013. [15] D. Arthur and S. Vassilvitskii, “k-means++: The advantages of careful seeding,” in Proceedings of the eighteenth annual ACM-SIAM symposium on Discrete algorithms. Society for Industrial and Applied Mathematics, 2007, pp. 1027–1035. [16] X. Chen, W. Yin, P. Tu, and H. Zhang, “Weighted k-means algorithm based text clustering,” in Information Engineering and Electronic Commerce, 2009. IEEC’09. International Symposium on. IEEE, 2009, pp. 51–55. [17] S. Ren and A. Fan, “K-means clustering algorithm based on coefficient of variation,” in Image and Signal Processing (CISP), 2011 4th International Congress on, vol. 4. IEEE, 2011, pp. 2076–2079. [18] M. Lichman, “UCI machine learning repository,” http://archive.ics.uci.edu/ml 2013. [Online]. Available: [19] R. A. Fisher, “The use of multiple measurements in taxonomic problems,” Annals of eugenics, vol. 7, no. 2, pp. 179–188, 1936. [20] E. Oja and A. Hyvarinen, “A fast fixed-point algorithm for independent component analysis,” Neural computation, vol. 9, no. 7, pp. 1483–1492, 1997. [21] J. Donahue, Y. Jia, O. Vinyals, J. Hoffman, N. Zhang, E. Tzeng, and T. Darrell, “Decaf: A deep convolutional activation feature for generic visual recognition.” in ICML, 2014, pp. 647–655.
8cs.DS
arXiv:1710.09951v2 [cs.LO] 1 Nov 2017 PROBABILISTIC COUPLINGS FOR PROBABILISTIC REASONING Justin Hsu A DISSERTATION in Computer and Information Science Presented to the Faculties of the University of Pennsylvania in Partial Fulfillment of the Requirements for the Degree of Doctor of Philosophy 2017 Dissertation Supervisors Benjamin C. Pierce Aaron Roth Graduate Group Chairperson Lyle Ungar Dissertation Committee Gilles Barthe Sampath Kannan Val Tannen Steve Zdancewic Copyright © 2017 Justin Hsu Typeset in Charter and Math Design with LATEX. Latest version hosted at https://arxiv.org/abs/1710.09951. For my family, for my teachers. Acknowledgments It takes a village, as they say. I am extremely fortunate to have two amazing advisers: Benjamin Pierce, who taught me to ponder slowly, and Aaron Roth, who taught me to think rapidly. This thesis would not have existed without Gilles Barthe, serving as a third, unofficial adviser. Gilles hosted me during two highly productive summers at the IMDEA Software Institute in Madrid and remains an inspiring (and boundless) source of energy and enthusiasm. He and his longtime collaborators, Pierre-Yves Strub and Benjamin Grégoire, provided a wealth of technical expertise and a theoretical setting that turned out to be far richer than anyone had thought. The strong theory and formal methods faculty at Penn, including Sanjeev Khanna, Stephanie Weirich, Michael Kearns, Steve Zdancewic, Sampath Kannan, Val Tannen, Sudipto Guha, and Rajeev Alur, have taught me more than I can hope to remember. I am also indebted to Marco Gaboardi and Emilio Jesús Gallego Arias for launching me to the research frontiers. Other fellow students and postdocs, including Arthur Azevedo de Amorim, Rachel Cummings, Michael Greenberg, Radoslav Ivanov, Shahin Jabbari, Matthew Joseph, Jamie Morgenstern, Christine Rizkallah, Ryan Rogers, Nikos Vasilakis, and Steven Wu, kept morale at a good level, to say the least. At Stanford, Greg Lavender’s one-off course on Haskell gave me my first glimpse of programming languages as an intellectual field. Without that formative experience, I never would have gone on to graduate school in computer science. Finally, I am deeply grateful for the constant support and encouragement from my parents Joyce and David, my sister Tammy, and the rest of my family. London, UK November 2, 2017 Abstract This thesis explores proofs by coupling from the perspective of formal verification. Long employed in probability theory and theoretical computer science, these proofs construct couplings between the output distributions of two probabilistic processes. Couplings can imply various probabilistic relational properties, guarantees that compare two runs of a probabilistic computation. To give a formal account of this clean proof technique, we first show that proofs in the program logic P RHL (probabilistic Relational Hoare Logic) describe couplings. We formalize couplings that establish various probabilistic properties, including distribution equivalence, convergence, and stochastic domination. Then we deepen the connection between couplings and PRHL by giving a proofs-as-programs interpretation: a coupling proof encodes a probabilistic product program, whose properties imply relational properties of the original two programs. We design the logic ×PRHL (product PRHL) to build the product program, with extensions to model more advanced constructions including shift coupling and path coupling. We then develop an approximate version of probabilistic coupling, based on approximate liftings. It is known that the existence of an approximate lifting implies differential privacy, a relational notion of statistical privacy. We propose a corresponding proof technique—proof by approximate coupling—inspired by the logic APRHL, a version of PRHL for building approximate liftings. Drawing on ideas from existing privacy proofs, we extend APRHL with novel proof rules for constructing new approximate couplings. We give approximate coupling proofs of privacy for the Report-noisy-max and Sparse Vector mechanisms, well-known algorithms from the privacy literature with notoriously subtle privacy proofs, and produce the first formalized proof of privacy for these algorithms in APRHL. Finally, we enrich the theory of approximate couplings with several more sophisticated constructions: a principle for showing accuracy-dependent privacy, a generalization of the advanced composition theorem from differential privacy, and an optimal approximate coupling relating two subsets of samples. We also show equivalences between approximate couplings and other existing definitions. These ingredients support the first formalized proof of privacy for the Between Thresholds mechanism, an extension of the Sparse Vector mechanism. Contents 1 Introduction 1.1 Challenges in probabilistic reasoning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Couplings and relational properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.3 A formal study of proofs by coupling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Couplings à la formal verification 2.1 Mathematical preliminaries . . . . 2.2 A formal logic for coupling proofs 2.3 Constructing couplings, formally 2.4 Related work . . . . . . . . . . . . . 1 1 2 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 5 11 19 24 3 From coupling proofs to product programs 3.1 The core logic ×PRHL . . . . . . . . . . . . . . 3.2 An asynchronous loop rule . . . . . . . . . . . 3.3 Soundness of the logic . . . . . . . . . . . . . . 3.4 Proving probabilistic convergence . . . . . . . 3.5 Shift couplings . . . . . . . . . . . . . . . . . . 3.6 Path couplings . . . . . . . . . . . . . . . . . . . 3.7 Comparison with existing product programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 25 29 31 31 34 37 43 4 Approximate couplings for differential privacy 4.1 Differential privacy preliminaries . . . . . . . 4.2 Approximate liftings . . . . . . . . . . . . . . . 4.3 The program logic APRHL . . . . . . . . . . . . 4.4 Proof by approximate coupling . . . . . . . . 4.5 New couplings for the Laplace distribution . 4.6 Pointwise privacy . . . . . . . . . . . . . . . . . 4.7 Coupling proofs of privacy . . . . . . . . . . . 4.8 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 44 46 52 55 56 59 61 69 5 Advanced approximate couplings 5.1 Equivalence with Sato’s approximate lifting . 5.2 Accuracy-dependent approximate couplings 5.3 Optimal subset coupling . . . . . . . . . . . . . 5.4 Advanced coupling composition . . . . . . . . 5.5 Proving privacy for Between Thresholds . . . 5.6 Comparison to other approximate liftings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 . 73 . 81 . 86 . 90 . 97 . 103 . . . . . . . . . . . . . . . . . . . . . . . . 6 Emerging directions 6.1 Concurrent developments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2 Promising directions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.3 Bridging two theories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 109 112 114 A Soundness of ×PRHL 115 B Soundness of APRHL 126 Bibliography 131 List of Figures 2.1 2.2 2.3 2.4 Semantics of programs Two-sided PRHL rules One-sided PRHL rules Structural PRHL rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 16 17 18 3.1 3.2 3.3 3.4 Two-sided ×PRHL rules . . . . . . . . . . . . . . . . One-sided ×PRHL rules . . . . . . . . . . . . . . . . Structural ×PRHL rules . . . . . . . . . . . . . . . . Asynchronous loop rule [WHILE-GEN] for ×PRHL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 28 29 29 4.1 4.2 4.3 4.4 4.5 4.6 Two-sided APRHL rules . . . . . . . . . . . . One-sided APRHL rules . . . . . . . . . . . . Structural APRHL rules . . . . . . . . . . . . New Laplace rules for APRHL . . . . . . . . . Pointwise equality rule [PW-EQ] for APRHL Sparse Vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 55 56 56 60 65 5.1 5.2 5.3 5.4 5.5 5.6 5.7 Up-to-bad rules for APRHL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . One-sided conjunction rules for APRHL . . . . . . . . . . . . . . . . . . . . . . Laplace accuracy bounds in APRHL . . . . . . . . . . . . . . . . . . . . . . . . Interval coupling rule [LAPINT] for APRHL . . . . . . . . . . . . . . . . . . . . Conversion rules between symmetric and standard judgments for APRHL . Advanced composition rule [WHILE-AC] for APRHL . . . . . . . . . . . . . . Between Thresholds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 85 85 88 95 96 98 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 1 Introduction Randomized algorithms have long stimulated the imagination of computer scientists. Endowed with the power to draw random samples, these algorithms provide sophisticated guarantees far beyond the reach of deterministic computations. However, their proofs of correctness are often highly intricate, employing specialized techniques to reason about randomness. This thesis investigates one such tool—probabilistic coupling—for proving probabilistic relational properties, which compare executions of two randomized algorithms. Couplings are a familiar concept in probability theory and theoretical computer science, where they support a proof technique called proof by coupling. We explore the reasoning principle behind these proofs, identifying their theoretical underpinnings, clarifying their structure, and enabling formal verification. 1.1 Challenges in probabilistic reasoning While probabilistic programs aren’t much harder to express than their deterministic counterparts, they are significantly more challenging to reason about. To see why, suppose we want to prove a property about the output of an algorithm for all inputs. In a deterministic algorithm, each concrete input produces a single trace through the program. Since different paths correspond to distinct inputs, we can freely group similar traces together and reason about each group on its own. The code of the algorithm naturally guides the proof: at a branching instruction, for instance, we may classify the executions according to the path they take and then consider each behavior separately. In this way, we can reason about a complex program by focusing on simpler cases. For randomized algorithms, this neat picture is considerably more complicated. A single execution now comprises multiple traces, each with its own probability. Relations between trace probabilities make it difficult to reason about paths separately. At a conditional statement, for instance, the execution has some probability of taking the first branch and some probability of taking the second branch; in a sense, the computation takes both branches. If we reason about these two cases in isolation, we must track the probabilities of each branch in order to join the cases when the paths later merge. This is challenging even for small programs, as a path’s probability can have complex dependencies on the input and on the probabilities of other possible traces. If we instead reason about both behaviors together, we must provide a single analysis for executions that behave quite differently. Broadly speaking, then, a central challenge of probabilistic reasoning is to organize the various execution behaviors into manageable cases while cleanly tracking the relationship across different groups. To tackle this problem, researchers in randomized algorithms have crafted a rich array of conceptual tools to construct their proofs, simplifying arguments by cleverly abstracting away uninteresting technical details. Also known as proof techniques, these instruments can be sophisticated and highly specialized—often tailored to a single property, as a kind of logical scalpel—but the most useful ones strike a fine balance: specific enough to pare logical arguments down to just their essential points, general enough to support proofs for a broad class of properties. A proof 1 CHAPTER 1. INTRODUCTION 2 technique is a reusable component for analyzing algorithms, and is as much of an intellectual contribution as any new proof or algorithm. 1.2 Couplings and relational properties In this thesis we explore a proof technique for probabilistic relational properties, guarantees comparing the runs of two randomized algorithms. Such properties are commonplace in computer science and probability theory. Examples include: • Probabilistic equivalence: two probabilistic programs produce equal distributions. • Stochastic domination: one probabilistic program is more likely than another to produce large outputs. • Convergence (also mixing): the output distributions of two probabilistic loops approach each other as the loops execute more iterations. • Indistinguishability (also differential privacy): the output distributions of two probabilistic programs are close together. For instance, differential privacy requires that two similar inputs—say, the real private database and a hypothetical version with one individual’s data omitted—yield similar output distributions. • Truthfulness (also Nash equilibrium): an agent’s average utility is larger when reporting an honest value instead of deviating to a misleading value. At first glance, relational properties appear to be even harder to establish than standard, non-relational properties— instead of analyzing a single probabilistic computation, we now need to deal with two. (Indeed, any property of a single program can be viewed as a relational property between the target program and the trivial, do-nothing program.) However, relational properties often relate two highly similar programs, even comparing the same program on two possible inputs. In these cases, we can leverage a powerful abstraction and an associated proof technique from probability theory—probabilistic coupling and proof by coupling. The fundamental observation is that probabilistic relational properties compare computations in two different worlds, assuming no particular correlation between random samples. Accordingly, we may freely assume any correlation we like for the purposes of the proof—a relational property holds (or doesn’t hold) regardless of which one we pick. For instance, if two programs generate identical output distributions, this holds whether they share coin flips or take independent samples; relational properties don’t require that the two programs use separate randomness. By carefully arranging the correlation, we can reason about two executions as if they were linked in some convenient way. To take advantage of this freedom, we need some way to design specific correlations between program executions. In principle, this can be a highly challenging task. The two runs may take samples from different distributions, and it is unclear exactly how they can or should share randomness. When the two programs have similar shapes, however, we can link two computations in a step-by-step fashion. First, correlations between intermediate samples can be described by probabilistic couplings, joint distributions over pairs. For example, a valid coupling of two fair coin flips could specify that the draws take opposite values; the correlated distribution would produce “(heads, tails)” and “(tails, heads)” with equal probability. A coupling formalizes what it means to share randomness: a single source of randomness simulates draws from two distributions. Since randomness can be shared in different ways, two distributions typically support a variety of distinct couplings. A proof by coupling, then, describes two correlated executions by piecing together couplings for corresponding pairs of sampling instructions. In the course of a proof, we can imagine stepping through the two programs in parallel, selecting couplings along the way. For instance, if we apply the opposite coupling to link a coin flip in one program with a coin flip in the other, we may assume the samples remain opposite when analyzing the rest of the programs. By flowing these relations forward from two initial inputs, a proof by coupling can focus on just CHAPTER 1. INTRODUCTION 3 pairs of similar executions as it builds up to a coupling between two output distributions. This is the main product of the proof: features of the final coupling imply properties about the output distributions, and hence relational properties about the original programs. Working in tandem, couplings and proofs by couplings can simplify probabilistic reasoning in several ways. • Reduce to one source of randomness. By analyzing two runs as if they shared a single source of randomness, we can reason about two programs as if they were one. • Abstract away probabilities. Proofs by coupling isolate probabilistic reasoning from the non-probabilistic parts of the proof, which are more straightforward. We only need to think about probabilistic aspects when we select couplings at the sampling instructions; throughout the rest of the programs, we can reason purely in terms of deterministic relations between the two runs. • Enable compositional, structured reasoning. By focusing on each step of an algorithm individually and then smoothly combining the results, the coupling proof technique enables a highly modular style of reasoning guided by the code of the program. Proofs by coupling are also surprisingly flexible; many probabilistic relational properties, including the examples listed above, can be proved in this way. Individual couplings can also be combined in various subtle ways, giving rise to a rich diversity of coupling proofs. 1.3 A formal study of proofs by coupling While couplings proofs originate from probability theory as a tool for human reasoning, formal verification will be the setting for our investigation. Our perspective affords two distinct advantages. • The theory of formal verification provides a wealth of concepts to precisely describe and analyze proof systems. By studying coupling proofs in these terms, we can give a fresh understanding of this classical proof technique. As a consequence, we can extend proofs by coupling to target new guarantees, unifying seemingly unrelated properties and simplifying their proofs. • Formal verification systems provide a natural domain to apply our insights. First, couplings enable clean proofs for properties that are traditionally challenging for computers to verify. Existing techniques can also be considered in a new light, clarifying why certain features are useful and revealing possible enhancements. The technical chapters of this thesis fall into two parts. Chapters 2 and 3 concern probabilistic couplings, while Chapters 4 and 5 investigate approximate couplings. General themes and intuitions developed in the first half influence the second half, but the two parts are largely self-contained and can be read independently. Chapter 2 begins our study of probabilistic couplings in formal verification. We observe that the program logic PRHL (probabilistic Relational Hoare Logic), originally proposed by Barthe, Grégoire, and Zanella-Béguelin (2009) for verifying proofs of cryptographic security, is in fact a logic for formally constructing probabilistic couplings. Using this connection, we formalize classical coupling proofs establishing equivalence, convergence, and stochastic domination of probabilistic processes. Chapter 3 deepens our correspondence between couplings and PRHL. First, coupling proofs describe how to meld two probabilistic programs into a single program; in formal verification, such a construction is known as a product program. Accordingly, we show that PRHL proofs encode a novel kind of product program called the coupled product, reflecting the structure of a coupling proof. This idea recalls a central theme in logic and computer science: formal proofs can be interpreted as computations, a so-called proofs-as-programs or Curry-Howard correspondence. Concretely, we extend PRHL to a logic ×PRHL (product PRHL) that constructs the product program alongside the coupling proof. Then, we design a new loop rule inspired by shift coupling, a way to build couplings asynchronously. CHAPTER 1. INTRODUCTION 4 As applications, we formalize rapid mixing for several Markov chains. Our approach can also capture a simplified version of the path coupling technique introduced by Bubley and Dyer (1997). Chapter 4 turns our focus to a generalization of couplings: approximate couplings. These couplings are closely related to differential privacy, a quantitative, relational property modeling statistical privacy. We begin with a candidate definition of approximate coupling, refining several existing notions. We then reverse-engineer a corresponding proof technique called proof by approximate coupling from the program logic APRHL, an approximate version of PRHL proposed by Barthe, Köpf, Olmedo, and Zanella-Béguelin (2013c). Taking inspiration from this proof technique, we show how two new approximate couplings of the Laplace distribution and a construction called pointwise equality enable an approximate coupling proof of privacy for the Report-noisy-max and Sparse Vector mechanisms. Our proofs are simpler than existing proofs—which were notoriously difficult to get right (Lyu, Su, and Li, 2017)—and extend to natural variants of the algorithms. We realize our proof in an extension of AP RHL, arriving at the first formalized privacy proofs for these mechanisms. Chapter 5 presents a handful of advanced constructions for approximate couplings: (i) a principle for proving accuracy-dependent privacy; (ii) a construction for linking two subsets of samples; and (iii) a composition principle generalizing the advanced composition theorem from differential privacy. We also clarify the landscape of existing definitions by proving equivalences between approximate couplings and prior notions of approximate equivalence. Combining these ingredients, we give a proof by approximate coupling establishing differential privacy for the Between Thresholds mechanism by Bun, Steinke, and Ullman (2017). After extending APRHL with several rules corresponding to our constructions, we achieve the first formalized privacy proof for this algorithm. Chapter 6 surveys concurrent work on couplings and formal verification, outlining promising directions for further developing the theory and application of proofs by coupling. A note about mechanical verification. The gold standard in formal verification is mechanized proof, where every step has been fully computer-checked. The logics we will develop are highly suitable for computer verification, due to their highly structured proofs, but we do not mechanically verify coupling proofs as part of this thesis. Instead, we will describe formalized proofs in the logic on paper. Prototype implementations in the EASYCRYPT framework (Barthe, Dupressoir, Grégoire, Kunz, Schmidt, and Strub, 2013b) can machine-check versions of the coupling proofs we will see (see, e.g., Barthe et al. (2013c) and Buch (2017)), but the current implementations are not precisely aligned with our logics. Acknowledgments. The technical content of this thesis draws on a fruitful collaboration with Gilles Barthe, Thomas Espitau, Noémie Fong, Marco Gaboardi, Benjamin Grégoire, Tetsuya Sato, Léo Stefanesco and Pierre-Yves Strub. Chapter 2 is based on Barthe, Espitau, Grégoire, Hsu, Stefanesco, and Strub (2015a), Chapter 3 includes material from Barthe, Grégoire, Hsu, and Strub (2017d), Chapter 4 distills results first appearing in Barthe, Gaboardi, Grégoire, Hsu, and Strub (2016c), and Chapter 5 presents material from Barthe, Fong, Gaboardi, Grégoire, Hsu, and Strub (2016a) and Barthe, Espitau, Hsu, Sato, and Strub (2017c). The author contributed the bulk of the work towards the results in this thesis. Chapter 2 Couplings à la formal verification To begin our formal investigation of coupling proofs, we first provide the necessary mathematical background (Section 2.1), and then draw a deep connection between coupling proofs and the program logic PRHL (Section 2.2); this observation is the principal conceptual contribution of this chapter and forms the foundation for the entire thesis. We show how to formalize several examples of couplings (Section 2.3), and discuss related work on relational program logics and probabilistic liftings (Section 2.4). 2.1 Mathematical preliminaries A discrete probability distribution associates each element of a set with a number in [0, 1], representing its probability. In order to model programs that may not terminate, we work with a slightly more general notion called a sub-distribution. Definition 2.1.1. A (discrete) sub-distribution over a countable set A is a map µ : A → [0, 1] taking each element of A to a numeric weight such that the weights sum to at most 1: X µ(a) ≤ 1. a∈A We write SDistr(A) for the set of all sub-distributions over A. When the weights sum to 1, we call µ a proper distribution; we write Distr(A) for the set of all proper distributions over A. The empty or null sub-distribution ⊥ assigns weight 0 to all elements. We work with discrete sub-distributions throughout. While this is certainly a restriction—excluding, for instance, standard distributions over the real numbers—many interesting coupling proofs can already be expressed in our setting. Where necessary, we will use discrete versions of standard, continuous distributions. Our results should mostly carry over to the continuous setting, as couplings are frequently used on continuous distributions in probability theory, but the general case introduces measure-theoretic technicalities (e.g., working with integrals rather than sums, checking sets are measurable, etc.) that would distract from our primary focus. We discuss this issue further in Chapter 6. We need several concepts and notations related to discrete distributions. First, the probability of a set S ⊆ A: X µ(S ) ¬ µ(a). a∈S The support of a sub-distribution is the set of elements with positive probability: supp(µ) ¬ {a ∈ A | µ(a) > 0}. 5 CHAPTER 2. COUPLINGS À LA FORMAL VERIFICATION 6 The weight of a sub-distribution is the total probability of all elements: X |µ| ¬ µ(a). a∈A Sub-distributions can be ordered pointwise: µ1 ≤ µ2 if µ1 (a) ≤ µ2 (a) for every element a ∈ A. Finally, given a function f : A → B where B is numeric (like the integers or the reals), its expected value over a sub-distribution µ is X f (a) · µ(a). E[ f ] ¬ E [ f (a)] ¬ µ a∼µ a∈A Under light assumptions, the expected value is guaranteed to exist (for instance, when f is a bounded function). To transform sub-distributions, we can lift a function f : A → B on sets to a map f ] : SDistr(A) → SDistr(B) via f ] (µ)(b) ¬ µ( f −1 (b)). For example, let p1 : A1 × A2 → A1 and p2 : A1 × A2 → A2 be the first and second projections from a pair. The corresponding probabilistic projections π1 : SDistr(A1 × A2 ) → SDistr(A1 ) and π2 : SDistr(A1 × A2 ) → SDistr(A2 ) are defined by X ] π1 (µ)(a1 ) ¬ p1 (µ)(a1 ) = µ(a1 , a2 ) a2 ∈A2 π2 (µ)(a2 ) ¬ ] p2 (µ)(a2 ) = X µ(a1 , a2 ). a1 ∈A1 We call a sub-distribution µ over pairs a joint sub-distribution, and the projected sub-distributions π1 (µ) and π2 (µ) the first and second marginals, respectively. Probabilistic couplings and liftings A probabilistic coupling models two distributions with a single joint distribution. Definition 2.1.2. Given µ1 , µ2 sub-distributions over A1 and A2 , a sub-distribution µ over pairs A1 × A2 is a coupling for (µ1 , µ2 ) if π1 (µ) = µ1 and π2 (µ) = µ2 . Generally, couplings are not unique—different witnesses represent different ways to share randomness between two distributions. To give a few examples, we first introduce some standard distributions. Definition 2.1.3. Let A be a finite, non-empty set. The uniform distribution over A, written Unif(A), assigns probability 1/|A| to each element. We write Flip for the uniform distribution over booleans, the distribution of a fair coin flip. Example 2.1.4 (Couplings from bijections). We can give two distinct couplings of (Flip, Flip): Identity coupling: ¨ µid (a1 , a2 ) ¬ 1/2 0 : a1 = a2 : otherwise. 1/2 0 : ¬a1 = a2 : otherwise. Negation coupling: ¨ µ¬ (a1 , a2 ) ¬ More generally, any bijection f : A → A yields a coupling of (Unif(A), Unif(A)): ¨ 1/|A| : f (a1 ) = a2 µ f (a1 , a2 ) ¬ 0 : otherwise. CHAPTER 2. COUPLINGS À LA FORMAL VERIFICATION 7 This coupling matches samples: each sample a from the first distribution is paired with a corresponding sample f (a) from the second distribution. To take two correlated samples from this coupling, we can imagine first sampling from the first distribution, and then applying f to produce a sample for the second distribution. When f is a bijection, this gives a valid coupling for two uniform distributions: viewed separately, both the first and second correlated samples are distributed uniformly. For more general distributions, if a1 and a2 have different probabilities under µ1 and µ2 then the correlated distribution cannot return (a1 , −) and (−, a2 ) with equal probabilities; for instance, a bijection with f (a1 ) = a2 would not give a valid coupling. However, general distributions can be coupled in other ways. Example 2.1.5. Let µ be a sub-distribution over A. The identity coupling of (µ, µ) is ¨ µ(a) : a1 = a2 = a µid (a1 , a2 ) ¬ 0 : otherwise. Sampling from this coupling yields a pair of equal values. Example 2.1.6. Let µ1 , µ2 be sub-distributions over A1 and A2 . The independent or trivial coupling is µ× (a1 , a2 ) ¬ µ1 (a1 ) · µ2 (a2 ). This coupling models µ1 and µ2 as independent distributions: sampling from this coupling is equivalent to first sampling from µ1 and then pairing with a fresh draw from µ2 . The coupled distributions must be proper in order to ensure the marginal conditions. Since any two proper distributions can be coupled by the trivial coupling, the mere existence of a coupling yields little information. Couplings are more useful when the joint distribution satisfies additional conditions, for instance when all elements in the support satisfy some property. Definition 2.1.7 (Lifting). Let µ1 , µ2 be sub-distributions over A1 and A2 , and let R ⊆ A1 × A2 be a relation. A sub-distribution µ over pairs A1 × A2 is a witness for the R-lifting of (µ1 , µ2 ) if: 1. µ is a coupling for (µ1 , µ2 ), and 2. supp(µ) ⊆ R. If there exists µ satisfying these two conditions, we say µ1 and µ2 are related by the lifting of R and write µ1 R] µ2 . We typically express R using set notation, i.e., R = {(a1 , a2 ) ∈ A1 × A2 | Φ(a1 , a2 )} where Φ is a logical formula. When Φ is a standard mathematical relation (e.g., equality), we leave A1 and A2 implicit and just write Φ, sometimes enclosed by parentheses (Φ) for clarity. Example 2.1.8. Many of the couplings we saw before are more precisely described as liftings. Bijection coupling. For a bijection f : A → A, the coupling in Example 2.1.4 witnesses the lifting Unif(A) {(a1 , a2 ) | f (a1 ) = a2 }] Unif(A). Identity coupling. The coupling in Example 2.1.5 witnesses the lifting µ (=)] µ. CHAPTER 2. COUPLINGS À LA FORMAL VERIFICATION 8 Trivial coupling. The coupling in Example 2.1.6 witnesses the lifting µ1 >] µ2 . (> ¬ A1 × A2 is the trivial relation relating all pairs of elements.) Liftings were originally introduced in research on probabilistic bisimulation, a technique for verifying equivalence of two probabilistic transition systems. By viewing liftings as a particular kind of coupling, we can repurpose verification tools to prove new properties by constructing couplings, while leveraging ideas from the coupling literature to enrich existing systems. Before we get to that, let’s see how the existence of a coupling can imply useful probabilistic properties. Useful consequences of couplings and liftings If there exists a coupling µ between (µ1 , µ2 ) satisfying certain properties, we can deduce probabilistic properties about µ1 and µ2 . First of all, two coupled distributions have equal weight. Proposition 2.1.9 (Equality of weight). Suppose µ1 and µ2 are sub-distributions over A such that there exists a coupling µ of µ1 and µ2 . Then |µ1 | = |µ2 |. This follows because µ1 and µ2 are both projections of µ, and projections preserve weight. Couplings can also show that two distributions are equal. Proposition 2.1.10 (Equality of distributions). Suppose µ1 and µ2 are sub-distributions over A. Then µ1 = µ2 if and only if there is a lifting µ1 (=)] µ2 . Proof. For the forward direction, define µ(a, a) ¬ µ1 (a) = µ2 (a) and µ(a1 , a2 ) ¬ 0 otherwise. Evidently, µ has support in the equality relation (=) and also has the desired marginals: π1 (µ) = µ1 and π2 (µ) = µ2 . Thus µ is a witness to the desired lifting. For the reverse direction, let the witness be µ. By the support condition, π1 (µ)(a) = π2 (µ)(a) for every a ∈ A. Since the left and right sides are equal to µ1 (a) and µ2 (a) respectively by the marginal conditions, µ1 (a) = µ2 (a) for every a. So, µ1 and µ2 are equal. In some cases we can show results in the converse direction: if a property of two distributions holds, then there exists a particular lifting. To give some examples, we first introduce a powerful equivalence due to Strassen (1965). Theorem 2.1.11. Let µ1 , µ2 be sub-distributions over A1 and A2 , and let R be a binary relation over A1 and A2 . Then the lifting µ1 R] µ2 implies µ1 (S1 ) ≤ µ2 (R(S1 )) for every subset S1 ⊆ A1 , where R(S1 ) ⊆ A2 is the image of S1 under R: R(S1 ) ¬ {a2 ∈ A2 | ∃a1 ∈ A1 , (a1 , a2 ) ∈ R}. (For instance, if A1 = A2 = N and R is the relation ≤, then R(S ) is the set of all natural numbers larger than min S .) The converse holds if µ1 and µ2 have equal weight. Strassen proved Theorem 2.1.11 for continuous (proper) distributions using deep results from probability theory. In our discrete setting, there is an elementary proof by the maximum flow-minimum cut theorem; the proof also establishes a mild generalization to sub-distributions. So as not to interrupt the flow here, we defer details of the proof to Chapter 5. For now, we use this theorem to illustrate a few more useful consequences of liftings. For starters, couplings can bound the probability of an event in the first distribution by the probability of an event in the second distribution. CHAPTER 2. COUPLINGS À LA FORMAL VERIFICATION 9 Proposition 2.1.12. Suppose µ1 , µ2 are sub-distributions over A1 and A2 respectively, and consider two subsets S1 ⊆ A1 and S2 ⊆ A2 . The lifting µ1 {(a1 , a2 ) | a1 ∈ S1 → a2 ∈ S2 }] µ2 implies µ1 (S1 ) ≤ µ2 (S2 ). The converse holds when µ1 and µ2 have equal weight. Proof. Let R be the relation {(a1 , a2 ) | a1 ∈ S1 → a2 ∈ S2 }. The forward direction is immediate by Theorem 2.1.11, taking the subset S1 . For the reverse direction, consider any non-empty subset T1 ⊆ A1 . If T1 is not contained in S1 , then R(T1 ) = A2 and µ1 (T1 ) ≤ µ2 (R(T1 )) since µ1 and µ2 have equal weight. Otherwise R(T1 ) = S2 , so µ1 (T1 ) ≤ µ1 (S1 ) ≤ µ2 (S2 ) = µ2 (R(T1 )). Theorem 2.1.11 gives the desired lifting: µ1 {(a1 , a2 ) | a1 ∈ S1 → a2 ∈ S2 }] µ2 . A slightly more subtle consequence is stochastic domination, an order on distributions over an ordered set. Definition 2.1.13. Let (A, ≤A ) be an ordered set and suppose µ1 , µ2 are sub-distributions over A. We say µ2 stochastically dominates µ1 , denoted µ1 ≤sd µ2 , if µ1 ({a ∈ A | k ≤A a}) ≤ µ2 ({a ∈ A | k ≤A a}) for every k ∈ A. This order is different from the pointwise order on sub-distributions since it uses the order on the underlying space. For instance, two proper distributions satisfy µ1 ≤ µ2 exactly when µ1 = µ2 , but two unequal distributions may satisfy µ1 ≤sd µ2 ; e.g., if we take distributions over the natural numbers N with the usual order and µ1 places weight 1 on 0 while µ2 places weight 1 on 1. Stochastic domination is precisely the probabilistic lifting of the order relation. Proposition 2.1.14. Suppose µ1 , µ2 are sub-distributions over a set A with a reflexive order ≤A (i.e., a ≤A a). Then µ1 (≤A )] µ2 implies µ1 ≤sd µ2 . The converse also holds when µ1 and µ2 have equal weight, as long as any upwards closed subset of A either contains a minimum element or is the whole set A (e.g., A = N or Z with the usual order). Proof. Let R ¬ (≤A ). For the forward direction, Theorem 2.1.11 gives µ1 ({a ∈ A | k ≤A a}) ≤ µ2 (R({a ∈ A | k ≤A a})). The subset on the right is precisely the set of a0 ∈ A such that a0 ≥A a for some a ≥A k; by transitivity and reflexivity, we have µ2 (R({a ∈ A | k ≤A a})) = µ2 ({a ∈ A | k ≤A a}). This holds for all k ∈ A, establishing µ1 ≤sd µ2 . For the converse, suppose µ1 ≤sd µ2 and µ1 and µ2 have equal weights, and let S ⊆ A be any subset. If the upwards closure R(S ) is the whole set A, then µ1 (S ) ≤ µ2 (R(S )) since µ1 and µ2 have equal weights. Otherwise, there is a least element k of R(S ) by assumption, and we have µ1 (S ) ≤ µ1 (R(S )) = µ1 ({a ∈ A | k ≤A a}) ≤ µ2 ({a ∈ A | k ≤A a}) = µ2 (R(S )), where the middle inequality is by stochastic domination. Theorem 2.1.11 implies µ1 (≤A )] µ2 . Finally, a typical application of coupling proofs is showing that two distributions are close together. CHAPTER 2. COUPLINGS À LA FORMAL VERIFICATION 10 Definition 2.1.15. Let µ1 , µ2 be sub-distributions over A. The total variation distance (also known as TV-distance or statistical distance) between µ1 and µ2 is defined as dtv (µ1 , µ2 ) ¬ 1X |µ1 (a) − µ2 (a)| = max |µ1 (S ) − µ2 (S )|. S ⊆A 2 a∈A In particular, the total variation distance bounds the difference in probabilities of any event. Couplings are closely related to TV-distance. Theorem 2.1.16 (see, e.g., Levin, Peres, and Wilmer (2009); Lindvall (2002)). Let µ1 and µ2 be sub-distributions over A and let µ be a coupling. Then dtv (µ1 , µ2 ) ≤ Pr [a1 6= a2 ]. (a1 ,a2 )∼µ In particular, if µ witnesses the lifting µ1 {(a1 , a2 ) ∈ A × A | (a1 , a2 ) ∈ S → a1 = a2 }] µ2 , then the TV-distance is bounded by the probability dtv (µ1 , µ2 ) ≤ Pr (a1 ,a2 )∼µ [(a1 , a2 ) ∈ / S ]. Theorem 2.1.16 is the fundamental result behind the so-called coupling method (Aldous, 1983), a technique to show two probabilistic processes converge by constructing a coupling that causes the processes to become equal with high probability.1 This theorem is usually stated for proper distributions µ1 and µ2 ; the result on sub-distributions follows as an easy consequence. (If there is a lifting then µ1 and µ2 have equal weights w by Proposition 2.1.9, and the inequalities in Theorem 2.1.16 are preserved when µ1 and µ2 are scaled by the same constant. When w = 0 the inequality is immediate; otherwise, by scaling up both distributions by 1/w, applying the standard theorem to obtain the total variation bound for proper distributions, then scaling back down by w, we recover the total variation bound for sub-distributions.) Unlike the previous facts, the target property about µ1 and µ2 does not directly follow from the existence of a lifting—we need more detailed information about the coupling µ. Proof by coupling The previous results suggest an indirect approach to proving properties of two distributions: demonstrate there exists a coupling of a particular form. However, how are we supposed to find a witness distribution with the desired properties? The given distributions may be highly complex, possibly over infinite sets—it is not clear how to represent, much less construct, the desired coupling. To address this challenge, probability theorists have developed a powerful proof technique called proof by coupling. This technique assumes a bit more information about the distributions: we need concrete descriptions of two processes producing the distributions. Usually, these generating programs are readily available; indeed, they are often the most natural descriptions of complex distributions. Given two programs, a proof by coupling builds a coupling for the output distributions by coupling intermediate samples. In a bit more detail, we imagine stepping through the programs in parallel, one instruction at a time, starting from two inputs. Whenever we reach two corresponding sampling instructions, we pick a valid coupling for the sampled distributions. The selected couplings induce a relation on samples, which we can assume when analyzing the rest of the programs. For instance, by selecting couplings for earlier samples carefully, we may 1 The converse of Theorem 2.1.16 also holds: there exists a coupling µmax , known as the maximal or optimal coupling, that achieves equality (see, e.g., Levin et al. (2009); Lindvall (2002)). However, this result will not be important for our purposes. CHAPTER 2. COUPLINGS À LA FORMAL VERIFICATION 11 be able to assume the coupled programs take the same path at a subsequent branching statement; in this way, coupling proofs can consider just pairs of well-behaved executions. Finding appropriate couplings is the main intellectual challenge when carrying out a proof by coupling, the steps requiring ingenuity. We close this section with an example of the proof technique in action. Example 2.1.17. Consider a probabilistic process that tosses a fair coin T times and returns the number of heads. If µ1 , µ2 are the output distributions from running this process for T = T1 , T2 iterations respectively and T1 ≤ T2 , then µ1 ≤sd µ2 . Proof by coupling. For the first T1 iterations, couple the coin flips to be equal—this ensures that after the first T1 iterations, the coupled counts are equal. The remaining T2 − T1 coin flips in the second run can only increase the second count, while preserving the first count. Therefore under the coupling, the first count is no more than the second count at termination, establishing µ1 ≤sd µ2 . For readers unfamiliar with these proofs, this argument may appear bewildering. The coupling is constructed implicitly, and some of the steps are mysterious. To clarify such proofs, a natural idea is to design a formal logic describing coupling proofs. Somewhat surprisingly, the logic we are looking for was already proposed in the formal verification literature, originally for verifying security of cryptographic protocols. 2.2 A formal logic for coupling proofs We will work with the logic PRHL (probabilistic Relational Hoare Logic) proposed by Barthe et al. (2009). Before detailing its connection to coupling proofs, we provide a brief introduction to program logics. Program logics: A brief primer A logic consists of a collection of formulas, also known as judgments, and an interpretation describing what it means—in typical, standard mathematics—for judgments to be true (valid). While it is possible to prove judgments valid directly by using regular mathematical arguments, this is often inconvenient as the interpretation may be quite complicated. Instead, many logics provide a proof system, a set of logical rules describing how to combine known judgments (the premises) to prove a new judgment (the conclusion). Each rule represents a single step in a formal proof. Starting from judgments given by rules with no premises (axioms), we can successively apply rules to prove new judgments, building a tree-shaped derivation culminating in a single judgment. To ensure that this final judgment is valid, each logical rule should be sound: if the premises are valid, then so is the conclusion. Soundness is a basic property, typically one of the first results to be proved about a logic. Program logics were first introduced by Hoare (1969), building on earlier ideas by Floyd (1967); they are also called Floyd-Hoare logics. These logics are really two logics in one: the assertion logic, where formulas describe program states, and the program logic proper, where judgments describe imperative programs. A judgment in the main program logic consists of three parts: a program c and two assertions Φ and Ψ from the assertion logic. The pre-condition Φ describes the initial conditions before executing c (for instance, assumptions about the input), while the post-condition Ψ describes the final conditions after executing c (for instance, properties of the output). Hoare (1969) proposed the original logical rules, which construct a judgment for a program by combining judgments for its sub-programs. This compositional style of reasoning is a hallmark of program logics. By varying the interpretation of judgments, the assertion logic, and the logical rules, Floyd-Hoare logics can establish a variety of properties about different kinds of imperative programs. Notable extensions reason about non-determinism (Dijkstra, 1976), pointers and memory allocation (O’Hearn, Reynolds, and Yang, 2001; Reynolds, 2001, 2002), concurrency (O’Hearn, 2007), and more. (Readers should consult a survey for a more comprehensive account of Floyd-Hoare logic (Apt, 1981, 1983; Jones, 2003).) In this tradition, Barthe et al. (2009) introduced the logic PRHL targeting security properties in cryptography. Compared to standard program logics, there are two twists: each judgment describes two programs, and programs CHAPTER 2. COUPLINGS À LA FORMAL VERIFICATION 12 can use random sampling. In short, PRHL is a probabilistic Relational Hoare Logic. Judgments encode probabilistic relational properties of two programs, where a post-condition describes a probabilistic liftings between two output distributions. More importantly, the proof rules represent different ways to combine liftings, formalizing various steps in coupling proofs. Accordingly, we will interpret PRHL as a formal logic for proofs by coupling. To build up to this connection, we first provide a brief overview of a core version of PRHL, reviewing the programming language, the judgments and their interpretation, and the logical rules. The logic PRHL: the programming language Programs in PRHL are defined in terms of expressions E including constants, like the integers and booleans, as well as combinations of constants and variables with primitive operations, like addition and subtraction. We suppose E also includes terms for basic datatypes, like tuples and lists. Concretely, E is inductively defined by the following grammar: E := X | L (variables) | Z | E +E | E −E | E ·E (numbers) | B | E ∧ E | E ∨ E | ¬E | E = E | E < E (booleans) | (E , . . . , E ) | πi (E ) | [] | E :: E | O(E ) (tuples, lists, operations) Expressions can mention two classes of variables: a countable set X of program variables, which can be modified by the program, and a set L of logical variables, which model fixed parameters. Expressions are typed as numbers, booleans, tuples, or lists, and primitive operations O have typed signatures; we consider only well-typed expressions throughout. The expressions (E , . . . , E ) and πi (E ) construct and project from a tuple, respectively; [] is the empty list, and E :: E adds an element to the head of a list. We typically use the letter e for expressions, x, y, z, . . . for program variables, and lower-case Greek letters (α, β, . . . ) and capital Roman letters (N , M , . . . ) for logical variables. We write V for the countable set of values, including integers, booleans, tuples, finite lists, etc. We can interpret expressions given maps from variables and logical variables to values. Definition 2.2.1. Program states are memories, maps X → V ; we usually write m for a memory and State for the set of memories. Logical contexts are maps L → V ; we usually write ρ for a logical context. We interpret an expression e as a function ¹eºρ : State → V in the usual way, for instance: ¹e1 + e2 ºρ m ¬ ¹e1 ºρ m + ¹e2 ºρ m. Likewise, we interpret primitive operations o as functions ¹oºρ : V → V , so that ¹o(e)ºρ m ¬ ¹oºρ (¹eºρ m). We fix a set DE of distribution expressions to model primitive distributions that our programs can sample from. For simplicity, we suppose for now that each distribution expression d is interpreted as a uniform distribution over a finite set. So, we have the coin flip and uniform distributions: DE := Flip | Unif(E ) where E is a list, representing the space of samples. We will introduce other primitive distributions as needed. To interpret distribution expressions, we define ¹dºρ : State → Distr(V ); for instance, ¹Unif(e)ºρ m ¬ U (¹eºρ m) CHAPTER 2. COUPLINGS À LA FORMAL VERIFICATION 13 where U (S ) is the mathematical uniform distribution over a set S . Now let’s see the programming language. We work with a standard imperative language with random sampling. The programs, also called commands or statements, are defined inductively: C := skip | X ←E (no-op) (assignment) | X ← DE | C; C (sequencing) | if E then C else C (conditional) $ | while E do C (sampling) (loop) We assume throughout that programs are well-typed; for instance, the guard expressions in conditionals and loops must be boolean. We interpret each command as a mathematical function from states to sub-distributions over output states; this function is known as the semantics of a command. Since the set of program variables and the set of values are countable, the set of states is also countable so sub-distributions over states are discrete. To interpret commands, we use two basic constructions on sub-distributions. Definition 2.2.2. The function unit : A → SDistr(A) maps every element a ∈ A to the sub-distribution that places probability 1 on a. The function bind : SDistr(A) × (A → SDistr(B)) → SDistr(B) is defined by X bind(µ, f )(b) ¬ µ(a) · f (a)(b). a∈A Intuitively, bind applies a randomized function on a distribution over inputs. We use a discrete version of the semantics considered by Kozen (1981), presented in Fig. 2.1; we write m[x 7→ v] for the memory m with variable x updated to hold v, and a 7→ b(a) for the function mapping a to b(a). The most complicated case is for loops. The sub-distribution µ(i) (m) models executions that exit after entering the loop body at most i times, starting from initial memory m. For the base case i = 0, the sub-distribution either returns m with probability 1 when the guard is false and the loop exits immediately, or returns the null sub-distribution ⊥ when the guard is true. The cases i > 0 are defined recursively, by unrolling the loop. Note that µ(i) are increasing in i: µ(i) (m) ≤ µ( j) (m) for all m ∈ State and i ≤ j. In particular, the weights of the sub-distributions are increasing. Since the weights are at most 1, the approximants converge to a sub-distribution as i tends to infinity by the monotone convergence theorem (see, e.g., Rudin (1976, Theorem 11.28), taking the discrete (counting) measure over State). The logic PRHL: judgments and validity The program logic PRHL features judgments of the following form: c1 ∼ c2 : Φ =⇒ Ψ Here, c1 and c2 are commands and Φ and Ψ are predicates on pairs of memories. To describe the inputs and outputs of c1 and c2 , each predicate can mention two copies x〈1〉, x〈2〉 of each program variable x; these tagged variables refer to the value of x in the executions of c1 and c2 respectively. Definition 2.2.3. Let X 〈1〉 and X 〈2〉 be the sets of tagged variables, finite sets of variable names tagged with 〈1〉 or 〈2〉 respectively: X 〈1〉 ¬ {x〈1〉 | x ∈ X } and X 〈2〉 ¬ {x〈2〉 | x ∈ X }. CHAPTER 2. COUPLINGS À LA FORMAL VERIFICATION 14 ¹skipºρ m ¬ unit(m) ¹x ← eºρ m ¬ unit(m[x 7→ ¹eºρ m]) $ dº m ¬ bind(¹dº m, v 7→ unit(m[x 7→ v])) ¹x ← ρ ρ ¹c; c 0 ºρ m ¬ bind(¹cºρ m, ¹c 0 ºρ ) ¨ ¹cºρ m : ¹eºρ m = true 0 ¹if e then c else c ºρ m ¬ ¹c 0 ºρ m : ¹eºρ m = false ¹while e do cºρ m ¬ lim µ(i) (m) i→∞  : i = 0 ∧ ¹eºρ m = true ⊥ µ(i) (m) ¬ unit(m) : i = 0 ∧ ¹eºρ m = false  bind(¹if e then cºρ m, µ(i−1) ) : i > 0 Figure 2.1: Semantics of programs Let State〈1〉 and State〈2〉 be the sets of tagged memories, maps from tagged variables to values: State〈1〉 ¬ X 〈1〉 → V and State〈2〉 ¬ X 〈2〉 → V . Let State× be the set of product memories, which combine two tagged memories: State× ¬ X 〈1〉 ] X 〈2〉 → V . For notational convenience we identify State× with pairs of memories State〈1〉 × State〈2〉; for m1 ∈ State〈1〉 and m2 ∈ State〈2〉, we write (m1 , m2 ) for the product memory and we use the usual projections on pairs to extract untagged memories from the product memory: p1 (m1 , m2 ) ¬ |m1 | and p2 (m1 , m2 ) ¬ |m2 |, where the memory |m| ∈ State has all variables in X . For commands c and expressions e with variables in X , we write c〈1〉, c〈2〉 and e〈1〉, e〈2〉 for the corresponding tagged commands and tagged expressions with variables in X 〈1〉 and X 〈2〉. We consider a set P of predicates (assertions) from first-order logic defined by the following grammar: P := E 〈1/2〉 = E 〈1/2〉 | E 〈1/2〉 < E 〈1/2〉 | E 〈1/2〉 ∈ E 〈1/2〉 | > | ⊥ | O(E 〈1/2〉, . . . , E 〈1/2〉) | P ∧ P | P ∨ P | ¬P | P → P | ∀L ∈ Z, P | ∃L ∈ Z, P (predicates) (first-order formulas) We typically use capital Greek letters (Φ, Ψ, Θ, Ξ, . . . ) for predicates. E 〈1/2〉 denotes an expression where program variables are tagged with 〈1〉 or 〈2〉; tags may be mixed within an expression. We consider the usual binary predicates {=, <, ∈, . . . } where e ∈ e0 means e is a member of the list e0 , and we take the always-true and alwaysfalse predicates > and ⊥, and a set O of other predicates. Predicates can be combined using the usual connectives {∧, ∨, ¬, →} and can quantify over first-order types (e.g., the integers, tuples, etc.). We will often interpret a boolean expression e as the predicate e = true. Predicates are interpreted as sets of product memories. CHAPTER 2. COUPLINGS À LA FORMAL VERIFICATION 15 Definition 2.2.4. Let Φ be a predicate. Given a logical context ρ, Φ is interpreted as a set ¹Φºρ ⊆ State× in the expected way, e.g., ¹e1 〈1〉 < e2 〈2〉ºρ ¬ {(m1 , m2 ) ∈ State× | ¹e1 ºρ m1 < ¹e2 ºρ m2 }. We can inject a predicate on single memories into a predicate on product memories; we call the resulting predicate one-sided since it constrains just one of two memories. Definition 2.2.5. Let Φ be a predicate on State. We define formulas Φ〈1〉 and Φ〈2〉 by replacing all program variables x in Φ with x〈1〉 and x〈2〉, respectively, and we define ¹Φ〈1〉ºρ ¬ {(m1 , m2 ) | m1 ∈ ¹Φºρ } and ¹Φ〈2〉ºρ ¬ {(m1 , m2 ) | m2 ∈ ¹Φºρ }. Valid judgments in PRHL relate two output distributions by lifting the post-condition. Definition 2.2.6 (Barthe et al. (2009)). A judgment is valid in logical context ρ, written ρ |= c1 ∼ c2 : Φ =⇒ Ψ, if for any two memories (m1 , m2 ) ∈ ¹Φºρ there exists a lifting of Ψ relating the output distributions: ¹c1 ºρ m1 ¹Ψº]ρ ¹c2 ºρ m2 . For example, a valid judgment |= c1 ∼ c2 : Φ =⇒ (=), states that for any two input memories (m1 , m2 ) satisfying Φ, the resulting output distributions from running c1 and c2 are related by lifted equality; by Proposition 2.1.10, these output distributions must be equal. The logic PRHL: the proof rules The logic PRHL includes a collection of logical rules to inductively build up a proof of a new judgment from known judgments. The rules are superficially similar to those from standard Hoare logic. However, the interpretation of judgments in terms of liftings means some rules in PRHL are not valid in Hoare logic, and vice versa. Before describing the rules, we introduce some necessary notation. A system of logical rules inductively defines a set of derivable formulas; we use the head symbol ` to mark such formulas. The premises in each logical rule are written above the horizontal line, and the single conclusion is written below the line; for easy reference, the name of each rule is given to the left of the line. The main premises are judgments in the program logic, but rules may also use other side-conditions. For instance, many rules require an assertion logic formula to be valid in all memories. Other side-conditions state that a program is terminating, or that certain variables are not modified by the program. We use the head symbol |= to mark valid side-conditions; while we could give a separate proof system for these premises, in practice they are simple enough to check directly. We also use notation for substitution in assertions. We write Φ {e/x} for the formula Φ with every occurrence of the variable x replaced by e. Similarly, Φ {v1 , v2 /x 1 〈1〉, x 2 〈2〉} is the formula Φ where occurrences of the tagged variables x 1 〈1〉, x 2 〈2〉 are replaced by v1 , v2 respectively. The rules of PRHL can be divided into three groups: two-sided rules, one-sided rules, and structural rules. All judgments are parameterized by a logical context ρ, but since this context is assumed to be a fixed assignment of logical variables—constant throughout the proof—we omit it from the rules. The two-sided rules in Fig. 2.2 apply when the two programs in the conclusion judgment have the same top-level shape. The rule [SKIP] simply states that skip instructions preserve the pre-condition. The rule [ASSN] handles assignment instructions. It is the usual Hoare-style rule: if Ψ holds initially with e1 〈1〉 and e2 〈2〉 substituted for x 1 〈1〉 and x 2 〈2〉, then Ψ holds after the respective assignment instructions. CHAPTER 2. COUPLINGS À LA FORMAL VERIFICATION SKIP ASSN SAMPLE ` skip ∼ skip : Φ =⇒ Φ ` x 1 ← e1 ∼ x 2 ← e2 : Ψ {e1 〈1〉, e2 〈2〉/x 1 〈1〉, x 2 〈2〉} =⇒ Ψ f : supp(d1 ) → supp(d2 ) is a bijection $ d : ∀v ∈ supp(d ), Ψ {v, f (v)/x 〈1〉, x 〈2〉} =⇒ Ψ ` x 1 ← d1 ∼ x 2 ← 2 1 1 2 $ SEQ COND 16 |= Φ → e1 〈1〉 = e2 〈2〉 ` c1 ∼ c2 : Φ =⇒ Ψ ` c10 ∼ c20 : Ψ =⇒ Θ ` c1 ; c10 ∼ c2 ; c20 : Φ =⇒ Θ ` c1 ∼ c2 : Φ ∧ e1 〈1〉 =⇒ Ψ ` c10 ∼ c20 : Φ ∧ ¬e1 〈1〉 =⇒ Ψ ` if e1 then c1 else c10 ∼ if e2 then c2 else c20 : Φ =⇒ Ψ WHILE |= Φ → e1 〈1〉 = e2 〈2〉 ` c1 ∼ c2 : Φ ∧ e1 〈1〉 =⇒ Φ ` while e1 do c1 ∼ while e2 do c2 : Φ =⇒ Φ ∧ ¬e1 〈1〉 Figure 2.2: Two-sided PRHL rules The rule [SAMPLE] is more subtle. In some ways it is the key rule in PRHL, allowing us to select a coupling for a pair of sampling instructions. To gain intuition, the following rule is a special case: SAMPLE* f : supp(d) → supp(d) is a bijection $ d ∼ x $ d : > =⇒ f (x〈1〉) = x〈2〉 `x← ← The conclusion states that there exists a coupling of a distribution d with itself such that each sample x from d is related to f (x). Soundness of this rule crucially relies on d being uniform—as we have seen, any bijection f induces a coupling of uniform distributions (cf. Example 2.1.4). It is possible to support general distributions at the cost of a more complicated side-condition,2 but we will not need this generality. The full rule [SAMPLE] can prove a post-condition of any shape: a post-condition holds after sampling if it holds before sampling, where x〈1〉 and x〈2〉 are replaced by any two coupled samples (v, f (v)). The rule [SEQ] resembles the normal rule for sequential composition in Hoare logic, but its reading is more subtle. In particular, note that the intermediate assertion Ψ is interpreted differently in the two premises: in the first judgment it is a post-condition and interpreted as a relation between distributions over memories via lifting, while in the second judgment it is a pre-condition and interpreted as a relation between memories. The next two rules deal with branching commands. Rule [COND] requires that the guards e1 〈1〉 and e2 〈2〉 are equal assuming the pre-condition Φ. The rule is otherwise similar to the standard Hoare logic rule: if we can prove the post-condition Ψ when the guard is initially true and when the guard is initially false, then we can prove Ψ as a post-condition of the conditional. Rule [WHILE] uses a similar idea for loops. We again assume that the guards are initially equal, and we also assume that they are equal in the post-condition of the loop body. Since the judgments are interpreted in terms of couplings, this second condition is a bit subtle. For one thing, the rule does not require e1 〈1〉 = e2 〈2〉 in all possible 2 Roughly speaking, the probability of any set S under d should be equal to the probability of f (S) under d. CHAPTER 2. COUPLINGS À LA FORMAL VERIFICATION ASSN-L ASSN-R SAMPLE-L SAMPLE-R COND -L COND -R 17 ` x 1 ← e1 ∼ skip : Ψ {e1 〈1〉/x 1 〈1〉} =⇒ Ψ ` skip ∼ x 2 ← e2 : Ψ {e2 〈2〉/x 2 〈2〉} =⇒ Ψ $ d ∼ skip : ∀v ∈ supp(d ), Ψ {v/x 〈1〉} =⇒ Ψ ` x1 ← 1 1 1 $ d : ∀v ∈ supp(d ), Ψ {v/x 〈2〉} =⇒ Ψ ` skip ∼ x 2 ← 2 2 2 ` c1 ∼ c : Φ ∧ e1 〈1〉 =⇒ Ψ ` c10 ∼ c : Φ ∧ ¬e1 〈1〉 =⇒ Ψ ` if e1 then c1 else c10 ∼ c : Φ =⇒ Ψ ` c ∼ c2 : Φ ∧ e2 〈2〉 =⇒ Ψ WHILE-L WHILE-R ` c ∼ c20 : Φ ∧ ¬e2 〈2〉 =⇒ Ψ ` c ∼ if e2 then c2 else c20 : Φ =⇒ Ψ ` c1 ∼ skip : Φ ∧ e1 〈1〉 =⇒ Φ |= Φ → Φ1 〈1〉 Φ1 |= while e1 do c1 lossless ` while e1 do c1 ∼ skip : Φ =⇒ Φ ∧ ¬e1 〈1〉 ` skip ∼ c2 : Φ ∧ e2 〈2〉 =⇒ Φ |= Φ → Φ2 〈2〉 Φ2 |= while e2 do c2 lossless ` skip ∼ while e2 do c2 : Φ =⇒ Φ ∧ ¬e2 〈2〉 Figure 2.3: One-sided PRHL rules executions of the two programs—this would be a rather severe restriction, for instance ruling out programs where e1 〈1〉 and e2 〈2〉 are probabilistic. Rather, the guards only need to be equal under the coupling of the two programs given by the premise. The upshot is that by selecting appropriate couplings in the loop body, we can assume the guards are equal when analyzing loops with probabilistic guards. The rule is otherwise similar to the usual Hoare logic rule, where Φ is the loop invariant. So far, we have seen rules that relate two programs of the same shape. These are the most commonly used rules in PRHL, as relational reasoning is most powerful when comparing two highly similar (or even the same) programs. However, in some cases we may need to reason about two programs with different shapes, even if the two top-level commands are the same. For instance, if we can’t guarantee two executions of a program follow the same path at a conditional statement under a coupling, we must relate the two different branches. For this kind of reasoning, we can fall back on the one-sided rules in Fig. 2.3. These rules relate a command of a particular shape with skip or an arbitrary command. Each rule comes in a left- and a right-side version. The assignment rules, [ASSN-L] and [ASSN-R], relate an assignment instruction to skip using the usual Hoare rule for assignment instructions. The sampling rules, [SAMPLE-L] and [SAMPLE-R], are similar; they relate a CHAPTER 2. COUPLINGS À LA FORMAL VERIFICATION CONSEQ ` c1 ∼ c2 : Φ0 =⇒ Ψ 0 ` c10 ∼ c20 : Φ =⇒ Ψ |= Ψ 0 → Ψ c1 ≡ c10 c2 ≡ c20 ` c1 ∼ c2 : Φ =⇒ Ψ ` c1 ∼ c2 : Φ ∧ Θ =⇒ Ψ ` c1 ∼ c2 : Φ ∧ ¬Θ =⇒ Ψ ` c1 ∼ c2 : Φ =⇒ Ψ TRANS FRAME |= Φ → Φ0 ` c1 ∼ c2 : Φ =⇒ Ψ EQUIV CASE 18 ` c1 ∼ c2 : Φ =⇒ Ψ ` c2 ∼ c3 : Φ0 =⇒ Ψ 0 ` c1 ∼ c3 : Φ0 ◦ Φ =⇒ Ψ 0 ◦ Ψ ` c1 ∼ c2 : Φ =⇒ Ψ FV(Θ) ∩ MV(c1 , c2 ) = ∅ ` c1 ∼ c2 : Φ ∧ Θ =⇒ Ψ ∧ Θ Figure 2.4: Structural PRHL rules sampling instruction to skip if the post-condition holds for all possible values of the sample. These rules represent couplings where fresh randomness is used, i.e., where randomness is not shared between the two programs. The conditional rules, [COND -L] and [COND -R], are similar to the two-sided conditional rule except there is no assumption of synchronized guards—the other command c might not even be a conditional. If we can relate the general command c to the true branch when the guard is true and relate c to the false branch when the guard is false, then we can relate c to the whole conditional. The rules for loops, [WHILE-L] and [WHILE-R], can only relate loops to the skip; a loop that executes multiple iterations cannot be directly related to an arbitrary command that executes only once. These rules mimic the usual loop rule from Hoare logic, with a critical side-condition: losslessness. Definition 2.2.7. A command c is Φ-lossless if for any memory m satisfying Φ and every logical context ρ, the output ¹cºρ m is a proper distribution (i.e., it has total probability 1). We write Φ-lossless as the following judgment: Φ |= c lossless Losslessness is needed for soundness: skip produces a proper distribution on any input and liftings can only relate sub-distributions with equal weights (Proposition 2.1.9), so the loop must also produce a proper distribution to have any hope of coupling the output distributions. For the examples we will consider, losslessness is easy to show since loops execute for a finite number of iterations; when there is no finite bound, proving losslessness may require more sophisticated techniques (e.g., Barthe, Espitau, Gaboardi, Grégoire, Hsu, and Strub (2017a); Chatterjee, Fu, and Goharshady (2016a); Chatterjee, Fu, Novotný, and Hasheminezhad (2016b); Chatterjee, Novotný, and Žikelić (2017); Ferrer Fioriti and Hermanns (2015); McIver, Morgan, Kaminski, and Katoen (2018)). Finally, PRHL includes a handful of structural rules which apply to programs of any shape. The first rule [CONSEQ] is the usual rule of consequence, allowing us to strengthen the pre-condition and weaken the postcondition—assuming more about the input and proving less about the output, respectively. The rule [EQUIV] replaces programs by equivalent programs. This rule is particularly useful for reasoning about programs of different shapes. Instead of using one-sided rules, which are often less convenient, we can sometimes replace a program with an equivalent version and then apply two-sided rules. For simplicity, we use a CHAPTER 2. COUPLINGS À LA FORMAL VERIFICATION 19 strong notion of equivalence: c1 ≡ c2 ¬ ¹c1 ºρ = ¹c2 ºρ for every logical context ρ; more refined notions of equivalence are also possible, but will not be needed for our purposes. For our examples, we just use a handful of basic program equivalences, e.g., c; skip ≡ c and skip; c ≡ c. The rule [CASE] performs a case analysis on the input. If we can prove a judgment when Θ holds initially and a judgment when Θ does not hold initially, then we can combine the two judgments provided they have the same post-condition. The rule [TRANS] is the transitivity rule: given a judgment relating c1 ∼ c2 and a judgment relating c2 ∼ c3 , we can glue these judgments together to relate c1 ∼ c3 . The pre- and post-conditions of the conclusion are given by composing the pre- and post-conditions of the premises; for binary relations R and S , relation composition is defined by R ◦ S ¬ {(x 1 , x 3 ) | ∃x 2 . (x 1 , x 2 ) ∈ S ∧ (x 2 , x 3 ) ∈ R}. The last rule [FRAME] is the frame rule (also called the rule of constancy): it states that an assertion Θ can be carried from the pre-condition through to the post-condition as long as the variables MV(c1 , c2 ) that may be modified by the programs c1 and c2 don’t include any of the variables FV(Θ) appearing free in Θ; as usual, MV and FV are defined syntactically by collecting the variables that occur in programs and assertions. As expected, the proof system of PRHL is sound. Theorem 2.2.8 (Barthe et al. (2009)). Let ρ be a logical context. If a judgment is derivable ρ ` c1 ∼ c2 : Φ =⇒ Ψ, then it is valid: ρ |= c1 ∼ c2 : Φ =⇒ Ψ. The coupling interpretation A valid judgment ρ |= c1 ∼ c2 : Φ =⇒ Ψ implies that for any two input memories related by Φ, there exists a coupling with support in Ψ between the two output distributions. By applying the results in Section 2.1, valid judgments imply relational properties of programs. Moreover, by viewing the rules as the discrete steps in a proof, we can identify common pieces of standard coupling proofs. For instance, [SAMPLE] selects a coupling for corresponding sampling statements; the function f lets us choose among different bijection couplings. The rule [SEQ] encodes a composition principle for couplings; when two processes produce samples related by Ψ under a particular coupling, we can continue to assume this relation when analyzing the remainder of the program. The structural rule [CASE] shows we can select between two possible couplings depending on whether a predicate Θ holds. In short, not only is PRHL a logic for verifying cryptographic protocols, it is also a formal logic for proofs by coupling. 2.3 Constructing couplings, formally Now let’s see how to construct coupling proofs in the logic. We give three examples proving classical probabilistic properties: equivalence, stochastic domination, and convergence. Remark 2.3.1. There are some inherent challenges in presenting formal proofs on paper. Fundamentally, our proofs are branching derivation trees. When such a proof is serialized, it may be hard to follow which part of the derivation tree the paper proof corresponds to. To help organize the proof, we proceed loosely in a top-down fashion, giving proofs and judgments for the most deeply nested parts of the program first and then gradually zooming out to consider larger and larger parts of the whole program. CHAPTER 2. COUPLINGS À LA FORMAL VERIFICATION 20 Applications of sequential composition are also natural places to signpost the proof; we typically consider the commands in order, unless the second command is much more complex than the first. Finally, for space reasons we will gloss over applications of the assignment rule [ASSN] and minor uses of the rule of consequence [CONSEQ]; a completely formal proof would also spell out these details. Probabilistic equivalence To warm up, we prove two programs probabilistically equivalent. Our example models perhaps the most basic encryption scheme: the XOR cipher. Given a boolean s representing the secret message, the XOR cipher flips a fair coin to draw the secret key k and then returns k ⊕ s as the encrypted message. A receiving party who knows the secret key can decrypt the message by computing k ⊕ (k ⊕ s) = s. To prove secrecy of this scheme, we consider the following two programs: $ Flip; k← r ← k⊕s $ Flip; k← r←k The first program xor1 implements the encryption function, storing the encrypted message into r. The second program xor2 simply stores a random value into r. If we can show the distribution of r is the same in both programs, then the XOR cipher is secure: the distribution on outputs is completely random, leaking no information about the secret message s. In terms of PRHL, it suffices to prove the following judgment: ` xor1 ∼ xor2 : > =⇒ r〈1〉 = r〈2〉 By validity of the logic, this judgment implies that for any two memories m1 , m2 , the output distributions are related by a coupling that always returns outputs with equal values of r; by reasoning similar to Proposition 2.1.10, this implies that the output distributions over r〈1〉 and r〈2〉 are equal.3 Before proving this judgment in the logic, we sketch the proof by coupling. If s〈1〉 is true, then we couple k to take opposite values in the two runs. If s〈1〉 is false, then we couple k to be equal in the two runs. In both cases, we conclude that the results r〈1〉, r〈2〉 are equal under the coupling. To formalize this argument in PRHL, we use the [CASE] rule: CASE ` xor1 ∼ xor2 : s〈1〉 = true =⇒ r〈1〉 = r〈2〉 ` xor1 ∼ xor2 : s〈1〉 = 6 true =⇒ r〈1〉 = r〈2〉 ` xor1 ∼ xor2 : > =⇒ r〈1〉 = r〈2〉 . For the first premise we select the negation coupling using the bijection f = ¬ in [SAMPLE], apply the assignment rule [ASSN], and combine with the sequencing rule [SEQ]. Concretely, we have SAMPLE f =¬ $ Flip ∼ k $ Flip : s〈1〉 = true =⇒ k〈1〉 = ¬k〈2〉 ∧ s〈1〉 = true `k← ← ASSN ` r ← k ⊕ s ∼ r ← k : k〈1〉 = ¬k〈2〉 ∧ s〈1〉 = true =⇒ r〈1〉 = r〈2〉 and we combine the two judgments to give: SEQ 3 $ Flip ∼ k $ Flip : s〈1〉 = true =⇒ k〈1〉 = ¬k〈2〉 ∧ s〈1〉 = true `k← ← ` r ← k ⊕ s ∼ r ← k : k〈1〉 = ¬k〈2〉 ∧ s〈1〉 = true =⇒ r〈1〉 = r〈2〉 ` xor1 ∼ xor2 : s〈1〉 = true =⇒ r〈1〉 = r〈2〉 . To be completely precise, Proposition 2.1.10 assumes that we have lifted equality, while here we only have a lifting where the variables r are equal. An analogous argument shows that the marginal distributions of variable r must be equal. CHAPTER 2. COUPLINGS À LA FORMAL VERIFICATION 21 For the other case s〈1〉 = 6 true, we give the same proof except with the identity coupling in [SAMPLE]: SAMPLE f = id $ Flip ∼ k $ Flip : s〈1〉 = `k← 6 true =⇒ k〈1〉 = k〈2〉 ∧ s〈1〉 6= true ← and the assignment rule, we have ASSN ` r ← k ⊕ s ∼ r ← k : k〈1〉 = k〈2〉 ∧ s〈1〉 = 6 true =⇒ r〈1〉 = r〈2〉 . Combining the conclusions, we get SEQ $ Flip ∼ k $ Flip : s〈1〉 6= true =⇒ k〈1〉 = ¬k〈2〉 ∧ s〈1〉 = `k← 6 true ← ` r ← k ⊕ s ∼ r ← k : k〈1〉 = k〈2〉 ∧ s〈1〉 = 6 true =⇒ r〈1〉 = r〈2〉 ` xor1 ∼ xor2 : s〈1〉 = 6 true =⇒ r〈1〉 = r〈2〉 . By [CASE], we conclude the desired post-condition r〈1〉 = r〈2〉. Stochastic domination For our second example, we revisit Example 2.1.17 and replicate the proof in PRHL. The following program sdom flips a coin T times and returns the number of coin flips that come up true: i ← 0; ct ← 0; while i < T do i ← i + 1; $ Flip; s← ct ← s ? ct + 1 : ct (The last line uses the ternary conditional operator—s ? ct + 1 : ct is equal to ct + 1 if s is true, otherwise equal to ct.) We consider two runs of this program executing T1 and T2 iterations, where T1 ≤ T2 are logical variables; call the two programs sdom1 and sdom2 . By soundness of the logic and Proposition 2.1.14, the distribution of ct in the second run stochastically dominates the distribution of ct in the first run if we can prove the judgment ` sdom1 ∼ sdom2 : > =⇒ ct〈1〉 ≤ ct〈2〉. Encoding the argument from Example 2.1.17 in PRHL requires a bit of work. The main obstacle is that the two-sided loop rule in PRHL can only analyze loops in a synchronized fashion, but this is not possible here: when T1 < T2 the two loops run for different numbers of iterations, no matter how we couple the samples. To get around this problem, we use the equivalence rule [EQUIV] to transform sdom into a more convenient form using the following equivalence: while e do c ≡ while e ∧ e0 do c; while e do c This transformation, known in the compilers literature as loop splitting (Callahan and Kennedy, 1988), separates out the first iterations where e0 holds, and then runs the original loop to completion. We transform sdom2 as follows:   i ← 0; ct ← 0; i ← 0; ct ← 0;       while i < T1 do  while i < T2 ∧ i < T1 do  0 i ← i + 1; i ← i + 1; sdom2a ¬ ¬ sdom1   $ Flip; $ Flip;   s← s←     ct ← s ? ct + 1 : ct; ct ← s ? ct + 1 : ct;  while i < T2 do   i ← i + 1; 0 sdom2b ¬ $ Flip; s←   ct ← s ? ct + 1 : ct CHAPTER 2. COUPLINGS À LA FORMAL VERIFICATION 22 We aim to relate sdom02a ; sdom02b to sdom1 . First, we apply the two-sided rule [WHILE] to relate sdom1 to sdom02a . Taking the identity coupling with f = id in [SAMPLE], we relate the sampling in the loop body via SAMPLE f = id $ Flip ∼ s $ Flip : > =⇒ s〈1〉 = s〈2〉 `s← ← and establish the loop invariant Θ ¬ i〈1〉 = i〈2〉 ∧ ct〈1〉 = ct〈2〉, proving the judgment ` sdom1 ∼ sdom02a : > =⇒ Θ. Then we use the one-sided rule [WHILE-R] for the loop sdom02b with loop invariant ct〈1〉 ≤ ct〈2〉: ` skip ∼ sdom02b : Θ =⇒ ct〈1〉 ≤ ct〈2〉. Composing these two judgments with [SEQ] and applying [EQUIV] gives the desired judgment: EQUIV ` sdom1 ; skip ∼ sdom02a ; sdom02b : > =⇒ ct〈1〉 ≤ ct〈2〉 ` sdom1 ∼ sdom2 : > =⇒ ct〈1〉 ≤ ct〈2〉 using the equivalence sdom1 ; skip ≡ sdom1 . Probabilistic convergence In our final example, we build a coupling witnessing convergence of two random walks. Each process begins at an integer starting point start, and proceeds for T steps. At each step it flips a fair coin. If true, it increases the current position by 1; otherwise, it decreases the position by 1. Given two random walks starting at different initial locations, we want to bound the distance between the two resulting output distributions in terms of T . Intuitively, the position distributions spread out as the random walks proceed, tending towards the uniform distribution on the even integers or the uniform distribution over the odd integers depending on the parity of the initial position and the number of steps. If two walks initially have the same parity (i.e., their starting positions differ by an even integer), then their distributions after taking the same number of steps T should approach one another in total variation distance. We model a single random walk with the following program rwalk: pos ← start; i ← 0; hist ← [start]; while i < T do i ← i + 1; $ Flip; r← pos ← pos + (r ? 1 : −1); hist ← pos :: hist The last command records the history of the walk in hist; this ghost variable does not affect the final output value, but will be useful for our assertions. By Theorem 2.1.16, we can bound the TV-distance between the position distributions by constructing a coupling where the probability of pos〈1〉 = 6 pos〈2〉 tends to 0 as T increases. We don’t have the tools yet to reason about this probability (we will revisit this point in the next chapter), but for now we can build the coupling and prove the judgment ` rwalk ∼ rwalk : start〈2〉 − start〈1〉 = 2K =⇒ K + start〈1〉 ∈ hist〈1〉 → pos〈1〉 = pos〈2〉 CHAPTER 2. COUPLINGS À LA FORMAL VERIFICATION 23 where K is an integer logical variable. The pre-condition states that the initial positions are an even distance apart. To read the post-condition, the predicate K + start〈1〉 ∈ hist〈1〉 holds if and only if the first walk has moved to position K + start〈1〉 at some time in the past; if this has happened, then the two coupled positions must be equal. Our coupling mirrors the two walks. Each step, we have the walks make symmetric moves by arranging opposite samples. Once the walks meet, we have the walks match each other by coupling the samples to be equal. In this way, if the first walk reaches start〈1〉 + K, then the second walk must be at start〈2〉 − K since both walks are coupled to move symmetrically. In this case, the initial condition start〈2〉 − start〈1〉 = 2K gives pos〈1〉 = start〈1〉 + K = start〈2〉 − K = pos〈2〉 so the walks meet and continue to share the same position thereafter. This argument requires the starting positions to be an even distance apart so the positions in the two walks always have the same parity; if the two starting positions are an odd distance apart, then the two distributions after T steps have disjoint support and the coupled walks can never meet. To formalize this argument in PRHL, we handle the loop with the two-sided rule [WHILE] and invariant  |hist〈1〉| > 0 ∧ |hist〈2〉| > 0 Θ ¬ K + start〈1〉 ∈ hist〈1〉 → pos〈1〉 = pos〈2〉  K + start〈1〉 ∈ / hist〈1〉 → pos〈2〉 − pos〈1〉 = 2(K − (hd(hist〈1〉) − start〈1〉)), where hd(hist) is the first element (the head) of the non-empty list hist. The last two conditions model the two cases. If the first walk has already visited K + start〈1〉, the walks have already met under the coupling and they must have the same position. Otherwise, the walks have not met. If d ¬ hd(hist〈1〉) − start〈1〉 is the (signed) distance the first walk has moved away from its starting location and the two walks are initially 2K apart, then the current distance between coupled positions must be 2(K − d). To show the invariant is preserved, we perform a case analysis with [CASE]. If K + start〈1〉 ∈ hist〈1〉 holds then the walks have already met in the past and currently have the same position (by Θ). So, we select the identity coupling in [SAMPLE]: SAMPLE f = id ` r ← Flip ∼ r ← Flip : K + start〈1〉 ∈ hist〈1〉 =⇒ r〈1〉 = r〈2〉 . $ $ Since K + start〈1〉 ∈ hist〈1〉 → pos〈1〉 = pos〈2〉 holds at the start of the loop, we know pos〈1〉 = pos〈2〉 at the end of the loop; since K + start〈1〉 ∈ hist〈1〉 is preserved by the loop body, the invariant Θ holds. Otherwise if K + start〈1〉 ∈ / h〈1〉, then the walks have not yet met and should be mirrored. So, we select the negation coupling with f = ¬ in [SAMPLE]: SAMPLE f =¬ ` r ← Flip ∼ r ← Flip : K + start〈1〉 ∈ / hist〈1〉 =⇒ ¬r〈1〉 = r〈2〉 $ $ To show the loop invariant, there are two cases. If K + start〈1〉 ∈ h〈1〉 holds after the body, the two walks have just met for the first time and pos〈1〉 = pos〈2〉 holds. Otherwise, the walks remain mirrored: pos〈1〉 increased by r〈1〉 and pos〈2〉 decreased by r〈1〉, so pos〈2〉 − pos〈1〉 = 2(K + (hd(hist〈1〉) − start〈1〉)) and the invariant Θ is preserved. Putting it all together, we have the desired judgment: ` rwalk ∼ rwalk : start〈2〉 − start〈1〉 = 2K =⇒ K + start〈1〉 ∈ h〈1〉 → pos〈1〉 = pos〈2〉. While this judgment describes a coupling between the position distributions, we need to analyze finer properties of the coupling distribution to apply Theorem 2.1.16—namely, we must bound the probability that pos〈1〉 is not equal to pos〈2〉. We will consider how to extract this information in the next chapter. CHAPTER 2. COUPLINGS À LA FORMAL VERIFICATION 2.4 24 Related work Relational Hoare logics and probabilistic couplings have been extensively studied in disparate research communities. Relational Hoare logics The logic PRHL is a prime example of a relational program logic, which extend standard Floyd-Hoare logics to prove properties about two programs. Benton (2004) first designed a relational version of Hoare logic called RHL to prove equivalence between two (deterministic) programs. Benton used his logic to verify compiler transformations, showing the original program is equivalent to the transformed program. Relational versions of other program logics have also been considered, including an extension of separation logic by Yang (2007) to prove relational properties of pointer-manipulating programs. There is nothing particularly special about relating exactly two programs; recently, Sousa and Dillig (2016) give a Hoare logic for proving properties of k executions of the same program for arbitrary k. Barthe et al. (2009) extended Benton’s work to prove relational properties of probabilistic programs, leading to the logic PRHL. As we have seen, the key technical insight is to interpret the relational post-condition as a probabilistic lifting between two output distributions. Barthe et al. (2009) used PRHL to verify security properties for a variety of cryptographic protocols by mimicking the so-called game-hopping proof technique (Bellare and Rogaway, 2006; Shoup, 2004), where the original program is transformed step-by-step to an obviously secure version (e.g., a program returning a random number). Security follows if each transformation approximately preserves the program semantics. Our analysis of the XOR cipher is a very simple example of this technique; more sophisticated proofs chain together dozens of transformations. Probabilistic couplings and liftings Couplings are a well-studied tool in probability theory; readers can consult the lecture notes by Lindvall (2002) or the textbooks by Thorisson (2000) and Levin et al. (2009) for entry points into this vast literature. Probabilistic liftings were initially proposed in research on bisimulation, techniques for proving equivalence of transition systems. Larsen and Skou (1991) were the first to consider a probabilistic notion of bisimulation. Roughly speaking, their definition considers an equivalence relation E on states and requires that any two states in the same equivalence class have the same probability of stepping to any other equivalence class. The construction for arbitrary relations arose soon after, when researchers generalized probabilistic bisimulation to probabilistic simulation; Jonsson and Larsen (1991, Definition 4.3) proposes a satisfaction relation using witness distributions, similar to the definition used in PRHL. Desharnais (1999, Definition 3.6.2) and Segala and Lynch (1995, Definition 12) give an alternative characterization without witness distributions, similar to Strassen’s theorem (Strassen, 1965); Desharnais (1999, Theorem 7.3.4) observed that both definitions are equivalent in the finite case via the max flow-min cut theorem. Probabilistic (bi)simulation can be characterized logically, i.e., two systems are (bi)similar if and only if they satisfy the same formulas in some modal logic (Desharnais, Edalat, and Panangaden, 2002; Desharnais, Gupta, Jagadeesan, and Panangaden, 2003; Fijalkow, Klin, and Panangaden, 2017; Larsen and Skou, 1991). Deng and Du (2011) survey logical, metric, and algorithmic characterizations of these relations. Probabilistic liftings have proven to be a convenient abstraction for many styles of formal reasoning beyond bisimulation and program logics. For instance, Barthe, Fournet, Grégoire, Strub, Swamy, and Zanella-Béguelin (2014a) combine probabilistic lifting with a probability monad to prove relational properties in RF? , a refinement type system for a probabilistic, functional language. Chapter 3 From coupling proofs to product programs As we have seen, valid judgments in PRHL imply a coupling of two output distributions with a particular support. Some applications of proof by coupling need more detailed information to conclude a relational property; notable examples include coupling proofs for convergence, like the random walk example from the previous chapter. While a valid judgment gives no further information beyond the support of the coupling, we usually have more information at hand—often, we have a proof using the logical rules in PRHL. Since proof rules correspond to steps in proofs by coupling, which indirectly construct a coupling distribution, the structure of PRHL proofs should somehow encode the coupling. Indeed, this is the case. While we cannot hope to explicitly list the probabilities of every pair under a coupling— for one thing, there may be infinitely many—we show that every PRHL derivation encodes a probabilistic program generating the witness. Intuitively, a coupling proof describes how to simulate two probabilistic processes as one, by sharing randomness. Accordingly, proofs in PRHL encode how to combine two programs into one; the witness of a coupling is just the output distribution of the combined program. This construction, which we call the coupled product, draws a correspondence between coupling proofs and probabilistic product programs, recalling a theme in computer science and logic: proofs can be viewed as programs. To make our ideas concrete, we design an extension of PRHL called ×PRHL (product PRHL), where judgments construct a coupled product program. Since this program depends on the whole proof derivation and not just the final judgment, there may be multiple ×PRHL judgments corresponding to a given PRHL judgment. We first present a core version of ×PRHL with logical rules based on PRHL (Section 3.1), followed by a novel loop rule that allows asynchronous reasoning (Section 3.2). After establishing soundness (Section 3.3), we apply our logic to prove convergence and rapid mixing for probabilistic processes (Section 3.4), modeling examples of shift couplings (Section 3.5) and path couplings (Section 3.6). Finally, we compare the coupled product to prior constructions (Section 3.7). 3.1 The core logic ×PRHL The logic ×PRHL extends PRHL by pairing each judgment with a product program. Judgments and validity Judgments in ×PRHL have the following form: § ª § ª c1 Φ Ψ É c× c2 Just like in PRHL, c1 and c2 are probabilistic programs and the pre- and post-conditions Φ and Ψ are assertions on product memories. The new component is the coupled product c× , which simulates two correlated executions of c1 25 CHAPTER 3. FROM COUPLING PROOFS TO PRODUCT PROGRAMS 26 and c2 . To ensure the two executions do not interfere with one another, c× operates on a product memory with two copies of each variable, tagged with 〈1〉 and 〈2〉. Semantic validity in ×PRHL is very similar to validity in PRHL: the output distribution of the product program on two related inputs couples the output distributions of the two given programs. Definition 3.1.1. Suppose c1 , c2 have variables in X ∪ L, Φ and Ψ are predicates over X 〈1〉 ∪ X 〈2〉 ∪ L, and c× has variables in X 〈1〉 ∪ X 〈2〉 ∪ L. An ×PRHL judgment is valid in a logical context ρ, written § ª § ª c1 ρ |= Φ Ψ É c× , c2 if for every two memories (m1 , m2 ) ∈ ¹Φºρ we have 1. supp(¹c× ºρ (m1 , m2 )) ⊆ ¹Ψºρ ; 2. ¹c1 ºρ m1 = π1 (¹c× ºρ (m1 , m2 )); and 3. ¹c2 ºρ m2 = π2 (¹c× ºρ (m1 , m2 )). (Recall π1 , π2 are the first and second projections from SDistr(State× ) to SDistr(State).) Core proof rules Proof rules in ×PRHL describe how to construct product programs. Like their PRHL counterparts, the core rules of ×PRHL can be divided into three groups: two-sided rules, one-sided rules, and structural rules. The two-sided rules are presented in Fig. 3.1. For the first rule [SKIP], since the two programs don’t have any effect, the coupled program also has no effect. The next pair of rules handle assignment and sampling statements. The rule [ASSN] relates two assignment statements; the product program simply performs both operations on the product memory. The rule [SAMPLE] for random sampling is more interesting. Just like its counterpart in PRHL, this rule is parameterized by a bijection f between the supports of the two distributions. The product program draws the first sample for x 1 〈1〉 from d1 and then assigns x 2 〈2〉 deterministically with f (x 1 〈1〉)—this is the sample corresponding to x 1 〈1〉 under the coupling. In this way, the product program simulates two random draws with a single source of randomness. The sequential composition rule [SEQ] relates two sequencing commands. The product program is simply the sequential composition of the product programs for the first and second commands, highlighting the compositional nature of couplings. The final pair of rules relate branching commands. Just like in PRHL, the pre-condition must ensure that the guards are equal. In the rule [COND], the premises give two product programs c and c 0 relating the two true branches and the two false branches, respectively. The product program for the conditional first branches on the guard and then executes the product program for the corresponding branch. In the rule [WHILE], the product program for the loop executes the product program for the body while the guard remains true. Next we consider the one-sided proof rules in Fig. 3.2. The first four rules for assignment and sampling, [ASSN-L]/[ASSN-R] and [SAMPLE-L]/[SAMPLE-R], relate a command with skip; the product program simply executes the assignment or sampling command on the indicated side. The one-sided rules for conditionals, [COND -L] and [COND -R], relate a conditional to an arbitrary command (c2 and c1 , respectively). The premises give two product programs relating the general command with the true and false branches of the conditional. The coupled product branches on the guard—e1 〈1〉 or e2 〈2〉—and runs the product program for the corresponding branch. The one-sided rules for loops, [WHILE-L] and [WHILE-R], are similar. The premises give a product program relating the body of the loop to skip; the resulting product program for the loop executes the product program for the body while the loop guard is true. Like the analogous rules in PRHL, the loop must be lossless. CHAPTER 3. FROM COUPLING PROOFS TO PRODUCT PROGRAMS SKIP ASSN SAMPLE 27 § ª § ª skip ` Φ Φ É skip skip § ª § ª x 1 ← e1 x 〈1〉 ← e1 〈1〉; ` Ψ {e1 〈1〉, e2 〈2〉/x 1 〈1〉, x 2 〈2〉} Ψ É 1 x 2 ← e2 x 2 〈2〉 ← e2 〈2〉 f : supp(d1 ) → supp(d2 ) bijection § ª § ª $ d ; $ d x 〈1〉 ← x1 ← 1 1 Ψ É 1 ` ∀v ∈ supp(d1 ), Ψ {v, f (v)/x 1 〈1〉, x 2 〈2〉} $ x 2 ← d2 x 2 〈2〉 ← f (x 1 〈1〉) SEQ COND § ª § ª § ª 0 § ª c1 c1 ` Φ Ψ Éc ` Ψ Θ É c0 c2 c20 § ª § ª c1 ; c10 ` Φ Θ É c; c 0 c2 ; c20 |= Φ → e1 〈1〉 = e2 〈2〉 § ª § ª § ª 0 § ª c1 c1 ` Φ ∧ e1 〈1〉 Ψ Éc ` Φ ∧ ¬e1 〈1〉 Ψ É c0 c2 c20 § ª § ª if e1 then c1 else c10 ` Φ Ψ É if e1 〈1〉 then c else c 0 if e2 then c2 else c20 |= Φ → e1 〈1〉 = e2 〈2〉 WHILE § ª while e1 do c1 ` Φ while e2 do c2 § ª § ª c1 Φ Éc ` Φ ∧ e1 〈1〉 c2 § ª Φ ∧ ¬e1 〈1〉 É while e1 〈1〉 do c Figure 3.1: Two-sided ×PRHL rules Finally, we come to the structural rules in Fig. 3.3. The rules [CONSEQ] and [EQUIV] are straightforward: the former rule preserves the product program of the premise, while the latter rule replaces programs by equivalent programs. The rule [CASE] is more interesting; recall that this rule performs a case analysis on the two input memories. The product programs from the two logical cases are combined into a final product program that branches on the predicate and selects the corresponding product program. In this way, a logical case analysis is realized by a branching statement in the product program. Unlike in PRHL, this rule performs a case analysis on an expression e instead of a general predicate Θ in the assertion logic; this restriction is needed to reflect the predicate as a guard expression in the product.1 Finally, [FRAME] is the ×PRHL version of the frame rule. Remark 3.1.2. The careful reader may notice that we do not give an analogous rule for the transitivity rule [TRANS] from PRHL. Given two product programs for the premises, it is not clear how to construct a product program for the conclusion; intuitively, we want to somehow interleave the product programs together while carefully aligning samples. Finding a ×PRHL version of this rule is an interesting open problem. 1 For instance, there is no boolean expression corresponding to universal or existential quantification; such an expression would typically not be computable. CHAPTER 3. FROM COUPLING PROOFS TO PRODUCT PROGRAMS ASSN-L ASSN-R SAMPLE-L SAMPLE-R § ª § ª x 1 ← e1 Ψ É x 1 〈1〉 ← e1 〈1〉 ` Ψ {e1 〈1〉/x 1 〈1〉} skip § ª ` Ψ {e2 〈2〉/x 2 〈2〉} skip x 2 ← e2 § ª Ψ É x 2 〈2〉 ← e2 〈2〉 § ª § ª $ d x1 ← 1 $ d ` ∀v ∈ supp(d1 ), Ψ {v/x 1 〈1〉} Ψ É x 1 〈1〉 ← 1 skip § ª ` ∀v ∈ supp(d2 ), Ψ {v/x 2 〈2〉} skip $ d x2 ← 2 § ª $ d Ψ É x 2 〈2〉 ← 2 § ª § ª § ª 0 § ª c1 c1 ` Φ ∧ e1 〈1〉 Ψ Éc ` Φ ∧ ¬e1 〈1〉 Ψ É c0 c2 c2 COND -L § ª § ª if e1 then c1 else c10 ` Φ Ψ É if e1 〈1〉 then c else c 0 c2 § ª § ª § ª § ª c1 c1 Ψ É c0 ` Φ ∧ e2 〈2〉 Ψ Éc ` Φ ∧ ¬e2 〈2〉 c2 c20 COND -R § ª § ª c1 ` Φ Ψ É if e2 〈2〉 then c else c 0 if e2 then c2 else c20 § ª ` Φ ∧ e1 〈1〉 WHILE-L § ª c1 Φ Éc |= Φ → Φ1 〈1〉 Φ1 |= while e1 do c1 lossless skip § ª § ª while e1 do c1 ` Φ Φ ∧ ¬e1 〈1〉 É while e1 〈1〉 do c skip § ª § ª skip ` Φ ∧ e2 〈2〉 Φ Éc |= Φ → Φ2 〈1〉 Φ2 |= while e2 do c2 lossless c2 WHILE-R § ª § ª skip ` Φ Φ ∧ ¬e2 〈2〉 É while e2 〈2〉 do c while e2 do c2 Figure 3.2: One-sided ×PRHL rules 28 CHAPTER 3. FROM COUPLING PROOFS TO PRODUCT PROGRAMS CONSEQ EQUIV CASE § ª § ª c1 |= Φ → Φ0 Ψ0 É c ` Φ0 c2 § ª § ª c1 Ψ Éc ` Φ c2 29 |= Ψ 0 → Ψ § ª 0 § ª c1 ` Φ Ψ É c0 c1 ≡ c10 c2 ≡ c20 c20 § ª § ª c1 ` Φ Ψ Éc c2 c ≡ c0 § ª § ª § ª § ª c1 c1 Ψ É c0 Ψ Éc ` Φ ∧ ¬e ` Φ∧e c2 c2 § ª § ª c1 ` Φ Ψ É if e then c else c 0 c2 FRAME § ª § ª c1 Ψ Éc FV(Θ) ∩ MV(c) = ∅ ` Φ c2 § ª § ª c1 ` Φ∧Θ Ψ ∧Θ É c c2 Figure 3.3: Structural ×PRHL rules WHILE-GEN |= Φ → (e1 〈1〉 ∨ e2 〈2〉) = e |= Φ ∧ e → p0 ⊕ p1 ⊕ p2 |= Φ ∧ p0 ∧ e → e1 〈1〉 = e2 〈2〉 |= Φ ∧ p1 ∧ e → e1 〈1〉 ∧ Φ1 〈1〉 |= Φ ∧ p2 ∧ e → e2 〈2〉 ∧ Φ2 〈2〉 Φ1 |= while e1 ∧ p1 do c1 lossless Φ2 |= while e2 ∧ p2 do c2 lossless § ª § ª (if e1 then c1 )K1 ` Φ ∧ e ∧ p0 Φ É c00 with K1 > 0, K2 > 0 (if e2 then c2 )K2 § ª § ª § ª § ª c1 skip ` Φ ∧ e1 ∧ p1 Φ É c10 ` Φ ∧ e2 ∧ p2 Φ É c20 skip c2 § ª § ª while e do if p0 then c00 while e1 do c1 ` Φ Φ ∧ ¬e1 〈1〉 ∧ ¬e2 〈2〉 É else if p1 then c10 else c20 while e2 do c2 Figure 3.4: Asynchronous loop rule [WHILE-GEN] for ×PRHL 3.2 An asynchronous loop rule The logic ×PRHL inherits two kinds of loop rules from PRHL. The two-sided rule relates two loops by relating their bodies, a useful principle since the loop bodies are often highly similar. However, this rule requires that the two loops remain synchronized under the coupling. The one-sided loop rules don’t require synchronization, but they are significantly weaker—they can only relate a loop to the trivial program skip. Taking a slightly broader view, each rule captures one way of analyzing loops: (i) relating a block of iterations in the first with a block of iterations in the second; (ii) relating one iteration in the first with no iterations in the second; and (iii) relating one iteration in the second with no iterations in the first. CHAPTER 3. FROM COUPLING PROOFS TO PRODUCT PROGRAMS 30 To support all three kinds of reasoning, we give a new rule [WHILE-GEN] in Fig. 3.4. The three analyses can be freely intermixed, resulting in a powerful principle for analyzing loops asynchronously. We will step through the premises from top to bottom, starting with the side-conditions. First, we specify an expression e in the product memory that is true if either loop guard is true. Then we specify three boolean flags p0 , p1 , p2 indicating which of the three cases to apply; exactly one of the flags must be true. The second group of premises ensure the flags and the loop guards are consistent: if p0 is true, then both guards should be true since we are relating iterations from both loops; if p1 is true, then the first guard e1 should be true since we want to relate one iteration in the first loop; if p2 is true, then the second guard e2 should be true to relate one iteration in the second loop. The remaining side-conditions guarantee the product programs for the one-sided cases terminate with probability 1; these conditions are needed for soundness. (Intuitively, the one-sided cases can effectively couple skip to a loop. This kind of coupling requires losslessness, as we saw in the one-sided loop rules and in Proposition 2.1.9.) The main ×PRHL premises handle the three cases. We write c K with a constant K for cK ¬ c ; · · · ; c | {z } K iterations The first ×PRHL premise handles the first case: p0 is true so we relate K1 iterations of the first loop with K2 iterations of the second loop, skipping iterations if either loop terminates early. The second and third ×PRHL premises handle the second and third cases: p1 or p2 is true, and we relate one iteration of the first or second side to skip. In the conclusion, the product program interleaves the two original loops depending on the case—it branches on p0 , p1 , p2 , and runs the product program from the corresponding premise. While we introduce [WHILE-GEN] for ×PRHL, simply dropping the product programs recovers a sound loop rule for PRHL. Some proofs that previously required reasoning outside of the program logic, for instance using program equivalences, can be handled with the extended loop rule. For example, consider the stochastic domination example we first saw in Example 2.1.17 with the program sdom: i ← 0; ct ← 0; while i < T do i ← i + 1; $ Flip; s← ct ← s ? ct + 1 : ct and recall we considered two versions of this program, sdom1 and sdom2 , where the number of iterations was T1 and T2 respectively with T1 ≤ T2 . When we previously proved the judgment ` sdom1 ∼ sdom2 : > =⇒ ct〈1〉 ≤ ct〈2〉, showing stochastic domination, we crucially used the program equivalence rule [EQUIV] to split the loop in sdom2 into two pieces, using the two-sided rule [WHILE] to analyze the first piece and the one-sided rule [WHILE-R] to analyze the second piece. The PRHL version of the general rule [WHILE-GEN] subsumes both loop rules, allowing us to freely switch between two-sided and one-sided reasoning. As a result, we can prove the desired judgment without transforming the programs by using [WHILE-GEN], with parameters K1 , K2 ¬ 1 p0 ¬ i〈1〉 < T1 p1 ¬ false p2 ¬ T1 ≤ i〈2〉 < T2 Φ ¬ (i〈1〉 < T1 → i〈1〉 = i〈2〉) ∧ ct〈1〉 ≤ ct〈2〉. When the first guard p0 is true, both loops have not terminated and we can analyze the bodies synchronously. The second guard p1 is always false since we never want to skip iterations on the second side, while the third guard CHAPTER 3. FROM COUPLING PROOFS TO PRODUCT PROGRAMS 31 p2 is true once the first program has terminated—in this case, we advance the second program alone. We take the couplings from before: the identity coupling in [SAMPLE] when p0 is true, and the one-sided rule [SAMPLE-R] when p2 is true. 3.3 Soundness of the logic The full proof system of ×PRHL is sound. Theorem 3.3.1 (Soundness of ×PRHL). Let ρ be a logical context. If a judgment is derivable § ª § ª c1 ρ` Φ Ψ É c× , c2 then it is valid: § ª § ª c1 ρ |= Φ Ψ É c× . c2 Proof sketch. By induction on the derivation, performing a case analysis on the final rule. Most of the cases are straightforward. The most complex case, by far, handles the asynchronous rule [WHILE-GEN]. While we can derive the other loop rules (the two-sided rule [WHILE] and the one-sided rules [WHILE-L]/[WHILE-R]) from [WHILE-GEN] and some basic program equivalences, we consider the simpler loop rules as separate cases to decompose the proof for [WHILE-GEN] as much as possible. We present the detailed proof in Appendix A. The natural counterpart to soundness is completeness: valid judgments should be derivable in the proof system. It is possible to show ×PRHL is complete in a certain sense for deterministic programs,2 but currently very little is known about probabilistic programs. We return to this point in Chapter 6. 3.4 Proving probabilistic convergence The coupled product generates the coupling in a ×PRHL judgment. By analyzing the product program, we can bound the probability of specific events in the coupling distribution to prove quantitative probabilistic relational properties. To demonstrate, we construct couplings in ×PRHL for proving convergence bounds for probabilistic processes, using standard coupling arguments and more advanced variants like shift coupling and path coupling. In each case, we first build the coupling as an ×PRHL judgment and then analyze the coupled product. Our main goal in this section is to demonstrate the product construction and to show how it mirrors the corresponding informal proof by coupling. While constructing the coupling and generating the coupled product are easily handled by ×PRHL, formally reasoning about the product program is more difficult. The target properties are probabilistic and non-relational, beyond the reach of ×PRHL. To keep the exposition as light as possible, we will sketch our proofs about the coupled product in a standard mathematical style instead of introducing a separate formal system (e.g., PPDL (Kozen, 1985) or PGCL (Morgan, McIver, and Seidel, 1996)). General-purpose theorem provers (such as COQ or AGDA) should also be able to prove the required properties after formalizing enough of probability theory, but such an approach would be quite heavy. Developing more lightweight, easier-to-use techniques for probabilistic non-relational properties remains a significant open challenge. 2 More formally, relatively complete for terminating programs given basic equivalences like c ≡ c; skip. CHAPTER 3. FROM COUPLING PROOFS TO PRODUCT PROGRAMS 32 We begin by revisiting the simple random walk program rwalk from Section 2.3: pos ← start; i ← 0; hist ← [start]; while i < T do i ← i + 1; $ Flip; r← pos ← pos + (r ? 1 : −1); hist ← pos :: hist Previously, we proved the following judgment in PRHL: ` rwalk ∼ rwalk : start〈2〉 − start〈1〉 = 2K =⇒ K + start〈1〉 ∈ hist〈1〉 → pos〈1〉 = pos〈2〉. The two walks are initially 2K apart and the predicate K + start〈1〉 ∈ hist〈1〉 is true exactly when the walks have met under the coupling. Replaying the proof using the corresponding ×PRHL rules yields § ª § ª rwalk ` start〈2〉 − start〈1〉 = 2K K + start〈1〉 ∈ hist〈1〉 → pos〈1〉 = pos〈2〉 É rwalk× , rwalk (3.1) where rwalk× is the following product program: pos〈1〉 ← start〈1〉; pos〈2〉 ← start〈2〉; i〈1〉 ← 0; i〈2〉 ← 0; hist〈1〉 ← [start〈1〉]; hist〈2〉 ← [start〈2〉]; while i〈1〉 < T do i〈1〉 ← i〈1〉 + 1; i〈2〉 ← i〈2〉 + 1; if pos〈1〉 = pos〈2〉 then $ Flip; r〈2〉 ← r〈1〉; r〈1〉 ← pos〈1〉 ← pos〈1〉 + (r〈1〉 ? 1 : −1); pos〈2〉 ← pos〈2〉 + (r〈2〉 ? 1 : −1); hist〈1〉 ← pos〈1〉 :: hist〈1〉; hist〈2〉 ← pos〈2〉 :: hist〈2〉 else $ Flip; r〈2〉 ← ¬r〈1〉; r〈1〉 ← pos〈1〉 ← pos〈1〉 + (r〈1〉 ? 1 : −1); pos〈2〉 ← pos〈2〉 + (r〈2〉 ? 1 : −1); hist〈1〉 ← pos〈1〉 :: hist〈1〉; hist〈2〉 ← pos〈2〉 :: hist〈2〉 The structure of the coupled product reflects the coupling proof. For instance, the loop is introduced by the two-sided rule [WHILE], and the conditional statement is introduced by the case analysis [CASE]. Intuitively, this program simulates two coupled random walks. Each iteration, the program branches on whether the positions of the two walks are equal or not, setting the two samples r〈1〉 and r〈2〉 to be equal if so, and opposite if not. Thus the positions pos〈1〉 and pos〈2〉 trace out two mirrored walks when the positions are different, and a single walk once the positions coincide. Now, we can bound the distance between the position distributions in the original walks by bounding the probability of K + start〈1〉 ∈ / hist〈1〉 in rwalk× . We need a basic result from the theory of random walks. Theorem 3.4.1 (see, e.g., Levin et al. (2009, Theorem 2.17)). Let X 0 , X 1 , . . . be the positions of a simple random walk on the integers starting at X 0 = q ∈ Z. The probability the walk does not reach 0 within t steps is at most 12q Pr[X 0 , . . . , X t 6= 0] ≤ p . t CHAPTER 3. FROM COUPLING PROOFS TO PRODUCT PROGRAMS 33 Now we bound the rate of convergence of two random walks. Theorem 3.4.2. Let m1 , m2 be two memories such that m2 (start) − m1 (start) = 2K for K ∈ Z. Let µ1 , µ2 be the final distributions over memories: µ1 ¬ ¹rwalkºm1 and µ2 ¬ ¹rwalkºm2 . Let η1 , η2 be the final distributions over positions: η1 ¬ ¹posº] (µ1 ) and η2 ¬ ¹posº] (µ2 ). Then the distance between the two output distributions over positions is at most 12K dtv (η1 , η2 ) ≤ p . T Proof. The basic idea is to analyze the coupled product in the ×PRHL judgment Eq. (3.1) and then apply the coupling method (Theorem 2.1.16), but we need to handle one detail before we can string these results together. The coupling method requires a coupling such that the two samples are equal with high probability, but the coupling from the post-condition of Eq. (3.1) only describes when the two positions are equal—the coupling is a distribution over pairs of whole memories, which may be different even if the positions are equal. To address this issue, let µ× be the witness in Eq. (3.1) generated by the coupled product and let η× be the projection to the positions: µ× ¬ ¹rwalk× º(m1 , m2 ) and η× ¬ ¹(pos〈1〉, pos〈2〉)º] (µ× ). We directly calculate Pr (p1 ,p2 )∼η× [p1 6= p2 ] = ≤ Pr [m1 (pos〈1〉) 6= m2 (pos〈2〉)] Pr [(m1 , m2 ) ∈ ¹K + start〈1〉 ∈ / hist〈1〉º], (m1 ,m2 )∼µ× (m1 ,m2 )∼µ× where the inequality follows by the post-condition in Eq. (3.1): pairs of memories satisfying K + start〈1〉 ∈ hist〈1〉 must have equal positions. So, it suffices to upper bound the probability of K + start〈1〉 ∈ / hist〈1〉. Looking at the coupled product rwalk× , as long as the two walks have not met, the distance between the two coupled walks behaves like a single random walk: increasing by 2 with probability 1/2, decreasing by 2 with probability 1/2. This derived random walk starts at start〈2〉−start〈1〉 = 2K; if it reaches 0 before T steps, then the two original walks meet and K +start〈1〉 ∈ hist〈1〉 holds. Accordingly, Theorem 3.4.1 gives 12K [(m1 , m2 ) ∈ ¹K + start〈1〉 ∈ / hist〈1〉º] ≤ p (m1 ,m2 )∼µ× T Pr so we can conclude dtv (η1 , η2 ) = dtv (π1 (η× ), π2 (η× )) ≤ 12K [p1 6= p2 ] ≤ p , (p1 ,p2 )∼η× T Pr where the first inequality follows by the coupling method (Theorem 2.1.16). Hence, the distributions approach one another as the number of timesteps T increases. CHAPTER 3. FROM COUPLING PROOFS TO PRODUCT PROGRAMS 3.5 34 Shift couplings In the previous example, we were able to construct the coupling synchronously because the two coupled walks meet at the same iteration. This may not be the case in more complex proofs. To demonstrate, we consider an example of a shift coupling—a coupling where the two processes meet at two random timesteps. To construct this kind of coupling, we cannot use the synchronous rule [WHILE] since we may need to relate samples across different iterations. Instead, we will apply our asynchronous rule [WHILE-GEN]. Our example is called the Dynkin process.3 This process maintains a position pos ∈ N, initialized to start ∈ [0, . . . , 10]. Each step, it draws a uniformly random number r from [1, . . . , 10] and increments the position by r. The process stops as soon as pos exceeds T ∈ N, returning the final value as the output. The following code implements the Dynkin process: pos ← start; hist ← [start]; while pos < T do $ Unif([1, . . . , 10]); r← pos ← pos + r; hist ← pos :: hist We call this program dynkin and we write dynbody for the loop body. We use a ghost variable hist to keep track of the history of visited positions, just like we did for the random walk. We will analyze two executions of dynkin starting at different locations and show the distributions over final positions converge as T increases. Before seeing the proof in ×PRHL, let’s first sketch the coupling argument. If the two processes have the same position, then we couple the samplings to return equal values; this keeps the two positions equal. Otherwise, we sample in the process that is behind, temporarily pausing the leading process. Since the sampled process moves at least one step forward in each iteration, the lagging process will overtake (or land on) the leading process in finitely many steps, when we will switch to one of the other cases. We perform this reasoning in ×PRHL using [WHILE-GEN] with K1 = K2 = 1. We take the joint guard e ¬ (pos〈1〉 < T ) ∨ (pos〈2〉 < T ), and flags p0 ¬ pos〈1〉 = pos〈2〉 and p1 ¬ pos〈1〉 < pos〈2〉 and p2 ¬ pos〈1〉 > pos〈2〉. These cases are clearly mutually exclusive, and one is always true. Furthermore, they satisfy the necessary consistency requirements: |= p1 ∧ e → (pos〈1〉 < T ) and |= p2 ∧ e → (pos〈2〉 < T ) both hold. Finally, the loops are clearly lossless: the position increases by at least 1 every iteration, so we are in any case for at most T iterations. With the side-conditions out of the way, we now turn to the main premises. We take the following invariant:   |hist〈1〉| > 0 ∧ |hist〈2〉| > 0     6 ∅ → pos〈1〉 = pos〈2〉 hist〈1〉 ∩ hist〈2〉 = Θ ¬ |pos〈1〉 − pos〈2〉| ≤ 10    hd(hist〈1〉) = pos〈1〉 ∧ hd(hist〈2〉) = pos〈2〉    ∀t ∈ t l(hist〈2〉), pos〈1〉 > t ∧ ∀t ∈ t l(hist〈1〉), pos〈2〉 > t Reading from the top, the first line states that the history lists are non-empty. The second conjunct says that if the two processes have visited the same position at some point in the past, then they currently have the same position. The third conjunct states that the coupled positions are at most 10 apart at all times. The fourth line states that the current position is the first element in each history list, and the last two conjuncts state that the position in 3 The name comes from a magic trick, known as Dynkin’s card trick or Kruskal’s count. CHAPTER 3. FROM COUPLING PROOFS TO PRODUCT PROGRAMS 35 each process is strictly larger than all the previous positions of the other process; this holds because we always move the lagging process. (We write t l(hist) for the tail of a list hist, consisting of all but the first element.) We now prove the three main premises in [WHILE-GEN]. Premise p0 When p0 is true, pos〈1〉 = pos〈2〉 and we need to prove § ª § ª if pos < T then dynbody ` Θ ∧ e ∧ p0 Θ É dynkin×0 . if pos < T then dynbody Since both guards are true, we use the two-sided rule [COND]. We use [SAMPLE] with f = id (the identity coupling), and then the usual assignment rule [ASSN]. The invariant is preserved since p0 remains true. So, we have the desired judgment with product program dynkin×0 : if pos〈1〉 < T then $ Unif([1, . . . , 10]); r〈1〉 ← r〈2〉 ← r〈1〉; pos〈1〉 ← pos〈1〉 + r〈1〉; pos〈2〉 ← pos〈2〉 + r〈2〉; hist〈1〉 ← pos〈1〉 :: hist〈1〉; hist〈2〉 ← pos〈2〉 :: hist〈2〉 Premise p1 When p1 is true, pos〈1〉 < pos〈2〉 and we need to prove § ª § ª if pos < T then dynbody ` Θ ∧ (pos〈1〉 < T ) ∧ p1 Θ É dynkin×1 . skip Since we are relating a program to skip, we apply the one-sided rules. To show we preserve Θ, note that hist〈1〉 and hist〈2〉 are both non-empty and hist〈1〉 ∩ hist〈2〉 is initially empty since pos〈1〉 < pos〈2〉, so if hist〈1〉 ∩ hist〈2〉 6= ∅ after the loop body then we must have pos〈1〉 ∈ hist〈2〉. The next conjunct |pos〈1〉 − pos〈2〉| ≤ 10 also holds, since (i) it holds initially, (ii) pos〈1〉 < pos〈2〉 initially, and (iii) pos〈1〉 moves forward by at most 10. The conjuncts involving the head of hist are clear. For the last two conjuncts, hist〈2〉 is unchanged while pos〈1〉 increases, so ∀t ∈ t l(hist〈2〉), pos〈1〉 > t continues to hold. Similarly, if hist〈1〉 is initially q :: ps where q is the initial value of pos〈1〉, then it ends up being pos〈1〉 :: q :: ps. Since pos〈2〉 is initially greater than all elements in ps and also greater than q since p1 holds, we continue to have ∀t ∈ t l(hist〈1〉), pos〈2〉 > t after executing the body. So, we have the desired judgment with the following product program dynkin×1 : if pos〈1〉 < T then $ Unif([1, . . . , 10]); r〈1〉 ← pos〈1〉 ← pos〈1〉 + r〈1〉; hist〈1〉 ← pos〈1〉 :: hist〈1〉 CHAPTER 3. FROM COUPLING PROOFS TO PRODUCT PROGRAMS 36 Premise p2 This case is nearly identical to the previous case, using the right-side versions instead of left-side versions of the rules. By a symmetric argument, we have § ª ` Θ ∧ (p〈2〉 < T ) ∧ p2 skip if pos < T then dynbody § ª Θ É dynkin×2 where dynkin×2 is the following product program: if pos〈2〉 < T then $ Unif([1, . . . , 10]); r〈2〉 ← pos〈2〉 ← pos〈2〉 + r〈2〉; hist〈2〉 ← pos〈2〉 :: hist〈2〉 Putting it all together Applying [WHILE-GEN], we have the judgment § ª ª § dynkin ` start〈1〉, start〈2〉 ∈ [1, . . . , 10] hist〈1〉 ∩ hist〈2〉 = 6 ∅ → pos〈1〉 = pos〈2〉 É dynkin× dynkin (3.2) for the following product program dynkin× : pos〈1〉 ← start〈1〉; pos〈2〉 ← start〈2〉 hist〈1〉 ← [start〈1〉]; hist〈2〉 ← [start〈2〉]; while (pos〈1〉 < T ) ∨ (pos〈2〉 < T ) do if pos〈1〉 = pos〈2〉 then if pos〈1〉 < T then $ Unif([1, . . . , 10]); r〈1〉 ← r〈2〉 ← r〈1〉; pos〈1〉 ← pos〈1〉 + r〈1〉; pos〈2〉 ← pos〈2〉 + r〈2〉; hist〈1〉 ← pos〈1〉 :: hist〈1〉; hist〈2〉 ← pos〈2〉 :: hist〈2〉 else if pos〈1〉 < pos〈2〉 then if pos〈1〉 < T then $ Unif([1, . . . , 10]); r〈1〉 ← pos〈1〉 ← pos〈1〉 + r〈1〉; hist〈1〉 ← pos〈1〉 :: hist〈1〉 else if pos〈2〉 < T then $ Unif([1, . . . , 10]); r〈2〉 ← pos〈2〉 ← pos〈2〉 + r〈2〉; hist〈2〉 ← pos〈2〉 :: hist〈2〉 This program models the informal coupling proof: if the positions are equal, we take equal samples and move both processes; otherwise, we move the lagging process while holding the leading process fixed. We can analyze this program to show convergence of two Dynkin processes. Theorem 3.5.1. Let m1 , m2 be two memories such that m1 (start), m2 (start) ∈ [0, 10]. Let µ1 , µ2 be the final distributions over memories: µ1 ¬ ¹dynkinºm1 and µ2 ¬ ¹dynkinºm2 . CHAPTER 3. FROM COUPLING PROOFS TO PRODUCT PROGRAMS 37 Let η1 , η2 be the final distributions over positions: η1 ¬ ¹posº] (µ1 ) and η2 ¬ ¹posº] (µ2 ). Then the distance between the two position distributions is at most dtv (η1 , η2 ) ≤ (9/10)bT /10c−1 . Proof. If T ≤ 10, the claim is trivial. Otherwise, let µ× be the coupling in Eq. (3.2) and let η× be the coupling projected to the two positions: µ× ¬ ¹dynkin× º(m1 , m2 ) and η× ¬ ¹(pos〈1〉, pos〈2〉)º] (µ× ). We directly calculate Pr (p1 ,p2 )∼η× [p1 6= p2 ] = ≤ Pr [m1 (pos) 6= m2 (pos)] Pr [(m1 , m2 ) ∈ ¹hist〈1〉 ∩ hist〈2〉 = ∅º], (m1 ,m2 )∼µ× (m1 ,m2 )∼µ× where the inequality follows by the post-condition of Eq. (3.2): pairs of memories where hist〈1〉 ∩ hist〈2〉 is non-empty do not have different positions. We turn to the product program to bound the last quantity. If the two process have not met yet, then hist〈1〉 ∩ hist〈2〉 = ∅. Since the processes are at most 10 apart, in each iteration of the loop there is a 9/10 chance the lagging process misses the leading process, preserving hist〈1〉 ∩ hist〈2〉 = ∅. Since both processes move at most 10 positions each iteration, there are at least bT /10c − 1 iterations so Pr (m1 ,m2 )∼µ× [(m1 , m2 ) ∈ ¹hist〈1〉 ∩ hist〈2〉 = ∅º] ≤ (9/10)bT /10c−1 . By the coupling method (Theorem 2.1.16), we conclude dtv (η1 , η2 ) ≤ 3.6 Pr (p1 ,p2 )∼η× [p1 6= p2 ] ≤ (9/10)bT /10c−1 . Path couplings So far we have used couplings to analyze several Markov chains, iterative processes where the state is a randomized function of the previous state. The main state space in our examples has been the integers—the position in the random walk or Dynkin process, or the count of the number of heads in the stochastic domination example. For more complex state spaces it can be unclear how to couple the samplings to guide the two states towards one another, especially if the states are many transitions apart. To address this issue, Bubley and Dyer (1997) proposed the path coupling method, a powerful tool to construct couplings. Before describing their idea, we first set some definitions. Definition 3.6.1. Let Ω be a finite set of states. We say a metric d : Ω × Ω → N is a path metric if whenever d(s, s0 ) > 1, there exists s00 6= s, s0 such that d(s, s0 ) = d(s, s00 ) + d(s00 , s0 ). We say two states s, s0 are adjacent if d(s, s0 ) = 1. The diameter ∆ of the state space is the maximum distance between any two states. A Markov chain on Ω is defined by iterating a transition function τ : Ω → Distr(Ω) starting from some initial state. Then the main theorem of path coupling is as follows. CHAPTER 3. FROM COUPLING PROOFS TO PRODUCT PROGRAMS 38 Theorem 3.6.2 (Bubley and Dyer (1997)). Consider a Markov chain with transition function τ over a state space Ω with path metric d and diameter at most ∆. Suppose for any two adjacent states s and s0 , there exists a coupling µ of τ(s), τ(s0 ) with E [d(r, r 0 )] ≤ β. (r,r 0 )∼µ (T ) (T ) Let µ1 , µ2 be the final distributions from starting in any two states s1 , s2 and running T steps of the Markov chain. (T ) (T ) Then there is a coupling µ of µ1 , µ2 with € Š (T ) (T ) dtv µ1 , µ2 ≤ Pr [r 6= r 0 ] ≤ β T ∆. (r,r 0 )∼µ In particular, the distributions converge in total variation distance exponentially quickly if β < 1. Intuitively, path coupling can be seen as a transitivity principle for couplings: if we can couple the distributions after one step from any two adjacent states, then we can extend to a coupling on distributions from any two initial states. While we are not able to internalize this principle in ×PRHL due to the required bounds on expectations, we can still construct and analyze the one-step couplings. (We consider how to handle expected distance bounds and couplings in Chapter 6.) We present two examples from the original paper by Bubley and Dyer (1997). Glauber dynamics: sampling a proper coloring The Markov chain in our first example samples approximately uniform graph colorings. It was first analyzed by Jerrum (1995); we follow the subsequent, simpler analysis by Bubley and Dyer (1997) using path coupling. Recall that a finite graph G consists of a finite set V of vertices and a symmetric binary relation E relating vertices that are connected by an edge; we let N G (v) ⊆ V denote the neighbors of a vertex v, i.e., the set of vertices with an edge to v. We write D for the degree of G, i.e., | N G (v)| ≤ D for all v. We write n ¬ |V | for the number of vertices. Let C be a finite set of colors; we write k ¬ |C| for the number of colors. A coloring of G is a map w : V → C assigning a color to each vertex; the state space of our Markov chain will be the set of colorings. Let the path distance d on the state space be the number of vertices colored differently under two colorings; evidently, the diameter ∆ of this state space is at most the number of vertices n. A coloring is valid (also called proper) if w(v) and w(v 0 ) have distinct colors for all (v, v 0 ) ∈ E. The following program models T steps of the Glauber dynamics: i ← 0; while i < T do ; $ Unif(V ); v← $ Unif(C); c← if V G (w, v, c) then w ← w[v 7→ c]; i ← i+1 where the guard V G (w, v, c) holds when c is valid at v in w, namely, when there is no neighbor of v colored with c in w. Informally, the algorithm starts from a coloring w and iteratively modifies it by uniformly sampling a vertex v and a color c, recoloring v with c if it is locally valid. We focus on the loop body, which encodes the transition function of the Markov chain: $ Unif(V ); v← $ c ← Unif(C); if V G (w, v, c) then w ← w[v 7→ c] We call this program glauber. To apply path coupling (Theorem 3.6.2), we must find a coupling where the expected distance between coupled states is small when w〈1〉 and w〈2〉 are initially adjacent. CHAPTER 3. FROM COUPLING PROOFS TO PRODUCT PROGRAMS 39 Theorem 3.6.3. Let m1 , m2 be memories with m1 (w), m2 (w) adjacent colorings. Let µ1 , µ2 be the distributions over memories after running one step of the transition function: µ1 ¬ ¹glauberºm1 and µ2 ¬ ¹glauberºm2 . Let η1 , η2 be the respective distributions over colorings: η1 ¬ ¹wº] (µ1 ) and η2 ¬ ¹wº] (µ2 ). Then there is a coupling η× of (η1 , η2 ) with E (w1 ,w2 )∼η× (T ) (T ) If η1 , η2 [d(w1 , w2 )] ≤ 1 − 1/n + 2D/kn. are the distributions over the final colorings after T steps starting from any two colorings, then € Š (T ) (T ) dtv η1 , η2 ≤ (1 − 1/n + 2D/kn) T · n. Proof. Suppose the initial memories contain adjacent colorings w〈1〉 and w〈2〉. First, we couple the sampling from Unif(V ) with [SAMPLE], using the identity coupling f = id. Now notice that the two initial states w〈1〉 and w〈2〉 differ in the color for a single vertex, call it v0 . Letting a ¬ w1 (v0 ) and b ¬ w2 (v0 ), we perform a case analysis on the sampled vertex with [CASE]. If v is a neighbor of the differing vertex v0 , applying [SAMPLE] with the transposition bijection πab : C → C defined by  b πab (x) ¬ a  x :x=a :x=b : otherwise ensures c〈2〉 = πab (c〈1〉). Otherwise, [SAMPLE] with the identity coupling ensures c〈1〉 = c〈2〉. By applying the one-sided rules for conditionals ([COND -L] and [COND -R]) to the left and the right programs, we have § ª § ª glauber ` d(w〈1〉, w〈2〉) = 1 d(w〈1〉, w〈2〉) ≤ 2 É glauber× , (3.3) glauber where glauber× is the following product program: $ Unif(V ); v〈2〉 ← v〈1〉; v〈1〉 ← if v〈1〉 ∈ N G (v0 ) then $ Unif(C); c〈2〉 ← πab (c〈1〉) c〈1〉 ← else $ Unif(C); c〈2〉 ← c〈1〉 c〈1〉 ← if V G (w〈1〉, v〈1〉, c〈1〉) then w〈1〉 ← w〈1〉[v〈1〉 7→ c〈1〉] if V G (w〈2〉, v〈2〉, c〈2〉) then w〈2〉 ← w〈2〉[v〈2〉 7→ c〈2〉] We analyze this program to bound the expected distance between states under the coupling. Let the coupling on memories be µ× ¬ ¹glauber× º(m1 , m2 ), and let the coupling on the final colorings be η× ¬ ¹(w〈1〉, w〈2〉)º] (µ× ). We have: E (w1 ,w2 )∼η× [d] = 0 · Pr (w1 ,w2 )∼η× [d = 0] + 1 · Pr (w1 ,w2 )∼η× [d = 1] + 2 · Pr (w1 ,w2 )∼η× [d = 2] CHAPTER 3. FROM COUPLING PROOFS TO PRODUCT PROGRAMS =1− ≤1− + Pr [d = 0] + Pr [m1 (v) = v0 ∧ V G (m1 (w), v0 , m1 (c))] (w1 ,w2 )∼η× (m1 ,m2 )∼µ× Pr (w1 ,w2 )∼η× 40 [d = 2] Pr [m1 (v) ∈ N G (v0 ) ∧ m1 (c) = b]  ‹ 1 D D 1 2D ≤1− 1− + =1− + . n k nk n nk (m1 ,m2 )∼µ× The equalities hold because the distance between the resulting colorings is at most two by the post-condition of Eq. (3.3), so 1 = Pr[d = 0] + Pr[d = 1] + Pr[d = 2]. The first inequality follows since the distance decreases to zero if we select a valid color at v0 , and the distance can only increase to two if we select a neighbor of v0 and pick the color combination (c〈1〉, c〈2〉) = (b, a). The last step follows since each vertex has at most D neighbors, so there are at at least k − D valid colors at any vertex; in particular, the distance decreases to zero if we select v0 (probability 1/n) and a valid color (probability at least 1 − D/k). Thus, we have constructed a coupling η× such that E (w1 ,w2 )∼η× [d(w1 , w2 )] ≤ 1 − 1/n + 2D/kn. By the path coupling theorem (Theorem 3.6.2), we can bound the distance between the T -step distributions (T ) (T ) η1 , η2 over w from any two initial colorings: € Š (T ) (T ) dtv η1 , η2 ≤ (1 − 1/n + 2D/kn) T · n. When the number of colors k is at least 2D + 1, the right-hand side tends to zero exponentially quickly. Remark 3.6.4. Theorem 3.6.3 bounds how fast the Glauber dynamics converges, started from any two colorings. Using basic facts about Markov chains, it is not hard to show that the Glauber dynamics has the uniform distribution over valid colorings of G as a stationary distribution (a distribution η ∈ Distr(Ω) such that bind(η, τ) = η).4 As a consequence, the Glauber dynamics started in any valid coloring converges exponentially quickly to the uniform distribution over valid colorings when k ≥ 2D + 1. To see this, let µ be the distribution on colorings after T steps started from some valid coloring. Suppose there are M valid colorings on G, and let µ1 , . . . , µ M be the corresponding distributions over colorings after T steps. Since the uniform distribution η is stationary, we have η= 1 1 · µ1 + · · · + · µM . M M For every i, Theorem 3.6.3 gives dtv (µ, µi ) ≤ (1 − 1/n + 2D/kn) T · n. By linearity of TV distance, the output distribution approaches the uniform distribution over valid colorings: dtv (µ, η) ≤ (1 − 1/n + 2D/kn) T · n. Condensed hard-core lattice gas: sampling an independent set Our second example is a Markov chain from statistical physics modeling the evolution of a physical system in the conserved hard-core lattice gas (CHLG) model (Bubley and Dyer, 1997). Suppose we have a finite set P of particles, 4 The Glauber dynamics takes any valid coloring to another valid coloring, and the probability of transitioning from w to w0 is equal to the probability of transitioning from w0 to w, so the Glauber dynamics is reversible over the valid colorings and hence the uniform distribution is stationary. CHAPTER 3. FROM COUPLING PROOFS TO PRODUCT PROGRAMS 41 s ¬ |P| in total, and we have a finite graph G = (V, E) with degree at most D. A placement is a map w : P → V placing each particle at a vertex of the graph. We wish to set the particles so that each vertex has at most one particle and no two particles are located at adjacent vertices; we call such a placement safe. (In other words, a safe placement is an independent set.) We analyze a Markov chain to sample a uniformly random safe placement. Take the state space Ω to be the set of all placements (not necessarily safe). The Markov chain starts from an initial placement. Each step, it samples a particle p from P and a vertex v from V uniformly at random, and tries to relocate p to v. If p is safe at v, then the Markov chain updates the placement; otherwise, it leaves the placement unchanged. We model T steps of this dynamics with the following program: i ← 0; while i < T do ; $ Unif(P); p← $ Unif(V ); v← if S G (w, p, v) then w ← w[p 7→ v]; i ← i+1 where the guard S G (w, p, v) holds when p is valid at v in w, i.e., when there is no other particle located at v or its neighbors. We let the path metric d be the number of particles with different locations under two placements; evidently, the diameter of the state space is at most s. To build a coupling on the one-step distributions from adjacent initial placements, we analyze the transition function chlg extracted from the loop body: $ Unif(P); p← $ v ← Unif(V ); if S G (w, p, v) then w ← w[p 7→ v] Theorem 3.6.5. Let m1 , m2 be memories with m1 (w), m2 (w) adjacent placements. Let µ1 , µ2 be the respective distributions over memories after running one step of the transition function: µ1 ¬ ¹chlgºm1 and µ2 ¬ ¹chlgºm2 . Let η1 , η2 be the respective distributions over placements: η1 ¬ ¹wº] (µ1 ) and η2 ¬ ¹wº] (µ2 ). Then there is a coupling η× of (η1 , η2 ) such that  ‹ ‹ 1 3(D + 1) [d(w1 , w2 )] ≤ β ¬ 1 − 1+ . s n (w1 ,w2 )∼η× E (T ) (T ) If η1 , η2 are the distributions over final placements after T steps starting from any two placements, then € Š (T ) (T ) dtv η1 , η2 ≤ β T · s. Proof. To couple the two runs we use [SAMPLE] with f = id twice, ensuring p〈1〉 = p〈2〉 and v〈1〉 = v〈2〉. Then we apply the one-sided rules for conditionals ([COND -L] and [COND -R]) to the left and the right sides to prove § ª § ª chlg ` d(w〈1〉, w〈2〉) = 1 d(w〈1〉, w〈2〉) ≤ 2 É chlg× chlg (3.4) CHAPTER 3. FROM COUPLING PROOFS TO PRODUCT PROGRAMS 42 where chlg× is the following product program: $ Unif(P); p〈1〉 ← p〈2〉 ← p〈1〉; $ Unif(V ); v〈1〉 ← v〈2〉 ← v〈1〉; if S G (w〈1〉, p〈1〉, v〈1〉) then w〈1〉 ← w〈1〉[p〈1〉 7→ v〈1〉] if S G (w〈2〉, p〈2〉, v〈2〉) then w〈2〉 ← w〈2〉[p〈2〉 7→ v〈2〉] Now we bound the expected distance between the final placements. The two initial placements w〈1〉 and w〈2〉 differ in the position of a single particle p0 , located at vertex a and b in w〈1〉 and w〈2〉 respectively. Let the coupling on output distributions be µ× ¬ ¹chlg× º(m1 , m2 ) and let the coupling on placement distributions be η× ¬ ¹(w〈1〉, w〈2〉)º] (µ× ). We have: E (w1 ,w2 )∼η× [d] =1− =1− + [d = 0] + Pr [m1 (p) = p0 ∧ S G (m1 (w), m1 (p), m1 (v))] (m1 ,m2 )∼µ× Pr (m1 ,m2 )∼µ× ≤1− + Pr (w1 ,w2 )∼η× Pr Pr [d = 2] [m1 (p) 6= p0 ∧ (S G (m1 (w), m1 (p), m1 (v)) 6= S G (m2 (w), m2 (p), m2 (v)))] (m1 ,m2 )∼µ× (m1 ,m2 )∼µ× Pr (w1 ,w2 )∼η× [m1 (p) = p0 ∧ S G (m1 (w), m1 (p), m1 (v))] [m1 (p) 6= p0 ∧ ¬(S G (m1 (w), m1 (p), m1 (v)) ∧ S G (m2 (w), m2 (p), m2 (v)))] To bound the first probability, the probability of selecting particle p0 is 1/s and the selected particle is safe at v if it avoids the other s − 1 locations and their neighbors (at most (s − 1)(D + 1) bad locations). To bound the second probability, the probability of selecting a particle not equal to p0 is 1 − 1/s, and p is safe at v on both sides unless we select the position a, b, or one of their neighbors (at most 2(D + 1) bad points). Putting everything together, we conclude  ‹  ‹ ‹ 1 (s − 1)(D + 1) 1 2(D + 1) [d(w1 , w2 )] ≤ 1 − 1− + 1− E s n s n (w1 ,w2 )∼η×  ‹ ‹ 1 3(D + 1) = 1− 1+ ¬ β. s n By the path coupling theorem (Theorem 3.6.2), we can bound the distance between the T -step distributions (T ) (T ) η1 , η2 over final placements from any two initial placements: € Š (T ) (T ) dtv η1 , η2 ≤ β T · s. When β < 1, the distributions converge exponentially quickly. Remark 3.6.6. Like the Glauber dynamics, this Markov chain also has the uniform distribution over safe placements as a stationary distribution. Theorem 3.6.5 shows the distribution over placements converges exponentially quickly to this distribution when β < 1, starting from any safe placement. Bubley and Dyer (1997) actually proved a stronger version of Theorem 3.6.5:  ‹ ‹ 1 2(D + 1) [d(w1 , w2 )] ≤ 1 − 1+ , E s n (w1 ,w2 )∼η× CHAPTER 3. FROM COUPLING PROOFS TO PRODUCT PROGRAMS 43 which is sharper than our bound ‹ ‹  3(D + 1) 1 1+ . [d(w1 , w2 )] ≤ 1 − E s n (w1 ,w2 )∼η× Their analysis used the maximal coupling to couple the state distributions from sampling and updating the placement, giving a tighter bound on the expected distance. While it is technically possible to extend ×PRHL with a sampling rule modeling the maximal coupling, with the corresponding product program drawing correlated samples from the witness distribution, the result would be somewhat unnatural. First, we would need to describe the witness distribution precisely—the maximal coupling µ of two distributions µ1 , µ2 satisfies the equation dtv (µ1 , µ2 ) = Pr (a1 ,a2 )∼µ [a1 6= a2 ] but the probabilities of other events are not specified. In general, there could be multiple possible witnesses to the maximal coupling, and it is unclear which witness should the canonical choice. Furthermore, the maximal coupling is defined in terms of the probability of samples being different. This makes the maximal coupling a poor fit for our logics, which describe the support of the witness via probabilistic lifting. We would only be able to prove the trivial post-condition after applying the maximal coupling; the properties of the maximal coupling would then enter as axioms when verifying the coupled product. 3.7 Comparison with existing product programs Product constructions reduce a relational property of two programs to a non-relational property of a single program, so that more standard techniques can be brought to bear. We close this chapter by comparing our coupled product to other existing constructions. Almost all product constructions were originally designed with non-probabilistic programs in mind, targeting relational properties like information flow and correctness of compiler transformations. These approaches include self composition (Barthe, D’Argenio, and Rezk, 2011b), the cross product (Zaks and Pnueli, 2008), type-directed product programs (Terauchi and Aiken, 2005), and more (Barthe, Crespo, and Kunz, 2011a, 2013a). A basic consideration is how to handle different control flow in the two programs. If the two programs have the same shape and always take the same branches, the product program can interleave instructions from the two programs. If the two programs are very different or if the control flows are not synchronized, an asynchronous construction can combine the two programs sequentially. These approaches have different strengths and weaknesses. By placing corresponding instructions close to one another, synchronized constructions can better leverage similarity between programs and can often be verified with simpler invariants and more local reasoning. However, asynchronous products apply to a wider range of programs. The design of ×PRHL, and in particular the asynchronous rule [WHILE-GEN], allows product programs that are both synchronous and asynchronous. Probabilistic programs introduce additional challenges for product constructions. Existing constructions can be blindly applied to randomized programs, but the results use two independent sources of randomness, and are difficult to reason about—there is no coordination between the two programs on sampling instructions, whether the construction has a synchronous structure or not. A notable exception is the product construction by Barthe, Gaboardi, Gallego Arias, Hsu, Kunz, and Strub (2014b), which is specialized to proving differential privacy. Their construction eliminates the random sampling statements entirely, yielding a synchronized, non-probabilistic product. In fact, their product is based on a variant of probabilistic couplings called approximate liftings; we turn to these couplings in the rest of the thesis. Chapter 4 Approximate couplings for differential privacy The first half of this thesis connected proofs by coupling with the logic PRHL, using ideas from the former to enhance the latter. We now explore a similar connection in reverse, using concepts from program logics to develop a novel form of probabilistic coupling and a new proof technique. Our starting point is APRHL, an approximate version of P RHL proposed by Barthe et al. (2013c) for verifying differential privacy, a statistical notion of data privacy. This logic was originally based on an approximate version of probabilistic lifting. By interpreting approximate liftings as a generalization of probabilistic coupling and reverse-engineering an approximate version of proof by coupling from APRHL, we can give a powerful method to prove differential privacy. After briefly reviewing differential privacy (Section 4.1), we propose a new definition of approximate lifting and explore its theoretical properties (Section 4.2); our approximate liftings are a natural, approximate version of probabilistic couplings. To build approximate couplings, we review a core version APRHL (Section 4.3) and extract a proof technique inspired by the logic, called proof by approximate coupling (Section 4.4). We then extend APRHL with proof rules modeling new approximate couplings (Section 4.5) and a principle called pointwise equality for proving differential privacy (Section 4.6). As applications, we give new proofs of privacy for the Report-noisy-max and Sparse Vector mechanisms (Section 4.7). Our approximate coupling proofs are significantly cleaner than existing arguments, and can be formalized in APRHL, enabling the first formal privacy proofs for these mechanisms. Finally, we survey other verification techniques for differential privacy, and research on approximate liftings (Section 4.8). 4.1 Differential privacy preliminaries Differential privacy, proposed by Dwork, McSherry, Nissim, and Smith (2006), is a strong, probabilistic notion of data privacy that has attracted intensive attention across computer science and beyond. Differential privacy is a relational property of probabilistic programs. Definition 4.1.1. Let ", δ be non-negative parameters. Consider a set D with a binary adjacency relation Adj; we sometimes call D the set of databases. Let the range R be a set of possible outputs. A function M : D → Distr(R)— often called a mechanism—is (", δ)-differentially private if for all pairs of adjacent inputs (d, d 0 ) ∈ Adj and all subsets S ⊆ R of outputs, we have M (d)(S ) ≤ exp(") · M (d 0 )(S ) + δ. When δ = 0, we say M is "-differentially private. The adjacency relation describes which pairs of databases should lead to approximately indistinguishable outputs—intuitively, which pairs of databases differ only in the data of a single person. For instance, if a database is a set of records belonging to different people, we can consider two databases to be adjacent if they are identical except for an additional individual’s record in one database. Then under differential privacy, a mechanism’s output 44 CHAPTER 4. APPROXIMATE COUPLINGS FOR DIFFERENTIAL PRIVACY 45 must be nearly the same whether any single individual’s private data is part of the input or not. The degree of similarity—and the strength of the privacy guarantee—are governed by the parameters " and δ: smaller values give stronger guarantees, while larger values give weaker guarantees. While typical notions of adjacency are symmetric, much of the theory of differential privacy applies to arbitrary relations. However, there are a few notable results that crucially need a symmetric adjacency relation—we will highlight these cases as they arise. Standard private mechanisms The most basic example of a differentially private mechanism is the Laplace mechanism, which evaluates a numeric query on a database and adds random noise drawn from the Laplace distribution. For instance, the target query could compute the average age, or count the number of patients with a certain disease. While the Laplace distribution is a continuous distribution over the real numbers, we work with a discrete version to avoid measuretheoretic technicalities. For concreteness we take the samples to be integers; our results can be easily adapted to finer discretizations.1 Definition 4.1.2. Let " > 0. The (discrete) Laplace distribution with parameter ", written Lap" , is the distribution over the integers where v ∈ Z has probability proportional to exp(−|v| · "): Lap" (v) ¬ exp(−|v| · ") , W P with W ¬ z∈Z exp(−|z| · "). We write Lap" (t) for the Laplace distribution with mean t ∈ Z; sampling from this distribution is equivalent to sampling from Lap" and adding t. Let q : D → Z be an integer-valued query. The Laplace mechanism with parameter " takes a database d ∈ D as input and returns a sample from Lap" (q(d)). This mechanism is also known as the "-geometric mechanism (Ghosh, Roughgarden, and Sundararajan, 2012). If the query takes similar values on adjacent databases, the Laplace mechanism is differentially private. The privacy parameters depend on the sensitivity of the query—the more the answers may differ on adjacent databases, the weaker the privacy guarantee. Theorem 4.1.3 (Dwork et al. (2006)). A query q : D → Z is k-sensitive if |q(d)−q(d 0 )| ≤ k for every pair of adjacent databases. Releasing a k-sensitive query with the Laplace mechanism with parameter " is (k · ", 0)-differentially private. Composition theorems Differential privacy is closed under several notions of composition, making it easy to build new private algorithms out of private components. The sequential, or standard composition theorem is the most basic example. When running two private computations in sequence—where the second computation may use the input database as well as the randomized output from the first computation—the privacy guarantee should weaken, since we run more analyses on the data. Indeed, the privacy parameters simply add up. Theorem 4.1.4 (Dwork et al. (2006)). Let M : D → Distr(R) be (", δ)-differentially private and let M 0 : R × D → Distr(R) be such that M 0 (r, −) : D → Distr(R) is (" 0 , δ0 )-differentially private for every r ∈ R. Given a database d ∈ D, sampling r from M (d) and then returning a sample from M 0 (r, d) is (" + " 0 , δ + δ0 )-differentially private. This useful theorem has two immediate consequences. First, if M 0 depends only on its first argument r and ignores its database argument d, then M 0 (r, −) is (0, 0)-differentially private. So, transforming the output of a differentially-private algorithm does not degrade privacy; this property is also called closure under post-processing. 1 More precisely, any discretization closed under addition. CHAPTER 4. APPROXIMATE COUPLINGS FOR DIFFERENTIAL PRIVACY 46 Second, by repeatedly applying the composition theorem, the composition of n separate (", δ)-differentially private mechanisms is (n", nδ)-differentially private. In certain parameter ranges, an alternative, advanced composition theorem can bound the privacy level with a smaller " at the cost of a slightly larger δ. This result crucially assumes a symmetric adjacency relation. Theorem 4.1.5 (Dwork, Rothblum, and Vadhan (2010)). Fix a symmetric adjacency relation on D. Let f i : R × D → Distr(R) be a sequence of n functions such that for every r ∈ R, the functions f i (r, −) : D → Distr(R) are (", δ)differentially private. Then for every ω ∈ (0, 1), the mechanism that executes f1 , . . . , f n in sequence and returns the final output is (" ∗ , δ∗ )-differentially private for Æ " ∗ = " 2n ln(1/ω) + n"(e" − 1) and δ∗ = nδ + ω. In particular, if we have " 0 ∈ (0, 1), ω ∈ (0, 1/2), and "0 , "= p 2 2n ln(1/ω) a short calculation2 shows that the composition is (" 0 , δ∗ )-differentially private. We omit other standard composition theorems (e.g., parallel composition) as we will not need them; readers can consult the textbook by Dwork and Roth (2014) for more information. Remark 4.1.6. The sequential composition theorem allows reasoning about differential privacy in terms of privacy costs. We can imagine tracking an algorithm’s privacy parameters, initially (0, 0). Every time the algorithm applies an (", δ)-private mechanism, we increment the current parameters by (", δ); the final parameters give the privacy level for the whole algorithm. In this way, (", δ) represents the cost of using a private subroutine. While this observation seems to be a restatement of the composition theorems, merely a convenient accounting method, the subtlety lies in how the costs are computed. The key point is that outputs from previous private mechanisms are assumed to be equal when computing the cost of subsequent operations. Changing the perspective a bit, we can pay cost (", δ) to assume two outputs in related runs of an (", δ)-private mechanism are equal. We can begin to see the rough contours of a proof by coupling; we will soon make this idea more precise. 4.2 Approximate liftings Differential privacy is closely related to an approximate version of probabilistic lifting first proposed by Barthe et al. (2013c) and refined in later work (Barthe and Olmedo, 2013; Olmedo, 2014). These liftings are defined in terms of a distance on distributions. 2 Note e" − 1 ≤ 2" for " ∈ (0, 1) by convexity of e" − 2" − 1. Then Æ Æ 2n ln(1/ω)" + n"(e" − 1) ≤ 2n ln(1/ω)" + 2n" 2 = "0 "0 "0 + · 2 2 2 ln(1/ω) ≤ "0 "0 + = "0 , 2 2 where the last inequality is because ω ∈ (0, 1/2) and " 0 ∈ (0, 1), and the last factor is maximized at " 0 = 1 and ω = 1/2: "0 1 ≤ < 1. 2 ln(1/ω) 2 ln(2) CHAPTER 4. APPROXIMATE COUPLINGS FOR DIFFERENTIAL PRIVACY 47 Definition 4.2.1. Let µ1 , µ2 be sub-distributions over A. The "-distance is defined as d" (µ1 , µ2 ) ¬ max(µ1 (S ) − exp(") · µ2 (S )). S ⊆A This quantity is non-negative since the right-hand side is zero for the empty subset S = ∅, but it is not a proper metric—it is not symmetric and the triangle inequality does not hold.3 If M : D → Distr(R) is a mechanism with d" (M (d1 ), M (d2 )) ≤ δ for every pair of adjacent d1 , d2 , then M is (", δ)-differentially private. We are now ready to define approximate liftings. Definition 4.2.2. Let µ1 , µ2 be sub-distributions over A1 and A2 respectively and let R ⊆ A1 × A2 be a relation. Let ? be a distinguished element disjoint from A1 and A2 ; we write S ? for the set S ∪ {?}, and R? for the relation R ∪ (A1 × {?}) ∪ ({?} × A2 ) on A?1 × A?2 . Two sub-distributions µ L , µR over A?1 × A?2 are said to be witnesses for the (", δ)-approximate R-lifting of (µ1 , µ2 ) if: 1. π1 (µ L ) = µ1 and π2 (µR ) = µ2 ; 2. supp(µ L ) ∪ supp(µR ) ⊆ R? ; and 3. d" (µ L , µR ) ≤ δ. In the first point µ1 and µ2 are implicitly interpreted as distributions over A?1 and A?2 (i.e., placing zero probability on ?). We call these conditions the marginal, support, and distance conditions, respectively. The sub-distributions µ L and µR are called left and right witnesses of the lifting. When the particular witnesses are not important, µ1 and µ2 are said to be related by the (", δ)-lifting of R, denoted µ1 R](",δ) µ2 . Our definition generalizes an earlier definition of approximate lifting by Barthe and Olmedo (2013). The chief novelty is the element ?, which ensures each element in A1 and A2 can be related to some element under R (namely, ?). Somewhat paradoxically, the larger space of witnesses lets us assume more structure on the witness distributions without loss of generality, making it easier to manipulate and construct approximate liftings. Useful consequences The existence of an approximate lifting between two distributions can imply useful properties about the two distributions. Many of these consequences recall properties from Section 2.1, with quantitative corrections for the parameters (", δ). Proposition 4.2.3. Let M : D → Distr(R) be a randomized algorithm. If for every pair of adjacent inputs (d1 , d2 ) the output distributions are related by an approximate lifting M (d1 ) (=)](",δ) M (d2 ), then M is (", δ)-differentially private. Proof. Fix a pair of adjacent inputs (d1 , d2 ), and let µ L , µR be the witnesses to the approximate lifting of the output distributions. For any subset S ⊆ R of outputs, we have M (d1 )(S ) = µ L (S × R? ) = µ L ({(s, s) | s ∈ S } ∪ S × {?}) 3 Technically, "-distance is an f -divergence with f (t) = max(t − exp("), 0) (first marginal) (support) CHAPTER 4. APPROXIMATE COUPLINGS FOR DIFFERENTIAL PRIVACY 48 ≤ exp(") · µR ({(s, s) | s ∈ S } ∪ S × {?}) + δ ? (distance) ? ≤ exp(") · µR (R × S ) + δ = exp(") · M (d2 )(S ) + δ. (support) (second marginal) Thus M is (", δ)-differentially private. The approximate lifted version of implication is also useful. Proposition 4.2.4. Let µ1 , µ2 be sub-distributions over A1 and A2 , and consider subsets S1 ⊆ A1 , S2 ⊆ A2 . Suppose we have an approximate lifting µ1 {(a1 , a2 ) | a1 ∈ S1 → a2 ∈ S2 }](",δ) µ2 . Then µ1 (S1 ) ≤ exp(") · µ2 (S2 ) + δ. Proof. Let µ L , µR witness the approximate lifting. Then, µ1 (S1 ) = µ L (S1 × R? ) (first marginal) = µ L (S1 × S2 ∪ S1 × {?}) (support) ≤ exp(") · µR (S1 × S2 ∪ S1 × {?}) + δ (distance) ≤ exp(") · µR (R? × S2? ) + δ (support) = exp(") · µ2 (S2 ) + δ (second marginal) as desired. We will see a partial converse in the next chapter (Theorem 5.3.1). Structural properties Approximate liftings satisfy several natural structural properties. First of all, they generalize exact liftings. Proposition 4.2.5. Let µ1 , µ2 be sub-distributions over A1 and A2 with equal weights. We have the equivalence µ1 R] µ2 if and only if µ1 R](0,0) µ2 . Proof. The forward direction follows by taking both witnesses of the approximate lifting to be the witness of the exact lifting. For the reverse direction, let µ L , µR witness the approximate lifting. We have d0 (µ L , µR ) ≤ 0 so µ L (a1 , a2 ) ≤ µR (a1 , a2 ) for every pair (a1 , a2 ) ∈ A1 × A2 . Since µ1 and µ2 have equal weights, the marginal conditions imply |µ L | = |µR | and hence µ L = µR . Since µ L ({?} × A2 ) = µR (A1 × {?}) = 0, restricting to A1 × A2 gives a witness for the exact lifting as desired. Second, we may assume witnesses only use pairs in the product of the supports of the two related distributions. Proposition 4.2.6. Let µ1 and µ2 be sub-distributions over A1 and A2 with an approximate lifting µ1 R](",δ) µ2 . Then there are witnesses with support contained in supp(µ1 )? × supp(µ2 )? . This property is natural—µ1 and µ2 are fully defined by their probabilities on supporting elements, so the witnesses shouldn’t need to use other elements. However, witnesses to an approximate lifting may have positive mass on points (a1 , a2 ) ∈ / supp(µ1 ) × supp(µ2 ) since the marginal conditions only constrain one marginal of µ L and µR ; mass can be distributed arbitrarily along the unconstrained component. In fact, this support property does not hold for prior definitions of approximate lifting. In our definition, the ? element serves as a canonical element where mass outside of supp(µ1 ) × supp(µ2 ) can be located. CHAPTER 4. APPROXIMATE COUPLINGS FOR DIFFERENTIAL PRIVACY 49 Proof. Let µ L and µR witness the approximate lifting and let Si ¬ supp(µi ) for i ∈ {1, 2}. We construct witnesses η L , ηR by shifting mass on points outside the support to ?, while preserving the marginals:   (a , a ) : (a1 , a2 ) ∈ S1 × S2 µ PL 1 2 0 µ (a , a ) : a2 = ? η L (a1 , a2 ) ¬ a20 ∈A?2 \S2 L 1 2  0 : otherwise ηR (a1 , a2 ) ¬   (a , a ) µ PR 1 2 : (a1 , a2 ) ∈ S1 × S2 : a1 = ?  0 : otherwise 0 a10 ∈A?1 \S1 µR (a1 , a2 ) It is straightforward to check π1 (η L ) = π1 (µ L ) = µ1 and π2 (ηR ) = π2 (µR ) = µ2 , and η L , ηR have the necessary supports. It only remains to check the distance condition. By the distance condition on µ L and µR , there are non-negative constants δ(a1 , a2 ) such that µ L (a1 , a2 ) ≤ exp(") · µR (a1 , a2 ) + δ(a1 , a2 ) for each (a1 , a2 ) ∈ A?1 × A?2 , with sum at most δ. We define new constants 0 δ (a1 , a2 ) ¬   ,a ) δ(a P 1 2 : (a1 , a2 ) ∈ S1 × S2 : a2 = ?  0 : otherwise 0 a20 ∈A?2 \S2 δ(a1 , a2 ) and we claim η L (a1 , a2 ) ≤ exp(") · ηR (a1 , a2 ) + δ0 (a1 , a2 ). This is clear on S1 × S2 and also when a1 = ?, since η L (?, a2 ) = 0. When a2 = ?, unfolding definitions gives X η L (a1 , ?) = µ L (a1 , a20 ) a20 ∈A?2 \S2 ≤ X exp(") · µR (a1 , a20 ) + δ(a1 , a20 ) a20 ∈A?2 \S2 = X δ(a1 , a20 ) a20 ∈A?2 \S2 = exp(") · ηR (a1 , ?) + δ0 (a1 , ?) where the penultimate equality is because µR (a1 , a20 ) = 0 for a20 ∈ / S2 , and the last equality is because ηR (a1 , ?) = 0 by definition. Finally, X X δ0 (a1 , a2 ) = δ(a1 , a2 ) ≤ δ (a1 ,a2 )∈A?1 ×A?2 (a1 ,a2 )∈A1 ×A?2 so the distance condition d" (η L , ηR ) ≤ δ holds. Thus η L and ηR witness the approximate lifting. Approximate liftings are also stable under mappings. Theorem 4.2.7. Let µ1 and µ2 be sub-distributions over A1 and A2 . If we have functions f i : Ai → Bi for i ∈ {1, 2}, and a relation R ⊆ B1 × B2 , then µ1 {(a1 , a2 ) ∈ A1 × A2 | f1 (a1 ) R f2 (a2 )}](",δ) µ2 CHAPTER 4. APPROXIMATE COUPLINGS FOR DIFFERENTIAL PRIVACY if and only if 50 ] ] f1 (µ1 ) {(b1 , b2 ) ∈ B1 × B2 | b1 R b2 }](",δ) f2 (µ2 ). (Recall f : A → B can be lifted to a map f ] : SDistr(A) → SDistr(B) on sub-distributions.) This theorem roughly says that we can change the basis of an approximate lifting; namely, the ground sets of µ1 and µ2 and the ambient space of the relation. Several useful consequences follow. First, if we take f1 and f2 to inject from supp(µ1 ) and supp(µ2 ) into B1 and B2 , the reverse direction recovers Proposition 4.2.6. Second, if E is a set of equivalence classes of A and µ/E ∈ SDistr(E ) is the induced distribution over equivalence classes, taking f1 , f2 : A → E to map an element to its equivalence class and R to be the equivalence relation =E recovers a result by Barthe and Olmedo (2013, Proposition 8): µ1 (=E )](",δ) µ2 ⇐⇒ µ1 /E (=)](",δ) µ2 /E . We frequently apply Theorem 4.2.7 with f1 and f2 projecting a memory to the value in variables x 1 and x 2 ; by the reverse direction, we can extend a lifting of the distributions over x 1 and x 2 to a lifting of distributions over whole memories. Proof. For the forward direction, take witnesses µ L , µR ∈ SDistr(A?1 × A?2 ) and define witnesses for the desired approximate lifting η L ¬ ( f1? × f2? )] (µ L ) and ηR ¬ ( f1? × f2? )] (µR ), where f1? × f2? maps (a1 , a2 ) 7→ ( f1 (a1 ), f2 (a2 )) and maps ? to ? in both components. The support condition is clear, the marginal requirement is clear, and the distance requirement follows easily: for any set S ⊆ B1? × B2? , apply the distance condition on µ L , µR for the set ( f1? × f2? )−1 (S ). For the reverse direction, let η L , ηR ∈ SDistr(B1? × B2? ) witness the second approximate lifting. By Proposition 4.2.6, without loss of generality supp(η L ) and supp(ηR ) are contained in ] ] supp( f1 (µ1 ))? × supp( f2 (µ2 ))? ⊆ f1 (A1 )? × f2 (A2 )? . (4.1) We construct a pair of witnesses µ L , µR ∈ SDistr(A?1 × A?2 ) to the first approximate lifting. The basic idea is to define µ L and µR based on equivalence classes of elements in Ai mapping to each bi ∈ Bi , smoothing out the probabilities within each class to guarantee the distance condition. To begin, for ai ∈ Ai and i ∈ {1, 2} we define [ai ] f i ¬ f i−1 ( f i (ai )) and αi (ai ) ¬ µi (ai ) . µi ([ai ] f i ) We take αi (ai ) = 0 when µi ([ai ] f i ) = 0, and we let αi (?) = 0. We define µ L and µR as µ L (a1 , a2 ) ¬ α L (a1 , a2 ) · η L ( f1? (a1 ), f2? (a2 )) µR (a1 , a2 ) ¬ αR (a1 , a2 ) · ηR ( f1? (a1 ), f2? (a2 )), where ¨ α1 (a1 ) · α2 (a2 ) : a2 6= ? α L (a1 , a2 ) ¬ α1 (a1 ) : a2 = ? ¨ and αR (a1 , a2 ) ¬ α1 (a1 ) · α2 (a2 ) : a1 6= ? α2 (a2 ) : a1 = ?. The support and marginal conditions follow from the corresponding properties of η L , ηR , e.g., X π1 (µ L )(a1 ) = α L (a1 , a2 ) · η L ( f1? (a1 ), f2? (a2 )) a2 ∈A?2 = α1 (a1 ) · η L ( f1? (a1 ), ?) + X a2 ∈A2 α1 (a1 ) · α2 (a2 ) · η L ( f1 (a1 ), f2 (a2 )) CHAPTER 4. APPROXIMATE COUPLINGS FOR DIFFERENTIAL PRIVACY 51   X = α1 (a1 ) η L ( f1? (a1 ), ?) + X η L ( f1? (a1 ), b2 ) b2 ∈ f2 (A2 ) α2 (a2 ) a2 ∈ f2−1 (b2 ) ! X = α1 (a1 ) η L ( f1? (a1 ), ?) + η L ( f1 (a1 ), b2 ) b2 ∈ f2 (A2 ) = α1 (a1 ) X b2 ∈B2? η L ( f1? (a1 ), b2 ) = α1 (a1 ) · µ1 ([a1 ] f1 ) = µ1 (a1 ). The last equality replaces the sum over b2 ∈ f2 (A2 )? with a sum over b2 ∈ B2? ; this holds since the support of ] f2 (µ2 ) is contained in f2 (A2 ) so we may assume η L ( f1 (a1 ), b2 ) = 0 for all b2 outside of f2 (A2 )? by Eq. (4.1). Then ] we conclude by the marginal condition π1 (η L ) = f1 (µ1 ). The second marginal is similar. To check the distance condition d" (µ L , µR ) ≤ δ, since d" (η L , ηR ) ≤ δ there exists non-negative δ(b1 , b2 ) with η L (b1 , b2 ) ≤ exp(") · ηR (b1 , b2 ) + δ(b1 , b2 ) and b1 ,b2 δ(b1 , b2 ) ≤ δ. We may take δ(?, b2 ) = 0 for all b2 ∈ B2 , since η L (?, b2 ) = 0 by the marginal condition. We claim that for any (a1 , a2 ) ∈ A?1 × A?2 , we have µ L (a1 , a2 ) ≤ exp(") · µR (a1 , a2 ) + ζ(a1 , a2 ) where P ζ(a1 , a2 ) ¬ α L (a1 , a2 ) · δ( f1? (a1 ), f2? (a2 )). Let bi ¬ f i? (ai ) and consider (a1 , a2 ) ∈ A?1 × A?2 . If a1 = ? we can immediately bound µ L (?, a2 ) = 0 ≤ exp(") · µR (?, a2 ) + ζ(?, a2 ). Otherwise a1 6= ? and we can bound µ L (a1 , a2 ) = α L (a1 , a2 ) · η L ( f1? (a1 ), f2? (a2 )) ≤ α L (a1 , a2 ) · (exp(") · ηR ( f1? (a1 ), f2? (a2 )) + δ( f1? (a1 ), f2? (a2 ))) = exp(") · (αR (a1 , a2 ) · ηR ( f1? (a1 ), f2? (a2 ))) + α L (a1 , a2 ) · δ( f1? (a1 ), f2? (a2 )) = exp(") · µR (a1 , a2 ) + α L (a1 , a2 ) · δ( f1? (a1 ), f2? (a2 )) = exp(") · µR (a1 , a2 ) + ζ(a1 , a2 ). The third line changes from α L to αR in the first term since α L (a1 , a2 ) 6= αR (a1 , a2 ) exactly when a2 = ?, when ηR ( f1? (a1 ), f2? (a2 )) = ηR ( f1? (a1 ), ?) = 0 as well. Now we just need to bound the sum of ζ(a1 , a2 ) to conclude the distance bound between η L and ηR . First, the sum of α L within any equivalence class is 1: for any (b1 , b2 ) ∈ B1 × B2 , we have    X X X X α1 (a1 )  α2 (a2 ) = 1 α L (a1 , a2 ) =  a1 ∈ f1−1 (b1 ) a2 ∈ f2−1 (b2 ) by definition. Therefore, X a1 ∈ f1−1 (b1 ) ζ(a1 , a2 ) = (a1 ,a2 )∈A?1 ×A?2 X (b1 ,b2 )∈B1? ×B2? = X (b1 ,b2 )∈B1 ×B2 a2 ∈ f2−1 (b2 ) X δ(b1 , b2 ) X α L (a1 , a2 ) a1 ∈ f1−1 (b1 ) a2 ∈ f2−1 (b2 ) δ(b1 , b2 ) + X b 1 ∈ B1 δ(b1 , ?) X a1 ∈ f1−1 (b1 ) α1 (a1 ) CHAPTER 4. APPROXIMATE COUPLINGS FOR DIFFERENTIAL PRIVACY = X δ(b1 , b2 ) + (b1 ,b2 )∈B1 ×B2 = X X 52 δ(b1 , ?) b1 ∈B1 δ(b1 , b2 ) ≤ δ. (b1 ,b2 )∈B1? ×B2? So for any S ⊆ A?1 × A?2 we have µ L (S ) ≤ exp(") · µR (S ) + δ, showing d" (µ L , µR ) ≤ δ as desired. From approximate liftings to approximate couplings Approximate liftings generalize probabilistic liftings (Proposition 4.2.5) while retaining many features of their exact counterparts: the existence of an approximate lifting with a certain support implies target properties about the two related distributions (Propositions 4.2.3 and 4.2.4), and the structural properties we saw for approximate liftings (Proposition 4.2.6 and Theorem 4.2.7) also hold for probabilistic liftings. Accordingly, we can think of approximate liftings as an approximate generalization of probabilistic coupling; we will use the term approximate coupling to emphasize this point of view. Unlike probabilistic coupling, whose definition and key properties have been refined through decades of research, the proper definition of approximate coupling is not settled. Other definitions have been proposed, and the relation between the various notions is somewhat hazy. (See Section 5.6 for a more detailed comparison.) Nevertheless, we present evidence that our approximate lifting is the natural approximate counterpart of probabilistic coupling—or at least, a highly promising candidate—by showing many desirable properties hold and by exhibiting clean constructions. However, so far we are still missing a major piece of the puzzle: how do we construct approximate couplings? In other words, what is the approximate analogue of proof by coupling? To work out what such a proof technique might look like, we take inspiration from an existing program logic for approximate liftings. 4.3 The program logic AP RHL Barthe et al. (2013c) proposed the relational program logic APRHL as an approximate version of PRHL, targeting differential privacy. The basic idea is to use approximate liftings in place of exact liftings, tracking the parameters (", δ) in the judgments. We briefly review the language, the judgments, and the logical rules. The language The language of APRHL is almost identical to the probabilistic imperative language we used for PRHL. The only difference is instead of the uniform distribution, we take the Laplace distribution as primitive: DE := Lap" (e). The parameter " quantifies the spread of the distribution, while the parameter e represents its mean; we treat " as a logical variable. Similar to how we defined the Laplace mechanism (Definition 4.1.2), we interpret Lap" (e) as a discrete distribution over the integers z ∈ Z: (¹Lap" (e)ºρ m)(z) ¬ exp(−¹"ºρ · |z − ¹eºρ m|) W where ¹eºρ m is an integer and W normalizes the distribution to have weight 1: X W¬ exp(−¹"ºρ · |z − ¹eºρ m|). z∈Z For example, the Laplace mechanism for a query q : D → Z can be implemented by sampling: $ Lap (q(d)). x← " CHAPTER 4. APPROXIMATE COUPLINGS FOR DIFFERENTIAL PRIVACY SKIP ASSN LAP ` skip ∼(0,0) skip : Φ =⇒ Φ ` x 1 ← e1 ∼(0,0) x 2 ← e2 : Ψ {e1 〈1〉, e2 〈2〉/x 1 〈1〉, x 2 〈2〉} =⇒ Ψ x1, x2 ∈ / FV(e1 , e2 ) Φ ¬ |e1 〈1〉 − e2 〈2〉| ≤ k ∧ ∀v ∈ Z, Ψ {v, v/x 1 〈1〉, x 2 〈2〉} $ Lap (e ) : Φ =⇒ Ψ ` x 1 ← Lap" (e1 ) ∼(k",0) x 2 ← " 2 $ SEQ COND 53 ` c1 ∼(",δ) c2 : Φ =⇒ Ψ |= Φ → e1 〈1〉 = e2 〈2〉 ` c10 ∼("0 ,δ0 ) c20 : Ψ =⇒ Θ ` c1 ; c10 ∼("+"0 ,δ+δ0 ) c2 ; c20 : Φ =⇒ Θ ` c1 ∼(",δ) c2 : Φ ∧ e1 〈1〉 =⇒ Ψ ` c10 ∼(",δ) c20 : Φ ∧ ¬e1 〈1〉 =⇒ Ψ ` if e1 then c1 else c10 ∼(",δ) if e2 then c2 else c20 : Φ =⇒ Ψ WHILE |= Φ ∧ e v 〈1〉 ≤ 0 → ¬e1 〈1〉 |= Φ → e〈1〉 = e〈2〉 ∀K ∈ N, ` c1 ∼(",δ) c2 : Φ ∧ e1 〈1〉 ∧ e v 〈1〉 = K =⇒ Φ ∧ e v 〈1〉 < K ` while e1 do c1 ∼(N ",N δ) while e2 do c2 : Φ ∧ e〈1〉 ≤ N =⇒ Φ ∧ ¬e1 〈1〉 Figure 4.1: Two-sided APRHL rules Judgments and validity Judgments in APRHL have the following form: c1 ∼(",δ) c2 : Φ =⇒ Ψ Just like in PRHL, Φ and Ψ are assertions on a product memory and refer to variables tagged with 〈1〉 and 〈2〉. The parameters ", δ are expressions involving constants and logical variables; in particular, they do not mention program variables and do not depend on the program state. Validity for APRHL judgments is defined in terms of approximate liftings. Definition 4.3.1. An APRHL judgment is valid in logical context ρ, written ρ |= c1 ∼(",δ) c2 : Φ =⇒ Ψ, if for any two memories (m1 , m2 ) ∈ ¹Φºρ there exists an approximate lifting relating the output distributions: ¹c1 ºρ m1 ¹Ψºρ ](¹"ºρ ,¹δºρ ) ¹c2 ºρ m2 . Core proof rules Most of the rules in APRHL generalize rules from PRHL, with special handling for the (", δ) parameters. We present the core proof system and comment on departures from PRHL. CHAPTER 4. APPROXIMATE COUPLINGS FOR DIFFERENTIAL PRIVACY 54 We begin with the two-sided rules in Fig. 4.1. The [SKIP] and [ASSN] rules are lifted from PRHL. To gain intuition for the sampling rule [LAP], we first consider a special case: LAP* $ Lap (e) ∼ $ `x← (k",0) x ← Lap" (e) : |e〈1〉 − e〈2〉| ≤ k =⇒ x〈1〉 = x〈2〉 " Since the means e〈1〉 and e〈2〉 may not be equal, the two distributions may have different probabilities of sampling the same value and there may be no exact coupling guaranteeing x〈1〉 = x〈2〉. Nevertheless, there is a (k", 0)approximate coupling when the means differ by at most k. Since approximate lifting of equality models differential privacy, this rule captures privacy of the Laplace mechanism (Theorem 4.1.3). The full sampling rule [LAP] proves a general post-condition Ψ if it is true as a pre-condition, assuming the two sampled variables are equal. The sequencing rule [SEQ] is similar to the sequencing rule in PRHL, summing up the approximation parameters. This rule reflects a composition principle for approximate couplings generalizing the sequential composition theorem from differential privacy (Theorem 4.1.4). The conditional rule [COND] is similar to its counterpart from PRHL. Assuming the guards are equal initially, if there is an (", δ)-coupling of corresponding pairs of branches then there is an (", δ)-coupling of the two conditionals. Finally, the loop rule [WHILE] applies to loops that run at most a finite number of iterations N ; this is enforced by the strictly decreasing integer variant e v . Given an (", δ)-coupling for the loop bodies, the rule produces a (N ", N δ)-coupling of the two loops. Again, this rule corresponds to a sequential composition principle for approximate couplings. The one-sided rules for APRHL are presented in Fig. 4.2; the structural rules, in Fig. 4.3. The one-sided sampling rules, [LAP-L] and [LAP-R], give a (0, 0)-lifting. The rule of consequence [CONSEQ] allows increasing the approximate parameters since larger parameters require a looser bound between the witnesses. The other rules are straightforward generalizations of their PRHL counterparts. As expected, the logic is sound. Theorem 4.3.2 (Soundness of APRHL). Let ρ be a logical context. If a judgment is derivable ρ ` c1 ∼(",δ) c2 : Φ =⇒ Ψ, then it is valid: ρ |= c1 ∼(",δ) c2 : Φ =⇒ Ψ. Proof sketch. By induction on the derivation. The proof is very similar to the proof of soundness for APRHL by Olmedo (2014), with some minor adjustments to handle the special element ? in our definition of approximate coupling. Appendix B gives a self-contained proof of soundness for the full logic, including the new rules we will soon introduce. The natural counterpart to soundness is completeness: valid judgments should be provable by the proof system. is incomplete in at least one respect: while valid judgments may relate commands that do not always terminate, derivable judgments can only relate lossless programs. AP RHL Lemma 4.3.3. If ρ ` c1 ∼(",δ) c2 : Φ =⇒ Ψ is derivable, then c1 and c2 are both Φ-lossless. Proof. By induction on the derivation. Since the loop rule [WHILE] requires both loops to terminate in at most n iterations and the one-sided variants [WHILE-L]/[WHILE-R] assume losslessness, c1 and c2 must be lossless under the pre-condition. This kind of incompleteness aside, it is not known whether APRHL is complete for terminating programs (or even relatively complete in some natural sense); we discuss this issue further in Chapter 6. CHAPTER 4. APPROXIMATE COUPLINGS FOR DIFFERENTIAL PRIVACY ASSN-L ASSN-R LAP-L LAP-R COND -L COND -R 55 ` x 1 ← e1 ∼(0,0) skip : Ψ {e1 〈1〉/x 1 〈1〉} =⇒ Ψ ` skip ∼(0,0) x 2 ← e2 : Ψ {e2 〈2〉/x 2 〈2〉} =⇒ Ψ $ Lap (e ) ∼ ` x1 ← (0,0) skip : ∀v ∈ Z, Ψ {v/x 1 〈1〉} =⇒ Ψ " 1 $ Lap (e ) : ∀v ∈ Z, Ψ {v/x 〈2〉} =⇒ Ψ ` skip ∼(0,0) x 2 ← 2 " 2 ` c1 ∼(",δ) c : Φ ∧ e1 〈1〉 =⇒ Ψ ` c10 ∼(",δ) c : Φ ∧ ¬e1 〈1〉 =⇒ Ψ ` if e1 then c1 else c10 ∼(",δ) c : Φ =⇒ Ψ ` c ∼(",δ) c2 : Φ ∧ e2 〈2〉 =⇒ Ψ ` c ∼(",δ) c20 : Φ ∧ ¬e2 〈2〉 =⇒ Ψ ` c ∼(",δ) if e2 then c2 else c20 : Φ =⇒ Ψ WHILE-L WHILE-R ` c1 ∼(0,0) skip : Φ ∧ e1 〈1〉 =⇒ Φ |= Φ → Φ1 〈1〉 Φ1 |= while e1 do c1 lossless ` while e1 do c1 ∼(0,0) skip : Φ =⇒ Φ ∧ ¬e1 〈1〉 ` skip ∼(0,0) c2 : Φ ∧ e2 〈2〉 =⇒ Φ |= Φ → Φ2 〈2〉 Φ2 |= while e2 do c2 lossless ` skip ∼(0,0) while e2 do c2 : Φ =⇒ Φ ∧ ¬e2 〈2〉 Figure 4.2: One-sided APRHL rules 4.4 Proof by approximate coupling Much like PRHL is a logic for formal proofs by coupling, APRHL can be viewed as a logic for formal proofs by approximate coupling. With the logical rules in hand, we can work out an intuitive understanding of these proofs. First of all, the close resemblance between PRHL and APRHL indicates that proofs by approximate couplings are broadly similar to proofs by coupling; the sampling rule [LAP] shows we can choose an approximate coupling for sampling statements (although for the moment we have just one choice), the sequencing rule [SEQ] indicates that we can sequence approximate couplings together, and the case rule [CASE] lets us select an approximate coupling based on the current state of the coupled executions. The main difference is we must track the approximation parameters " and δ as we build the coupling. When we apply the sampling rule [LAP], for instance, we accrue parameters (k · ", 0) where k is an upper bound on the distance between the means. In the sequencing rule [SEQ] (and similarly in the loop rule [WHILE]), we add up the approximate couplings parameters for the sequenced commands. The resulting style of analysis blends proof by coupling with the cost interpretation of differential privacy (Remark 4.1.6). For instance, we can think of the rule [LAP] as paying for the privacy cost to couple the samples to be equal. Accordingly, proofs by approximate coupling recover proofs by the standard composition theorem (Theorem 4.1.4). By introducing other approximate CHAPTER 4. APPROXIMATE COUPLINGS FOR DIFFERENTIAL PRIVACY CONSEQ ` c1 ∼("0 ,δ0 ) c2 : Φ0 =⇒ Ψ 0 |= Φ → Φ0 |= Ψ 0 → Ψ 56 |= " 0 ≤ " |= δ0 ≤ δ ` c1 ∼(",δ) c2 : Φ =⇒ Ψ EQUIV CASE ` c10 ∼(",δ) c20 : Φ =⇒ Ψ FRAME c2 ≡ c20 ` c1 ∼(",δ) c2 : Φ =⇒ Ψ ` c1 ∼(",δ) c2 : Φ ∧ Θ =⇒ Ψ TRANS c1 ≡ c10 ` c1 ∼(",δ) c2 : Φ ∧ ¬Θ =⇒ Ψ ` c1 ∼(",δ) c2 : Φ =⇒ Ψ ` c1 ∼(",δ) c2 : Φ =⇒ Ψ ` c2 ∼("0 ,δ0 ) c3 : Φ0 =⇒ Ψ 0 ` c1 ∼("+"0 ,exp("0 )δ+δ0 ) c3 : Φ0 ◦ Φ =⇒ Ψ 0 ◦ Ψ ` c1 ∼(",δ) c2 : Φ =⇒ Ψ FV(Θ) ∩ MV(c1 , c2 ) = ∅ ` c1 ∼(",δ) c2 : Φ ∧ Θ =⇒ Ψ ∧ Θ Figure 4.3: Structural APRHL rules LAPNULL LAPGEN x1, x2 ∈ / FV(e1 , e2 ) Φ ¬ ∀w1 , w2 ∈ Z, w1 − w2 = e1 〈1〉 − e2 〈2〉 → Ψ {w1 , w2 /x 1 〈1〉, x 2 〈2〉} $ Lap (e ) ∼ $ ` x1 ← (0,0) x 2 ← Lap" (e2 ) : Φ =⇒ Ψ " 1 x1, x2 ∈ / FV(e1 , e2 ) Φ ¬ |k + e1 〈1〉 − e2 〈2〉| ≤ k0 ∧ ∀w1 , w2 ∈ Z, w1 + k = w2 → Ψ {w1 , w2 /x 1 〈1〉, x 2 〈2〉} $ Lap (e ) ∼ $ ` x1 ← (k0 ·",0) x 2 ← Lap" (e2 ) : Φ =⇒ Ψ " 1 Figure 4.4: New Laplace rules for APRHL couplings for the Laplace distribution, we can achieve clean and compositional approximate coupling proofs of privacy even when the standard composition theorem from differential privacy does not suffice. 4.5 New couplings for the Laplace distribution Unlike the rule [SAMPLE] in PRHL, which can couple two uniform distributions in different ways by varying the bijection, the Laplace rule [LAP] can only couple samples to be equal. To support richer proofs, we introduce two new approximate couplings for the Laplace distribution and build them into APRHL rules. Null coupling Suppose we want to couple the Laplace distributions Lap" (v1 ) and Lap" (v2 ). Sampling from these distributions is equivalent to sampling from Lap" (0) and then adding v1 and v2 respectively, so we can couple by using equal draws from Lap" (0). Since equal draws from the same distribution have the same probability, this approximate CHAPTER 4. APPROXIMATE COUPLINGS FOR DIFFERENTIAL PRIVACY 57 coupling is in fact an exact, (0, 0)-coupling, an analogue of the identity coupling (Proposition 2.1.10). More formally, we have the following result. Proposition 4.5.1. Let v1 , v2 ∈ Z. Then: Lap" (v1 ) {(x 1 , x 2 ) | x 1 − v1 = x 2 − v2 }](0,0) Lap" (v2 ). Proof. We construct witnesses µ L , µR ∈ Distr(Z? × Z? ). Define the relation R ¬ {(x 1 , x 2 ) ∈ Z × Z | x 1 − v1 = x 2 − v2 } and let L(r) be probability Lap" (0) produces r. Define witnesses ¨ L(x 1 − v1 ) : (x 1 , x 2 ) ∈ R µ L (x 1 , x 2 ) = µR (x 1 , x 2 ) ¬ 0 : otherwise. Since µ L = µR , we know d0 (µ L , µR ) = 0. Also, supp(µ L ) and supp(µR ) lie in R ⊆ R? . So, it remains to check the marginal conditions. Using the support condition, we have π1 (µ L )(r) = µ L (r, r − v1 + v2 ) = L(r − v1 ) = Lap" (v1 )(r). A similar calculation shows π2 (µR ) = Lap" (v2 ), so µ L and µR witness the approximate coupling. We can capture this approximate coupling with the rule [LAPNULL] in Fig. 4.4. To gain intuition, the following rule is a simplified special case: LAPNULL* x∈ / FV(e) $ Lap (e) ∼ $ `x← (0,0) x ← Lap" (e) : > =⇒ x〈1〉 − x〈2〉 = e〈1〉 − e〈2〉 " The coupling keeps the distance between the samples the same as the distance between the means. The general rule [LAPNULL] can prove post-conditions of any shape. Theorem 4.5.2. The rule [LAPNULL] is sound. Proof. We leave the logical context ρ implicit. Let V ¬ X \ {x 1 , x 2 } be the non-sampled variables; we write m[V ] for the restriction of a memory m to variables in V . Consider any two memories m1 , m2 , let the means be v1 ¬ ¹e1 ºm1 and v2 ¬ ¹e2 ºm2 , and let the output distributions be $ Lap (e )ºm µ1 ¬ ¹x 1 ← 1 " 1 $ Lap (e )ºm . and µ2 ¬ ¹x 2 ← 2 " 2 We construct an approximate coupling between µ1 and µ2 . By Proposition 4.5.1 we have Lap" (v1 ) {(x 1 , x 2 ) | x 1 − v1 = x 2 − v2 }](0,0) Lap" (v2 ). By Theorem 4.2.7 with maps ¹x 1 º and ¹x 2 º, we obtain µ1 ¹x 1 〈1〉 − v1 = x 2 〈2〉 − v2 º](0,0) µ2 . By the free variable condition, v1 = ¹e1 ºm01 and v2 = ¹e2 ºm02 for every memory m01 ∈ supp(µ1 ) and m02 ∈ supp(µ2 ), so we may assume by Proposition 4.2.6 that the witnesses are supported on such memories, giving witnesses to µ1 ¹x 1 〈1〉 − e1 〈1〉 = x 2 〈2〉 − e2 〈2〉º](0,0) µ2 . CHAPTER 4. APPROXIMATE COUPLINGS FOR DIFFERENTIAL PRIVACY 58 Also by the free variable condition, m01 [V ] = m1 [V ] and m02 [V ] = m2 [V ] so µ1 {(m01 , m02 ) | m01 [V ] = m1 [V ], m02 [V ] = m2 [V ], m01 (x 1 ) − ¹e1 ºm1 = m02 (x 2 ) − ¹e2 ºm2 } ](0,0) µ2 . By the pre-condition, (m1 , m2 ) satisfy ∀w1 , w2 ∈ Z, w1 − w2 = e1 〈1〉 − e2 〈2〉 → Ψ {w1 , w2 /x 1 〈1〉, x 2 〈2〉} and so µ1 Ψ ](0,0) µ2 , showing [LAPNULL] is sound. General coupling Our next approximate coupling shifts the samples apart by a constant amount. Suppose we want to approximately couple the Laplace distributions Lap" (v1 ) and Lap" (v2 ) so that the samples x 1 , x 2 satisfy x 1 + k = x 2 . Intuitively, the approximation parameters should depend on the shift k and the distance |v1 − v2 | between the means—larger shifts and larger distances imply that we match samples with greater difference in probabilities. More formally, we have the following result. Proposition 4.5.3. Let k, k0 , v1 , v2 ∈ Z, and suppose |k + v1 − v2 | ≤ k0 . Then: Lap" (v1 ) {(x 1 , x 2 ) | x 1 + k = x 2 }](k ",0) Lap" (v2 ). 0 Proof. We need two witnesses µ L , µR ∈ Distr(Z? × Z? ). Define the relation R ¬ {(x 1 , x 2 ) ∈ Z × Z | x 1 + k = x 2 } and let L(r) be the probability Lap" (0) produces r. Define witnesses ¨ ¨ L(x 1 − v1 ) : (x 1 , x 2 ) ∈ R L(x 2 − v2 ) : (x 1 , x 2 ) ∈ R µ L (x 1 , x 2 ) ¬ and µR (x 1 , x 2 ) ¬ 0 : otherwise 0 : otherwise. By definition, supp(µ L ) and supp(µR ) lie in R ⊆ R? . The marginal conditions are easy to check. So, it remains to check the distance condition. It suffices to show µ L (x 1 , x 2 ) ≤ exp(k0 ") · µR (x 1 , x 2 ) for every (x 1 , x 2 ) ∈ Z? × Z? , since summing over any set S ⊆ Z? × Z? gives µ L (S ) ≤ exp(k0 ") · µR (S ). Clearly the claim is true for (x 1 , x 2 ) ∈ / R; note that µ L and µR are both zero when x 1 or x 2 is ?. Otherwise we just need to bound L(x 1 − v1 ) ≤ exp(k0 ") · L(x 2 − v2 ) where x 1 + k = x 2 . Unfolding definitions, it suffices to bound exp(−|x 1 − v1 |") ≤ exp(k0 ") · exp(−|x 1 + k − v2 |"), which follows by assumption: |x 1 + k − v2 | − |x 1 − v1 | ≤ |k − v2 + v1 | ≤ k0 . So, dk0 " (µ L , µR ) ≤ 0 and µ L , µR witness the approximate coupling. CHAPTER 4. APPROXIMATE COUPLINGS FOR DIFFERENTIAL PRIVACY 59 This approximate coupling is modeled by the rule [LAPGEN], in Fig. 4.4. Note that k and k0 must be logical expressions, independent of the program state. To gain intuition, the following rule is a simplified special case: LAPGEN* 0 $ Lap (e) ∼ $ `x← (k0 ·",0) x ← Lap" (e) : |k + e〈1〉 − e〈2〉| ≤ k =⇒ x〈1〉 + k = x〈2〉 " As expected, the post-condition ensures that the coupled samples are shifted apart by k. The approximation parameters scale as k0 ; this measures the difference between the k-shifted means. As a sanity check, when k0 = 0 the distribution means are shifted by k and we have an exact, (0, 0)-coupling. The general rule [LAPGEN] can prove post-conditions of any shape. Theorem 4.5.4. The rule [LAPGEN] is sound. Proof. We leave the logical context ρ implicit. Let V ¬ X \ {x 1 , x 2 } be the non-sampled variables; we write m[V ] for the restriction of a memory m to variables in V . Consider any two memories m1 , m2 , let the means be v1 ¬ ¹e1 ºm1 and v2 ¬ ¹e2 ºm2 such that |k + v1 − v2 | ≤ k0 , and let the output distributions be $ Lap (e )ºm µ1 ¬ ¹x 1 ← 1 " 1 $ Lap (e )ºm . and µ2 ¬ ¹x 2 ← 2 " 2 We construct an approximate coupling between µ1 and µ2 . By Proposition 4.5.3, we have Lap" (v1 ) {(x 1 , x 2 ) | x 1 + k = x 2 }](k ",0) Lap" (v2 ). 0 By Theorem 4.2.7 with maps ¹x 1 º and ¹x 2 º, we obtain µ1 ¹x 1 〈1〉 + k = x 2 〈2〉ºρ ](k ",0) µ2 . 0 By the free variable condition, m01 [V ] = m1 [V ] and m02 [V ] = m2 [V ] for all memories m01 ∈ supp(µ1 ) and m02 ∈ supp(µ2 ), so we may assume by Proposition 4.2.6 that the witnesses are supported on such memories. Hence, we have the following lifting: µ1 {(m01 , m02 ) | m01 [V ] = m1 [V ], m02 [V ] = m2 [V ], m01 (x 1 ) + k = m02 (x 2 ) ∈ ¹x 1 〈1〉 + k = x 2 〈2〉º} ](k0 ",0) µ2 By the pre-condition, (m1 , m2 ) satisfy ∀w1 , w2 ∈ Z, w1 + k = w2 → Ψ {w1 , w2 /x 1 〈1〉, x 2 〈2〉} and so µ1 Ψ ](k ",0) µ2 , 0 showing [LAPGEN] is sound. Remark 4.5.5. If we could take k0 ¬ 0 and k ¬ e2 〈2〉 − e1 〈1〉 in [LAPGEN], we would recover [LAPNULL]. However, k must be a constant or logical variable. (We will discuss possible ways to lift this requirement in Section 6.1.) 4.6 Pointwise privacy In sophisticated privacy proofs, it is often convenient to focus on a single output at a time. We call this pattern pointwise equality and formalize it as the following property of approximate couplings. CHAPTER 4. APPROXIMATE COUPLINGS FOR DIFFERENTIAL PRIVACY |= X δ0 {i/γ} ≤ δ 60 γ∈ / FV(Φ, c1 , c2 , e1 , e2 , ", δ) i∈R PW-EQ ∀γ ∈ R, ` c1 ∼(",δ0 ) c2 : Φ =⇒ e1 〈1〉 = γ → e2 〈2〉 = γ ` c1 ∼(",δ) c2 : Φ =⇒ e1 〈1〉 = e2 〈2〉 Figure 4.5: Pointwise equality rule [PW-EQ] for APRHL Proposition 4.6.1. Let µ1 , µ2 be sub-distributions over R and suppose for every i ∈ R, we have µ1 {(r1 , r2 ) | r1 = i → r2 = i}](",δi ) µ2 for non-negative " and {δi }i∈R . Then we have µ1 (=)](",δ) µ2 where δ = P i∈R δi . Proof. By Proposition 4.2.4 we know for every i ∈ R, µ1 (i) ≤ exp(") · µ2 (i) + δi . So for any subset S ⊆ R, summing over i ∈ S yields µ1 (S ) ≤ exp(") · µ2 (S ) + X δi ≤ exp(") · µ2 (S ) + δ i∈S since δi ≥ 0. We define witnesses µ L (r, r) ¬ µ1 (r) and µR (r, r) ¬ µ2 (r) for r = 6 ?, and zero otherwise. The support and marginal conditions are easy to check. For the distance condition, consider any set T ⊆ R? × R? and let T 0 ¬ T ∩ {(r1 , r2 ) ∈ R × R | r1 = r2 }. We know µ L (T ) = µ L (T 0 ) and µR (T ) = µR (T 0 ). Letting S 0 = {r ∈ R | (r, r) ∈ T 0 }, we have µ L (T 0 ) = µ1 (S 0 ) ≤ exp(") · µ2 (S 0 ) + δ ≤ exp(") · µR (T 0 ) + δ so d" (µ L , µR ) ≤ δ and we have witnesses as desired. Pointwise equality simplifies coupling proofs of differential privacy: rather than proving differential privacy in one shot, we can give a separate proof for each possible output and then combine the results. We can internalize pointwise equality as the APRHL rule [PW-EQ] in Fig. 4.5. In the premise, the pointwise judgment is indexed by a logical variable γ. The conclusion gives an approximate lifting of equality in the post-condition. Theorem 4.6.2. The rule [PW-EQ] is sound. Proof. Let ρ be the logical context. The proof follows essentially by Proposition 4.6.1, handling the logical variables carefully. Consider two memories (m1 , m2 ) ∈ ¹Φºρ and output distributions µ1 ¬ ¹c1 ºρ m1 and µ2 ¬ ¹c2 ºρ m2 . CHAPTER 4. APPROXIMATE COUPLINGS FOR DIFFERENTIAL PRIVACY 61 We construct an approximate lifting relating µ1 and µ2 . By the free variable condition, (m1 , m2 ) ∈ ¹Φºρ∪γ7→i for any i and so by validity of the premises, we can use the forward direction of Theorem 4.2.7 to project the liftings in the premises to the expressions e1 and e2 : (¹e1 ºρ∪γ7→i )] (µ1 ) {(a1 , a2 ) ∈ R × R | a1 = i → a2 = i}](",δ ) (¹e2 ºρ∪γ7→i )] (µ2 ) 0 for each i ∈ R. (Technically " and δ0 are also interpreted in the logical context ρ ∪ γ 7→ i; we elide this.) By the free variable condition, the two projected distributions are in fact the same for all i, and everything besides δ0 can be interpreted in the original context ρ. Proposition 4.6.1 with δi ¬ ¹δ0 ºρ∪γ7→i gives ¹e1 º]ρ (µ1 ) {(a1 , a2 ) | a1 = a2 }](",δ) ¹e2 º]ρ (µ2 ), and the reverse direction of Theorem 4.2.7 with maps ¹e1 ºρ and ¹e2 ºρ gives µ1 (¹e1 〈1〉 = e2 〈2〉ºρ )](",δ) µ2 . Thus, [PW-EQ] is sound. Remark 4.6.3. From a logical perspective, pointwise equality resembles the Leibniz equality principle: |= (∀i, x = i → y = i) → x = y. Indeed, if APRHL had a structural rule to convert an external universal quantifier into an internal universal quantifier, e.g., something like ∀i, ` c1 ∼(",δ) c2 : Φ =⇒ Ψi FORALL ` c1 ∼(",δ) c2 : Φ =⇒ ∀i, Ψi [PW-EQ] could be derived using the rule of consequence with Leibniz equality. Unfortunately this rule is not sound, not even in PRHL. In fact, if we have just two judgments with post-conditions Ψ1 and Ψ2 , it is not sound in general to combine them into a single judgment with post-condition Ψ1 ∧ Ψ2 : the underlying witnesses may be different. The rule [PW-EQ] is a special case where we may safely combine post-conditions across different judgments. Remark 4.6.4. On a more practical note, the post-condition in [PW-EQ] is highly specific—the assertion must be equality. In Chapter 5 we will see some ways to partially mitigate this limitation, for instance by incorporating one-sided conjuncts (Section 5.2). 4.7 Coupling proofs of privacy Approximate coupling proofs are a convenient and compositional tool for proving differential privacy. Starting from two adjacent inputs, we select an approximate coupling for each pair of corresponding sampling instructions such that (i) the total cost does not exceed the target privacy parameters (", δ), and (ii) the outputs on the two executions are equal under the approximate coupling. By pointwise equality, we can sometimes establish point (ii) by building an approximate coupling separately for each possible output value i, ensuring that if the first output is equal to i then the second output is also equal to i. We will apply the asymmetric approximate couplings from Section 4.5 to induce this kind of asymmetric relation on outputs. Compared to existing proofs of privacy, approximate coupling proofs are simpler and more concise, abstracting away reasoning about conditional probabilities. To demonstrate, we prove differential privacy for two algorithms from the privacy literature. We present each proof twice: first as an approximate coupling proof, then as a formal proof in APRHL. CHAPTER 4. APPROXIMATE COUPLINGS FOR DIFFERENTIAL PRIVACY 62 The Report-noisy-max mechanism Our first example is called Report-noisy-max (Dwork and Roth, 2014). Given a list of numeric queries q1 , . . . , qN : D → Z and a database d ∈ D, this mechanism computes qi (d) for each i and adds fresh Laplace noise to each answer, releasing the index i with the highest noisy answer. Alternatively, we can think of each query as indexed by an element r in some finite range R, where q r computes the score for r given private data d. Then Report-noisy-max is a close cousin to the well-known Exponential mechanism of McSherry and Talwar (2007), which finds an element with a high score while preserving privacy. Suppose evalQ(i, d) returns qi (d). We implement Report-noisy-max as the following program rnm: maxA ← 0; maxI ← 0; i ← 1; while i ≤ N do $ Lap a← "/2 (evalQ(i, d)); if maxI = 0 ∨ a > maxA then maxA ← a; maxI ← i; i ← i+1 The variable maxI stores the output of the mechanism; we assume it ranges over N. Theorem 4.7.1. Suppose each query qi is 1-sensitive: |qi (d)−qi (d 0 )| ≤ 1 for adjacent databases d, d 0 . Then executing rnm and returning maxI is "-differentially private. While we could prove privacy with the sequential composition theorem (Theorem 4.1.4), we would get an overly conservative bound of (N ", 0)-privacy since we must pay for each Laplace sampling. Report-noisy-max is an example of a mechanism where the precise analysis showing (", 0)-privacy previously required an ad hoc proof. However, since approximate couplings satisfy a more general composition principle, we can prove privacy for this mechanism compositionally. Proof by approximate coupling. Consider a possible output j ∈ N. We construct an (", 0)-approximate coupling such that if maxI〈1〉 = j, then maxI〈2〉 = j. If j = 0 this is easy since the only way maxI = 0 is if N = 0 and the loops terminate immediately. If j > N this is also easy, as maxI cannot exceed N . So suppose j ∈ [1, N ]. In iterations i = 6 j, we couple the samplings so both runs use the same amount of noise: a〈1〉 − evalQ(i〈1〉, d〈1〉) = a〈2〉 − evalQ(i〈2〉, d〈2〉). In particular, a〈2〉 ≤ a〈1〉 + 1. This is a (0, 0)-approximate coupling for each iteration. For iteration i = j, we couple so the noisy answer in the second run is one larger than the noisy answer in the first run: a〈1〉 + 1 = a〈2〉. The true answers evalQ(i〈1〉, d〈1〉) and evalQ(i〈2〉, d〈2〉) are at most 1 apart and the shift is 1. Since we use Laplace noise with parameter "/2, this is a (2 · "/2, 0) = (", 0)-coupling. Now if the noisy answer on iteration j is the highest noisy answer in the first run, then it must also be the highest noisy answer in the second run: by the coupling, a〈1〉 + 1 = a〈2〉 for iteration j and a〈2〉 ≤ a〈1〉 + 1 for all other iterations. The total cost is (", 0), establishing (", 0)-differential privacy. Remark 4.7.2. Earlier versions of Report-noisy-max also returned the noisy answer maxA in addition to the index maxI. However, subtle errors in the privacy proof were later discovered; a correct proof of privacy is currently not known. Attempting a proof by approximate coupling immediately runs into a problem: we have coupled a〈1〉 + 1 = a〈2〉 for the critical iteration, but we need a〈1〉 = a〈2〉 if we are to safely return the noisy answer too. CHAPTER 4. APPROXIMATE COUPLINGS FOR DIFFERENTIAL PRIVACY 63 In order to perform this proof in APRHL, the main complication is to only pay for coupling the critical iteration j. Directly applying the loop rule would give an overly conservative guarantee of (N ", 0)-privacy since [WHILE] assumes each iteration has the same cost. To get around this problem, we first use the program equivalence rule to split the loop into three separate pieces: iterations before j, iteration j, and iterations after j. Then we arrange a (0, 0)-coupling for each iteration in the first and last loops, and an (", 0)-coupling for the middle loop consisting of just the critical iteration. Theorem 4.7.3. Suppose each query qi is 1-sensitive: |qi (d) − qi (d 0 )| ≤ 1 for adjacent databases d, d 0 . Then the following judgment is derivable in APRHL: ` rnm ∼(",0) rnm : Adj(d〈1〉, d〈2〉) =⇒ maxI〈1〉 = maxI〈2〉 Proof. We verify an equivalent program, dividing the loop in three: maxA ← 0; maxI ← 0; i ← 1; while i ≤ N ∧ i < j do $ Lap a← "/2 (evalQ(i, d)); if maxI = 0 ∨ a > maxA then maxA ← a; maxI ← i; i ← i + 1; while i ≤ N ∧ i = j do $ Lap a← "/2 (evalQ(i, d)); if maxI = 0 ∨ a > maxA then maxA ← a; maxI ← i; i ← i + 1; while i ≤ N do $ Lap a← "/2 (evalQ(i, d)); if maxI = 0 ∨ a > maxA then maxA ← a; maxI ← i; i ← i+1 We call this program rnm0 . Our goal is to prove the pointwise judgment ` rnm0 ∼(",0) rnm0 : Adj(d〈1〉, d〈2〉) =⇒ maxI〈1〉 = j → maxI〈2〉 = j for every j ∈ N. When j = 0 or j > N , the proof is straightforward—in the first case N = 0, and in the second case maxI〈1〉 = j must be false. So we focus on the more interesting cases, j ∈ [1, N ]. The initial assignment statements can be handled with [ASSN]. Let the three loops be w< , w= , and w> , and let body be the common loop body. Define the following invariants:  |maxA〈1〉 − maxA〈2〉| ≤ 1 Θ< ¬ maxI〈1〉 < i〈1〉 ∧ maxI〈2〉 < i〈1〉  ¬(i〈1〉 ≤ N ∧ i〈1〉 < j) → i〈1〉 = j  |maxA〈1〉 − maxA〈2〉| ≤ 1 Θ= ¬ maxI〈1〉 = j → (maxI〈2〉 = j ∧ maxA〈1〉 + 1 = maxA〈2〉)  ¬(i〈1〉 ≤ N ∧ i〈1〉 = j) → i〈1〉 = j + 1 ¨ i〈1〉 > j Θ> ¬ maxI〈1〉 = j → (maxI〈2〉 = j ∧ maxA〈1〉 + 1 = maxA〈2〉) CHAPTER 4. APPROXIMATE COUPLINGS FOR DIFFERENTIAL PRIVACY 64 We leave the invariant Adj(d〈1〉, d〈2〉) ∧ i〈1〉 = i〈2〉 implicit and we prove three judgments corresponding to the three cases. First, we have ` body ∼(0,0) body : Θ< =⇒ Θ< by coupling the Laplace samplings using [LAPNULL], ensuring |maxA〈1〉 − maxA〈2〉| ≤ 1. Thus, we have the following judgment for the first loop by [WHILE]: ` w< ∼(0,0) w< : Θ< =⇒ Θ< ∧ ¬(i〈1〉 ≤ N ∧ i〈1〉 < j). For the next loop body, we have ` body ∼(",0) body : Θ= =⇒ Θ= by coupling the Laplace samplings using [LAPGEN] with k = 1, k0 = 2, ensuring a〈1〉 + 1 = a〈2〉. Combined with the pre-condition Θ= , if the first run exceeds maxA〈1〉 then the second run also exceeds maxA〈2〉. By the rule [LAPGEN], this coupling costs (", 0). Since this loop runs for just one iteration, we have a judgment for the second loop by [WHILE]: ` w= ∼(",0) w= : Θ= =⇒ Θ= ∧ ¬(i〈1〉 ≤ N ∧ i〈1〉 = j). Finally for the last loop, we have ` body ∼(0,0) body : Θ> =⇒ Θ> by coupling the samplings using [LAPNULL]. Applying [WHILE] gives a similar judgment for the last loop: ` w> ∼(0,0) w> : Θ> =⇒ Θ> We can combine the three loop judgments while summing the approximation parameters with [SEQ], applying the rule of consequence with implications |= Θ< ∧ ¬(i〈1〉 ≤ N ∧ i〈1〉 < j) → Θ= |= Θ= ∧ ¬(i〈1〉 ≤ N ∧ i〈1〉 = j) → Θ> to establish ` rnm0 ∼(",0) rnm0 : Adj(d〈1〉, d〈2〉) =⇒ maxI〈1〉 = j → maxI〈2〉 = j. We conclude differential privacy by applying [PW-EQ] and [EQUIV]: ` rnm ∼(",0) rnm : Adj(d〈1〉, d〈2〉) =⇒ maxI〈1〉 = maxI〈2〉. Remark 4.7.4. Report-noisy-max draws noise from the Laplace distribution. A slight variant of this algorithm uses the one-sided Laplace distribution, also called the exponential distribution, to achieve similar results. This variant is closely related to the Exponential mechanism of McSherry and Talwar (2007); for instance, if we add noise from the continuous exponential distribution, Report-noisy-max is equivalent to the Exponential mechanism (Dwork and Roth, 2014, Theorem 3.13). Replacing the Laplace distribution with the one-sided Laplace distribution makes the privacy proof only a bit more difficult. While privacy still does not follow from the standard composition theorem—in fact, there is now nothing to compose because sampling from the one-sided Laplace distribution isn’t differentially private—we can give a similar proof by approximate coupling. The main difference is in the rule [LAPGEN]: the analogous rule for the one-sided Laplace distribution has a slightly stronger pre-condition, with 0 ≤ k + e1 〈1〉 − e2 〈2〉 ≤ k0 in place of |k + e1 〈1〉 − e2 〈2〉| ≤ k0 . Our coupling proof is otherwise unchanged. CHAPTER 4. APPROXIMATE COUPLINGS FOR DIFFERENTIAL PRIVACY 65 i ← 1; out ← []; $ Lap t← "/4 (T ); while i ≤ N ∧ |out| < C do ans ← (0, 0); go ← true; while i ≤ N ∧ go do $ Lap a← "/8C (evalQ(i, d)); if a > t then $ Lap noisy ← "/4C (evalQ(i, d)); ans ← (i, noisy); out ← ans :: out; go ← false; i ← i+1 Figure 4.6: Sparse Vector The Sparse Vector mechanism Our second example is the Sparse Vector mechanism, a well-known algorithm with a challenging privacy proof. At least six variants were thought to be proved private, only for subtle mistakes to later surface in four of them (Lyu et al., 2017). Perhaps the canonical (correct) version of the algorithm can be found in the textbook by Dwork and Roth (2014), where it is called NUMERIC SPARSE. This mechanism takes a numeric threshold T ∈ Z, a cutoff C ∈ N, a list of numeric queries q1 , . . . , qN : D → Z, and a database d ∈ D as input. Sparse Vector releases the indices of the first C queries that have answer approximately above the threshold, along with noisy answers for each of these queries. The mechanism adds Laplace noise to the threshold and Laplace noise to each query answer, returning the queries with noisy answer above the noisy threshold. Again, the challenge in the privacy analysis is to only pay for above-threshold queries, rather than all queries.4 Figure 4.6 presents the code for the Sparse Vector algorithm. The variable out stores a list of pairs of an index and a noisy answer for each query that is approximately above-threshold; the list is initially empty and pairs are added to the head. The algorithm stops when it answers C queries or when it processes all N queries. The code is structured in a slightly artificial way—the queries are broken into chunks, where each iteration of the outer loop corresponds to exactly one above-threshold query. In their presentation, Dwork and Roth (2014) first prove privacy for a subroutine called ABOVETHRESHOLD—which randomizes the threshold and executes one iteration of the outer loop—by carefully manipulating conditional probabilities. They then verify the whole mechanism NUMERIC SPARSE by composing calls to ABOVETHRESHOLD and applying the standard composition theorem (Theorem 4.1.4). Rather than re-randomize the threshold after every answered query, we add noise to the threshold just at the beginning of the algorithm; this variant was independently proposed by Lyu et al. (2017). Accordingly, it is no longer possible to analyze the outer loop iterations via standard privacy composition since each iteration of the outer loop is not differentially private. While using the same noise for the threshold does not affect the asymptotic accuracy of Sparse Vector, practical applications may benefit. Theorem 4.7.5. Suppose each query qi is 1-sensitive: |qi (d) − qi (d 0 )| ≤ 1 for adjacent databases d, d 0 , and the threshold T is the same for both runs. Then Sparse Vector is "-differentially private. Proof by approximate coupling. We first couple the threshold sampling so t〈1〉 + 1 = t〈2〉. The means are 0 apart, the coupled samples are 1 apart, and the noise is from the Laplace distribution with parameter "/4, so this is an (1 · "/4, 0) = ("/4, 0) approximate coupling. Assuming this coupling, we argue that the two executions of the 4 A precursor of this algorithm was designed to release a private version of a vector of numbers where most of the entries are known to be zero, i.e., a sparse vector. CHAPTER 4. APPROXIMATE COUPLINGS FOR DIFFERENTIAL PRIVACY 66 inner loop can be approximately coupled to satisfy ans〈1〉 = ans〈2〉. We consider the inner loop and construct an approximate coupling such that if ans〈1〉 = ( j, v) then ans〈2〉 = ( j, v) as well. Just like we did in the proof of Report-noisy-max, we use different couplings depending on where we are in the loop relative to iteration j. In iterations before j, we use the null coupling when sampling a and noisy to give a (0, 0)-approximate coupling such that |a〈1〉 − a〈2〉| ≤ 1; this ensures that if we don’t go above threshold in the first execution before j, then we also don’t go above threshold in the second execution before j. We take the same (0, 0)-coupling for iterations after j. In the critical iteration j, we couple the samplings for a to ensure a〈1〉 + 1 = a〈2〉 and we couple noisy〈1〉 = noisy〈2〉 if necessary. Combined with the threshold coupling t〈1〉 + 1 = t〈2〉, this ensures that if we go above threshold in iteration j in the first execution then we also go above threshold in iteration j in the second execution, and the noisy answers for above-threshold queries are equal. To compute the approximation parameters, the coupling for a is an ("/4C, 0)-approximate coupling: the distance between the coupled samples is at most 2 greater than the distance between the means, and the noise is drawn from Lap"/8C . The coupling for noisy is the standard coupling for the Laplace mechanism; it is an ("/4C, 0)-approximate coupling since the true answers are at most 1 apart and the noise is drawn from Lap"/4C . So, iteration j uses an ("/4C + "/4C, 0) = ("/2C, 0)-approximate coupling and the loop coupling ensures that if ans〈1〉 = ( j, v) then ans〈2〉 = ( j, v). This gives an ("/2C, 0)-approximate coupling for the inner loop ensuring ans〈1〉 = ans〈2〉 and preserving out〈1〉 = out〈2〉. Since there are at most C iterations of the outer loop, we have an ("/2, 0)-approximate coupling ensuring out〈1〉 = out〈2〉 at the end of the algorithm. Combined with the ("/2, 0)-coupling for the threshold, this shows that Sparse Vector is (", 0)-differentially private. Remark 4.7.6. Earlier versions of Sparse Vector returned the noisy answers without adding fresh noise. These variants are now known to be incorrect: Lyu et al. (2017) show they are not "-differentially private for any finite ". If we attempt a proof by approximate coupling we immediately hit a problem: after coupling a〈1〉 + 1 = a〈2〉, returning the noisy answer a is not differentially private. By itself, this obstacle doesn’t show the algorithm is not differentially private. However, it suggests that something may be amiss. We can also give a more formal proof of privacy in APRHL. Like we did for Report-noisy-max, we transform the loops in order to apply couplings with different costs in different iterations. Sparse Vector also introduces an additional complication: under the we will build coupling, we don’t know the inner loops remain synchronized. So, we work with the following, equivalent implementation: i ← 1; out ← []; $ Lap t← "/4 (T ); while i ≤ N ∧ |out| < C do ans ← (0, 0); go ← true; while i ≤ N do $ Lap a← "/8C (evalQ(i, d)); if a > t ∧ go then $ Lap noisy ← "/4C (evalQ(i, d)); ans ← (i, noisy); go ← false; i ← i + 1; if p1 (ans) 6= 0 then out ← ans :: out; i ← p1 (ans) + 1 Compared to the more straightforward implementation in Fig. 4.6, the main difference is that the inner loop passes over all the queries. Once the inner loop finds an above threshold query, the algorithm sets the flag go and the inner loop skips over all remaining queries. Then if an above-threshold query was found in the inner loop, the index in ans must be non-zero. In this case, the outer loop records the answer and resets the counter to the query CHAPTER 4. APPROXIMATE COUPLINGS FOR DIFFERENTIAL PRIVACY 67 after the most recent above-threshold query (recall p1 returns the first element of a pair). By running through all the queries, the inner loops can be analyzed in a synchronized fashion. We call the inner loop aboveT, and the whole program program sparseV. Theorem 4.7.7. Suppose each query qi is 1-sensitive: |qi (d) − qi (d 0 )| ≤ 1 for adjacent databases d, d 0 and the threshold T is the same for both runs. Then the following judgment is derivable in APRHL: ` sparseV ∼(",0) sparseV : Adj(d〈1〉, d〈2〉) =⇒ out〈1〉 = out〈2〉 Proof. We elide the adjacency assertion Adj(d〈1〉, d〈2〉) and synchronization assertion i〈1〉 = i〈2〉 since they are preserved throughout the proof. Let’s first consider the inner loop aboveT. We prove the following judgment for every pair ( j, v) ∈ N × Z: ` aboveT ∼("/2C,0) aboveT : t〈1〉 + 1 = t〈2〉 =⇒ ans〈1〉 = ( j, v) → ans〈2〉 = ( j, v) The cases j = 0 and j > N are trivial, so we consider j ∈ [1, N ]. Much like we did for Report-noisy-max, we split the loop into three pieces: iterations before j, iteration j, and iterations after j. while i ≤ N ∧ i < j do $ Lap a← "/8C (evalQ(i, d)); if a > t ∧ go then $ Lap noisy ← "/4C (evalQ(i, d)); ans ← (i, noisy); go ← false; i ← i + 1; while i ≤ N ∧ i = j do $ Lap a← "/8C (evalQ(i, d)); if a > t ∧ go then $ Lap noisy ← "/4C (evalQ(i, d)); ans ← (i, noisy); go ← false; i ← i + 1; while i ≤ N do $ Lap a← "/8C (evalQ(i, d)); if a > t ∧ go then $ Lap noisy ← "/4C (evalQ(i, d)); ans ← (i, noisy); go ← false; i ← i+1 We call this program aboveT 0 , the loops w< , w= , and w> , and body of the loop body. We take invariants:   t〈1〉 + 1 = t〈2〉 Θ< ¬ go〈1〉 → go〈2〉  ¬(i〈1〉 ≤ N ∧ i〈1〉 < j) → i〈1〉 = j  t〈1〉 + 1 = t〈2〉    go〈1〉 → go〈2〉 Θ= ¬  ans〈1〉 = ( j, v) → ans〈2〉 = ( j, v)   ¬(i〈1〉 ≤ N ∧ i〈1〉 = j) → i〈1〉 = j + 1   t〈1〉 + 1 = t〈2〉 Θ> ¬ i〈1〉 > j  ans〈1〉 = ( j, v) → ans〈2〉 = ( j, v) CHAPTER 4. APPROXIMATE COUPLINGS FOR DIFFERENTIAL PRIVACY 68 We begin with the first loop. To show ` body ∼(0,0) body : i〈1〉 ≤ N ∧ i〈1〉 < j ∧ Θ< =⇒ Θ< , we couple the sampling for a with the null coupling [LAPNULL] so that |a〈1〉 − a〈2〉| = |evalQ(i〈1〉, d〈1〉) − evalQ(i〈2〉, d, 〈2〉)| ≤ 1. For the conditional statements we use the one-sided rules [COND -L] and [COND -R], giving four possible cases for the guard a > t ∧ go in the two executions: (True, True) We use [LAPNULL] to couple the samplings for noisy and establish ¬go〈1〉. (True, False) We use [LAP-L] for sampling noisy〈1〉 to establish ¬go〈1〉. (False, True) If go〈1〉 is false, then we use [LAP-R] for sampling noisy〈2〉 and conclude go〈1〉 → go〈2〉. If go〈1〉 is true, then a〈1〉 must be below threshold but this case is impossible: a〈2〉 must be above threshold but the thresholds are coupled so that t〈1〉 + 1 = t〈2〉 and |a〈1〉 − a〈2〉| ≤ 1. (False, False) We use [SKIP], preserving go〈1〉 → go〈2〉. Putting the cases together, we have ` body ∼(0,0) body : Θ< =⇒ Θ< . Since the loops are synchronized we apply [WHILE] to get ` w< ∼(0,0) w< : Θ< =⇒ Θ< ∧ ¬(i〈1〉 ≤ N ∧ i〈1〉 < j). Next, we turn to the second loop. We couple the samplings for a so that a〈1〉 + 1 = a〈2〉 with [LAPGEN], taking k = 1, k0 = 2. Since the parameter for the Laplace sampling is "/8C, this is a (2 · "/8C, 0) = ("/4C, 0)-approximate coupling. Like for the first loop, we have four cases when analyzing the conditional. The most interesting case is when both guards are true, when we couple the samplings for noisy with the standard Laplace rule [LAP] so that noisy〈1〉 = noisy〈2〉; this is an ("/4C, 0)-approximate coupling since the queries are 1-sensitive. We wind up with ¬go〈1〉 and ¬go〈2〉, establishing the post-condition go〈1〉 → go〈2〉. Moreover, ans〈1〉 = ( j, v) → ans〈2〉 = ( j, v) under the coupling. This suffices to establish the invariant Θ= when both guards are true. We use a similar argument for the other three cases, proving ` body ∼("/2C,0) body : Θ= =⇒ Θ= . Since there is exactly one iteration, [WHILE] gives ` w= ∼("/2C,0) w= : Θ= =⇒ Θ= ∧ ¬(i〈1〉 ≤ N ∧ i〈1〉 = j). In the last loop, we couple the samplings for a with [LAPNULL] and the samplings for noisy with [LAPNULL] or the one-sided rules [LAP-L] or [LAP-R], depending on whether the guards are true or not. This gives ` w> ∼(0,0) w> : Θ> =⇒ Θ> ∧ ¬(i〈1〉 ≤ N ). CHAPTER 4. APPROXIMATE COUPLINGS FOR DIFFERENTIAL PRIVACY 69 After using the rule of consequence with implications |= Θ< ∧ ¬(i〈1〉 ≤ N ∧ i〈1〉 < j) → Θ= |= Θ= ∧ ¬(i〈1〉 ≤ N ∧ i〈1〉 = j) → Θ> , we apply [SEQ] to combine the loop judgments and sum the approximation parameters: ` aboveT 0 ∼("/2C,0) aboveT 0 : t〈1〉 + 1 = t〈2〉 =⇒ ans〈1〉 = ( j, v) → ans〈2〉 = ( j, v). By applying pointwise equality [PW-EQ] and then the frame rule [FRAME] to preserve the threshold coupling, we establish the desired judgment for the inner loop: ` aboveT 0 ∼("/2C,0) aboveT 0 : t〈1〉 + 1 = t〈2〉 =⇒ ans〈1〉 = ans〈2〉 ∧ t〈1〉 + 1 = t〈2〉. Now we turn to the outer loop w of sparseV. At the end of each iteration, we know i〈1〉 = i〈2〉 ∧ out〈1〉 = out〈2〉 ∧ t〈1〉 + 1 = t〈2〉 since the inner loop guarantees ans〈1〉 = ans〈2〉. Applying [WHILE] with decreasing variant e v ¬ (i = N ) ? 0 : C − |out|, there at most C iterations and each iteration is related by an ("/2C, 0)-coupling. So we have the following judgment for the outer loop: ` w ∼("/2,0) w : out〈1〉 = out〈2〉 ∧ t〈1〉 + 1 = t〈2〉 =⇒ out〈1〉 = out〈2〉. Finally, we ensure the loop pre-condition t〈1〉 + 1 = t〈2〉 by coupling the sampling instructions for t with [LAPGEN], taking k, k0 ¬ 1. Since the Laplace distribution has parameter "/2, this is an ("/2, 0)-approximate coupling. Putting everything together we have ` sparseV ∼(",0) sparseV : Adj(d〈1〉, d〈2〉) =⇒ out〈1〉 = out〈2〉, showing that Sparse Vector is "-differentially private. Remark 4.7.8. It would be a bit more natural to use the guard go = false in the final conditional, but showing go〈1〉 = go〈2〉 after the inner loop is not so easy: our proof can only establish go〈1〉 → go〈2〉. In order to verify the program with guard go = false, we would need the one-sided invariant p1 (ans) 6= 0 ↔ go = false on both sides. While this invariant does hold, here we hit a limitation of the pointwise equality rule [PW-EQ]: the post-condition is narrowly restricted and we cannot show the above invariant in the post-condition of the inner loop. Later in Chapter 5 we will see how to leverage these one-sided invariants (cf. rules [AND -L] and [AND -R]). 4.8 Discussion To close this chapter, we briefly survey related systems for formally verifying differential privacy and discuss other applications of approximate couplings. CHAPTER 4. APPROXIMATE COUPLINGS FOR DIFFERENTIAL PRIVACY 70 Formal verification of differential privacy Due to its rich composition properties and compelling motivations, differential privacy is an attractive target for formal verification. Researchers have considered a broad array of techniques including linear types (Azevedo de Amorim, Gaboardi, Gallego Arias, and Hsu, 2014; Azevedo de Amorim, Gaboardi, Hsu, Katsumata, and Cherigui, 2017; Reed and Pierce, 2010; Winograd-Cort, Haeberlen, Roth, and Pierce, 2017), sized types (Gaboardi, Haeberlen, Hsu, Narayan, and Pierce, 2013), product programs (Barthe et al., 2014b), refinement types (Barthe, Gaboardi, Gallego Arias, Hsu, Roth, and Strub, 2015b), and more (Ebadi, Antignac, and Sands, 2016; Ebadi and Sands, 2016; Ebadi, Sands, and Schneider, 2015; McSherry, 2009; Palamidessi and Stronati, 2012; Proserpio, Goldberg, and McSherry, 2014; Tschantz, Kaynar, and Datta, 2011). (Readers can consult the recent survey by Barthe, Gaboardi, Hsu, and Pierce (2016d) for a more comprehensive overview.) Most existing techniques cannot verify privacy proofs beyond composition, such as the two examples we presented in this chapter. One notable exception is the LIGHTDP system proposed by Zhang and Kifer (2017), which combines a relational, dependent type system with a product program construction. This system can prove privacy for the Sparse Vector mechanism with a high degree of automation by using a novel type inference algorithm and a MAXSAT solver to optimize the privacy cost. The key theoretical idea behind LIGHTDP is randomness alignment, which specifies an injection from one sample space to another while recording the difference in probabilities. Randomness alignments are similar to the approximate couplings we saw for the Laplace mechanism (e.g., in the rules [LAPNULL] and [LAPGEN]). One important novelty in LIGHTDP is that alignments can be selected lazily, based on the result of the sample in the first execution. In this way, LIGHTDP can sometimes construct a privacy proof in one shot where APRHL would need to reason about each output separately with [PW-EQ]. In the Sparse Vector mechanism, for instance, LIGHTDP can select the shift coupling when the first iteration goes above threshold, and use the null coupling when it does not. (This approach does not work for Report-noisy-max, as the iteration with the highest noisy score is not known until the program has finished executing.) This lazy choice of alignment can be modeled by an approximate coupling that selects between two couplings, depending on a predicate on the first sample. If the predicate and two couplings satisfy a technical non-overlapping condition, the result is again an approximate coupling. Theorem 4.8.1 (Choice coupling). Let µ1 , µ2 be sub-distributions over A1 and A2 . Suppose we have a predicate P ⊆ A1 and two approximate couplings µ1 R](",δ) µ2 and µ1 S ](",δ) µ2 such that the following non-overlapping condition holds: R(P ) ∩ S (A1 \ P ) = ∅, where R(P ) is the set of elements in A2 related to something in P under R, and S (A1 \ P ) is the set of elements in A2 related to something outside of P under S . Then there is an approximate coupling µ1 T ](",2δ) µ2 where T is the relation T ¬ {(a1 , a2 ) | (a1 ∈ P → (a1 , a2 ) ∈ R) ∧ (a1 ∈ / P → (a1 , a2 ) ∈ S )}. Proof. Let ρ L , ρR and σ L , σR witness the two approximate couplings. Define witnesses    : a1 ∈ P ρ (a , a ) : a ∈ P 1  L 1 2 ρR (a1 , a2 ) : a1 ∈ /P µ L (a1 , a2 ) ¬ σ L (a1 , a2 ) : a1 ∈ / P and µR (a1 , a2 ) ¬ σR (a1 , a2 ) P   0 µ (a ) − µ (a , a ) : a = ?. 0 0 : a1 = ? 2 2 1 a ∈ A1 R 1 2 1 CHAPTER 4. APPROXIMATE COUPLINGS FOR DIFFERENTIAL PRIVACY 71 The support andP marginal conditions are immediate. The main thing to show is that µR (?, a2 ) is non-negative; it suffices to show a0 ∈A1 µR (a10 , a2 ) ≤ µ2 (a2 ). There are three cases: either a2 ∈ R(P ), a2 ∈ S (A1 \ P ), or none of 1 the above; by the non-overlapping condition, these cases are mutually exclusive. In the first case, we have X X X X µR (a10 , a2 ) = ρR (a10 , a2 ) + σR (a10 , a2 ) = ρR (a10 , a2 ) ≤ µ2 (a2 ). a10 ∈A1 a10 ∈P a10 ∈A\P a10 ∈P The second case is similar: X X X X µR (a10 , a2 ) = ρR (a10 , a2 ) + σR (a10 , a2 ) = σR (a10 , a2 ) ≤ µ2 (a2 ). a10 ∈A1 a10 ∈P a10 ∈A\P a10 ∈A\P In the third case the inequality clearly holds, as the sum is equal to 0. It only remains to check the distance condition d" (µ L , µR ) ≤ 2δ. By the distance conditions on the given witnesses, there are non-negative constants ζ(a1 , a2 ), ξ(a1 , a2 ) such that ρ L (a1 , a2 ) ≤ exp(") · ρR (a1 , a2 ) + ζ(a1 , a2 ) and σ L (a1 , a2 ) ≤ exp(") · σR (a1 , a2 ) + ξ(a1 , a2 ) with bounded sums: X ζ(a1 , a2 ) ≤ δ and a1 ,a2 X ξ(a1 , a2 ) ≤ δ. a1 ,a2 By definition, we have µ L (a1 , a2 ) ≤ exp(") · µR (a1 , a2 ) + max(ζ(a1 , a2 ), ξ(a1 , a2 )) for all a1 , a2 6= ?; it is easy to check µ L (a1 , a2 ) ≤ exp(") · µR (a1 , a2 ) when a1 = ? or a2 = ?. We can bound the sums X X max(ζ(a1 , a2 ), ξ(a1 , a2 )) ≤ ζ(a1 , a2 ) + ξ(a1 , a2 ) ≤ 2δ a1 ,a2 a1 ,a2 to give the claimed distance condition. Thus µ L , µR witness the desired approximate coupling. However, this coupling is not quite precise enough: its cost is greater than the maximum cost of the two couplings. Taking the example of Sparse Vector again, the shift coupling [LAPGEN] has a non-zero cost while the null coupling [LAPNULL] has zero cost. If we are selecting between these two couplings, we do not want to pay for the (more expensive) [LAPGEN] coupling on every iteration, but only on the single iteration where the first execution goes above threshold. LIGHTDP features a more fine-grained analysis where the cost can depend on which choice was taken. Since the choice depends on whether the first sample satisfies a predicate (e.g., goes above threshold), this analysis involves a randomized notion of privacy cost; LIGHTDP uses a product construction as a secondary analysis to bound the parameters in all possible executions. In contrast, APRHL requires the approximation parameters to be constant at each stage, though a more general form of approximate coupling allowing variable costs for different samples enables LIGHTDP-style privacy proofs. (See Chapter 6 for further discussion.) Approximate couplings in formal verification Approximate liftings are a flexible abstraction for reasoning about differential privacy. While we have focused on program logics, approximate liftings have played a central role in other formal verification settings. Barthe et al. (2014b) show how to verify differential privacy by first interleaving two programs into a single program and then analyzing the result, a so-called “synchronized product” approach. Their construction replaces CHAPTER 4. APPROXIMATE COUPLINGS FOR DIFFERENTIAL PRIVACY 72 every pair of corresponding random sampling commands with a single, non-deterministic assignment of a pair, along with a specification of the relation between the returned values. In this way, they can verify differential privacy by constructing proofs in non-deterministic Hoare logic. Their technique is based on approximate liftings and roughly corresponds to the fragment of APRHL where all conditionals are synchronized under the coupling, so only pairs of identical programs are related. Approximate liftings can also play a useful role in type systems. Barthe et al. (2015b) propose a relational refinement type system for a functional language HOARE2 . To handle relational reasoning for distributions, their system features a probability monad over a relation R on the base type, indexed by approximation parameters. This monad is then interpreted as an approximate lifting with support contained in R. In their typing rule for monadic bind with initial distributions related by a R-lifting, the body is typed under the assumption that the samples are related by R, giving a clean way to use information about distributions when reasoning about samples. This principle can be seen in the APRHL rule [SEQ] or more abstractly, as a monadic composition principle for approximate liftings. Barthe et al. (2015b) also explore an interesting application of approximate liftings: given sub-distributions µ1 , µ2 over the unit interval [0, 1],5 the approximate lifting µ1 (≤)](",δ) µ2 implies a bound on expected values: E x 1 ∼µ1 [x 1 ] ≤ exp(") · E x 2 ∼µ2 [x 2 ] + δ; this can be seen as a consequence of approximate stochastic domination. Barthe et al. (2015b) use this observation to prove relational properties involving expectations for algorithms at the intersection of mechanism design and differential privacy, where the mechanisms are randomized and the incentive properties follow from differential privacy. Barthe, Gaboardi, Gallego Arias, Hsu, Roth, and Strub (2016b) use similar ideas to verify more sophisticated incentive properties. 5 More precisely, a discrete version of the unit interval [0, 1]. Chapter 5 Advanced approximate couplings In the previous chapter, we saw how approximate couplings of the Laplace distribution and the pointwise equality principle support new proofs of privacy by approximate coupling. To enhance the power of this proof technique, we develop the theory of approximate couplings further in this chapter, giving a potpourri of new constructions and showing equivalences with other notions of approximate lifting. Our results enable richer proofs by approximate coupling, capable of modeling more advanced proofs of privacy. To begin, we show that approximate couplings are a discrete version of the approximate lifting recently proposed by Sato (2016). This equivalence gives a highly convenient method for constructing approximate couplings and extends a classical result by Strassen (1965) for probabilistic couplings (Section 5.1). Then, we consider two new constructions: up-to-bad approximate coupling (Section 5.2) and optimal subset coupling (Section 5.3). To follow, we identify a symmetric version of approximate coupling that supports an advanced composition principle generalizing the advanced composition theorem of differential privacy (Section 5.4). To make our constructions concrete, we introduce new APRHL proof rules and prove differential privacy for the Between Thresholds mechanism, recently proposed by Bun et al. (2017) (Section 5.5). Finally, we show approximate couplings unify several previously proposed notions (Section 5.6). Taken together, our equivalences and constructions serve as strong evidence that we have arrived at a natural, approximate generalization of probabilistic coupling. 5.1 Equivalence with Sato’s approximate lifting So far, we have considered approximate couplings for discrete distributions. In recent work, Sato (2016) develops a version of APRHL where programs can sample from continuous distributions, like the Laplace and Gaussian distributions. Intriguingly, Sato takes a significantly different definition of approximate lifting as the foundation of his logic. In the discrete case, his definition is as follows. Definition 5.1.1 (Sato (2016)). Let µ1 and µ2 be sub-distributions over countable sets A1 and A2 , and let R ⊆ A1 × A2 be a relation. There is an (", δ)-approximate R-lifting of (µ1 , µ2 ) if for every subset S1 ⊆ A1 , the following inequality holds: µ1 (S1 ) ≤ exp(") · µ2 (R(S1 )) + δ. (Recall R(S1 ) is the subset of A2 that is related to some element in S1 under R.) This definition is interesting for several reasons. First, rather than requiring the existence of witness distributions, Sato’s definition quantifies over all subsets of samples. Second, Sato shows that his definition generalizes the prior definition of approximate lifting by Barthe and Olmedo (2013) and Olmedo (2014), leaving open the question of whether they are equivalent; in fact, they are not. However, we show our definition of approximate lifting (Definition 4.2.2) is equivalent to Sato’s definition in the discrete case. Our result can be seen as an approximate version of Strassen’s theorem (Theorem 2.1.11); it also implies Strassen’s theorem for discrete sub-distributions. 73 CHAPTER 5. ADVANCED APPROXIMATE COUPLINGS 74 One direction of the equivalence is not hard to show. Theorem 5.1.2 (Approximate lifting implies Sato’s lifting). Let µ1 and µ2 be sub-distributions over A1 and A2 , and let R ⊆ A1 × A2 be a binary relation. Suppose there exists an approximate lifting µ1 R](",δ) µ2 . Then µ1 (S1 ) ≤ exp(") · µ2 (R(S1 )) + δ for every subset S1 ⊆ A1 . Proof. Let µ L , µR witness the approximate lifting. By the distance, support, and marginal conditions, µ1 (S1 ) = µ L (S1 × A?2 ) ≤ exp(") · µR (S1 × A?2 ) + δ = exp(") · µR (S1 × R(S1 )) + δ ≤ exp(") · µR (A?1 × R(S1 )) + δ = exp(") · µR (R(S1 )) + δ. The other direction—showing Sato’s approximate lifting implies our approximate lifting—is a bit more involved. We proceed in two steps. First, we prove the implication for distributions over finite sets. Then we generalize to distributions over countable sets by a limiting argument. The finite case The finite case follows from the max flow-min cut theorem. Roughly speaking, Sato’s condition ensures that in a certain graph, the minimum cut is not too small so the maximum flow must be large. This will imply we can build witnesses to the approximate lifting from the maximum flow. First, we recall the classical max flow-min cut theorem (see any standard textbook on algorithms, e.g., Kleinberg and Tardos (2005)). Theorem 5.1.3 (Max flow-min cut). Let G be a finite graph with vertices V and directed edges E. Let s ∈ V be the source node (i.e., there are no edges (a, s) ∈ E) and let t ∈ V be the sink node (i.e., there are no edges (t, b) ∈ E); we assume s and t are unique. We suppose each edge has capacity c(a, b) ∈ R ∪ {∞}. A flow from s to t is a map f : E → R+ such that (i) the flow is conserved at each internal node: X X f (a, v) = f (v, b) (a,v)∈E (v,b)∈E for every node v 6= s, t, and (ii) the flow respects the capacity constraints: f (a, b) ≤ c(a, b). The weight of a flow | f | is the amount of flow leaving s; by conservation, this is equal to the total flow entering t. A cut C is a partition of the vertices into two sets (V1 , V2 ). The capacity of a cut |C| is the total capacity of all edges (a, b) crossing (V1 , V2 ), i.e., with a ∈ V1 and b ∈ V2 . The weight of the largest flow equals the minimum capacity of a cut (V1 , V2 ) with s ∈ V1 and t ∈ V2 . Theorem 5.1.4. Let µ1 and µ2 be sub-distributions with finite support over sets A1 and A2 , and let R ⊆ A1 × A2 be a binary relation such that µ1 (S1 ) ≤ exp(") · µ2 (R(S1 )) + δ for every S1 ⊆ A1 . Then there exists an approximate lifting µ1 R](",δ) µ2 . Proof. Without loss of generality, by Theorem 4.2.7 we may take A1 and A2 to be the supports of µ1 and µ2 respectively; these are finite by assumption. We define a finite graph with vertices A?1 ∪ A?2 ∪ {>, ⊥}. Note that we CHAPTER 5. ADVANCED APPROXIMATE COUPLINGS 75 take two distinct vertices ?1 , ?2 corresponding to the ? elements in A?1 and A?2 . We connect the source > to every element of A?1 with capacities c(>, a1 ) ¬ µ1 (a1 ) · exp(−") c(>, ?1 ) ¬ ω − exp(−") · µ1 (A1 ), where ω ¬ µ2 (A2 ) + exp(−") · δ. Now c(>, ?1 ) ≥ 0 since by assumption, µ1 (A1 ) ≤ exp(") · µ2 (R(A1 )) + δ ≤ exp(") · µ2 (A2 ). We connect every element of A?2 to the sink ⊥, with capacities c(a2 , ⊥) ¬ µ2 (a2 ) c(?2 , ⊥) ¬ exp(−") · δ. For the internal nodes, we connect (a1 , a2 ) ∈ A1 × A2 for all (a1 , a2 ) ∈ R and (a1 , ?2 ), (?1 , a2 ) for all a1 , a2 , all with capacity ∞. Note that ({s}, V \ {s}) and (V \ {t}, {t}) are both cuts with capacity ω. We show that these are minimal cuts in the graph. Consider any other cut C = (V1 , V2 ) with edges E(C) crossing the cut. If there is any internal edge (a, b) ∈ E(C) with a, b 6= >, ⊥ then C has infinite capacity and is not a minimal cut. So, we may suppose E(C) contains only edges of the form (>, a1 ) and (a2 , ⊥). Now if E(C) does not contain (>, ?1 ), then it must cut all edges leading into ⊥; similarly, if E(C) does not contain (?2 , ⊥), then it must cut all edges leading from >. Either way, its capacity is at least ω. Finally, suppose E(C) contains no internal edges and contains both (>, ?1 ) and (?2 , ⊥). Let S2 ⊆ A2 be the set of all nodes a2 ∈ A2 with (a2 , ⊥) ∈ E(C), and let S1 ⊆ A1 be the set of all nodes a1 ∈ A1 with (>, a1 ) ∈ E(C). Since C separates > and ⊥, we have R(A1 \ S1 ) ⊆ S2 . We can now lower-bound the capacity: |C| = c(>, S1 ) + c(S2 , ⊥) + c(>, ?1 ) + c(?2 , ⊥) = exp(−") · µ1 (S1 ) + c(S2 , ⊥) + ω − exp(−") · µ1 (A1 ) + exp(−") · δ ≥ exp(−") · µ1 (S1 ) + c(R(A1 \ S1 ), ⊥) + ω − exp(−") · µ1 (A1 ) + exp(−") · δ ≥ exp(−") · µ1 (S1 ) + exp(−") · µ1 (A1 \ S1 ) − exp(−") · δ + ω − exp(−") · µ1 (A1 ) + exp(−") · δ =ω The final inequality is by Sato’s condition applied to the set A1 \ S1 . So every cut in this graph has capacity at least ω, and there is a cut achieving capacity ω. By Theorem 5.1.3, there is a maximum flow f with weight ω. We define witnesses µ L (a1 , a2 ) ¬ exp(") · f (a1 , a2 ) : if (a1 , a2 ) ∈ R or a2 = ?2 µR (a1 , a2 ) ¬ f (a1 , a2 ) : if (a1 , a2 ) ∈ R or a1 = ?1 and zero otherwise. The support condition is clear. Since f has weight ω, it must saturate all edges exiting > and entering ⊥ and so the marginal conditions are also clear. The only thing to check is the distance condition d" (µ L , µR ) ≤ δ. It suffices to show thisP condition pointwise, by finding non-negative ζ(a1 , a2 ) such that µ L (a1 , a2 ) ≤ exp(") · µR (a1 , a2 ) + ζ(a1 , a2 ) and (a1 ,a2 ) ζ(a1 , a2 ) ≤ δ. For all a1 ∈ A?1 and all a2 6= ?2 , we take ζ(a1 , a2 ) = 0. When a2 = ?2 we know µ L (a1 , ?2 ) = exp(") · f (a1 , ?2 ) and µR (a1 , ?2 ) = 0, CHAPTER 5. ADVANCED APPROXIMATE COUPLINGS 76 so we may take ζ(a1 , ?2 ) = exp(") · f (a1 , ?2 ). Conservation of flow yields X X ζ(a1 , a2 ) = exp(") · f (a1 , ?2 ) = exp(") · f (?2 , ⊥) = δ, (a1 ,a2 )∈A?1 ×A?2 a1 ∈ A 1 establishing the desired distance condition d" (µ L , µR ) ≤ δ. The countable case There are several possible approaches to generalize Theorem 5.1.4 to countable distributions. Perhaps the most straightforward is to apply a version of the max flow-min cut theorem for countable graphs (Aharoni, Berger, Georgakopoulos, Perlstein, and Sprüssel, 2011). Instead, we will give a more elementary proof. Besides being self-contained, our proof also establishes limit and compactness properties of approximate couplings and their witnesses, which may be of independent interest. We first show that given a convergent sequence of pairs of distributions with an approximate lifting for each pair, there is a sub-sequence of witnesses converging to witnesses of an approximate lifting for the limits. We then generalize Theorem 5.1.4 to countable domains by viewing a distribution over a countable set as the pointwise limit of distributions with finite support, using the finite case to build approximate liftings (and witnesses) for each pair of finite restrictions We will need a generalized version of the dominated convergence theorem. Theorem 5.1.5 (see, e.g., Royden and Fitzpatrick (2010, Chapter 4, Theorem 19)). Let Ω be a measurable space with measure µ. Let { f n } and {g n } be two sequences of measurable functions Ω → R such that there exist functions f , g : Ω → R with 1. limn→∞ f n = f pointwise; 2. | f n | ≤ g n ; and R R 3. limn→∞ g n dµ = g dµ < ∞. Then we have Z lim n→∞ f n dµ = Z f dµ. Since we work with countable spaces, we take µ to be the discrete measure. In this case, the integrals are simply plain sums. We will also need a lemma about witnesses to approximate liftings—roughly speaking, we may assume the witnesses are within a purely multiplicative factor of each other except on pairs with ?. Lemma 5.1.6. Suppose µ1 , µ2 are sub-distributions over A1 and A2 such that µ1 R](",δ) µ2 . Then there exists (η L , ηR ) witnessing the approximate lifting with ηR (a1 , a2 ) ≤ η L (a1 , a2 ) ≤ exp(") · ηR (a1 , a2 ) for all a1 , a2 6= ?. Proof. Let µ L , µR be witnesses. Define witnesses   1 , a2 ), exp(") · µR (a1 , a2 )) : a1 6= ?, a2 6= ? min(µ L (aP : a1 6= ?, a2 = ? η L (a1 , a2 ) ¬ µ1 (a1 ) − a0 ∈A2 η L (a1 , a20 ) 2  0 : otherwise; CHAPTER 5. ADVANCED APPROXIMATE COUPLINGS 77   : a1 6= ?, a2 6= ? 1 , a2 ), µR (a1 , a2 )) min(µ L (aP 0 ηR (a1 , a2 ) ¬ µ2 (a2 ) − a0 ∈A1 ηR (a1 , a2 ) : a1 = ?, a2 6= ? 1  0 : otherwise. The marginal and support conditions follow from the respective conditions for (µ L , µR ). Note that η L and ηR are non-negative by the marginal conditions for µ L and µR . Furthermore for all (a1 , a2 ) ∈ A1 × A2 , we have ηR (a1 , a2 ) ≤ η L (a1 , a2 ) ≤ exp(") · ηR (a1 , a2 ). It only remains to check the distance condition. Define non-negative constants ζ(a1 , a2 ) ¬ max(µ L (a1 , a2 ) − exp(") · µR (a1 , a2 ), 0). SincePd" (µ L , µR ) ≤ δ, we know µ L (a1 , a2 ) ≤ exp(") · µR (a1 , a2 ) + ζ(a1 , a2 ) with equality when ζ(a1 , a2 ) > 0, and a1 ,a2 ∈A? ×A? ζ(a1 , a2 ) ≤ δ. Thus, η L (a1 , a2 ) = µ L (a1 , a2 ) − ζ(a1 , a2 ) for every a1 , a2 6= ?. Also, we know 1 2 η L (a1 , a2 ) ≤ exp(") · ηR (a1 , a2 ). Thus for any subset S ⊆ A?1 × A?2 , we have η L (S ) ≤ exp(") · ηR (S ∩ (A1 × A2 )) + η L (S ∩ (A1 × {?})) ≤ exp(") · ηR (S ∩ (A1 × A2 )) + η L (A1 × {?}) ! = exp(") · ηR (S ∩ (A1 × A2 )) + X µ1 (a1 ) − a1 ∈ A 1 = exp(") · ηR (S ∩ (A1 × A2 )) + X µ L (a1 , a2 ) − ζ(a1 , a2 ) a2 ∈A2 X µ L (a1 , ?) + ζ(a1 , a2 ) (a1 ,a2 )∈A1 ×A2 a1 ∈ A 1 X = exp(") · ηR (S ∩ (A1 × A2 )) + X ζ(a1 , a2 ) (a1 ,a2 )∈A1 ×A?2 ≤ exp(") · ηR (S ) + δ. We are now ready to prove that a converging sequence of pairs of distributions related by approximate liftings implies an approximate lifting for the limit distributions. (n) (n) Lemma 5.1.7. Let R be a binary relation between countable sets A1 , A2 . Consider a sequence {(µ1 , µ2 )}n∈N with (n) (n) µ1 ∈ SDistr(A1 ) and µ2 ∈ SDistr(A2 ) such that there exists an approximate lifting for each n: (n) (n) µ1 R]("n ,δn ) µ2 . (n) (n) Suppose limn→∞ ("n , δn ) = (", δ) and {µ1 }n , {µ2 }n converge to µ1 , µ2 under the L 1 norm: lim n→∞ (n) X µi (ai ) − µi (ai ) = 0 a i ∈A i for i = 1, 2. Then there exists an approximate lifting of the limit sub-distributions: µ1 R](",δ) µ2 . (n) (n) (n) (n) Proof. Let (η L , ηR ) witness the approximate lifting of µ1 and µ2 , satisfying Lemma 5.1.6. Each witness (n) (n) can be viewed as a map η L , ηR : A?1 × A?2 → [0, 1]. Since A1 and A2 are countable and [0, 1] is compact, ? ? A1 × A2 → [0, 1] is the countable product of compact sets and is itself (sequentially) compact. Hence, there exists CHAPTER 5. ADVANCED APPROXIMATE COUPLINGS (ω ) 78 (ω ) a sub-sequence of indices {ωn }n such that η L n , ηR n both converge pointwise to sub-distributions (η L , ηR ). (See any real analysis textbook, e.g., Royden and Fitzpatrick (2010) for a discussion about sequential compactness.) We claim these limit sub-distributions are the desired witnesses. It is clear that supp(η L ) and supp(ηR ) are contained in R. The marginal conditions are a bit trickier. Let a1 ∈ A1 (the marginal for a1 = ? is clear), and let "max be an upper bound of the sequence {"n }n ; since the sequence converges to ", we may assume "max is finite. By (ω ) (ω ) (ω ) Lemma 5.1.6 and the marginal condition on µ2 n , the sequence {η L n (a1 , −)}n∈N is bounded by β L n : A?2 → R, where ¨ (ω ) e"max µ2 n (a2 ) : if a2 6= ? (ωn ) β L (a2 ) ¬ 1 : if a2 = ?. (ωn ) The sequence {β L Evidently P a2 ∈A?2 }n converges under the L 1 norm to β L : A?2 → R, where ¨ e"max µ2 (a2 ) : if a2 6= ? β L (a2 ) ¬ 1 : if a2 = ?. β L (a2 ) exists and is at most 1 + e"max . Now for the first marginal, π1 (η L )(a1 ) = X η L (a1 , a2 ) = a2 ∈A?2 = lim n→∞ X a2 ∈A?2 X a2 ∈A?2 (ωn ) = lim µ1 n→∞ (ωn ) ηL (ωn ) lim η L n→∞ (a1 , a2 ) (ωn ) (a1 , a2 ) = lim π1 (η L n→∞ )(a1 ) (a1 ) = µ1 (a1 ). (ω ) We can interchange the sum and the limit by the dominated convergence theorem with bounding functions β L n (Theorem 5.1.5). For the second marginal, let a2 ∈ A2 (the marginal for a2 = ? is clear). By Lemma 5.1.6 and the marginal (ω ) (ω ) (ω ) condition on µ1 n , the sequence {ηR n (−, a2 )}n∈N is bounded by βR n : A?1 → R, where ¨ (ω ) µ1 n (a1 ) : if a1 6= ? (ωn ) βR (a1 ) ¬ 1 : if a1 = ?. (ωn ) The sequence {βR Evidently P a1 ∈A?1 }n converges under the L 1 norm to βR : A?1 → R, where ¨ µ1 (a1 ) : if a1 6= ? βR (a1 ) ¬ 1 : if a1 = ?. βR (a1 ) exists and is at most 2. For the second marginal, π2 (ηR )(a2 ) = X ηR (a1 , a2 ) = a1 ∈A?1 = lim n→∞ a1 ∈A?1 X a1 ∈A?1 (ωn ) = lim µ2 n→∞ X (ωn ) ηR (ωn ) lim ηR n→∞ (a1 , a2 ) (ωn ) (a1 , a2 ) = lim π2 (ηR n→∞ )(a2 ) (a2 ) = µ2 (a2 ). As before, to interchange the sum and the limit we apply the dominated convergence theorem with bounding (ω ) functions βR n (Theorem 5.1.5). CHAPTER 5. ADVANCED APPROXIMATE COUPLINGS 79 The distance condition now follows by taking limits. For any subset S ⊆ A?1 × A?2 , we have (ω ) (ωn ) η L (S ) − exp(") · ηR (S ) = lim η L n (S ) − lim exp("ωn ) · lim ηR n→∞ n→∞ n→∞ € Š (ω ) (ω ) = lim η L n (S ) − exp("ωn ) · ηR n (S ) (S ) n→∞ ≤ lim δωn n→∞ = δ. Finally, we obtain the countable version of Theorem 5.1.4. Theorem 5.1.8. Let µ1 and µ2 be sub-distributions over countable sets A1 and A2 , and let R ⊆ A1 × A2 be a binary relation such that µ1 (S1 ) ≤ exp(") · µ2 (R(S1 )) + δ for every S1 ⊆ A1 . Then there exists an approximate lifting µ1 R](",δ) µ2 . (n) (n) (n) (n) Proof. Since A1 and A2 are countable, there are finite subsets I1 ⊆ A1 , I2 ⊆ A2 such that {I1 }n and {I2 }n (n) (n) are increasing with ∪n I1 = A1 and ∪n I2 = A2 . Consider the sequences of restricted sub-distributions (n) µ1 (a1 ) (n) ¨ µ1 (a1 ) : a1 ∈ I1 ¬ 0 : otherwise (n) µ2 (a2 ) ¨ ¬ (n) µ2 (a2 ) : a2 ∈ I2 0 : otherwise. For any subset S1 ⊆ A1 , by assumption µ1 (S1 ) ≤ exp(") · µ2 (R(S1 )) + δ. On the restricted sub-distributions, we have (n) (n) (n) µ1 (S1 ) ≤ µ1 (S1 ) ≤ exp(") · µ2 (R(S1 ) ∩ I2 ) + exp(") · µ2 (A2 \ I2 ) + δ (n) ¬ exp(") · µ2 (R(S1 )) + δn . (n) (n) (n) (n) Evidently limn→∞ δn = δ. Since µ1 and µ2 have finite support contained in I1 and I2 , Theorem 5.1.4 gives an approximate lifting for each finite restriction: (n) (n) µ1 R](",δn ) µ2 . (n) (n) Since µ1 and µ2 converge in L 1 to µ1 and µ2 , we can conclude by Lemma 5.1.7. Alternative proofs of coupling constructions The equivalence from Theorems 5.1.2 and 5.1.8 gives a convenient way to construct approximate couplings. For instance, we can easily prove a transitivity principle. Lemma 5.1.9. Let µ1 , µ2 , µ3 be sub-distributions over A1 , A2 , A3 respectively, and let R ⊆ A1 × A2 and S ⊆ A2 × A3 be binary relations. If we have 0 0 µ1 R](",δ) µ2 and µ2 S ](" ,δ ) µ3 , then we also have µ1 (S ◦ R)]("+" ,exp(" )δ+δ ) µ3 . 0 0 0 CHAPTER 5. ADVANCED APPROXIMATE COUPLINGS 80 Proof. Let T1 ⊆ A1 be any subset. By Theorem 5.1.2 we have µ1 (T1 ) ≤ exp(")µ2 (R(T1 )) + δ µ2 (R(T1 )) ≤ exp(" 0 )µ3 ((S ◦ R)(T1 )) + δ0 . Chaining the inequalities and applying Theorem 5.1.8 yields the desired approximate lifting. We can also give alternative proofs for the couplings from Chapter 4. Theorem 4.2.7. Let µ1 and µ2 be sub-distributions over A1 and A2 . If we have functions f i : Ai → Bi for i ∈ {1, 2}, and a relation R ⊆ B1 × B2 , then µ1 {(a1 , a2 ) ∈ A1 × A2 | f1 (a1 ) R f2 (a2 )}](",δ) µ2 if and only if ] ] f1 (µ1 ) {(b1 , b2 ) ∈ B1 × B2 | b1 R b2 }](",δ) f2 (µ2 ). (Recall f : A → B can be lifted to a map f ] : SDistr(A) → SDistr(B) on sub-distributions.) Proof (alternative). For the forward direction, let T1 ⊆ B1 be any subset. Then ] f1 (µ1 )(T1 ) = µ1 ( f1−1 (T1 )) ≤ exp(") · µ2 ( f2−1 (R(T1 ))) + δ = exp(") · (Theorem 5.1.2) ] f2 (µ2 )(R(T1 )) + δ, so we conclude by Theorem 5.1.8. For the reverse direction, let S1 ⊆ A1 be any subset. Then µ1 (S1 ) ≤ µ1 ( f1−1 ( f1 (S1 ))) ] = f1 (µ1 )( f1 (S1 )) ] ≤ exp(") · f2 (µ2 )(R( f1 (S1 ))) + δ = (Theorem 5.1.2) exp(") · µ2 ( f2−1 (R( f1 (S1 )))) + δ. Since f1 (x 1 ) R f2 (x 2 ) precisely when x 1 ( f2−1 ◦ R ◦ f1 ) x 2 , we conclude by Theorem 5.1.8. Proposition 4.5.1. Let v1 , v2 ∈ Z. Then: Lap" (v1 ) {(x 1 , x 2 ) | x 1 − v1 = x 2 − v2 }](0,0) Lap" (v2 ). Proof (alternative). Let S ⊆ Z be any subset and let S 0 be the set {s − v1 + v2 | s ∈ S }. Noting Lap" (v1 )(s) = Lap" (v2 )(s − v1 + v2 ) for every s and summing over all s ∈ S , we have Lap" (v1 )(S ) = Lap" (v2 )(S 0 ). Theorem 5.1.8 gives the desired approximate coupling. Proposition 4.5.3. Let k, k0 , v1 , v2 ∈ Z, and suppose |k + v1 − v2 | ≤ k0 . Then: Lap" (v1 ) {(x 1 , x 2 ) | x 1 + k = x 2 }](k ",0) Lap" (v2 ). 0 CHAPTER 5. ADVANCED APPROXIMATE COUPLINGS 81 Proof (alternative). Let S ⊆ Z be any subset and let S 0 be the set {s + k | s ∈ S }. Noting Lap" (v1 )(s) = Lap" (v2 )(s − v1 + v2 ) ≤ exp(|k − v2 + v1 |") · Lap" (v2 )(s + k) ≤ exp(k0 ") · Lap" (v2 )(s + k) for every s and summing over all s ∈ S , we have Lap" (v1 )(S ) = exp(k0 ") · Lap" (v2 )(S 0 ). Theorem 5.1.8 gives the desired approximate coupling. Proposition 4.6.1. Let µ1 , µ2 be sub-distributions over R and suppose for every i ∈ R, we have µ1 {(r1 , r2 ) | r1 = i → r2 = i}](",δi ) µ2 for non-negative " and {δi }i∈R . Then we have µ1 (=)](",δ) µ2 where δ = P i∈R δi . Proof (alternative). By Theorem 5.1.2 we have µ1 (i) ≤ exp(") · µ2 (i) + δi for every i ∈ R. Hence for any set S ⊆ R, summing over i ∈ S gives X µ1 (S ) ≤ exp(") · µ2 (S ) + δi ≤ exp(") · µ2 (S ) + δ. i∈S Theorem 5.1.8 gives the desired approximate coupling. For the couplings we introduce in the rest of this chapter, we will give each construction in two ways: first as a consequence of Sato’s definition, then in terms of two explicit witness distributions. 5.2 Accuracy-dependent approximate couplings A common technique in proofs for cryptographic protocols is up-to-bad reasoning. Roughly, two versions of a protocol—say, one that operates on the true secret information and one that operates on random noise—are said to be equivalent up-to-bad if they have the same distribution over outputs assuming some probabilistic event, the so-called bad event, does not happen. If the bad event has small probability, up-to-bad equivalence implies that the output distributions of the two programs are close. This principle can be seen as a property about exact couplings, a consequence of the coupling method (Theorem 2.1.16). Proposition 5.2.1. Let µ1 , µ2 be sub-distributions over A and let P ⊆ A be a subset. If for i ∈ {1, 2} we have an exact lifting µ1 {(x 1 , x 2 ) | x i ∈ P → x 1 = x 2 }] µ2 , then dtv (µ1 , µ2 ) ≤ µi (A \ P ). Proof. Let µ be the witness. We have dtv (µ1 , µ2 ) ≤ Pr (x 1 ,x 2 )∼µ [x 1 6= x 2 ] = Pr (x 1 ,x 2 )∼µ [x 1 6= x 2 ∧ x i ∈ / P ] ≤ µi (A \ P ), by Theorem 2.1.16, the support condition, and the first marginal condition. CHAPTER 5. ADVANCED APPROXIMATE COUPLINGS 82 Up-to-bad approximate couplings The δ parameter of an approximate coupling is closely related to TV-distance. For example, the distance bound d0 (µ1 , µ2 ) ≤ δ is equivalent to dtv (µ1 , µ2 ) ≤ δ for proper distributions. This observation suggests we can generalize Proposition 5.2.1 to approximate couplings. We introduce two constructions, which we call up-to-bad approximate couplings. Proposition 5.2.2. Let µ1 , µ2 be sub-distributions over A1 and A2 , and let P1 , P2 be subsets of A1 and A2 . Consider any binary relation R ⊆ A1 × A2 . 1. If µ1 (A1 \ P1 ) ≤ δ0 , then µ1 {(a1 , a2 ) | a1 ∈ P1 → (a1 , a2 ) ∈ R}](",δ) µ2 implies µ1 R](",δ+δ ) µ2 . 0 2. If µ2 (A2 \ P2 ) ≤ δ0 , then µ1 {(a1 , a2 ) | a2 ∈ P2 → (a1 , a2 ) ∈ R}](",δ) µ2 implies µ1 R](",δ+exp(")·δ ) µ2 . 0 The slight difference between the two versions is due to our asymmetric definition of approximate coupling; bad events in µ1 are not treated the same as bad events in µ2 . Proof. We first introduce some notation for binary relations and sets. First, we will interpret P1 and P2 as subsets of A1 × A2 via P1 × A2 and A1 × P2 . If R is a binary relation over B1 × B2 , we write ¬R for the binary relation B1 × B2 \ R. Finally, we write A → B for the binary relation ¬B ∪ A. To prove the first point, let S1 ⊆ A1 be any subset. By assumption and Theorem 5.1.2, µ1 (S1 ∩ P1 ) ≤ exp(") · µ2 ((P1 → R)(S1 ∩ P1 )) + δ = exp(") · µ2 (R(S1 ∩ P1 )) + δ. Since µ1 (¬P1 ) ≤ δ0 , we also have µ1 (S1 ) ≤ µ1 (S1 ∩ P1 ) + δ0 ≤ exp(") · µ2 (R(S1 ∩ P1 )) + δ + δ0 ≤ exp(") · µ2 (R(S1 )) + δ + δ0 and hence Theorem 5.1.8 gives the desired approximate coupling. The second point is similar. Let S1 ⊆ A1 be any subset. By assumption and Theorem 5.1.2, µ1 (S1 ) ≤ exp(") · µ2 ((P2 → R)(S1 )) + δ ≤ exp(") · µ2 (¬P2 ) + exp(") · µ2 (R(S1 )) + δ ≤ exp(") · µ2 (R(S1 )) + δ + exp(") · δ0 and hence Theorem 5.1.8 gives the desired approximate coupling. To give witnesses for the first point, let µ L , µR witness the approximate lifting of P1 → R. We define two witnesses η L , ηR ∈ SDistr(A?1 × A?2 ) for the approximate lifting of R:  µ L (a1 , a2 ) P η L (a1 , a2 ) ¬ µ L (a1 , ?) + a2 ∈A2 :(a1 ,a2 )∈/ R µ L (a1 , a2 )  0   µR (a1 , a2 ) P ηR (a1 , a2 ) ¬ µR (?, a2 ) + a0 ∈A1 :(a0 ,a2 )∈/ R µR (a10 , a2 ) 1 1  0 : (a1 , a2 ) ∈ R : a2 = ? : otherwise. : (a1 , a2 ) ∈ R : a1 = ? : otherwise. CHAPTER 5. ADVANCED APPROXIMATE COUPLINGS 83 By construction, supp(η L ) ∪ supp(ηR ) ⊆ R? . We can check the first marginal condition: X π1 (η L )(a1 ) = η L (a1 , a2 ) a2 ∈A?2 X = η L (a1 , ?) + η L (a1 , a2 ) a2 ∈A2 :(a1 ,a2 )∈R X = µ L (a1 , ?) + a2 ∈A2 :(a1 ,a2 )∈ /R X = X µ L (a1 , a2 ) + µ L (a1 , a2 ) a2 ∈A2 :(a1 ,a2 )∈R µ L (a1 , a2 ) = π1 (µ L )(a1 ). a2 ∈A?2 The second marginal is similar: X π2 (ηR )(a2 ) = ηR (a1 , a2 ) a1 ∈A?1 X = ηR (?, a2 ) + ηR (a1 , a2 ) a1 ∈A1 :(a1 ,a2 )∈R X = µR (?, a2 ) + a1 ∈A1 :(a1 ,a2 )∈ /R X = X µR (a1 , a2 ) + µR (a1 , a2 ) a1 ∈A1 :(a1 ,a2 )∈R µR (a1 , a2 ) = π2 (µR )(a2 ). a1 ∈A?1 It remains to check the distance condition. Compared to the old witnesses, the new witnesses have larger mass on subsets satisfying R? : for all subsets S ⊆ R? , we have µ L (S ) ≤ η L (S ) and µR (S ) ≤ ηR (S ). For any set S ⊆ A?1 × A?2 , we can also bound η L (S ) from above: X η L (S ) = η L (a1 , a2 ) (a1 ,a2 )∈S ∩R? = X η L (a1 , a2 ) + X η L (a1 , ?) (a1 ,a2 )∈S ∩R (a1 ,?)∈S X X ! = µ L (a1 , a2 ) + (a1 ,a2 )∈S ∩R ≤ X X X X µ L (a1 , a2 ) a2 ∈A2 :(a1 ,a2 )∈ /R µ L (a1 , a2 ) a1 ∈A1 \P1 a2 ∈A?2 (a1 ,a2 )∈S = µ L (a1 , ?) + (a1 ,?)∈S µ L (a1 , a2 ) + X µ L (a1 , a2 ) + µ1 (¬P1 ) (a1 ,a2 )∈S ≤ µ L (S ) + δ0 . The first inequality uses the support of µ L ; the final inequality is by assumption. Finally, we chain these bounds: η L (S ) = η L (S ∩ R? ) ≤ µ L (S ∩ R? ) + δ0 ≤ exp(") · µR (S ∩ R? ) + δ + δ0 ≤ exp(") · ηR (S ∩ R? ) + δ + δ0 = exp(") · ηR (S ) + δ + δ0 . CHAPTER 5. ADVANCED APPROXIMATE COUPLINGS ` c1 ∼(",δ) c2 : Φ =⇒ Θ〈1〉 → Ψ 84 ∀m, |= Pr [¬Θ] ≤ δ0 ¹c1 ºm UTB-L ` c1 ∼(",δ+δ0 ) c2 : Φ =⇒ Ψ ` c1 ∼(",δ) c2 : Φ =⇒ Θ〈2〉 → Ψ ∀m, |= Pr [¬Θ] ≤ δ0 ¹c2 ºm UTB-R ` c1 ∼(",δ+exp(")·δ0 ) c2 : Φ =⇒ Ψ Figure 5.1: Up-to-bad rules for APRHL This implies d" (η L , ηR ) ≤ δ + δ0 , so η L and ηR witness the approximate lifting. To give witnesses for the second point, let η L , ηR be defined as above and consider any subset S ⊆ A?1 × A?2 . The marginal and support conditions follow as before. To check the distance condition, we first bound η L in terms of µ L : X η L (a1 , a2 ) η L (S ) = (a1 ,a2 )∈S ≤ X µ L (a1 , a2 ) + (a1 ,a2 )∈S ∩R? X µ L (a1 , a2 ) (a1 ,a2 )∈ /R = µ L (S ∩ R? ) + µ L (¬R) = µ L ((S ∩ R? ) ∪ ¬R) The last equality is because the two events are disjoint. We then complete the calculation as before: η L (S ) ≤ µ L ((S ∩ R? ) ∪ ¬R) ≤ exp(") · µR ((S ∩ R? ) ∪ ¬R) + δ ≤ exp(")(µR (S ∩ R? ) + µR (¬P2 )) + δ = exp(")(µR (S ∩ R? ) + µR (¬P2 )) + δ ≤ exp(")(µR (S ∩ R? ) + δ0 ) + δ ≤ exp(")(ηR (S ∩ R? ) + δ0 ) + δ = exp(") · ηR (S ) + δ + exp(") · δ0 . Thus d" (η L , ηR ) ≤ δ + exp(") · δ0 , so (η L , ηR ) witness the desired approximate coupling. We realize these couplings in APRHL with the up-to-bad rules in Fig. 5.1. In both rules, Θ is a predicate on State; Θ〈1〉 and Θ〈2〉 are the associated predicates on the product memories State× ; syntactically, where all variables in Θ are tagged with 〈1〉 or 〈2〉 respectively. Theorem 5.2.3. The rules [UTB-L] and [UTB-R] are sound. Proof. By validity of the premises and Proposition 5.2.2. Figure 5.2 presents two useful variants of the up-to-bad rules that are restricted versions of the rule of conjunction from Hoare logic. As we discussed before, the general conjunction rule is not sound in PRHL, nor in AP RHL. However if one of the conjuncts mentions only one side, we can recover a version of the conjunction rule. Corollary 5.2.4. The rules [AND -L] and [AND -R] are sound. CHAPTER 5. ADVANCED APPROXIMATE COUPLINGS ` c1 ∼(",δ) c2 : Φ =⇒ Ψ ∀m, |= Pr [¬Θ] ≤ δ0 ¹c1 ºm AND -L ` c1 ∼(",δ+δ0 ) c2 : Φ =⇒ Θ〈1〉 ∧ Ψ ` c1 ∼(",δ) c2 : Φ =⇒ Ψ AND -R 85 ∀m, |= Pr [¬Θ] ≤ δ0 ¹c2 ºm ` c1 ∼(",δ+exp(")·δ0 ) c2 : Φ =⇒ Θ〈2〉 ∧ Ψ Figure 5.2: One-sided conjunction rules for APRHL LAPACC -L $ Lap (e ) ∼ ` x1 ← (",δ) c2 : Φ =⇒ Ψ " 1 $ Lap (e ) ∼ ` x1 ← (",δ+β) " 1 LAPACC -R x1 ∈ / FV(e1 ) 1 1 c2 : Φ =⇒ |x 1 〈1〉 − e1 〈1〉| ≤ ln ∧ Ψ " β $ Lap (e ) : Φ =⇒ Ψ ` c1 ∼(",δ) x 2 ← " 2 ` c1 ∼(",δ+exp(")·β) x2 ∈ / FV(e2 ) 1 1 $ Lap (e ) : Φ =⇒ |x 〈2〉 − e 〈2〉| ≤ x2 ← ln ∧ Ψ 2 2 " 2 " β Figure 5.3: Laplace accuracy bounds in APRHL Proof. From the premise of [AND -L], the rule of consequence gives ` c1 ∼(",δ) c2 : Φ =⇒ Θ〈1〉 → Θ〈1〉 ∧ Ψ and hence we can conclude by applying [UTB-L]: ` c1 ∼(",δ+δ0 ) c2 : Φ =⇒ Θ〈1〉 ∧ Ψ. Similarly, we can derive [AND -R] from [UTB-R]. When δ0 = 0, the rules [AND -L] and [AND -R] can add one-sided support assertions to the post-condition of any APRHL rule. This can be useful to work around the narrow post-conditions in certain APRHL rules (e.g., [PW-E Q ]). We can also use these rules to introduce accuracy bounds. As an example, we give a basic tail bound for the discrete Laplace distribution. Proposition 5.2.5. Let ", β > 0 and let t ∈ Z. Then we can bound the probability of samples from the Laplace distribution being far from the mean: • ˜ 1 1 Pr |x − t| > ln ≤ β. x∼Lap" (t) " β This bound gives the two rules in Fig. 5.3. Corollary 5.2.6. The rules [LAPACC -L] and [LAPACC -R] are sound. Proof. By the rules [AND -L], [AND -R], and Proposition 5.2.5. CHAPTER 5. ADVANCED APPROXIMATE COUPLINGS 5.3 86 Optimal subset coupling By Proposition 4.2.4, approximate lifted implication µ1 {(a1 , a2 ) | a1 ∈ S1 → a2 ∈ S2 }](",δ) µ2 ensures µ1 (S1 ) ≤ exp(") · µ2 (S2 ) + δ. In this section, we explore a partial converse. Theorem 5.3.1 (Optimal subset coupling). Let α ≥ 1 and δ ≥ 0. Let µ1 and µ2 be sub-distributions over A1 and A2 with equal weight, and consider subsets S1 ⊆ A1 , S2 ⊆ A2 . Then µ1 (S1 ) ≤ αµ2 (S2 ) + δ and µ1 (A1 \ S1 ) ≤ αµ2 (A2 \ S2 ) + δ if and only if µ1 {(a1 , a2 ) | a1 ∈ S1 ↔ a2 ∈ S2 }](ln α,δ) µ2 . The equivalence shows that approximate couplings can capture the bounds µ1 (S1 ) ≤ αµ2 (S2 ) + δ and µ1 (A1 \ S1 ) ≤ αµ2 (A2 \ S2 ) + δ with the most precise approximation parameters, much like the maximal coupling can precisely model the TV-distance between two distributions. Proof. The reverse direction follows by Theorem 5.1.2. For the forward implication, take any set T1 ⊆ A1 and write R for the relation {(a1 , a2 ) | a1 ∈ S1 ↔ a2 ∈ S2 }. If T1 ∩ S1 and T1 ∩ (A1 \ S1 ) are both non-empty, then R(T1 ) = A2 and then clearly µ1 (T1 ) ≤ αµ2 (R(T1 )) + δ as µ1 and µ2 have equal weights. Otherwise T1 is contained in S1 or in A1 \ S1 . In the first case, R(T1 ) = S2 and so µ1 (T1 ) ≤ µ1 (S1 ) ≤ αµ2 (S2 ) + δ = αµ2 (R(T1 )) + δ by assumption. In the second case, R(T1 ) = A2 \ S2 and we again have µ1 (T1 ) ≤ µ2 (R(T1 )) + δ. Hence we have the desired approximate coupling by Theorem 5.1.8. Alternatively, we can directly construct two witnesses. For simplicity we consider just the case δ = 0. Define:  µ1 (a1 )·µ2 (a2 )  : if a1 ∈ S1 and a2 ∈ S2  µ2 (S2 ) µ1 (a1 )·µ2 (a2 ) µ L (a1 , a2 ) ¬ : if a1 ∈ / S1? and a2 ∈ / S2? µ2 (A2 \S2 )  0 : otherwise.  µ (a )·µ (a ) 1 1 2 2 : if a1 ∈ S1 and a2 ∈ S2  µ1 (S1 )    µ1 (a1 )·µ2 (a2 ) : if a1 ∈ / S1? and a2 ∈ / S2? µ1 (A1 \S1 ) P µR (a1 , a2 ) ¬  µ2 (a2 ) − a0 ∈A1 µR (a10 , a2 ) : if a1 = ?  1   0 : otherwise. When any denominator is zero, we treat the fraction as zero. It is not hard to see that the support conditions are satisfied. To show the marginal conditions, there are a few cases. Consider the first marginal π1 (µ L )(a1 ). For a1 ∈ S1 , if µ2 (S2 ) = 0 then µ1 (S1 ) = 0 by assumption; if µ1 (S2 ) > 0 then the marginal is clear. Likewise for a1 ∈ / S1? , if µ2 (A2 \ S2 ) = 0 then µ1 (A1 \ S1 ) = 0 by assumption and π1 (µ L )(a1 ) = 0; if µ2 (A2 \ S2 ) > 0 then the marginal is clear. The second marginal π2 (µR ) = µ2 holds by construction, after checking µR (?, a2 ) ≥ 0. Finally for the distance condition, µ L (a1 , a2 ) ≤ αµR (a1 , a2 ) by the first assumption when (a1 , a2 ) ∈ S1 × S2 ; by the second assumption when (a1 , a2 ) ∈ (A1 \ S1 ) × (A2 \ S2 ); and trivially in all other cases since µ L (a1 , a2 ) = µR (a1 , a2 ) = 0. Hence we have a (ln α, 0)-approximate coupling. A useful special case is when the distributions are equal and the subsets are nested. Corollary 5.3.2 (Optimal subset coupling). Let µ be a sub-distribution over A and consider nested sets S2 ⊆ S1 ⊆ A. Then µ(S1 ) ≤ αµ(S2 ) + δ if and only if µ {(a1 , a2 ) | a1 ∈ S1 ↔ a2 ∈ S2 }](ln α,δ) µ. CHAPTER 5. ADVANCED APPROXIMATE COUPLINGS 87 Proof. By Theorem 5.3.1; the requirement µ(A \ S1 ) ≤ αµ(A \ S2 ) + δ is automatic since S2 ⊆ S1 . As an application, we give a subset coupling for the Laplace distribution. First, we prove a bound relating the probabilities of two nested intervals for the Laplace distribution. A similar bound for the continuous Laplace distribution was originally proved by Bun et al. (2017); we adapt their proof to the discrete case. Proposition 5.3.3. Let a, a0 , b, b0 ∈ Z be such that a < b and [a, b] ⊆ [a0 , b0 ]. Then Pr [r ∈ [a0 , b0 ]] ≤ α Pr [r ∈ [a, b]] r∼Lap" with constants α¬ r∼Lap" exp(η") 1 − exp(−(b − a + 2)"/2) and η ¬ (b0 − a0 ) − (b − a). Proof. Let W be the total mass of the Laplace distribution before normalization. By a calculation, W= +∞ X exp(−|r|") = r=−∞ e" + 1 . e" − 1 Let L(x, y) be the mass of the Laplace distribution in [x, y]. We want to bound L(a0 , b0 ) ≤ αL(a, b). There are four cases: a < b ≤ 0, a < 0 < b with |a| ≤ |b|, 0 ≤ a < b, and a < 0 < b with |a| ≥ |b|. By symmetry of the Laplace distribution, it suffices to consider the first two cases. For the first case, a < b ≤ 0. By direct calculation, we have L(a0 , b0 ) ≤ L(a, b) + b+η 1 X r" e W r=b+1 e(b+1+η)" − e a" e" + 1  η"  e − e−(b−a+1)" 1 (b+1)" a" = " (e −e ) e +1 1 − e−(b−a+1)"  η"  e − e−(b−a+1)" = L(a, b) ≤ αL(a, b). 1 − e−(b−a+1)" = For the second case, a < 0 < b with |a| ≤ |b|. We can bound  " ‹ e − 1 a" L(a0 , b0 ) ≤ L(a, b) + ηL(a, a) = L(a, b) + η " e e +1   " ‹ ‹ e a" e −1 ≤ 1+η " L(a, b) e + 1 L(0, b) ‹  η(e" − 1)e a" = 1+ L(a, b) e" − e−b"   1 − e−(b+1)" + η(e" − 1)e(a−1)" = L(a, b) 1 − e−(b+1)" ‹  1 + η(e" − 1) ≤ L(a, b) 1 − e−(b+1)"   e2η" ≤ L(a, b) ≤ αL(a, b). 1 − e−(b−a+2)"/2 CHAPTER 5. ADVANCED APPROXIMATE COUPLINGS ‹ exp(η") " ¬ ln x1, x2 ∈ / FV(p, q, r, s, e1 , e2 ) 1 − exp(−σ"/2)  |e1 〈1〉 − e2 〈2〉| ≤ k Φ ¬ p + k ≤ r < s ≤ q − k ∧ (q − p) − (s − r) ≤ η ∧ 0 < σ ≤ (s − r) + 2  ∀w1 , w2 ∈ Z, (w1 ∈ [p, q] ↔ w2 ∈ [r, s]) → Ψ {w1 , w2 /x 1 〈1〉, x 2 〈2〉} 0 LAPINT 88  $ Lap (e ) ∼ $ ` x1 ← (" 0 ,0) x 2 ← Lap" (e2 ) : Φ =⇒ Ψ " 1 Figure 5.4: Interval coupling rule [LAPINT] for APRHL The last line is because (b + 1) ≥ (b − a + 2)/2, and because 1 + η(e" − 1) ≤ eη" for η ∈ N and " ≥ 0; to see this, note that equality holds at η = 0 and 1 + (η + 1)(e" − 1) e(η+1)" ≤ = e" 1 + η(e" − 1) eη" for " ≥ 0, so the inequality is preserved as we increase η. As a corollary, we have a subset coupling for the Laplace distribution. Lemma 5.3.4. Let a, a0 , b, b0 ∈ Z be such that a < b and [a, b] ⊆ [a0 , b0 ]. We have an approximate lifting Lap" {(r1 , r2 ) | r1 ∈ [a0 , b0 ] ↔ r2 ∈ [a, b]} with constants α¬ exp(η") 1 − exp(−(b − a + 2)"/2) ](ln α,0) Lap" and η ¬ (b0 − a0 ) − (b − a). Proof. Immediate by the forward direction of Corollary 5.3.2 and Proposition 5.3.3. To use this coupling in APRHL, we introduce the rule [LAPINT] in Fig. 5.4. To gain intuition, the following rule is a simplified special case: " 0 ¬ ln LAPINT*  exp(η") 1 − exp(−σ"/2) ‹ x∈ / FV(p, q, r, s)  |e〈1〉 − e〈2〉| ≤ k    p+k≤ r <s≤q−k |= Φ →  (q − p) − (s − r) ≤ η   0 < σ ≤ (s − r) + 2 $ Lap (e) ∼ $ `x← (" 0 ,0) x ← Lap" (e) : Φ =⇒ x〈1〉 ∈ [p, q] ↔ x〈2〉 ∈ [r, s] " Ignoring the technical side-conditions, this rule gives an approximate coupling relating the samples in [p, q] in the first distribution with the samples in [r, s] in the second distribution. The general rule [LAPINT] can prove post-conditions of any shape. Theorem 5.3.5. The rule [LAPINT] is sound. Proof. We leave the logical context ρ implicit. Let V ¬ X \ {x 1 , x 2 } be the non-sampled variables; we write m[V ] for the restriction of a memory m to variables in V . Consider two memories m1 , m2 and let the means v1 ¬ ¹e1 ºm1 and v2 ¬ ¹e2 ºm2 satisfy |v1 − v2 | ≤ k. By the free variable condition, the expressions p, q, r, s are preserved by the CHAPTER 5. ADVANCED APPROXIMATE COUPLINGS 89 command so we will abuse notation and treat p, q, r, s as integer constants satisfying the pre-condition Φ. Let the output distributions be $ Lap (e )ºm µ1 ¬ ¹x 1 ← 1 " 1 $ Lap (e )ºm . and µ2 ¬ ¹x 2 ← 2 " 2 We construct an approximate coupling of µ1 and µ2 . Define the intervals I1 ¬ [p − v1 , q − v1 ] I2 ¬ [r − v2 , s − v2 ]. and Since p + k ≤ r and s ≤ q − k and |v1 − v2 | ≤ k, we know I2 ⊆ I1 . Lemma 5.3.4 gives Lap" {(r1 , r2 ) | r1 ∈ [p − v1 , q − v1 ] ↔ r2 ∈ [r − v2 , s − v2 ]}](ln α,0) Lap" with constants α¬ exp(η") 1 − exp(−(s − r + 2)"/2) and η ¬ (q − p) − (s − r). Since 0 < σ ≤ (s − r + 2), we have ln α ≤ " 0 for ‹ exp(η") . " ¬ ln 1 − exp(−σ"/2) 0  Proposition 5.3.3 yields an approximate coupling Lap" {(r1 , r2 ) | r1 ∈ [p − v1 , q − v1 ] ↔ r2 ∈ [r − v2 , s − v2 ]}](" ,0) Lap" . 0 Rearranging, this is equivalent to Lap" {(r1 , r2 ) | r1 + v1 ∈ [p, q] ↔ r2 + v2 ∈ [r, s]}](" ,0) Lap" . 0 Applying Theorem 4.2.7 with f1 , f2 mapping r to r + v1 , r + v2 respectively, we obtain ] ] f1 (Lap" ) {(w1 , w2 ) | w1 ∈ [p, q] ↔ w2 ∈ [r, s]}](" ,0) f2 (Lap" ). 0 ] ] Now since f1 (Lap" ) = Lap" (v1 ) and f2 (Lap" ) = Lap" (v2 ), we have Lap" (v1 ) {(w1 , w2 ) | w1 ∈ [p, q] ↔ w2 ∈ [r, s]}](" ,0) Lap" (v2 ). 0 Applying Theorem 4.2.7 with maps ¹x 1 º and ¹x 2 º, we get µ1 ¹x 1 〈1〉 ∈ [p, q] ↔ x 2 〈2〉 ∈ [r, s]º](" ,0) µ2 . 0 By the free variable condition, m01 [V ] = m1 [V ] and m02 [V ] = m2 [V ] for all memories m01 ∈ supp(µ1 ) and m02 ∈ supp(µ2 ), so we may assume by Proposition 4.2.6 that the witnesses are supported on such memories. Hence, we have witnesses to µ1 {(m01 , m02 ) | m01 [V ] = m1 [V ], m02 [V ] = m2 [V ], m01 (x 1 ) ∈ [p, q] ↔ m02 (x 2 ) ∈ [r, s]} By the pre-condition, (m1 , m2 ) satisfy ∀w1 , w2 ∈ Z, w1 ∈ [p, q] ↔ w2 ∈ [r, s] → Ψ {w1 , w2 /x 1 〈1〉, x 2 〈2〉} and so showing [LAPINT] is sound. µ1 Ψ ](" ,0) µ2 , 0 ](" 0 ,0) µ2 . CHAPTER 5. ADVANCED APPROXIMATE COUPLINGS 5.4 90 Advanced coupling composition The sequencing rule [SEQ] in APRHL composes two approximate couplings while summing the approximation parameters; this rule is a generalization of the standard composition theorem of differential privacy (Theorem 4.1.4). In this section we extend the advanced composition theorem of differential privacy, Theorem 4.1.5, which allows trading off the " and δ parameters when analyzing a composition of private mechanisms. While the proof of the sequential composition theorem is fairly straightforward, the advanced composition theorem follows from a more technical argument using Azuma’s inequality. It is not obvious how to extend the proof to approximate liftings, but fortunately we don’t need to. The key observation is that the "-distance condition on witnesses ensures differential privacy generalized to distributions over pairs of outputs. Therefore, we can directly generalize the advanced composition theorem to liftings by viewing the function mapping a pair of inputs to the left/right witness as itself differentially private. However, there is an important catch: the advanced composition theorem assumes a symmetric adjacency relation. In particular, the witnesses must satisfy a two-sided, symmetric distance bound to compose, but approximate lifting only gives a one-sided bound for witnesses. So, we first introduce a symmetric version of approximate lifting where the witnesses satisfy the bound in both directions. Then we develop an advanced composition theorem for symmetric liftings in two stages. First we prove an advanced composition theorem for "-distance, showing how to control the distance between the output distributions of two compositions if we can bound the symmetric distance between the output distributions of each step. Then, we give an advanced composition theorem given a symmetric approximate lifting at each step of a composition. To apply this principle in APRHL, we introduce a symmetric judgment in APRHL and show how to prove it from standard APRHL judgments, and we internalize advanced composition in a loop rule for symmetric judgments. Remark 5.4.1. The advanced composition theorem from differential privacy implicitly assumes that all mechanisms terminate with probability 1, so in this section we assume all commands are lossless; this is not a serious restriction as derivable judgments in APRHL only relate lossless programs (Lemma 4.3.3). Remark 5.4.2. While we focus on the advanced composition theorem, our technique provides a simple route to generalize other sequential composition theorems, like the optimal composition theorem and the heterogeneous composition theorem (Kairouz, Oh, and Viswanath, 2017), and composition theorems where the parameters can be selected adaptively (Rogers, Vadhan, Roth, and Ullman, 2016). Symmetric approximate liftings We first introduce a symmetric version of approximate lifting. Definition 5.4.3. Let µ1 , µ2 be sub-distributions over A1 and A2 , and let R ⊆ A1 × A2 be a relation. Let ? be an element disjoint from A1 and A2 . Two sub-distributions µ L , µR over pairs A?1 × A?2 are witnesses for the symmetric (", δ)-approximate R-lifting of (µ1 , µ2 ) if: 1. π1 (µ L ) = µ1 and π2 (µR ) = µ2 ; 2. supp(µ L ) ∪ supp(µR ) ⊆ R? ; and 3. d" (µ L , µR ) ≤ δ and d" (µR , µ L ) ≤ δ. (Recall S ? is the set S ∪ {?}, and R? is the relation R ∪ (A1 × {?}) ∪ ({?} × A2 ).) When the particular witnesses are not important, we say µ1 and µ2 are related by the symmetric (", δ)-lifting of R, denoted ](",δ) µ1 R µ2 . R need not be symmetric—in fact, A1 and A2 may be different sets. CHAPTER 5. ADVANCED APPROXIMATE COUPLINGS 91 This definition is nearly identical to standard approximate liftings (Definition 4.2.2) except it requires the distance bound in both directions. The two-sided bound in a symmetric lifting implies two standard approximate ](",δ) ](",δ) liftings: if µ1 R µ2 holds, then µ1 R](",δ) µ2 and µ2 (R−1 ) µ1 both hold by taking witnesses (µ L , µR ) and > > > (µR , µ L ) respectively, since d" µ> R , µ L = d" (µR , µ L ). In general, the converse may not be true. However when the relation R is of a particular form, we can construct a symmetric approximate lifting by giving two approximate liftings. Lemma 5.4.4. Suppose S1 , S2 are subsets of A1 , A2 respectively, and we have maps f1 : A1 → B and f2 : A2 → B. Define a relation R on A1 × A2 by a1 R a2 ⇐⇒ a1 ∈ S1 ∧ a2 ∈ S2 ∧ f1 (a1 ) = f2 (a2 ). Let µ1 , µ2 be sub-distributions over A1 and A2 . The approximate liftings µ1 R](",δ) µ2 imply the symmetric approximate lifting and ](",δ) µ1 R ](",δ) µ2 (R−1 ) µ1 , µ2 . ](",δ) µ1 . For every b ∈ B, define subsets Proof. Let (µ L , µR ) witness µ1 R](",δ) µ2 and let (ν L , νR ) witness µ2 (R−1 ) [b]A1 ¬ f1−1 (b) ⊆ A1 and [b]A2 ¬ f2−1 (b) ⊆ A2 partitioning A1 and A2 . First, we have µ1 ([b]A1 ) = µ L ([b]A1 × A?2 ) ≤ exp(") · µR ([b]A1 × A?2 ) + δ = exp(") · µR ([b]A1 × [b]A2 ) + δ ≤ exp(") · µR (A?1 × [b]A2 ) + δ = exp(") · µ2 ([b]A2 ) + δ. Define non-negative constants: ρ(b) ¬ max(µ1 ([b]A1 ) − exp(") · µ2 ([b]A2 ), 0). Then µ1 ([b]A1 ) ≤ exp(") · µ2 ([b]A2 ) + ρ(b), P with equality if ρ(b) > 0. It is not hard to show b∈B ρ(b) ≤ δ; let B0 ¬ {b ∈ B | ρ(b) > 0}. Then X µ1 (∪ b∈B0 [b]A1 ) = exp(") · µ2 (∪ b∈B0 [b]A2 ) + ρ(b), b∈B0 but Theorem 5.1.2 bounds the left side: µ1 (∪ b∈B0 [b]A1 ) ≤ exp(") · µ2 (∪ b∈B0 [b]A2 ) + δ. By a similar calculation with (ν L , νR ) in place of (µ L , µR ), we haveP a symmetric bound µ2 ([b]A2 ) ≤ exp(") · µ1 ([b]A1 ) + σ(b) for minimal non-negative constants σ(b) such that b∈B σ(b) ≤ δ. Note that ρ(b) and σ(b) can’t both be strictly positive, by minimality. We define witnesses   µ (a )·µ (a )  ρ(b) 1 1 2 2  1 − : f1 (a1 ) = f2 (a2 ) = b µ1 ([b]A1 )  µ2 ([b]A2 ) µ1 (a1 )·ρ(b) η L (a1 , a2 ) ¬ µ ([b] ) : a2 = ?   1 A1 0 : otherwise. CHAPTER 5. ADVANCED APPROXIMATE COUPLINGS ηR (a1 , a2 ) ¬  µ (a )·µ (a )  1 1 2 2   µ1 ([b]A1 ) 1 − µ2 (a2 )·σ(b)  µ2 ([b]A2 ) 92 σ(b) µ2 ([b]A2 )  : f1 (a1 ) = f2 (a2 ) = b : a1 = ?  0 : otherwise. Throughout, if a denominator is 0 we take the fraction to be 0 as well. Since supp(µ1 ) ⊆ S1 and supp(µ2 ) ⊆ S2 by the marginal and support conditions of the two asymmetric liftings, supp(η L ) and supp(ηR ) are contained in R? . For the first marginal π1 (η L )(a1 ), if µ1 ([ f1 (a1 )]A1 ) is zero then ρ( f1 (a1 )) = 0 by minimality and µ1 (a1 ) = 0, so η L (a1 , a2 ) = 0 for all a2 ∈ A2 . Otherwise if µ2 ([ f1 (a1 )]A2 ) = 0 then ρ( f1 (a1 )) = µ1 ([ f1 (a1 )]A1 ) by minimality, and η L (a1 , a2 ) = µ1 (a1 ) for a2 = ? and zero for a2 ∈ A2 . By a symmetric argument, the second marginal is similar. To check the symmetric distance conditions, take any set W ⊆ A?1 × A?2 . We want to compare X X η L (W ) = η L (a1 , a2 ) + η L (a1 , ?) (a1 ,a2 )∈W0 with ηR (W ) = X (a1 ,?)∈W ηR (a1 , a2 ) + (a1 ,a2 )∈W0 X ηR (?, a2 ), (?,a2 )∈W where W0 ¬ W ∩ (A1 × A2 ). We claim (i) η L (a1 , a2 ) ≤ exp(") · ηR (a1 , a2 ) for all (a1 , a2 ) ∈ A1 × A2 , and (ii) P ? (a1 ,?)∈W η L (a1 , ?) ≤ δ. Without loss of generality, we assume W is contained in R . To show (i), let b ¬ f1 (a1 ) = f2 (a2 ). If either µ1 ([b]A1 ) or µ2 ([b]A2 ) are zero then the relevant probabilities in η L and ηR are zero as well. Otherwise there are three cases. If both ρ(b) and σ(b) are both zero, then µ1 ([b]A1 ) η L (a1 , a2 ) = ≤ exp("). ηR (a1 , a2 ) µ2 ([b]A2 ) If ρ(b) > 0, then σ(b) = 0 and µ1 ([b]A1 ) > 0. If µ2 ([b]A2 ) = 0 then the claim is immediate; otherwise,   µ1 ([b]A1 ) µ1 ([b]A1 ) − ρ(b) η L (a1 , a2 ) ρ(b) = 1− = = exp(") ηR (a1 , a2 ) µ2 ([b]A2 ) µ1 ([b]A1 ) µ2 ([b]A2 ) where the final equality is by minimality of ρ(b). Similarly if σ(b) > 0, then ρ(b) = 0 and µ2 ([b]A2 ) > 0 so   µ1 ([b]A1 ) µ1 ([b]A1 ) µ1 ([b]A1 ) µ2 ([b]A2 ) η L (a1 , a2 ) = = = ≤ exp("), ηR (a1 , a2 ) µ2 ([b]A2 ) µ2 ([b]A2 ) − σ(b) µ2 ([b]A2 ) − σ(b) exp(") · µ1 ([b]A1 ) where the final equality is by minimality of σ(b); note that if µ2 ([b]A2 ) = σ(b), then µ1 ([b]A1 ) = 0, η L (a1 , a2 ), and ηR (a1 , a2 ) are all zero. This establishes (i). Showing (ii) is more straightforward: X X X η L (a1 , ?) = ρ(b) ≤ δ. η L (a1 , ?) ≤ (a1 ,?)∈W a1 ∈A1 b∈B Hence we have η L (W ) = X η L (a1 , a2 ) + (a1 ,a2 )∈W0 ≤ exp(") X η L (a1 , ?) (a1 ,?)∈W X ηR (a1 , a2 ) + δ (a1 ,a2 )∈W0 ≤ exp(") · ηR (W ) + δ, giving the distance bound d" (η L , ηR ) ≤ δ. A similar calculation yields the symmetric bound d" (ηR , η L ) ≤ δ, so (η L , ηR ) witness the desired symmetric approximate lifting. CHAPTER 5. ADVANCED APPROXIMATE COUPLINGS 93 Advanced composition of symmetric "-distance Building up to advanced composition for symmetric approximate liftings, we first show advanced composition for symmetric "-distance. Suppose we have two sequences of n functions { f i }i∈[n] , {g i }i∈[n] where f i , g i : A → Distr(A) are such that for any a ∈ A, we can bound the "-distance between f i (a) and g i (a). Then we will bound the "-distance between the output distributions from the n-fold compositions. We use notation for the sequential composition of algorithms. Given a sequence of functions {hi }i∈[k] where hi : A → Distr(A), we write hk : A → Distr(A) for the composition of {hi }. Formally, we define ¨ unit(a) :k=0 k h (a) ¬ bind(hk−1 (a), hk ) : k > 0. (Recall unit : A → Distr(A) and bind : Distr(A) × (A → Distr(B)) → Distr(B) are the monadic operations for distributions from Definition 2.2.2.) We use the same notation for functions of type hi : D × A → Distr(A), defining hk : D × A → Distr(A) as ¨ unit(a) :k=0 k h (d, a) ¬ k−1 bind(h (d, a), hk (d, −)) : k > 0. Proposition 5.4.5. Let f i , g i : A → Distr(A) satisfy d" ( f i (a), g i (a)) ≤ δ and d" (g i (a), f i (a)) ≤ δ for every i ∈ [n] and a ∈ A. For any ω ∈ (0, 1), let Æ " ∗ ¬ " 2n ln(1/ω) + n"(e" − 1) and δ∗ ¬ nδ + ω. Then for every n ∈ N and a ∈ A, we have d"∗ ( f n (a), g n (a)) ≤ δ∗ and d"∗ (g n (a), f n (a)) ≤ δ∗ . Proof. Let B be the booleans and define hi : B × A → Distr(A) as hi (true, a) ¬ f i (a) and hi (false, a) ¬ g i (a) for every a ∈ A. Then d" ( f i (a), g i (a)) ≤ δ and d" (g i (a), f i (a)) ≤ δ imply hi (a, −) : B → Distr(A) is (", δ)differentially private for every a ∈ A, where we view B as the set of databases with the full adjacency relation relating all pairs of booleans; in particular, this is a symmetric relation. Applying the advanced composition theorem of differential privacy (Theorem 4.1.5), hn (−, a) : B → Distr(A) is (" ∗ , δ∗ )-differentially private for every a ∈ A. By Definition 4.2.1 we have d"∗ (hn (true, a), hn (false, a)) ≤ δ∗ and d"∗ (hn (false, a), hn (true, a)) ≤ δ∗ for every a ∈ A. Since hn (true, a) = f n (a) and hn (false, a) = g n (a) by definition, we conclude d"∗ ( f n (a), g n (a)) ≤ δ∗ and d"∗ (g n (a), f n (a)) ≤ δ∗ . Advanced composition of symmetric approximate liftings Next, we extend Proposition 5.4.5 to symmetric approximate liftings; roughly speaking, we will apply the proposition to the functions mapping related inputs to the left or right witness distributions. We need a lemma about how witnesses are transformed under composition. Lemma 5.4.6. Consider two sequences of functions { f i }i∈[n] , {g i }i∈[n] with f i : A1 → Distr(A1 ) and g i : A2 → Distr(A2 ), and a sequence of binary relations {Φi }i∈{0,...,n} on A1 × A2 . Suppose we have two sequences of functions {l i }i∈[n] , {ri }i∈[n] with l i , ri : A?1 × A?2 → Distr(A?1 × A?2 ) producing witnesses to an approximate lifting of Φi : CHAPTER 5. ADVANCED APPROXIMATE COUPLINGS 94 1. π1 (l i (a1 , a2 )) = f i (a1 ) and π2 (ri (a1 , a2 )) = g i (a2 ) for (a1 , a2 ) ∈ Φi−1 ; 2. π1 (l i (a1 , ?)) = f i (a1 ) and π2 (ri (?, a2 )) = g i (a2 ); and 3. supp(l i (a1 , a2 )) ∪ supp(ri (a1 , a2 )) ⊆ Φ?i for (a1 , a2 ) ∈ Φ?i−1 for every i ∈ [n]. Then l n and r n generate witnesses for an approximate lifting relating the n-fold compositions: 1. π1 (l n (a1 , a2 )) = f n (a1 ) and π2 (r n (a1 , a2 )) = g n (a2 ) for (a1 , a2 ) ∈ Φ0 ; 2. π1 (l n (a1 , ?)) = f n (a1 ) and π2 (r n (?, a2 )) = g n (a2 ); and 3. supp(l n (a1 , a2 )) ∪ supp(r n (a1 , a2 )) ⊆ Φ?n for every (a1 , a2 ) ∈ Φ?0 . Proof. By induction on n. The base case n = 0 is trivial. When n > 0, the support condition follows by induction; the marginal conditions follow by a direct computation (Lemma A.1.1). We are now ready to prove advanced composition for symmetric liftings. Theorem 5.4.7. Let ω ∈ (0, 1). Consider two sequences of functions { f i }i∈[n] and {g i }i∈[n] with f i : A1 → Distr(A1 ) and g i : A2 → Distr(A2 ), and a sequence of binary relations {Φi }i∈[n] on A1 × A2 and Φ0 ⊆ A1 × A2 . Suppose for every i ∈ [n] and (a1 , a2 ) ∈ Φi−1 , there is a symmetric approximate lifting: f i (a1 ) Φi ](",δ) g i (a2 ). Then for every (a1 , a2 ) ∈ Φ0 , we have a symmetric lifting f n (a1 ) Φn where " ∗ ¬ " p ](" ∗ ,δ∗ ) g n (a2 ) 2n ln(1/ω) + n"(e" − 1) and δ∗ ¬ nδ + ω. (i) (i) Proof. For (a1 , a2 ) ∈ Φi−1 , let (µ L (a1 , a2 ), µR (a1 , a2 )) witness the approximate lifting of Φi relating f i (a1 ) and g i (a2 ). Define functions {l i }i∈[n] , {ri }i∈[n] of type l i , ri : A?1 × A?2 → Distr(A?1 × A?2 ) as follows:  (i) µ L (a1 , a2 )    unit(?) × g i (a2 ) l i (a1 , a2 ) ¬  f (a ) × unit(?)   i 1 unit(?, ?)  (i) µR (a1 , a2 )    unit(?) × g i (a2 ) ri (a1 , a2 ) ¬  f (a ) × unit(?)   i 1 unit(?, ?) : (a1 , a2 ) ∈ Φi−1 : a1 = ?, a2 6= ? : a1 6= ?, a2 = ? : a1 = a2 = ? : (a1 , a2 ) ∈ Φi−1 : a1 = ?, a2 6= ? : a1 6= ?, a2 = ? : a1 = a2 = ? Given distributions η1 and η2 over B1 and B2 respectively, η1 ×η2 ∈ Distr(B1 × B2 ) denotes the product distribution defined in the expected way: (η1 × η2 )(b1 , b2 ) ¬ η1 (b1 ) · η2 (b2 ). (i) (i) Now by assumption on (µ L (a1 , a2 ), µR (a1 , a2 )) and by definition when a1 = ? or a2 = ?, we have d" (l i (a1 , a2 ), ri (a1 , a2 )) ≤ δ and d" (ri (a1 , a2 ), l i (a1 , a2 )) ≤ δ CHAPTER 5. ADVANCED APPROXIMATE COUPLINGS SYMINTRO 95 Ψ ¬ e1 〈1〉 = e2 〈2〉 ∧ Ψ1 〈1〉 ∧ Ψ2 〈2〉 ` c1 ∼(",δ) c2 : Φ =⇒ Ψ ` c2 ∼(",δ) c1 : Φ−1 =⇒ Ψ −1 ` c1 ≈(",δ) c2 : Φ =⇒ Ψ SYMELIM-L SYMELIM-R ` c1 ≈(",δ) c2 : Φ =⇒ Ψ ` c1 ∼(",δ) c2 : Φ =⇒ Ψ ` c1 ≈(",δ) c2 : Φ =⇒ Ψ ` c2 ∼(",δ) c1 : Φ−1 =⇒ Ψ −1 Figure 5.5: Conversion rules between symmetric and standard judgments for APRHL for all (a1 , a2 ) ∈ Φ?i−1 , and we have the marginal conditions required by Proposition 5.4.5. Now take any (a1 , a2 ) ∈ Φ0 . By Proposition 5.4.5, we have d"∗ (l n (a1 , a2 ), r n (a1 , a2 )) ≤ δ∗ and d"∗ (r n (a1 , a2 ), l n (a1 , a2 )) ≤ δ∗ . Lemma 5.4.6 gives the marginal conditions π1 (l n (a1 , a2 )) = f n (a1 ) and π2 (r n (a1 , a2 )) = g n (a2 ) and shows that supp(l n (a1 , a2 )), supp(r n (a1 , a2 )) are contained in Φ?n , so l n (a1 , a2 ) and r n (a1 , a2 ) witness the desired symmetric approximate lifting f n (a1 ) Φn Symmetric judgments in ](" ∗ ,δ∗ ) g n (a2 ). AP RHL In order to use advanced composition in APRHL, we extend the logic with a new judgment modeling symmetric approximate liftings. We call such judgments symmetric judgments. Definition 5.4.8. A symmetric APRHL judgment is valid in logical context ρ, written ρ |= c1 ≈(",δ) c2 : Φ =⇒ Ψ, if for any two inputs (m1 , m2 ) ∈ ¹Φºρ there exists an symmetric approximate lifting relating the outputs: ¹c1 ºρ m1 ¹Ψºρ ](¹"ºρ ,¹δºρ ) ¹c2 ºρ m2 . To prove these judgments, we extend APRHL with a few proof rules. To keep our proof system as simple as possible, we introduce rules for symmetric judgments only where absolutely needed—namely, for advanced composition—and use the conversion rules in Fig. 5.5 to move between symmetric and standard, asymmetric judgments. The inverse relation Φ−1 can be defined syntactically by simply interchanging the tags 〈1〉 and 〈2〉 in a formula Φ. Soundness of these rules is straightforward. Theorem 5.4.9. The rules [SYMINTRO], [SYMELIM-L], and [SYMELIM-R] are sound. Proof. Soundness of [SYMINTRO] follows by Lemma 5.4.4. Soundness of [SYMELIM-L] and [SYMELIM-R] follow by definition of symmetric approximate lifting. CHAPTER 5. ADVANCED APPROXIMATE COUPLINGS 2N ln(1/ω) + N "(e" − 1) δ∗ ¬ N δ + ω ω ∈ (0, 1) |= Φ → e v 〈1〉 ≤ 0 → ¬e1 〈1〉 |= Φ → e1 〈1〉 = e2 〈2〉 ∀K ∈ N, ` c1 ≈(",δ) c2 : Φ ∧ e1 〈1〉 ∧ e v 〈1〉 = K =⇒ Φ ∧ e v 〈1〉 < K "∗ ¬ " WHILE-AC 96 Æ ` while e1 do c1 ≈("∗ ,δ∗ ) while e2 do c2 : Φ ∧ e v 〈1〉 ≤ N =⇒ Φ ∧ ¬e1 〈1〉 Figure 5.6: Advanced composition rule [WHILE-AC] for APRHL An advanced composition rule for AP RHL Finally, we internalize advanced composition of liftings as the loop rule [WHILE-AC] in Fig. 5.6. Like the usual rule [WHILE], the guards must be synchronized and the loops run at most N iterations. An (", δ)-approximate coupling of the loop bodies gives an (" ∗ , δ∗ )-approximate coupling of the two loops, where " ∗ and δ∗ are from the advanced composition theorem of differential privacy (Theorem 4.1.5). Theorem 5.4.10. The rule [WHILE-AC] is sound. Proof. The proof follows essentially by Theorem 5.4.7. As usual, we will leave the logical context ρ implicit. Consider two memories (m1 , m2 ) ∈ ¹Φ ∧ e v 〈1〉 ≤ N º and two output distributions µ1 ¬ ¹while e1 do c1 ºm1 and µ2 ¬ ¹while e2 do c2 ºm2 . We construct a symmetric approximate lifting relating µ1 and µ2 . The value of N is given by the logical context ρ; we treat it as a constant. We unroll the loop N times and define µ01 ¬ ¹(if e1 then c1 )N ºm1 and µ02 ¬ ¹(if e2 then c2 )N ºm2 . We claim ¹e1 ºm01 = ¹e2 ºm02 = false for all m01 ∈ supp(µ01 ) and m02 ∈ supp(µ02 ). We can use the valid symmetric AP RHL judgment in the premise and symmetric versions of the rules [S EQ ] and [C OND ] to construct a symmetric approximate lifting µ01 Φ ∧ e v 〈1〉 ≤ 0 ](N ",N δ) µ02 . Since |= Φ ∧ e v 〈1〉 ≤ 0 → ¬e1 〈1〉, we have ](N ",N δ) µ01 ¬e1 〈1〉 ∧ ¬e2 〈2〉 µ02 . Let µ0L , µ0R be the corresponding witnesses. We know π1 (µ0L ) = µ01 and π2 (µ0R ) = µ02 , and also supp(µ0L ) ∪ supp(µ0R ) ⊆ ¹¬e1 〈1〉 ∧ ¬e2 〈2〉º, so ¹e1 ºm01 = ¹e2 ºm02 = false for all m01 , m02 in the support of µ01 , µ02 respectively. By the equivalences while e1 do c1 ≡ (if e1 then c1 )N ; while e1 do c1 while e2 do c2 ≡ (if e2 then c2 )N ; while e2 do c2 , we know µ1 = ¹(if e1 then c1 )N ºm1 and µ2 = ¹(if e2 then c2 )N ºm2 . Defining a family of relations Φi ¬ Φ ∧ (e v 〈1〉 ≤ N − i ∨ ¬e1 〈1〉), CHAPTER 5. ADVANCED APPROXIMATE COUPLINGS 97 we have |= if e1 then c1 ≈(",δ) if e2 then c2 : Φi =⇒ Φi+1 for every i using the premise, since Φi ensures the guards e1 and e2 are equal in the initial memories. By validity, for any pair of memories satisfying Φi there is a symmetric approximate lifting of Φi+1 relating the two output distributions. We can apply Theorem 5.4.7 with A1 = A2 = State, functions f i ¬ ¹if e1 then c1 º and g i ¬ ¹if e2 then c2 º, and relations Φi to get the symmetric approximate lifting ](" ∗ ,δ∗ ) µ1 Φ ∧ (e v 〈1〉 ≤ 0 ∨ ¬e1 〈1〉) µ2 . Since |= Φ ∧ e v 〈1〉 ≤ 0 → ¬e1 〈1〉, we conclude ](" ∗ ,δ∗ ) µ1 Φ ∧ ¬e1 〈1〉 µ2 so [WHILE-AC] is sound. Remark 5.4.11. Our approach narrowly limits the scope of symmetric judgments: they can be used in [WHILE-AC] or eliminated to a standard judgment. There are at least two other choices. One option would be to define a full proof system based on symmetric judgments. Almost all the basic proof rules from APRHL would directly generalize, including the standard rules for program commands and the Laplace rules. However, it is not clear how to generalize the more advanced rules, including [PW-EQ] and [UTB-L]/[UTB-R]. The optimal subset coupling (Theorem 5.3.1) also does not directly generalize to symmetric liftings; this poses a problem for a symmetric version of [LAPINT]. For another option, we could avoid symmetric judgments entirely by fusing [SYMINTRO], [WHILE-AC], and [SYMELIM-L] together into a single rule. While this would suffice for our examples, it is conceptually clearer to separate symmetric and asymmetric judgments. Our design choice leaves room for other rules specific to symmetric approximate liftings, and clearly identifies the main bottleneck in converting from standard approximate liftings to symmetric liftings in the rule [SYMINTRO]. 5.5 Proving privacy for Between Thresholds To draw everything together, we prove differential privacy for the Between Thresholds mechanism proposed by Bun et al. (2017), a more advanced version of the Sparse Vector mechanism. The input is again a stream of numeric queries, but now there are two numeric thresholds A and B with A < B. The original mechanism outputs LEFT if the answer is approximately below A, RIGHT if the answer is approximately above B, and HALT if the answer is approximately between A and B. We analyze a variant of Between Thresholds that releases the index and approximate answer of the first C queries between the thresholds; Fig. 5.7 presents the code of the algorithm. The variables a and b contain the noisy thresholds. Unlike Sparse Vector, we resample the noise u when computing a and b after each between-threshold query—this is needed to analyze the outer loop by advanced composition. Also, the noise u is added in opposite directions to the two thresholds. Otherwise, the code is largely the same as Sparse Vector. The privacy analysis of this algorithm is more complex than for Sparse Vector. First, privacy fails if the noisy thresholds a and b are too close together. Even if the exact thresholds A and B are far apart, there is always some small, non-zero probability that the noise u may be very large. Therefore the best we can hope for is (", δ)-differential privacy, where δ bounds the probability that the threshold noise is too large. Second, while the proof strategy for the inner loop remains broadly the same, in the critical iteration we must ensure that if one execution is between thresholds, then so is the other; we use the subset coupling for this purpose. Finally, we apply the advanced composition theorem to analyze the outer loop. It will be useful to have a simpler bound on the approximation parameter for the subset coupling. CHAPTER 5. ADVANCED APPROXIMATE COUPLINGS 98 i ← 1; out ← []; while i ≤ N ∧ |out| < C do $ Lap (0); u← "0 a ← A − u; b ← B + u; go ← true; ans ← (0, 0); while i ≤ N ∧ go do $ Lap v← " 0 /3 (evalQ(i, d)); if a < v < b then $ Lap (evalQ(i, d)); noisy ← "0 ans ← (i, noisy); out ← ans :: out; go ← false; i ← i+1 Figure 5.7: Between Thresholds Lemma 5.5.1. Let λ ∈ (0, 1/2). Suppose we have r, s ∈ Z such that s−r ≥ 6 4 ln − 2, λ λ and suppose we have two means v1 , v2 ∈ Z with |v1 − v2 | ≤ 1. Then we have an approximate lifting Lapλ/3 (v1 ) {(x 1 , x 2 ) | x 1 ∈ [r − 1, s + 1] ↔ x 2 ∈ [r, s]}](λ,0) Lapλ/3 (v2 ). Proof. By the soundness of [LAPINT] (Theorem 5.3.5), we have an approximate lifting Lapλ/3 (v1 ) {(x 1 , x 2 ) | x 1 ∈ [r − 1, s + 1] ↔ x 2 ∈ [r, s]}](κ,0) Lapλ/3 (v2 ) where κ ¬ ln We check κ ≤ λ assuming σ ≥ 6 λ  exp(2λ/3) 1 − exp(−σλ/6) ‹ and σ ¬ (s − r) + 2. ln λ4 . Substituting, it suffices to show exp(2λ/3) ≤ exp(λ) 1 − λ/4 which is equivalent to λ/4 + exp(−λ/3) − 1 ≤ 0. Since the left side is convex in λ, the maximum occurs on the boundary of the domain. We can directly check the inequality at the endpoints λ = {0, 1/2}. We are now ready to prove privacy for Between Thresholds. As we did for Sparse Vector, we start with an informal proof by approximate coupling. CHAPTER 5. ADVANCED APPROXIMATE COUPLINGS 99 Theorem 5.5.2. Let ", δ ∈ (0, 1) and let q1 , . . . , qN : D → Z be a list of 1-sensitive queries. If we set " "0 ¬ p 6 2C ln(2/δ) and the thresholds A, B are equal across both runs and satisfy B−A≥ 6 2 ln(4/" 0 ) + 0 ln(2/δC), 0 " " then the Between Thresholds algorithm (Fig. 5.7) is (", δ)-differentially private. Proof by approximate coupling. Consider the outer loop body. We have |u〈1〉| ≤ (1/" 0 ) ln(2/δC) in the first process except with probability δ/2C, and we couple u〈1〉 and u〈2〉 so u〈1〉 − 1 = u〈2〉; this is an (" 0 , δ/2C)-approximate coupling since the noise is drawn from Lap"0 (0). The coupling ensures the noisy thresholds satisfy a〈1〉 + 1 = a〈2〉 and b〈1〉 = b〈2〉 + 1. (5.1) Next, consider the inner loop. Each iteration, we approximately couple the processes so ans〈1〉 = ans〈2〉. For any pair ( j, y) with j ∈ N and y ∈ Z, we construct an approximate coupling of the inner loops such that if ans on the first side is equal to ( j, y), then so is ans on the second side; by pointwise equality, this will imply an approximate coupling with ans〈1〉 = ans〈2〉. As before, if j ∈ / [1, N ] the proof is trivial. Otherwise, we handle the inner iterations in one of two ways. On iterations i 6= j we couple the samplings for v and noisy with the null coupling, ensuring |v〈1〉 − v〈2〉| ≤ 1. This guarantees that before iteration j, if the first side is outside the thresholds, then so is the second side (by the coupling of the thresholds, Eq. (5.1)). We use (0, 0)-approximate couplings for these iterations. On the critical iteration i = j, we use the optimal subset coupling when sampling v so that v〈1〉 ∈ [a〈1〉, b〈1〉] ↔ v〈2〉 ∈ [a〈2〉, b〈2〉]. (5.2) Given our accuracy bound on |u〈1〉|, the inner interval [a〈2〉, b〈2〉] satisfies b〈2〉 − a〈2〉 ≥ 6 ln(4/" 0 ) − 2 "0 under the threshold coupling, so Eq. (5.2) is an (" 0 , 0)-approximate coupling (Lemma 5.5.1). This coupling ensures the two processes behave the same at the conditional. If both processes are between thresholds, we apply the standard coupling for the Laplace mechanism so noisy〈1〉 = noisy〈2〉; this is an (" 0 , 0)-approximate coupling. If both processes are not between thresholds then we don’t sample noisy. So, we have an (2" 0 , 0)-approximate coupling for the inner loop such that if ans is equal to ( j, y) on the first run, then ans is equal to ( j, y) on the second run. By pointwise equality, this implies an (2" 0 , 0)-approximate coupling for the inner loop with ans〈1〉 = ans〈2〉 as long as the threshold noises satisfy u〈1〉 − 1 = u〈2〉 and the accuracy bound. Combined with the initial (" 0 , δ/2C)-approximate coupling for u, we have an (2" 0 +" 0 , δ/2C +0) = (3" 0 , δ/2C)approximate coupling ensuring ans〈1〉 = ans〈2〉 for the body of the outer loop. The outer loop executes at most C iterations, so by the advanced composition theorem (using the parameter setting from Footnote 2) we have an (", δ)-approximate coupling of the outer loops with out〈1〉 = out〈2〉, establishing (", δ)-differential privacy. CHAPTER 5. ADVANCED APPROXIMATE COUPLINGS 100 We can give a more formal proof of privacy in APRHL. We work with the following, equivalent version of Between Thresholds: i ← 1; out ← []; while i ≤ N ∧ |out| < C do $ Lap (0); u← "0 a ← A − u; b ← B + u; go ← true; ans ← (0, 0); while i ≤ N do $ Lap v← " 0 /3 (evalQ(i, d)); if a < v < b ∧ go then $ Lap (evalQ(i, d)); noisy ← "0 ans ← (i, noisy); go ← false; i ← i + 1; if p1 (ans) 6= 0 then i ← p1 (ans) + 1; out ← ans :: out We call this program BT and the inner loop in. Compared to the algorithm in Fig. 5.7, the main difference is in the inner loop: each execution of in runs through all the queries, skipping the check once we have found a between-threshold query. More precisely, the flag go, which indicates we have not yet found a between-threshold query, is in the inner loop guard in Fig. 5.7 while it is in the between thresholds check in BT. After the inner loop, if a between-thresholds query was found then the index in ans must be non-zero, so the algorithm records the noisy answer and index, and resets the counter i to pick up after the last answered query. The inner loops in this version of the algorithm can be analyzed synchronously. Theorem 5.5.3. Let ", δ ∈ (0, 1), let q1 , . . . , qN : D → Z be a list of 1-sensitive queries, and let the logical variables D1 , D2 represent two adjacent databases. If we set " "0 ¬ p 6 2C ln(2/δ) in BT, and the thresholds A, B are equal across both runs and satisfy B−A≥ 2 6 ln(4/" 0 ) + 0 ln(2/δC), "0 " then the following judgment holds: ` BT ∼(",δ) BT : d〈1〉 = D1 ∧ d〈2〉 = D2 =⇒ out〈1〉 = out〈2〉. Proof. The APRHL proof follows the approximate coupling proof in Theorem 5.5.2 closely. There are two main technicalities. First, we must take care to apply the rules that affect the parameter δ in the proper order. For instance, [PW-EQ] should be applied to pointwise judgments that are (", 0)-approximate couplings—if the pointwise judgment has δ > 0, then [PW-EQ] will sum δ over all possible outputs. Since [LAPACC -L]/[LAPACC -R] and [WHILE-AC] increase the δ parameter, we apply these rules below [PW-EQ] in the proof tree. Second, we need to make sure that the outer loop invariant is of the correct form so we can convert to a symmetric judgment and apply [WHILE-AC]. CHAPTER 5. ADVANCED APPROXIMATE COUPLINGS 101 At a high level, we apply [PW-EQ] on the inner loop assuming in the pre-condition that the threshold noise are coupled appropriately, and not too large. Then, we apply the accuracy bound [LAPACC -L] and threshold coupling [LAPGEN] for the first part of the outer loop body. Finally, we convert the standard APRHL judgment for the loop body to a symmetric judgment, applying [WHILE-AC] on the outer loop to conclude the proof. Let’s see this plan in action. We begin with the inner loop, in. We prove a pointwise judgment for the following, equivalent version of in, split into three stages: while i ≤ N ∧ i < j do $ Lap v← " 0 /3 (evalQ(i, d)); if a < v < b ∧ go then $ Lap (evalQ(i, d)); noisy ← "0 ans ← (i, noisy); go ← false; i ← i + 1; while i ≤ N ∧ i = j do $ Lap v← " 0 /3 (evalQ(i, d)); if a < v < b ∧ go then $ Lap (evalQ(i, d)); noisy ← "0 ans ← (i, noisy); go ← false; i ← i + 1; while i ≤ N do $ Lap v← " 0 /3 (evalQ(i, d)); if a < v < b ∧ go then $ Lap (evalQ(i, d)); noisy ← "0 ans ← (i, noisy); go ← false; i ← i+1 We call this program in0 , the three loops w< , w= , and w> , and the common loop body bodyin . We implicitly maintain the invariant d〈1〉 = D1 ∧ d〈2〉 = D2 in all judgments and take the following global invariant:  i〈1〉 = i〈2〉 Ξ ¬ a〈1〉 + 1 = a〈2〉 ∧ b〈1〉 = b〈2〉 + 1 ∧ b〈2〉 − a〈2〉 ≥ "60 ln(4/" 0 ) − 2  [a〈1〉, b〈1〉] = [A − u〈1〉, B + u〈1〉] ∧ [a〈2〉, b〈2〉] = [A − u〈2〉, B + u〈2〉] Reading from top to bottom, this ensures (i) the loops are synchronized, (ii) the noisy thresholds are coupled and not too close, and (iii) the noisy thresholds share the noise u. Since in0 does not modify the variables a, b and u, this assertion is preserved by the loops. Now let ( j, y) ∈ N × Z be a possible value of ans. We define the following invariants for the three loops: Θ< ¬ Ξ ∧ go〈1〉 → go〈2〉 ∧ ¬(i〈1〉 ≤ N ∧ i〈1〉 < j) → i〈1〉 = j  go〈1〉 → go〈2〉 Θ= ¬ Ξ ∧ ans〈1〉 = ( j, y) → ans〈2〉 = ( j, y)  ¬(i〈1〉 ≤ N ∧ i〈1〉 = j) → i〈1〉 = j + 1 Θ> ¬ Ξ ∧ i〈1〉 > j ∧ ans〈1〉 = ( j, y) → ans〈2〉 = ( j, y) Now we proceed one loop at a time. First, we have ` bodyin ∼(0,0) bodyin : Θ< =⇒ Θ< CHAPTER 5. ADVANCED APPROXIMATE COUPLINGS 102 by coupling the sampling for v with [LAPNULL] and using [LAP-L], [LAP-R], or [LAPNULL] to couple the samples for noisy. This ensures |v〈1〉 − v〈2〉| ≤ 1; combined with the threshold coupling, we know that if the first side doesn’t find a between-threshold query then neither does the second side, so go〈1〉 → go〈2〉. We get a coupling for the first loop by [WHILE]: ` w< ∼(0,0) w< : Θ< =⇒ Θ< ∧ ¬(i ≤ N ∧ i < j). For the second loop, we prove ` bodyin ∼(2"0 ,0) bodyin : Θ= =⇒ Θ= . We couple the samplings for v with the subset coupling [LAPINT], ensuring the two processes take the same path in the conditional. Since the thresholds are sufficiently apart (by Ξ) and the queries are 1-sensitive, [LAPINT] is an (" 0 , 0)-approximate coupling by Lemma 5.5.1. If both processes find between-threshold queries, then we couple the samplings for noisy with the standard Laplace rule [LAP] so noisy〈1〉 = noisy〈2〉; this is an (" 0 , 0)-approximate coupling since the queries are 1-sensitive. Otherwise if both sides are outside the interval, we do not sample noisy. Thus, we have a (2" 0 , 0)-approximate coupling where if ans〈1〉 = ( j, y), then ans〈2〉 = ( j, y) too. Since the loop w= executes for exactly one iteration, [WHILE] gives ` w= ∼(2"0 ,0) w= : Θ= =⇒ Θ= ∧ ¬(i〈1〉 ≤ N ∧ i〈1〉 = j). For the last loop we simply couple the samplings for v with the null coupling [LAPNULL] and use any zero-cost coupling for noisy ([LAP-L], [LAP-R], or [LAPNULL]), giving ` w> ∼(0,0) w> : Θ> =⇒ Θ> ∧ ¬(i ≤ N ). Applying the rule of consequence with the implications |= Θ< ∧ ¬(i〈1〉 ≤ N ∧ i〈1〉 < j) → Θ= |= Θ= ∧ ¬(i〈1〉 ≤ N ∧ i〈1〉 = j) → Θ> , we combine the loop judgments while summing the approximation parameters with [SEQ] to get ` in0 ∼(2"0 ,0) in0 : Ξ =⇒ ans〈1〉 = ( j, y) → ans〈2〉 = ( j, y). Pointwise equality [PW-EQ] completes the proof for the inner loop: ` in0 ∼(2"0 ,0) in0 : Ξ =⇒ ans〈1〉 = ans〈2〉. Now let the outer loop by wout , with body bodyout . We ensure Ξ after the threshold samplings by applying [LAPGEN] and the accuracy bound [LAPACC -L], using an (" 0 , δ/2C)-approximate coupling for the threshold samplings and showing ` bodyout ∼(3"0 ,δ/2C) bodyout : (i, out)〈1〉 = (i, out)〈2〉 =⇒ (i, out)〈1〉 = (i, out)〈2〉. Continuing to keep the adjacency condition d1 〈1〉 = D1 ∧ d2 〈2〉 = D2 implicit, we can apply [SYMINTRO] to get the symmetric judgment ` bodyout ≈(3"0 ,δ/2C) bodyout : (i, out)〈1〉 = (i, out)〈2〉 =⇒ (i, out)〈1〉 = (i, out)〈2〉. Taking the loop invariant Ψ ¬ (i, out)〈1〉 = (i, out)〈2〉 ∧ d〈1〉 = D1 ∧ d〈2〉 = D2 , the advanced composition rule [WHILE-AC] gives ` wout ≈(",δ) wout : Ψ =⇒ Ψ using the setting of " 0 from Footnote 2. Converting back to a standard judgment by [SYMELIM-L] and handling the initial assignments, we conclude differential privacy: ` BT ∼(",δ) BT : d〈1〉 = D1 ∧ d〈2〉 = D2 =⇒ out〈1〉 = out〈2〉. CHAPTER 5. ADVANCED APPROXIMATE COUPLINGS 5.6 103 Comparison to other approximate liftings The notion of approximate lifting has been formulated numerous times. We compare with several prior definitions in the discrete case. Research on the continuous case is ongoing; we summarize recent developments in the next chapter (Section 6.1). Symmetric approximate liftings While symmetric approximate liftings are less general than their asymmetric counterparts, they are interesting in their own right. In fact, our symmetric approximate liftings are equivalent to the approximate liftings proposed by Barthe et al. (2013c) in the original work on proving differential privacy via relational program logics. Unlike our definitions, which use two witnesses, their notion is based on a single witness. Definition 5.6.1. Let µ1 , µ2 be sub-distributions over A1 and A2 , and let R ⊆ A1 × A2 be a relation. A subdistribution µ over pair sA1 × A2 is a witness for the one-witness (", δ)-approximate R-lifting of (µ1 , µ2 ) if: 1. π1 (µ) ≤ µ1 and π2 (µ) ≤ µ2 ; 2. supp(µ) ⊆ R; and 3. d" (µ1 , π1 (µ)) ≤ δ and d" (µ2 , π2 (µ)) ≤ δ.1 This definition is arguably closer to the spirit of probabilistic couplings: a single joint sub-distribution approximately modeling two given distributions as marginals. Theorem 5.6.2. Let µ1 , µ2 be sub-distributions over A1 and A2 , and let R ⊆ A1 × A2 be a relation. There is a onewitness (", δ)-approximate lifting of R in the sense of Definition 5.6.1 if and only if there is a symmetric approximate lifting ](",δ) µ1 R µ2 . Proof. For the reverse direction, let (µ L , µR ) witness the symmetric approximate lifting and define η ∈ SDistr(A1 × A2 ) as the pointwise minimum: η(a1 , a2 ) ¬ min(µ L (a1 , a2 ), µR (a1 , a2 )). We check that η is a witness to an approximate lifting in the sense of Definition 5.6.1. The support condition follows from the support condition for (µ L , µR ). The marginal conditions π1 (η) ≤ µ1 and π2 (η) ≤ µ2 also follow by the marginal conditions for (µ L , µR ). The only thing to check is the distance condition. Define non-negative constants δ(a1 , a2 ) ¬ max(µ L (a1 , a2 ) − exp(") · µR (a1 , a2 ), 0). By the distance condition on (µ L , µR ), µ L (a1 , a2 ) ≤ exp(") · µR (a1 , a2 ) + δ(a1 , a2 ) P with equality when δ(a1 , a2 ) > 0, and a1 ,a2 δ(a1 , a2 ) ≤ δ. We claim min(µ L (a1 , a2 ), µR (a1 , a2 )) ≥ exp(−")(µ L (a1 , a2 ) − δ(a1 , a2 )). If δ(a1 , a2 ) = 0 then µR (a1 , a2 ) ≥ exp(−")µ L (a1 , a2 ). Otherwise if δ(a1 , a2 ) > 0, then µR (a1 , a2 ) = exp(−")(µ L (a1 , a2 ) − δ(a1 , a2 )) ≤ µ L (a1 , a2 ) 1 The original definition by Barthe et al. (2013c) involved a symmetric notion of "-distance, and flipped the direction of both distances in this point. To keep notation uniform, we present their definition in terms of our (asymmetric) notion of "-distance from Definition 4.2.1. CHAPTER 5. ADVANCED APPROXIMATE COUPLINGS 104 and the claim is again clear. Similarly, define δ0 (a1 , a2 ) ¬ max(µR (a1 , a2 ) − exp(") · µ L (a1 , a2 ), 0). We have µR (a1 , a2 ) ≤ exp(") · µ L (a1 , a2 ) + δ0 (a1 , a2 ) P with equality when δ0 (a1 , a2 ) = 0, and a1 ,a2 δ0 (a1 , a2 ) ≤ δ. By analogous reasoning, we have min(µ L (a1 , a2 ), µR (a1 , a2 )) ≥ exp(−")(µR (a1 , a2 ) − δ0 (a1 , a2 )). Now let S1 ⊆ A1 be any subset. Then: ! µ1 (S1 ) − exp(") · π1 (η)(S1 ) = X µ1 (a1 ) − exp(") X a 1 ∈ S1 a2 ∈A2 X X min(µ L (a1 , a2 ), µR (a1 , a2 )) ! ≤ µ1 (a1 ) − exp(") = exp(−")(µ L (a1 , a2 ) − δ(a1 , a2 )) a2 ∈A2 a 1 ∈ S1 X δ(a1 , a2 ) ≤ δ. a1 ∈S1 ,a2 ∈A2 The other marginal is similar: for any subset S2 ⊆ A2 , we have ! µ2 (S2 ) − exp(") · π2 (η)(S2 ) = X µ2 (a2 ) − exp(") X a2 ∈S2 a1 ∈A1 X X min(µ L (a1 , a2 ), µR (a1 , a2 )) ! ≤ µ2 (a2 ) − exp(") a2 ∈S2 = X exp(−")(µR (a1 , a2 ) − δ0 (a1 , a2 )) a1 ∈A1 δ0 (a1 , a2 ) ≤ δ. a2 ∈S2 ,a1 ∈A1 Thus, η witnesses the one-witness (", δ)-approximate lifting of R. The forward direction is more interesting. Let η ∈ SDistr(A1 × A2 ) be the single witness and define δ(a1 ) ¬ max(µ1 (a1 ) − exp(") · π1 (η)(a1 ), 0) δ0 (a2 ) ¬ max(µ2 (a2 ) − exp(") · π2 (η)(a2 ), 0). By the distance conditions d" (µ1 , π1 (η)) ≤ δ and d" (µ2 , π2 (η)) ≤ δ, we have δ(a1 ), δ0 (a2 ) ≥ 0 and µ1 (a1 ) ≤ exp(") · π1 (η)(a1 ) + δ(a1 ) µ2 (a2 ) ≤ exp(") · π2 (η)(a2 ) + δ0 (a2 ), P P with equality when δ(a1 ) or δ0 (a2 ) are strictly positive. Furthermore, a1 ∈A1 δ(a1 ) and a2 ∈A2 δ0 (a2 ) are at most δ. Define witnesses µ L , µR ∈ SDistr(A?1 × A?2 ) as follows:  µ (a1 )−δ(a1 )  · 1π1 (η)(a : a1 6= ?, a2 6= ? η(a1 , a2 ) P 1) 0 µ L (a1 , a2 ) ¬ µ1 (a1 ) − a0 ∈A2 µ L (a1 , a2 ) : a1 6= ?, a2 = ? 2  0 : otherwise CHAPTER 5. ADVANCED APPROXIMATE COUPLINGS 105  µ (a )−δ0 (a )  : a1 6= ?, a2 6= ? · 2π22(η)(a2 ) 2 η(a1 , a2 ) P 0 µR (a1 , a2 ) ¬ µ2 (a2 ) − a0 ∈A1 µR (a1 , a2 ) : a1 = ?, a2 6= ? 1  0 : otherwise. As usual, if any denominator is zero we take the whole term to be zero as well. The support condition follows from the support condition of η; the marginal conditions hold by definition. All probabilities are non-negative—for instance in µ L , if δ(a1 ) > 0 then µ1 (a1 ) − δ(a1 ) = exp(") · π1 (η)(a1 ) ≥ 0 and µ L (a1 , ?) = µ1 (a1 ) − exp(") · π1 (η)(a1 ) = δ(a1 ) ≥ 0 when π1 (η)(a1 ) > 0; if π1 (η)(a1 ) = 0 then µ L (a1 , ?) = µ1 (a1 ) = 0. If δ(a1 ) = 0 then we can check η(a1 , ?) ≥ 0. A similar argument shows that µR is non-negative. So, it remains to check the distance bounds. We first claim µ L (a1 , a2 ) ≤ exp(") · µR (a1 , a2 ) µR (a1 , a2 ) ≤ exp(") · µ L (a1 , a2 ). and When a1 , a2 6= ?, by definition µ L (a1 , a2 ) and µR (a1 , a2 ) are both positive or both zero depending on whether η(a1 , a2 ) is positive or zero. The zero case is immediate. In the positive case, µ L (a1 , a2 ) µ1 (a1 ) − δ(a1 ) = ≤ exp(") η(a1 , a2 ) π1 (η)(a1 ) and µR (a1 , a2 ) µ (a ) − δ0 (a2 ) = 2 2 ≤ exp("). η(a1 , a2 ) π2 (η)(a2 ) and µR (a1 , a2 ) µ (a ) − δ0 (a2 ) = 2 2 ≥ 1; η(a1 , a2 ) π2 (η)(a2 ) We can also lower bound the ratios: µ L (a1 , a2 ) µ1 (a1 ) − δ(a1 ) = ≥1 η(a1 , a2 ) π1 (η)(a1 ) for instance when δ(a1 ) > 0 the ratio is exactly equal to exp(") ≥ 1, and when δ(a1 ) = 0 the ratio is at least 1 by the marginal property π1 (η) ≤ µ1 . So, µ L (a1 , a2 )/η(a1 , a2 ) and µR (a1 , a2 )/η(a1 , a2 ) are in [1, exp(")] when all distributions are positive, establishing the claim. Finally, we bound the mass on points (a1 , ?). Letting S1 ⊆ A1 be any subset, 0 = µR (S1 × {?}) ≤ exp(") · µ L (S1 × {?}) + δ is clear. For the other direction, ! X X η(a , a ) X η(a , a ) 1 2 1 2 µ L (S1 × {?}) = µ1 (a1 ) − µ1 (a1 ) + δ(a1 ) π (η)(a ) π (η)(a 1 1 1 1) a ∈S a ∈A a ∈A 1 1 2 2 2 2 = µ1 (S1 ) − µ1 (S1 ) + δ(S1 ) ≤ exp(") · µR (S1 × {?}) + δ. The mass at points (?, a2 ) can be bounded in a similar way. Let S2 ⊆ A2 be any subset. Then 0 = µ L ({?} × S2 ) ≤ exp(") · µR ({?} × S2 ) + δ is clear. For the other direction, ! X X η(a , a ) X η(a , a ) 1 2 1 2 0 µR ({?} × S2 ) = µ2 (a2 ) − µ2 (a2 ) + δ (a2 ) π2 (η)(a2 ) π2 (η)(a2 ) a ∈S a ∈A a ∈A 2 2 1 1 1 1 = µ2 (S2 ) − µ2 (S2 ) + δ0 (S2 ) ≤ exp(") · µ L ({?} × S2 ) + δ. So d" (µ L , µR ) ≤ δ and d" (µR , µ L ) ≤ δ, and we have a symmetric approximate lifting. Asymmetric approximate liftings, alternative definition After introducing their symmetric notion of lifting (Definition 5.6.1), Barthe et al. (2013c) also considered asymmetric approximate liftings with a single witness distribution. CHAPTER 5. ADVANCED APPROXIMATE COUPLINGS 106 Definition 5.6.3. Let µ1 , µ2 be sub-distributions over A1 and A2 , and let R ⊆ A1 × A2 be a relation. A subdistribution µ over pairs A1 × A2 is a witness for the one-witness asymmetric (", δ)-approximate R-lifting of (µ1 , µ2 ) if: 1. π1 (µ) ≤ µ1 and π2 (µ) ≤ µ2 ; 2. supp(µ) ⊆ R; and 3. d" (µ1 , π1 (µ)) ≤ δ.2 Note the key difference compared to the symmetric version: the distance bound is only required to hold between the first distribution and the first marginal. We can show Definition 5.6.3 coincides with our asymmetric notion of approximate lifting. Theorem 5.6.4. Let µ1 , µ2 be sub-distributions over A1 and A2 , and let R ⊆ A1 × A2 be a relation. Then there is a (one-witness) asymmetric (", δ)-approximate lifting of R in the sense of Definition 5.6.3 if and only if there is an approximate lifting: µ1 R](",δ) µ2 . Proof. For the reverse direction, let (µ L , µR ) witness the approximate lifting and define η ∈ SDistr(A1 × A2 ) as the pointwise minimum: η(a1 , a2 ) ¬ min(µ L (a1 , a2 ), µR (a1 , a2 )). We claim that η witnesses an asymmetric approximate lifting in the sense of Definition 5.6.3. The support condition follows from the support condition for (µ L , µR ); the marginal conditions π1 (η) ≤ µ1 and π2 (η) ≤ µ2 also follow by the marginal conditions for (µ L , µR ). To check the distance condition, define δ(a1 , a2 ) ¬ max(µ L (a1 , a2 ) − exp(") · µR (a1 , a2 ), 0). By the distance condition on (µ L , µR ), we have µ L (a1 , a2 ) ≤ exp(") · µR (a1 , a2 ) + δ(a1 , a2 ) P with equality when δ(a1 , a2 ) > 0, and a1 ,a2 δ(a1 , a2 ) ≤ δ. Like in the proof of Theorem 5.6.2, we have min(µ L (a1 , a2 ), µR (a1 , a2 )) ≥ exp(−")(µ L (a1 , a2 ) − δ(a1 , a2 )). To conclude the distance bound, let S1 ⊆ A1 be a subset. Then: ! µ1 (S1 ) − exp(") · π1 (η)(S1 ) = X µ1 (a1 ) − exp(") X a 1 ∈ S1 a2 ∈ A 2 X X min(µ L (a1 , a2 ), µR (a1 , a2 )) ! ≤ µ1 (a1 ) − exp(") a 1 ∈ S1 = X exp(−")(µ L (a1 , a2 ) − δ(a1 , a2 )) a2 ∈ A 2 δ(a1 , a2 ) ≤ δ. a1 ∈S1 ,a2 ∈A2 Thus, η witnesses the (one-witness) asymmetric (", δ)-approximate lifting of R. The forward direction is more interesting. Let η ∈ SDistr(A1 × A2 ) be the single witness and define δ(a1 ) ¬ µ1 (a1 ) − exp(") · π1 (η)(a1 ). 2 The original definition by Barthe et al. (2013c) used the same notion of "-distance that we use (Definition 4.2.1), but incorrectly flipped the direction of the distance bound. It is also possible to define a version involving the second marginal instead of the first. CHAPTER 5. ADVANCED APPROXIMATE COUPLINGS 107 By the distance condition d" (µ1 , π1 (η)) ≤ δ, we know δ(a1 ) is non-negative. Furthermore, µ1 (a1 ) ≤ exp(") · π1 (η)(a1 ) + δ(a1 ) P with equality when δ(a1 ) is strictly positive, and a1 ∈A1 δ(a1 ) ≤ δ. Define two witnesses µ L , µR ∈ SDistr(A?1 × A?2 ) as follows:  µ (a1 )−δ(a1 )  · 1π1 (η)(a : a1 6= ?, a2 6= ? η(a1 , a2 ) P 1) µ L (a1 , a2 ) ¬ µ1 (a1 ) − a0 ∈A2 µ L (a1 , a20 ) : a1 6= ?, a2 = ? 2  0 : otherwise   : a1 6= ?, a2 6= ? η(a1 , a2 ) P 0 µR (a1 , a2 ) ¬ µ2 (a2 ) − a0 ∈A1 µR (a1 , a2 ) : a1 = ?, a2 6= ? 1  0 : otherwise. If any denominator is zero, we take the probability to be zero as well. The support condition follows from the support condition of η; the marginal conditions hold by definition. To show all probabilities are non-negative, for µ L note that if δ(a1 ) > 0 then µ1 (a1 ) − δ(a1 ) = exp(") · π1 (η)(a1 ) ≥ 0 and hence µ L (a1 , ?) = µ1 (a1 ) − δ(a1 ) ≥ 0 assuming π1 (η)(a1 ) > 0; if π1 (η)(a1 ) = 0 then µ L (a1 , ?) = 0. For µR , non-negativity holds by π2 (η) ≤ µ2 . We just need to show the distance bound. When a1 , a2 6= ?, we claim µ L (a1 , a2 ) ≤ exp(") · η(a1 , a2 ) = exp(") · µR (a1 , a2 ). By definition µ L (a1 , a2 ), µR (a1 , a2 ), and η(a1 , a2 ) are all positive or all zero. The zero case is immediate. In the positive case, µ L (a1 , a2 ) µ1 (a1 ) − δ(a1 ) = ≤ exp(") η(a1 , a2 ) π1 (η)(a1 ) establishes the claim. To bound the mass on points (a1 , ?), let S1 ⊆ A1 be any subset. Then: µ L (S1 × {?}) = X a 1 ∈ S1 X η(a , a ) X η(a , a ) 1 2 1 2 µ1 (a1 ) − µ1 (a1 ) + δ(a1 ) π (η)(a ) π (η)(a 1 1 1 1) a ∈A a ∈A 2 2 2 ! 2 = µ1 (S1 ) − µ1 (S1 ) + δ(S1 ) ≤ exp(") · µR (S1 × {?}) + δ so d" (µ L , µR ) ≤ δ as desired, and we have witnesses to an approximate lifting. Prior two-witness approximate liftings Our notion of approximate lifting is strongly inspired by a prior definition. Definition 5.6.5 (Barthe and Olmedo (2013) and Olmedo (2014)). Let µ1 , µ2 be sub-distributions over A1 and A2 , and let R ⊆ A1 × A2 be a relation. Two sub-distributions µ L , µR over pairs A1 × A2 are said to be witnesses for the (", δ)-approximate R-lifting of (µ1 , µ2 ) if: 1. π1 (µ L ) = µ1 and π2 (µR ) = µ2 ; 2. supp(µ L ) ∪ supp(µR ) ⊆ R; and 3. d" (µ L , µR ) ≤ δ. CHAPTER 5. ADVANCED APPROXIMATE COUPLINGS 108 There are several positive features of this definition. First, it generalizes to other notions of distance on distribution; the distance d" can be replaced by an f -divergence. Furthermore, the witness distributions are related by a distance that looks like the distance from differential privacy, so composition theorems from differential privacy generalize to these liftings. However, there are several notable drawbacks. Perhaps the biggest flaw is this definition does not support approximate lifting when R does not contain the supports supp(µ1 ) × supp(µ2 ). This limitation rules out up-to-bad couplings and accuracy bounds. There are also several annoying technical issues—the mapping property in Theorem 4.2.7 only holds for surjective maps, the support property Proposition 4.2.6 fails, the subset coupling in Theorem 5.3.1 does not work if the larger subset S1 is the whole domain A1 , etc. These flaws are remedied in our definition. Other notions of approximate equivalence Approximate notions of lifting have also appeared in the literature on probabilistic bisimulation. Tschantz et al. (2011) introduced the δ-lifting of a relation R to relate two distributions µ1 , µ2 when there is a bijection f on the supports matching elements with probabilities within a multiplicative factor: ln µ1 (x) ≤δ µ2 ( f (x)) and (x, f (x)) ∈ R. Tschantz et al. (2011) used this notion of lifting to prove a variant of differential privacy for probabilistic labeled transition systems, with a proof technique based on an unwinding family of relations. Prior researchers largely focused on additive notions of approximate equivalence; probably the first was due to Giacalone, Jou, and Smolka (1990). Segala and Turrini (2007) proposed "-lifting, equivalent to (0, ")-approximate lifting in our terminology. More recently, Desharnais, Laviolette, and Tracol (2008) and Tracol, Desharnais, and Zhioua (2011) investigated approximate notions of probabilistic simulation and bisimulation, again similar to our (0, δ)-approximate liftings. Desharnais et al. (2008) noted the connection between their approximate liftings and maximum flows in a graph, extending the connection by Desharnais (1999, Theorem 7.3.4) for exact liftings; we use a similar observation to prove our approximate version of Strassen’s theorem. Chapter 6 Emerging directions While we have limited this thesis to core connections between probabilistic couplings and program logics, several lines of work—recently completed or currently in progress—have already leveraged our results. We briefly survey these extensions (Section 6.1), and then discuss promising technical directions for further investigation (Section 6.2). We conclude by considering possible future connections between the theory of formal verification and the theory of randomized algorithms (Section 6.3). 6.1 Concurrent developments Couplings for non-relational properties: Independence and uniformity As we have seen, couplings are a natural fit for probabilistic relational properties. Properties describing a single program can also be viewed relationally in some cases, enabling cleaner proofs by coupling. Barthe, Espitau, Grégoire, Hsu, and Strub (2017b) develop this idea to prove uniformity, probabilistic independence, and conditional independence, examples of probabilistic non-relational properties. We briefly sketch their main reductions. A uniform distribution places equal probability on every value in some range. Given a distribution µ over State and an expression e with finite range S (say, the booleans), e is uniform in µ if for all a and a0 in S , we have Pr [¹eºm = a] = Pr [¹eºm = a0 ]. m∼µ m∼µ When µ is the output distribution of a program c, uniformity follows from the PRHL judgment ∀a, a0 ∈ S , ` c ∼ c : (=) =⇒ e〈1〉 = a ↔ e〈2〉 = a0 . This reduction is a direct consequence of Proposition 2.1.12. Moreover, the resulting judgment is ideally suited to relational verification since it relates two copies of the same program c. Handling independence is only a bit more involved. Given a distribution µ and expressions e, e0 with ranges S and S 0 , we say e and e0 are probabilistically independent if for all a ∈ S and a0 ∈ S 0 , we have Pr [¹eºm = a ∧ ¹e0 ºm = a0 ] = Pr [¹eºm = a] · Pr [¹e0 ºm = a0 ]. m∼µ m∼µ m∼µ This useful property roughly implies that properties involving e and e0 can be analyzed by focusing on e and e0 separately. When e and e0 are uniformly distributed, independence follows from uniformity of the tuple (e, e0 ) over the product set S × S 0 so the previous reduction applies. In general, we can compare the distributions of e and e0 in two experiments: when both are drawn from the output distribution of a single execution, and when they are 109 CHAPTER 6. EMERGING DIRECTIONS 110 drawn from two independent executions composed sequentially. If the expressions are independent, these two experiments should look the same. Concretely, independence follows from the relational judgment ∀a ∈ S , a0 ∈ S 0 , ` c ∼ c (1) ; c (2) : Φ =⇒ e〈1〉 = a ∧ e0 〈1〉 = a0 ↔ e(1) 〈2〉 = a ∧ e0 (2) 〈2〉 = a0 , where c (1) and c (2) are copies of c with variables x renamed to x (1) and x (2) respectively; this construction is also called self-composition since it sequentially composes c with itself (Barthe et al., 2011b). The pre-condition Φ states that the three copies of each variable are initially equal: x〈1〉 = x (1) 〈2〉 = x (2) 〈2〉. Handling conditional independence requires a slightly more complex encoding, but the general pattern remains the same: encode products of probabilities by self-composition and equalities by lifted equivalence (↔)] . These reductions give a simple method to prove uniformity and independence. Other non-relational properties could benefit from a similar approach, especially in conjunction with more sophisticated program transformations in PRHL to relate different copies of the same sampling instruction. Variable approximate couplings As we saw in Chapters 4 and 5, approximate couplings are a powerful tool for proving differential privacy. To further enhance the proof technique, we can consider more precise ways of reasoning about the " and δ parameters. To keep things simple, APRHL opts for the most straightforward approach: " and δ are constants or logical variables, independent of the program state. This choice is reflected in the form and interpretation of the judgments: c1 ∼(",δ) c2 : Φ =⇒ Ψ, where " and δ are treated as as mathematical constants. This approach supports clean composition—we can simply add up " and δ parameters without regard to which variables are changed by the program—but it can be more convenient to think of " and δ as depending on the current state. For example, we may want to assert " ≤ n for a program variable n, representing some kind of counter. However, it is not immediately clear what a state-dependent privacy parameter should mean, especially when the state is randomized. To give a suitable interpretation, we can look to the notion of a privacy loss random variable from the privacy literature. Roughly, the privacy parameter " may be viewed as a function mapping outputs to costs: Pr [x = ξ] ≤ exp("(ξ)) · Pr [x = ξ] x∼µ1 x∼µ2 for every ξ in the support of µ1 and µ2 . Then, µ1 induces a distribution " ] (µ1 ) over privacy costs. If every cost in the support of this distribution is bounded by a constant "0 , the output distributions µ1 , µ2 satisfy the condition required for "0 -differential privacy. (See the textbook by Dwork and Roth (2014) for a more thorough exposition.) Albarghouthi and Hsu (2018) take inspiration from this idea and define an extension of approximate couplings called variable approximate couplings. Unlike approximate couplings, which require a distance bound between witnesses that is constant in " over all pairs of samples, a variable approximate couplings allows " to vary: ∀(a1 , a2 ) ∈ A1 × A2 , µ L (a1 , a2 ) ≤ exp("(a1 , a2 )) · µR (a1 , a2 ) where " : A1 × A2 → R is now a function. The result is a refinement of (", 0)-approximate coupling supporting a more precise, randomized notion of privacy cost. We can broadly compare reasoning in terms of variable approximate couplings with reasoning in terms of approximate couplings (e.g., using a system like APRHL). The main difficulty with variable approximate couplings is analyzing sequential composition: now that each coupling has multiple costs associated with different samples, the cost after composing couplings may become quite complicated—we can’t simply add the costs together. Furthermore, it isn’t clear how to handle the additive parameter δ for proving (", δ)-privacy. At the same time, variable approximate couplings allow intuitive reasoning closer to the cost-based interpretation of privacy, where CHAPTER 6. EMERGING DIRECTIONS 111 the privacy level " is regarded as a dynamic, possibly randomized quantity that accumulates as the program executes. Rather than bounding the cost by a constant at each stage of composition, we only need to bound the cost at the end of the computation; this flexibility can support significantly simpler proofs. Albarghouthi and Hsu (2018) use these richer couplings to support fully automated proofs of (", 0)-differential privacy for challenging examples, including the Report-noisy-max and Sparse Vector mechanisms we saw in Chapter 4. Roughly speaking, they encode valid approximate coupling proofs with standard Horn clauses and a new kind of coupling constraint, and then solve the constraint systems with automated program verification and synthesis techniques. Variable approximate couplings simplify their proofs in two ways. First, by allow the privacy cost to be randomized during the analysis, there is no need to separate deterministic and randomized parts of the state. Second, their proofs can leverage more sophisticated approximate couplings like the variable version of the choice coupling from Section 4.8, making their invariants easier to discover automatically. Expectation couplings Probabilistic couplings and approximate couplings relate distributions over plain sets with no additional structure. Many sets come with a notion of distance, like the Euclidean distance on real vectors or the Hamming distance on finite sets. If d : A × A → R+ is a distance function on a set A, the Kantorovich distance on distributions Distr(A) is defined as d] (µ1 , µ2 ) ¬ min E [d(a1 , a2 )], µ∈Ω(µ1 ,µ2 ) (a1 ,a2 )∼µ where the minimum is taken over all couplings µ of (µ1 , µ2 ). This is a well-studied notion in probability theory and the theory of optimal transport, increasingly seeing applications in computer science and beyond (e.g., Desharnais, Gupta, Jagadeesan, and Panangaden (2004); van Breugel and Worrell (2001a,b) consider logical aspects, Deng and Du (2009) survey applications in computer science, and Villani (2008) explores the mathematical theory). Intuitively, the Kantorovich distance lifts a distance d on the ground set to a distance d] on distributions, much like how probabilistic liftings lift a relation R on the ground set to a relation R] on distributions. Varying the ground distance recovers common distances on distributions as special cases. Barthe, Espitau, Grégoire, Hsu, and Strub (2018) use the Kantorovich distance to define expectation coupling, a quantitative extension of probabilistic coupling. Given two distributions µ1 and µ2 on a set A equipped with a distance d, a coupling µ is a (d, δ)-expectation coupling if the expected value of d on µ is at most δ. To construct and reason about these couplings, Barthe et al. (2018) develop a relational program logic EPRHL by augmenting the pre- and post-conditions in PRHL judgments with pre- and post-distances: c1 ∼ f c2 : {Φ; d} =⇒ {Ψ; d0 }. The function f : R → R describes how the lifted post-distance can be bounded as a function of the pre-distance. Judgments are valid when for any two input memories (m1 , m2 ) satisfying the pre-condition Φ, there is an (d0 , f (d(m1 , m2 )))-expectation coupling of the two output distributions with support in Ψ. Intuitively, valid judgments model Lipschitz-continuity or sensitivity, where the distance on input memories is d and the distance on output distributions is the Kantorovich distance d0] . EPRHL judgments can be combined in various ways, reflecting the clean compositional properties of expectation couplings. For instance, when f is a non-decreasing affine function (i.e., f (z) = α · z + β with α, β ≥ 0), judgments compose sequentially: SEQ ` c1 ∼ f c2 : {Φ; d} =⇒ {Ψ; d0 } ` c10 ∼ f 0 c20 : {Ψ; d0 } =⇒ {Θ; d00 } ` c1 ; c10 ∼ f 0 ◦ f c2 ; c20 : {Φ; d} =⇒ {Θ; d00 } The transitivity rule, which combines two judgments relating c1 ∼ c2 and c2 ∼ c3 into a judgment relating c1 ∼ c3 , fully internalizes the path coupling principle (Bubley and Dyer, 1997) we saw in Chapter 3. CHAPTER 6. EMERGING DIRECTIONS 112 EPRHL is particularly useful for proving quantitative relational properties. In PRHL, as we noted in Section 2.3, there is no way to reason about the probability of an event in the coupling. Our logic ×PRHL from Chapter 3 makes the coupling more explicit, but the logic can only construct the product program, not reason about it. In contrast, EPRHL judgments can directly express quantitative properties of the coupling with the pre- and post-distances. To demonstrate, Barthe et al. (2018) use EPRHL to verify convergence for a Markov chain from population dynamics, and for the Glauber dynamics. In contrast to our proof from Section 3.6, which required reasoning about the product program and applying path coupling externally, the EPRHL proof can be carried out almost entirely within the logic. Adding to the properties that can be handled, EPRHL can also verify that the Stochastic Gradient Descent algorithm is uniformly stable, a quantitative property comparing a learning algorithm’s expected error on two training sets (Bousquet and Elisseeff, 2002); this recently-proposed property is rapidly gaining currency in the machine learning community as a way to prevent overfitting (Hardt, Recht, and Singer, 2016). Couplings in the continuous case To simplify our presentation, in this thesis we have focused on discrete distributions. However, programs sampling from continuous distributions are quite common in the algorithms literature; many private algorithms, for instance, use samples from real-valued distributions like the Gaussian distribution and the standard Laplace distribution. Though most of our results should carry over, the continuous case introduces additional measure-theoretic technicalities. Designing a verification system supporting continuous distributions—say, a program logic where programs can sample from the Gaussian distribution—requires carefully handling these details. While research historically evolved from exact liftings in PRHL to approximate liftings in APRHL, current work on the continuous case has jumped directly to approximate liftings. As we discussed in Section 5.1, Sato (2016) introduced a novel definition of approximate lifting without witness distributions in the continuous case, developing a continuous version of APRHL. Sato derived his approximate lifting using a categorical construction called codensity lifting of monads (also called >>-lifting), proposed by Katsumata and Sato (2015). Roughly speaking, this operation turns a monad on a base category D into a (possibly indexed or graded) monad on another category C, along a functor C → D. This approach gives a highly generic way to lift monads to new categories, abstracting away many details about the specific categories. Codensity lifting also gives a more principled construction in some sense, as the lifting satisfies certain universal properties. However, the high level of abstraction can make it difficult to construct and manipulate these liftings; the current, clean form of Sato’s lifting is followed significant simplifications after applying codensity lifting. More recent work generalizes witness-based approximate liftings to the continuous case, giving an alternative, more flexible construction of approximate liftings that is easier to work with. Sato, Barthe, Gaboradi, Hsu, and Katsumata (2017) introduce span-based liftings, generalizing binary relations to categorical spans and supporting a broad class of divergences beyond "-distance with good composition properties. Roughly speaking, maps between spans carry additional information needed for smooth composition in the continuous case. Sato and his collaborators develop span-based liftings and a relational program logic to verify differential privacy and various relaxations, including Rényi differential privacy (Mironov, 2017) and zero-concentrated differential privacy (Bun and Steinke, 2016). When specialized to "-distance, span-based liftings are equivalent to Sato’s witness-free liftings, giving an approximate version of Strassen’s theorem in the continuous case.1 6.2 Promising directions We envision further investigation along three broad axes: extending the theory, exploring new applications, and automating the proof technique. 1 Tetsuya Sato, personal communication. CHAPTER 6. EMERGING DIRECTIONS 113 Theoretical directions While the theory of probabilistic couplings has been well-developed in mathematics, our work suggests several natural directions for further theoretical study. Defining approximate couplings. Our definition of approximate lifting satisfies many clean theoretical properties, but it is not yet clear whether we have arrived at the right definition. More evidence is needed, possibly in the form of other natural properties satisfied by approximate liftings, equivalences with other well-established notions, or logical and categorical characterizations of approximate coupling; analogous results for probabilistic liftings may provide a useful guide (Desharnais et al., 2002, 2003; Fijalkow et al., 2017; Larsen and Skou, 1991). Furthermore, Barthe and Olmedo (2013) and Olmedo (2014) consider approximate liftings where the differential privacy distance d" (µ1 , µ2 ) is generalized to any f -divergence, a broader class of distance-like measures between distributions. While it is straightforward to adapt our approximate liftings to f -divergences, there is currently little evidence this yields a good definition; for instance, a universal version of approximate lifting (similar to Sato’s definition) for f -divergences is not known. Completeness of the proof systems. While the proof systems of ×PRHL and APRHL are sound, we did not establish completeness: valid judgments should be provable by applying the rules. Much like standard Hoare logic, the best we can hope for is relative completeness. Assuming an oracle for formulas in the assertion logic, can the proof system prove all valid judgments? On this fundamental question, very little is known. For ×PRHL, relative completeness of standard Hoare logic combined with some basic program transformations give relative completeness for terminating, deterministic programs. However, the rules for random sampling are likely to be highly incomplete; for instance, there are many couplings beyond bijection couplings. Furthermore, there may be more fundamental obstacles to relative completeness: Kumar and Ramesh (2001) give an example of a Markov chain that is rapidly mixing but where no causal coupling can establish this fact; all couplings encoded by ×PRHL are causal couplings. This negative result doesn’t directly rule out relative completeness since rapid mixing is not expressible in the logic, but it does suggest that the underlying coupling proof technique may be incomplete. The situation is similar for APRHL. Our privacy proofs often use program transformations to compensate for the incompleteness of the loop rules; these transformations could potentially be avoided given more advanced loop rules or richer reasoning about the privacy parameters " and δ. However, it is not clear what role the various structural rules (e.g., [PW-EQ]) should play when proving completeness. Enhancing our proof systems and identifying complete fragments for randomized programs—or even more fundamentally, coming up with sensible notions of completeness for coupling proofs—are intriguing and challenging directions for future theoretical work. Connecting back to probabilistic bisimulation. Probabilistic liftings were first developed in the context of probabilistic bisimulation (Larsen and Skou, 1991); it would be interesting to revisit this rich theory in light of our connections. Approximate couplings, which support a multiplicative notion of approximation, appear to be new to the probabilistic bisimulation literature. New applications The examples we have seen are drawn from classical coupling proofs in mathematics. While these case studies concisely demonstrate various advanced features of the proof technique, they are perhaps less well-motivated from the perspective of program verification. However, now that formal verification can leverage couplings, we can search for applications to typical verification properties. At the same time, there remains plenty of room to push the limits of coupling proofs on more theoretical examples, especially using approximate couplings. For example, we only applied approximate couplings for CHAPTER 6. EMERGING DIRECTIONS 114 proving (", δ)-differential privacy; variants of approximate couplings for reasoning about f -divergences, like KL-divergence, Hellinger distance, and χ 2 divergence, currently lack concrete applications. Other natural targets include relaxations of differential privacy like random differential privacy (RDP) (Hall, Wasserman, and Rinaldo, 2013). For exact couplings, advanced constructions like coupling from the past (Propp and Wilson, 1996) and variable length path couplings (Hayes and Vigoda, 2007) may suggest interesting ways to enrich relational reasoning. We expect theoretically sophisticated examples will guide the development of formal verification for probabilistic relational properties. Proof automation Throughout, we have presented program logic proofs on paper. Such proofs can be formalized in existing prototype implementations of PRHL and APRHL in the EASYCRYPT system (Barthe et al., 2013b), an interactive proof assistant. To make the proof technique more practical, however, more investigation is needed into automating coupling proofs. By eliminating much of the probabilistic reasoning, which pose significant challenges for automated solvers today, coupling proofs may enable automated proofs for programs and properties where even manual, interactive proofs would previously have been quite challenging. Realizing these gains in practice is a natural direction for further investigation. 6.3 Bridging two theories This thesis represents a confluence of ideas from two theories: coupling proofs from the theory of algorithms, and program logics from the theory of formal verification. While mathematical rigor is a hallmark of both areas, the two fields currently proceed on separate tracks. The theory of algorithms and complexity investigates quantitative aspects of computation, like running time, space usage, and degree of approximation, while the theory of semantics and formal verification explores the compositional structure of programs and how to reason about them. That there should be two distinct theoretical branches is perhaps unsurprising; in many ways, the situation mirrors traditional divisions between analysis and algebra in mathematics. However, what is more surprising is the wide gulf between the two communities today. In many parts of the world, for instance, semantics and verification don’t fall under the umbrella term Theoretical Computer Science (TCS). Our results give a glimpse of the fruitful terrain that lies in between, and the potential gains in applying perspectives and tools from both worlds. Formal verification stands to benefit from understanding how humans reason about algorithms, while algorithms and complexity theory could achieve simpler proofs by generalizing properties and focusing on composition. The time is ripe to bring these theories back into contact, and to see where the conversation leads. Appendix A Soundness of ×PRHL We prove soundness of the logic ×PRHL presented in Chapter 3, consisting of the logical rules in Figs. 3.1 to 3.3 and the asynchronous loop rule in Fig. 3.4. We will need a pair of technical lemmas. First, distribution bind commutes with projections. Lemma A.1.1. Let i ∈ {1, 2}. Given µ ∈ SDistr(A1 × A2 ) and f : A1 × A2 → SDistr(B1 × B2 ), suppose g i : Ai → SDistr(Bi ) is such that for all (a1 , a2 ) ∈ supp(µ), we have πi ( f (a1 , a2 )) ≤ g i (ai ). Then πi (bind(µ, f )) ≤ bind(πi (µ), g i ). Similarly, if for all (a1 , a2 ) ∈ supp(µ) we have πi ( f (a1 , a2 )) ≥ g i (ai ), then πi (bind(µ, f )) ≥ bind(πi (µ), g i ). Proof. We consider the ≤ case with i = 1; the case i = 2 and the ≥ cases are similar. Let η ¬ π1 (bind(µ, f )). For any element h ∈ B1 , X X η(h) = µ(r, s) · f (r, s)(h, t) t∈B2 (r,s)∈A1 ×A2 = ≤ X µ(r, s) X f (r, s)(h, t) (r,s)∈supp(µ) t∈B2 X µ(r, s) · g1 (r)(h) (r,s)∈supp(µ) = X µ(r, s) · g1 (r)(h) (r,s)∈A1 ×A2 = X π1 (µ)(r) · g1 (r)(h) r∈A1 = bind(π1 (µ), g1 )(h). Second, projections commute with monotone limits. Lemma A.1.2. Let {µ(i) }i be a monotonically increasing sequence in SDistr(A1 × A2 ) converging to a sub-distribution µ. Then projections commute with limits:    π j lim µ(i) = lim π j µ(i) i→∞ i→∞ for j ∈ {1, 2}, and all limits exist. 115 APPENDIX A. SOUNDNESS OF ×PRHL 116 Proof. By unfolding definitions and applying the monotone convergence theorem, taking the discrete (counting) measure over State (see, e.g., Rudin (1976, Theorem 11.28)). Now we can show soundness of ×PRHL. Theorem 3.3.1 (Soundness of ×PRHL). Let ρ be a logical context. If a judgment is derivable § ª § ª c1 ρ` Φ Ψ É c× , c2 then it is valid: § ª § ª c1 ρ |= Φ Ψ É c× . c2 Proof. By induction on the height of the proof derivation. In the base case the derivation consists of a single rule with no ×PRHL premises; this rule must be one of the axiom rules: [SKIP], [ASSN], [SAMPLE], or the one-sided variants. In the inductive case, the derivation ends in one of the other rules. By performing a case analysis on the last rule in the derivation, we handle the base and inductive cases together. We consider the two-sided rules first (Fig. 3.1), followed by the one-sided rules (Fig. 3.2), the structural rules (Fig. 3.3), and finally the asynchronous loop rule (Fig. 3.4). Given soundness for the premises, we show the product program in the conclusion satisfies the support condition and the marginal conditions in Definition 3.1.1. In all cases let m1 , m2 be two memories that satisfy the pre-condition of the conclusion, let µ× be the output distribution of the product program with input (m1 , m2 ), and let µ1 ¬ π1 (µ× ) and µ2 ¬ π2 (µ× ) be the two projections of the output distribution. We will leave the logical context ρ implicit when taking the semantics ¹−º; the logical variables play no role in the proof. For the loop rules, recall from Fig. 2.1 that the semantics of a loop while e do c on initial memory m is defined as the limit of its finite approximants:  : i = 0 ∧ ¹eºm = true ⊥ µ(i) (m) ¬ unit(m) : i = 0 ∧ ¹eºm = false  (i−1) bind(¹if e then cºm, µ ) : i > 0. Case [SKIP] Trivial. Case [ASSN] The support condition is clear since all program variables in e1 〈1〉, e2 〈2〉 are tagged with 〈1〉, 〈2〉 respectively. The marginal conditions are clear as well: given any two input memories satisfying the precondition, the two output memories from c1 and c2 are point distributions where x 1 is updated to e1 and x 2 is updated to e2 . Case [SAMPLE] The support of µ× lies in {(m01 , m02 ) | ∃v, m01 (x 1 ) = v ∧ m02 (x 2 ) = f (v)}. Since all output memories (m01 , m02 ) in the support are equal to the input memories (m1 , m2 ) on all variables besides x 1 and x 2 , the support condition is clear. Now recall that all primitive distributions d1 , d2 are uniform over finite sets. Hence supp(d1 ) and supp(d2 ) are finite, and since there is a bijection f : supp(d1 ) → supp(d2 ), the supports have the same size n. For every v ∈ supp(d1 ), we have µ1 (m1 [x 1 7→ v]) = 1/n APPENDIX A. SOUNDNESS OF ×PRHL 117 and µ1 (m0 ) = 0 otherwise. By the semantics of the sampling command, µ1 = ¹c1 ºm1 so the first marginal condition is satisfied. Since f is injective, for every v ∈ supp(d1 ) we have µ2 (m2 [x 2 7→ f (v)]) = 1/n. and µ2 (m0 ) = 0 otherwise. Since f is surjective, for every v ∈ supp(d2 ) we have µ2 (m2 [x 2 7→ v]) = 1/n, giving µ2 = ¹c2 ºm2 and the second marginal condition. Case [SEQ] Let the product programs in the premises be c× and c×0 . By induction, these product programs satisfy the support and marginal conditions for their respective judgments. To establish the conclusion, the support condition is clear: by induction, the support of ¹c× º(m1 , m2 ) lies in ¹Ψº and for any (m01 , m2 )0 ∈ ¹Ψº, the support of ¹c×0 º(m01 , m02 ) lies in ¹Θº. It remains to show the marginal conditions. For i ∈ {1, 2}, µi = πi (¹c× ; c×0 º(m1 , m2 )) = πi (bind(¹c× º(m1 , m2 ), ¹c×0 º)) = = = (semantics) bind(πi (¹c× º(m1 , m2 )), ¹ci0 º) bind(¹ci ºmi , ¹ci0 º) ¹ci ; ci0 ºmi . (Lemma A.1.1 and induction) (induction) (semantics) Case [COND] Let c× , c×0 be the two product programs for the two premises. There are two cases: either e1 is true in the first initial memory m1 , or not. (Since (m1 , m2 ) satisfy the pre-condition Φ, these two cases correspond to e2 being true and false in the second initial memory m2 .) Suppose e1 is true in m1 . Then e1 〈1〉 is true in (m1 , m2 ) and the product program is equivalent to simply executing c× on (m1 , m2 ). Since the two initial memories (m1 , m2 ) satisfy Φ, by induction on the first premise, the support of the product program lies in ¹Ψº and the marginals satisfy µ1 = π1 (¹c1 ºm1 ) and µ2 = π2 (¹c2 ºm2 ). Since e1 〈1〉 and e2 〈2〉 are both true in (m1 , m2 ), we also have µ1 = π1 (¹if e1 then c1 else c10 ºm1 ) and µ2 = π2 (¹if e2 then c2 else c20 ºm2 ). Hence, both the marginal and support conditions hold when e1 is true in m1 . The other case, where e1 〈1〉 and e2 〈2〉 are false in (m1 , m2 ), follows by the second premise. Case [WHILE] Let the product program in the conclusion be while e1 〈1〉 do c× and let µ(i) (m1 , m2 ) be its i-th (i) (i) approximants. Define µ1 ¬ π1 ◦µ(i) , µ2 ¬ π2 ◦µ(i) to be the first and second marginals of the approximants, (i) (i) and η1 , η2 to be the i-th approximants of the loops while e1 do c1 and while e2 do c2 , respectively. Let’s consider the support condition first. We prove if (m1 , m2 ) satisfies Φ, then µ(i) (m1 , m2 ) has support contained in ¹Φ ∧ ¬e1 〈1〉º for every i by induction. The base case i = 0 is clear. For the inductive step i > 0 there are two cases. If e1 〈1〉 is false in (m1 , m2 ), then µ(i) (m1 , m2 ) = unit(m1 , m2 ). Otherwise if e1 〈1〉 is true, then µ(i) (m1 , m2 ) = bind(¹c× º(m1 , m2 ), µ(i−1) ). APPENDIX A. SOUNDNESS OF ×PRHL 118 By the outer induction hypothesis applied to the premise, the support of ¹c× º(m1 , m2 ) lies in ¹Φ ∧ ¬e1 〈1〉º. The inner induction hypothesis applied to µ(i−1) shows µ(i) (m1 , m2 ) also has support in ¹Φ ∧ ¬e1 〈1〉º, completing the inner induction. Since this holds for all i, the limit sub-distribution lim µ(i) (m1 , m2 ) = ¹while e1 〈1〉 do c× º(m1 , m2 ) i→∞ also has support in ¹Φ ∧ ¬e1 〈1〉º as desired. Next, we turn to the marginal conditions. We first show the projections of the approximants of the product program are equal to the approximants for the individual programs, concluding the marginal conditions in the (i) limit. Let (m1 , m2 ) be memories satisfying Φ. We claim π1 (µ(i) (m1 , m2 )) = η1 (m1 ) and π2 (µ(i) (m1 , m2 )) = (i) η2 (m2 ) for every i. The claim follows by induction on i. The base case i = 0 is immediate—since (m1 , m2 ) satisfy Φ, either e1 〈1〉 = e2 〈2〉 = true or e1 〈1〉 = e2 〈2〉 = false. The inductive step i > 0 is more interesting. Unrolling the approximants one step, we have µ(i) (m1 , m2 ) = bind(¹if e1 〈1〉 then c× º(m1 , m2 ), µ(i−1) ) (i) (i−1) ) (i) (i−1) ). η1 (m1 ) = bind(¹if e1 then c1 ºm1 , η1 η2 (m2 ) = bind(¹if e2 then c2 ºm2 , η2 If e1 〈1〉 is false in (m1 , m2 ), then all three conditionals are equivalent to skip so µ(i) = µ(i−1) (i) (i−1) η1 = η1 and (i) (i−1) η2 = η2 and ; we conclude by the inductive hypothesis. Otherwise, e1 〈1〉 and e2 〈2〉 are true in (m1 , m2 ) so the same branch is taken in all three approximants: µ(i) (m1 , m2 ) = bind(¹c× º(m1 , m2 ), µ(i−1) ) (i) (i−1) η1 (m1 ) = bind(¹c1 ºm1 , η1 (i) η2 (m2 ) = ) (i−1) bind(¹c2 ºm2 , η2 ). By the outer induction hypothesis on the premise of the rule (noting that e1 is true in m1 ), π1 (¹c× º(m1 , m2 )) = ¹c1 ºm1 π2 (¹c× º(m1 , m2 )) = ¹c2 ºm2 . and (i−1) (i−1) By the inner induction hypothesis, µ(i−1) (m1 , m2 ) has projections η1 (m1 ) and η2 (m2 ), so Lemma A.1.1 gives (i) (i) π1 (µ(i) (m1 , m2 )) = η1 (m1 ) and π2 (µ(i) (m1 , m2 )) = η2 (m2 ) for every i. Taking the limit as i tends to ∞, we have the marginal conditions (i) ¹while e j do c j º(m j ) ¬ lim η j (m j ) i→∞ = lim π j (µ(i) (m j )) i→∞   = π j lim µ(i) (m j ) i→∞ ¬ π j (¹while e1 〈1〉 do c× º(m1 , m2 )) for j = {1, 2}. (We may interchange marginals and limits by Lemma A.1.2 since {µ(i) (m j )}i is monotonically increasing by definition.) APPENDIX A. SOUNDNESS OF ×PRHL 119 Case [ASSN-L] ([ASSN-R] similar) Trivial. Case [SAMPLE-L] ([SAMPLE-R] similar) Let d1 have support with size n. The support condition is clear. For the marginal condition, note µ× (m1 [x 1 7→ v], m2 ) = 1/n for every v ∈ supp(d1 ), and zero otherwise. Hence, µ1 (m1 ([x 1 7→ v]) = 1/n for every v ∈ supp(d1 ), and zero otherwise, while µ2 is the point distribution at m2 . The semantics of $ d and skip gives the marginal conditions. x1 ← 1 Case [COND -L] ([COND -R] similar) There are two cases: either e1 〈1〉 is true in (m1 , m2 ), or not. On input (m1 , m2 ), the product program has the same semantics as c and c 0 in the respective cases, hence the support condition follows by induction using the support condition in the first and second premises respectively. The marginal conditions are similar. If e1 〈1〉 is true in (m1 , m2 ), then the product program has the same semantics as c, and the first program if e1 then c1 else c10 has the same semantics as c1 . Hence, the marginal conditions follow by induction using the marginal condition from the first premise. In the other case, e1 〈1〉 is false in (m1 , m2 ) and the product program has the same semantics as c 0 , and on m1 the first program if e1 then c1 else c10 has the same semantics as c10 . Hence, the marginal conditions follow by induction using the marginal condition from the second premise. Case [WHILE-L] ([WHILE-R] similar) Let the final product program be while e1 〈1〉 do c× with i-th approximants (i) (i) µ(i) (m1 , m2 ). Define µ1 ¬ π1 ◦ µ(i) , µ2 ¬ π2 ◦ µ(i) to be the first and second marginals of the approximants, and η(i) to be the i-th approximants of the loop while e1 do c1 . For the support condition, we show if (m1 , m2 ) satisfies Φ then µ(i) (m1 , m2 ) has support contained in ¹Φ ∧ ¬e1 〈1〉º for every i by induction on i. The base case i = 0 is clear. For the inductive step i > 0, there are two cases. If e1 〈1〉 is false in (m1 , m2 ), then µ(i) (m1 , m2 ) = unit(m1 , m2 ) and we are done. Otherwise if e1 〈1〉 is true, then µ(i) (m1 , m2 ) = bind(¹c× º(m1 , m2 ), µ(i−1) ). By the outer induction hypothesis applied to the premise, the support of ¹c× º(m1 , m2 ) lies in ¹Φ∧¬e1 〈1〉º. The inner induction hypothesis applied to µ(i−1) implies µ(i) (m1 , m2 ) also has support contained in ¹Φ ∧ ¬e1 〈1〉º, completing the inner induction. Since this is true for all i, the limit sub-distribution lim µ(i) (m1 , m2 ) = ¹while e1 〈1〉 do c× º(m1 , m2 ) i→∞ also has support in ¹Φ ∧ ¬e1 〈1〉º as desired. Now we turn to the marginal conditions. We show the projections of the approximant of the product program are equal to the approximants for the individual programs, concluding the marginal conditions in the limit. (i) Let (m1 , m2 ) be any memories satisfying Φ. We claim π1 (µ(i) (m1 , m2 )) = η1 (m1 ) and π2 (µ(i) (m1 , m2 )) is a point sub-distribution with all mass on m2 , for every i. The claim follows by induction on i. The base case i = 0 is clear—e1 〈1〉 is either true or false. If e1 〈1〉 is (i) true, µ(i) = unit(m1 , m2 ), η1 = unit(m1 ), and π2 (µ(i) ) = unit(m2 ). If e1 〈1〉 is false, then all approximants are the zero sub-distribution ⊥. The inductive step i > 0 is more interesting. Unrolling the approximants one step, we have µ(i) (m1 , m2 ) = bind(¹if e1 〈1〉 then c× º(m1 , m2 ), µ(i−1) ) APPENDIX A. SOUNDNESS OF ×PRHL 120 (i) (i−1) η1 (m1 ) = bind(¹if e1 then c1 ºm1 , η1 ). If e1 〈1〉 is false in (m1 , m2 ), then both conditionals are equivalent to skip. Hence µ(i) = µ(i−1) and (i) (i−1) η1 = η1 , and we conclude by the induction on i. Otherwise, e1 〈1〉 is true in (m1 , m2 ). In this case, the conditional branch is taken in both programs, so µ(i) (m1 , m2 ) = bind(¹c× º(m1 , m2 ), µ(i−1) ) (i) (i−1) η1 (m1 ) = bind(¹c1 ºm1 , η1 ). By the outer induction hypothesis on the premise of the rule (noting that e1 〈1〉 is true), π1 (¹c× º(m1 , m2 )) = ¹c1 ºm1 π2 (¹c× º(m1 , m2 )) = ¹skipºm2 = unit(m2 ). (i−1) The inner induction hypothesis shows the first marginal of µ(i−1) (m1 , m2 ) is η1 (m1 ); Lemma A.1.1 estab(i) lishes π1 (µ(i) (m1 , m2 )) = η1 (m1 ). Similarly, by the inner induction hypothesis showing the second marginal (i−1) of µ (m1 , m2 ) is a point mass at m2 , we establish the same for the second marginal of µ(i) (m1 , m2 ). Furthermore, since the weight of a sub-distribution is preserved under projections, we also know π2 (µ(i) (m1 , m2 )) is a point sub-distribution at m2 with weight |µ(i) (m1 , m2 )|. Now we take limits to obtain the first marginal condition:   (i) η1 (m1 ) = lim η1 (m j ) = lim π1 (µ(i) (m1 , m2 )) = π1 lim µ(i) (m1 , m2 ) = π1 (µ× ), i→∞ i→∞ i→∞ interchanging limits and projections by Lemma A.1.2, since {µ(i) (m1 , m2 )}i is monotonically increasing. For the second marginal we have π2 (µ× ) = unit(m2 ) · |µ× |. By the premise, the loop while e1 do c1 is lossless. Hence, 1 = |η1 (m1 )| = |µ× | and the second projection of µ× is simply unit(m2 ) = ¹skipºm2 as claimed. Case [CONSEQ] Trivial. Case [EQUIV] Trivial. Case [CASE] By case analysis on whether e is true in (m1 , m2 ), using essentially the same reasoning as in [CASE], [COND -L], or [COND -R]. Case [FRAME] The marginal conditions are clear by induction. Let V be the set of variables that are not in MV(c). Since Θ has free variables in V , we can interpret Θ as a predicate on memories restricted to V . Then initially (m1 [V ], m2 [V ]) ∈ ¹Θº. Since c does not modify variables in V , the support of µ× is contained in {(m01 , m02 ) | m01 [V ] = m1 [V ] ∧ m02 [V ] = m2 [V ]} ⊆ ¹Θº. Hence the support condition is satisfied as well. APPENDIX A. SOUNDNESS OF ×PRHL 121 Case [WHILE-GEN] We label the premises for easy reference: |= Φ → (e1 〈1〉 ∨ e2 〈2〉) = e (A.1) |= Φ ∧ e → p0 ⊕ p1 ⊕ p2 (A.2) |= Φ ∧ p0 ∧ e → e1 〈1〉 = e2 〈2〉 (A.3) |= Φ ∧ p1 ∧ e → e1 〈1〉 ∧ Φ1 〈1〉 (A.4) |= Φ ∧ p2 ∧ e → e2 〈2〉 ∧ Φ2 〈2〉 (A.5) Φ1 |= while e1 ∧ p1 do c1 lossless (A.6) Φ2 |= while e2 ∧ p2 do c2 lossless ª § ª § (if e1 then c1 )K1 Φ É c00 ` Φ ∧ e ∧ p0 (if e2 then c2 )K2 § ª § ª c1 ` Φ ∧ e1 ∧ p1 Φ É c10 skip ª § ª § skip Φ É c20 ` Φ ∧ e2 ∧ p2 c2 (A.7) (A.8) (A.9) (A.10) Let θ× be the semantics of the product program in the conclusion and let θ (i) be its i-th approximants. For the support condition, we first show supp(θ (i) (a1 , a2 )) ⊆ ¹Φ ∧ ¬e1 〈1〉 ∧ ¬e2 〈2〉º for every i and (a1 , a2 ) satisfying Φ. The proof is by induction on i. The base case i = 0 is clear: if e is false in (a1 , a2 ) then θ (0) (a1 , a2 ) = unit(a1 , a2 ), otherwise if e is true then θ (0) (a1 , a2 ) = ⊥, so in both cases we have the desired support. For the inductive step i > 0, if e is false in (a1 , a2 ) then θ (i) (a1 , a2 ) = unit(a1 , a2 ) and the support condition is satisfied. Otherwise, we unfold the product program one step giving three cases:  0 (i−1) ) : ¹p0 º(a1 , a2 ) = true bind(¹c0 º(a1 , a2 ), θ (i) 0 (i−1) θ (a1 , a2 ) = bind(¹c1 º(a1 , a2 ), θ ) : ¹p1 º(a1 , a2 ) = true  bind(¹c20 º(a1 , a2 ), θ (i−1) ) : ¹p2 º(a1 , a2 ) = true. Exactly one of the three cases holds, by Eq. (A.2). By the outer induction hypothesis, the premises of the rule (Eqs. (A.8) to (A.10)) show that in the three cases, the corresponding product program c00 , c10 , c20 on input memory (a1 , a2 ) produces a sub-distribution with support in ¹Φº. Hence θ (i) (a1 , a2 ) has the desired support using the inner induction hypothesis on θ (i−1) . Passing to the limit, we conclude the support condition:   supp(θ× (m1 , m2 )) = supp lim θ (i) (m1 , m2 ) ⊆ ¹Φ ∧ ¬e1 〈1〉 ∧ ¬e2 〈2〉º. i→∞ Next, we turn to the marginal conditions. Let η1 , η2 : State → SDistr(State) be the semantics of the (i) (i) loops while e1 do c1 and while e2 do c2 , and let η1 , η2 : State → SDistr(State) be their respective i-th approximants. We show for every i and every (a1 , a2 ) satisfying the invariant Φ, we have (i) η1 (a1 ) ≤ π1 (θ× (a1 , a2 )) (i) π1 (θ (a1 , a2 )) ≤ η1 (a1 ) (i) η2 (a2 ) ≤ π2 (θ× (a1 , a2 )) (A.11) (A.12) (A.13) APPENDIX A. SOUNDNESS OF ×PRHL 122 π2 (θ (i) (a1 , a2 )) ≤ η2 (a2 ). (A.14) Taking limits as i tends to infinity will give the desired marginal conditions. We begin with Eq. (A.11) by induction on i. For the base case i = 0, if e is false in (a1 , a2 ) then both sides are equal to unit(a1 ). Otherwise, if e and e1 〈1〉 are true, then both sides are equal to ⊥. Finally, if e is true (0) and e1 〈1〉 is false, then η1 (a1 ) = unit(a1 ) by Eq. (A.1). In this case, e2 〈2〉 must be true. By Eq. (A.5), we are in case p2 and the product program executes c20 . By the marginal condition from premise Eq. (A.10), c20 preserves a1 so e1 〈1〉 remains false. Hence, θ× (a1 , a2 ) = ¹while e2 〈2〉 ∧ p2 do c20 º(a1 , a2 ). By reasoning analogous to the case [WHILE-R] with Eq. (A.7) and the outer inductive hypothesis on Eq. (A.10), we have the marginal condition (0) π1 (θ× (a1 , a2 )) = unit(a1 ) = η1 (a1 ) establishing the base case. Next, we consider the inductive case i > 0. If e is false in (a1 , a2 ), then e1 〈1〉 is false in a1 and hence (i) η1 (a1 ) = π1 (θ× (a1 , a2 )) = unit(a1 ). Otherwise, e is true and there are three subcases. Subcase for Eq. (A.11): p0 is true. If p0 is true in (a1 , a2 ), then e1 〈1〉 = e2 〈2〉 are also true by Eq. (A.3). First, suppose i = K1 . Unrolling the loops gives θ× (a1 , a2 ) = bind(¹c00 º(a1 , a2 ), θ× ) (K ) (0) η1 1 (a1 ) = bind(¹(if e1 then c1 )K1 ºa1 , η1 ). The marginal condition from the induction hypothesis on premise Eq. (A.8) gives π1 (¹c00 º(a1 , a2 )) = ¹(if e1 then c1 )K1 º(a1 ); by the support condition, supp(¹c00 º(a1 , a2 )) ⊆ ¹Φº. Furthermore, the base case for the inner induction (0) yields η1 (b1 ) ≤ π1 (θ× (b1 , b2 )) for every (b1 , b2 ) ∈ ¹Φº, so Lemma A.1.1 gives η(K1 ) (a1 ) ≤ π1 (θ× (a1 , a2 )). Now suppose i < K1 . From the previous case and monotonicity, we have (i) (K ) η1 (a1 ) ≤ η1 1 (a1 ) ≤ π1 (θ× (a1 , a2 )). With the cases i ≤ K1 covered, we turn to the remaining cases i > K1 . Unrolling the loops: θ× (a1 , a2 ) = bind(¹c00 º(a1 , a2 ), θ× ) (i−K1 ) (i) η1 (a1 ) = bind(¹(if e1 then c1 )K1 ºa1 , η1 ). The marginal condition from the induction hypothesis on premise Eq. (A.8) gives π1 (¹c00 º(a1 , a2 )) = ¹(if e1 then c1 )K1 ºa1 ; by the support condition, we have ¹c00 º(a1 , a2 ) ⊆ ¹Φº. Furthermore, by the inner inductive hypothesis (i−K1 ) for η(i−K1 ) we have η1 (b1 ) ≤ π1 (θ× (b1 , b2 )) for every (b1 , b2 ) ∈ ¹Φº, so Lemma A.1.1 shows η(i) (a1 ) ≤ π1 (θ× (a1 , a2 )) as desired. APPENDIX A. SOUNDNESS OF ×PRHL 123 Subcase for Eq. (A.11): p1 is true. If p1 is true in (a1 , a2 ), then e1 〈1〉 is also true by Eq. (A.4). Unrolling the loops: θ× (a1 , a2 ) = bind(¹c10 º(a1 , a2 ), θ× ) (i) (i−1) η1 (a1 ) = bind(¹c1 ºa1 , η1 ). The induction hypothesis on premise Eq. (A.9) gives π1 (¹c10 º(a1 , a2 )) = ¹c1 ºa1 ; by the support condition, we also have ¹c10 º(a1 , a2 ) ⊆ ¹Φº. Furthermore, by the inner induction hypothesis we have (i−1) η1 (b1 ) ≤ π1 (θ× (b1 , b2 )) for every (b1 , b2 ) ∈ ¹Φº, so Lemma A.1.1 yields η(i) (a1 ) ≤ π1 (θ× (a1 , a2 )). Subcase for Eq. (A.11): p2 is true. If p2 is true in (a1 , a2 ), then e2 〈2〉 is true by Eq. (A.5). Define η ¬ ¹while e ∧ p2 do c20 º(a1 , a2 ). We show the equivalence ¹while e ∧ p2 do c20 º(a1 , a2 ) = ¹while e2 〈2〉 ∧ p2 do c20 º(a1 , a2 ) (A.15) by taking the approximants σ(i) and τ(i) of the left and right sides and proving σ(i) (b1 , b2 ) = τ(i) (b1 , b2 ) for every (b1 , b2 ) ∈ ¹Φº. The proof is by induction on i, using supp(τ(i) )(b1 , b2 ) ⊆ ¹Φº from the support condition from premise Eq. (A.10), and |= Φ → (e ∧ p2 ↔ e2 〈2〉 ∧ p2 ) from Eqs. (A.1) and (A.5). Using the equivalence Eq. (A.15), we can transform η and show the following: supp(η) ⊆ ¹Φ ∧ ¬(e ∧ p2 )º π1 (η) = unit(a1 ) (A.16) (A.17) Both points follow by reasoning similar to the case for [WHILE-R], using premise Eq. (A.10) and the lossless condition Eq. (A.7). The first point also uses supp(η) ⊆ ¹¬(e ∧ p2 )º, by definition of η. Returning to the sub-case, if e1 〈1〉 is true, unrolling the product program gives θ× (a1 , a2 ) = bind(¹while e ∧ p2 do c20 º(a1 , a2 ), θ× ). Since the guard e ∧ p2 is false in supp(η) and e1 is true in the first initial memory a1 , Eq. (A.16) gives supp(η) ⊆ ¹Φ ∧ e1 〈1〉 ∧ ¬(e ∧ p2 )º ⊆ ¹Φ ∧ e ∧ ¬p2 º where the second inclusion is because e1 implies e (by Eq. (A.1)), so p2 must be false. By Eq. (A.2) either p0 or p1 must be true in the support of η. Using Eq. (A.17) to show η(r1 , r2 ) > 0 only when r1 = a1 , we compute: ! X π1 (θ× (a1 , a2 )) = π1 η(r1 , r2 ) · θ× (r1 , r2 ) (r1 ,r2 )∈¹Φ∧e∧¬p2 º APPENDIX A. SOUNDNESS OF ×PRHL 124 ! X = π1 η(a1 , r2 ) · θ× (a1 , r2 ) r2 :(a1 ,r2 )∈¹Φ∧e∧¬p2 º X = η(a1 , r2 ) · π1 (θ× (a1 , r2 )) r2 :(a1 ,r2 )∈¹Φ∧e∧¬p2 º X = η(a1 , r2 ) · π1 (θ× (a1 , r2 )) r2 :(a1 ,r2 )∈¹Φ∧e∧p0 º X + η(a1 , r2 ) · π1 (θ× (a1 , r2 )) r2 :(a1 ,r2 )∈¹Φ∧e∧p1 º (i) X ≥ X η(a1 , r2 ) · η1 (a1 ) + r2 :(a1 ,r2 )∈¹Φ∧e∧p0 º (i) η(a1 , r2 ) · η1 (a1 ) r2 :(a1 ,r2 )∈¹Φ∧e∧p1 º ! (i) X = η(a1 , r2 ) · η1 (a1 ) r2 :(a1 ,r2 )∈¹Φº where on the third line we interchange projection and the sum by Lemma A.1.2, and the inequality is from the cases where p0 and p1 are true. Equations (A.16) and (A.17) show X η(a1 , r2 ) = |π1 (η)| = 1 r2 :(a1 ,r2 )∈¹Φº (i) and so π1 (θ× (a1 , a2 )) ≥ η1 (a1 ) as desired. If e1 〈1〉 is false, unrolling the loops gives θ× (a1 , a2 ) = bind(¹while e ∧ p2 do c20 º(a1 , a2 ), θ× ) (i) (i−1) η1 (a1 ) = bind(¹skipºa1 , η1 ). Equation (A.17) implies π1 (¹while e ∧ p2 do c20 º(a1 , a2 )) = π1 (η) = unit(a1 ) = ¹skipºa1 . Furthermore Eq. (A.16) implies supp(η) ⊆ ¹Φº, so we apply Lemma A.1.1 with the induction hypothesis (i−1) η1 (b1 ) ≤ θ× (b1 , b2 ) for all (b1 , b2 ) ∈ ¹Φº to conclude (i) η1 (a1 ) ≤ π1 (θ× (a1 , a2 )). This completes the inductive case i > 0, establishing Eq. (A.11). Next, we establish Eq. (A.12) by induction on i. For the base case i = 0, if e is true in (a1 , a2 ) then θ (0) (a1 , a2 ) = ⊥ ≤ η1 (a1 ). Otherwise if e is false, then e1 must be false in a1 as well and so π1 (θ (0) (a1 , a2 )) = a1 = η1 (a1 ). Now we consider the inductive step i > 0. Again if e is false in (a1 , a2 ) then both sides are ⊥ and the claim is clear. Otherwise if e is true, there are three cases. APPENDIX A. SOUNDNESS OF ×PRHL 125 Subcase for Eq. (A.12): p0 is true. If p0 is true, then we unfold the loops: θ (i) (a1 , a2 ) = bind(¹c00 º(a1 , a2 ), θ (i−1) ) η1 (a1 ) = bind(¹(if e1 then c1 )K1 º(a1 ), η1 ). By the induction hypothesis, for every (b1 , b2 ) ∈ ¹Φº we have π1 (θ (i−1) (b1 , b2 )) ≤ η1 (b1 ). By the marginal condition from the outer induction hypothesis for the premise Eq. (A.8), we also have π1 (¹c00 º(a1 , a2 )) = ¹(if e1 then c1 )K1 ºa1 . The support condition from the same induction hypothesis shows ¹c00 º(a1 , a2 ) ⊆ ¹Φº so by Lemma A.1.1, we conclude π1 (θ (i) (a1 , a2 )) ≤ η1 (a1 ). Subcase for Eq. (A.12): p1 is true. If p1 is true, then e1 is true in a1 by Eq. (A.4). Unfolding: θ (i) (a1 , a2 ) = bind(¹c10 º(a1 , a2 ), θ (i−1) ) η1 (a1 ) = bind(¹if e1 then c1 ºa1 , η1 ) = bind(¹c1 ºa1 , η1 ). By the induction hypothesis, for every (b1 , b2 ) ∈ ¹Φº we have π1 (θ (i−1) (b1 , b2 )) ≤ η1 (b1 ). By the marginal condition from the outer induction hypothesis for the premise Eq. (A.9), we get π1 (¹c10 º(a1 , a2 )) = ¹c1 ºa1 . Lemma A.1.1 establishes π1 (θ (i) (a1 , a2 )) ≤ η1 (a1 ). Subcase for Eq. (A.12): p2 is true. If p2 is true, then e2 is true in a2 by Eq. (A.5). Unfolding: θ (i) (a1 , a2 ) = bind(¹c20 º(a1 , a2 ), θ (i−1) ) η1 (a1 ) = bind(¹skipºa1 , η1 ). By the induction hypothesis, for every (b1 , b2 ) ∈ ¹Φº we have π1 (θ (i−1) (b1 , b2 )) ≤ η1 (b1 ). By the marginal condition from the outer induction on the premise Eq. (A.10), we get π1 (¹c20 º(a1 , a2 )) = ¹skipºa1 . Lemma A.1.1 establishes π1 (θ (i) (a1 , a2 )) ≤ η1 (a1 ). This completes the inductive case i > 0, establishing Eq. (A.12). By taking limits in Eqs. (A.11) and (A.12) and interchanging limits and projections (Lemma A.1.2), we have: π1 (θ× (a1 , a2 )) ≤ η1 (a1 ) ≤ π1 (θ× (a1 , a2 )) and hence equality holds, showing the first marginal condition. The remaining equations Eqs. (A.13) and (A.14) for the second marginal condition follow by a symmetric argument, proving soundness of the rule. This completes the induction, establishing soundness of ×PRHL. Appendix B Soundness of AP RHL The version of the logic APRHL we saw is similar to existing presentations of APRHL (cf. Barthe et al. (2013c); Barthe and Olmedo (2013); Olmedo (2014)). The main differences are our definition of approximate lifting (Definition 4.2.2), which is a variant of the approximate lifting introduced by Barthe and Olmedo (2013) and Olmedo (2014) with better theoretical properties, and the new proof rules introduced in Chapters 4 and 5. We prove soundness of this version of APRHL, consisting of Figs. 4.1 to 4.5, 5.1, 5.4 and 5.6. Theorem 4.3.2 (Soundness of APRHL). Let ρ be a logical context. If a judgment is derivable ρ ` c1 ∼(",δ) c2 : Φ =⇒ Ψ, then it is valid: ρ |= c1 ∼(",δ) c2 : Φ =⇒ Ψ. Proof. By induction on the height of the proof derivation. We consider the two-sided rules first (Fig. 4.1), followed by the one-sided rules (Fig. 4.2), and the structural rules (Fig. 4.3). The new rules (Figs. 4.4, 4.5, 5.1, 5.4 and 5.6) were proved sound in Chapters 4 and 5; we give pointers to the relevant lemmas. If the premises are valid and we have two inputs m1 , m2 that satisfy the pre-condition, we must construct witnesses µ L , µR of the approximate lifting; namely, they must satisfy the support condition, the marginal conditions, and the distance condition in Definition 4.2.2. Let µ1 and µ2 be the output distributions from inputs m1 and m2 respectively. Throughout, we will leave the logical context ρ implicit when taking the semantics ¹−º; these constants play no role in the proof. Case [SKIP] Trivial; take µ L = µR = unit(m1 , m2 ). Case [ASSN] Trivial; take µ L = µR = unit(m1 [x 1 7→ v1 ], m2 [x 2 7→ v2 ]) with vi ¬ ¹ei ºmi . Case [LAP] Consequence of soundness for [LAPGEN] (Theorem 4.5.4)—in [LAPGEN], take k ¬ 0 and k0 ¬ k in [LAP]. Case [SEQ] By induction, we have two maps η L , ηR : State × State → Distr(State? × State? ) such that for any memories a1 , a2 satisfying Φ, the distributions η L (a1 , a2 ), ηR (a1 , a2 ) witness the (", δ)approximate lifting with support Ψ, and we have maps η0L , η0R : State × State → Distr(State? × State? ) such that for any memories a10 , a20 satisfying Ψ, the distributions η0L (a10 , a20 ), η0R (a10 , a20 ) witness the (" 0 , δ0 )approximate lifting with support Θ. 126 APPENDIX B. SOUNDNESS OF APRHL 127 To construct the witnesses for the conclusion, we would like to combine the witnesses for the premises in sequence. There is a slight mismatch, as η L (a1 , a2 ) and ηR (a1 , a2 ) may place probability on pairs (m, ?) or (?, m). Accordingly, we first extend the domain of the second maps η0L , η0R . We define cL (a10 , a20 )(x, y) ¬ η0L (a10 , a20 )(x, y) η if a10 , a20 6= ? if a10 , a20 6= ? cL (a10 , ?)(x, ?) ¬ (¹c10 ºa10 )(x) η cL (?, a20 )(?, y) ¬ (¹c20 ºa20 )( y) η cR (a10 , a20 )(x, y) ¬ η0R (a10 , a20 )(x, y) η cR (a10 , ?)(x, ?) η cR (?, a20 )(?, y) η ¬ ¬ (¹c10 ºa10 )(x) (¹c20 ºa20 )( y) and zero otherwise. We now define the witnesses for the conclusion: cL ) µ L ¬ bind(η L (m1 , m2 ), η and cR ). µR ¬ bind(ηR (m1 , m2 ), η The support condition is clear, as supp(η L ), supp(ηR ) ⊆ ¹Ψº? and supp(c η L (a1 , a2 )), supp(c ηR (a1 , a2 )) ⊆ ¹Θº? cL , η cR . The marginal conditions are also clear: by for all a1 , a2 ∈ ¹Ψº? , by induction and by definition of η the marginal condition on η L and ηR , we have η L (?, a2 ) = ηR (a1 , ?) = 0 for all (a1 , a2 ). Also note that for a10 6= ? we have π1 (c η L (a10 , a20 )) = ¹c10 ºa10 , and for a20 6= ? we have π2 (c ηR (a10 , a20 )) = ¹c20 ºa20 . Therefore, cL )) π1 (µ L ) = π1 (bind(η L (m1 , m2 ), η = bind(π1 (η L (m1 , m2 )), ¹c10 º) = bind(¹c1 ºm1 , ¹c10 º) = ¹c1 ; c10 ºm1 where the first equality is by Lemma A.1.1 and the marginal condition from the second premise, and the second equality is by the marginal condition from the first premise. For the second marginal, cR )) π2 (µR ) = π2 (bind(ηR (m1 , m2 ), η = bind(π2 (ηR (m1 , m2 )), ¹c20 º) = bind(¹c2 ºm2 , ¹c20 º) = ¹c2 ; c20 ºm2 . Thus, it only remains to check the distance condition d"+"0 (µ L , µR ) ≤ δ + δ0 . Let S ⊆ State? × State? be any set of pairs memories, possibly including ?. We need to bound µ L (S ) ≤ exp(") · µR (S ) + δ. Since d" (η L (m1 , m2 ), ηR (m1 , m2 )) ≤ δ, there exist constants ζ(x 1 , x 2 ) ≥ 0 (possibly depending on m1 , m2 ) for x 1 , x 2 ∈ State? such that η L (m1 , m2 )(x 1 , x 2 ) ≤ exp(") · ηR (m1 , m2 )(x 1 , x 2 ) + ζ(x 1 , x 2 ) APPENDIX B. SOUNDNESS OF APRHL 128 and X ζ(x 1 , x 2 ) ≤ δ. (x 1 ,x 2 )∈State? ×State? By definition, for all a10 , a20 ∈ State? × State? we have  cL (a10 , a20 ), η cR (a10 , a20 ) ≤ δ0 . d"0 η Thus, we can directly compute (with all sums over State? × State? ): X bL (x 1 , x 2 )(S ) µ L (S ) = η L (m1 , m2 )(x 1 , x 2 ) · η (x 1 ,x 2 ) ≤ X (x 1 ,x 2 ) = X (x 1 ,x 2 ) = δ0 + bR (x 1 , x 2 )(S ) + δ0 , 1) η L (m1 , m2 )(x 1 , x 2 ) · min(exp(" 0 )η bR (x 1 , x 2 )(S ), 1 − δ0 ) + δ0 ) η L (m1 , m2 )(x 1 , x 2 ) · (min(exp(" 0 )η X (x 1 ,x 2 ) 0 ≤δ + X bR (x 1 , x 2 )(S ), 1 − δ0 ) η L (m1 , m2 )(x 1 , x 2 ) · min(exp(" 0 )η bR (x 1 , x 2 )(S ), 1 − δ0 ) (exp(") · ηR (m1 , m2 )(x 1 , x 2 ) + ζ(x 1 , x 2 )) · min(exp(" 0 )η (x 1 ,x 2 ) 0 ≤δ + X (x 1 ,x 2 ) 0 ≤δ + X (x 1 ,x 2 ) bR (x 1 , x 2 )(S ) + exp(") · ηR (m1 , m2 )(x 1 , x 2 ) · exp(" 0 )η X ζ(x 1 , x 2 ) · (1 − δ0 ) (x 1 ,x 2 ) 0 bR (x 1 , x 2 )(S ) + (1 − δ0 ) exp(") · ηR (m1 , m2 )(x 1 , x 2 ) · exp(" )η ≤ δ + δ0 + exp(" + " 0 ) X (x 1 ,x 2 ) X ζ(x 1 , x 2 ) (x 1 ,x 2 ) bR (x 1 , x 2 )(S ) ηR (m1 , m2 )(x 1 , x 2 ) · η = δ + δ0 + exp(" + " 0 )µR (S ). This establishes the distance condition d"+"0 (µ L , µR ) ≤ δ + δ0 . Thus, µ L , µR are witnesses to the desired approximate lifting. Case [COND] There are two cases. If e1 is true in m1 , then e2 is also true in m2 by the pre-condition. Hence, ¹if e1 then c1 else c10 ºm1 = ¹c1 ºm1 and ¹if e2 then c2 else c20 ºm2 = ¹c2 ºm2 , and we can take µ L , µR to be the witnesses from the first inductive premise. Otherwise, if e1 is false in m1 then e2 is false in m2 and we take µ L , µR to be the witnesses from the second inductive premise. Case [WHILE] We prove that for every two memories (a1 , a2 ) ∈ ¹Φº, if ¹e v ºa1 = k then we have ¹while e1 do c1 ºa1 (Φ ∧ ¬e1 〈1〉)](k·",k·δ) ¹while e2 do c2 ºa2 . The proof is by induction on k. In the base case k = 0, by the premises e1 is false in a1 and hence e2 is false in a2 . Therefore, we have ¹skipºa1 (Φ ∧ ¬e1 〈1〉)](0,0) ¹skipºa2 by taking witnesses η L = ηR ¬ unit(a1 , a2 ). For the inductive step k > 0, if e1 is false in a1 then e2 is false in a2 , both loops are equivalent to skip and we take the witnesses as in the base case. Otherwise, e1 and e2 are both true and we need to show ¹c1 ; while e1 do c1 ºa1 Φ](k·",k·δ) ¹c2 ; while e2 do c2 ºa2 . APPENDIX B. SOUNDNESS OF APRHL 129 From the premise, for every two memories (a1 , a2 ) ∈ ¹Φº with e1 true in a1 , we have ¹c1 ºa1 (Φ ∧ e v 〈1〉 < k)](",δ) ¹c2 ºa2 . For every pair of memories b1 , b2 satisfying Φ with e v < k in b1 , the induction hypothesis gives ¹while e1 do c1 ºb1 (Φ ∧ ¬e1 〈1〉)]((k−1)·",(k−1)·δ) ¹while e2 do c2 ºb2 . Combining these two witnesses with the reasoning from the case for [SEQ], we have ¹c1 ; while e1 do c1 ºa1 (Φ ∧ ¬e1 〈1〉)](k·",k·δ) ¹c2 ; while e2 do c2 ºa2 as desired. Applying this claim for a1 ¬ m1 , a2 ¬ m2 and k ¬ N establishes soundness of the rule. Case [ASSN-L] ([ASSN-R] similar) Trivial; take µ L = µR = unit(m1 [x 1 7→ v1 ], m2 ) with v1 ¬ ¹e1 ºm1 . Case [LAP-L] ([LAP-R] similar) Let λ ∈ Distr(Z) be the distribution ¹Lap" (e)ºm1 . We define the witnesses µ L (m1 [x 1 7→ v1 ], m2 ) = µR (m1 [x 1 7→ v1 ], m2 ) ¬ λ(v1 ) for every v1 ∈ Z, and zero otherwise. The support, marginal, and distance conditions are easy to check. Case [COND -L] ([COND -R] similar) There are two cases. If e1 is true in m1 , then ¹if e1 then c1 else c10 ºm1 = ¹c1 ºm1 . We let µ L , µR be the witnesses from the first premise by induction. Otherwise if e1 is false in m1 , we let µ L , µR be the witnesses from the second premise by induction. Case [WHILE-L] ([WHILE-R] similar) Trivial; by soundness of the PRHL version using Proposition 4.2.5. Case [CONSEQ] Trivial; take the witnesses from the premise by induction. Case [EQUIV] Trivial; take the witnesses from the premise by induction. Case [CASE] There are two cases. If (m1 , m2 ) ∈ ¹Θº, then the input memories satisfy the pre-condition in the first premise. Otherwise if (m1 , m2 ) ∈ ¹¬Θº, then the input memories satisfy the pre-condition in the second premise. In either case, by induction we take the witnesses from the respective premise as the witnesses for the conclusion. Case [TRANS] By Lemma 5.1.9. Case [FRAME] By the induction hypothesis, there are witnesses µ0L , µ0R to an (", δ)-approximate lifting of the two output distributions µ1 , µ2 on inputs m1 , m2 . Let V = FV(Θ) be the free variables in Θ and suppose m1 [V ] = a1 and m2 [V ] = a2 , where m[V ] : V → V is the restriction of m to V , and a1 , a2 are maps V → V . Since c1 and c2 do not modify variables in V , memories m01 in the support of µ1 satisfy m01 [V ] = a1 and memories m02 in the support of µ2 satisfy m02 [V ] = a2 . By Proposition 4.2.6 and the inductive hypothesis, we can find witnesses µ L , µR to an (", δ)-approximate lifting of µ1 , µ2 such that supp(µ L ) ∪ supp(µR ) ⊆ ¹Ψº ∩ {(m01 , m02 ) | m01 [V ] = a1 , m02 [V ] = a2 } ⊆ ¹Ψ ∧ Θº, where the last inclusion holds because m1 , m2 restricted to V satisfy Θ by assumption. Hence, µ L , µR witness the desired approximate lifting. APPENDIX B. SOUNDNESS OF APRHL Case [LAPNULL] By Theorem 4.5.2. Case [LAPGEN] By Theorem 4.5.4. Case [PW-EQ] By Theorem 4.6.2. Cases [UTB-L] and [UTB-R] By Theorem 5.2.3. Case [LAPINT] By Theorem 5.3.5. Case [WHILE-AC] By Theorem 5.4.10. 130 Bibliography Ron Aharoni, Eli Berger, Agelos Georgakopoulos, Amitai Perlstein, and Philipp Sprüssel. 2011. The Max-Flow Min-Cut Theorem for Countable Networks. Journal of Combinatorial Theory, Series B 101, 1 (2011), 1–17. https://doi.org/10.1016/j.jctb.2010.08.002 Aws Albarghouthi and Justin Hsu. 2018. Synthesizing Coupling Proofs of Differential Privacy. Proceedings of the ACM on Programming Languages 1, POPL (2018). arXiv:cs.PL/1709.05361 http://arxiv.org/abs/1709.05361 To appear at ACM SIGPLAN–SIGACT Symposium on Principles of Programming Languages (POPL), Los Angeles, California. David Aldous. 1983. Random Walks on Finite Groups and Rapidly Mixing Markov Chains. In Séminaire de Probabilités XVII 1981/82 (Lecture Notes in Mathematics), Vol. 986. Springer-Verlag, 243–297. https://eudml.org/doc/113445 Krzysztof R. Apt. 1981. Ten Years of Hoare’s Logic: A Survey–Part I. ACM Transactions on Programming Languages and Systems 3, 4 (1981), 431–483. https://doi.org/10.1145/357146.357150 Krzysztof R. Apt. 1983. Ten years of Hoare’s logic: A survey–Part II: Nondeterminism. Theoretical Computer Science 28, 1 (1983), 83–109. https://doi.org/10.1016/0304-3975(83)90066-X Arthur Azevedo de Amorim, Marco Gaboardi, Emilio Jesús Gallego Arias, and Justin Hsu. 2014. Really Natural Linear Indexed Type-Checking. In Symposium on Implementation and Application of Functional Programming Languages (IFL), Boston, Massachusetts. ACM Press, 5:1–5:12. https://doi.org/10.1145/2746325.2746335 arXiv:cs.LO/1503.04522 Arthur Azevedo de Amorim, Marco Gaboardi, Justin Hsu, Shin-ya Katsumata, and Ikram Cherigui. 2017. A Semantic Account of Metric Preservation. In ACM SIGPLAN–SIGACT Symposium on Principles of Programming Languages (POPL), Paris, France. 545–556. https://doi.org/10.1145/3009837.3009890 arXiv:cs.PL/1702.00374 Gilles Barthe, Juan Manuel Crespo, and César Kunz. 2011a. Relational Verification Using Product Programs. In International Symposium on Formal Methods (FM), Limerick, Ireland (Lecture Notes in Computer Science), Vol. 6664. Springer-Verlag, 200–214. https://doi.org/10.1007/978-3-642-21437-0_17 Gilles Barthe, Juan Manuel Crespo, and César Kunz. 2013a. Beyond 2-Safety: Asymmetric Product Programs for Relational Program Verification. In International Symposium on Logical Foundations of Computer Science (LFCS), San Diego, California (Lecture Notes in Computer Science), Vol. 7734. Springer-Verlag, 29–43. https://doi.org/10.1007/978--3-642--35722--0_3 Gilles Barthe, Pedro R. D’Argenio, and Tamara Rezk. 2011b. Secure Information Flow by Self-Composition. Mathematical Structures in Computer Science 21, 06 (2011), 1207–1252. https://doi.org/10.1017/S0960129511000193 131 BIBLIOGRAPHY 132 Gilles Barthe, François Dupressoir, Benjamin Grégoire, César Kunz, Benedikt Schmidt, and Pierre-Yves Strub. 2013b. EasyCrypt: A Tutorial. In Foundations of Security Analysis and Design (FOSAD) (Lecture Notes in Computer Science), Vol. 8604. Springer-Verlag, 146–166. https://doi.org/10.1007/978-3-319-10082-1_6 Tutorial Lectures. Gilles Barthe, Thomas Espitau, Marco Gaboardi, Benjamin Grégoire, Justin Hsu, and Pierre-Yves Strub. 2017a. Formal Certification of Randomized Algorithms. (2017). http://justinh.su/files/papers/ellora.pdf Gilles Barthe, Thomas Espitau, Benjamin Grégoire, Justin Hsu, Léo Stefanesco, and Pierre-Yves Strub. 2015a. Relational Reasoning via Probabilistic Coupling. In International Conference on Logic for Programming, Artificial Intelligence and Reasoning (LPAR), Suva, Fiji (Lecture Notes in Computer Science), Vol. 9450. Springer-Verlag, 387–401. https://doi.org/10.1007/978-3-662-48899-7_27 arXiv:cs.LO/1509.03476 Gilles Barthe, Thomas Espitau, Benjamin Grégoire, Justin Hsu, and Pierre-Yves Strub. 2017b. Proving Uniformity and Independence by Self-Composition and Coupling. In International Conference on Logic for Programming, Artificial Intelligence and Reasoning (LPAR), Maun, Botswana (EPiC Series in Computing), Vol. 46. 385–403. arXiv:cs.PL/1701.06477 https://arxiv.org/abs/1701.06477 Gilles Barthe, Thomas Espitau, Benjamin Grégoire, Justin Hsu, and Pierre-Yves Strub. 2018. Proving Expected Sensitivity of Probabilistic Programs. Proceedings of the ACM on Programming Languages 1, POPL (2018). arXiv:cs.PL/1708.02537 http://arxiv.org/abs/1708.02537 To appear at ACM SIGPLAN–SIGACT Symposium on Principles of Programming Languages (POPL), Los Angeles, California. Gilles Barthe, Thomas Espitau, Justin Hsu, Tetsuya Sato, and Pierre-Yves Strub. 2017c. ?-Liftings for Differential Privacy. In International Colloquium on Automata, Languages and Programming (ICALP), Warsaw, Poland (Leibniz International Proceedings in Informatics), Vol. 80. Schloss Dagstuhl–Leibniz Center for Informatics, 102:1–102:12. https://doi.org/10.4230/LIPIcs.ICALP.2017.102 arXiv:cs.LO/1705.00133 Gilles Barthe, Noémie Fong, Marco Gaboardi, Benjamin Grégoire, Justin Hsu, and Pierre-Yves Strub. 2016a. Advanced Probabilistic Couplings for Differential Privacy. In ACM SIGSAC Conference on Computer and Communications Security (CCS), Vienna, Austria. 55–67. https://doi.org/10.1145/2976749.2978391 arXiv:cs.LO/1606.07143 Gilles Barthe, Cédric Fournet, Benjamin Grégoire, Pierre-Yves Strub, Nikhil Swamy, and Santiago Zanella-Béguelin. 2014a. Probabilistic Relational Verification for Cryptographic Implementations. In ACM SIGPLAN–SIGACT Symposium on Principles of Programming Languages (POPL), San Diego, California. 193–206. https://doi.org/10.1145/2535838.2535847 Gilles Barthe, Marco Gaboardi, Emilio Jesús Gallego Arias, Justin Hsu, César Kunz, and Pierre-Yves Strub. 2014b. Proving Differential Privacy in Hoare Logic. In IEEE Computer Security Foundations Symposium (CSF), Vienna, Austria. 411–424. https://doi.org/10.1109/CSF.2014.36 arXiv:cs.LO/1407.2988 Gilles Barthe, Marco Gaboardi, Emilio Jesús Gallego Arias, Justin Hsu, Aaron Roth, and Pierre-Yves Strub. 2015b. Higher-Order Approximate Relational Refinement Types for Mechanism Design and Differential Privacy. In ACM SIGPLAN–SIGACT Symposium on Principles of Programming Languages (POPL), Mumbai, India. 55–68. https://doi.org/10.1145/2676726.2677000 arXiv:cs.PL/1407.6845 Gilles Barthe, Marco Gaboardi, Emilio Jesús Gallego Arias, Justin Hsu, Aaron Roth, and Pierre-Yves Strub. 2016b. Computer-Aided Verification in Mechanism Design. In Conference on Web and Internet Economics (WINE), Montréal, Québec (Lecture Notes in Computer Science), Vol. 10123. Springer-Verlag, 273–293. https://doi.org/10.1007/978-3-662-54110-4_20 arXiv:cs.GT/1502.04052 BIBLIOGRAPHY 133 Gilles Barthe, Marco Gaboardi, Benjamin Grégoire, Justin Hsu, and Pierre-Yves Strub. 2016c. Proving Differential Privacy via Probabilistic Couplings. In IEEE Symposium on Logic in Computer Science (LICS), New York, New York. 749–758. https://doi.org/10.1145/2933575.2934554 arXiv:cs.LO/1601.05047 Gilles Barthe, Marco Gaboardi, Justin Hsu, and Benjamin C. Pierce. 2016d. Programming Language Techniques for Differential Privacy. ACM SIGLOG News 3, 1 (Jan. 2016), 34–53. https://doi.org/10.1145/2893582.2893591 Gilles Barthe, Benjamin Grégoire, Justin Hsu, and Pierre-Yves Strub. 2017d. Coupling Proofs Are Probabilistic Product Programs. In ACM SIGPLAN–SIGACT Symposium on Principles of Programming Languages (POPL), Paris, France. 161–174. https://doi.org/10.1145/3009837.3009896 arXiv:cs.PL/1607.03455 Gilles Barthe, Benjamin Grégoire, and Santiago Zanella-Béguelin. 2009. Formal Certification of Code-Based Cryptographic Proofs. In ACM SIGPLAN–SIGACT Symposium on Principles of Programming Languages (POPL), Savannah, Georgia. 90–101. https://doi.org/10.1145/1480881.1480894 Gilles Barthe, Boris Köpf, Federico Olmedo, and Santiago Zanella-Béguelin. 2013c. Probabilistic Relational Reasoning for Differential Privacy. ACM Transactions on Programming Languages and Systems 35, 3 (Nov. 2013), 9:1–9:49. https://doi.org/10.1145/2492061 Gilles Barthe and Federico Olmedo. 2013. Beyond Differential Privacy: Composition Theorems and Relational Logic for f -Divergences between Probabilistic Programs. In International Colloquium on Automata, Languages and Programming (ICALP), Riga, Latvia (Lecture Notes in Computer Science), Vol. 7966. Springer-Verlag, 49–60. https://doi.org/10.1007/978-3-642-39212-2_8 Mihir Bellare and Phillip Rogaway. 2006. The Security of Triple Encryption and a Framework for Code-Based Game-Playing Proofs. In IACR International Conference on the Theory and Applications of Cryptographic Techniques (EUROCRYPT), Saint Petersburg, Russia (Lecture Notes in Computer Science), Vol. 4004. Springer-Verlag, 409–426. https://doi.org/10.1007/11761679_25 Nick Benton. 2004. Simple Relational Correctness Proofs for Static Analyses and Program Transformations. In ACM SIGPLAN–SIGACT Symposium on Principles of Programming Languages (POPL), Venice, Italy. 14–25. https://doi.org/10.1145/964001.964003 Olivier Bousquet and André Elisseeff. 2002. Stability and Generalization. Journal of Machine Learning Research 2 (2002), 499–526. https://doi.org/10.1162/153244302760200704 Russ Bubley and Martin Dyer. 1997. Path Coupling: A Technique for Proving Rapid Mixing in Markov Chains. In IEEE Symposium on Foundations of Computer Science (FOCS), Miami Beach, Florida. 223–231. https://doi.org/10.1109/SFCS.1997.646111 Mads Buch. 2017. Formalizing Differential Privacy. Master’s thesis. Aarhus University. http://madsbuch.com/thesis Mark Bun and Thomas Steinke. 2016. Concentrated Differential Privacy: Simplifications, Extensions, and Lower Bounds. In IACR Theory of Cryptography Conference (TCC), Beijing, China (Lecture Notes in Computer Science), Vol. 9985. Springer-Verlag, 635–658. https://doi.org/10.1007/978-3-662-53641-4_24 arXiv:cs.CR/1605.02065 Mark Bun, Thomas Steinke, and Jonathan Ullman. 2017. Make Up Your Mind: The Price of Online Queries in Differential Privacy. In ACM–SIAM Symposium on Discrete Algorithms (SODA), Barcelona, Spain. 1306–1325. https://doi.org/10.1137/1.9781611974782.85 BIBLIOGRAPHY 134 David Callahan and Ken Kennedy. 1988. Compiling Programs for Distributed-Memory Multiprocessors. The Journal of Supercomputing 2, 2 (Oct. 1988), 151–169. https://doi.org/10.1007/BF00128175 Krishnendu Chatterjee, Hongfei Fu, and Amir Kafshdar Goharshady. 2016a. Termination Analysis of Probabilistic Programs through Positivstellensatz’s. In International Conference on Computer Aided Verification (CAV), Toronto, Ontario (Lecture Notes in Computer Science), Vol. 9779. Springer-Verlag, 3–22. https://doi.org/10.1007/978-3-319-41528-4_1 Krishnendu Chatterjee, Hongfei Fu, Petr Novotný, and Rouzbeh Hasheminezhad. 2016b. Algorithmic Analysis of Qualitative and Quantitative Termination Problems for Affine Probabilistic Programs. In ACM SIGPLAN–SIGACT Symposium on Principles of Programming Languages (POPL), Saint Petersburg, Florida. 327–342. https://doi.org/10.1145/2837614.2837639 Krishnendu Chatterjee, Petr Novotný, and Ðord̄e Žikelić. 2017. Stochastic Invariants for Probabilistic Termination. In ACM SIGPLAN–SIGACT Symposium on Principles of Programming Languages (POPL), Paris, France. 145–160. https://doi.org/10.1145/3009837.3009873 Yuxin Deng and Wenjie Du. 2009. The Kantorovich Metric in Computer Science: A Brief Survey. Electronic Notes in Theoretical Computer Science 253, 3 (2009), 73–82. https://doi.org/10.1016/j.entcs.2009.10.006 Yuxin Deng and Wenjie Du. 2011. Logical, Metric, and Algorithmic Characterisations of Probabilistic Bisimulation. Technical Report CMU-CS-11-110. Carnegie Mellon University. http://arxiv.org/abs/1103.4577 Josée Desharnais. 1999. Labelled Markov Processes. Ph.D. Dissertation. McGill University. www.collectionscanada.gc.ca/obj/s4/f2/dsk1/tape3/PQDD_0031/NQ64546.pdf Josée Desharnais, Abbas Edalat, and Prakash Panangaden. 2002. Bisimulation for Labelled Markov Processes. Information and Computation 179, 2 (2002), 163–193. https://doi.org/10.1006/inco.2001.2962 Josée Desharnais, Vineet Gupta, Radha Jagadeesan, and Prakash Panangaden. 2003. Approximating Labelled Markov Processes. Information and Computation 184, 1 (2003), 160–200. https://doi.org/10.1016/S0890-5401(03)00051-8 Josée Desharnais, Vineet Gupta, Radha Jagadeesan, and Prakash Panangaden. 2004. Metrics for Labelled Markov Processes. Theoretical Computer Science 318, 3 (2004), 323–354. https://doi.org/10.1016/j.tcs.2003.09.013 Josée Desharnais, François Laviolette, and Mathieu Tracol. 2008. Approximate Analysis of Probabilistic Processes: Logic, Simulation and Games. In International Conference on Quantitative Evaluation of Systems (QEST), Saint Malo, France. IEEE, 264–273. https://doi.org/10.1109/QEST.2008.42 Edsger W. Dijkstra. 1976. A Discipline of Programming. Prentice Hall. Cynthia Dwork, Frank McSherry, Kobbi Nissim, and Adam D. Smith. 2006. Calibrating Noise to Sensitivity in Private Data Analysis. In IACR Theory of Cryptography Conference (TCC), New York, New York (Lecture Notes in Computer Science), Vol. 3876. Springer-Verlag, 265–284. https://doi.org/10.1007/11681878_14 Cynthia Dwork and Aaron Roth. 2014. The Algorithmic Foundations of Differential Privacy. Foundations and Trends in Theoretical Computer Science 9, 3–4 (2014), 211–407. https://doi.org/10.1561/0400000042 Cynthia Dwork, Guy N. Rothblum, and Salil Vadhan. 2010. Boosting and Differential Privacy. In IEEE Symposium on Foundations of Computer Science (FOCS), Las Vegas, Nevada. 51–60. https://doi.org/10.1109/FOCS.2010.12 BIBLIOGRAPHY 135 Hamid Ebadi, Thibaud Antignac, and David Sands. 2016. Sampling and Partitioning for Differential Privacy. In Conference on Privacy, Security and Trust (PST), Auckland, New Zealand. IEEE, 664–673. https://doi.org/10.1109/PST.2016.7906954 Hamid Ebadi and David Sands. 2016. Featherweight PINQ. Journal of Privacy and Confidentiality 7, 2 (2016), 159–184. https://arxiv.org/abs/1505.02642 Hamid Ebadi, David Sands, and Gerardo Schneider. 2015. Differential Privacy: Now It’s Getting Personal. In ACM SIGPLAN–SIGACT Symposium on Principles of Programming Languages (POPL), Mumbai, India. 69–81. https://doi.org/10.1145/2676726.2677005 Luis María Ferrer Fioriti and Holger Hermanns. 2015. Probabilistic Termination: Soundness, Completeness, and Compositionality. In ACM SIGPLAN–SIGACT Symposium on Principles of Programming Languages (POPL), Mumbai, India. 489–501. https://doi.org/10.1145/2676726.2677001 Nathanaël Fijalkow, Bartek Klin, and Prakash Panangaden. 2017. Expressiveness of Probabilistic Modal Logics, Revisited. In International Colloquium on Automata, Languages and Programming (ICALP), Warsaw, Poland (Leibniz International Proceedings in Informatics), Vol. 80. Schloss Dagstuhl–Leibniz Center for Informatics, Dagstuhl, Germany, 105:1–105:12. https://doi.org/10.4230/LIPIcs.ICALP.2017.105 Robert W. Floyd. 1967. Assigning Meanings to Programs. In Symposium on Applied Mathematics. American Mathematical Society. https://doi.org/10.1007/978-94-011-1793-7_4 Marco Gaboardi, Andreas Haeberlen, Justin Hsu, Arjun Narayan, and Benjamin C. Pierce. 2013. Linear Dependent Types for Differential Privacy. In ACM SIGPLAN–SIGACT Symposium on Principles of Programming Languages (POPL), Rome, Italy. 357–370. https://doi.org/10.1145/2429069.2429113 Arpita Ghosh, Tim Roughgarden, and Mukund Sundararajan. 2012. Universally Utility-Maximizing Privacy Mechanisms. SIAM Journal on Computing 41, 6 (2012), 1673–1693. https://doi.org/10.1137/09076828X Alessandro Giacalone, Chi-Chang Jou, and Scott A. Smolka. 1990. Algebraic Reasoning for Probabilistic Concurrent Systems. In IFIP TC2 Working Conference on Programming Concepts and Methods. http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.56.3664 Robert Hall, Larry Wasserman, and Alessandro Rinaldo. 2013. Random Differential Privacy. Journal of Privacy and Confidentiality 4, 3 (2013). Issue 2. http://repository.cmu.edu/jpc/vol4/iss2/3 Moritz Hardt, Ben Recht, and Yoram Singer. 2016. Train Faster, Generalize Better: Stability of Stochastic Gradient Descent. In International Conference on Machine Learning (ICML), New York, NY (Proceedings of Machine Learning Research), Vol. 48. 1225–1234. arXiv:cs.LG/1509.01240 http://arxiv.org/abs/1603.01445 Thomas P. Hayes and Eric Vigoda. 2007. Variable Length Path Coupling. Random Structures and Algorithms 31, 3 (2007), 251–272. https://doi.org/10.1002/rsa.20166 Charles A. R. Hoare. 1969. An Axiomatic Basis for Computer Programming. Communications of the ACM 12, 10 (1969), 576–580. https://doi.org/10.1145/363235.363259 Mark Jerrum. 1995. A Very Simple Algorithm for Estimating the Number of k-Colorings of a Low-Degree Graph. Random Structures and Algorithms 7, 2 (1995), 157–166. https://doi.org/10.1002/rsa.3240070205 Cliff B. Jones. 2003. The Early Search for Tractable Ways of Reasoning about Programs. Annals of the History of Computing 25, 2 (April 2003), 26–49. https://doi.org/10.1109/MAHC.2003.1203057 BIBLIOGRAPHY 136 Bengt Jonsson and Kim Guldstrand Larsen. 1991. Specification and Refinement of Probabilistic Processes. In IEEE Symposium on Logic in Computer Science (LICS), Amsterdam, The Netherlands. 266–277. https://doi.org/10.1109/LICS.1991.151651 P. Kairouz, S. Oh, and P. Viswanath. 2017. The Composition Theorem for Differential Privacy. IEEE Transactions on Information Theory 63, 6 (June 2017), 4037–4049. https://doi.org/10.1109/TIT.2017.2685505 Shin-ya Katsumata and Tetsuya Sato. 2015. Codensity Liftings of Monads. In International Conference on Concurrency Theory (CONCUR), Nijmegen, The Netherlands (Leibniz International Proceedings in Informatics), Vol. 35. Schloss Dagstuhl–Leibniz Center for Informatics, 156–170. https://doi.org/10.4230/LIPIcs.CALCO.2015.156 Jon Kleinberg and Eva Tardos. 2005. Algorithm Design. Addison-Wesley. Dexter Kozen. 1981. Semantics of Probabilistic Programs. Journal of Computer and System Sciences 22, 3 (1981), 328–350. https://doi.org/10.1016/0022-0000(81)90036-2 Dexter Kozen. 1985. A Probabilistic PDL. Journal of Computer and System Sciences 30, 2 (1985). https://doi.org/10.1016/0022-0000(85)90012-1 V. S. Anil Kumar and H. Ramesh. 2001. Coupling vs. Conductance for the Jerrum-Sinclair Chain. Random Structures and Algorithms 18, 1 (2001), 1–17. http://hariharan-ramesh.com/papers/mcmc.pdf Kim Guldstrand Larsen and Arne Skou. 1991. Bisimulation through Probabilistic Testing. Information and Computation 94, 1 (1991), 1–28. https://doi.org/10.1016/0890-5401(91)90030-6 David A. Levin, Yuval Peres, and Elizabeth L. Wilmer. 2009. Markov Chains and Mixing Times. American Mathematical Society. http://pages.uoregon.edu/dlevin/MARKOV/markovmixing.pdf Torgny Lindvall. 2002. Lectures on the Coupling Method. Courier Corporation. Min Lyu, Dong Su, and Ninghui Li. 2017. Understanding the Sparse Vector Technique for Differential Privacy. Proceedings of the VLDB Endowment 10, 6 (2017), 637–648. https://doi.org/10.14778/3055330.3055331 Appeared at the International Conference on Very Large Data Bases (VLDB), Munich, Germany. Annabelle McIver, Carroll Morgan, Benjamin Lucien Kaminski, and Joost-Pieter Katoen. 2018. A New Rule for Almost-Certain Termination. Proceedings of the ACM on Programming Languages 1, POPL (2018). https://arxiv.org/abs/1612.01091 To appear at ACM SIGPLAN–SIGACT Symposium on Principles of Programming Languages (POPL), Los Angeles, California. Frank McSherry. 2009. Privacy Integrated Queries. In ACM SIGMOD International Conference on Management of Data (SIGMOD), Providence, Rhode Island. 19–30. https://doi.org/10.1145/1559845.1559850 Frank McSherry and Kunal Talwar. 2007. Mechanism Design via Differential Privacy. In IEEE Symposium on Foundations of Computer Science (FOCS), Providence, Rhode Island. 94–103. https://doi.org/10.1109/FOCS.2007.66 Ilya Mironov. 2017. Rényi Differential Privacy. In IEEE Computer Security Foundations Symposium (CSF), Santa Barbara, California. 263–275. https://doi.org/10.1109/CSF.2017.11 Carroll Morgan, Annabelle McIver, and Karen Seidel. 1996. Probabilistic Predicate Transformers. ACM Transactions on Programming Languages and Systems 18, 3 (1996), 325–353. https://doi.org/10.1145/229542.229547 BIBLIOGRAPHY 137 Peter W. O’Hearn. 2007. Resources, Concurrency, and Local Reasoning. Theoretical Computer Science 375, 1 (2007), 271–307. https://doi.org/10.1016/j.tcs.2006.12.035 Festschrift for John C. Reynolds’s 70th birthday. Peter W. O’Hearn, John C. Reynolds, and Hongseok Yang. 2001. Local Reasoning about Programs That Alter Data Structures. In International Workshop on Computer Science Logic (CSL), Paris, France (Lecture Notes in Computer Science), Vol. 2142. Springer-Verlag, 1–19. https://doi.org/10.1007/3-540-44802-0_1 Federico Olmedo. 2014. Approximate Relational Reasoning for Probabilistic Programs. Ph.D. Dissertation. Universidad Politécnica de Madrid. http://oa.upm.es/23088/1/FEDERICO_OLMEDO.pdf Catuscia Palamidessi and Marco Stronati. 2012. Differential Privacy for Relational Algebra: Improving the Sensitivity Bounds via Constraint Systems. In Workshop on Quantitative Aspects of Programming Languages (QAPL), Tallin, Estonia (Electronic Proceedings in Theoretical Computer Science), Vol. 85. Open Publishing Association, 92–105. https://doi.org/10.4204/EPTCS.85.7 James Gary Propp and David Bruce Wilson. 1996. Exact Sampling with Coupled Markov Chains and Applications to Statistical Mechanics. Random Structures and Algorithms 9, 1-2 (1996), 223–252. https://doi.org/10.1002/(SICI)1098-2418(199608/09)9:1/2<223::AID-RSA14>3.0.CO;2-O Davide Proserpio, Sharon Goldberg, and Frank McSherry. 2014. Calibrating Data to Sensitivity in Private Data Analysis: A Platform for Differentially-Private Analysis of Weighted Datasets. Proceedings of the VLDB Endowment 7, 8 (2014), 637–648. https://doi.org/10.14778/2732296.2732300 Appeared at the International Conference on Very Large Data Bases (VLDB), Hangzhou, China. Jason Reed and Benjamin C. Pierce. 2010. Distance Makes the Types Grow Stronger: A Calculus for Differential Privacy. In ACM SIGPLAN International Conference on Functional Programming (ICFP), Baltimore, Maryland. 157–168. https://doi.org/10.1145/1863543.1863568 John C. Reynolds. 2001. Intuitionistic Reasoning about Shared Mutable Data Structure. Millennial Perspectives in Computer Science 2, 1 (2001), 303–321. http: //citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.11.5999&rep=rep1&type=pdf John C. Reynolds. 2002. Separation Logic: A Logic for Shared Mutable Data Structures. In IEEE Symposium on Logic in Computer Science (LICS), Copenhagen, Denmark. 55–74. https://doi.org/10.1109/LICS.2002.1029817 Ryan Rogers, Salil Vadhan, Aaron Roth, and Jonathan Ullman. 2016. Privacy Odometers and Filters: Pay-as-you-go Composition. In Conference on Neural Information Processing Systems (NIPS), Barcelona, Spain. 1921–1929. http://arxiv.org/abs/1605.08294 Halsey L. Royden and Patrick Fitzpatrick. 2010. Real Analysis (fourth ed.). Prentice Hall. Walter Rudin. 1976. Principles of Mathematical Analysis (third ed.). McGraw-Hill. Tetsuya Sato. 2016. Approximate Relational Hoare Logic for Continuous Random Samplings. In Conference on the Mathematical Foundations of Programming Semantics (MFPS), Pittsburgh, Pennsylvania (Electronic Notes in Theoretical Computer Science), Vol. 325. Elsevier, 277–298. https://doi.org/10.1016/j.entcs.2016.09.043 Tetsuya Sato, Gilles Barthe, Marco Gaboradi, Justin Hsu, and Shin-ya Katsumata. 2017. Reasoning about Divergences for Relaxations of Differential Privacy. (2017). arXiv:cs.PL/1710.09010 http://arxiv.org/abs/1710.09010 BIBLIOGRAPHY 138 Roberto Segala and Nancy A. Lynch. 1995. Probabilistic Simulations for Probabilistic Processes. Nordic Journal of Computing 2, 2 (1995), 250–273. https://doi.org/doi.org/10.1007/BFb0015027 Roberto Segala and Andrea Turrini. 2007. Approximated Computationally Bounded Simulation Relations for Probabilistic Automata. In IEEE Computer Security Foundations Symposium (CSF), Venice, Italy. 140–156. https://doi.org/10.1109/CSF.2007.8 Victor Shoup. 2004. Sequences of Games: A Tool for Taming Complexity in Security Proofs. Cryptology ePrint Archive, Report 2004/332. (2004). http://eprint.iacr.org/2004/332 Marcelo Sousa and Isil Dillig. 2016. Cartesian Hoare Logic for Verifying k-Safety Properties. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), Santa Barbara, California. 57–69. https://doi.org/10.1145/2908080.2908092 Volker Strassen. 1965. The Existence of Probability Measures with Given Marginals. The Annals of Mathematical Statistics (1965), 423–439. https://doi.org/10.1214/aoms/1177700153 Tachio Terauchi and Alex Aiken. 2005. Secure Information Flow as a Safety Problem. In International Symposium on Static Analysis (SAS), London, England (Lecture Notes in Computer Science), Vol. 3672. Springer-Verlag, 352–367. https://doi.org/10.1007/11547662_24 Hermann Thorisson. 2000. Coupling, Stationarity, and Regeneration. Springer-Verlag. Mathieu Tracol, Josée Desharnais, and Abir Zhioua. 2011. Computing Distances between Probabilistic Automata. In Workshop on Quantitative Aspects of Programming Languages (QAPL), Saarbrücken, Germany (Electronic Proceedings in Theoretical Computer Science), Vol. 57. Open Publishing Association, 148–162. https://doi.org/10.4204/EPTCS.57.11 Michael Carl Tschantz, Dilsun Kaynar, and Anupam Datta. 2011. Formal Verification of Differential Privacy for Interactive Systems. In Conference on the Mathematical Foundations of Programming Semantics (MFPS), Pittsburgh, Pennsylvania (Electronic Notes in Theoretical Computer Science), Vol. 276. Elsevier, 61–79. https://doi.org/10.1016/j.entcs.2011.09.015 Franck van Breugel and James Worrell. 2001a. An Algorithm for Quantitative Verification of Probabilistic Transition Systems. In International Conference on Concurrency Theory (CONCUR), Aalborg, Denmark (Lecture Notes in Computer Science), Vol. 2154. Springer-Verlag, 336–350. https://doi.org/10.1007/3-540-44685-0_23 Franck van Breugel and James Worrell. 2001b. Towards Quantitative Verification of Probabilistic Transition Systems. In International Colloquium on Automata, Languages and Programming (ICALP), Crete, Greece (Lecture Notes in Computer Science), Vol. 2076. Springer-Verlag, 421–432. https://doi.org/10.1007/3-540-48224-5_35 Cédric Villani. 2008. Optimal Transport: Old and New. Springer-Verlag. https://doi.org/10.1007/978-3-540-71050-9 Daniel Winograd-Cort, Andreas Haeberlen, Aaron Roth, and Benjamin C. Pierce. 2017. A Framework for Adaptive Differential Privacy. In ACM SIGPLAN International Conference on Functional Programming (ICFP), Oxford, England. 10:1–10:29. https://doi.org/10.1145/3110254 Hongseok Yang. 2007. Relational Separation Logic. Theoretical Computer Science 375, 1 (2007), 308–334. https://doi.org/10.1016/j.tcs.2006.12.036 Festschrift for John C. Reynolds’s 70th birthday. BIBLIOGRAPHY 139 Anna Zaks and Amir Pnueli. 2008. CoVaC: Compiler Validation by Program Analysis of the Cross-Product. In International Symposium on Formal Methods (FM), Turku, Finland (Lecture Notes in Computer Science), Vol. 5014. Springer-Verlag, 35–51. https://doi.org/10.1007/978-3-540-68237-0_5 Danfeng Zhang and Daniel Kifer. 2017. LightDP: Towards Automating Differential Privacy Proofs. In ACM SIGPLAN–SIGACT Symposium on Principles of Programming Languages (POPL), Paris, France. 888–901. https://doi.org/10.1145/3009837.3009884
6cs.PL
NeuroNER: an easy-to-use program for named-entity recognition based on neural networks Franck Dernoncourt∗ MIT [email protected] Ji Young Lee∗ MIT [email protected] arXiv:1705.05487v1 [cs.CL] 16 May 2017 Abstract Named-entity recognition (NER) aims at identifying entities of interest in a text. Artificial neural networks (ANNs) have recently been shown to outperform existing NER systems. However, ANNs remain challenging to use for non-expert users. In this paper, we present NeuroNER, an easyto-use named-entity recognition tool based on ANNs. Users can annotate entities using a graphical web-based user interface (BRAT): the annotations are then used to train an ANN, which in turn predict entities’ locations and categories in new texts. NeuroNER makes this annotationtraining-prediction flow smooth and accessible to anyone. 1 Introduction Named-entity recognition (NER) aims at identifying entities of interest in the text, such as location, organization and temporal expression. Identified entities can be used in various downstream applications such as patient note de-identification and information extraction systems. They can also be used as features for machine learning systems for other natural language processing tasks. Early systems for NER relied on rules defined by humans. Rule-based systems are timeconsuming to develop, and cannot be easily transferred to new types of texts or entities. To address these issues, researchers have developed machinelearning-based algorithms for NER, using a variety of learning approaches, such as fully supervised learning, semi-supervised learning, unsupervised learning, and active learning. NeuroNER is based on a fully supervised learning algorithm, which is the most studied approach (Nadeau and Sekine, 2007). ∗ These authors contributed equally to this work. Peter Szolovits MIT [email protected] Fully supervised approaches to NER include support vector machines (SVM) (Asahara and Matsumoto, 2003), maximum entropy models (Borthwick et al., 1998), decision trees (Sekine et al., 1998) as well as sequential tagging methods such as hidden Markov models (Bikel et al., 1997), Markov maximum entropy models (Kumar and Bhattacharyya, 2006), and conditional random fields (CRFs) (McCallum and Li, 2003; Tsai et al., 2006; Benajiba and Rosso, 2008; Filannino et al., 2013). Similar to rule-based systems, these approaches rely on handcrafted features, which are challenging and time-consuming to develop and may not generalize well to new datasets. More recently, artificial neural networks (ANNs) have been shown to outperform other supervised algorithms for NER (Collobert et al., 2011; Lample et al., 2016; Lee et al., 2016; Labeau et al., 2015; Dernoncourt et al., 2016). The effectiveness of ANNs can be attributed to their ability to learn effective features jointly with model parameters directly from the training dataset, instead of relying on handcrafted features developed from a specific dataset. However, ANNs remain challenging to use for non-expert users. Contributions NeuroNER makes state-of-theart named-entity recognition based on ANN available to anyone, by focusing on usability. To enable users to create or modify annotations for a new or existing corpus, NeuroNER interfaces with the web-based annotation program BRAT (Stenetorp et al., 2012). NeuroNER makes the annotationtraining-prediction flow smooth and accessible to anyone, while leveraging the state-of-the-art prediction capabilities of ANNs. NeuroNER is open source and freely available online1 . 1 NeuroNER can be found online at: http://neuroner.com 2 Related Work Existing publicly available NER systems geared toward non-experts do not use ANNs. For example, Stanford NER (Finkel et al., 2005), ABNER (Settles, 2005), the MITRE Identification Scrubber Toolkit (MIST) (Aberdeen et al., 2010), (Boag et al., 2015), BANNER (Leaman et al., 2008) and NERsuite (Cho et al., 2010) rely on CRFs. GAPSCORE uses SVMs (Chang et al., 2004). Apache cTAKES (Savova et al., 2010) and Gate’s ANNIE (Cunningham et al., 1996; Maynard and Cunningham, 2003) use mostly rules. NeuroNER, the first ANN-based NER system for non-experts, is more generalizable to new corpus due to the ANNs’ capability to learn effective features jointly with model parameters. Furthermore, in many cases, the NER systems assume that the user already has an annotated corpus formatted in a specific data format. As a result, users often have to connect their annotation tool with the NER systems by reformatting annotated data, which can be time-consuming and errorprone. Moreover, if users want to manually improve the annotations predicted by the NER system (e.g., if they use the NER system to accelerate the human annotations), they have to perform additional data conversion. NeuroNER streamlines this process by incorporating BRAT, a widelyused and easy-to-use annotation tool. 3 System Description NeuroNER comprises two main components: an NER engine and an interface with BRAT. NeuroNER also comes with real-time monitoring tools for training, and pre-trained models that can be loaded to the NER engine in case the user does not have access to labelled training data. Figure 1 presents an overview of the system. 3.1 NER engine The NER engine takes as input three sets of data with gold labels: the training set, the validation set, and the test set. Additionally, it can also take as input the deployment set, which refers to any new text without gold labels that the user wishes to label. The files that comprise each set of data should be in the same format as used for the annotation tool BRAT or the CoNLL-2003 NER shared task dataset (Tjong Kim Sang and De Meulder, 2003), and organized in the corresponding folder. The NER engine’s ANN contains three layers: • Character-enhanced token-embedding layer, • Label prediction layer, • Label sequence optimization layer. The character-enhanced token-embedding layer maps each token to a vector representation. The sequence of vector representations corresponding to a sequence of tokens is then input to label prediction layer, which outputs the sequence of vectors containing the probability of each label for each corresponding token. Lastly, the label sequence optimization layer outputs the most likely sequence of predicted labels based on the sequence of probability vectors from the previous layer. All layers are learned jointly. The ANN as well as the training process have several hyperparameters such as character embedding dimension, character-based tokenembedding LSTM dimension, token embedding dimension, and dropout probability. All hyperparameters may be specified in a configuration file that is human-readable, so that the user does not have to dive into any code. Listing 1 presents an excerpt of the configuration file. [dataset] dataset_folder = dat/conll [character_lstm] using_character_lstm char_embedding_dimension char_lstm_dimension = True = 25 = 50 [token_lstm] token_emb_pretrained_file token_embedding_dimension token_lstm_dimension = glove.txt = 200 = 300 [crf] using_crf random_initial_transitions = True = True [training] dropout patience maximum_number_of_epochs maximum_training_time number_of_cpu_threads = = = = = 0.5 10 100 10 8 Listing 1: Excerpt of the configuration file used to define the ANN as well as the training process. Only the dataset folder parameter needs to be changed by the user: the other parameters have reasonable default values, which the user may optionally tune. Learning curve Training & Monitoring Train set NeuroNER engine TensorBoard graphs Validation set Test set Test set with predicted entities Prediction & Evaluation NeuroNER engine Confusion matrix Classification report Deployment Deployment set with predicted entities Deployment set NeuroNER engine Figure 1: NeuroNER system overview. In the NeuroNER engine, the training set is used to train the parameters of the ANN, and the validation set is used to determine when to stop training. The user can monitor the training process in real time via the learning curve and TensorBoard. To evaluate the trained ANN, the labels are predicted for the test set: the performance metrics can be calculated and plotted by comparing the predicted labels with the gold labels. The evaluation can be done at the same time as the training if the test set is provided along with the training and validation sets, or separately after the training or using a pre-trained model. Lastly, the NeuroNER engine can label the deployment set, i.e. any new text without gold labels. 3.2 Real-time monitoring for training As training an ANN may take many hours, or even a few days on very large datasets, NeuroNER provides the user with real-time feedback during the training for monitoring purpose. Feedback is given through two different means: plots generated by NeuroNER, and TensorBoard. Plots NeuroNER generates several plots showing the training progress and outcome at each epoch. Plots include the evolution of the overall F1-score over time, confusion matrices visualizing the number of correct versus incorrect predictions for each class, and classification reports showing the F1-score, precision and recall for each class. TensorBoard As NeuroNER is based on TensorFlow , it leverages the functionalities of TensorBoard. TensorBoard is a suite of web applications for inspecting and understanding TensorFlow runs and graphs. It allows to view in real time the performances achieved by the ANN being trained. Moreover, since it is web-based, these performances can be conveniently shared with anyone remotely. Lastly, since graphs generated by TensorBoard are interactive, the user may gain further insights on the ANN performances. 3.3 Pre-trained models Some users may prefer not to train any ANN model, either due to time constraints or unavailable gold labels. For example, if the user wants to tag protected health information, they might not be able to have access to a labeled identifiable dataset. To address this need, NeuroNER provides a set of pre-trained models. Users are encouraged to contribute by uploading their own trained models. NeuroNER also comes with several pre-trained token embeddings, either with word2vec (Mikolov et al., 2013a,b,c) or GloVe (Pennington et al., 2014), which the NeuroNER engine can load easily once specified in the configuration file. 3.4 • improving the annotations of an already labeled dataset: the annotations may have been done by another human or by a previous run of NeuroNER. In the latter case, the user may use NeuroNER interactively, by iterating between manually improving the annotations and running the NeuroNER engine with the new annotations to obtain more accurate annotations. NeuroNER can take as input datasets in the BRAT format, and outputs BRAT-formatted predictions, which makes it easy to start training directly from the annotations as well as visualize and analyze the predictions. We chose BRAT for two main reasons: it is easy to use, and it can be deployed as a web application, which allows crowdsourcing. As a result, the user may quickly gather a vast amount of annotations by using crowdsourcing marketplaces such as Amazon Mechanical Turk (Buhrmester et al., 2011) and CrowdFlower (Finin et al., 2010). 3.5 System requirements NeuroNER runs on Linux, Mac OS X, and Microsoft Windows. It requires Python 3.5, TensorFlow 1.0 (Abadi et al., 2016), scikit-learn (Pedregosa et al., 2011), and BRAT. A setup script is provided to make the installation straightforward. It can use the GPU if available, and the number of CPU threads and GPUs to use can be specified in the configuration file. 3.6 Performances To assess the quality of NeuroNER’s predictions, we use two publicly and freely available datasets for named-entity recognition: CoNLL 2003 and i2b2 2014. CoNLL 2003 (Tjong Kim Sang and De Meulder, 2003) is a widely studied dataset with 4 usual types of entity: persons, organizations, locations and miscellaneous names. We use the English version. Annotations NeuroNER is designed to smoothly integrate with the freely available web-based annotation tool BRAT, so that non-expert users may create or improve annotations. Specifically, NeuroNER addresses two main use cases: • creating new annotations from scratch, e.g. if the goal is to annotate a dataset for which no gold label is available, Model Best published NeuroNER CoNLL 2003 90.9 90.5 i2b2 2014 97.9 97.7 Table 1: F1-scores (%) on the test set comparing NeuroNER with the best published methods in the literature, viz. (Passos et al., 2014) for CoNLL 2003, (Dernoncourt et al., 2016) for i2b2 2014. The i2b2 2014 dataset (Stubbs et al., 2015) was released as part of the 2014 i2b2/UTHealth shared task Track 1. It is the largest publicly available dataset for de-identification, which is a form of named-entity recognition where the entities are protected health information such as patients’ names and patients’ phone numbers. 22 systems were submitted for this shared task. Table 1 compares NeuroNER with state-of-theart systems on CoNLL 2003 and i2b2 2014. Although the hyperparameters of NeuroNER were not optimized for these datasets (the default hyperparameters were used), the performances of NeuroNER are on par with the state-of-the-art systems. 4 Conclusions In this article we have presented NeuroNER, an ANN-based NER tool that is accessible to nonexpert users and yields state-of-the-art results. Addressing the need of many users who want to create or improve annotations, NeuroNER smoothly integrates with the web-based annotation tool BRAT. References Martı́n Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Greg S Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, et al. 2016. Tensorflow: Large-scale machine learning on heterogeneous distributed systems. arXiv preprint arXiv:1603.04467 . John Aberdeen, Samuel Bayer, Reyyan Yeniterzi, Ben Wellner, Cheryl Clark, David Hanauer, Bradley Malin, and Lynette Hirschman. 2010. The mitre identification scrubber toolkit: design, training, and assessment. International journal of medical informatics 79(12):849–859. Masayuki Asahara and Yuji Matsumoto. 2003. Japanese named entity extraction with redundant morphological analysis. In Proceedings of the 2003 Conference of the North American Chapter of the Association for Computational Linguistics on Human Language Technology-Volume 1. Association for Computational Linguistics, pages 8–15. of the fifth conference on Applied natural language processing. Association for Computational Linguistics, pages 194–201. William Boag, Kevin Wacome, Tristan Naumann, and Anna Rumshisky. 2015. Cliner: A lightweight tool for clinical named entity recognition. American Medical Informatics Association (AMIA) Joint Summits on Clinical Research Informatics (poster) . Andrew Borthwick, John Sterling, Eugene Agichtein, and Ralph Grishman. 1998. Nyu: Description of the mene named entity system as used in muc-7. In In Proceedings of the Seventh Message Understanding Conference (MUC-7). Michael Buhrmester, Tracy Kwang, and Samuel D Gosling. 2011. Amazon’s mechanical turk a new source of inexpensive, yet high-quality, data? Perspectives on psychological science 6(1):3–5. Jeffrey T Chang, Hinrich Schütze, and Russ B Altman. 2004. Gapscore: finding gene and protein names one word at a time. Bioinformatics 20(2):216–225. HC Cho, N Okazaki, M Miwa, and J Tsujii. 2010. Nersuite: a named entity recognition toolkit. Tsujii Laboratory, Department of Information Science, University of Tokyo, Tokyo, Japan . Ronan Collobert, Jason Weston, Léon Bottou, Michael Karlen, Koray Kavukcuoglu, and Pavel Kuksa. 2011. Natural language processing (almost) from scratch. The Journal of Machine Learning Research 12:2493–2537. Hamish Cunningham, Yorick Wilks, and Robert J Gaizauskas. 1996. Gate: a general architecture for text engineering. In Proceedings of the 16th conference on Computational linguistics-Volume 2. Association for Computational Linguistics, pages 1057– 1060. Franck Dernoncourt, Ji Young Lee, Ozlem Uzuner, and Peter Szolovits. 2016. De-identification of patient notes with recurrent neural networks. Journal of the American Medical Informatics Association . Michele Filannino, Gavin Brown, and Goran Nenadic. 2013. Mantime: Temporal expression identification and normalization in the tempeval-3 challenge. arXiv preprint arXiv:1304.7942 . Yassine Benajiba and Paolo Rosso. 2008. Arabic named entity recognition using conditional random fields. In Proc. of Workshop on HLT & NLP within the Arabic World, LREC. Citeseer, volume 8, pages 143–153. Tim Finin, Will Murnane, Anand Karandikar, Nicholas Keller, Justin Martineau, and Mark Dredze. 2010. Annotating named entities in twitter data with crowdsourcing. In Proceedings of the NAACL HLT 2010 Workshop on Creating Speech and Language Data with Amazon’s Mechanical Turk. Association for Computational Linguistics, pages 80–88. Daniel M Bikel, Scott Miller, Richard Schwartz, and Ralph Weischedel. 1997. Nymble: a highperformance learning name-finder. In Proceedings Jenny Rose Finkel, Trond Grenager, and Christopher Manning. 2005. Incorporating non-local information into information extraction systems by gibbs sampling. In Proceedings of the 43rd annual meeting on association for computational linguistics. Association for Computational Linguistics, pages 363– 370. N Kumar and Pushpak Bhattacharyya. 2006. Named entity recognition in Hindi using MEMM. Techbical Report, IIT Mumbai . Matthieu Labeau, Kevin Löser, and Alexandre Allauzen. 2015. Non-lexical neural architecture for fine-grained POS tagging. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing. Association for Computational Linguistics, Lisbon, Portugal, pages 232–237. http://aclweb.org/anthology/D15-1025. Guillaume Lample, Miguel Ballesteros, Sandeep Subramanian, Kazuya Kawakami, and Chris Dyer. 2016. Neural architectures for named entity recognition. arXiv preprint arXiv:1603.01360 . Robert Leaman, Graciela Gonzalez, et al. 2008. Banner: an executable survey of advances in biomedical named entity recognition. In Pacific symposium on biocomputing. volume 13, pages 652–663. Ji Young Lee, Franck Dernoncourt, Ozlem Uzuner, and Peter Szolovits. 2016. Feature-augmented neural networks for patient note de-identification. COLING Clinical NLP . Diana Maynard and Hamish Cunningham. 2003. Multilingual adaptations of annie, a reusable information extraction tool. In Proceedings of the tenth conference on European chapter of the Association for Computational Linguistics-Volume 2. Association for Computational Linguistics, pages 219–222. Andrew McCallum and Wei Li. 2003. Early results for named entity recognition with conditional random fields, feature induction and web-enhanced lexicons. In Proceedings of the seventh conference on Natural language learning at HLT-NAACL 2003-Volume 4. Association for Computational Linguistics, pages 188–191. Tomas Mikolov, Kai Chen, Greg Corrado, and Jeffrey Dean. 2013a. Efficient estimation of word representations in vector space. arXiv preprint arXiv:1301.3781 . Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg S Corrado, and Jeff Dean. 2013b. Distributed representations of words and phrases and their compositionality. In Advances in neural information processing systems. pages 3111–3119. Tomas Mikolov, Wen-tau Yih, and Geoffrey Zweig. 2013c. Linguistic regularities in continuous space word representations. In HLT-NAACL. pages 746– 751. David Nadeau and Satoshi Sekine. 2007. A survey of named entity recognition and classification. Lingvisticae Investigationes 30(1):3–26. Alexandre Passos, Vineet Kumar, and Andrew McCallum. 2014. Lexicon infused phrase embeddings for named entity resolution. In Proceedings of the Eighteenth Conference on Computational Natural Language Learning. Association for Computational Linguistics, Ann Arbor, Michigan, pages 78–86. http://www.aclweb.org/anthology/W14-1609. Fabian Pedregosa, Gaël Varoquaux, Alexandre Gramfort, Vincent Michel, Bertrand Thirion, Olivier Grisel, Mathieu Blondel, Peter Prettenhofer, Ron Weiss, Vincent Dubourg, et al. 2011. Scikit-learn: Machine learning in python. Journal of Machine Learning Research 12(Oct):2825–2830. Jeffrey Pennington, Richard Socher, and Christopher D Manning. 2014. GloVe: global vectors for word representation. Proceedings of the Empiricial Methods in Natural Language Processing (EMNLP 2014) 12:1532–1543. Guergana K Savova, James J Masanz, Philip V Ogren, Jiaping Zheng, Sunghwan Sohn, Karin C KipperSchuler, and Christopher G Chute. 2010. Mayo clinical text analysis and knowledge extraction system (ctakes): architecture, component evaluation and applications. Journal of the American Medical Informatics Association 17(5):507–513. Satoshi Sekine et al. 1998. Nyu: Description of the japanese ne system used for met-2. In Proc. Message Understanding Conference. Burr Settles. 2005. ABNER: An open source tool for automatically tagging genes, proteins, and other entity names in text. Bioinformatics 21(14):3191– 3192. Pontus Stenetorp, Sampo Pyysalo, Goran Topić, Tomoko Ohta, Sophia Ananiadou, and Jun’ichi Tsujii. 2012. Brat: a web-based tool for nlp-assisted text annotation. In Proceedings of the Demonstrations at the 13th Conference of the European Chapter of the Association for Computational Linguistics. Association for Computational Linguistics, pages 102–107. Amber Stubbs, Christopher Kotfila, and Özlem Uzuner. 2015. Automated systems for the de-identification of longitudinal clinical narratives: Overview of 2014 i2b2/uthealth shared task track 1. Journal of biomedical informatics 58:S11–S19. Erik F Tjong Kim Sang and Fien De Meulder. 2003. Introduction to the conll-2003 shared task: Language-independent named entity recognition. In Proceedings of the seventh conference on Natural language learning at HLT-NAACL 2003-Volume 4. Association for Computational Linguistics, pages 142–147. Richard Tzong-Han Tsai, Cheng-Lung Sung, Hong-Jie Dai, Hsieh-Chuan Hung, Ting-Yi Sung, and WenLian Hsu. 2006. Nerbio: using selected word conjunctions, term normalization, and global patterns to improve biomedical named entity recognition. BMC bioinformatics 7(5):S11.
9cs.NE
A SIMPLE METHOD TO CONSTRUCT CONFIDENCE BANDS IN FUNCTIONAL LINEAR REGRESSION arXiv:1612.07490v3 [math.ST] 1 May 2017 MASAAKI IMAIZUMI AND KENGO KATO Abstract. This paper develops a simple method to construct confidence bands, centered at a principal component analysis (PCA) based estimator, for the slope function in a functional linear regression model with a scalar response variable and a functional predictor variable. The PCAbased estimator is a series estimator with estimated basis functions, and so construction of valid confidence bands for it is a non-trivial challenge. We propose a confidence band that aims at covering the slope function at “most” of points with a prespecified probability (level), and prove its asymptotic validity under suitable regularity conditions. Importantly, this is the first paper that derives confidence bands having theoretical justifications for the PCA-based estimator. We also propose a practical method to choose the cut-off level used in PCA-based estimation, and conduct numerical studies to verify the finite sample performance of the proposed confidence band. Finally, we apply our methodology to spectrometric data, and discuss extensions of our methodology to cases where additional vector-valued regressors are present. 1. Introduction Data collected on dense grids can be typically regarded as realizations of a random function. Such data are called functional data, and statistical methodology dealing with functional data, called functional data analysis, has now a wide range of applications including chemometrics, econometrics, and biomedical studies; see e.g. Ramsey & Silverman (2005); Ferraty & Vieu (2006); Hsing & Eubank (2015). One of the most basic models in functional data analysis is a functional linear regression model. For a functional linear regression model, of particular interest is estimation and inference on the slope function. Estimation based on functional principal component analysis (PCA) is among the most popular and fundamental methods to estimate the slope function (cf. Cardot et al., 1999; Ramsey & Silverman, 2005; Yao et al., 2005a; Cai & Hall, 2006; Hall & Horowitz, 2007). This paper develops a simple method to construct confidence bands for the slope function in a functional linear regression model which is applicable to a PCA-based estimator. To be precise, we work with the following setting. Let Y be a scalar response variable and let X be a predictor variable which we assume to be an L2 (I)-valued random variable (random function) such that Date: First version: December 20, 2016. This version: May 2, 2017. Key words and phrases. confidence band, functional linear regression, functional principal component analysis. K. Kato is supported by Grant-in-Aid for Scientific Research (C) (15K03392) from the JSPS. 1 2 M. IMAIZUMI AND K. KATO R I E{X 2 (t)}dt < ∞, where I is a compact interval. Consider a functional linear model with a scalar response variable Z Y = a + b(t)[X(t) − E{X(t)}]dt + ε, E(ε) = 0, E(ε2 ) = σ 2 ∈ (0, ∞), (1) I where a is an unknown constant (indeed, a = E(Y )), b ∈ L2 (I) is an unknown slope function, and X and ε are independent. The error variance σ 2 is also unknown. We are interested in constructing confidence bands for the slope function b centered at a PCA-based estimator. In spite of extensive studies on functional linear regression models, to the best of our knowledge, there is no formal result on confidence bands for the slope function b which is applicable to a PCA-based estimator (see below for the literature review). The purpose of this paper is to fill this important void. Quantifying uncertainty of estimators is a pivotal part in statistical analysis. Confidence bands provide a simple-to-interpret graphical description on accuracy of nonparametric estimators. Several techniques to construct confidence bands are available to kernel estimation of density and regression functions (Smirnov, 1950; Bickel & Rosenblatt, 1973; Claeskens & Van Keilegom, 2003; Chernozhukov et al., 2014a,b), and to series estimation with non-stochastic basis functions as well (Chernozhukov et al., 2014a; Belloni et al., 2015; Chen and Christensen, 2015). See also Wasserman (2006); Giné & Nickl (2016) as general references on nonparametric inference. However, in PCA estimation of a functional linear model, the eigenfunctions of the empirical covariance function are used. Since the empirical covariance function is stochastic, the eigenfunctions are stochastic as well, and randomness of these eigenfunctions has to be properly taken into account, which lays a new and non-trivial challenge. Of course, in principle, it could be possible to show that the effect of estimation errors in the empirical eigenfunctions is negligible and apply existing machinery (such as those developed in Belloni et al. (2015)) on construction of confidence bands to the population eigenfunctions, but translating the required regularity conditions into primitive ones is highly non-trivial, since functional PCA is essentially an L2 -theory but confidence bands require to control the sup-norm error of the estimator. Furthermore, those required regularity conditions would be technically involved. It is worth noting that the eigenfunctions of the covariance function depend intrinsically on the distribution of X, so that making restrictions to the eigenfunctions would narrow the admissible class of distributions of X, which in turn restricts the applicability of the resulting method. The aim of the present paper is to propose a simple method to construct confidence bands centered at the PCA-based estimator that “work” under regularity conditions mostly standard in the literature on functional linear regression. To this end, we make a slight relaxation on coverage requirements of confidence bands, as in Cai et al. (2014), and require our confidence band to cover the slope function b at “most” of points t ∈ I with a prespecified probability, say 90% or 95%. We then propose a confidence band centered at the PCA-based estimator and show that under 3 suitable regularity conditions, which are mostly standard in the literature on functional linear regression, the proposed confidence band satisfies this new requirement asymptotically. For the proposed confidence band to work in practice, the choice of the cut-off level is crucial. In theory, we should choose the cut-off level in such a way that it “undersmoothes” the PCA-based estimator. To this end, we propose to choose the cut-off level slightly larger than the optimal one that minimizes an estimate of the L2 -risk of the PCA-based estimator. All these results, namely, the proposed confidence band, the asymptotic validity of the band, and the selection rule of the cut-off level, are new. We investigate the finite sample performance of the proposed confidence band via numerical simulations, which show that the proposed band, combined with the proposed selection rule of the cut-off level, works well in practice. Finally, we apply our methodology to spectrometric data, and discuss extensions of our methodology to cases where additional vector-valued regressors are present. There are extensive studies on estimation and prediction in functional linear regression models; see Cardot et al. (1999, 2003), Yao et al. (2005a), Cai & Hall (2006), Hall & Horowitz (2007), Li & Hsing (2007), Crambes et al. (2009), James et al. (2009), Cardot & Johannes (2010), Yuan & Cai (2010), Meister (2011), Delaigle & Hall (2012), and Cai & Yuan (2012). Statistical inference, such as hypothesis testing and construction of (pointwise) confidence intervals, for functional linear models is studied in Müller & Stadmüller (2005), Cardot et al. (2007), González-Manteiga & Martı́nez-Calvo (2011), Hilgert et al. (2013), Lei (2014), Shang & Cheng (2015), and Khademnoe & Hosseini-Nasab (2016). Except for Müller & Stadmüller (2005), those papers do not address confidence bands for the slope function. Cardot et al. (2007), González-Manteiga & Martı́nezCalvo (2011), Khademnoe & Hosseini-Nasab (2016) are concerned with confidence intervals for R a scalar parameter I b(t)x(t)dt for a fixed x ∈ L2 (I), and Hilgert et al. (2013) and Lei (2014) are concerned with testing the hypothesis that b = 0 against suitable alternatives. These topics are related to but substantially different from ours. Shang & Cheng (2015) develop a number of important inference results in a generalized functional linear model, which includes our model (1) as a special case. In particular, they prove a pointwise asymptotic normality result for an estimator based on a reproducing kernel Hilbert space approach (see their Corollary 3.7), which leads to valid pointwise confidence intervals for the slope function. However, they do not consider confidence bands for the slope function, and they work with a different estimator than our PCAbased estimator. Müller & Stadmüller (2005) is an important pioneering work on confidence bands for the slope function in a generalized functional linear model. However, they work with non-stochastic basis functions, and furthermore, strictly speaking, they only prove that their band is a valid confidence band for the surrogate function, but not for the slope function itself. Hence it is not formally known or at least a non-trivial question whether their band is valid when the estimated eigenfunctions are used. See Section 2.3 for detailed comparisons with the confidence band of Müller & Stadmüller (2005). Our numerical studies in Section 5 show that the 4 M. IMAIZUMI AND K. KATO confidence band of Müller & Stadmüller (2005), when applied to the PCA-basis estimator, tends to have coverage probabilities far below the nominal level. The very recent preprint of Babii (2016) studies a generic (but conservative) method to construct honest confidence bands for illposed inverse problems, which include functional linear regression as a special case. However, Babii (2016) focuses on Tikhonov regularization estimation (and thus does not cover PCA-based estimation), and works with substantially different assumptions from ours (see his Assumption 5). We also mention Bunea et al. (2011), Degras (2011), Cao et al. (2012), Ma et al. (2012), Chang et al. (2017) as references working on confidence bands for functional data. However, these paper do not deal with the functional linear regression model (1), and the methodologies and techniques used in those papers are substantially different from ours. For example, Chang et al. (2017) consider a functional regression model where a response variable is a function and a predictor variable is a vector, which is the opposite setting from ours. The rest of the paper is organized as follows. In Section 2, we informally present our methodology to construct confidence bands for b using a PCA-based estimator. In Section 3, we present theoretical guarantees of the proposed confidence band. In Section 4, we propose a practical method to choose the cut-off level used in PCA-based estimation. In Section 5, we present numerical results to verify the finite sample performance of the proposed confidence band. In Section 6, we discuss how to modify our methodology to construct a confidence band in cases where additional vector-valued regressors are present. Section 7 concludes. All the proofs are deferred to Appendix. 1.1. Notation. We will use the following notation. For any measurable functions f : I → R and RR R 1/2 1/2 2 and |||R||| = . Let L2 (I) = {f : I → R : I 2 → R, let kf k = I f 2 (t)dt I 2 R (s, t)dsdt R : f is measurable, kf k < ∞}, and define the equivalence relation ∼ for real-valued functions f, g defined on I by f ∼ g ⇔ f = g almost everywhere. Define L2 (I) by the quotient space R L2 (I) = L2 (I)/ ∼ equipped with the inner product hf ∼ , g ∼ i = I f (t)g(t)dt for f, g ∈ L2 (I) where f ∼ = {h ∈ L2 (I) : h ∼ f }; the space L2 (I) is a separable Hilbert space, and as usual, we identify any element in L2 (I) as an element of L2 (I). Define L2 (I 2 ) analogously. 2. Methodology 2.1. Functional principal component analysis. We begin with reviewing an approach to estimate b based on functional PCA. Let K(s, t) denote the covariance function of X, namely, K(s, t) = Cov{X(s), X(t)} for s, t ∈ I. We assume that the integral operator from L2 (I) into itself with kernel K, namely the covariance operator of X, is injective. The covariance operator is self-adjoint and positive definite. The Hilbert-Schmidt theorem (see e.g. Reed & Simon, 1980, Theorem VI.16) then ensures that K admits the spectral expansion K(s, t) = ∞ X k=1 κj φj (s)φj (t) 5 in L2 (I 2 ), where κ1 ≥ κ2 ≥ · · · > 0 are a non-increasing sequence of eigenvalues tending to zero 2 and {φj }∞ j=1 is an orthonormal basis of L (I) consisting of eigenfunctions of the integral operator, namely, Z K(s, t)φj (t)dt = κj φj (s), j = 1, 2, . . . . I 2 2 Since {φj }∞ j=1 is an orthonormal basis of L (I), we have the following expansions in L (I): P∞ P∞ b(t) = j=1 bj φj (t) and X(t) = E{X(t)} + j=1 ξj φj (t), where bj and ξj are defined by bj = R R I b(t)φj (t)dt and ξj = I [X(t) − E{X(t)}]φj (t)dt, respectively. Then we obtain the following alternative expression of the regression model (1): Y =a+ ∞ X bj ξj + ε. j=1 Now, observe that E(ξj ) = 0 for all j = 1, 2, . . . and  κj K(s, t)φj (s)φk (t)dsdt = 0 I2 ZZ E(ξj ξk ) = if j = k , if j 6= k which yields that E(ξj Y ) = κj bj for each j = 1, 2, . . . , namely, bj = E(ξj Y )/κj . (2) This characterization leads to a method to estimate b. Let (Y1 , X1 ), . . . , (Yn , Xn ) be independent copies of (Y, X). First, we estimate K by the emb defined as K(s, b t) = n−1 Pn {Xi (s) − X(s)}{Xi (t) − X(t)} for pirical covariance function K i=1 P b b b t) = P∞ κ b s, t ∈ I, where X = n−1 ni=1 Xi . Let K(s, j=1 j φj (s)φj (t) be the spectral expansion b in L2 (I 2 ), where κ of K b1 ≥ κ b2 ≥ · · · ≥ 0 are a non-increasing sequence of eigenvalues tending 2 to zero and {φbj }∞ j=1 is an orthonormal basis of L (I) consisting eigenfunctions of the integral b namely, operator with kernel K, Z b t)φbj (t)dt = κ K(s, bj φbj (s), j = 1, 2, . . . . I b is possible since the integral operator with kernel K b is of finite rank The spectral expansion of K (at most (n−1)), and so in addition to an orthonormal system of L2 (I) consisting of eigenfunctions corresponding to the positive eigenvalues, we can add functions so that the augmented system 2 of functions {φbj }∞ j=1 becomes an orthonormal basis of L (I). Now, let Z b ξi,j = {Xi (t) − X(t)}φbj (t)dt. I Using the characterization in (2), we estimate each bj by bbj = n−1 an estimator for b of the form bb(t) = mn X j=1 bbj φbj (t), Pn κj , i=1 ξi,j Yi /b b and consider 6 M. IMAIZUMI AND K. KATO where mn is the cut-off level such that mn → ∞ as n → ∞. Hall & Horowitz (2007) study the properties of the PCA-based estimator bb in detail and provide conditions under which the estimator is rate optimal. 2.2. Construction of confidence bands. For a given τ ∈ (0, 1), a confidence band for b with level 1 − τ is a collection of random intervals C = {C(t) = [`(t), u(t)] : t ∈ I} such that P{b(t) ∈ [`(t), u(t)] for all t ∈ I} ≥ 1 − τ. (3) In the present paper, we focus on confidence bands centered at the PCA-based estimator bb, thereby quantifying uncertainty of the PCA-based estimator bb. However, as discussed in Introduction, the requirement (3) is too stringent to our problem, and we consider here a less demanding requirement. Namely, instead of requiring (3), we aim at constructing a confidence band C = {C(t) = [`(t), u(t)] : t ∈ I} such that for given τ1 , τ2 ∈ (0, 1), with probability at least 1 − τ1 , the proportion of the set of t at which b is not covered by C is at most τ2 , i.e., P {λ ({t ∈ I : b(t) ∈ / [`(t), u(t)]}) ≤ τ2 λ(I)} ≥ 1 − τ1 , (4) where λ denotes the Lebesgue measure. If the band C satisfies the new requirement (4), then the band C covers b over more than 100(1 − τ2 )% of points in I with probability at least 1 − τ1 , and so as long as τ2 is close to 0, the band C covers b over “most” of points in I with probability at least 1 − τ1 . Hence the new requirement (4) would be a reasonable relaxation of the former requirement (3). A relaxed coverage requirement similar to (4) appears in Cai et al. (2014) for the purpose of constructing adaptive confidence bands in nonparametric regression. We employ the relaxed coverage requirement (4) to deal with a different challenge, namely, to construct confidence bands for a series estimator with estimated basis functions. In what follows, we will informally present our methodology to construct a confidence band for the PCA-based estimator bb that satisfies (4) asymptotically. Under some regularity conditions, it will be shown that 2 nkbb − bk = mn X n j=1 where εi = Yi − a − −1/2 n X !2 εi ξbi,j /b κj + OP (mα/2+1 + n √ nm−β+α/2+1 + nmn−2β+1 ), n (5) i=1 R I b(t)[Xi (t) − E{X(t)}]dt for i = 1, . . . , n, and the last term on the right hand side on (5) is (suitably) negligible relative to the first term (the parameters α and β will be given in the next section). Observe that, by definition, n−1 n X i=1  κ bj b t)φbj (s)φbk (t)dsdt = K(s, 0 I2 ZZ ξbi,j ξbi,k = if j = k if j 6= k . 7 Hence, conditionally on X1n = {X1 , . . . , Xn }, n −1/2 n X !mn (6) εi ξbi,j /b κj i=1 j=1 is the sum of independent random vectors with mean zero, and the covariance matrix of the random vector (6) conditionally on X1n is Λn = diag(1/b κ1 , . . . , 1/b κmn ). It will be shown that, under some regularity conditions, the distribution of the random vector (6) can be approximated by that of N (0, σ 2 Λn ), and therefore the distribution of the first term on the right hand side P n of (5) can be approximated by that of σ 2 m κj , where η1 , . . . , ηmn are independent χ2 (1) j=1 ηj /b random variables independent from X1n . Note that when ε is Gaussian, then the random vector (6) has exactly the same distribution as that of N (0, σ 2 Λn ). So for a given τ ∈ (0, 1), let v uX u mn b cn (1 − τ ) = conditional (1 − τ )-quantile of t ηj /b κj given X1n , j=1 which can be computed via simulations, and consider an L2 -confidence ball for b of the form √ Bn (1 − τ ) = {b : kbb − bk ≤ σ bb cn (1 − τ )/ n}, where σ b2 = n−1 Pn i=1 (Yi −Y − (7) √ Pmn b b 2 Pn −1 b= σ b2 . It will be j=1 bj ξi,j ) with Y = n i=1 Yi , and σ shown that, under some regularity conditions, this confidence ball contains the slope function b with probability 1 − τ + o(1) as n → ∞. However, it is well known that an L2 -confidence ball is difficult to visualize/interpret, and we instead construct a confidence band for b by modifying the confidence ball, borrowing an idea of Juditsky & Lambert-Lacroix (2003); see also Section 5.8 in Wasserman (2006). To be precise, we propose the following confidence band for b: s s ( " # ) σ b b c (1 − τ ) 1 σ b b c (1 − τ ) 1 1 n 1 b = bb(t) − n √ √ Cb = C(t) :t∈I , , bb(t) + τ2 λ(I) τ2 λ(I) n n (8) where τ1 and τ2 are constants such that τ1 , τ2 ∈ (0, 1). It follows from an argument similar to Wasserman (2006, p.95) that, with probability at least 1 − τ1 + o(1), the proportion of the set of t at which b is not covered by Cb is at most τ2 , namely, n n o o b P λ t ∈ I : b(t) ∈ / C(t) ≤ τ2 λ(I) ≥ 1 − τ1 + o(1), (9) so that the proposed confidence band (8) satisfies the requirement (4) asymptotically. In fact, let U be a uniform random variable on I independent of the data, and let PU denote the probability with respect to U only. Then λ n o np o b t ∈ I : b(t) ∈ / C(t) = λ(I)PU nτ2 λ(I)|bb(U ) − b(U )| > σ bb cn (1 − τ1 ) , 8 M. IMAIZUMI AND K. KATO and Markov’s inequality yields that the right hand side is bounded by nτ2 λ(I)kbb − bk2 /{b σ2b c2n (1 − τ1 )}. Therefore, n   o n o 2 2 2 b b P λ {t ∈ I : b(t) ∈ / C(t)} ≤ τ2 λ(I) ≥ P nkb − bk ≤ σ b b cn (1 − τ1 ) = 1 − τ1 + o(1), which yields the desired result. The values of τ1 and τ2 are chosen by users, where 1 − τ1 is the nominal level and so a popular choice of τ1 would be 0.1 or 0.05. The value of τ2 is the proportion of the set of points not-covered by the confidence band, and in practice we should choose τ2 to be small (but we should not take τ2 to be too small since in that case the width of the band will be too large). In the numerical studies in Section 5, we take τ2 = 0.1. In theory, it is relatively straightforward to see that we may take τ2 in such a way that τ2 = τ2,n ↓ 0, so that the proportion of the excluded domain is asymptotically vanishing. See also Remark 3 ahead. For computation of the quantile b cn (1 − τ1 ), we propose to use simulations. An alternative way P n to approximate the quantile b cn (1 − τ1 ) is to apply the central limit theorem to m κj . In j=1 ηj /b P d m n κ b−1 fact, under some regularity conditions, it holds that q Pm1 n −2 j=1 j (ηj − 1) → N (0, 1), 2 k=1 κ bk q P Pmn −2 −1 b−1 so that b c2n (1 − τ1 ) can be approximated as nj=1 κ bk , where Φ is k=1 κ j + Φ (1 − τ1 ) 2 the distribution function of the standard normal distribution. However, in applications, mn is small compared with n, and the above normal approximation can be imprecise. Therefore, we recommend to directly simulate the quantile b cn (1 − τ1 ) instead of relying on the central limit theorem. Note that our confidence band (8) is in general conservative, namely, lim inf n→∞ P{λ({t ∈ I : b b(t) ∈ / C(t)}) ≤ τ2 λ(I)} is in general larger than 1 − τ1 , which is clear from the discussion above. However, the numerical studies in Section 5 suggest that the width of our band, with the cut-off level chosen by the rule suggested in Section 4, is reasonably narrow in practice. The proposed confidence bands allow a small portion of the domain to be excluded from the confidence bands. Despite that the proposed confidence bands do not cover all points in the domain with a given level, they are able to capture a global shape of the slope function, which helps practitioners to make inference on the slope function. Furthermore, partly because of the conservative nature of our bands, in our numerical studies, we find that our bands tend to have reasonably good uniform coverage probabilities. Hence, we believe that the proposed methodology adds a valuable option for inference on functional linear regression. Remark 1 (Equivariance of the band). It is worth noting that our confidence band (8) is equivariant under location-scale changes to the index t. Suppose that I = [c, c], and consider a change of variable t = c + u(c − c) for u ∈ [0, 1]. Let Xi† (u) = Xi (c + u(c − c)) and b† (u) = R R1 (c−c)b(c+u(c−c)) for u ∈ [0, 1], and observe that I b(t)Xi (t)dt = 0 b† (u)Xi† (u)du. Furthermore, √ let κ b† = κ bj /(c − c) and φb† (u) = c − cφbj (c + u(c − c)) for u ∈ [0, 1]. Then {(b κ† , φb† )}∞ j j j j j=1 9 b † of {X † }n , i.e., are eigenvalue/eigenfunction pairs for the empirical covariance function K i i=1 R1 † † † b† b b bj φj (v). It is not difficult to see that the PCA-based estimator with 0 K (v, u)φj (u)du = κ † b + u(c − c)) b† cut-off level mn for b based on the data {(Yi , Xi† )}ni=1 will qPbe b (u) = (c√− c)b(c qP mn mn κ†j = c − c κj , for u ∈ [0, 1]. Next, the conditional (1 − τ1 )-quantile of j=1 ηj /b j=1 ηj /b √ † denoted by b cn (1 − τ1 ), is identical to c − cb cn (1 − τ1 ), and so our confidence band applied to the data {(Yi , Xi† )}ni=1 will be s " # " r # † σ b b c (1 − τ ) 1 σ b b c (1 − τ ) 1 n 1 n 1 † † √ √ Cb (u) = bb (u) ± = (c − c) bb(c + u(c − c)) ± τ2 τ2 (c − c) n n b + u(c − c)) for for u ∈ [0, 1]. Therefore, we conclude that b† (u) ∈ Cb† (u) ⇔ b(c + u(c − c)) ∈ C(c b − c). u ∈ [0, 1], and so λ({u ∈ [0, 1] : b† (u) ∈ / Cb† (u)} = λ({t ∈ I : b(t) ∈ / C(t)})/(c Remark 2. In the present paper, we assume that entire trajectories of Xi ’s are observed without measurement errors, for the simplicity of the theoretical analysis. In applications, functional predictor variables are often discretely observed with measurement errors. In such cases, a standard approach is to first estimate Xi using smoothing techniques (cf Yao et al., 2005b; Hall et al., 2006). 2.3. Comparison with the confidence band of Müller & Stadmüller (2005). Müller & Stadmüller (2005) is an important pioneering work on confidence bands for the slope function in a generalized functional linear model. In the context of our model (1), their proposal reads as follows. Suppose for the sake of simplicity that E(Y ) = 0 and E{X(t)} = 0 for all 2 t ∈ I. For a given, non-stochastic orthonormal basis {ρj }∞ j=1 of L (I), expand Xi and b as R R P P Xi = j ζi,j ρj and b = j θj ρj with ζi,j = I Xi (t)ρj (t)dt and θj = I b(t)ρj (t)dt, respecP b b b T tively. Now, observe that Yi = j ζi,j θj + εi and obtain an estimator θ = (θ1 , . . . , θmn ) of θ = (θ1 , . . . , θmn )T by regressing Yi on (ζi,1 , . . . , ζi,mn )T , where mn → ∞ as n → ∞. Müller & Stadmüller (2005) show that, under some regularity conditions, T (Γ/σ 2 )(θ−θ)−m b b n(θ−θ) n √ 2mn d → N (0, 1), where Γ = {E(ζ1,j ζ1,k )}1≤j,k≤mn . Based on this result, they propose the following confidence band: denote by (e1 , λ1 ), . . . , (emn , λmn ) the eigenvectors/eigenvalues of the matrix Γ, and consider v u mn ωj2 (t) u cn (1 − τ ) X eb(t) ± σ t e , t ∈ I, n λj (10) j=1 where ωj (t) = Pmn k=1 ρk (t)ej,k √ with ej = (ej,1 , . . . , ej,mn )T , and e cn (1−τ ) = mn + 2mn Φ−1 (1−τ ). To compare our band (8) with (10), assume that the covariance function K is known for (10) ∞ and use the eigenfunctions {φj }∞ j=1 for {ρj }j=1 . In that case, the band (10) is of the form v u mn 2 φj (t) u cn (1 − τ ) X eb(t) ± σ t e , t ∈ I. (11) n κj j=1 10 M. IMAIZUMI AND K. KATO In the theoretical analysis, Müller & Stadmüller (2005) work with non-stochastic basis functions, and furthermore, strictly speaking, they only prove that the band (10) is a valid confiP n dence band for the surrogate function m j=1 θj ρj (i.e., they prove that the band (10) contains Pmn j=1 θj ρj (t) for all t ∈ I with probability at least 1 − τ + o(1)), but not for the slope function b itself. Hence it is not formally known or at least a non-trivial question whether the band (11) is valid for b when the estimated eigenfunctions {φbj }∞ are used. It would be possible to show j=1 that, under suitable regularity conditions, the band (11), with (κj , φj ) replaced by (b κj , φbj ), conPmn b tains the (random) surrogate function j=1 b̆j φj with probability at least 1 − τ + o(1), where R b̆j = I b(t)φbj (t)dt. However, to show that the band is valid for b (i.e., to show that the band contains b(t) for all t ∈ I with probability at least 1 − τ + o(1)), we would have to show that P n b the supremum bias supt∈I |b(t) − m j=1 b̆j φj (t)| (which is random) is negligible relative to the infimum width of the band, which is highly non-trivial. 3. Theoretical guarantees In this section, we study validity of our confidence band. We separately consider the cases where the error distribution is Gaussian or not. 3.1. Case with Gaussian errors. We first consider the case where the error distribution is Gaussian. In this case, we make the following conditions. Assumption 1. There exist constants α > 1, β > α/2+3/2, and C1 > 1 such that (i) E(kXk2 ) < ∞ and E(ξj4 ) ≤ C1 κ2j for all j = 1, 2, . . . ; (ii) κj ≤ C1 j −α and κj − κj+1 ≥ C1−1 j −α−1 for all j = 1, 2, . . . ; (iii) |bj | ≤ C1 j −β for all j = 1, 2, . . . ; (iv) m2α+2 /n → 0 and mα+2β−1 /n → ∞. n n Conditions (i)–(iii) are adapted from Hall & Horowitz (2007) and now (more or less) standard in the theoretical analysis of PCA-based estimators (cf. Cai & Hall, 2006; Meister, 2011; Lei, 2014; Kong et al., 2016). Estimation of the slope function b is an ill-posed inverse problem (as discussed in Hall & Horowitz (2007)), and the value of α that appears in Condition (ii) measures the “ill-posedness” of the estimation problem (the larger α is, the more difficult estimation of b will be). The second part of Condition (ii), which ensures sufficient estimation accuracy of the empirical eigenfunctions, also implies that κj ≥ j −α /(C1 α) for all j = 1, 2, . . . . Condition (iii) is concerned with smoothness of b. The requirement that m2α+2 /n → 0 is a technical condition used n to control estimation errors of the empirical eigenfunctions. The last condition, mα+2β−1 /n → 0, n can be interpreted as an “undersmoothing” condition. From Hall & Horowitz (2007), the optimal rate of mn for estimation is mn ∼ n1/(α+2β) , but the last condition requires that mn has to be of larger order than the optimal one in order that the bias is negligible relative to the “variance” term. Such an undersmoothing condition is commonly used in construction of confidence bands. See Section 5.7 in Wasserman (2006) for related discussions. We will discuss practical choice of 11 the cut-off level in the next section. Note that to ensure that Condition (iv) is non-void, we need that β > α/2 + 3/2. Theorem 1. For given τ1 , τ2 ∈ (0, 1), consider the confidence band Cb defined in (8). Let ε ∼ N (0, σ 2 ). Then under q Assumption 1, the result (9) holds as n → ∞. Furthermore, the width of the band Cb is OP ( mα+1 n /n). The proof of Theorem 1 consists of approximating the distribution of nkbb − bk2 by that of P n σ2 m κj where η1 , . . . , ηmn are independent χ2 (1) random variables independent of X1n , j=1 ηj /b but since the approximating distribution also depends on n (and random), the proof of the theorem is non-trivial. To formally show that the error of the stochastic approximation in (5) is negligible for the distributional approximation, we rely on concentration and anti-concentration inequalities for a weighted sum of independent χ2 (1) random variables; see Lemma 1. Remark 3. Inspection of the proof q shows that the result (9) holds even if we choose τ2 = τ2,n ↓ 0. The width of the band is then OP { mα+1 n /(nτ2,n )}. Remark 4 (Uniformity in distribution). The coverage result (9) holds uniformly over a certain class of distributions of (Y, X). For given α > 1, β > α/2 + 3/2, and C1 > 1, let FNormal (α, β, C1 ) be the class of distributions of (Y, X) that verify (1) and Conditions (i)–(iii) in Assumption 1, and such that ε ∼ N (0, σ 2 ) is independent from X with C1−1 ≤ σ 2 ≤ C1 . Then, provided that m2α+2 /n → 0 and mnα+2β−1 /n → ∞, we have n n n o o b lim inf inf PF λ t ∈ I : b(t) ∈ / C(t) ≤ τ2 λ(I) ≥ 1 − τ1 , n→∞ F ∈FNormal (α,β,C1 ) (12) where PF denotes the probability under F . In fact, to show (12), it is enough to verify that for any sequence Fn ∈ FNormal (α, β, C1 ), the result (9) holds for (Y1 , X1 ), . . . , (Yn , Xn ) ∼ Fn i.i.d. for n ≥ 1, which is not difficult to verify in view of the proof of Theorem 1. Furthermore, the result (12) also holds even if τ2 = τ2,n ↓ 0. A similar comment applies to Theorem 2 below. 3.2. Case with non-Gaussian errors. Next, we consider the case where the error distribution is possibly non-Gaussian. Instead of Assumption 1, we make the following conditions. For q > 1 and α > 0, let c(q, α) = max{2α + 2, 7/(2 − 2/q)}. Assumption 2. There exist an integer q ≥ 2 and constants α > 1, β > {c(q, α) − α + 1}/2, and C1 > 0 such that E(ξj2q ) ≤ C1 κqj for all j = 1, 2, . . . , (13) and Conditions (ii) and (iii) in Assumption 1 are satisfied. Furthermore, assume that mc(q,α) /n → 0 n and mα+2β−1 /n → ∞. n (14) 12 M. IMAIZUMI AND K. KATO These conditions guarantee that all the conclusions of Theorem 1 remain valid even when the error is non-Gaussian. Theorem 2. Suppose that ε has mean zero and variance σ 2 > 0, and that E[ε4 ] < ∞. Then under Assumption 2, all the conclusions of Theorem 1 remain true. In comparison with the Gaussian error case, we require more restrictive conditions (note that if 2/q E(ξj2q ) ≤ C1 κqj for some q ≥ 2, then E(ξj4 ) ≤ {E(ξj2q )}2/q ≤ C1 κ2j ). These additional conditions are used to apply a high-dimensional central limit theorem of Bentkus (2005). Condition (13) is satisfied for all q ≥ 2 if X is Gaussian. Conditions similar to (13) are employed also in e.g. Cai & Hall (2006) and Hilgert et al. (2013). If we may take q to be sufficiently large, namely, q > (4α + 4)/(4α − 3), then the conditions on mn reduce to the ones in the Gaussian error case. 4. Choice of cut-off levels For the proposed confidence band to work in practice, the choice of the cut-off level mn is crucial. In theory, we should choose mn so that it is of larger order than the optimal rate n1/(α+2β) for estimation under the L2 -risk. The idea here is to construct an estimate of the L2 -risk of bb with given cut-off level m, and to choose a cut-off level slightly larger than the optimal cut-off level that minimizes the estimate of the L2 -risk. Construction of an estimate of the L2 -risk of bb is inspired P∞ P by Cavalier et al. (2002). Recall that b is written as b(t) = ∞ j=1 (cj /κj )φj (t), j=1 bj φj (t) = where cj = E(ξj Y ). Suppose first that the covariance function K is known, and consider, for a given cut-off level m, the estimator bb∗ (t; m) = m X bb∗ φj (t) = j j=1 Pn −1 where b c∗j = n bb∗ (·; m), namely, i=1 ξi,j Yi m X b c∗j φj (t), κj j=1 and bb∗j = b c∗j /κj . Let R∗ (m) denote the L2 -risk of the estimator X ∗ R (m) = E[kbb∗ (·; m) − bk2 ] = b2j + j>m m X Var(b c∗j ) j=1 κ2j 2 = kbk − m X j=1 m b2j 1 X Var(ξj Y ) + . n κ2j j=1 Minimizing R∗ (m) is equivalent to minimizing ∗ Ř (m) = − m X j=1 m b2j 1 X Var(ξj Y ) + . n κ2j j=1 Still Ř∗ (m) is unknown, but we may estimate Ř∗ (m) by m X R (m) = − (bb∗j )2 + b∗ j=1 m X 2 n(n − 1) j=1 Pn i=1 (ξi,j Yi κ2j −b c∗j )2 . b∗ (m) is an unbiased estimator of Ř∗ (m). In fact, since E[(bb∗j )2 ] = b2j + Var(b c∗j )/κ2j , R 13 b and for our estimator bb, we use In practice, K is unknown, and so we replace K by K, m Pn m X X b cj )2 2 2 i=1 (ξi,j Yi − b b b R(m) = − , bj + n(n − 1) κ b2j j=1 j=1 P as an estimate of the L2 -risk of bb with cut-off level m, where b cj = n−1 ni=1 ξbi,j Yi . Now, let m bn b be a minimizer of R(m) over a candidate set chosen by users; our recommendation is to choose either max{m b n , 2} or m b n + 1 for construction of the proposed confidence band. 5. Numerical results 5.1. Simulations. We consider the following data generating process. Let I = [0, 1], φ1 ≡ 1 and φj+1 (t) = 21/2 cos(jπt) for j = 1, 2 . . . , and generate (X, Y ) as follows: Z 50 50 X X −α/2 Y = b(t)X(t)dt + ε, X = j Uj φ j , b = bj φj , b1 = 1, bj = 4(−1)j j −β for j 6= 1, I j=1 j=1 where Uj ∼ Unif.[−31/2 , 31/2 ] are independent. The distribution of the error term ε is either N (0, 1) or normalized χ2 (5). We consider the following configurations for (α, β): α ∈ {1.1, 2} and β ∈ {2.6, 3.2}. We construct confidence bands of the form (8) with τ1 = τ2 = 0.1, and examine the following sample sizes: n ∈ {100, 200, . . . , 1000}. We evaluate the confidence bands via b ∀t ∈ I} UCP = P{b(t) ∈ C(t) n n o o b and MCP = P λ t ∈ I : b(t) ∈ / C(t) ≤ τ2 , where UCP signifies “uniform coverage probability” while MCP signifies “modified coverage probability”. We compare the performance of our confidence band (8) with that of the MüllerStadmüller (MS) band (11) where we replace (κj , φj ) and σ by (b κj , φbj ) and σ b, respectively (we have also examined a version of the MS band by replacing e cn (1 − τ1 ) with the (1 − τ1 )-quantile of the χ2 (mn )-distribution, trying to improve upon the performance of the MS band; however, we have obtained almost similar results to the ones presented below for that version). Recall that our band aims at controlling MCP at level 1 − τ1 , while the MS band aims at controlling UCP at level 1 − τ1 . The number of Monte Carlo repetitions in each of the following experiments is 2000. Computations of integrals and evaluations of MCPs and UCPs are carried out via discretizing the unit interval [0, 1] into 50 equally spaced grids. For computation of m b n discussed in the previous section, we have to choose a set of candidate cut-off levels. In this simulation study, we take {1, . . . , 10} as a set of candidate cut-off levels. Before looking at the performance of the confidence bands, we shall look at how our selection rules of the cut-off level work in practice. For comparison, we also report the oracle cut-off level m∗ that minimizes the L2 -risk of the PCA-based estimator. That is, denoting by bb(·; m) the n PCA-based estimator with given cut-off level, m∗n is defined by m∗n = arg min{E[kbb(·; m) − bk2 ] : m = 1, 2, . . . , 10}. 14 M. IMAIZUMI AND K. KATO 5.5 Cut off(α =1.1,β =2.6) 5.0 4.5 4.0 3.5 3.0 2.5 2.0 1.5 200 400 600 800 1000 n 0.45 RMSE(α =1.1,β =2.6) 5.5 Cut off(α =1.1,β =3.2) 5.0 4.5 4.0 3.5 3.0 2.5 2.0 1.5 200 400 600 800 1000 n 0.40 0.40 0.35 0.35 0.30 0.30 0.25 0.25 0.20 0.20 0.15 RMSE(α =1.1,β =3.2) 0.45 Cut off(α =1.1,β =2.6) Cut off(α =1.1,β =3.2) 0.40 0.35 0.30 0.25 0.20 5.5 5.0 4.5 4.0 3.5 3.0 2.5 2.0 1.5 200 400 600 800 1000 n 0.35 RMSE(α =1.1,β =3.2) 0.2 0.25 0.30 0.20 0.25 0.15 0.20 0.15 200 400 600 800 1000 0.10 200 400 600 800 1000 0.15 n 0.3 n 0.2 200 400 600 800 1000 0.1 200 400 600 800 1000 n 0.35 RMSE(α =2.0,β =3.2) 0.4 5.5 5.0 4.5 4.0 3.5 3.0 2.5 2.0 1.5 200 400 600 800 1000 0.30 n 0.5 n Cut off(α =2.0,β =2.6) 0.40 5.5 Cut off(α =2.0,β =3.2) 5.0 4.5 4.0 3.5 3.0 2.5 2.0 1.5 200 400 600 800 1000 RMSE(α =2.0,β =2.6) 0.3 n RMSE(α =1.1,β =2.6) 0.6 0.4 n n n 0.5 0.15 200 400 600 800 1000 0.10 200 400 600 800 1000 5.5 5.0 4.5 4.0 3.5 3.0 2.5 2.0 1.5 200 400 600 800 1000 5.5 Cut off(α =2.0,β =2.6) 5.0 4.5 4.0 3.5 3.0 2.5 2.0 1.5 200 400 600 800 1000 n Cut off(α =2.0,β =3.2) 5.5 5.0 4.5 4.0 3.5 3.0 2.5 2.0 1.5 200 400 600 800 1000 n RMSE(α =2.0,β =2.6) 0.30 RMSE(α =2.0,β =3.2) 0.28 0.26 0.24 0.22 0.20 0.18 0.16 0.14 200 400 600 800 1000 0.12 200 400 600 800 1000 n n Figure 1. Values of the cut-off levels together with those of the RMSE for each of the cut-off levels with Gaussian noise (upper 2 rows) and χ2 noise (lower 2 rows). Stars correspond to cases with oracle cut-off level m∗n , triangles and circles correspond to those with m b n + 1 and max{m b n , 2}, respectively. Monte Carlo averages of cut-off levels m b n + 1 and max{m b n , 2} are reported. 15 Figure 1 presents values of the cut-off levels together with those of the RMSE for each of the cut-off levels. The RMSE is the square root of the L2 -risk, and Monte Carlo averages of cutoff levels m b n + 1 and max{m b n , 2} are reported. For each of the parameter configurations, as expected, all of m b n + 1, max{m b n , 2}, and m∗n increase as n increases (with one exception for m∗n in the case where (n, α, β) = (300, 1.1, 2.6)), and the values of the RMSE for each cut-off level decrease as n increases. Furthermore, m b n + 1 tends to be larger (on average) than the oracle one m∗n , but max{m b n , 2} tends to be smaller (on average) than m∗n , although their differences are not large. In terms of the RMSE, both of our rules m b n + 1 and max{m b n , 2} work reasonably well, in comparison with the optimal RMSE (i.e., the RMSE with m∗n ). Interestingly, m bn + 1 tends to yield better RMSEs than max{m b n , 2}. Now, we shall look at the performance of the confidence bands. The simulated coverage probabilities are plotted in Figure 2. The following observations can be drawn from the figure: 1) the coverage probabilities of the MS band, either in UCP or MCP, tend to be far below the nominal coverage probability 90%. 2) The MCPs of our band with cut-off level m b n + 1 satisfy the nominal level in all cases, and those with cut-off level max{m b n , 2} are reasonably close to the nominal level except for a few cases. Note that our band with cut-off level m b n + 1 appears to be conservative, but this is not inconsistent with the theory. 3) Although our band is not designed to control UCP, our band with cut-off level m b n + 1 has reasonably good UCPs. The simulation results on the expected maximum width and expected mean width of our confidence band (8) and MS band (11) are plotted in Figures 3 and 4. For a confidence band C = {[`(t), u(t)] : t ∈ I}, the expected maximum width and expected mean width are defined by   E max{u(t) − `(t)} t∈I  and E 1 λ(I) Z  {u(t) − `(t)}dt , I respectively. Note that our confidence band has constant width, so that the maximum and mean widths are identical for our band. From these figures, it is observed that our confidence band (8) tends to have larger width than the MS band (11), which is not surprising in view of the comparison of the coverage probabilities of the bands. Namely, the MS band has narrower widths, but this is at the cost of (severe) under-coverages. However, the width of our band is not excessively large compared with the MS band. It is worth noting that in some cases, the UCPs and MCPs of our band with cut-off level max{m b n , 2} decrease as n increases. This is partly because the bias has non-negligible effects relative to the width of the band, since the choice max{m b n , 2} is in fact not undersmoothing the function estimate. In conclusion, the simulation results suggest that, in terms of the coverage probability, our confidence band with cut-off level m b n + 1 is recommended, but using the cut-off level max{m b n , 2} would be an alternative option if one prefers narrower confidence bands. 16 1.0 M. IMAIZUMI AND K. KATO UCP(α =1.1,β =2.6) 1.0 MCP(α =1.1,β =2.6) 1.0 UCP(α =2.0,β =2.6) 1.0 0.8 0.8 0.8 0.8 0.6 0.6 0.6 0.6 0.4 0.4 0.4 0.4 0.2 0.2 0.2 0.2 0.0 0.0 0.0 0.0 200 400 600 800 1000 n 1.0 UCP(α =1.1,β =3.2) 200 400 600 800 1000 n 1.0 MCP(α =1.1,β =3.2) 200 400 600 800 1000 n 1.0 UCP(α =2.0,β =3.2) 1.0 0.8 0.8 0.8 0.6 0.6 0.6 0.6 0.4 0.4 0.4 0.4 0.2 0.2 0.2 0.2 0.0 0.0 0.0 0.0 n 1.0 UCP(α =1.1,β =2.6) 200 400 600 800 1000 n 1.0 MCP(α =1.1,β =2.6) 200 400 600 800 1000 n 1.0 UCP(α =2.0,β =2.6) 1.0 0.8 0.8 0.8 0.8 0.6 0.6 0.6 0.6 0.4 0.4 0.4 0.4 0.2 0.2 0.2 0.2 0.0 200 400 600 800 1000 0.0 n 1.0 UCP(α =1.1,β =3.2) 200 400 600 800 1000 0.0 n 1.0 MCP(α =1.1,β =3.2) 200 400 600 800 1000 0.0 n 1.0 UCP(α =2.0,β =3.2) 1.0 0.8 0.8 0.8 0.8 0.6 0.6 0.6 0.6 0.4 0.4 0.4 0.4 0.2 0.2 0.2 0.2 0.0 200 400 600 800 1000 n 0.0 200 400 600 800 1000 n 0.0 200 400 600 800 1000 n 200 400 600 800 1000 n 0.8 200 400 600 800 1000 MCP(α =2.0,β =2.6) 0.0 MCP(α =2.0,β =3.2) 200 400 600 800 1000 n MCP(α =2.0,β =2.6) 200 400 600 800 1000 n MCP(α =2.0,β =3.2) 200 400 600 800 1000 n Figure 2. Coverage probabilities with Gaussian noise (upper 2 rows) and χ2 noise (lower 2 rows). Black markers show coverage probabilities of our band (8), while white markers show those of the MS band (11). Circles correspond to cases with cut-off level max{m b n , 2}, triangles to those with m b n + 1. The dashed line shows the value 1 − τ1 = 0.90. 5.2. Spectrometric data for predicting fat content. To see how our methodology works for real data, we apply our confidence band for regression of fat content in pieces of meat on spectra of light absorption of these substances. In chemometrics, one often observes a spectrum of light absorption of a substance measured at different wavelengths, and such spectral curves can be 17 Maximum Width(α =1.1,β =2.6) Maximum Width(α =1.1,β =3.2) Maximum Width(α =2.0,β =2.6) Maximum Width(α =2.0,β =3.2) 3.5 3.0 2.5 2.0 1.5 1.0 0.5 3.5 3.0 2.5 2.0 1.5 1.0 0.5 200 400 600 800 1000 3.5 3.0 2.5 2.0 1.5 1.0 0.5 200 400 600 800 1000 3.5 3.0 2.5 2.0 1.5 1.0 0.5 200 400 600 800 1000 200 400 600 800 1000 n n n n Maximum Width(α =1.1,β =2.6) Maximum Width(α =1.1,β =3.2) Maximum Width(α =2.0,β =2.6) Maximum Width(α =2.0,β =3.2) 3.5 3.0 2.5 2.0 1.5 1.0 0.5 3.5 3.0 2.5 2.0 1.5 1.0 0.5 200 400 600 800 1000 3.5 3.0 2.5 2.0 1.5 1.0 0.5 200 400 600 800 1000 n 3.5 3.0 2.5 2.0 1.5 1.0 0.5 200 400 600 800 1000 n 200 400 600 800 1000 n n Figure 3. Expected maximum width of confidence bands with Gaussian noise (upper row) and χ2 noise (lower row). Black markers correspond to our band (8), while white markers to the MS band (11). Circles correspond to cases with cut-off level max{m b n , 2}, triangles to those with m b n + 1. Mean Width(α =1.1,β =2.6) Mean Width(α =1.1,β =3.2) Mean Width(α =2.0,β =2.6) Mean Width(α =2.0,β =3.2) 3.5 3.0 2.5 2.0 1.5 1.0 0.5 3.5 3.0 2.5 2.0 1.5 1.0 0.5 200 400 600 800 1000 3.5 3.0 2.5 2.0 1.5 1.0 0.5 200 400 600 800 1000 n 3.5 3.0 2.5 2.0 1.5 1.0 0.5 200 400 600 800 1000 200 400 600 800 1000 n Mean Width(α =1.1,β =2.6) Mean Width(α =1.1,β =3.2) Mean Width(α =2.0,β =2.6) Mean Width(α =2.0,β =3.2) 3.5 3.0 2.5 2.0 1.5 1.0 0.5 n 3.5 3.0 2.5 2.0 1.5 1.0 0.5 200 400 600 800 1000 n n 3.5 3.0 2.5 2.0 1.5 1.0 0.5 200 400 600 800 1000 n 3.5 3.0 2.5 2.0 1.5 1.0 0.5 200 400 600 800 1000 n 200 400 600 800 1000 n Figure 4. Expected mean width of confidence bands with Gaussian noise (upper row) and χ2 noise (lower row). Black markers correspond to our band (8), while white markers to the MS band (11). Circles correspond to cases with cut-off level max{m b n , 2}, triangles to those with m b n + 1. 18 M. IMAIZUMI AND K. KATO regarded as functional data; see Borggaard and Thodberg (1992) and Chapter 5 of Ferraty & Vieu (2006). The analysis with spectrometric data is quick and non-destructive, and thus it is often used for investigating the properties of e.g. a food sample. We use the spectrometric data from http://lib.stat.cmu.edu/datasets/tecator and apply them for predicting the fat content in pieces of pure meat. In the dataset, we observe spectral curves from 215 pieces of finely chopped meat (recorded on a Tecator Infratec Food and Feed Analyzer) measured from wavelengths 850 nm to 1050 nm. Let {Xi (t) : t ∈ [850, 1050]}215 i=1 denote these spectral curves, the graphs of which are plotted in Figure 5. The dataset also contains the fat content Yi in each peace of meat measured by an analytical chemical processing. 5.5 Spectrometric data Confidence Band (5) 15 5.0 10 10 4.0 5 5 3.5 0 0 5 5 4.5 3.0 2.5 2.0 850 900 950 1000 1050 10 900 950 Confidence Band (6) 15 1000 1050 10 900 950 1000 Wave Length Wave Length Wave Length MS Confidence Band (5) MS Confidence Band (6) 15 15 10 10 5 5 0 0 5 5 10 900 950 1000 Wave Length 1050 10 900 950 1000 Wave Length 1050 1050 Figure 5. Spectrometric data (upper far left panel) and the estimates bb (dashed lines) and confidence bands (gray areas). The upper right two panels depict our confidence bands with cut-off levels 5 (left) and 6 (right), and lower two panels depict the MS bands with cut-off levels 5 (left) and 6 (right). The estimates bb and confidence bands Cb with cut-off levels 5 and 6 are plotted in the upper right two panels in Figure 5 where we set τ1 = τ2 = 0.1 (note: we work with the original index set [850, 1050]; if we normalize the index set to [0, 1] as in Remark 1, then the vertical axises in the right two panels in Figure 5 should be multiplied by 1050 − 850 = 200). Note that the value 19 of m b n is 5 for this dataset. The variance estimates are σ b2 = 11.14 for mn = 5 and σ b2 = 8.59 for mn = 6. For comparison, we also plot the 90% MS bands with cut-off levels 5 and 6. The figure shows that both of our bands are reasonably narrow. Confidence bands are useful to identify ranges of wavelengths playing a minor (or major) role in predicting the fat content. Figure 5 leads to the following two observations. First, there are some peaks in the estimates (negative at around 900 nm and 950 nm, and positive at around 930 nm) and our confidence bands at those peaks do not contain 0. Thus the spectra at around those wavelengths certainly contribute to the fat content prediction. Second, for higher wavelengths (i.e., wavelengths higher than 970 nm), our confidence band with cut-off level 6 almost always contains 0, and our confidence band with cut-off level 5 also contains 0 except at around 1050 nm. This suggests that the spectra at higher wavelengths do not contribute much to the fat content prediction. 6. Extension to cases with additional regressors In some applications, we may want to include a finite dimensional vector regressor Z = (Z1 , . . . , Zd )T ∈ Rd which we assume to include the constant Z1 ≡ 1, in addition to a functional regressor X (cf. Shin, 2009; Kong et al., 2016). Consider the model T Z Y =Z γ+ b(t)X(t)dt + ε, (15) I where ε is independent of (Z, X) with mean zero and variance σ 2 ∈ (0, ∞), and γ ∈ Rd and b ∈ L2 (I) are unknown parameters. We shall discuss how to modify our methodology to construct a confidence band for b in the model (15). In the following discussion, we will assume that E(Zj2 ) < ∞ for all j = 2, . . . , d, E(kXk2 ) < ∞, and the matrix E(ZZ T ) is invertible. The idea here is to partial out the effect of Z from X. To this end, consider X c (t) = X(t) − R Z T Υ(t) with Υ(t) = {E(ZZ T )}−1 E{ZX(t)}, and observe that Y = Z T γ c + I b(t)X c (t)dt + ε where γ c = γ + {E(ZZ T )}−1 E(Zhb, Xi). Let K denote the covariance function of X c , namely, K(s, t) = E{X c (s)X c (t)} for s, t ∈ I (note that E{X c (t)} = 0 since Z1 ≡ 1), and assume that the integral operator from L2 (I) into itself with kernel K is injective, so that K admits the spectral P expansion K(s, t) = j κj φj (s)φj (t) where κ1 ≥ κ2 ≥ · · · > 0 and {φj } is an orthonormal P P 2 basis of L (I). Expanding b and X c as b = j bj φj and X c = j ξj φj with bj = hb, φj i and ξj = hX c , φj i, we have Y = ZT γc + X bj ξj + ε. j Importantly, each ξj and Z are uncorrelated, namely, E(ξj Z) = 0, so that we have bj = E(ξj Y )/κj as before. 20 M. IMAIZUMI AND K. KATO To estimate b, we shall first estimate K. Let (Y1 , Z1 , X1 ), . . . , (Yn , Zn , Xn ) be independent b c (t) = Xi (t) − Z T Υ(t) b copies of (Y, Z, X), and estimate X c (t) by X with i i i  −1   n n     X X b Υ(t) = n−1 Zj ZjT n−1 Zj Xj (t) .     j=1 j=1 P b t) = n−1 Pn X bc bc b Now, we estimate K by K(s, bj φbj (s)φbj (t) i=1 i (s)Xi (t) for s, t ∈ I, and let K(s, t) = jκ b where κ be the spectral expansion of K b1 ≥ κ b2 ≥ · · · ≥ 0 and {φbj } is an orthonormal basis of L2 (I). Under this notation, the rest of the procedure is the same as before (replace Xi − X b c ). Namely, estimate each bj by bbj = n−1 Pn Yi ξbi,j /b b c , φbj i, and estiby X κj with ξbi,j = hX i i i=1 Pmn b b b mate b by b = j=1 bj φj . In construction of confidence bands, estimation of the error variance P b c i)2 , where σ 2 is needed. We propose to estimate σ 2 by σ b2 = n−1 ni=1 (Yi − ZiT γ bc − hbb, X i P P γ bc = {n−1 ni=1 Zi ZiT }−1 {n−1 ni=1 Zi Yi }. 7. Conclusion In the present paper, we have proposed a simple method to construct confidence bands, centered at a PCA-based estimator, for the slope function in a functional linear regression model. The proposed confidence band is aimed at covering the slope function at “most” of points with a prespecified probability, and we have proved its asymptotic validity under suitable regularity conditions. Importantly, to the best of our knowledge, this is the first paper that derives confidence bands having theoretical justifications for the PCA-based estimator. We have also proposed a practical method to choose the cut-off level. The numeral studies have shown that the proposed confidence band, combined with the proposed selection rule of the cut-off level, works well in practice. Appendix A. Proofs A.1. Proof of Theorem 1. We first prove the following technical lemma, which is concerned with concentration and anti-concentration of a weighted sum of independent χ2 (1) random variables. Lemma 1. Let η1 , . . . , ηm be independent χ2 (1) random variables, and let a1 , . . . , am be nonnegP 2 ative constants such that σa2 = m j=1 aj > 0. (i) (Anti-concentration). For every h > 0,   m X p sup P  aj ηj − z ≤ h ≤ 2 2h/(σa π), z>0 where σa = p σa2 . j=1 21 (ii) (Concentration). For every c > 0 and r > 0,   m m X  X −1 P aj ηj ≥ (1 + c) aj + 2(1 + c )amax r ≤ e−r ,   j=1 j=1 where amax = max1≤j≤m aj . Proof. Part (i) follows from Lemma 7.2 in Xu et al. (2014), and Part (ii) is derived from the Gaussian concentration inequality. For the sake of completeness, we provide their proofs. P Pm Part (i). Since supz>0 P(| m j=1 aj ηj − z| ≤ h) = supz>0 P(| j=1 (aj /σa )ηj − z| ≤ h/σa ) for every h > 0, it suffices to prove the desired inequality when σa = 1. Furthermore, without loss P of generality, we may assume that a1 = max1≤j≤m aj . Let V = m j=1 aj ηj . If a1 ≤ 1/2, then from the proof of Lemma 7.2 in Xu et al. (2014), the density of V is bounded by 1, so that P P(|V − z| ≤ h) ≤ 2h. Consider the case where a1 > 1/2, and let V−1 = m j=2 aj ηj (if m = 1, then let V−1 = 0). Since η1 and V−1 are independent, we have for every z > 0 and h > 0, P(|V − z| ≤ h) = P(|η1 − (z − V−1 )/a1 | ≤ h/a1 ) ≤ P(|η1 − (z − V−1 )/a1 | ≤ 2h) = E[P(|η1 − (z − V−1 )/a1 | ≤ 2h | V−1 )] ≤ sup P(|η1 − z 0 | ≤ 2h). z 0 ∈R Pick any z 0 ∈ R. Suppose first that z 0 − 2h > 0. Since η1 ∼ χ2 (1), we have that Z z 0 +2h Z z 0 +2h p p 0 −1/2 −w/2 w e dw ≤ 1/(2π) w−1/2 dw P(|η1 − z | ≤ 2h) = 1/(2π) z 0 −2h p p √ √ = 2/π( z 0 + 2h − z 0 − 2h) ≤ 2 2h/π. z 0 −2h On the other hand, if z 0 − 2h ≤ 0, then P(|η1 − z 0 | ≤ 2h) ≤ P(η1 ≤ 4h) ≤ 2 p 2h/π. Therefore, in either case of a1 ≤ 1/2 or a1 > 1/2, we have supz>0 P(|V − z| ≤ h) ≤ p 2 max{h, 2h/π} for every h > 0. This inequality is meaningful only if h ≤ 1/2 since othp erwise the upper bound is larger than 1, but if 0 < h ≤ 1/2, then h ≤ 2h/π. This completes the proof of Part (i). Part (ii). Let Z = (Z1 , . . . , Zm )T be a standard normal random vector in Rm , and let F (Z) = qP √ m 2 amax , and j=1 aj Zj . Then F is Lipschitz continuous with Lipschitz constant bounded by qP p m E{F (Z)} ≤ E{F 2 (Z)} = j=1 aj . The Gaussian concentration inequality (cf. Boucheron et al., 2013, Theorem 5.6) then yields that   v uX m   u √ 2 P F (X) ≥ t aj + amax r ≤ e−r /2   j=1 for every r > 0. The desired conclusion follows from the fact that F 2 (Z) has the same distribution P 2 −1 2 as m  j=1 aj ηj , and the simple inequality 2xy ≤ cx + c y for any x, y ∈ R and c > 0. Proof of Theorem 1. We will use the following notation. Let Pε and Eε denote the probability and expectation with respect to εi ’s only. The notation . signifies that the left hand side is 22 M. IMAIZUMI AND K. KATO bounded by the right hand side up to a constant that depends only on α, β, and C1 . We first note that bb is invariant with respect to choices of signs of φbj ’s, and so without loss of generality, R we may assume that I φbj (t)φj (t)dt ≥ 0 for all j = 1, 2, . . . . Lemma 4.2 in Bosq (2000) yields that b := |||K b − K|||. Since E{kX − E(X)k4 } = E{(P∞ ξ 2 )2 } = P E(ξ 2 ξ 2 ) ≤ supj≥1 |b κj − κj | ≤ ∆ j k j,k j=1 j q P q P 2 4 4 4 E(ξj ) E(ξk ) . ( j κj ) . 1 (which follows from the assumption that E(ξj ) . κ2j ), we j,k b = oP (1), b = OP (n−1/2 ). Observe that for 1 ≤ j ≤ mn , |b have that ∆ κj /κj −1| . j α |b κj −κj | ≤ mα ∆ n κj /κj − 1| = oP (1). Furthermore, observe that, whenever from which we have max1≤j≤mn |b 1 ≤ j ≤ mn and j 6= k, |κj −κk | ≥ min{κj−1 −κj , κj −κj+1 } ≥ C1−1 j −α−1 ≥ C1−1 m−α−1 , and since n √ −1/2 −α−1 n = o(mn ), we have that P{|b κj − κk | ≥ |κj − κk |/ 2, 1 ≤ ∀j ≤ mn , ∀k 6= j} → 1. Now, following the arguments used in Hall & Horowitz (2007, p.83-84), we have that with probability approaching one, b 2 )kφbj − φj k2 (1 − Cm2α+2 ∆ n n Z 2 X −2 b ≤8 (κj − κk ) {K(s, t) − K(s, t)}φj (s)φk (t)dsdt , 1 ≤ ∀j ≤ mn , k:k6=j | {z } =b u2j b 2 = oP (1), we ∆ where C is a constant that depends only on C1 , and E(b u2j ) . j 2 /n. Since m2α+2 n conclude that kφbj − φj k2 ≤ 8{1 + oP (1)}b u2j E(b u2j ) . j 2 /n, and (16) where oP (1) is uniform in 1 ≤ j ≤ mn . We divide the rest of the proof into several steps. Step 1. In this step, we shall verify the expansion (5). Since {φbj }∞ j=1 is an orthonormal basis of R P 2 b b L (I), expand b as b = j b̆j φj with b̆j = I b(t)φj (t)dt. Arguing as in the proof of Theorem 1 in P P κj and mn (b̆j −bj )2 = OP (n−1 ). Imaizumi & Kato (2016), we have that bbj = b̆j +n−1 n εi ξbi,j /b i=1 j=1 Now, observe that bb − b = mn X n j=1 −1 n X ! εi ξbi,j /b κj φbj + i=1 mn X (b̆j − bj )φbj + j=1 mn X bj (φbj − φj ) + j=1 X bj φj j>mn =: In + IIn + IIIn + IVn . Since 2 Eε (kIn k ) = mn X j=1 Eε    = (σ 2 /n) mn X j=1 n −1 n X εi ξbi,j /b κj !2   2 = (σ /n)  i=1   −1 κ b−1 j = OP n mn X j=1 mn X j=1 n −1 n X i=1   = OP (mα+1 κ−1 n /n), j ! 2 ξbi,j /b κ2j 23 we have that kIn k2 = OP (mα+1 n /n). Furthermore, observe that mn X X kIIn k = (b̆j − bj )2 = OP (n−1 ), kIVn k2 . j −2β = O(mn−2β+1 ), and 2 j=1 j>mn   mn mn   X X j −2β+2 = OP (mn /n). kIIIn k2 . mn j −2β kφbj − φj k2 = OP (mn /n)   j=1 j=1 Therefore, we have kbb − bk2 = kIn k2 + 2hIn , IIn + IIIn + IVn i + kIIn + IIIn + IVn k2 = kIn k2 + OP (mα/2+1 /n + n−1/2 m−β+α/2+1 + mn−2β+1 ). n n This leads to the expansion (5). Step 2. In this step, we shall show that for any fixed τ ∈ (0, 1), P{nkbb − bk2 ≤ σ 2 b c2n (1 − τ )} = 1 − τ + o(1). α+1/2 Define Rn = n(kbb − bk2 − kIn k2 ), and observe that Rn = oP (mn ). So there exists a sequence α+1/2 of constants δn ↓ 0 such that P(|Rn | > δn mn ) → 0. Now, observe that n o Pε nkbb − bk2 ≤ σ 2 b c2n (1 − τ ) n o ≤ Pε nkIn k2 ≤ σ 2 b c2n (1 − τ ) + δn mα+1/2 + Pε (|Rn | > δn mα+1/2 ), n n and conditionally on X1n , nkIn k2 has the same distribution as σ 2 are independent χ2 (1) random variables independent of X1n . b−2 j=1 κ j κj , j=1 ηj /b where η1 , . . . , ηmn Lemma 1 (i) then yields that n o Pε nkIn k2 ≤ σ 2 b c2n (1 − τ ) + δn mα+1/2 − (1 − τ ) . n Pmn Pmn ( α+1/2 δn mn Pmn −2 1/2 bj ) ( j=1 κ )1/2 . −2 j=1 κj Pmn & {1 − oP (1)}m2α+1 , the right hand side on the above n 2 displayed equation is oP (1). This yields that Pε {nkbb − bk ≤ σ 2 b c2n (1 − τ )} ≤ 1 − τ + oP (1). Likewise, we have Pε {nkbb − bk2 ≤ σ 2 b c2 (1 − τ )} ≥ 1 − τ − oP (1), so that Since ≥ {1 − oP (1)} n n o Pε nkbb − bk2 ≤ σ 2 b c2n (1 − τ ) = 1 − τ + oP (1). Finally, Fubini’s theorem and the dominated convergence theorem yield that P{nkbb − bk2 ≤ σ2b c2n (1 − τ )} = 1 − τ + o(1). −1/2 Step 3. In this step, we shall show that σ b2 = σ 2 + oP (mn Yi − Y − mn X j=1 ). Observe that Z {Xi (t) − X(t)}{b(t) − bb(t)}dt + εi − ε, bbj ξbi,j = I 24 M. IMAIZUMI AND K. KATO where ε = n−1 Pn i=1 εi , so that Z n X 2 2 −1 σ b =n (εi − ε) + 2 I i=1 +n −1 n Z X i=1 " n−1 n X # (εi − ε){Xi (t) − X(t)} {b(t) − bb(t)}dt i=1 2 b {Xi (t) − X(t)}{b(t) − b(t)}dt I From Step 1, it is seen that kbb−bk2 = OP (mα+1 n /n), so that by the Cauchy-Schwarz inequality, the α/2+1/2 second and third terms on the right hand side are OP (mn /n) and OP (mα+1 n /n), respectively. P n Furthermore, n−1 i=1 (εi − ε)2 = σ 2 + OP (n−1/2 ). The conclusion of this step follows from the −1/2 fact that n−1/2 + mα+1 n /n = o(mn ). Step 4. In this step, we shall show that for any fixed τ ∈ (0, 1), P{nkbb − bk2 ≤ σ b2 b c2n (1 − τ )} = 1 − τ + o(1). P n −1 α+1 By Lemma 1 (ii), we have b c2n (1 − τ ) . m bj + κ b−1 mn log(1/τ ) = OP (mn ), so that j=1 κ (17) σ b2 b c2n (1 − τ ) = σ 2 b c2n (1 − τ ) + (b σ 2 − σ 2 )b c2n (1 − τ ) = σ 2 b c2n (1 − τ ) + oP (mα+1/2 ). n Hence, arguing as in Step 2, we obtain the result (17). In view of the discussion in Section 2.2, the result q (9) follows directly from (17). Finally, the √ width of the band Cb is . σ bb cn (1 − τ1 )/ n = OP ( mα+1  n /n). This completes the proof. A.2. Proof of Theorem 2. The proof of Theorem 2 relies on the following multi-dimensional version of the Berry-Esseen bound, due to Bentkus (2005). Let k · k2 denote the standard Euclidean norm. Theorem 3 (Bentkus (2005)). Let W1 , . . . , Wn be independent random vectors in Rm with mean P zero, and suppose that the covariance matrix Σ of Sn = ni=1 Wi is invertible. Then there exists a universal constant c > 0 such that sup |P(Sn ∈ A) − γΣ (A)| ≤ cm1/4 n X A∈C E(kΣ−1/2 Wi k32 ), i=1 where C is the class of all Borel measurable convex sets in Rm , and γΣ = N (0, Σ). We will also use the following well-known inequality. Lemma 2. Let ζ1 , . . . , ζn be random variables such that E(|ζi |r ) < ∞ for all i = 1, . . . , n for some r ≥ 1. Then E (max1≤i≤n |ζi |) ≤ n1/r max1≤i≤n {E(|ζi |r )}1/r . This inequality follows from the observation that ( n )1/r X r 1/r r ≤ n1/r max {E(|ζi |r )}1/r . E( max |ζi |) ≤ {E( max |ζi | )} ≤ E(|ζi | ) 1≤i≤n 1≤i≤n We are now in position to prove Theorem 2. i=1 1≤i≤n 25 Proof of Theorem 2. We follow the notation used in the proof of Theorem 1. In view of the proof of Theorem 1, it suffices to show that   mn X P sup Pε (nkIn k2 /σ 2 ≤ z) − Pη  ηj /b κj ≤ z  → 0, z>0 j=1 where Pη denotes the probability with respect to ηj ’s only. To this end, let √ n κj )}m Wi = {εi ξbi,j /(σ nb j=1 , i = 1, . . . , n. P Observe that the covariance matrix of ni=1 Wi conditionally on X1n is Λn = diag(1/b κ1 , . . . , 1/b κmn ), Pn 2 2 2 m 2 and nkIn k /σ = k i=1 Wi k2 . For z > 0, let Bz = {w ∈ R n : kwk2 ≤ z}, and observe that P n κj ≤ z) = γΛn (Bz ). Therefore, the problem reduces to proving that Pη ( m j=1 ηj /b ! n X P sup Pε Wi ∈ Bz − γΛn (Bz ) → 0, z>0 i=1 −1/2 1/4 Pn Wi k32 ). i=1 Eε (kΛn but in view of Theorem 3, the left hand side is . mn n X Eε (kΛ−1/2 Wi k32 ) = E(|ε/σ|3 )n−3/2 n i=1 n X  mn X  i=1 Observe that 3/2 2 ξbi,j /b κj  j=1  ≤ O(mn n−1/2 ) max  1≤i≤n mn X 1/2 2 ξbi,j /b κj  j=1  ≤ OP (mn n−1/2 ) max  1≤i≤n mn X 1/2 2 ξbi,j /κj  . j=1 Pmn b2 j=1 ξi,j /κj , to which end it is without loss of generality to assume R that E{X(t)} = 0 for all t ∈ I. Let ξi,j = I Xi (t)φj (t)dt, and observe that Z Z Z b b b ξi,j = {Xi (t) − X(t)}φj (t)dt = ξi,j + Xi (t){φj (t) − φj (t)}dt − X(t)φbj (t)dt. We have to bound max1≤i≤n I I I From this decomposition, we have max mn X 1≤i≤n 2 ξbi,j /κj . max 1≤i≤n j=1 mn X 2 ξi,j /κj  + j=1 2 max kXi k 1≤i≤n X mn b κ−1 j kφj 2 − φj k + kXk j=1     mn mn X X 2 = max /κj + max kXi k2 OP  ξi,j j α+2 /n + OP (mα+1 n /n) 1≤i≤n = max 1≤i≤n 1≤i≤n j=1 mn X j=1 2 ξi,j /κj +  j=1  α+1 max kXi k2 OP (mα+3 n /n) + OP (mn /n), 1≤i≤n 2 mn X j=1 κ−1 j 26 M. IMAIZUMI AND K. KATO where we have used (16). Condition (13) together with Lemma 2 yield that     mn mn X X 1/q 2 2   E max ξi,j /κj ≤ E max (ξi,j /κj ) ≤ mn n1/q C1 . 1≤i≤n j=1 j=1 1≤i≤n Furthermore, a repeated application of Hölder’s inequality yields that E{(ξj21 /κj1 ) · · · (ξj2q /κjq )} ≤ [E{(ξj21 /κj1 )q }]1/q · · · [E{(ξj2q /κjq )q }]1/q ≤ C1 , from which we have  q  ∞ ∞ ∞  X  X X 2 2q  = ξj ··· E(kXk ) = E (κj1 · · · κjq )E{(ξj21 /κj1 ) · · · (ξj2q /κjq )}   j=1 j1 =1 jq =1  q ∞ ∞ ∞ X X X ≤ C1 ··· κj1 · · · κjq = C1  κj  < ∞. j1 =1 jq =1 j=1 This implies that E(max1≤i≤n kXi k2 ) = O(n1/q ) by Lemma 2. Therefore, we conclude that P n b2 1/q ), so that max1≤i≤n m j=1 ξi,j /κj = OP (mn n m1/4 n n X 1/2−1/(2q) Eε (kΛ−1/2 Wi k32 ) = OP {m7/4 }, n n /n i=1 which is oP (1) under Condition (14). This completes the proof.  References Babii, A. (2016). Honest confidence sets in nonparametric IV regression and other ill-posed models. arXiv:1611.03015. Bickel, P. & Rosenblatt, M. (1973). On some global measures of the deviations of density function estimates. Ann. Statist. 1 1071-1095. Correction (1975) 3 1370. Belloni, A., Chernozhukov, V., Chetverikov, D. & Kato, K. (2015). Some new asymptotic theory for least squares series: pointwise and uniform results. J. Econometrics 187 345-366. Bentkus, V. (2005). A Lyapunov-type bound in Rd . Theory Probab. Appl. 49 311-323. Borggaard, C. & Thodberg, H.H. (1992). Optimal minimal neural interpretation of spectra. Analytical Chemistry 64 545-551. Bosq, D. (2000). Linear Processes in Function Spaces: Theory and Applications. Springer. Boucheron, S., Lugosi, G. & Massart, P. (2013). Concentration Inequalities: A Nonasymptotic Theory of Independence. Oxford University Press. Bunea, F., Ivanescu, A.E. & Wegkamp, M.H. (2011). Adaptive inference for the mean of gaussian process in functional data. J. R. Stat. Soc. Ser. B Stat. Methodol. 73 531-558. Cai, T.T. & Hall, P. (2006). Prediction in functional linear regression. Ann. Statist. 34 2159-2179. Cai, T.T., Low, M. & Ma, Z. (2014). Adaptive confidence bands for nonparametric regression functions. J. Amer. Stat. Assoc. 109 1054-1070. 27 Cai, T.T. & Yuan, M. (2012). Minimax and adaptive prediction for functional linear regression. J. Amer. Stat. Assoc. 107 1201-1216. Cao, G., Yanga, L. & Todemc, D. (2012). Simultaneous inference for the mean function based on dense functional data. J. Nonparametr. Stat. 24 359-377. Cardot, H. & Johannes, J. (2010). Thresholding projection estimators in functional linear models. J. Multivariate Anal. 101 395-408. Cardot, H., Ferraty, F. & Sarda, P. (1999). Functional linear model. Statist. Probab. Lett. 45 11-22. Cardot, H., Ferraty, F. & Sarda, P. (2003). Spline estimators for the functional linear models. Statist. Sinica 13 571-591. Cardot, H., Mas, A. & Sarda, P. (2007). CLT in functional linear regression models. Probab. Theory Related Fields 138 325-361. Cavalier, L., Golubev, Y., Picard, D. & Tsybakov, A.B. (2002). Oracle inequalities for inverse problems. Ann. Statist. 30 843-874. Chang, C., Lin, X. & Ogden, T. (2017). Simultaneous confidence bands for functional regression models. J. Stat. Plan. Infer., to appear. Chen, X. and Christensen, T. (2015). Optimal sup-norm rates, adaptivity and inference in nonparametric instrumental variables estimation. arXiv:1508.03365. Chernozhukov, V., Chetverikov, D. & Kato, K. (2014a). Gaussian approximation of suprema of empirical processes. Ann. Statist. 42 1564-1597. Chernozhukov, V., Chetverikov, D. & Kato, K. (2014b). Anti-concentration and honest, adaptive confidence bands. Ann. Statist. 42 1787-1818. Claeskens, G. & Van Keilegom, I. (2003). Bootstrap confidence bands for regression curves and their derivatives. Ann. Statist. 31 1852-1884. Comte, F. & Johannes, J. (2012). Adaptive functional linear regression. Ann. Statist. 40 27652797. Crambes, C., Kneip, A. & Sarda, P. (2009). Smoothing splines estimators for functional linear regression. Ann. Statist. 37 35-72. Degras, D.A. (2011). Simultaneous confidence bands for nonparametric regression with functional data. Statist. Sinica 21 1735-1765. Delaigle, A. & Hall, P. (2012). Methodology and theory for partial least squares applied to functional data. Ann. Statist. 40 322-352. Ferraty, F. & Vieu, P. (2006). Nonparametric Functional Data Analysis: Theory and Practice. Springer. Giné, E. & Nickl, R. (2016). Mathematical Foundations of Infinite-Dimensional Statistical Models. Cambridge University Press. 28 M. IMAIZUMI AND K. KATO González-Manteiga, W. & Martı́nez-Calvo, A. (2011). Bootstrap in functional linear regression. J. Stat. Plan. Infer. 141 453-461. Goldsmith, J., Greven, S. & Crainiceanu, C. (2011). Corrected confidence bands for functional data using principal components. Biometrics 69 4551. Hall, P. & Horowitz, J.L. (2007). Methodology and convergence rates for functional linear regression. Ann. Statist. 35, 70-91. Hall, P., Müller, H. & Wang, J. (2006). Properties of principal component methods for functional and longitudinal data analysis. Ann. Statist. 34 1493-1517. Hilgert, N., Mas, A. & Verzelen, N. (2013). Minimax adaptive tests for the functional linear model. Ann. Statist. 41 838-869. Hsing, T. & Eubank, R. (2015). Theoretical Foundations of Functional Data Analysis With An Introduction to Linear Operators. Wiley. Imaizumi, M. & Kato, K. (2016). PCA-based estimation for functional linear regression with functional responses. arXiv:1609.00286. James, G.M., Wang, J. & Zhu, J. (2009). Functional linear regression that’s interpretable. Ann. Statist. 37 2083-2108. Juditsky, A. & Lambert-Lacroix, S. (2003). On nonparametric confidence set estimation. Math. Meth. Statist. 19 410-428. Khademnoe, O. & Hosseini-Nasab, S.M.E. (2016). On properties of percentile bootstrap confidence intervals for prediction in functional linear regression. J. Stat. Plan. Infer. 170 129-143. Kong, D., Xue, K., Yao, F. & Zhang, H.H. (2016) Partially functional linear regression in high dimensions. Biometrika 103 147-159. Lei, J. (2014). Adaptive global testing for functional linear models. J. Amer. Stat. Assoc. 109 624-634. Li, Y. & Hsing, T. (2007). On rates of convergence in functional linear regression. J. Multivariate Anal. 98, 1782-1804. Ma, S., Yang, L. & Carroll, R.J. (2012). A simultaneous confidence band for sparse longitudinal regression. Statist. Sinica 22 95-122. Meister, A. (2011). Asymptotic equivalence of functional linear regression with a white noise inverse problem. Ann. Statist. 39, 1471-1495. Müller, H.-G. & Stadtmüller, U. (2005). Generalized functional linear models. Ann. Statist. 33 774-805. Ramsay, J. O. & Silverman, B. W. (2005). Functional Data Analysis. 2nd Edition. Springer. Reed, M. & Simon, B. (1980). Methods of Modern Mathematical Physics I: Functional Analysis (Revised and Enlarged Edition). Academic Press. Shang, Z. & Cheng, G. (2015). Nonparametric inference in generalized functional linear models. Ann. Statist. 43 1742-1773. 29 Shin, H. (2009). Partial functional linear regression. J. Stat. Plan. Infer. 139 3405-3418. Smirnov, N.V. (1950). On the construction of confidence regions for the density of distribution of random variables. Doklady Akad. Nauk SSSR 74 189-191 (Russian). Wasserman, L. (2006). All of Nonparametric Statistics. Springer. Yao, F., Müller, H.-G. & Wang, J.-L. (2005a). Functional linear regression analysis for longitudinal data. Ann. Statist. 33 2873-2903. Yao, F., Müller, H.-G. & Wang, J.-L. (2005b). Functional data analysis for sparse longitudinal data. J. Amer. Statist. Assoc. 100 577590. Xu, M., Zhang, D. & Wu, W.B. (2014). L2 asymptotics for high-dimensional data. arXiv:1405.7244. Yuan, M. & Cai, T. (2010). A reproducing kernel Hilbert space approach to functional linear regression. Ann. Statist. 38 3412-3444. (M. Imaizumi) The Institute of Statistical Mathematics, 10-3 Midori-cho, Tachikawa, Tokyo 1908562, Japan. E-mail address: [email protected] (K. Kato) Graduate School of Economics, University of Tokyo, 7-3-1 Hongo, Bunkyo-ku, Tokyo 113-0033, Japan. E-mail address: [email protected]
10math.ST
arXiv:1710.10948v1 [cs.SD] 27 Oct 2017 SOUND SOURCE LOCALIZATION IN A MULTIPATH ENVIRONMENT USING CONVOLUTIONAL NEURAL NETWORKS Eric L. Ferguson∗, Stefan B. Williams Craig T. Jin Australian Centre for Field Robotics The University of Sydney, Australia Computing and Audio Research Laboratory The University of Sydney, Australia ABSTRACT The propagation of sound in a shallow water environment is characterized by boundary reflections from the sea surface and sea floor. These reflections result in multiple (indirect) sound propagation paths, which can degrade the performance of passive sound source localization methods. This paper proposes the use of convolutional neural networks (CNNs) for the localization of sources of broadband acoustic radiated noise (such as motor vessels) in shallow water multipath environments. It is shown that CNNs operating on cepstrogram and generalized cross-correlogram inputs are able to more reliably estimate the instantaneous range and bearing of transiting motor vessels when the source localization performance of conventional passive ranging methods is degraded. The ensuing improvement in source localization performance is demonstrated using real data collected during an at-sea experiment. Index Terms— source localization, DOA estimation, convolutional neural networks, passive sonar, reverberation 1. INTRODUCTION Sound source localization plays an important role in array signal processing with wide applications in communication, sonar and robotics systems [1]. It is a focal topic in the scientific literature on acoustic array signal processing with a continuing challenge being acoustic source localization in the presence of interfering multipath arrivals [2, 3, 4]. In practice, conventional passive narrowband sonar array methods involve frequency-domain beamforming of the outputs of hydrophone elements in a receiving array to detect weak signals, resolve closely-spaced sources, and estimate the direction of a sound source. Typically, 10-100 sensors form a linear array with a uniform interelement spacing of half a wavelength at the array’s design frequency. However, this narrowband approach has application over a limited band of frequencies. The upper limit is set by the design frequency, above which grating lobes form due to spatial aliasing, leading to ambiguous source directions. The lower limit is set one octave below the design frequency because at lower frequencies the directivity of the array is much reduced as the beamwidths broaden. An alternative approach to sound source localization is to measure the time difference of arrival (TDOA) of the signal at an array of spatially distributed receivers [5, 6, 7, 8], allowing the instantaneous position of the source to be estimated. The accuracy of the source position estimates is found to be sensitive to any uncertainty in the sensor positions [9]. Furthermore, reverberation has an adverse effect on time delay estimation, which negatively impacts ∗ Work supported by Defence Science and Technology Group Australia. sound source localization [10]. In a model-based approach to broadband source localization in reverberant environments, a model of the so-called early reflections (multipaths) is used to subtract the reverberation component from the signals. This decreases the bias in the source localization estimates [11]. The approach adopted here uses a minimum number of sensors (no more than three) to localize the source, not only in bearing, but also in range. Using a single sensor, the instantaneous range of a broadband signal source is estimated using the cepstrum method [12]. This method exploits the interaction of the direct path and multipath arrivals, which is observed in the spectrogram of the sensor output as a Lloyds mirror interference pattern [12]. Generalized cross-correlation (GCC) is used to measure the TDOA of a broadband signal at a pair of sensors which enables estimations of the source bearing. Furthermore, adding another sensor so that all three sensor positions are collinear enables the source range to be estimated using the two TDOA measurements from the two adjacent sensor pairs. The range estimate corresponds to the radius of curvature of the spherical wavefront as it traverses the receiver array. This latter method is commonly referred to as passive ranging by wavefront curvature [13]. However, its source localization performance can become problematic in multipath environments when there is a large number of extraneous peaks in the GCC function attributed to the presence of multipaths, and when the direct path and multipath arrivals are unresolvable (resulting in TDOA estimation bias). Also, its performance degrades as the signal source direction moves away from the array’s broadside direction and completely fails at endfire. Note that this is not the case with the cepstrum method with its omnidirectional ranging performance being independent of source direction. Recently, Deep Neural Networks (DNN) based on supervised learning methods have been applied to acoustic tasks such as speech recognition [14, 15], terrain classification [16], and source localization tasks [17]. A challenge for supervised learning methods for source localization is their ability to adapt to acoustic conditions that are different from the training conditions. The acoustic characteristics of a shallow water environment are non-stationary with high levels of clutter, background noise, and multiple propagation paths making it a difficult environment for DNN methods. A CNN is proposed that uses generalized cross-correlation (GCC) and cepstral feature maps as inputs to estimate both the range and bearing of an acoustic source passively in a shallow water environment. The CNN method has an inherent advantage since it considers all GCC and cepstral values that are physically significant when estimating the source position. Other approaches involving time delay estimation typically consider only a single value (a peak) in the GCC or cepstogram. The CNNs are trained using real, multi-channel acoustic recordings of a surface vessel underway in a Quefrency (ms) Time Delay (ms) Cepstrogram 300 Range output Bearing output 200 100 0 1.0 0.5 0.0 -0.5 -1.0 dense: 256 Cross-correlogram 0 20 40 60 80 Time (seconds) Combined CNN 100 120 Fig. 1. a) Cepstrogram for a surface vessel as it transits over a single recording hydrophone located 1 m above the sea floor, and b) the corresponding cross-correlogram for a pair of hydrophones. shallow water environment. CNNs operating on cepstrum or GCC feature map inputs only are also considered and their performances compared. The proposed model is shown to localize sources with greater performance than a conventional passive sonar localization method which uses TDOA measurements. Generalization performance of the networks is tested by ranging another vessel with different radiated noise characteristics. The original contributions of this work are: • Development of a multi-task CNN for the passive localization of acoustic broadband noise sources in a shallow water environment where the range and bearing of the source are estimated jointly; • Range and bearing estimates are continuous, allowing for improved resolution in position estimates when compared to other passive localization networks which use a discretized classification approach [17, 18]; • A novel loss function based on localization performance, where bearing estimates are constrained for additional network regularization when training; and • A unified, end-to-end network for passive localization in reverberate environments with improved performance over traditional methods. 2. ACOUSTIC LOCALIZATION CNN A neural network is a machine learning technique that maps the input data to a label or continuous value through a multi-layer nonlinear architecture, and has been successfully applied to applications such as image and object classification [19, 20], hyperspectral pixelwise classification [21] and terrain classification using acoustic sensors [16]. CNNs learn and apply sets of filters that span small regions of the input data, enabling them to learn local correlations. 2.1. Architecture Since the presence of a broadband acoustic source is readily observed in a cross-correlogram and cepstrogram, Fig. 1, it is possible to create a unified network for estimating the position of a vessel relative to a receiving hydrophone array. The network is divided into sections, Fig 2. The GCC CNN and cepstral CNN operate in parallel and serve as feature extraction networks for the GCC and cepstral feature map inputs respectively. Next, the outputs of the GCC CNN GCC CNN dense: 256 Cepstral CNN dense: 256 dense: 256 dense: 256 dense: 256 GCC input cepstral input multichannel acoustic recording Fig. 2. Network architecture for the acoustic localization CNN and cepstral CNN are concatenated and used as inputs for the dense layers, which outputs a range and bearing estimate. For both the GCC CNN and cepstral CNN, the first convolutional layer filters the input feature maps with 10 × 1 × 1 kernels. The second convolutional layer takes the output of the first convolutional layer as input and filters it with 10 × 1 × 48 kernels. The third layer also uses 10 × 1 × 48 kernels, and is followed by two fullyconnected layers. The combined CNN further contains two fullyconnected layers that take the concatenated output vectors from both of the GCC and cepstral CNNs as input. All the fully-connected layers have 256 neurons each. A single neuron is used for regression output for the range and bearing outputs respectively. All layers use rectified linear units as activation functions. Since resolution is important for the accurate ranging of an acoustic source, max pooling is not used in the network’s architecture. 2.1.1. Input In order to localize a source using a hydrophone array, information about the time delay between signal propagation paths is required. Although such information is contained in the raw signals, it is beneficial to represent it in a way that can be readily learned by the network. A cepstrum can be derived from various spectra such as the complex or differential spectrum. For the current approach, the power cepstrum is used and is derived from the power spectrum of a recorded signal. It is closely related to the Mel-frequency cepstrum used frequently in automatic speech recognition tasks [14, 15], but has linearly spaced frequency bands rather than bands approximating the human auditory system’s response. The cepstral representation of the signal is neither in the time nor frequency domain, but rather, it is in the quefrency domain [22]. Cepstral analysis is based on the principle that the logarithm of the power spectrum for a signal containing echoes has an additive periodic component due to the echoes from multi-path reflections [23]. Where the original time waveform contained an echo the cepstrum will contain a peak and thus the TDOA between propagation paths of an acoustic signal can be measured by examining peaks in the cepstrum [24]. It is useful in the presence of strong multipath reflections found in shallow water environments, where time delay estimation methods such as GCC suffer from degraded performance [25]. The cepstrum x̂(n) is obtained by the inverse Fourier transform of the logarithm of the power spectrum:  (1) x̂(n) = F −1 log|S(f )|2 , where S(f ) is the Fourier transform of a discrete time signal x(n). For a given source-sensor geometry, there is a bounded range of quefrencies useful in source localization. As the source-sensor separation distance decreases, the TDOA values (position of peaks in the cepstrum) will tend to a maximum value, which occurs when the source is at the closest point of approach to the sensor. TDOA values greater than this maximum are not physically realizable and are excluded. Cepstral values near zero are dominated by source dependent quefrencies and are also excluded. GCC is used to measure the TDOA of a signal at a pair of hydrophones and is useful in situations of spatially uncorrelated noise [26]. For a given array geometry, there is a bounded range on useful GCC information. For a pair of recording sensors, a zero relative time delay corresponds to a broadside source, whilst a maximum relative time delay corresponds to an endfire source. TDOA values greater than the maximum bound are not useful to the passive localization problem and are excluded [27, 12]. The windowing of CNN inputs has the added benefit of reducing the number of parameters in the network. A cepstrogram and cross-correlogram (an ensemble of cepstrum and GCC respectively, as they vary in time) is shown in Fig. 1. 2.1.2. Output For each example, the network predicts the range and bearing of the acoustic source as a continuous value (each with a single neuron regression output). This differs from other recent passive localization networks which use a classification based approach such that range and bearing predictions are discretized, putting a hard limit on the resolution of estimations that the networks are able to provide [17, 18]. 2.2. Multi-task Joint Training The objective of the network is to predict the range and bearing of an acoustic source relative to a receiving array from reverberant and noisy multi-channel input signals. Since the localization of an acoustic source involves both a range and bearing estimate, the Euclidean distance between the network prediction and ground truth is minimized when training. Both the range and bearing output loss components are jointly minimized using a loss function based on localization performance. This additional regularization is expected to improve localization performance when compared to minimizing range loss and bearing loss separately. The total objective function E minimized during network training is given by the weighted sum of the polar-distance loss Ep and the bearing loss Eb , such that: E = αEp + (1 − α)Eb , (2) where Ep is the L2 norm of the polar distance given by: Ep = y 2 + t2 − 2yt cos(θ − φ) (3) and Eb is the L2 norm of the bearing loss only, given by: Eb = (θ − φ)2 (4) with the predicted range and bearing output denoted as t and φ respectively, and the true range and bearing denoted as y and θ respectively. The inclusion of the Eb term encourages bearing predictions to be constrained to the first turn, providing additional regularization and reducing parameter weight magnitudes. The two terms are weighted by hyper-parameter α so each loss term has roughly equal weight. Training uses batch normalization [28] and is stopped when the validation error does not decrease appreciably per epoch. In order to further prevent over-fitting, regularization through a dropout rate of 50% is used in all fully connected layers when training [29]. 3. EXPERIMENTAL RESULTS Passive localization on a transiting vessel was conducted using a multi-sensor algorithmic method described in [30], and CNNs with cepstral and/or GCC inputs. Their performances were then compared. The generalization ability of the networks to other broadband sources is also demonstrated by localizing an additional vessel with a different radiated noise spectrum and source level. 3.1. Dataset Acoustic data of a motor boat transiting in a shallow water environment over a hydrophone array were recorded at a sampling rate of 250 kHz. The uniform linear array (ULA) consists of three recording hydrophones with an interelement spacing of 14 m. Recording commenced when the vessel was inbound 500 m from the sensor array. The vessel then transited over the array and recording was terminated when the vessel was 500 m outbound. The boat was equipped with a DGPS tracker, which logged its position relative to the receiving hydrophone array at 0.1 s intervals. Bearing labels were wrapped between 0 and π radians, consistent with bearing estimates available from ULAs which suffer from left-right bearing ambiguity. Twenty-three transits were recorded over a two day period. One hundred thousand training examples were randomly chosen each with a range and bearing label, such that examples uniformly distributed in range only. A further 5000 labeled examples were reserved for CNN training validation. The recordings were preprocessed as outlined in Section 2.1.1. The networks were implemented in TensorFlow and were trained with a Momentum Optimizer using a NVIDIA GeForce GTX 770 GPU. The gradient descent was calculated for batches of 32 training examples. The networks were trained with a learning rate of 3 × 10−9 , weight decay of 1 × 10−5 and momentum of 0.9. Additional recordings of the vessel were used to measure the performance of the methods. These recordings are referred to as the test dataset and contain 9980 labeled examples. Additional acoustic data were recorded on a different day using a different boat with different radiated noise characteristics. Acoustic recordings for each transit started when the inbound vessel was 300 m from the array, continued during its transit over the array, and ended when the outbound vessel was 300 m away. This dataset is referred to as the generalization set and contains 11714 labeled examples. 60 Average Bearing Error (deg) 90° Combined CNN Algorithmic Method 45° DGPS 135° 40 30 20 10 0 0° Fig. 3. Estimates of the range and bearing of a transiting vessel. The true position of the vessel is shown relative to the recording array, measured by the DGPS. Combined CNN Cepstral CNN GCC CNN Algorithmic Method Average Range Error (m) 225° 102 0 80 Average Bearing Error (deg) 180° 600 500 400 300 200 100 Combined CNN Cepstral CNN GCC CNN Algorithmic Method 50 25 50 75 100 Bearing (deg) 125 150 175 50 75 100 Bearing (deg) 125 150 175 Combined CNN Cepstral CNN GCC CNN Algorithmic Method 70 60 50 40 30 20 10 315° 0 270° 25 Fig. 5. Comparison of bearing estimation performance as a function of the vessels true bearing for the a) test dataset and b) generalization dataset. 101 Average Range Error (m) 0 100 200 Range (m) 300 400 102 101 Combined CNN Cepstral CNN GCC CNN Algorithmic Method 0 50 100 150 Range (m) 200 250 300 Fig. 4. Comparison of range estimation performance as a function of the vessels true range for the a) test dataset and b) generalization dataset. 3.2. Input of Network Cepstral and GCC feature maps were used as inputs to the CNN and they were computed as follows. For any input example, only a select range of cepstral and GCC values contain relevant TDOA information and are retained - see Section 2.1.1. Cepstral values more than 1.4 ms are discarded because they represent the maximum multipath delay and occur when the source is directly over a sensor. Cepstral values less than 84 µs are discarded since they are highly source dependent. Thus, each cepstrogram input is liftered and samples 31 through 351 are used as input to the network only. A cepstral feature vector is calculated for each recording channel, resulting in a 320 x 3 cepstal feature map. Due to array geometry, the maximum time delay between pairs of sensors is ±9.2 ms. A GCC feature vector is calculated for two pairs of sensors, resulting in a 4800 x 2 GCC feature map. The GCC map is further sub-sampled to size 480 x 2, which reduces the number of network parameters. 3.3. Comparison of Localization Methods Algorithmic passive localization was conducted using the methods outlined in [30]. The TDOA values required for algorithmic localization were taken from the largest peaks in the GCC. Nonsensical results at ranges greater than 1000 m are discarded. Other CNN ar- chitectures are also compared. The GCC CNN uses the GCC CNN section of the combined CNN only, and the Cepstral CNN uses the Cepstral CNN section of the combined CNN only, both with similar range and bearing outputs, Fig 2. Fig. 3 shows localization results for a vessel during one complete transit. Fig. 4 and Fig. 5 show the performance of localization methods as a function of the true range and bearing of the vessel for the test dataset, and the generalization set respectively. The CNNs are able to localize a different vessel in the generalization set with some impact to performance. The performance of the algorithmic method is degraded in the shallow water environment since there are a large number of extraneous peaks in the GCC attributed to the presence of multipaths, and when the direct path and multipath arrivals become unresolvable (resulting in TDOA estimation bias). Bearing estimation performance is improved in networks using GCC features, showing that time delay information between pairs of spatially distributed sensors is beneficial. The networks show improved robustness to interfering multipaths. Range estimation performance is improved in networks using cepstral features, showing that multipath information can be useful in determining the sources range. The combined CNN is shown to provide superior performance for range and bearing estimation. 4. CONCLUSIONS In this paper we introduce the use of a CNN for the localization of surface vessels in a shallow water environment. We show that the CNN is able to jointly estimate the range and bearing of an acoustic broadband source in the presence of interfering multipaths. Several CNN architectures are compared and evaluated. The networks are trained and tested using cepstral and GCC feature maps as input derived from real acoustic recordings. Networks are trained using a novel loss function based on localization performance with additional constraining of bearing estimates. The inclusion of both cepstral and GCC inputs facilitates robust passive acoustic localization in reverberant environments, where other methods can suffer from degraded performance. 5. REFERENCES [1] J. Benesty, J. Chen, and Y. Huang, Microphone array signal processing, vol. 1, Springer Science & Business Media, 2008. [17] S. Chakrabarty and E.A.P. Habets, “Broadband DOA estimation using convolutional neural networks trained with noise signals,” arXiv preprint arXiv:1705.00919, 2017. [2] M. Viberg, B. Ottersten, and T. Kailath, “Detection and estimation in sensor arrays using weighted subspace fitting,” IEEE Trans. Signal Process., vol. 39, no. 11, pp. 2436–2449, 1991. [18] R. Takeda and K. Komatani, “Unsupervised adaptation of deep neural networks for sound source localization using entropy minimization,” in Proc. IEEE Int. Conf. Acoust., Speech, Signal Process. IEEE, 2017, pp. 2217–2221. [3] X. Zeng, M. Yang, B. Chen, and Y. Jin, “Low angle direction of arrival estimation by time reversal,” in Proc. IEEE Int. Conf. Acoust., Speech, Signal Process. IEEE, 2017, pp. 3161–3165. [19] A. Krizhevsky, I. Sutskever, and G.E. Hinton, “Imagenet classification with deep convolutional neural networks,” in Adv. in neural information process. systems, 2012, pp. 1097–1105. [4] J. Capon, “High-resolution frequency-wavenumber spectrum analysis,” Proc. IEEE, vol. 57, no. 8, pp. 1408–1418, 1969. [20] R. Girshick, J. Donahue, T. Darrell, and J. Malik, “Rich feature hierarchies for accurate object detection and semantic segmentation,” in Proc. IEEE Conf. Computer Vision and Pattern Recog., 2014, pp. 580–587. [5] G.C. Carter, “Time delay estimation for passive sonar signal processing,” IEEE Trans. Acoust., Speech, Signal Process., vol. 29, pp. 463–470, 1981. [6] G.C. Carter, Ed., Coherence and time delay estimation, IEEE Press, New York, 1993. [7] Y.T. Chan and K.C. Ho, “A simple and efficient estimator for hyperbolic location,” IEEE Trans. on Signal Process., vol. 42, pp. 1905–1915, 1994. [21] L. Windrim, R. Ramakrishnan, A. Melkumyan, and R. Murphy, “Hyperspectral CNN classification with limited training samples,” in British Machine Vision Conf., 2017. [22] B.P. Bogert, “The quefrency alanysis of time series for echoes: Cepstrum pseudo-autocovariance, cross-cepstrum, and saphe cracking,” Time Series Analysis, pp. 209–243, 1963. [8] J. Benesty, J. Chen, and Y. Huang, “Time-delay estimation via linear interpolation and cross correlation,” IEEE Trans. Speech and Audio Process., vol. 12, no. 5, pp. 509–519, 2004. [23] K.W. Lo, B.G. Ferguson, Y. Gao, and A. Maguer, “Aircraft flight parameter estimation using acoustic multipath delays,” IEEE Trans. on Aerospace and Electronic Systems, vol. 39, no. 1, pp. 259–268, 2003. [9] E.L. Ferguson, “Application of passive ranging by wavefront curvature methods to the localization of biosonar click signals emitted by dolphins,” in Proc. of International Conf. on Underwater Acoust. Measurements, 2011. [24] A.V. Oppenheim and R.W. Schafer, “From frequency to quefrency: a history of the cepstrum,” IEEE Signal Process. Magazine, vol. 21, no. 5, pp. 95–106, 2004. [10] J. Chen, J. Benesty, and Y.A. Huang, “Performance of GCCand AMDF-based time-delay estimation in practical reverberant environments,” EURASIP J. on Adv. in Signal Process., vol. 2005, no. 1, pp. 498964, 2005. [11] J.R. Jensen, J.K. Nielsen, R. Heusdens, and M.G. Christensen, “DOA estimation of audio sources in reverberant environments,” in Proc. IEEE Int. Conf. Acoust., Speech, Signal Process. IEEE, 2016, pp. 176–180. [12] E.L. Ferguson, R. Ramakrishnan, S.B. Williams, and C.T. Jin, “Convolutional neural networks for passive monitoring of a shallow water environment using a single sensor,” in Proc. IEEE Int. Conf. Acoust., Speech, Signal Process. IEEE, 2017, pp. 2657–2661. [25] Y. Gao, M. Clark, and P. Cooper, “Time delay estimate using cepstrum analysis in a shallow littoral environment,” Conf. Undersea Defence Technology, vol. 7, pp. 8, 2008. [26] C. Knapp and G. Carter, “The generalized correlation method for estimation of time delay,” IEEE Trans. Acoust., Speech, and Signal Process., vol. 24, no. 4, pp. 320–327, 1976. [27] E.L. Ferguson, R. Ramakrishnan, S.B. Williams, and C.T. Jin, “Deep learning approach to passive monitoring of the underwater acoustic environment,” J. Acoust. Soc. Am., vol. 140, no. 4, pp. 3351–3351, 2016. [28] S. Ioffe and C. Szegedy, “Batch normalization: Accelerating deep network training by reducing internal covariate shift,” in International Conf. on Machine Learning, 2015, pp. 448–456. [13] E.L. Ferguson, “A modified wavefront curvature method for the passive ranging of echolocating dolphins in the wild,” J. Acoust. Soc. Am., vol. 134, no. 5, pp. 3972–3972, 2013. [29] N. Srivastava, G.E. Hinton, A. Krizhevsky, I. Sutskever, and R. Salakhutdinov, “Dropout: a simple way to prevent neural networks from overfitting.,” J. Machine Learning Research, vol. 15, no. 1, pp. 1929–1958, 2014. [14] X. Xiao, S. Watanabe, H. Erdogan, L. Lu, J. Hershey, M.L. Seltzer, G. Chen, Y. Zhang, M. Mandel, and D. Yu, “Deep beamforming networks for multi-channel speech recognition,” in Proc. IEEE Int. Conf. Acoust., Speech, Signal Process. IEEE, 2016, pp. 5745–5749. [30] H.C. Schau and A.Z. Robinson, “Passive source localization employing intersecting spherical surfaces from time-of-arrival differences,” IEEE Trans. on Acoust., Speech, Signal Process., vol. 35, no. 8, pp. 1223–1225, 1987. [15] J. Heymann, L. Drude, Christoph Boeddeker, Patrick Hanebrink, and R. Haeb-Umbach, “Beamnet: end-to-end training of a beamformer-supported multi-channel asr system,” in Proc. IEEE Int. Conf. Acoust., Speech, Signal Process. IEEE, 2017, pp. 5325–5329. [16] A. Valada, L. Spinello, and W. Burgard, “Deep feature learning for acoustics-based terrain classification,” in Robotics Research, pp. 21–37. Springer, 2018.
1cs.CV
arXiv:1510.00697v1 [cs.PL] 2 Oct 2015 Towards a Fully Abstract Compiler Using Micro-Policies — Secure Compilation for Mutually Distrustful Components — Yannis Juglaret1,2 Cătălin Hriţcu1 Benjamin C. Pierce3 1 3 Arthur Azevedo de Amorim3 Antal Spector-Zabusky3 Inria Paris 2 Andrew Tolmach4 Université Paris Diderot (Paris 7) University of Pennsylvania 4 Portland State University Technical Report initial version: August 21, 2015 last revised: October 5, 2015 Abstract Secure compilation prevents all low-level attacks on compiled code and allows for sound reasoning about security in the source language. In this work we propose a new attacker model for secure compilation that extends the well-known notion of full abstraction to ensure protection for mutually distrustful components. We devise a compiler chain (compiler, linker, and loader) and a novel security monitor that together defend against this strong attacker model. The monitor is implemented using a recently proposed, generic tag-based protection framework called micro-policies, which comes with hardware support for efficient caching and with a formal verification methodology. Our monitor protects the abstractions of a simple object-oriented language—class isolation, the method call discipline, and type safety—against arbitrary low-level attackers. Contents 1 Introduction 1.1 General Context . 1.2 Research Problem . 1.3 Our Contribution . 1.4 Other Insights . . . . . . . 4 4 4 5 5 2 Stronger Attacker Model for Secure Compilation of Mutually Distrustful Components 2.1 Full Abstraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Limitations of Full Abstraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3 Mutual Distrust Attacker Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 5 6 7 3 Micro-Policies and the PUMP: Efficient Tag-Based Security Monitors 8 4 Compilation Chain Overview 9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Languages and Machines 5.1 Source Level: An Object-Oriented Language . . . . . . . . . . . . . . . . 5.1.1 Interfacing: A Specification Language for Communicating Classes 5.1.2 Source Syntax and Semantics . . . . . . . . . . . . . . . . . . . . 5.2 Intermediate Level: An Object-Oriented Stack Machine . . . . . . . . . 5.3 Target Level: An Extended Symbolic Micro-Policy Machine . . . . . . . 5.3.1 Symbolic Micro-Policy Machine . . . . . . . . . . . . . . . . . . . 5.3.2 Extensions to Monitoring Mechanism . . . . . . . . . . . . . . . . 5.3.3 Easing Component-Oriented Reasoning: Segmented Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Our Solution: Protecting Compiled Code with a Micro-Policy 6.1 Two-Step Compilation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1.1 From Source to Intermediate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1.2 From Intermediate to Target . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2 Micro-Policy Protecting Abstractions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2.1 Enforcing Class Isolation via Compartmentalization . . . . . . . . . . . . . . . . . . . . . 6.2.2 Enforcing Method Call Discipline using Method Entry Points, Linear Return Capabilities, and Register Cleaning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2.3 Enforcing Type Safety Dynamically . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2.4 Micro-Policy in Detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 10 10 11 12 13 13 14 14 15 15 15 16 19 19 19 20 21 7 Related Work 22 7.1 Secure Compilation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 7.2 Multi-Language Approaches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 8 Discussion and Future Work 8.1 Finite Memory and Full Abstraction 8.2 Efficiency and Transparency . . . . . 8.3 Future Work . . . . . . . . . . . . . 8.4 Scaling to Real-World Languages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 23 24 24 25 A Appendix 25 A.1 Encoding Usual Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 A.2 Source Semantics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 3 1 1.1 Introduction without sacrificing efficiency or transparency. Because updating hardware is expensive and hardware adoption takes decades, the need for generic protection mechanisms that can fit with ever-evolving security requirements has emerged. Active research in the domain includes capability machines [11, 42, 43] and tag-based architectures [8, 9, 14, 39]. In this work, we use a generic tag-based protection mechanism called micro-policies [9, 14] as the target of a secure compiler. Micro-policies provide instruction-level monitoring based on fine-grained metadata tags. In a micropolicy machine, every word of data is augmented with a word-sized tag, and a hardware-accelerated monitor propagates these tags every time a machine instruction gets executed. Micro-policies can be described as a combination of software-defined rules and monitor services. The rules define how the monitor will perform tag propagation instruction-wise, while the services allow for direct interaction between the running code and the monitor. This mechanism comes with an efficient hardware implementation built on top of a RISC processor [14] as well as a mechanized metatheory [9], and has already been used to enforce a variety of security policies [9, 14]. General Context In this work we study compiled partial programs evolving within a low-level environment, with which they can interact. Such interaction is useful — think of high-level programs performing low-level library calls, or of a browser interacting with native code that was sent over the internet [12,45] — but also dangerous: parts of the environment could be malicious or compromised and try to compromise the program as well [12, 15, 45]. Low-level libraries written in C or in C++ can be vulnerable to control hijacking attacks [15,41] and be taken over by a remote attacker. When the environment can’t be trusted, it is a major concern to ensure the security of running programs. With today’s compilers, low-level attackers [15] can circumvent high-level abstractions [1,25] and are thus much more powerful than high-level attackers, which means that the security reasoning has to be done at the lowest level, which it is extremely difficult. An alternative is to build a secure compiler that ensures that low- and high-level attackers have exactly the same power, allowing for easier, source-level security reasoning [4, 19, 22, 32]. Formally, the notion of secure compilation is usually expressed as full abstraction of the translation [1]. Full abstraction is a much stronger property than just compiler correctness [27]. Secure compilation is, however, very hard to achieve in practice. Efficiency, which is crucial for broad adoption [41], is the main challenge. Another concern is transparency. While we want to constrain the power of low-level attackers, the constraints we set should be relaxed enough that there is a way for all benign low-level environments to respect them. If we are not transparent enough, the partial program might be prevented from properly interacting with its environment (e.g. the low-level libraries it requires). For a compiler targeting machine code, which lacks structure and checks, a typical low-level attacker has write access to the whole memory, and can redirect control flow to any location in memory [15]. Techniques have been developed to deal with such powerful attackers, in particular involving randomization [4] and binary code rewriting [16, 29]. The first ones only offer weak probabilistic guarantees; as a consequence, address space layout randomization [4] is routinely circumvented in practical attacks [17,37]. The second ones add extra software checks which often come at a high performance cost. Using additional protection in the hardware can result in secure compilers with strong guarantees [32], 1.2 Research Problem Recent work [6, 32] has illustrated how protected module architectures — a class of hardware architectures featuring coarse-grained isolation mechanisms [20, 28, 38] — can help in devising a fully abstract compilation scheme for a Java-like language. This scheme assumes the compiler knows which components in the program can be trusted and which ones cannot, and protects the trusted components from the distrusted ones by isolating them in a protected module. This kind of protection is only appropriate when all the components we want to protect can be trusted, for example because they have been verified [5]. Accounting for the cases in which this is not possible, we present and adopt a stronger attacker model of mutual distrust: in this setting a secure compiler should protect each component from every other component, so that whatever the compromise scenario may be, uncompromised components always get protected from the compromised ones. The main questions we address in this work are: (1) can we build a fully abstract compiler to a micropolicy machine? and (2) can we support a stronger attacker model by protecting mutually distrustful 4 allowing an easier specification for complex micropolicies, which can then still run on the current hardware. The second ones require actual hardware extensions. Both of these extensions keep the spirit of micro-policies unchanged: Rules, in particular, are still specified as a mapping from tags to tags. Finally, as we mention in §6.1.2, we were able to provide almost all security at the micro-policy level rather than the compiler level. This is very encouraging because it means that we might be able to provide full abstraction for complex compilers that already exist, using micro-policies while providing very little change to the compiler itself. components against each other? We are the first to work on question 1, and among the first to study question 2: Micro-policies are a recent hardware mechanism [9, 14] that is flexible and fine-grained enough to allow building a secure compiler against this strong attacker model. In independent parallel work [31,34], Patrignani et al. are trying to extend their previous results [32] to answer question 2 using different mechanisms (e.g. multiple protected modules and randomization). Related work is further discussed in §7. 1.3 Our Contribution In this work we propose a new attacker model for secure compilation that extends the well-known notion of full abstraction to ensure protection for mutually distrustful components (§2). We devise a secure compilation solution (§4) for a simple object-oriented language (§5.1) that defends against this strong attacker model. Our solution includes a simple compiler chain (compiler, linker, and loader; §6.1) and a novel micro-policy (§6.2) that protects the abstractions of our simple language—class isolation, the method call discipline, and type safety—against arbitrary lowlevel attackers. Enforcing a method call discipline and type safety using a micro-policy is novel and constitutes a contribution of independent interest. We have started proving that our compiler is secure, but since that proof is not yet finished, we do not present it in the report. Section 8.2 explains why we have good hopes in the efficiency and transparency of our solution for the protection of realistic programs. We also discuss ideas for mitigation when our mechanism is not transparent enough. However, in both cases gathering evidence through experiments to confirm our hopes is left for future work. 1.4 2 Stronger Attacker Model for Secure Compilation of Mutually Distrustful Components Previous work on secure compilation [4,19,22,32] targets a property called full abstraction [1]. This section presents full abstraction (§2.1), motivates why it is not enough in the context of mutually distrustful components (§2.2), and introduces a stronger attacker model for this purpose (§2.3). 2.1 Full Abstraction Full abstraction is a property of compilers that talks about the observable behaviors of partial programs evolving in a context. When we use full abstraction for security purposes, we will think of contexts as attackers trying to learn the partial program’s secrets, or to break its internal invariants. Full abstraction relates the observational power of low-level contexts to that of high-level contexts. Hence, when a compiler achieves full abstraction, low-level attackers can be modeled as high-level ones, which makes reasoning about the security of programs much easier: Because they are built using source-level abstractions, high-level attackers have more structure and their interaction with the program is limited to that allowed by the semantics of the source language. In order to state full abstraction formally, one first has to provide definitions for partial programs, contexts, and observable behaviors both in the highand the low-level. Partial programs are similar to usual programs; but they could still be missing some elements—e.g. external libraries—before they can be executed. The usual, complete programs can be seen as a particular case of partial programs which have no missing elements, and are thus ready for execution. Other Insights Throughout this work, we reasoned a lot about abstractions. One insight we gained is that even very simple high-level languages are much more abstract than one would naively expect. Moreover, we learned that some abstractions — such as functional purity — are impossible to efficiently enforce dynamically. We also needed to extend the current hardware and formalism of micro-policies (§5.3) in order to achieve our challenging security goal. We needed two kinds of extensions: some only ease micro-policy writing, while the others increase the power to the monitoring mechanism. The first ones require a policy compiler, 5 and communicated to the compiler chain, which can insert a single protection barrier between between the two. In particular, in the definition of full abstraction the compiler is only ever invoked for the protected program (P↓ or Q↓), and can use this fact to its advantage, e.g. to add dynamic checks. Moreover, the definition of a[p] (low-level linking) can insert a dynamic protection barrier between the trusted p and the untrusted a. For instance, Patrignani et al. [32] built a fully abstract compilation scheme targeting protected module architectures by putting the compiled program into a protected part of the memory (the protected module) and giving only unprotected memory to the context. A single dynamic protection barrier is actually enough to enforce the full abstraction attacker model. A context is usually defined as a partial program with a hole; this hole can later be filled with a partial program in order to yield a new partial program. Finally, observable behaviors of complete programs can vary depending on the language and may include, termination, I/O during execution, final result value, or final memory state. The chosen definition for contexts will set the granularity at which the attacker can operate. Similarly, defining the observable behaviors of complete programs can affect the observational power of the attacker in our formal model. The attacker we want to protect the program against is the context itself: The definition we choose for observable behaviors should allow the context to produce an observable action every time it has control, thus letting it convert its knowledge into observable behaviors. In our case, our source and target languages feature immediate program termination constructs. We can thus choose program termination as an observable behavior which models such strong observational power. We denote high-level partial programs by P , Q, and high-level contexts by A. We denote by A[P ] the partial program obtained by inserting a high-level partial program P in a high-level context A. We denote low-level partial programs by p, q, and high-level contexts by a. We denote by a[p] the insertion of a low-level partial program p in a low-level context a. Given a high-level partial program P , we denote by P ↓ the low-level program obtained by compiling P . We denote the fact that two complete high-level programs P and Q have the same observable behavior by P ∼H Q. For two complete low-level programs p and q, we denote this by p ∼L q. With these notations, full abstraction of the compiler is stated as 2.2 Limitations of Full Abstraction We study languages for which programs can be decomposed into components. Real-world languages have good candidates for such a notion of components: depending on the granularity we target, they could be packages, modules, or classes. Our compiler is such that source components are separately compilable program units, and compilation maps sourcelevel components to target-level components. When using a fully abstract compiler in the presence of multiple components, the user has a choice whether a component written in the high-level language is trusted, in which case it is considered part of the program, or untrusted, in which case it is considered part of the context. If it is untrusted, the component can as well be compiled with an insecure compiler, since anyway the fully abstract compiler only provides security to components that are on the good side of the protection barrier. If the program includes components written in the low-level language, e.g. for efficiency reasons, then the user has generally no choice but to consider these components untrusted. Because of the way full abstraction is stated, low-level components that are not the result of the compiler cannot be part of the trusted high-level program, unless they have at least a high-level equivalent (we discuss this idea in §2.3). Figure 1 graphically illustrates how full abstraction could be applied in a multi-component setting. Components C1, C2, and C3 are written in the high-level language, while c4 and c5 are written in the low-level one. Suppose the user chooses to trust C1 and C2 and not to trust C3, then the compiler will introduce a single barrier protecting C1 and C2 from all the (∀ A, A[P ] ∼H A[Q]) ⇐⇒ (∀ a, a[P↓] ∼L a[Q↓]) for all P and Q. Put into words, a compiler is fully abstract when any two high-level partial programs P and Q behave the same in every high-level context if and only if the compiled partial programs P↓ and Q ↓ behave the same in every low-level context. In other words, a compiler is fully abstract when a lowlevel attacker is able to distinguish between exactly the same programs as a high-level attacker. Intuitively, in the definition of full abstraction the trusted compiled program (P ↓ or Q ↓) is protected from the untrusted low-level context (a) in a way that the context cannot cause more harm to the program than a high-level context (A) already could. This static separation between the trusted compiled program and the context is in practice chosen by the user 6 user chosen separation trusted fully abstract compilation C1 C1↓ distrusted C2 C2↓ C3 C3↓opt c4 c4 c5 secure compilation optimizing compilation C2↓ a a C2 C3 c4 c5 C1↓ C2↓ C3↓ c4 c5 C1↓ a C3↓ a c5 ∀ attack c5 attack C1↓ C1 a ~ C5↓ Figure 1: Full abstraction for multiple components Figure 2: Secure compilation for mutually distrustful components other components. There are two assumptions on the attacker model when we take full abstraction as a characterization of secure compilation: the user correctly identifies trusted and untrusted components so that (1) trusted components need not be protected from each other, and (2) untrusted components need no protection whatsoever. We argue that there are common cases in which the absolute, binary trust notion implied by full abstraction is too limiting (e.g. there is no way to achieve all the user’s security goals), and for which a stronger attacker model protecting mutually distrustful components is needed. Assumption (1) is only realistic if all trusted components are memory safe [13] and do not exhibit Cstyle undefined behaviors. Only when all trusted components have a well-defined semantics in the high-level language is a fully abstract compiler required to preserve this semantics at the low level. Memory safety for the trusted components may follow either from the fact that the high-level language is memory safe as a whole or that the components have been verified to be memory safe [5]. In the typical case of unverified C code, however, assumption (1) can be unrealistically strong, and the user cannot be realistically expected to decide which components are memory safe. If he makes the wrong choice all bets are off for security, a fully abstract compiler can produce code in which a control hijacking attack [15, 41] in one trusted component can take over all the rest. While we are not aware of any fully abstract compiler for unverified C, we argue that if one focuses solely on achieving the full abstraction property, such a compiler could potentially be as insecure in practice as standard compilers. Even in cases where assumption (1) is acceptable, assumption (2) is still a very strong one. In particular, since components written in the low-level language cannot get protection, every security-critical component would have to be written in the high-level source language, which is often not realistic. Compiler correctness would be sufficient on its own if all components could be written in a safe high-level language. The point in moving from compiler correctness to full abstraction, which is stronger, is precisely to account for the fact that some components have to be written in the low-level language, e.g. for performance reasons. Assumption (2) breaks as soon as we consider that it makes a difference whether the attacker owns one or all the untrusted components. As an example, assume that an attacker succeeds in taking over an untrusted component that was used by the program to render the picture of a cat. Would one care whether this allows the attacker to also take over the low-level cryptographic library that manages private keys? We believe that the cryptographic library, which is a security-critical component, should get the same level of protection as a compiled component, even if for efficiency it is implemented in the low-level language. When assumption (1) breaks, trusted components need to be protected from each other, or at least from the potentially memory unsafe ones. When assumption (2) breaks, untrusted security-critical components need to be protected from the other untrusted components. In this work, we propose a stronger attacker model that removes both these assumptions by requiring all components to be protected from each other. 2.3 Mutual Distrust Attacker Model We propose a new attacker model that overcomes the previously highlighted limitations of full abstraction. In this attacker model, we assume that each component could be compromised and protect all the other components from it: we call it an attacker model for 7 set of components, (c) in every compromise scenario, each uncompromised compiled high-level component is secure against low-level attacks from all compromised components, and (d) in every compromise scenario, each uncompromised low-level component that has a high-level equivalent is secure against low-level attacks from all compromised components. mutually distrustful components. This model can provide security even in C-like unsafe languages when some of the high-level components are memory unsafe or have undefined behaviors. This is possible if the high-level semantics treats undefined behavior as arbitrary changes in the state of the component that triggered it, rather than in the global state of the program. In the following we will assume the high-level language is secure. All compiled high-level components get security unconditionally: the secure compiler and the dynamic barriers protect them from all low-level attacks, which allows reasoning about their security in the high-level language. For low-level components to get security they have to satisfy additional conditions, since the protection barriers are often not enough on their own for security, as the compiler might be inserting boundary checks, cleaning registers, etc. and the low-level code still needs to do these things on its own in order to get full protection. Slightly more formally, in order for a low-level component c to get security it must behave in all low-level contexts like some compiled high-level component C↓. In this case we can reason about its security at the high level by modelling it as C. This captures the scenario in which c is written in the low-level language for efficiency reasons. We illustrate our stronger attacker model in figure 2. The protected program is the same as in the previous full abstraction diagram of figure 1. This time, however, the user doesn’t choose a trust barrier: all components are considered mutually distrustful instead. Each of them gets protected from the others thanks to barriers inserted by the compiler. While components C3, c4, and c5 were distrusted and thus not protected in the previous diagram, here all of them can get the same amount of protection as other components. To get security C3 is compiled using the secure compiler, while for c4 and c5 security is conditioned on equivalence to high-level components; in the figure we assume this only for c5. The attacker can compromise arbitrary components (including high-level compiled components), e.g. C2↓ and c4 in the diagram. In this compromise scenario, we ensure that the uncompromised components C1↓, C3↓, and c5 are protected from all low-level attacks coming from the compromised components. In general, our attacker model defends against all such compromise scenarios. To sum up, our attacker model can be stated as follows: (a) the attacker compromises with component granularity, (b) the attacker may compromise any 3 Micro-Policies and the PUMP: Efficient Tag-Based Security Monitors We present micro-policies [9, 14], the mechanism we use to monitor low-level code so as to enforce that our compiler is secure. Micro-policies [9, 14] are a tag-based dynamic protection mechanism for machine code. The reference implementation on which micro-policies are based is called the PUMP [14] (Programmable Unit for Metadata Processing). The PUMP architecture associates each piece of data in the system with a metadata tag describing its provenance or purpose (e.g. “this is an instruction,” “this came from the network,” “this is secret,” “this is sealed with key k”), propagates this metadata as instructions are executed, and checks that policy rules are obeyed throughout the computation. It provides great flexibility for defining policies and puts no arbitrary limitations on the size of the metadata or the number of policies supported. Hardware simulations show [14] that an Alpha processor extended with PUMP hardware achieves performance comparable to dedicated hardware on a standard benchmark suite when enforcing either memory safety, control-flow integrity, taint tracking, or code and data separation. When enforcing these four policies simultaneously, monitoring imposes modest impact on runtime (typically under 10%) and power ceiling (less than 10%), in return for some increase in energy usage (typically under 60%) and chip area (110%). The reference paper on micro-policies [9] generalizes previously used methodology [8] to provide a generic framework for formalizing and verifying arbitrary policies enforceable by the PUMP architecture. In particular, it defines a generic symbolic machine, which abstracts away from low-level hardware details and serves as an intermediate step in correctness proofs. This machine is parameterized by a symbolic micro-policy, provided by the micro-policy designer, that expresses tag propagation and checking in terms of structured mathematical objects rather than bit-level concrete representations. The micro8 high-level type components interfaces policies paper also defines a concrete machine which is a model of PUMP-like hardware, this time including implementation details. The proposed approach to micro-policy design and verification is presented as follows. First, one designs a reference abstract machine, which will serve as a micro-policy specification. Then, one instantiates the generic symbolic machine with a symbolic micro-policy and proves that the resulting symbolic machine refines the abstract machine: the observable behaviors of the symbolic machine are also legal behaviors of the abstract machine, and in particular the symbolic machine fail-stops whenever the abstract machine does. Finally, the symbolic micro-policy is implemented in low-level terms, and one proves that the concrete machine running the micro-policy implementation refines the symbolic machine. In this work, we use a slightly modified symbolic machine as the target of our secure compiler. Our symbolic machine differs from the previous one [9] in two ways: First, its memory is separated into regions, which are addressed by symbolic pointers. Note, however, that our protection does not rely on this separation but only on the tagging mechanism itself: in particular, all components can refer to all symbolic pointers, without restriction. Mapping memory regions to concrete memory locations before executing the program on a concrete machine would be a main task of a loader — we leave a complete formalization of loading for future work. Second, we extend the micro-policy mechanism itself, allowing rules to read and write the tags on more components of the machine state. We detail these extensions in section 5.3, which is dedicated to our target machine. We also leave for future work the implementation of these additional tags in the PUMP rules, their formalization in an extended concrete machine, and the extension of our results to the concrete level. 4 low-level type protection components interfaces micro-policy compiler phase I compiler phase II linker complete program type interfaces loader tagged complete program symbolic micro-policy machine result Figure 3: Overview of the compilation chain get components (e.g. low-level libraries) as input, and outputs a target-executable program. Components must all come with interface specifications, written in a common interface language. These interfaces specify the definitions that each component provides, and the definitions it expects other components to provide. In the compilation phase, the compiler first translates source components to an intermediate representation, which then gets translated to target components. In the linking phase, the linker checks that the interfaces of the components getting linked are compatible. It also makes sure that all components only give definitions under names that follow from their interfaces; and symmetrically that they do provide a definition for each of these names. Is so, the linker puts them together to form a partial program, and makes sure that this partial program is actually complete (i.e. no definition is missing). In the loading phase, the loader builds an initial machine state out of this complete program by tagging its memory using type information that was gathered by the linker. The result is thus a targetlevel executable program — i.e. a symbolic machine tagged program. The loader’s tagging will force all components to correctly implement the interfaces that was provided for them, when we later run and monitor them using our protection micro-policy: The machine will failstop as soon as a component violates its interface upon interaction with another component (violations on internal computational steps is not harmful and hence allowed). Because we required that every component should have an interface, low-level libraries that were com- Compilation Chain Overview In this section, we present our compiler and give intuition about the connections between the different parts that play a role in our solution. Our compilation chain, which we present in figure 3, splits into a two-step compiler, a linker and a loader. It produces a program to execute on the symbolic micro-policy machine. Our dedicated protection micro-policy will be loaded into the machine, allowing proper runtime monitoring of the program. The compilation chain takes source components (e.g. a main program and standard libraries) and tar9 piled using other compilers — e.g. C compilers — are only usable in our system if somebody writes interfaces for them. In section 8 we discuss more generally the need for manual or automated wrapping of lowlevel code; once we have a way to wrap low-level code, providing a matching interface will be easy. IDT ::= DT import declaration tables EDT ::= DT export declaration tables DT ::= (CDT , ODT ) 5 declaration tables CDT ::= [] | {c 7→ CD} :: CDT Languages and Machines In this section, we present and formalize the languages that are used in the compilation scheme. We introduce a simple object-oriented language, an abstract stack machine, and an extended symbolic micro-policy machine with segmented memory. The first will be our source language and the last our target machine, while the intermediate abstract machine will offer a different view from the source language which makes the connection with the low level more direct. The source language includes constructs for specifying the interfaces of components; these get reused as-is at all levels. class declaration table CD ::= class decl {MD1 , ... , MDk } MD ::= cr (ca ) class declaration method declaration ODT ::= [] | {o 7→ OD} :: ODT OD ::= obj decl c object declaration table object declaration Figure 4: Interface language syntax 5.1 Source Level: Language 5.1.1 An Object-Oriented Interfacing: A Specification Language for Communicating Classes The notion of component in this work is that of a class c together with all its object instances’ definitions. Because we have no dynamic allocation, for the moment these instances are simply all the static objects defined with type c. To allow interaction between components while being able to separately compile them, we have a simple interface syntax based on import and export declarations. This interface language gives the external view on source components and is presented in figure 4. We first formalize our source language, beginning with the interface constructs that it offers and then presenting its syntax and semantics. The source language we consider is an imperative class-based objectoriented language with static objects, private fields, and public methods. It is inspired by previous formalizations of Java core calculi [10,21] and Java subsets [23], with the aim of keeping things as simple as possible. As a consequence, we do not handle inheritance nor dynamic allocation, which are available in all these works. Syntax and Naming Conventions Object names o and class names c are global and assumed to be arbitrary natural numbers. The two main syntactic constructs in the interface language are class declarations and static object declarations. Class declarations specify public methods with argument and result types without providing their body; no fields are declared in an interface because we only consider private fields in our languages. Static object declarations specify an object to be an instance of a given class, without providing the values of its fields. The interface of a partial program at all levels is composed of an import declaration table IDT speci- We start with the simplicity of Featherweight Java [21], and add imperative features in the way Middleweight Java [10] does. However, we do not add as many imperative features: just branching, field update and early termination (the latter is not a feature of Middleweight Java). The resulting language is similar to Java Jr. [23] with early termination, but without packages: Our granularity for components is that of classes instead. Example components which encode some usual types are provided in appendix section A.1, and could help in getting familiar with this language. 10 fying the class and object definitions it expects other components to provide, and an export declaration table EDT which declares the definitions that this partial program provides. Export and import declaration tables share common syntax and are composed of class and object declarations. The type of the declared objects must come from the classes specified by the partial program: defining object instances of classes coming from other components is not allowed. Intuitively, our object constructors (and fields) are private and the only way to interact with objects is via method calls. In contrast with objects and classes to which we refer using global names, methods are class-wise indexed: the methods m of a class c are referred to as 1, . . . , k following the order of their declarations. (The same goes for fields f , below.) The syntax we consider for names can be thought of as coming out of a parser, that would take a user-friendly Java-like syntax and perform simple transformations so that the names match our conventions. P, Q ::= (IDT , T , EDT ) source program T ::= (CT , OT ) definition tables CT ::= [] | {c 7→ C } :: CT C ::= class {c1 , ... , ck ; M1 , ... , Ml } M ::= cr (ca ){e} class definition table class definition method definition e ::= expressions this | arg | o | e.f | e.f := e 0 | e.m(e 0 ) | e == e 0 ? e 00 : e 000 | exit e | e; e 0 OT ::= [] | {o 7→ O} :: OT object definition table O ::= obj c{o1 , ... , ok } Use at Linking and Loading We have presented the roles of the linker and the loader when we introduced the compilation chain in section 4: We can model linking as an operation that takes two target partial programs and their interfaces, and yields a new partial program which contains all definitions from both partial programs, with a new matching interface. Loading then takes a complete target program and tags it, yielding a machine state that can be reduced using the semantics of our symbolic micropolicy machine. Let us now explain how interfaces are used at linking and loading. A class import declaration gives the precise type signatures that the partial program expects from the methods of the corresponding class: When linking against a partial program that defines this class, the class export declaration should exactly match with the import one. Similarly, an import object declaration gives the expected type for this object, and should match with the corresponding export declaration when linking against a partial program that defines it. Two partial programs have compatible interfaces when (1) they don’t both have export declarations for the same class nor the same object, and (2) for every name in an import declaration of any of the two programs, if the other program happens to have an export declaration for this name, then the import and export declarations are syntactically equal. Linking two partial programs with compatible in- Figure 5: Source language syntax terfaces yields a new partial program with updated import/export declarations: Export declarations are combined, and import declarations that found matching export declarations are removed. When all partial programs have been linked together, the linker can check that there are no remaining import declarations to make sure that the program is complete. Finally, the loader will make use of the export declarations to ensure that programs comply with the export declarations they declared: In the untyped target language, the loader sets the initial memory tags in accordance with the export declarations, which will allow our micro-policy to perform dynamic type checking. This will be further explained in section 6.2.3. 5.1.2 Source Syntax and Semantics The syntax of our source language is presented in figure 5. The two main syntactic constructs in this language are class definitions and static object definitions. Class definitions declare typed private fields and define public methods with argument and result types as well as an expression which serves as a method body. Static object definitions define instances of defined classes by providing well-typed val11 ues for the fields. For simplicity, methods only take one argument: this does not affect expressiveness because our language is expressive enough to encode tuple types (appendix section A.1 shows examples that encode more complex types than tuple types). Most expressions are not surprising for an objectoriented language: apart from static object references o and variables (this for the current object and arg for the method’s argument), we have support for selecting private fields, calling public methods, and testing object identities for equality. The language also features field update and early termination. Both are crucial for modeling realistic low-level attackers in our high-level language: Low-level attackers can indeed keep information between calls using the memory and stop the machine whenever they have control. We thus add primitives that can model this in the high-level: field updates enable methods to have state (methods are not pure functions anymore), and early termination allows an attacker to prematurely end the program. Like we already mentioned, fields are private and methods are public. This means that in the method body of a given class, the only objects whose fields may be accessed are the instances of that specific class. The only way to interact with object instances of other classes is to perform a method call. The only values in the language are object names, and the only types are class names. The language comes with a type system that ensures that object and method definitions match with the types that were declared for them. Our language does not feature dynamic allocation, inheritance, or exceptions. We hope to add some of these features in the future. Loops are simulated using recursive method calls and branching is done via object identity tests. The semantics of the source language is standard and is given in appendix A.2. 5.2 Intermediate Level: An Oriented Stack Machine IP , IQ ::= (IDT , ICT , EDT ) ICT ::= [] | {c → 7 IC } :: ICT intermediate program compartment table IC ::= compartment declaration {IM1 , ... , IMk ; LOT ; LS } IM ::= Icode Icode ::= [] | Iinstr ; Icode method body intermediate machine code Iinstr ::= machine instruction Nop | This | Arg | Ref o | Sel f | Upd f | Call c m | Ret | Skip n | Skeq n | Drop | Halt LOT ::= compartment local object table [] | {o 7→ LO} :: LOT LO ::= (o1 , ... , ol ) LS ::= [] | o :: LS local instance definition local stack Figure 6: Intermediate language syntax Object- Our intermediate machine is an object-oriented stack machine with one local stack per class. The syntax for intermediate machine programs is presented in figure 6. The main syntactic construct is that of a compartment, which is the notion of component at this level. A compartment combines a class definition with all the object instances of this class and with a local stack. The main difference with respect to the source language is that instead of expressions, method bodies 12 are expressed as sequences of instructions in abstract machine code. These instructions manipulate values stored on the local stack associated with each compartment. Nop does nothing. This, Arg and Ref o put an object on the local stack — the current object for This, the current method argument for Arg, and object o for Ref o. Sel f pops an object from the stack, selects field f of this object and pushes the selected value back to the stack. Upd f pops a value and an object, sets the f field of the object to the popped value, then pushes back this value on the stack. Call c m pops an argument value and a target object o, performs a call of the object o’s m method with the popped argument if o has type c (otherwise, the machine failstops). The callee can then use the Ret instruction to give control back to the caller: this instruction pops a value from the callee’s stack and pushes it on the caller’s stack, as a result value for the call. Skip n skips the n next instructions. Skeq n pops two values from the local stack and either skips the n next instructions if the values are equal, or does nothing more if they are different. Drop removes the top value from the stack. Halt halts the machine immediately, the result of the computation being the current top value on the stack. The purpose of this intermediate language is to ease going low-level. In particular, its syntax with the Call instruction being annotated with a class makes explicit the fact that method calls are statically resolved by the source to intermediate compiler. This is possible in our source language, because we have no inheritance. 5.3 mem ::= [] | {loc 7→ R} :: mem loc ::= region symbolic location objl o | methl c m | stackl c R ::= [] | (word @ tmem ) :: R tagged memory region word ::= symbolic machine word n | loc + n | encode instr instr ::= machine instruction Nop | Const i rd | Mov rs rd | Binopop r1 r2 rd | Load rp rd | Store rp rs | Jump r | Jal r | Bnz r i | Halt i ::= n | loc + n immediate value Figure 7: Symbolic machine memory Target Level: An Extended Symbolic Micro-Policy Machine Here, we present our the target of our compiler: an extended symbolic micro-policy machine with segmented memory. We first recall the common basis for our machine and the symbolic machine presented in the original micro-policies paper [9], then present and comment on the differences between them. 5.3.1 memory LP , LQ ::= (IDT , LPmem, EDT ) low-level program LPmem ::= [] | {loc 7→ LPR} :: LPmem program memory LPR ::= [] | word :: LPR i ::= n | loc + n Symbolic Micro-Policy Machine A symbolic micro-policy machine [9] is an executable model of micro-policies that abstracts away from some of the implementation details (e.g. the implementation of the micro-policy monitor in machine code). The definition of a symbolic micro-policy machine is abstracted over a symbolic micro-policy. program memory region immediate value Figure 8: Symbolic machine program syntax 13 for instance, to transfer a linear capability from an input to an output: one wants not only to copy the capability in the output tag, but also to erase it from the input tag. Second, we assume that there are some fixed registers whose tags can always be checked and updated by the transfer function, even if the registers are neither input nor output to the current instruction. This allows us to efficiently clean these fixed registers upon calls and returns. Third, we assume that the transfer function receives as an argument not only the tag of the current instruction, but also the tag on the next instruction. For instance, when monitoring a Jump instruction, we assume the tag on the targeted location can be checked. This extension allows us to write and explain our micro-policy in a much simpler way. The first two extensions require extra hardware support. For the last extension, however, we conjecture that our micro-policy — and probably other similar micro-policies — can be transformed into a policy which doesn’t have to perform next instruction checks. This kind of translation has already been done by hand, for example in a previous compartmentalization micro-policy [9]: the next instruction checks are replaced by current instruction checks happening on the next step, making the machine failstop one step later in the case of an error. We leave for future work the writing of a policy compiler doing such a transformation automatically. In our case, a symbolic micro-policy is defined as a collection of symbolic tags, which are used to label instructions and data, and a transfer function, which is invoked on each step of the machine to propagate tags from the current machine state to the next one. We ignore monitor services of Azevedo de Amorim et al. [9] and extra pieces of state which are only used by monitor services — because we don’t need them: we successfully avoid monitor services, which in the context of micro-policies are much more expensive than rules. The transfer function is a mathematical function that defines the micro-policy rules — in the mechanized metatheory of the original micro-policies paper this function is written in Gallina, the purelyfunctional language at the heart of the Coq proof assistant. A machine state of our symbolic micro-policy machine is composed of a memory, a register file of general-purpose registers, and a program counter register pc. The program counter register points to a location in memory which contains the next instruction to execute. We present the list of instructions in figure 7, together with other memory-related definitions on which we will focus when we later explain the segmented memory. These instructions are those of the machine code of the original micro-policies paper [9]: Nop does nothing. Const i rd puts an immediate constant i into register rd . Mov rs rd copies the contents of rs into rd . Binopop r1 r2 rd performs a binary operation op (e.g. addition, subtraction, equality test) on the content of registers r1 and r2 , and puts the result in register rd . Load rp rs copies the content of the memory cell at the memory location stored in rp to rs . Store rp rs copies the content of rs to the memory cell at the memory location stored in rp . Jump and Jal (jump-and-link) are unconditional indirect jumps, while Bnz r i branches to a fixed offset imm (relative to the current pc) if register r is nonzero. Halt halts the machine immediately. In the following, we denote Binop+ r1 r2 rd (addition) by Add r1 r2 rd , and Binop− r1 r2 rd (subtraction) by Sub r1 r2 rd . 5.3.2 5.3.3 Easing Component-Oriented Reasoning: Segmented Memory Instead of having a monolithic word-addressed memory, the machine we consider has a segmented memory which consists of several memory regions which are addressed by symbolic locations. Targeting such a machine allows for easy separate compilation, and is a pragmatic intermediate step when going towards real machine code, which we plan to do in the future. As presented in figure 7, the definition of memory directly mentions symbolic locations. A generic symbolic machine definition would be abstracted over the definition of symbolic locations, but in our case, we define them to be either method, object, or stack locations for reasons that will be clear when we present our compiler in section 6.1.2. Our instantiation of memory tags tmem will be studied with other definitions related to the symbolic micro-policy, in section 6.2. Immediate constants and words in the symbolic Extensions to Monitoring Mechanism We consider a more powerful symbolic micro-policy machine that allows the transfer function to inspect and update more tags. First, we assume that the transfer function produces new tags for the input arguments of the instructions; not only for the output one. This is required, 14 6 machine are extended to include symbolic locations with an offset, which are memory addresses: The k memory cells of a region located at loc are addressed from loc + 0 to loc + (k − 1). In the following, we use the simpler notation loc for loc + 0. Our Solution: Protecting Compiled Code with a Micro-Policy In this section, we present our solution for the secure compilation of mutually distrustful components: first we describe our simple two-step compiler, then we present our micro-policy dynamically protecting components from each other. Words are also extended to include a new encode instr construct: Decoding instructions in this machine is a symbolic operation of deconstructing such a word. Now that instructions feature symbolic locations with an offset as immediate values, it would indeed have no practical meaning to try to extend the encoding of instructions to this. When we use the PUMP in future work, some of the symboliclevel instructions could have to be compiled to sequences of PUMP instructions: PUMP memory addresses, the PUMP equivalent of symbolic locations with an offset, are word-sized and thus too big to fit in a PUMP immediate value. Another solution would be to restrict addressable memory to less than a full word; the symbolic encoding allows us to delay the choice between these solutions. 6.1 Two-Step Compilation We start with our two-step compilation: first the compilation of source programs to intermediate machine programs, then the one of intermediate machine programs to target machine programs. 6.1.1 From Source to Intermediate Our type-preserving source to intermediate compiler is a mostly direct translation of source expressions to abstract machine instructions, which gives a lowerlevel view on source components. Nothing in the translation is related to security: we provide security at this level by giving appropriate semantics to intermediate-level instructions, which make them manipulate local stacks and local object tables rather than a single global stack and a single object table. In this translation, we statically resolves method calls, which is possible because our language doesn’t feature inheritance. A high-level component is easily mapped to an intermediate compartment: Method bodies are compiled one by one to become intermediate-level method bodies. Object definitions corresponding to that component are taken from the global object table OT and put in the local object table LOT of the compartment. Finally, the stack is initialized to an empty stack. Tags are not affected by all the changes that we listed, hence the monitoring mechanism isn’t affected either. The semantics, however, is affected in the following way: Trying to decode an instruction out of a regular word or of a symbolic location with an offset failstops the machine. All instructions failstop when one of their operands has the form encode instr . A Jump, Jal, Load or Store instruction used with a regular word for the pointer failstops the machine. These instructions keep their usual behavior when provided with a symbolic location and a valid offset; if it does not correspond to a valid memory address, however, the machine failstops. Most binary operations failstop when the first or second operand is a symbolic location with an offset: exceptions are 1) addition and subtraction with regular words, when the first operand is the location with an offset, which respectively increment and decrement the offset accordingly; 2) equality tests between symbolic locations with offsets. Finally, the Bnz instruction failstops when the provided register or immediate value is a symbolic location with an offset. Compiling Source Expressions to Stack Machine Code Assuming that method m of class c in program P has definition cr (ca ){e}, compilation is defined as follows: C (P , c, m) = A (e); Ret The A function is recursively defined as presented in figure 9; we allow ourselves to refer to P , c and m in this definition. We denote by P ; c, m ` e : c 0 the predicate indicating that expression e has type c 0 when typed within method m of class c from program P . In the compilation of method calls, we assume a type inference algorithm which, given P , c and m, The syntax for symbolic machine programs is presented in figure 8. They define a memory which is like the one of the symbolic machine, except that cells are not tagged: The tags for the memory will be provided by the low-level loader, which will be detailed in the next section. 15 note by |A (e)| the length of the sequence of instructions A (e). With equal objects, executing Skeq (|A (e4 )|+1) will skip the code corresponding to e4 and the Skip |A (e3 )| instruction, hence branching directly to the code corresponding to e3 to execute it. With different objects, executing Skeq (|A (e4 )| + 1) will do nothing and execution will proceed with the code corresponding to e4 , followed by a Skip |A (e3 )| instruction which will unconditionally skip the code corresponding to e3 , hence branching to the Nop instruction. The effect of all this is that in the end, we have executed e1 and e2 in this order, popped the resulting objects from the stack, and either executed e3 if they were equal or e4 if they were different: We execute the appropriate code in both cases. A (this) = This A (arg) = Arg A (o) = Ref o A (e.f ) = A (e); Sel f A (e.f := e 0 ) = A (e); A (e 0 ); Upd f A (e.m 0 (e 0 )) = A (e); A (e 0 ); Call c 0 m 0 where c0 satisfying P ; c, m ` e : c 0 is found by type inference A (e1 == e2 ? e3 : e4 ) = A (e1 ); A (e2 ); Skeq (|A (e4 )| + 1); A (e4 ); Skip |A (e3 )|; A (e3 ); 6.1.2 Nop From Intermediate to Target We now present our unoptimizing, type-preserving translation from intermediate-machine compartments to target-level components. Target-level compartments are defined as sets of untagged symbolic machine memory regions. Like in the source to intermediate compilation, the translation itself is rather standard. The exception is that components cannot trust other components to follow conventions such as not messing with a global call stack, or not modifying some registers. As a consequence, components use local stacks and all relevant registers need to be (re)initialized when the compiled component takes control. Other than that, all security is enforced by means of instruction-level monitoring (§6.2). A (e; e 0 ) = A (e); Drop; A (e 0 ) A (exit e) = A (e); Halt Figure 9: Compiling source expressions to intermediate machine code finds the unique type c 0 such that P ; c, m ` e : c 0 . We use it to statically resolve method calls by annotating intermediate-level call instructions. In this document, we do not present the type system nor the type inference algorithm for our source language, which are standard. The invariant used by the compilation is that executing A (e) in the intermediate level will either diverge—when evaluating e in the high-level diverges— or terminate with exactly one extra object on the local stack—in which case this object is exactly the result of evaluating e. In a method body, this object on top of the stack can then be returned as the result of the method call, which is why A (e) is followed by a Ret instruction in the main compilation function C . With this invariant in mind, the translation is rather straightforward, which is not surprising since our abstract stack machine was designed with this goal in mind. An important point is that we keep the evaluation order of the source language: left to right. It matters because of side effects and early termination being available in our language. Let us explain the only non-trivial expression to compile: the object identity test (e1 == e2 ? e3 : e4 ), for which we use two branching instructions Skeq (|A (e4 )| + 1) and Skip |A (e3 )|. Here, we de- Object Compilation Each object o that was assigned a definition (o1 , ... , ol ) now gets its own region in target memory. This region is assigned symbolic location objl o and spans over l memory cells. These cells are filled with the objl o1 , . . . , objl ol symbolic locations — which are the addresses of these objects in memory. Local Stack Compilation Each local stack also gets its own memory region, under symbolic location stackl c where c is the name of the compartment being compiled. Components will maintain the following invariant during computation: The first cell holds a symbolic pointer to the top of the stack, which is (stackl c) + l where l is the length of the stack. The following cells are used for storing actual values on the stack. Here, we only care about compiling intermediatelevel components that come from the source to inter16 mediate compiler. For these components, the initial stack is always empty. Hence, we just initialize the first cell to stackl c, and the initial content of extra cells can be arbitrary constants: their only purpose is to be available for filling during the computation. Method Compilation: From Coarse- to FineGrained Instructions A method with index m gets its own memory region under symbolic location methl c m where c is the name of the compartment being compiled. The length of these memory regions is that of the corresponding compiled code, which is what they are filled with. The compilation is a translation of the method bodies, mapping each intermediate-level instruction to a low-level instruction sequence. The compilation uses ten distinct general-purpose registers. Register ra is automatically filled upon lowlevel call instructions Jal — following the semantics of the machine studied in the original micro-policies paper [9] — for the callees to get the address to which they should return. Registers rtgt , rarg and rret are used for value communication: rtgt stores the object on which we’re calling a method—the target object—and rarg the argument for the method, while rret stores the result of a call on a return. Registers raux1 , raux2 , raux3 are used for storing temporary results. Register rsp holds a pointer to the current top value of the local stack — we call this register the stack pointer register. Register rspp always holds a pointer to a fixed location where the stack pointer can be stored and restored – this location is the first cell in the memory region dedicated to the local stack. Finally, register rone always stores the value 1 so that this particular value is always easily available. The compilation of method m of class c with method body Icode is defined as follows: A (c, Call c 0 m; Icode) = (* pop call argument and object *) Load rsp raux2 ; Sub rsp rone rsp ; Load rsp raux1 ; (* push current object and argument *) Store rsp rtgt ; Add rsp rone rsp ; Store rsp rarg ; (* save stack pointer *) Store rspp rsp ; (* set call object and argument *) Mov raux1 rtgt ; Mov raux2 rarg ; (* perform call *) Const (methl c 0 m) raux3 ; Jal raux3 ; (* reinitialize environment *) Const 1 rone ; Const (stackl c) rspp ; Load rspp rsp ; (* restore current object and argument *) Load rsp rarg ; Sub rsp rone rsp ; Load rsp rtgt (* push call result *) Store rsp rret ; A (c, Icode) A (c, Ret; Icode) = (* pop return value *) Load rsp rret ; Sub rsp rone rsp ; (* pop return address *) Load rsp ra ; Sub rsp rone rsp ; (* save stack pointer *) Store rspp rsp ; C (c, m, Icode) = (* perform return *) Const 1 rone ; Jump ra ; A (c, Icode) (* load stack pointer *) Const (stackl c) rspp ; Load rspp rsp ; (* push return address *) Figure 10: Compilation of communication-related instructions of the intermediate machine Add rsp rone rsp ; Store rsp ra ; A (c, Icode) where A (c, Icode) is an auxiliary, recursively defined function having A (c, [] ) = [] as a base case. As shown in the code snippet, the first instructions initialize the registers for them to match with the invariant we just explained informally. Compilation is most interesting for calls and return instructions, which we present in figure 10. We 17 A (c, Nop; Icode) = Nop; A (c, Icode) A (c, This; Icode) = (* push object *) Add rsp rone rsp ; Store rsp rtgt ; A (c, Icode) A (c, Halt; Icode) = Halt; A (c, Icode) A (c, Arg; Icode) = (* push argument *) A (c, Skip k ; Iinstr1 ; ... ; Iinstrk ; Icode) = Add rsp rone rsp ; Store rsp rarg ; A (c, Icode) Bnz rone L (Iinstr1 ; ... ; Iinstrk ); A (c, Iinstr1 ; ... ; Iinstrk ; Icode) A (c, Ref o; Icode) = (* push object o *) Const (objl o) raux1 ; A (c, Skeq k ; Iinstr1 ; ... ; Iinstrk ; Icode) = Add rsp rone rsp ; Store rsp raux1 ; A (c, Icode) (* pop and compare objects *) Load rsp raux2 ; Sub rsp rone rsp ; Load rsp raux1 ; A (c, Drop; Icode) = Sub rsp rone rsp ; A (c, Icode) Sub rsp rone rsp ; Binop= raux1 raux2 raux1 ; (* branch according to result *) A (c, Sel f ; Icode) = Bnz raux1 L (Iinstr1 ; ... ; Iinstrk ); Const (f − 1) raux2 ; A (c, Iinstr1 ; ... ; Iinstrk ; Icode) (* pop object to select from *) Load rsp raux1 ; Add raux1 raux2 raux1 ; where L (Iinstr1 ; ... ; Iinstrk ) is the length of the sequence of compiled instructions corresponding to instructions Iinstr1 ; ... ; Iinstrk , defined as: (* load and push field value *) Load raux1 raux1 ; Store rsp raux1 ; A (c, Icode) L ([] ) = 0 A (c, Upd f ; Icode) = L (Drop; Icode) = L (Nop; Icode) = 1 + L (Icode) Const (f − 1) raux2 ; L (Halt; Icode) = L (Skip n; Icode) = 1 + L (Icode) (* pop new field value and object *) L (This; Icode) = L (Arg; Icode) = 2 + L (Icode) Load rsp raux3 ; Sub rsp rone rsp ; Load rsp raux1 ; L (Ref o; Icode) = 3 + L (Icode) (* perform update on object *) L (Sel f ; Icode) = 5 + L (Icode) Add raux1 raux2 raux1 ; Store raux1 raux3 ; L (Ret; Icode) = L (Skeq n; Icode) = 6 + L (Icode) (* push new field value *) L (Upd f ; Icode) = 7 + L (Icode) Store rsp raux3 ; A (c, Icode) L (Call c 0 m; Icode) = 18 + L (Icode) Figure 11: Compilation of stack-related instructions of the intermediate machine Figure 12: Compilation of control-related instructions of the intermediate machine 18 Load and Store instructions are restricted to locations having the same color as the current instruction. Moreover, the rules will compare the next instruction’s compartment to that of the current instruction: Switching compartments is only allowed for Jump and Jal; however, we need more protection on these instructions because switching compartments should be further restricted: this is what we now present. also present the compilation of stack-manipulating instructions in figure 11 and that of control-related instructions in figure 12. In all these figures, inline comments are provided so that the interested reader can get a quick understanding of what is happening. More standard compilers typically use a global call stack and compile code under the assumption that other components will not break invariants (such as rone always holding value 1) nor mess with the call stack. In our case, however, other components may be controlled by an attacker, which is incompatible with such assumptions. As a consequence, we use local stacks not only for intermediate results, but also to spill registers rtgt and rarg before performing a call. After the call, we restore the values of registers rone , rspp and rsp that could have been overwritten by the callee, then fill registers rtgt and rarg from the local stack. There is a lot of room for improvement in terms of compiler efficiency; having a code optimization pass would be very interesting in the future. 6.2 6.2.2 Abstraction In the source language, callers and callees obey a strict call discipline: a caller performs a method call, which leads to the execution of the method body, and once this execution ends evaluation proceeds with the next operation of the caller. In machine code, though, the Jal and Jump instructions can target any address. Moreover, in the high-level language callers and callees give no information to each other except for the arguments and the result of the call. In the lowlevel machine, however, registers may carry extra information about the caller or the callee and their intermediate computational results. This suggests a need for register cleaning upon calls and returns. Micro-Policy Protecting Abstractions Here, we first present the abstractions that our source language provides with respect to low-level machine code, and give intuition about how we can protect them using a micro-policy. Then, we present our actual micro-policy and explain how it effectively implements this intuition. We end with a description of the low-level loader, which sets the initial memory tags for the program. 6.2.1 Enforcing Method Call Discipline using Method Entry Points, Linear Return Capabilities, and Register Cleaning Protection Mechanism On our machine, calls are done via Jal instructions, which store the return address in the ra register, and returns by executing a Jump to the value stored in ra . The first goal here is to ensure that a caller can only performs calls at method entry points, and that a callee can only return to the return address it was given in register ra on the corresponding call. To this end, we extend the memory tags to allow tagging a memory location as a method entry point. Then, we monitor Jal instructions so that they can only target such locations. This is enough to protect method calls. For returns, however, the problem is not that simple. In contrast with calls, for which all method entry points are equally valid, only one return address is the good one at any given point in time; it is the one that was transferred to the callee in the ra register by the corresponding call. More precisely, because there can be nested calls, there is exactly one valid return address for each call depth. We reflect this by tracking the current call depth in the PC tag: it starts at zero and we increment it on Jal instructions and decrement it on Jump instructions that correspond to returns. With such tracking, Enforcing Class Isolation via Compartmentalization Abstraction Because in the source language fields are private, classes have no way to read or to write to the data of other classes. Moreover, classes cannot read or write code, which is fixed. Finally, the only way to communicate between classes is to perform a method call. In machine code, however, Load, Store and Jump operations can target any address in memory, including those of other components. This interaction must be restricted to preserve the class isolation abstraction. Protection Mechanism To enforce class isolation, memory cells and the program counter get tagged with a class name, which can be seen as a color. The code and data belonging to class c get tagged with color c. 19 we can now, upon a Jal instruction, tag register ra to mark its content as the only valid return address for the current call depth. It is however crucial to make sure that when we go back to call depth n, there isn’t any return capability for call depth n + 1 idling in the system. We do this by enforcing that the tag on the return address is never duplicated, which makes it a linear return capability. The return capability gets created upon Jal, moved from register to memory upon Store and from memory to register upon Load, moved between registers upon Mov, and is finally destroyed upon returning via Jump. When it gets destroyed, we can infer that the capability has disappeared from the system, since there was always only one. Now that our first goal is met, we can think about the second one: ensuring that compiled components do not transmit more information upon call and return than they do within the high-level semantics. Upon return, the distrusted caller potentially receives more information than in the high-level: Uncleaned registers could hold information from the compiled callee. Upon calls, the distrusted callee similarly receives information through registers, but has also an extra information to use: the content of register ra , which holds the return address. This content leaks the identity of the compiled caller to the distrusted callee, while there is no way for a callee to know the identity of its caller in the high-level. Fortunately, the content of register ra is already a specifically tagged value, and we already prevent the use of linear return capabilities for any other means than returning through it or moving it around. Let us now review the general purpose registers which could leak information about our compiled partial programs. rtgt and rarg could leak the current object and argument to the distrusted caller upon return, but this is fine: the caller was the one who set them before the call, so he already knows them. Upon call, these registers do not leak information either since, according to the compilation scheme, they are already overwritten with call parameters. rret could leak a previous result value of the compiled caller to the distrusted callee upon call: it has to be cleaned. Upon return, however, and according to the compilation scheme, this register is already overwritten with the return value for the call. raux1 , raux2 , raux3 could leak intermediate results of the computation upon return and have to be cleaned accordingly. Upon call, however, following the compilation scheme, they are already overwritten with information that the distrusted callee either will get or already has. rspp could leak the identity of the compiled caller to the distrusted callee upon call, since it contains a pointer to the caller’s local stack’s memory region: it has to be cleaned. In the case of a return however, the identity of the compiled callee is already known by the distrusted caller so no new information will be leaked. rsp could leak information about the current state of the local stack, as well as the identity of the compiled caller, and should accordingly be cleaned in both call and return cases. rone will be known by the distrusted caller or the distrusted callee to always hold value 1, and thus won’t leak any information. ra is already protected from being leaked: it is overwritten both at call and return time. In the case of a call, it is overwritten upon the execution of the Jal instruction to hold the new return address. In the case of a return, according to the compilation scheme, it will be overwritten before performing the return to hold the address to which we are returning. This description concerns the current unoptimizing compiler; for an optimizing compiler the situation would be a little different: more information could be leaked, and accordingly more registers would have to be cleaned. A first solution would be to have the compiler produce register reset instructions Const 0 r for every register r that could leak information, before any external call or return instruction. However, this would be very expensive. This is one of the reasons why we have made the following assumption about our target symbolic micro-policy machine: The tags of some fixed registers (here, rret , rspp and rsp upon Jal, and raux1 , raux2 , raux3 and rsp upon Jump) can be updated in our symbolic micro-policy rules. We are thus by assumption able to clean the registers that might leak information, by using a special tag to mark these registers as cleared when we execute a Jump or a Jal instruction. 6.2.3 Enforcing Type Safety Dynamically Abstraction Finally, in the source language callees and callers expect arguments or return values that are well-typed with respect to method signatures: We only consider high-level components that are statically well-typed and thus have to comply with the type interface they declare. At the machine code level, however, compromised components are untyped and can feed arbitrary machine words to uncompromised ones, without any a priori typing restrictions. Protection Mechanism We use micro-policy rules to ensure that method arguments and return 20 values always have the type mentioned in type signatures. Fortunately, our type system is simple enough that we can encode types (which are just class names) as tags. Hence, we can build upon the call discipline mechanism above and add the expected argument type to the entry point tag, and the expected return type to the linear return capability tag. Our dynamic typing mechanism relies on the loader to initialize memory tags appropriately. This initial tagging will be presented in detail after the micropolicy itself: The main idea is that a register or memory location holding an object pointer will be tagged as such, together with the type of the object. This dynamic type information is moved around with the value when it is stored, loaded or copied. One key for making this possible is that the Const (objl o) r instructions which put an object reference in a register are blessed with the type of this object according to the type declared for o: executing a blessed Const instruction will put the corresponding type information on the target register’s tag. Remember that we assume that we can check the next instruction tag in micro-policy rules. With dynamic type information available, we can then do type checking by looking at the tags of registers rtgt and rarg upon call, and that of register rret upon return. Upon call, we will compare with type information from the next instruction tag, which is the tag for the method entry point. Upon return, we will compare with type information from the return capability’s tag. For these checks to be possible, we use the following assumption we made about our target symbolic micro-policy machine: The tags of some fixed registers (here, rtgt and rarg upon Jal and rret upon Jump) can be checked in our symbolic micropolicy rules. 6.2.4 tpc ::= n program counter tag tmem ::= (bt, c, et, vt) memory tag treg ::= vt register tag bt ::= B c | NB blessed tag et ::= EP ca → cr | NEP vt ::= rt | ⊥ rt ::= Ret n cr | O c | W entry point tag regular or cleared value tag regular value tag Figure 13: Symbolic micro-policy tags syntax Memory tags (bt, c, et, vt) combine the various information we need about memory cells: First, a memory cell belongs to a compartment c. Its bt tag can be either B c 0 for it to be blessed with type c 0 — which means that it is a Const instruction which puts an object of type c 0 in its target register — or NB when it shouldn’t be blessed. Similarly, its et tag can be either EP ca → cr when it is the entry point of a method of type signature ca (cr ), or NEP when it is not. Finally, the vt tag is for the content of the memory cell, which can be either: a cleared value, tagged ⊥; a return capability for going back to call depth n by providing a return value of type cr , tagged Ret n cr ; an object pointer of type c 0 , tagged O c 0 ; or a regular word, tagged W. Tags on registers are the same vt tags as the ones for the content of memory cells: The content of the register is also tagged as a cleared value, a return capability, an object pointer, or a regular word. Micro-Policy in Detail As presented in section 5.3, a symbolic micro-policy is the combination of a collection of symbolic tags and a transfer function. We first detail our tag syntax. Then, we give the rules of our symbolic micro-policy, which define its transfer function [9]. Finally, we explain how the loader initially tags program memory following the program’s export declarations. Micro-Policy Rules Our micro-policy is presented in figure 14, where we use the meta notation clear vt for clearing return capabilities: It is equal to vt, unless vt is a return capability, in which case it is equal to ⊥. This micro-policy combines all the informal intuition we previously gave in sections 6.2.1, 6.2.2 and 6.2.3 into one transfer function. A notable optimization is that we use the tag on the next instruction Symbolic Micro-Policy Tags Our collection of symbolic micro-policy tags is presented in figure 13. The tag on the program counter register is a natural number n which represents the current call depth. 21 Nop : {tpc = n, tci = (NB, c, et, W), tni = (bt 0 , c, et 0 , rt 0 )} =⇒ {tpc 0 = n} Const i rd : {tpc = n, tci = (NB, c, et, W), tni = (bt 0 , c, et 0 , rt 0 )} =⇒ {tpc 0 = n, trd 0 = W} Const i rd : {tpc = n, tci = (B c 0 , c, et, W), tni = (bt 0 , c, et 0 , rt 0 )} =⇒ {tpc 0 = n, trd 0 = O c 0 } Mov rs rd : {tpc = n, tci = (NB, c, et, W), tni = (bt 0 , c, et 0 , rt 0 ), trs = vt, trd = vt 0 } =⇒ {tpc 0 = n, trd 0 = vt, trs 0 = clear vt} Binopop r1 r2 rd : {tpc = n, tci = (NB, c, et, W), tni = (bt 0 , c, et 0 , rt 0 ), tr1 = W, tr2 = W} =⇒ {tpc 0 = n, trd 0 = W} Load rp rd : {tpc = n, tci = (NB, c, et, W), tni = (bt 0 , c, et 0 , rt 0 ), trp = W, tmem = (bt, c, et 00 , vt), trd = vt 0 } =⇒ {tpc 0 = n, trd 0 = vt, tmem 0 = (bt, c, et 00 , clear vt)} Store rp rs : {tpc = n, tci = (NB, c, et, W), tni = (bt 0 , c, et 0 , rt 0 ), trp = W, trs = vt, tmem = (bt, c, et 00 , vt 0 )} =⇒ {tpc 0 = n, tmem 0 = (NB, c, et 00 , vt), trs 0 = clear vt} Jump r : {tpc = n, tci = (NB, c, et, W), tni = (bt 0 , c, et 0 , rt 0 ), tr = W} =⇒ {tpc 0 = n} Jump r : {tpc = n + 1, tci = (NB, c, et, W), tni = (bt 0 , c 0 , et 0 , rt 0 ), tr = Ret n c, trret = O c} =⇒ {tpc 0 = n, tr 0 = ⊥, traux1 0 = ⊥, traux2 0 = ⊥, traux3 0 = ⊥, trsp 0 = ⊥} when c 6= c 0 Jal r : {tpc = n, tci = (NB, c, et, W), tni = (bt 0 , c, et 0 , rt 0 ), tr = W, tra = vt 0 } =⇒ {tpc 0 = n, tra 0 = W} Jal r : {tpc = n, tci = (NB, c, et, W), tni = (bt 0 , c 0 , EP c1 → c2 , rt 0 ), tr = W, tra = vt 0 , trarg1 = O c, trarg2 = O c1 } =⇒ {tpc 0 = n + 1, tra 0 = Ret n c2 , trret 0 = ⊥, trspp 0 = ⊥, trsp 0 = ⊥} when c 6= c 0 Bnz r i : {tpc = n, tci = (NB, c, et, W), tni = (bt 0 , c, et 0 , rt 0 ), tr = W} =⇒ {tpc 0 = n} Figure 14: The rules of our symbolic micro-policy memory cells in the program get tagged as not being entry points. All locations holding an encoded Const (objl o) r instruction are tagged as blessed instructions storing a c object pointer in register r (B c), where c is the exported type of object o. All locations that hold a symbolic pointer objl o are tagged as storing a pointer to an object of class c (O c), where c is the exported type of object o. This applies to cells in both object and stack memory regions. The other stack memory cells are tagged as cleared values ⊥, and all the remaining memory cells as regular words W. to distinguish internal from cross-compartment calls and returns. Indeed, we don’t need to enforce method call discipline nor to perform type checking on internal calls and returns. This is a crucial move with respect to both transparency and efficiency: It means that low-level components don’t have to comply with the source language’s abstractions for their internal computations, and moreover this lax monitoring will result in a lower overhead on execution time for internal steps, since there will be less cache misses. Loader Initializing Memory Tags The loader first performs simple static checks: it must make sure that (1) no import declaration is left (the program is complete); (2) there exists a methl c m region for each method m of each exported class c; (3) there exists a stackl c region for each exported class c; (4) there exists an objl o region for each exported object o; (5) all memory regions have a matching counterpart in the export declarations. If all these checks succeed the loader proceeds and tags all program memory, following the export declarations: Every memory region is tagged uniformly with the tag of its compartment; which is c for methl c m and stackl c memory regions, and the exported type of o for objl o memory regions. The first memory cell of each method region methl c m gets tagged as an entry point with the exported type signature for method m of class c, while all other 7 7.1 Related Work Secure Compilation Secure compilation has been the topic of many works [4, 19, 22, 32], but only recently has the problem of targeting machine code been considered [6,32]. Moreover, all of these works focus on protecting a program from its context, rather than protecting mutually distrustful components like we do. Abadi and Plotkin [4] formalized address space layout randomization as a secure implementation scheme for private locations, with probabilistic guarantees: They expressed it as a fully-abstract compilation between a source language featuring public and private locations, and a lower-level language in which 22 multi-language programs and building verified compilers that can provide guarantees for them is a hot topic, studied in particular by Ahmed et al. [7, 35] and Ramananandro et al. [36]. memory addresses are natural numbers. Follow-ups were presented by Jagadeesan et al. [22] and Abadi, Planul and Plotkin [2,3], with extended programming languages. Fournet et al. [19] constructed a fully-abstract compiler from a variant of ML [40] to JavaScript. Their protection scheme protects one generated script from its context. A key point is that the protected script must have first-starter privilege: The first script which gets executed can overwrite objects in the global namespace, on which other scripts may rely. Hence, this scheme can’t protect mutually distrustful components from each other, since only one component can be the first to execute. The closest work to ours is recent [6,31,32] and ongoing [31,34] work by Agten, Patrignani, Piessens, et al. They target a set of hardware extensions, which they call protected module architectures [20, 28, 38]. Micro-policies could be used to define a protected module architecture, but they offer finer-grained protection: In our work, this finer-grained protection allows us to manage linear return capabilities and perform dynamic type-checking. Micro-policies also allow us to support a stronger attacker model of dynamic corruption, by means of a secure compilation of mutually distrustful components. As we discovered recently [24, 34], Patrignani et al. are currently trying to extend there previous work to ensure a secure compilation of mutually distrustful components. Our hope is that this parallel work can lead to interesting comparison and exchange, because the mechanisms we use are different: We believe that exploiting the full power of micro-policies can provide stronger guarantees and better performance than using micropolicies just as an instance of protected module architectures. 7.2 8 Discussion and Future Work In this section, we discuss the limitations of our work and the generality of our approach, as well as future work. 8.1 Finite Memory and Full Abstraction While memory is infinite in our high-level language, memory is finite in any target low-level machine. Our symbolic micro-policy machine is no exception: memory regions have a fixed finite size. This means that memory exhaustion or exposing the size of regions can break full abstraction. Let us first recall how memory regions are used in this work. Our compiler translates method bodies from high-level expressions to machine code: Each method gets a dedicated memory region in the process, to store its compiled code. This code manipulates a stack that is local to the method’s compartment; and this stack also gets its own memory region. Finally, each object gets a dedicated memory region, storing low-level values for its fields. The first problem is potential exhaustion of the local stack’s memory: When the stack is full and the program tries to put a new value on top, the machine will stop. This already breaks compiler correctness: Executing the compiled code for (this; o) will for example first try to put rtgt on top on the full stack and hence stop the machine, when the high-level expression would simply return o to the caller. Full abstraction, which typically relies on a compiler correctness lemma, is broken as well: The low-level attacker can now distinguish between method bodies (this; o) and o, even though they have the same behavior in the high-level. One workaround would be to add one more intermediate step in the compilation chain, where the symbolic machine would have infinite memory regions: Full abstraction would be preserved with respect to this machine, and weakened when we move to finite memory regions. This workaround is the one taken by CompCert [27], which until very recently [30] only formalized and proved something about infinite memory models. A better but probably more difficult to implement solution would be to keep the current finite-memory machine, but make it explicitly in the property (e.g. compiler Multi-Language Approaches In contrast with previous fully-abstract compilers where a single source component gets protected from its context, we protect linked mutually distrustful low-level components from each other. One benefit of this approach is that components need not share a common source language. While our current protection mechanism is still deeply connected to our source language, in principle each component could have been written in a specific source language and compiled using a specific compiler. It is actually common in real-life that the final program comes from a mix of components that were all written in different languages. Giving semantics to 23 with compiled components. A first, good step in this direction is that we don’t enforce method call discipline nor type safety on internal calls and returns, but only on crosscompartment calls and returns. This is a good idea for both efficiency and transparency: Checks are lighter, leading to better caching and thus better performance; and low-level programs are less constrained, while still being prevented from taking harmful actions. However, the constraints we set may still be too restrictive: For example, we enforce an object-oriented view on function calls and on data, we limit the number of arguments a function can pass through registers, and we force the programs to comply with our type system. This suggests the need for wrappers. Since internal calls and returns are not heavily monitored, we can define methods that respect our constraints and internally call the non-compliant benign low-level code: This low-level code can then take its non-harmful, internal actions without constraints — hence with good performance — until it internally returns to the wrapper, which will appropriately convert the result of the call before returning to its caller. correctness, full abstraction) that in cases such as resource exhaustion all bets are off. The second problem is that the size of compiled method bodies, as well as the number of private fields of compiled objects, exactly match the size of their dedicated memory regions. This does not cause problems with the current memory model in which region locations exist in isolation of other regions. In future work, switching to a more concrete view of memory could lead to the exposure of information to the attacker: If a program region happens to be surrounded by attacker memory regions, then the attacker could infer the size of the program region and hence get size information about a method body or an object. Because there is no similar information available in the high-level, this will likely break full abstraction. The concrete loader could mitigate this problem, for example by padding memory regions so that all implementations of the same component interface get the same size for each dedicated memory region. This would be, however, wasteful in practice. Alternatively, we could weaken the property to allow leaking this information. For instance we could weaken full abstraction to say that one can only replace a compartment with an equivalent one that has the same sizes when compiled. This would weaken the property quite a lot, but it would not waste memory. There could also be interesting compromises in terms of security vs practicality, in which we pad to fixed size blocks and we only leak the number of blocks. These problems are not specific to our compiler. Fournet et al. [19] target JavaScript and view stack and heap memory exhaustion as a side channel of concrete JavaScript implementations: It is not modeled by the semantics they give to JavaScript. Similarly, the key to the full abstraction result of Patrignani et al. [32, 33] (the soundness and completeness of their trace semantics) is given under the assumption that there is no overflow of the program’s stack [33]. Patrignani et al. [32] also pad the protected program so that for all implementations to use the same amount of memory. 8.2 8.3 Future Work The first crucial next step is to finish the full abstraction proof. As we explain in section 2, however, full abstraction does not capture the exact notion of secure compilation we claim to provide. We will thus formalize a suitable characterization and prove it, hopefully reusing lemmas from the full abstraction proof. Afterwards, we will implement the compiler and conduct experiments that could confirm or deny our hopes regarding efficiency and transparency. There are several ways to extend this work. The most obvious would be to support more features that are common in object-oriented languages, such as dynamic allocation, inheritance, packages or exceptions. Another way would be to move to functional languages, which provide different, interesting challenges. Taking as source language a lambda-calculus with references and simple modules, would be a first step in this direction, before moving to larger ML subsets. Finally, the micro-policy use in this work was built progressively, out of distinct micro-policies which we designed somewhat independently. Composing micro-policies in a systematic and correct way, without breaking the guarantees of any of the composed policies, is still an open problem that would be very Efficiency and Transparency Our micro-policy constrains low-level programs so as to prevent them from taking potentially harmful actions. However, we should make sure 1) that this monitoring has reasonable impact on the performance of these programs; and 2) that these programs are not constrained too much, in particular that benign lowlevel components are not prevented from interacting 24 interesting to study on its own. 8.4 For better understanding, we use a syntax with strings for names which is easily mapped to our source language syntax. We present the three encoded types as distinct components, resulting in quite verbose programs: Linking them together in the high-level would result in one partial program with three classes and no import declarations. Scaling to Real-World Languages Our micro-policy seems to scale up easily to more complicated languages, except for dynamic type checking which will be trickier. Sub-typing, which arises with inheritance, would bring the first new challenges in this respect. Our dynamic type checking mechanism moreover requires encoding types in tags: When we move to languages with richer type systems, we will have to explore in more detail the whole field of research on dynamic type and contract checking [18]. Compartmentalization could easily be extended to deal with public fields, by distinguishing memory locations that hold public field values from other locations. Dynamic allocation seems possible and would be handled by monitor services, setting appropriate tags on the allocated memory region. However, such tag initialization is expensive for large memory regions in the current state of the PUMP, and could benefit from additional hardware acceleration [44]. Finally, functional languages bring interesting challenges that have little to do with the work presented in this document, such as closure protection and polymorphism. We plan to study these languages and discover how micro-policies can help in securely compiling them. A A.1 A.2 Source Semantics The semantics we propose for the source language is a small-step continuation-based semantics. It is particularly interesting to present this variant because it is very close to our intermediate machine and can help understanding how the source to intermediate compilation works. After loading, source programs become a pair of a class table CT and an initial configuration Cfg. The syntax for configurations is presented on figure 18. A configuration (OT , CS , ot , oa , K , e) can be thought of as a machine state: OT is the object table, from which we fetch field values and which gets updated when we perform field updates. CS is the call stack, on top of which we store the current environment upon call. ot is the current object and oa the current argument. e is the current expression to execute and K the current continuation, which defines what we should do with the result of evaluating e. Configurations can be reduced: The rules for the reduction CT ` Cfg −→ Cfg 0 are detailed in figure 19. The class table CT is on the left of the turnstile because it does not change throughout the computation. The initial configuration (OT , [] , ot , oa , [] , e) features the program’s object table OT , an empty call stack, and an empty continuation. The current expression to execute, e, is the body of the main method of the program, executing with appropriately-typed current object ot and argument oa . Since object and class names are natural numbers, an example choice which we take in our formal study is to say that the main method is method 0 of class 0, and that it should initially be called with object 0 of type 0 as both current object and argument. Our reduction is deterministic. A program terminates with result or when there is a possibly empty reduction sequence from its initial configuration to a final configuration (OT 0 , [] , ot , oa , [] , or ) or (OT 0 , CS , ot , oa , (exit ) :: K , or ). The type system ensures that everywhere a exit e expression is encountered, expression e has the same type as the Appendix Encoding Usual Types export obj decl tt : Unit export class decl tt { } obj tt : Unit { } class Unit { } Figure 15: Encoding the unit type Here we give a flavor of what programming looks like with our source language by encoding some familiar types using our class mechanism: the unit type in figure 15, booleans in figure 16, and bounded natural numbers in figure 17. Encoding unbounded natural numbers would be possible with dynamic allocation, which is not part of our source language at the moment. 25 expected return type for the main method. Hence, when a program terminates with a value, the value necessarily has this particular type. import obj decl tt : Unit import class decl Unit { } export export Bool Bool Bool } obj decl t, f : Bool class decl Bool { not(Unit), and(Bool), or(Bool) obj t : Bool { } obj f : Bool { } class Bool { Bool not(Unit) { this == t ? f : t } Bool and(Bool) { this == t ? arg : f } Bool or(Bool) { this == t ? t : arg } } Figure 16: Encoding booleans export obj decl zero, one, two, three : BNat4 export class decl BNat4 { BNat4 add(BNat4), BNat4 mul(BNat4 arg) } obj zero : BNat4 { obj one : BNat4 { obj two : BNat4 { obj three : BNat4 { class BNat4 { BNat4 pred, succ; zero, zero, one, two, one } two } three } three } BNat4 add(BNat4) { arg == zero ? this : this.succ.add(arg.pred) } BNat4 mul(BNat4) { arg == zero ? zero : this.mul(arg.pred).add(this) } } Figure 17: Encoding bounded natural numbers 26 Cfg ::= (OT , CS , ot , oa , K , e) reduction configurations CS ::= [] | (ot , oa , K ) :: CS call stack K ::= [] | E :: K continuations E ::= flat evaluation contexts .f | .f := e 0 | o.f :=  | .m(e 0 ) | o.m() |  == e 0 ? e 00 : e 000 | o ==  ? e 00 : e 000 | ; e | exit  Figure 18: Configuration syntax for the source language 27 CT ` Cfg −→ Cfg 0 CT ` (OT , CS , ot , oa , K , this) −→ (OT , CS , ot , oa , K , ot ) this CT ` (OT , CS , ot , oa , K , arg) −→ (OT , CS , ot , oa , K , oa ) arg CT ` (OT , CS , ot , oa , K , e.f ) −→ (OT , CS , ot , oa , .f :: K , e) sel_push OT (ot ) = obj ct {ot1 , ... , otk } OT (o) = obj ct {o1 , ... , ol } 1≤f ≤l CT ` (OT , CS , ot , oa , .f :: K , o) −→ (OT , CS , ot , oa , K , of ) sel_pop upd_push CT ` (OT , CS , ot , oa , K , e.f := e 0 ) −→ (OT , CS , ot , oa , (.f := e 0 ) :: K , e) upd_switch CT ` (OT , CS , ot , oa , (.f := e) :: K , o) −→ (OT , CS , ot , oa , (o.f := ) :: K , e) OT (ot ) = obj ct {ot1 , ... , otk } OT (o) = obj ct {o1 , ... , of −1 , of , oj0 , ... , ol0 } OT 0 = OT [o 7→ obj c{o1 , ... , of −1 , o 00 , oj0 , ... , ol0 }] CT ` (OT , CS , ot , oa , (o.f := ) :: K , o 00 ) −→ (OT 0 , CS , ot , oa , K , o 00 ) upd_pop call_push CT ` (OT , CS , ot , oa , K , e.m(e 0 )) −→ (OT , CS , ot , oa , .m(e 0 ) :: K , e) call_switch CT ` (OT , CS , ot , oa , .m(e) :: K , o) −→ (OT , CS , ot , oa , o.m() :: K , e) OT (ot 0 ) = obj ct 0 {ot 01 , ... , ot 0k } CT (ct 0 ) = class {c1 , ... , ci ; M1 , ... , Mj } 1≤m≤j Mm = cr (ca ){e} CT ` (OT , CS , ot , oa , ot 0 .m() :: K , oa 0 ) −→ (OT , (ot , oa , K ) :: CS , ot 0 , oa 0 , K , e) call_pop return CT ` (OT , (ot 0 , oa 0 , K ) :: CS , ot , oa , [] , or ) −→ (OT , CS , ot 0 , oa 0 , K , or ) CT ` (OT , CS , ot , oa , K , e1 == e2 ? e3 : e4 ) −→ (OT , CS , ot , oa , ( == e2 ? e3 : e4 ) :: K , e1 ) test_push CT ` (OT , CS , ot , oa , ( == e2 ? e3 : e4 ) :: K , o1 ) −→ (OT , CS , ot , oa , (o1 ==  ? e3 : e4 ) :: K , e2 ) CT ` (OT , CS , ot , oa , (o1 ==  ? e3 : e4 ) :: K , o1 ) −→ (OT , CS , ot , oa , K , e3 ) o1 6= o2 CT ` (OT , CS , ot , oa , (o1 ==  ? e3 : e4 ) :: K , o2 ) −→ (OT , CS , ot , oa , K , e4 ) CT ` (OT , CS , ot , oa , K , (e; e 0 )) −→ (OT , CS , ot , oa , (; e 0 ) :: K , e) CT ` (OT , CS , ot , oa , (; e) :: K , o) −→ (OT , CS , ot , oa , K , e) CT ` (OT , CS , ot , oa , K , exit e) −→ (OT , CS , ot , oa , (exit ) :: K , e) test_pop_eq test_pop_neq seq_push seq_pop exit_push Figure 19: Continuation-based semantics for the source language 28 test_switch References [10] G. M. Bierman and M. J. Parkinson. Effects and effect inference for a core java calculus. Electr. Notes Theor. Comput. Sci., 82(7):82–107, 2003. [1] M. Abadi. Protection in programming-language translations. Research Report 154, SRC, 1998. [11] N. P. Carter, S. W. Keckler, and W. J. Dally. Hardware support for fast capability-based addressing. In F. Baskett and D. W. Clark, editors, ASPLOS-VI Proceedings - Sixth International Conference on Architectural Support for Programming Languages and Operating Systems, San Jose, California, USA, October 4-7, 1994. 1994. [2] M. Abadi and J. Planul. On layout randomization for arrays and functions. In D. A. Basin and J. C. Mitchell, editors, Principles of Security and Trust - Second International Conference, POST 2013, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2013, Rome, Italy, March 16-24, 2013. Proceedings. 2013. [12] T. Dai, S. Sathyanarayan, R. H. C. Yap, and Z. Liang. Detecting and preventing activex apimisuse vulnerabilities in internet explorer. In T. W. Chim and T. H. Yuen, editors, Information and Communications Security - 14th International Conference, ICICS 2012, Hong Kong, China, October 29-31, 2012. Proceedings. 2012. [3] M. Abadi, J. Planul, and G. D. Plotkin. Layout randomization and nondeterminism. Electr. Notes Theor. Comput. Sci., 298:29–50, 2013. [4] M. Abadi and G. D. Plotkin. On protection by layout randomization. ACM Trans. Inf. Syst. Secur., 15(2):8, 2012. [13] A. A. de Amorim and B. C. Pierce. Alpha is for address! the essence of memory safety. Draft, 2015. [5] P. Agten, B. Jacobs, and F. Piessens. Sound modular verification of C code executing in an unverified context. In Proceedings of the 42nd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL 2015, Mumbai, India, January 15-17, 2015, 2015. [14] U. Dhawan, C. Hriţcu, R. Rubin, N. Vasilakis, S. Chiricescu, J. M. Smith, T. F. Knight, Jr., B. C. Pierce, and A. DeHon. Architectural support for software-defined metadata processing. ASPLOS, 2015. [6] P. Agten, R. Strackx, B. Jacobs, and F. Piessens. Secure compilation to modern processors. In S. Chong, editor, 25th IEEE Computer Security Foundations Symposium, CSF 2012, Cambridge, MA, USA, June 25-27, 2012. 2012. [15] Ú. Erlingsson. Low-level software security: Attacks and defenses. In Foundations of Security Analysis and Design IV, FOSAD 2006/2007 Tutorial Lectures, 2007. [16] Ú. Erlingsson, M. Abadi, M. Vrable, M. Budiu, and G. C. Necula. XFI: Software guards for system address spaces. OSDI. 2006. [7] A. Ahmed. Verified compilers for a multilanguage world. In T. Ball, R. Bodík, S. Krishnamurthi, B. S. Lerner, and G. Morrisett, editors, 1st Summit on Advances in Programming Languages, SNAPL 2015, May 3-6, 2015, Asilomar, California, USA. 2015. [17] I. Evans, S. Fingeret, J. Gonzalez, U. Otgonbaatar, T. Tang, H. Shrobe, S. SidiroglouDouskos, M. Rinard, and H. Okhravi. Missing the point(er): On the effectiveness of code pointer integrity. In 2015 IEEE Symposium on Security and Privacy, SP 2015, San Jose, CA, USA, May 17-21, 2015, 2015. [8] A. Azevedo de Amorim, N. Collins, A. DeHon, D. Demange, C. Hriţcu, D. Pichardie, B. C. Pierce, R. Pollack, and A. Tolmach. A verified information-flow architecture. POPL. 2014. [18] R. B. Findler and M. Felleisen. Contracts for higher-order functions. In Proceedings of the 7th International Conference on Functional Programming. 2002. [9] A. Azevedo de Amorim, M. Dénès, N. Giannarakis, C. Hriţcu, B. C. Pierce, A. SpectorZabusky, and A. Tolmach. Micro-policies: Formally verified, tag-based security monitors. In 36th IEEE Symposium on Security and Privacy (Oakland S&P). 2015. [19] C. Fournet, N. Swamy, J. Chen, P. Dagand, P. Strub, and B. Livshits. Fully abstract compilation to javascript. In R. Giacobazzi and 29 [30] E. Mullen, Z. Tatlock, and D. Grossman. Peek: A formally verified peephole optimization framework for x86. CoqPL Workshop, 2015. R. Cousot, editors, The 40th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’13, Rome, Italy - January 23 - 25, 2013. 2013. [31] M. Patrignani. The Tome of Secure Compilation: Fully Abstract Compilation to Protected Modules Architectures. PhD thesis, KU Leuven, Leuven, Belgium, 2015. [20] M. Hoekstra, R. Lal, P. Pappachan, V. Phegade, and J. del Cuvillo. Using innovative instructions to create trustworthy software solutions. In Lee and Shi [26]. [32] M. Patrignani, P. Agten, R. Strackx, B. Jacobs, D. Clarke, and F. Piessens. Secure compilation to protected module architectures. ACM Transactions on Programming Languages and Systems, 2015. [21] A. Igarashi, B. C. Pierce, and P. Wadler. Featherweight java: a minimal core calculus for java and GJ. ACM Trans. Program. Lang. Syst., 23(3):396–450, 2001. [22] R. Jagadeesan, C. Pitcher, J. Rathke, and J. Riely. Local memory via layout randomization. In Proceedings of the 24th IEEE Computer Security Foundations Symposium, CSF 2011, Cernayla-Ville, France, 27-29 June, 2011. 2011. [33] M. Patrignani and D. Clarke. Fully abstract trace semantics for protected module architectures. Computer Languages, Systems & Structures, 42(0):22 – 45, 2015. Special issue on the Programming Languages track at the 29th {ACM} Symposium on Applied Computing. [23] A. Jeffrey and J. Rathke. Java jr: Fully abstract trace semantics for a core java language. In S. Sagiv, editor, Programming Languages and Systems, 14th European Symposium on Programming,ESOP 2005, Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2005, Edinburgh, UK, April 4-8, 2005, Proceedings. 2005. [34] M. Patrignani, D. Devriese, and F. Piessens. Multi-module fully abstract compilation (extended abstract). Workshop on Foundations of Computer Security, 2015. [35] J. T. Perconti and A. Ahmed. Verifying an open compiler using multi-language semantics. In Z. Shao, editor, Programming Languages and Systems - 23rd European Symposium on Programming, ESOP 2014, Held as Part of the European Joint Conferences on Theory and Practice of Software, ETAPS 2014, Grenoble, France, April 5-13, 2014, Proceedings. 2014. [24] Y. Juglaret and C. Hriţcu. Secure compilation using micro-policies (extended abstract). Workshop on Foundations of Computer Security, 2015. [25] A. Kennedy. Securing the .net programming model. Theor. Comput. Sci., 364(3):311–317, 2006. [36] T. Ramananandro, Z. Shao, S. Weng, J. Koenig, and Y. Fu. A compositional semantics for verified separate compilation and linking. In X. Leroy and A. Tiu, editors, Proceedings of the 2015 Conference on Certified Programs and Proofs, CPP 2015, Mumbai, India, January 15-17, 2015. 2015. [26] R. B. Lee and W. Shi, editors. HASP 2013, The Second Workshop on Hardware and Architectural Support for Security and Privacy, Tel-Aviv, Israel, June 23-24, 2013. ACM, 2013. [27] X. Leroy. Formal verification of a realistic compiler. CACM, 52(7):107–115, 2009. [37] K. Z. Snow, F. Monrose, L. Davi, A. Dmitrienko, C. Liebchen, and A. Sadeghi. Just-in-time code reuse: On the effectiveness of fine-grained address space layout randomization. In 2013 IEEE Symposium on Security and Privacy, SP 2013, Berkeley, CA, USA, May 19-22, 2013, 2013. [28] F. McKeen, I. Alexandrovich, A. Berenzon, C. V. Rozas, H. Shafi, V. Shanbhogue, and U. R. Savagaonkar. Innovative instructions and software model for isolated execution. In Lee and Shi [26]. [38] R. Strackx and F. Piessens. Fides: selectively hardening software application components against kernel-level or process-level malware. In T. Yu, G. Danezis, and V. D. Gligor, editors, the [29] G. Morrisett, G. Tan, J. Tassarotti, J.-B. Tristan, and E. Gan. RockSalt: better, faster, stronger SFI for the x86. PLDI. 2012. 30 ACM Conference on Computer and Communications Security, CCS’12, Raleigh, NC, USA, October 16-18, 2012. 2012. [39] G. T. Sullivan, S. Chiricescu, A. DeHon, D. Demange, S. Iyer, A. Kliger, G. Morrisett, B. C. Pierce, H. Reubenstein, J. M. Smith, A. Thomas, J. Tov, C. M. White, and D. Wittenberg. SAFE: A clean-slate architecture for secure systems. In Proceedings of the IEEE International Conference on Technologies for Homeland Security, 2013. [40] N. Swamy, J. Chen, C. Fournet, P. Strub, K. Bhargavan, and J. Yang. Secure distributed programming with value-dependent types. J. Funct. Program., 23(4):402–451, 2013. [41] L. Szekeres, M. Payer, T. Wei, and D. Song. SoK: Eternal war in memory. IEEE S&P. 2013. [42] R. N. M. Watson, P. G. Neumann, J. Woodruff, J. Anderson, R. Anderson, N. Dave, B. Laurie, S. W. Moore, S. J. Murdoch, P. Paeps, M. Roe, and H. Saidi. CHERI: a research platform deconflating hardware virtualization and protection. In Proc. RESoLVE, 2012. [43] R. N. M. Watson, J. Woodruff, P. G. Neumann, S. W. Moore, J. Anderson, D. Chisnall, N. H. Dave, B. Davis, K. Gudka, B. Laurie, S. J. Murdoch, R. Norton, M. Roe, S. Son, and M. Vadera. CHERI: A hybrid capability-system architecture for scalable software compartmentalization. In 2015 IEEE Symposium on Security and Privacy, SP 2015, San Jose, CA, USA, May 17-21, 2015, 2015. [44] E. Witchel, J. Cates, and K. Asanović. Mondrian memory protection. ASPLOS. 2002. [45] B. Yee, D. Sehr, G. Dardyk, J. B. Chen, R. Muth, T. Ormandy, S. Okasaka, N. Narula, and N. Fullagar. Native client: a sandbox for portable, untrusted x86 native code. Commun. ACM, 53(1):91–99, 2010. 31
6cs.PL
The b-bibranching Problem: TDI System, Packing, and Discrete Convexity Kenjiro Takazawa∗ arXiv:1802.03235v1 [cs.DM] 9 Feb 2018 February, 2018 Abstract In this paper, we introduce the b-bibranching problem in digraphs, which is a common generalization of the bibranching and b-branching problems. The bibranching problem, introduced by Schrijver (1982), is a common generalization of the branching and bipartite edge cover problems. Previous results on bibranchings include polynomial algorithms, a linear programming formulation with total dual integrality, a packing theorem, and an M-convex submodular flow formulation. The b-branching problem, recently introduced by Kakimura, Kamiyama, and Takazawa (2018), is a generalization of the branching problem admitting higher indegree, i.e., each vertex v can have indegree at most b(v). For b-branchings, a combinatorial algorithm, a linear programming formulation with total dual integrality, and a packing theorem for branchings are extended. A main contribution of this paper is to extend those previous results on bibranchings and b-branchings to b-bibranchings. That is, we present a linear programming formulation with total dual integrality, a packing theorem, and an M-convex submodular flow formulation for b-bibranchings. In particular, the linear program and M-convex submodular flow formulations respectively imply polynomial algorithms for finding a shortest b-bibranching. 1 Introduction In this paper, we introduce the b-bibranching problem in digraphs, which is a common generalization of two problems generalizing the branching problem. A main contribution of this paper is to provide common extensions of previous theorems on these two problems inherited from branchings: a linear programming formulation with total dual integrality, a packing theorem, and an M-convex submodular flow formulation for b-bibranchings. One problem to be generalized is the bibranching problem, introduced by Schrijver [20] (see also Schrijver [23]). The bibranching problem is a common generalization of the branching and bipartite edge cover problems. Schrijver [20] proved the total dual integrality of a linear program describing the shortest bibranching problem, and a theorem on packing disjoint bibranchings, which extends Edmonds’ disjoint branchings theorem [4]. The totally dual integral linear program implies the polynomial solvability of the shortest bibranching problem via the ellipsoid method, and it was followed by a faster combinatorial algorithm by Keijsper and Pendavingh [14]. The integer decomposition property of the bibranching ∗ Department of Industrial and Systems Engineering, Faculty of Science and Engineering, Hosei University, Tokyo 184-8584, Japan. [email protected] 1 polytope is described in [23]. Later, Takazawa [24] provided an M-convex submodular flow formulation [15] for the shortest bibranching problem, which also implies a combinatorial polynomial algorithm. This formulation is based on the discrete convexity of the shortest branchings, which is pointed out in [25] and indeed follows from the exchange property of branchings [22]. We remark that, in the proof for the exchange property, Edmonds’ disjoint branching theorem [4] plays a key role. More recently, Murota and Takazawa [19] revealed a relation between these two formulations: the M-convex submodular flow formulation [24] is obtained from the linear programming formulation [20] through the Benders decomposition. The other problem to be generalized is the b-branching problem, recently introduced by Kakimura, Kamiyama, and Takazawa [13]. Here, b is a positive integer vector on the vertex set of a digraph. As is well known, a branching is a common independent set of two matroids on the arc set of a digraph: one matroid is a partition matroid, i.e., each vertex v can have indegree at most one; and the other matroid is a graphic matroid. A b-branching is defined as a common independent set of two matroids generalizing these two matroids: one matroid imposes that each vertex v can have indegree at most b(v); and the other matroid is a sparsity matroid defined by b (see Section 2.3 for precise description). We remark that a branching is a special case where b(v) = 1 for every vertex v. Kakimura, Kamiyama, and Takazawa [13] presented a multi-phase greedy algorithm for finding a longest b-branching, which extends that for branchings [1, 2, 3, 9]. A theorem on packing disjoint b-branchings is also presented in [13], which extends Edmonds’ disjoint branchings theorem [4] and leads to the integer decomposition property of the b-branching polytope. In this paper, we introduce b-bibranchings, which provide a common generalization of bibranchings and b-branchings. We demonstrate that b-bibranchings offer a reasonable generalization of bibranchings and b-branchings by proving extensions of the aforementioned results on bibranchings and b-branchings. We first present a linear programming formulation of the shortest b-bibranching problem and prove its total dual integrality, extending those for bibranchings [20] and b-branchings [13]. We then prove a theorem on packing disjoint b-bibranchings, extending those for disjoint bibranchings [20] and disjoint b-branchings [13]. We consequently prove the integer decomposition property of the b-bibranching polytope. Finally, we present an M-convex submodular flow formulation for the shortest b-branchings, extending that for bibranchings [24]. Our proof techniques, which might be of theoretical interest, are as follows. First, the total dual integrality is proved by extending the proof for bibranchings in Schrijver [23]. Second, the proof for the packing theorem is based on the supermodular coloring theorem [21], which was used in an alternative proof [21] for the packing theorem for bibranchings. Our proof extends Tardos’ proof [26] for the supermodular coloring theorem using generalized polymatroids. Finally, for the M-convex submodular flow formulation, we first prove an exchange property of b-branchings, which extends that for branchings [22] and follows from the theorem for packing b-branchings [13]. We then establish the discrete convexity of the shortest b-branchings. Based on this discrete convexity, we provide the M-convex submodular flow formulation of the shortest b-bibranching problem by extending the arguments in [24] The organization of this paper is as follows. In Section 2, we review previous theorems on branchings, bibranchings, and b-branchings. A formal description of b-bibranchings is also presented. In Section 3, we provide a linear programming formulation of the shortest b-bibranching problem and prove its total dual integrality. Section 4 is devoted to establishing a theorem on packing disjoint b-bibranchings. In Section 5, we prove an exchange property of b-branchings and then establish an M-convex submodular flow formulation for the shortest 2 b-bibranching problem. Finally, we conclude the paper in Section 6. 2 Preliminaries In this section, we review previous results on branchings, bibranchings, and b-branchings, which will be extended to b-bibranchings in subsequent sections. At the end of this section, we formally define b-bibranchings. 2.1 Branching Throughout this paper, we assume that a digraph is loopless. Let D = (V, A) be a digraph with vertex set V and arc set A. We denote an arc a from u ∈ V to v ∈ V by uv. For an arc a, the initial and terminal vertices are denoted by ∂ + a and ∂ − a, respectively. That is, if a = uv, Ð then ∂ + a = u and ∂ − a = v. Similarly, for an arc subset B ⊆ A, let ∂ + B = a∈B {∂ + a} and Ð ∂ − B = a∈B {∂ − a}. For a vertex subset X ⊆ V, the subgraph of D induced by X is denoted by D[X] = (X, A[X]). Similarly, for an arc subset B ⊆ A, the set of arcs in B induced by X is denoted by B[X]. For vertex subsets X, Y ⊆ V, let B[X, Y ] = {a ∈ B : ∂ + a ∈ X, ∂ − a ∈ Y }. Í For a vector x ∈ R A and B ⊆ A, we denote x(B) = a∈B x(a). Let B ⊆ A and ∅ , X ( V . The set of arcs in B from X to V \X is denoted by δB+ (X), and the set of arcs from V \ X to X by δB− (X). That is, δB+ (X) = {a ∈ B : ∂ + a ∈ X, ∂ − a ∈ V \ X } and δB− (X) = {a ∈ B : ∂ + a ∈ V \ X, ∂ − a ∈ X }. We denote dB+ (X) = |δB+ (X)| and dB− (X) = |δB− (X)|. If B = A, δ+A (X) and δ−A (X) are often abbreviated as δ+ (X) and δ− (X), respectively. Also, if X ⊆ V is a singleton {v}, then δB+ ({v}), δB− ({v}), dB+ ({v}), and dB− ({v}) are often abbreviated as δB+ (v), δB− (v), dB+ (v), and dB− (v), respectively. An arc subset B ⊆ A is called a branching if dB− (v) ≤ 1 for each v ∈ V and the subgraph (V, B) is acyclic. An arc subset B ⊆ A is a cobranching if the reversal of the arcs in B is a branching. For a branching B ⊆ A, define the root set R(B) of B by R(B) = V \ ∂ − B. For a cobranching B, its counterpart R∗ (B) is defined by R∗ (B) = V \ ∂ + B. As is well known, the branchings in a digraph form a special case of matroid intersection. Indeed, an arc subset is a branching if and only if it is a common independent set of a partition matroid (A, I1 ) and a graphic matroid (A, I2 ), where I1 = {B ⊆ A: dB− (v) ≤ 1 (v ∈ V)}, I2 = {B ⊆ A: |B[X]| ≤ |X | − 1 (∅ , X ⊆ V)}. (1) (2) In the longest branching problem, given a digraph D = (V, A) and arc weights w ∈ R A, we are asked to find a branching B maximizing w(B). The longest branching problem is endowed with a linear programming formulation with total dual integrality, which is a special case of that for matroid intersection. That is, the following linear program in variable x ∈ R A is a linear relaxation of the longest branching problem, where the system (4)–(6) is a linear relaxation of matroid constraints (1) and (2), and thus it is box-TDI. Õ maximize w(a)x(a) (3) subject to a∈A − x(δ (v)) ≤ 1 (v ∈ V ), x(A[X]) ≤ |X | − 1 (∅ , X ⊆ V), x(a) ≥ 0 (a ∈ A). 3 (4) (5) (6) Theorem 1 (see [23]). The linear system (4)–(6) is box-TDI. In particular, the linear system (4)–(6) determines the branching polytope. A theorem for packing disjoint branchings is due to Edmonds [4]. For a positive integer k, let [k] denote the set {1, . . . , k}. Theorem 2 (Edmonds [4]). Let D = (V, A) be a digraph and k be a positive integer. For subsets R1, . . . , Rk of V, there exist disjoint branchings B1, . . ., Bk such that R(B j ) = R j for each j ∈ [k] if and only if d −A (X) ≥ |{ j ∈ [k] : R j ∩ X = ∅}| (∅ , X ⊆ V). 2.2 Bibranching 2.2.1 Definition Let D = (V, A) be a digraph, where V is partitioned into two nonempty subsets S and T. That is, ∅ , S ( V and T = V \ S. Schrijver [20] defined that an arc subset B ⊆ A is a bibranching if it satisfies the following two properties: every vertex v ∈ T is reachable from some vertex in S in the subgraph (V, B), every vertex u ∈ S reaches some vertex in T in the subgraph (V, B). (7) (8) Without loss of generality, we assume that D does not have an arc from T to S. Observe that bibranchings offer a common generalization of branchings and bipartite edge covers. If S is a singleton {s}, then an inclusion-wise minimal bibranching is a branching B with R(B) = {s}. If A[S] = A[T] = ∅, then the digraph D is bipartite and a bibranching is an edge cover in D. In the shortest bibranching problem, we are given nonnegative arc weights w ∈ R+A and asked to find a bibranching B minimizing w(B). An alternative perspective on bibranchings is described in Murota and Takazawa [19]: an arc subset B ⊆ A is a bibranching if dB− (v) ≥ 1 for each v ∈ T, dB+ (u) ≥ 1 for each u ∈ S, B[T] is a branching, B[S] is a cobranching. (9) (10) (11) (12) Although these two definitions slightly differ, there would be no confusion in considering the shortest bibranching problem and packing disjoint bibranchings. 2.2.2 Totally dual integral formulation An arc subset C ⊆ A is called a bicut if C = δ− (U) for some U ⊆ V with ∅ , U ⊆ T or T ⊆ U ( V. It is clear that the characteristic vector of a bibranching satisfies the following linear system in variable x ∈ R A : x(C) ≥ 1 for each bicut C, x(a) ≥ 0 for each a ∈ A. Indeed, Schrijver [20] proved that the linear system (13)–(14) is box-TDI. Theorem 3 (Schrijver [20]; see also [23]). The linear system (13)–(14) is box-TDI. 4 (13) (14) 2.2.3 Packing disjoint bibranchings and supermodular coloring A theorem on packing disjoint bibranchings is also due to Schrijver [20]. Theorem 4 (Schrijver [20]). Let D = (V, A) be a digraph and {S, T } be a partition of V, where S, T , ∅. Then, the maximum number of disjoint bibranchings in D is equal to the minimum size of a bicut. Note that Theorem 4 is an extension of a special case of Theorem 2, where R j = {s} ( j ∈ [k]) for a specified vertex s ∈ V. Schrijver [21] presented a proof for Theorem 4 using the supermodular coloring theorem, which is described as follows. For recent progress on supermodular coloring, the readers are referred to [12, 28]. Let H be a finite set. A set family C ⊆ 2H is an intersecting family if, for all X, Y ∈ C with X ∩ Y , ∅, it holds that X ∪ Y, X ∩ Y ∈ C. For an intersecting family C ⊆ 2H , a function g : C → R is called intersecting supermodular if g(X) + g(Y) ≤ g(X ∪ Y ) + g(X ∩ Y ) holds for all X, Y ∈ C with X ∩ Y , ∅. A function f : C → R is called intersecting submodular if − f is supermodular. Theorem 5 (Schrijver [21]). Let C1, C2 ⊆ 2H be intersecting families, g1 : C1 → R and g2 : C2 → R be intersecting supermodular functions, and k be a positive integer. Then, H can be partitioned into k classes H1, . . ., Hk such that gi (C) ≤ |{ j ∈ [k] : H j ∩ C , ∅}| for each C ∈ Ci and i = 1, 2 if and only if gi (C) ≤ min{k, |C|} for each i = 1, 2 and each C ∈ Ci . In Section 4, we prove a theorem on packing disjoint b-bibranchings (Theorem 13), which extends Theorem 4, by extending Tardos’ proof for Theorem 5 using generalized polymatroids [5]. A generalized polymatroid is a polyhedron defined by an intersecting supermodular function and an intersecting submodular function with a certain property. Here we omit the definition, but show basic properties of generalized polymatroids used in the subsequent sections. Let P ⊆ RH be a polyhedron. Let a1, a2 ∈ H and ã be an element not belonging to H. Denote H̃ = (H \ {a1, a2 }) ∪ { ã}. The aggregation of P at a1, a2 ∈ H is a polyhedron P̃ ∈ RṼ defined by P̃ = {(x0, x(a1 ) + x(a2 )) : (x0, x(a1 ), x(a2 )) ∈ P}, where x0 ∈ RH\{a1,a2 } . Let a ∈ H, and a′, a′′ be elements not belonging to H. Denote ′ H ′ = (H \ {a}) ∪ {a′, a′′ }. The splitting of P at a ∈ H is a polyhedron P′ ⊆ RH defined by P′ = {(x0 ; x(a′), x(a′′)) : (x0 ; x(a′) + x(a′′)) ∈ P}, where x0 ∈ RH\{a} . Theorem 6 (See [7, 8, 16, 23]). Generalized polymatroids have the following properties. (i) A generalized polymatroid is integer if and only if it is determined by a pair of an intersecting submodular function and an intersecting supermodular function which are integer. (ii) The intersection of two integer generalized polymatroids is an integer polyhedron. (iii) Generalized polymatroids are closed under the operations of splitting, aggregation, and intersection with a box. 5 2.2.4 M-convex submodular flow formulation We finally review the M♮ -convex submodular flow formulation for the shortest bibranching problem [24]. We begin some definitions. Let Z denote Z ∪ {+∞}. Let V be a finite set. For a vector x ∈ RV , define supp+ (x) = {v ∈ V : x(v) > 0} and supp− (x) = {v ∈ V : x(v) < 0}. For v ∈ V, let χv denote a vector in ZV defined by χv (v) = 1 and χv (v ′) = 0 for each v ′ ∈ V \ {v}. A function f : ZV → Z is an M♮ -convex function [16, 18, 17] if it satisfies the following property: For each x, y ∈ ZV and u ∈ supp+ (x − y), (15) f (x) + f (y) ≥ f (x − χu ) + f (y + χu ), or there exists v ∈ supp− (x − y) such that (16) f (x) + f (y) ≥ f (x − χu + χv ) + f (y + χu − χv ). The effective demain dom f of f is defined by dom f = {x ∈ ZV : f (x) < +∞}. Let D = (V, A) be a digraph and w ∈ R+A represent the arc weights. Let c, c ∈ R A be vectors on A such that c(a) ≤ c(a) for each a ∈ A. For ξ ∈ R A , define ∂ + ξ, ∂ − ξ, ∂ξ ∈ RV by Õ ∂ + ξ(v) = ξ(a) (v ∈ V), a∈δ+ (v) ∂ − ξ(v) = Õ ξ(a) (v ∈ V), a∈δ− (v) + ∂ξ(v) = ∂ ξ(v) − ∂ − ξ(v) (v ∈ V). Let f : ZV → Z be an M♮ -convex function. Now the following problem in variable ξ ∈ Z A is called the M♮ -convex submodular flow problem [15]: Õ minimize w(a)ξ(a) + f (∂ξ) (17) a∈A subject to c(a) ≤ ξ(a) ≤ c(a) ∂ξ ∈ dom f . for each a ∈ A, (18) (19) The M♮ -convex submodular flow formulation for the shortest bibranching problem [24] is obtained as follows. Define a function fT : ZT → Z in the following manner. First, the effective domain dom fT is defined by dom fT = {x ∈ ZT+ : D[T] has a branching B with x ≥ χR(B) }. Then, for x ∈ ZT , the function value fT (x) is defined by ( min{w(B) : B is a branching in D[T], x ≥ χR(B) } fT (x) = +∞ (x ∈ dom fT ), (x < dom fT ). (20) (21) Similarly, define a function fS : ZS → Z by dom fS = {x ∈ Z+S : D[S] has a cobranching B with x ≥ χR∗ (B) }, ( min{w(B ∗ ) : B ∗ is a cobranching in D[S], x ≥ χR∗ (B∗ ) } fS (x) = +∞ (x ∈ dom fS ), (x < dom fS ). Now the M♮ -convexity of fT and fS is derived from the exchange property of branchings [22]. 6 Theorem 7 ([24], see also [19]). The functions fT and fS are M♮ -convex. Based on the perspective on bibranchings by Murota and Takazawa [19], we can describe the shortest bibranching problem as the following nonlinear minimization problem in variable ξ ∈ Z A[S,T ] : Õ minimize w(a)ξ(a) + fS (∂ + ξ) + fT (∂ − ξ) (22) a∈A[S,T ] subject to 0 ≤ ξ(a) ≤ 1 for each a ∈ A[S, T], ∂ + ξ ∈ dom fS, ∂ − ξ ∈ dom fT . (23) (24) (25) For x ∈ RV and U ⊆ V, denote the restriction of x to U by x|U . It directly follows from Theorem 7 that a function f : Z A[S,T ] → Z defined by f (x) = fS (x|S ) + fT (x|T ) (x ∈ ZV ) is an M♮ -convex function. Therefore, the minimization problem (22)–(25) is an instance of the M♮ -convex submodular flow problem. 2.3 b-branching Let D = (V, A) be a digraph and b ∈ ZV++ be a positive integer vector on V . An arc subset B ⊆ A is a b-branching [13] if dB− (v) ≤ b(v) (v ∈ V ), |B[X]| ≤ b(X) − 1 (∅ , X ⊆ V). (26) (27) It is clear that, in the case b(v) = 1 for each v ∈ V, a b-branching is exactly a branching: (26) and (27) correspond to (1) and (2), respectively. Also, observe that (26) defines an independenet set family of a matroid. Moreover, (27) as well defines a matroid, called a sparsity matroid or a count matroid (see, e.g., [6]). Therefore, a b-branching is a special case of matroid intersection. This observation leads to the fact that the following linear system, in variable x ∈ R A, determines the matroid intersection polytope and thus box-TDI: x(δ− (v)) ≤ b(v) (v ∈ V), x(A[X]) ≤ b(X) − 1 (∅ , X ⊆ V), 0 ≤ x(a) ≤ 1 (a ∈ A). (28) (29) (30) Theorem 8 ([13]). The linear system (28)–(30) is box-TDI. In particular, the linear system (28)–(30) determines the b-branching polytope. What is more, b-branchings inherit several good properties of branchings. In [13], a multiphase greedy algorithm for finding a longest b-branching and a theorem on packing disjoint b-branchings are presented. The former is an extension of that for finding a longest branching [1, 2, 3, 9]. The latter is an extension of that for packing disjoint branchings (Theorem 2) and is described as follows. Theorem 9 ([13]). Let D = (V, A) be a digraph, b ∈ ZV++ be a positive integer vector on V, and k be a positive integer. For j ∈ [k], let b j ∈ ZV+ be a vector such that b j (v) ≤ b(v) for 7 every v ∈ V and b j , b. Then, D has disjoint b-branchings B1, . . . , Bk such that dB−j = b j if and only if the following two conditions are satisfied: d −A (v) ≥ k Õ b j (v) (v ∈ V), (31) (∅ , X ⊆ V). (32) j=1 d −A (X) ≥ |{ j ∈ [k] : b j (X) = b(X) , 0}| 2.4 Definition of b-bibranching We finally define b-bibranchings, the central concept in this paper. Let D = (V, A) be a digraph, and let V be partitioned into two nonempty subsets S and T. Let b ∈ ZV++ be a positive integer vector on the vertex set V. An arc subset B ⊆ A is a b-bibranching if it satisfies the following four properties: every vertex v ∈ T is reachable from some vertex in S in the subgraph (V, B), every vertex u ∈ S reaches some vertex in T in the subgraph (V, B), dB− (v) ≥ b(v) for every v ∈ T, dB+ (u) ≥ b(u) for every u ∈ S. (33) (34) (35) (36) The aforementioned special cases of b-bibranchings, i.e., branchings, bibranchings, and b-branchings, are obtained as follows. If we assume that (a) b(v) = 1 for every v ∈ V and (b) S is a singleton {s}, then an inclusion-wise minimal b-bibranching B is exactly a branching with dB− (v) = 1 for each v ∈ V \ {s} (an s-arborescence). If we only have Assumption (a), a b-bibranching is exactly a bibranching defined by Schrijver [20]. If we only have Assumption (b), an inclusion-wise minimal b-bibranching B is exactly a b-branching [13] with dB− (s) = 0 and dB− (v) = b(v) for each v ∈ V \ {s}. In view of the definition of bibranchings by (9)–(12), an alternative description of bbibranchings is as follows. Call an arc subset B ⊆ A a b-cobranching if the reversal of the arcs in B is a b-branching. Then, an arc subset B ⊆ A is a b-bibranching if B[T] is a b|T -branching in D[T] and B[S] is a b|S -cobranching in D[S], as well as (35) and (36). In the sequel, we present extensions of the aforementioned results on branchings, bibranchings, and b-branchings to b-bibranchings. 3 TDI system for b-bibranchings In this section, we present a linear programming formulation for the shortest b-bibranching problem, and prove its total dual integrality. This is a common extension of that for bibranchings (Theorem 3) and that for b-branchings (Theorem 8). Our proof is based on that for bibranchings by Schrijver [23]. Let D = (V, A) be a digraph, w ∈ R+A be a vector representing the arc weights, {S, T } be a partition of V, where S, T , ∅, and b ∈ ZV++ be a positive integer vector on V. The following 8 linear program in variable x ∈ R A is a relaxation of the shortest b-bibranching problem: Õ minimize w(a)x(a) (37) a∈A − subject to x(δ (v)) ≥ b(v) for each v ∈ T, x(δ+ (v)) ≥ b(v) for each v ∈ S, x(C) ≥ 1 for each bicut C, x(a) ≥ 0 for each a ∈ A. (38) (39) (40) (41) Note that an integer feasible solution x for this linear program can have x(a) ≥ 2. In such a case, x is not the characteristic vector of a b-bibranching. However, we prove that this linear program is indeed box-TDI (Theorem 10), and then obtain a linear description of the b-bibranching polytope by taking the intersection with a box [0, 1] A (Corollary 11). Theorem 10. The linear system (38)–(41) is box-TDI. Proof. Define U ⊆ 2V by U = {{v} : v ∈ V } ∪ U ′, U ′ = {U ⊆ T : |U| ≥ 2} ∪ {U ⊇ T : |V \ U| ≥ 2}. Now consider the following dual linear program of (37)–(41) in variable y ∈ RU : Õ Õ maximize b(v)y(v) + y(U) subject to (42) U∈U ′ v∈V y(∂ − a) + Õ y(U) ≤ w(a) for each a ∈ A[T], (43) y(U) ≤ w(a) for each a ∈ A[S], (44) for each a ∈ A[S, T], (45) for each U ∈ U. (46) U∈U ′,a∈δ− U y(∂ + a) + Õ U∈U ′,a∈δ− U y(∂ − a) + y(∂ + a) + Õ y(U) ≤ w(a) U∈U ′,a∈δ− U y(U) ≥ 0 Let y ∗ ∈ RU be an optimal solution for the linear program (42)–(46) minimizing ∗ U∈U y(U) · |U| · |V \ U|. We prove that the collection of U ∈ U such that y (U) > 0 ∗ ∗ is cross-free, i.e., there exists no pair of X, Y ∈ U (X , Y ) such that y (X), y (Y ) > 0 and the four sets X \ Y , Y \ X, X ∩ Y, and V \ (X ∪ Y ) are nonempty. Í Claim 1. The vertex subset family F ∗ = {U ∈ U : y ∗ (U) > 0} is cross-free. Proof of Claim 1. Assume to the contrary that F ∗ is not cross-free because X, Y ∈ F ∗ violate the condition. Let α = min{y ∗ (X), y ∗ (Y )} and define y′ ∈ RU by   y ∗ (U) − α    y′(U) = y ∗ (U) + α    y ∗ (U)  (U = X, Y ), (U = X ∪ Y, X ∩ Y ), (otherwise). (47) Then, it is straightforward to see that y′ satisfies (43) and (46). It is also not difficult to see that the value of (42) when y = y′ is at least the value of (42) when y = y ∗ . Indeed, if X ∩Y = {v} for some v ∈ V , the value increases by (b(v) − 1)α, and otherwise the value does not change. Therefore, y′ is also an optimal solution for the linear program (42)–(46). Moreover, it holds Í Í that U∈U y′(U) · |U| · |V \ U| < U∈U y ∗ (U) · |U| · |V \ U|. This contradicts the minimality of y ∗ , and thus we conclude that F ∗ is cross-free.  9 From Claim 1, it follows that the F ∗ × A matrix M defined below is a network matrix [23, Theorem 54.8]: ( 1 (a ∈ δ− (U)), (U ∈ F ∗, a ∈ A). (48) MU,a = 0 (otherwise) Since a network matrix is totally unimodular [27], we obtain that M is totally unimodular. It then follows that the system (38)–(41) is box-TDI [23, Theorem 5.35].  The following corollary is a direct consequence of Theorem 10. Corollary 11. The linear system defined by (38)–(41) and x(a) ≤ 1 for each a ∈ A. (49) is totally dual integral. In particular, the b-bibranching polytope is determined by (38)–(41) and (49). From Corollary 11, it follows that the shortest b-bibranching problem can be solved in polynomial time via the ellipsoid method. Corollary 12. The shortest b-bibranching problem can be solved in polynomial time. 4 Packing disjoint b-bibranchings In this section, we prove a theorem on packing disjoint b-branchings, which is a common extension of Theorems 2, 4, and 9. Our proof is an extension of Tardos’ proof for the supermodular coloring theorem (Theorem 5) using generalized polymatroids. Theorem 13. Let D = (V, A) be a digraph, {S, T } be a partition of V, where S, T , ∅, and b ∈ ZV++ be a positive integer vector on V. Then, the maximum number of disjoint b-bibranchings is equal to the minimum of the following three values:   −  d A (v) :v∈T ; (50) min b(v)   +  d A (v) :v∈S ; (51) min b(v) min{|C| : C is a bicut}. (52) Proof. It is straightforward to see that the maximum number of disjoint b-bibranchings is at most the minimum of (50)–(52). In what follows, we prove the opposite inequality. Let k ∈ Z+ be the minimum of (50)–(52). Denote H = A[S, T]. Define C1, C2 ⊆ 2H by − C1 = {δH (U) : ∅ , U ⊆ T }, Note that − δH (U) = Ø − δH (v) (∅ , U ⊆ T), + C2 = {δH (U) : ∅ , U ⊆ S}. + δH (U) = v∈U Ø + δH (v) Define two functions g1 : C1 → Z and g2 : C2 → Z by − g1 (C) = max{k − d −A[T ] (U) : ∅ , U ⊆ T, C = δH (U)} g2 (C) = max{k − (∅ , U ⊆ S). (53) (C ∈ C1 ), (54) (C ∈ C2 ). (55) v∈U d −A[S] (U) : + (U)} ∅ , U ⊆ S, C = δH We now prepare Claims 2–4 below. 10 Claim 2. The subset families C1 and C2 of H are intersecting families. Proof of Claim 2. We prove that C1 is an intersecting family. The argument directly applies to C2 as well. − (U ) and Let X, Y ∈ C1 satisfy X ∩ Y , ∅. Since X, Y ∈ C1 , it follows that X = δH X − (U ) for some nonempty sets U , U ⊆ T. Then, it directly follows from (53) that Y = δH Y X Y − (U ∪ U ) and X ∩ Y = δ − (U ∩ U ). Furthermore, it follows from X ∩ Y , ∅ X ∪ Y = δH X Y X Y H that UX ∩ UY , ∅. We thus obtain that X ∪ Y, X ∩ Y ∈ C1 , implying that C1 is an intersecting family.  Claim 3. Functions g1 and g2 are intersecting supermodular. Proof of Claim 3. We prove that g1 is an intersecting supermodular function. In the same manner, we can prove that g2 is as well an intersecting supermodular function. − (U ), Let X, Y ∈ C1 satisfy X ∩Y , ∅, and let UX , UY ⊆ T satisfy that UX , UY , ∅, X = δH X − (U ), and g (Y ) = k − d − (U ). Then, it follows from the g1 (X) = k − d −A[T ] (UX ), Y = δH Y 1 A[T ] Y definition (54) of g1 that g1 (X ∪ Y) ≥ k − d −A[T ] (UX ∪ UY ), g1 (X ∩ Y ) ≥ k − d −A[T ] (UX ∩ UY ). (56) By the submodularity of d −A[T ] , we have that d −A[T ] (X) + d −A[T ] (Y ) ≥ d −A[T ] (X ∪ Y ) + d −A[T ] (X ∩ Y ). (57) By (56) and (57), we obtain g1 (X ∪ Y ) + g1 (X ∩ Y ) ≥ 2k − d −A[T ] (UX ∪ UY ) − d −A[T ] (UX ∩ UY ) ≥ 2k − d −A[T ] (UX ) − d −A[T ] (UY ) = g1 (X) + g1 (Y ). We thus conclude that g1 is intersecting supermodular.  Claim 4. For i = 1, 2, gi (C) ≤ min{k, |C|} for each C ∈ Ci . (58) Proof. We show the case i = 1. The other case i = 2 can be shown in the same manner. For C ∈ C1 , it directly follows from the definition (54) of g1 that g1 (C) ≤ k. To prove − (U) and g (C) = k − d − (U). g1 (C) ≤ |C|, let U be a nonempty subset of T such that C = δH 1 A[T ] Then, g1 (C) = k − d −A[T ] (U) ≤ d −A (U) − d −A[T ] (U) = dH− (U) = |C|, (59) where the inequality in (59) follows from the definition of k, i.e., k is at most (52). We thus conclude that g1 (C) ≤ min{k, |C|} for each C ∈ C1 .  Consider the following linear system in variable x ∈ RH : 0 ≤ x(a) ≤ 1 x(C) ≤ |C| − g1 (C) + 1 x(C) ≥ 1 − (v)) ≤ d −A (v) − (k − 1)b(v) x(δH 11 (a ∈ H), (C ∈ C1 ), (C ∈ C1 , g1 (C) = k), (v ∈ T). (60) (61) (62) (63) Denote the polytope determined by (60)–(63) by P1 ⊆ RH . Note that, since k is at most (50), the right-hand side d −A (v) − (k − 1)b(v) of (63) is nonnegative. We also define a polytope P2 ⊆ RH by the following system: 0 ≤ x(a) ≤ 1 x(C) ≤ |C| − g2 (C) + 1 x(C) ≥ 1 + x(δH (v)) ≤ d +A (v) − (k − 1)b(v) (a ∈ H), (C ∈ C2 ), (C ∈ C2 , g2 (C) = k), (v ∈ S). (64) (65) (66) (67) We now show that P1 ∩ P2 contains an integer vector by Claims 5 and 6 below. Claim 5. The polytopes P1 and P2 are generalized polymatroids. Proof. Here we prove that P1 is a generalized polymatroid. In the same manner, P2 can be proved to be a generalized polymatroid. By following the argument in Schrijver [23, Theorem 49.14], we obtain from Claims 2–4 that the polytope P ⊆ RH determined by (60)–(62) is a generalized polymatroid. Here we prove that the addition of the constraint (63) maintains that the determined polytope is a generalized polymatroid. Consider the following sequence of transformations: − Q = {y ∈ RT : ∃x ∈ P, x(δH (v)) = y(v) for each v ∈ T }, (68) R = {y ∈ RT : y ∈ Q, y(v) ≤ d −A (v) − (k − 1)b(v) for each v ∈ T }, (69) − (v)) for each v ∈ T }. P′ = {x ∈ RH : ∃y ∈ R, y(v) = x(δH (70) It is straightforward to see that P′ = P1 . We complete the proof by showing that the transformations (68)–(70) maintain that the polytope is a generalized polymatroid. First, Q is the aggregation of P, and hence is a generalized polymatroid (Theorem 6(iii)). Next, R is the intersection of Q and a box [0, d −A − (k − 1)b]. Hence R is again a generalized polymatroid (Theorem 6(iii)). Finally, P′ is the splitting of R, and hence P′ = P1 is a generalized polymatroid as well (Theorem 6(iii)).  By Theorem 6(i), the generalized polymatroids P1 and P2 are integer. It then follows from Theorem 6(ii) that P1 ∩ P2 is an integer polyhedron. In the next claim, we show that P1 ∩ P2 is nonempty, which certifies that P1 ∩ P2 contains an integer vector. Denote by 1H the vector in RH each of whose component is one. Claim 6. The vector x ∗ = 1H /k belongs to P1 ∩ P2 . Proof. Here we prove x ∗ ∈ P1 . We can prove x ∗ ∈ P2 in the same manner. It is clear that x ∗ satisfies (60). We obtain (61) as follows: |C| k−1 = |C| − |C| k k k−1 1 ≤ |C| − g1 (C) = |C| − g1 (C) + g1 (C) k k ≤ |C| − g1 (C) + 1, x ∗ (C) = where the two inequalities follow from (58). 12 If g1 (C) = k, then, |C| ≥ k follows from (58). This implies x ∗ (C) ≥ 1, and thus (62) is satisfied. Finally, for v ∈ T, − (v)| |δH k − d (v) ≥ (d −A (v) − (k − 1)b(v)) − A k   − d A (v) − b(v) = (k − 1) k ≥ 0, − (d −A (v) − (k − 1)b(v)) − x ∗ (δH (v)) = (d −A (v) − (k − 1)b(v)) − where the latter inequality follows from the definition of k, i.e., k is at most (50). Thus, x ∗ satisfies (63). Therefore, we conclude that x ∗ ∈ P1 .  Now P1 ∩ P2 contains an integer vector x1 ∈ {0, 1} H . Denote the arc subset of H whose characteristic vector is x1 by H1 . By induction, we obtain a partition {H1, . . ., Hk } of H = A[S, T] satisfying |{ j ∈ [k] : C ∩ H j , ∅}| ≥ gi (C) for each C ∈ Ci and each i = 1, 2, dH− j (v) ≤ d −A (v) − (k − 1)b(v) ≤ b(v) for each v ∈ T and j ∈ [k], (71) (72) dH+ j (u) ≤ d +A (u) − (k − 1)b(v) ≤ b(v) (73) for each u ∈ S and j ∈ [k]. We complete the proof by showing that D[T] has disjoint b-branchings B1, . . ., Bk and D[S] has disjoint b-cobranchings B1∗, . . ., Bk∗ such that B ∗j ∪H j ∪B j ( j ∈ [k]) is a b-bibranching. Let U be an arbitrary nonempty subset of T. It follows from the definition (54) of g1 that − (U)) ≥ k − d − (U). Combined with (71), this implies that g1 (δH A[T ] − |{ j ∈ [k] : δH j (U) , ∅}| ≥ g1 (δH (U)) ≥ k − d −A[T ] (U). (74) For j ∈ [k], define b j ∈ ZT+ by b j (v) = b(v) − dH− j (v) (v ∈ T). By (72), we have that b j (v) ≥ 0 for each j ∈ [k] and each v ∈ T. It then follows that k Õ j=1 b j (v) = k Õ (b(v) − dH− j (v)) = k · b(v) − dH− (v) ≤ d −A (v) − dH− (v) = d −A[T ] (v), j=1 where the inequality follows from (50). Moreover, by (74), − d −A[T ] (U) ≥ k − |{ j ∈ [k] : δH (U) , ∅}| j − = |{ j ∈ [k] : δH (U) = ∅}| j = |{ j ∈ [k] : b j (U) = b(U) , 0}|. Thus, by Theorem 9, D[T] has disjoint b-branchings B1, . . . , Bk such that dB−j = b j for each j ∈ [k]. In the same manner, we can also see that D[S] has disjoint b-cobranchings B1∗, . . . , Bk∗ such that dB+j = b − dH+ j for each j ∈ [k]. We now have that B ∗j ∪ H j ∪ B j ( j ∈ [k]) are disjoint b-bibranchings in D.  13 The integer decomposition property of the b-bibranching polytope is a direct consequence of Theorem 13. A polytope P ⊆ R A has the integer decomposition property if, for an arbitrary positive integer k, an arbitrary integer vector x ∈ kP can be represented by the sum of k integer vectors in P, where kP = {x ∈ R A : x = k x ′, x ′ ∈ P}. Corollary 14. The b-bibranching polytope has the integer decomposition property. Proof. Let P ⊆ R A denote the b-bibranching polytope and let k be an arbitrary positive integer. By Corollary 11, kP is described as x(δ− (v)) ≥ k · b(v) x(δ+ (v)) ≥ k · b(v) x(C) ≥ k 0 ≤ x(a) ≤ k for each v ∈ T, for each v ∈ S, for each bicut C, for each a ∈ A. (75) (76) (77) (78) Let x be an integer vector in kP and let Ax be a multiset of arcs such that a ∈ A is contained in Ax with multiplicity x(a). Since x satisfies (75)–(78), it follows from Theorem 13 that the digraph (V, Ax ) contains k disjoint b-bibranchings. Since a superset of a b-bibranching is a b-bibranching, Ax can be partitioned into k b-bibranchings. We thus conclude that P has the integer decomposition property.  5 M-convex submodular flow formulation In this section, we present an M♮ -convex submodular flow formulation of the shortest bbibranching problem. We remark that this formulation implies a combinatorial polynomial algorithm. We first show an extension of Theorem 7: an M♮ -convex function is derived from bbranchings. Let D = (V, A) be a digraph and w ∈ R+A represent the arc weights. Define a function g : ZV → Z by dom g = {x ∈ ZV+ : D has a b-branching B with dB− + x ≥ b}, ( min{w(B) : B is a b-branching, dB− + x ≥ b} (x ∈ dom g), g(x) = +∞ (x < dom g). (79) (80) Theorem 15. The function g : ZV → Z defined by (79) and (80) is an M♮ -convex function. To prove Theorem 15, we define another function f : ZV → Z, which is derived from b-branchings more directly. Define f : ZV → Z by dom f = {x ∈ ZV+ : D has a b-branching B with dB− + x = b}, ( min{w(B) : B is a b-branching, dB− + x = b} (x ∈ dom f ), f (x) = +∞ (x < dom f ). (81) (82) Lemma 16. The function f : ZV → Z defined by (81) and (82) is an M♮ -convex function. Lemma 16 follows from the exchange property of b-branchings (Lemma 18). Call a strong component X in D a source component if δ−A (X) = ∅. 14 Lemma 17. Let D = (V, A) be a digraph, and b ∈ ZV++ be a positive integer valued vector on V such that A can be partitioned into two b-branchings B1, B2 ⊆ A. Let b′1, b′2 ∈ ZV satisfy b′1 + b′2 = d −A, b′1 ≤ b, b′2 ≤ b. (83) (84) Then, A can be partitioned into two b-branchings B1′ , B2′ ⊆ A with dB−′ = b′1 and dB−′ = b′2 if 1 2 and only if b′1 (X)  b(X), b′2 (X)  b(X) for each source component X in D. (85) Proof. Necessity is easy, and here we prove sufficiency by Theorem 9. Since (31) follows from (83), it suffices to show (32), i.e., d −A (U) ≥ |{i ∈ {1, 2} : b′i (U) = b(U) , 0}| for each nonempty subset U of V. (86) Suppose to the contrary that (86) does not hold for some nonempty set U ⊆ V. Note that b(U) , 0 holds for every U , ∅ since b ∈ ZV++ . If |{i ∈ {1, 2} : b′i (U) = b(U) , 0}| ≤ 1, then it should hold that d −A (U) = 0, |{i ∈ {1, 2} : b′i (U) = b(U) , 0}| = 1. (87) (88) By (87), U contains a source component X. Then, by (85), it holds that b′1 (U)  b(U) and b′2 (U)  b(U), contradicting to (88). Í Í If |{i ∈ {1, 2} : b′i (U) = b(U) , 0}| = 2, it follows that v∈U dB−1 (v) = v∈U dB−2 (v) = b(U). This implies that δB−1 (U) , ∅ and δB−2 (U) , ∅. We thus obtain d −A (U) ≥ 2, contradicting that (86) does not hold. Therefore, we have shown (86).  Lemma 18. Let D = (V, A) be a digraph and b : V → Z++ . Let B1, B2 ⊆ A be b-branchings, and let a vertex s ∈ V satisfy dB−1 (s)  dB−2 (s). Then, D has b-branchings B1′ , B2′ ⊆ A satisfying the following: (i) B1′ ∪ B2′ = B1 ∪ B2 , (ii) B1′ ∩ B2′ = B1 ∩ B2 , (iii) at least one of (a) and (b) below holds: (a) dB−′ = dB−1 + χs and dB−′ = dB−2 − χs , 1 2 (b) there exists t ∈ V such that dB−2 (t)  dB−′ (t), dB−′ = dB−1 + χs − χt , and dB−′ = 1 1 2 dB−2 − χs + χt . Proof. Let X be a strong component in D containing the vertex s. Suppose that X is a source Í component in D and v∈X dB−1 (v) = b(X) − 1. Since dB−1 (s)  dB−2 (s), this implies that ( b(v) (v ∈ X \ {s}), dB−1 (v) = dB−2 (s) = b(s). b(v) − 1 (v = s), Then, since B2 is a b-branching and X is a source component, there exists a vertex t ∈ X \ {s} such that dB−2 (t)  b(v) = dB1 (t). Now define b′1, b′2 : V → Z++ by b′1 = dB−1 + χs − χt and 15 b′2 = dB−2 − χs + χt . It then follows from Lemma 17 that D has b-branchings B1′ and B2′ satisfying (i), (ii), and (iii)(b). Suppose otherwise. Then define b′1, b′2 : V → Z++ by b′1 = dB−1 + χs and b′2 = dB−2 − χs . Again from Lemma 17, it follows that D has b-branchings B1′ and B2′ satisfying (i), (ii), and (iii)(a).  Lemma 16 directly follows from Lemma 18. Proof of Lemma 16. Let x, y ∈ dom f and s ∈ supp+ (x − y). Denote b-branchings attaining f (x) and f (y) by B x and B y , respectively. That is, dB−x + x = b, w(B x ) = f (x), dB−y + y = b, w(B y ) = f (y). It follows from s ∈ supp+ (x − y) that dB−x (s) < dB−y (s). Now apply Lemma 18 to B x , B y , and s to obtain b-branchings B′x and B′y . If (iii)(a) in Lemma 18 holds for B′x and B′y , then we obtain (15): f (x − χs ) + f (y + χs ) ≤ w(B′x ) + w(B′y ) = w(B x ) + w(B y ) = f (x) + f (y). If (iii)(b) in Lemma 18 holds for B′x and B′y , then we obtain (16): f (x − χs + χt ) + f (y + χs − χt ) ≤ w(B′x ) + w(B′y ) = w(B x ) + w(B y ) = f (x) + f (y). We thus conclude that f satisfies the exchange property of a M♮ -convex function.  We are now ready to prove Theorem 15. Proof of Theorem 15. Let x, y ∈ dom g and u ∈ supp+ (x − y). We have three cases: (i) y(u) ≥ b(u); (ii) x(u) ≥ b(u) + 1 and y(u) ≤ b(u) − 1; and (iii) y(u) < x(u) ≤ b(u). Case (i). If y(u) ≥ b(u), then g(x − χu ) = g(x) and g(y + χu ) = g(y) follow. Case (ii). If x(u) ≥ b(u) + 1, then g(x − χu ) = g(x). Moreover, y(u) ≤ b(u) − 1 implies that g(y + χu ) ≤ g(y). This is explained as follows. Let B y ⊆ A be a b-branching attaining g(y). That is, B y is a b-branching satisfying dB−y + y ≥ b and w(B y ) = g(y). It then holds that dB−y (u) ≥ b(u) − y(u) ≥ 1, and hence there exists an arc a ∈ B y with ∂ − a = u. Now define B′y = B y \ {a}, and we obtain dB−′ = dB−′ − χu ≥ (b − y) − χu = b − (y + χu ). This y y implies that g(y + χu ) ≤ w(B′y ) = w(B y ) − w(a) ≤ w(B y ) = g(y). We thus conclude that g(x) + g(y) ≥ g(x − χu ) + g(y + χu ). Case (iii). Let B x and B y be b-branchings attaining g(x) and g(y), respectively. In Lemma 18, put to B1 = B y , B2 = B x , and s = u. We then obtain b-branchings B1′ and B2′ satisfying (i), (ii), and (iii)(a); or (i), (ii), and (iii)(b). In the former case, (iii)(a) implies that g(y + χs ) ≤ w(B1′ ) and g(x − χs ) ≤ w(B2′ ). It also follows from (i) and (ii) that w(B1′ ) + w(B2′ ) = w(B1 ) + w(B2 ) = g(y)+g(x). We thus obtain g(y+ χs )+g(x− χs ) ≤ g(y)+g(x). In the latter case, (iii)(b) implies that there exists t ∈ supp+ (y − x) satisfying g(y + χs − χt ) ≤ w(B1′ ) and g(x − χs + χt ) ≤ w(B2′ ). We similarly obtain g(y + χs − χt ) + g(x − χs + χt ) ≤ g(y) + g(x).  Our M♮ -convex submodular flow formulation of the shortest b-bibranching problem can be derived immediately from Theorem 15. Let D = (V, A) be a digraph, w ∈ R+A be a vector 16 representing the arc weights, {S, T } be a partition of V, where S, T , ∅, and b ∈ ZV++ be a positive integer vector on V. Define two functions gT : ZT → Z and gS : ZS → Z by dom gT = {x ∈ ZT+ : D[T] has a b|T -branching B with dB− + x ≥ b|T }, ( min{w(B) : B is a b|T -branching in D[T], dB− + x ≥ b|T } (x ∈ dom gT ), gT (x) = +∞ (x < dom g), dom gS = {x ∈ Z+S : D[S] has a b|S -cobranching B with dB+ + x ≥ b|S }, ( min{w(B) : B is a b|S -cobranching in D[S], dB+ + x ≥ b|S } (x ∈ dom gS ), gS (x) = +∞ (x < dom g). Then it follows from Theorem 15 that gT and gS are M♮ -convex functions. Now the shortest bbibranching problem can be formulated as the following M♮ -convex submodular flow problem in variable ξ ∈ Z A[S,T ] : Õ minimize w(a)ξ(a) + gS (∂ + ξ) + gT (∂ − ξ) a∈A[S,T ] subject to 0 ≤ ξ(a) ≤ 1 for each a ∈ A[S, T], ∂ + ξ ∈ dom gS, ∂ − ξ ∈ dom gT . This M♮ -convex submodular flow formulation provides a combinatorial polynomial algorithm for the shortest b-bibranching problem in the following manner. The M♮ -convex submodular flow problem can be solved by polynomially many calls of an oracle for computing the M♮ -convex function values [10, 11]. In our formulation, this computation amounts to computing the minimum weight of a b-branching with prescribed indegree, which can be done by using a combinatorial algorithm for the longest b-branching [13]. 6 Conclusion In this paper, we have proposed the b-bibranching problem, which is a new framework of tractable combinatorial optimization problem. We have proved its polynomial solvability in two ways. One is based on the linear ming formulation with total dual integrality. The other is based on the M♮ -convex submodular flow formulation. We have also presented a min-max theorem for packing disjoint b-bibranchings, which is an extension of Edmonds’ disjoint branchings theorem. With this packing theorem, we have proved that the b-bibranching polytope is a new example of a polytope with integer decomposition property. While this research is mainly motivated from theoretical interest, it would have a potential to be applied to more practical problems, such as the evacuation and communication network design problems. Acknowledgements The author thanks Kazuo Murota for helpful comments. This work is partially supported by JST CREST Grant Number JPMJCR1402, JSPS KAKENHI Grant Numbers JP16K16012, JP25280004, JP26280001, JP26280004, Japan. 17 References [1] F. Bock: An algorithm to construct a minimum directed spanning tree in a directed network, in Developments in Operations Research, Gordon and Breach, 1971, 29–44. [2] Y.J. Chu and T.H. Liu: On the shortest arborescence of a directed graph, Scientia Sinica, 14 (1965), 1396–1400. [3] J. Edmonds: Optimum branchings, Journal of Research National Bureau of Standards, Section B, 71 (1967), 233–240. [4] J. Edmonds: Edge-disjoint branchings, in R. Rustin, ed., Combinatorial Algorithms, Algorithmics Press, 1973, 285–301. [5] A. Frank: Generalized polymatroids, in A. Hajnal, L. Lovász and V.T. Sós, eds., Finite and Infinite Sets Vol. I (Proceedings of the Sixth Hungarian Combinatorial Colloquium, Eger, 1981), 1984, 285–294. [6] A. Frank: Connections in Combinatorial Optimization, Oxford University Press, New York, 2011. [7] A. Frank and É. Tardos: Generalized polymatroids and submodular flows, Mathematical Programming, 42 (1988), 489–563. [8] S. Fujishige: Submodular Functions and Optimization, Annals of Discrete Mathematics, 58, Elsevier, Amsterdam, second edition, 2005. [9] D.R. Fulkerson: Packing rooted directed cuts in a weighted directed graph, Mathematical Programming, 6 (1974), 1–13. [10] S. Iwata, S. Moriguchi and K. Murota: A capacity scaling algorithm for M-convex submodular flow, Mathematical Programming, 103 (2005), 181–202. [11] S. Iwata and M. Shigeno: Conjugate scaling algorithm for Fenchel-type duality in discrete convex optimization, SIAM Journal on Optimization, 13 (2002), 204–211. [12] S. Iwata and Y. Yokoi: List supermodular coloring, Combinatorica, to appear. [13] N. Kakimura, N. Kamiyama and K. Takazawa: The b-branching problem in digraphs, Technical report, arXiv:1802.02381, 2018. [14] J. Keijsper and R. Pendavingh: An efficient algorithm for minimum-weight bibranching, Journal of Combinatorial Theory, Series B, 73 (1998), 130–145. [15] K. Murota: Submodular flow problem with a nonseparable convex function, Combinatorica, 19 (1999), 87–109. [16] K. Murota: Discrete Convex Analysis, Society for Industrial and Applied Mathematics, Philadelphia, 2003. [17] K. Murota and A. Shioura: Simpler exchange axioms for M-concave functions on generalized polymatroids, Japan Journal of Industrial and Applied Mathematics, to appear. 18 [18] K. Murota and A. Shioura: M-convex function on generalized polymatroid, Mathematics of Operations Research, 24 (1999), 95–105. [19] K. Murota and K. Takazawa: Relationship of two formulations for shortest bibranchings, Technical report, arXiv:1706.02029, 2017. [20] A. Schrijver: Min-max relations for directed graphs, Annals of Discrete Mathematics, 16 (1982), 261–280. [21] A. Schrijver: Supermodular colourings, in L. Lovász and A. Recski, eds., Matroid Theory (Proceedings Colloquium on Matroid Theory, Szeged, 1982), 1985, 327–343. [22] A. Schrijver: Total dual integrality of matching forest constraints, Combinatorica, 20 (2000), 575–588. [23] A. Schrijver: Combinatorial Optimization—Polyhedra and Efficiency, Springer, Heidelberg, 2003. [24] K. Takazawa: Shortest bibranchings and valuated matroid intersection, Japan Journal of Industrial and Applied Mathematics, 29 (2012), 561–573. [25] K. Takazawa: Optimal matching forests and valuated delta-matroids, SIAM Journal on Discrete Mathematics, 28 (2014), 445–467. [26] É. Tardos: Generalized matroids and supermodular colourings, in L. Lovász and A. Recski, eds., Matroid Theory (Proceedings Colloquium on Matroid Theory, Szeged, 1982), 1985, 359–382. [27] W.T. Tutte: Lectures on matroids, Journal of Research National Bureau of Standards, Section B, 69 (1965), 1–47. [28] Y. Yokoi: List supermodular coloring with shorter lists, Combinatorica, to appear. 19
8cs.DS
arXiv:1704.05495v1 [cs.AI] 18 Apr 2017 Investigating Recurrence and Eligibility Traces in Deep Q-Networks Jean Harb School of Computer Science McGill University Montreal, Canada [email protected] Doina Precup School of Computer Science McGill University Montreal, Canada [email protected] Abstract Eligibility traces in reinforcement learning are used as a bias-variance trade-off and can often speed up training time by propagating knowledge back over time-steps in a single update. We investigate the use of eligibility traces in combination with recurrent networks in the Atari domain. We illustrate the benefits of both recurrent nets and eligibility traces in some Atari games, and highlight also the importance of the optimization used in the training. 1 Introduction Deep reinforcement learning has had many practical successes in game playing (Mnih et al. (2015),Silver et al. (2016)) and robotics (Levine & Abbeel (2014)). Our interest is in further exploring these algorithms in the context of environments with sparse rewards and partial observability. To this end, we investigate the use of two methods that are known to mitigate these problems: recurrent networks, which provide a form of memory summarizing past experiences, and eligibility traces, which allow information to propagate over multiple time steps. Eligibility traces have been shown empirically to provide faster learning (Sutton & Barto (2017), in preparation) but their use with deep RL has been limited so far (van Seijen & Sutton (2014), Hausknecht & Stone (2015)). We provide experiments in the Atari domain showing that eligibility traces boost the performance of Deep RL. We also demonstrate a surprisingly strong effect of the optimization method on the performance of the recurrent networks. The paper is structured as follows. In Sec. 2 we provide background and notation needed for the paper. Sec. 3 describes the algorithms we use. In sec. 4 we present and discuss our experimental results. In Sec. 5 we conclude and present avenues for future work. 2 Background A Markov Decision Process (MDP) consists of a tuple hS, A, r, P, γi, where S is the set of states, A is the set of actions, r : S × A 7→ R is the reward function, P(s0 |s, a) is the transition function (giving the next state distribution, conditioned on the current state and action), and γ ∈ [0, 1) is the discount factor. Reinforcement learning (RL) (Sutton & Barto, 1998) is a framework for solving unknown MDPs, which means finding a good (or optimal) way of behaving, also called a policy. RL works by obtaining transitions from the environment using them, in order to compute a policy  P∞ and  t that maximizes the expected return, given by E γ r . t t=0 The state-value function for a policy π : S × A → [0, 1], V π (s), is defined as the expected return obtained by starting at state s and picking actions according to π. State-action values Q(s, a) are NIPS 2016, Deep Reinforcement Learning Workshop, Barcelona, Spain. similar to state values, but conditioned also on the initial action a. A policy can be derived from the Q values by picking always the action with the best estimated value at any state. Monte Carlo (MC) and Temporal Difference (TD) are two standard methods for updating the value function from data. In MC, an entire trajectory’s return is used as the target value of the current state. MC error = ∞ X γ i rt+i − V (st ) (1) i=0 In TD, the estimate of the next state’s value is used to correct the current state’s estimate: TD error = rt + γV (st+1 ) − V (st ) (2) Q-learning is an RL algorithm that allows an agent to learn by imagining that it will take the best possible action in the following step: TD error = rt + γ max Q(st+1 , a0 ) − Q(st , at ) 0 a (3) This is an instance of off-policy learning, in which the agent gathers data with an exploratory policy, which randomizes the choice of action, but updates its estimates by constructing targets according to a differnet policy (in this case, the policy that is greedy with respect to the current value estimates. 2.1 Eligibility Traces Eligibility traces are a fundamental reinforcement learning mechanism which allows a trade-off between TD and MC. MC methods suffer from high variance, as many trajectories can be taken from any given state and stochasticity is often present in the MDP. TD suffers from high bias, as it updates values based on its own estimates. Using eligibility traces allows one to design algorithms that cover the middle-ground between MC and TD. The central notion for these are n-step returns, which provide a way of calculating the target by using the value estimate for the state which occurs n steps in the future (compared to the current state): n−1 X (n) Rt = γ i rt+i + γ n V (st+n ). (4) i=0 When n is 1, the results is the TD target, and taking n → ∞ yields the MC target. Eligibility traces use a geometric weighting of these n-step returns, where the weight of the k-step return is λ times the weight of the k − 1-step return. Using a λ = 0 reduces to using TD, as all n-steps for n > 1 have a weight of 0. One of the appealing effects of using eligibility traces is that a single update allows states many steps behind a reward signal to receive credit. This propagates knowledge back at a faster rate, allowing for accelerated learning. Especially in environments where rewards are sparse and/or delayed, eligibility traces can help assign credit to past states and actions. Without traces, seeing a sparse reward will only propagate the value back by one step, which in turn needs to be sampled to send the value back a second step, and so on. Rtλ = (1 − λ) ∞ X (i) λi Rt = (1 − λ) i=0 ∞ X i=1 λi−1 i−1 X γ j rj + γ i+1 V (st+i ) (5) j=0 This way of viewing eligibility traces is called the forward view, as states are looking ahead at the rewards received in the future. The forward view is rarely used, as it requires a state to wait for the future to unfold before calculating an update, and requires memory to store the experience. There is an equivalent view called the backward view, which allows us to calculate updates for every previous state as we take a single action. This requires no memory and lets us perform updates without having to wait for the future. However, this view has had limited success in the neural network setting as it requires using a trace on each neuron of the network, which tend to be dense and heavily used at each step resulting in noisy signals. For this reason, eligibility traces aren’t heavily used when using deep learning, despite their potential benefits. 2 2.1.1 Q(λ) Q(λ) is a variant of Q-learning where eligibility traces are used to calculate the TD error. As mentioned previously, the backwards view of traces is traditionally used. A few versions of Q(λ) exist, but the most used one is Watkins’s Q(λ). As Q-learning is off-policy, the sequence of actions used in the past trajectory used to calculate the trace might be different from the actions that the current policy might take. In that case, one should not be using the trajectory past the point where actions differ. To handle such a case, Watkins’s Q(λ) sets the trace to 0 if the action that the current policy would select is different from the one used in the past. 2.2 Deep Q-Networks Mnih et al. (2015) introduced deep Q-networks (DQN), one of the first successful reinforcement learning algorithms that use deep learning for function approximation in a way general enough which is applicable to a variety of environments. Applying it to a set of Atari games, they used a convolutional neural network (CNN) which took as input the last four frames of the game, and output Q-values for each possible action. Equation 6 shows the DQN cost function, where we are optimizing the θ parameters. The θ− parameters represent frozen Q-value weights which are update at a chosen frequency. L(st , at |θ) = (rt + γ max Q(st+1 , a0 |θ− ) − Q(st , at |θ))2 0 a 2.2.1 (6) Deep Recurrent Q-Networks As introduced in Hausknecht & Stone (2015), deep recurrent Q-networks (DRQN) are a modification on DQN, where single frames are passed through a CNN, which generates a feature vector that is then fed to an RNN which finally outputs Q-values. This architecture gives the agent a memory, allowing it to learn long-term temporal effects and handle partial observability, which is the case in many environments. The authors showed that randomly blanking out frames was difficult to overcome for DQN, but that DRQN learned to handle without issue. To train DRQN, they proposed two variants of experience replay. The first was to sample entire trajectories and run the RNN from end to end. However this is very computationally demanding as some trajectories can be over 10000 steps long. The second alternative was to sample sub-trajectories instead of single transitions. This is required as the RNN needs to fill its hidden state and to allow it to understand the temporal aspect of the data. 2.3 Optimizers Stochastic gradient descent (SGD) is generally the algorithm used to optimize neural networks. However, some information is lost during the process as past gradients might signal that a weight drastically needs to change, or that it is oscillating, requiring a decrease in learning rate. Adaptive SGD algorithms have been built to use this information. RMSprop (Tieleman & Hinton (2012)), uses a geometric averaging over gradients squared, and divides the current gradient by its square root. To perform RMSprop, first we calculate the averaging as g = βg + (1 − β)∇θ2 and then update the parameters θ ← θ + α √∇θ . g+ DQN (Graves (2013)) introduced a variant of RMSprop where the gradient is instead divided by the standard deviation of the running average. First we calculate the running averages m = βm+(1−β)∇θ and g = βg+(1−β)∇θ2 , and then update the parameters using θ ← θ+α √ ∇θ 2 . g−m + In the rest of the paper, when mentioning RMSprop, we’ll be referring to this version. Finally, Kingma & Ba (2014) introduced Adam, which is essentially RMSprop coupled with Nesterov momentum, along with the running averages being corrected for bias. We have a term for the rate of momentum of each of the running averages. To calculate the update with Adam, we start with the updating the averages m = β1 m + (1 − β1 )∇θ, v = β2 v + (1 − β2 )∇θ2 , the correct their biases m̂ m̂ = m/(1 − β1t ), v̂ = v/(1 − β2t ) and finally calculate the gradient update θ ← θ + α √v̂+ . 3 Figure 1: This graph illustrates how a sample from experience replay is used in training. We use a number of frames to fill the hidden state of the RNN. Then, for the states used for training, we have the RNN output the Q-values. Finally, we calculate each n-step return and weight them according to λ, where the arrows represent the forward view of each trace. All states are passed though the CNN before entering the RNN. 3 Experimental Setup As explained, the forward view of eligibility traces can be useful, but is computationally demanding in terms of memory and time. One must store all transitions and apply the neural network to each state in the trajectory. By using DRQN, experience replay is already part of the algorithm, which removes the memory requirement of the traces. Then, by training on sub-trajectories of data, the states must be run through the RNN with all state values as the output, which eliminates the computational cost. Finally, all that’s left to use eligibility traces is simply to calculate the weighted sum of the targets, which is very cheap to do. In this section we analyze the use of eligibility traces when training DRQN and try both RMSprop and Adam as optimizers. We only tested the algorithms on fully observable games as to compare the learning capacities without the unfair advantage of having a memory, as would be the case on partially observable environments. 3.1 Architecture We tested the algorithms on two Atari 2600 games, part of the Arcade Learning Environment (Bellemare et al. (2012)), Pong and Tennis. The architecture used is similar to the one used in Hausknecht & Stone (2015). The frames are converted to gray-scale and re-sized to 84x84. These are then fed to a CNN with the first layer being 32 8x8 filters and a stride of 4, followed by 64 4x4 filters with a stride of 2, then by 64 3x3 filters with a stride of 1. The output of the CNN is then flattened before being fed to a single dense layer of 512 output neurons, which is finally fed to an LSTM (Hochreiter & Schmidhuber (1997)) with 512 cells. We then have a last linear layer that takes the output of the recurrent layer to output the Q-values. All layers before the LSTM are activated using rectified linear units (ReLU). As mentioned in subsection 2.2.1, we also altered experience replay to sample sub-trajectories. We use backprop through time (BPTT) to train the RNN, but only train on a sub-trajectory of experience. In runtime, the RNN will have had a large sequence of inputs in its hidden state, which can be problematic if always trained with an empty hidden state. Like in Lample & Singh Chaplot (2016), we therefore sample a slightly longer length of trajectory and use the first m states to fill the hidden state. In our experiments, we selected trajectory lengths of 32, where the first 10 states are used as filler and the remaining 22 are used for the traces and TD costs. We used a batch size of 4. All experiments using eligibility traces use λ = 0.8. Furthermore, we use Watkins’s Q(λ). To limit computation costs of using traces, we cut the trace off once it becomes too small. In our experiments, we choose the limit of 0.01, which allows the traces to affect 21 states ahead (when λ = 0.8). We 4 calculate the trace for every state in the trajectory, except for a few in the beginning, use to fill in the hidden state of the RNN. When using RMSprop, we used a momentum of 0.95, an epsilon of 0.01 and a learning rate of 0.00025. When using Adam, we used a momentum of gradients of 0.9, a momentum of squared gradients of 0.999, an epsilon of 0.001 and a learning rate of 0.00025. Testing phases are consistent across all models, with the score being the average over each game played during 125000 frames. We also use an  of 0.05 for action selection. Choose k as number of trace steps and m as RNN-filler steps Initialize weights θ, experience replay D θ− ← θ s ← s0 repeat Initialize RNN hidden state to 0. repeat Choose a according to −greedy policy on Q(s, a|θ) Take action a in s, observe s0 , r Store s, a, r, s0 in Experience Replay 0 Sample ( 4 sub-trajectories of m + k sequential transitions (s, a, r, s ) from D r s’ is terminal, ŷ = r + γ max Q(s0 , ā|θ− ) otherwise ā foreach transition sampled do  λ at = arg maxā (st , ā|θ), λt = 0 otherwise end for l from 0 to k − 1 do  Pk  (s−l+1)   Pk  Qs Qs λ R̂t+l = / s=l i=l λt+i Rt+s s=l i=l λt+i end λ 2 Perform gradient descent on ∂(R̂ −Q(s,a|θ)) ∂θ Every 10000 steps θ− ← θ s ← s0 until s0 is terminal until training complete Algorithm 1: Deep Recurrent Q-Networks with forward view eligibility traces on Atari. The (n) eligibility traces are calculated using the n-step return function Rt for time-step t was described in section 2.1. 4 Experimental Results We describe experiments in two Atari games: Pong and Tennis. We chose Pong because it permits quick experimentation, and Tennis because it is one of the games that has proven difficult in all published results on Atari. 4.1 Pong First, we tested an RNN model both with λ = 0 and λ = 0.8, trained with RMSprop. Figure 2 shows that the model without a trace (λ = 0) learned at the same rate as DQN, while the model with traces (λ = 0.8) learned substantially faster and with more stability, without exhibiting any epochs with depressed performance. This is probably due to the eligibility traces propagating rewards back by many steps in a single update. In Pong, when the agent hits the ball, it must wait several time-steps before the ball gets either to or past the opponent. Once this happens, the agent must assign the credit of the event back to the time when it hit the ball, and not to the actions performed after the ball had already left. The traces clearly help send this signal back faster. 5 RMSprop 15 15 10 10 5 5 0 0 −5 −10 −15 −15 −20 −20 0 5 10 15 epochs 20 25 30 RNN trace=0.0 RNN trace=0.8 DQN −5 −10 −25 Adam 20 scores scores 20 −25 0 5 10 15 epochs 20 25 30 Figure 2: Test scores on Pong by training models with RMSprop vs Adam. We then tested the same models but using Adam as the optimizer instead of RMSprop. All models learn much faster with this setting. However, the model with no trace gains significantly more than the model with the trace. Our current intuition is that some hyper-parameters, such as the frozen network’s update frequency, are limiting the rate at which the model can learn. Note also that the DQN model also learns faster with Adam as the optimizer, but remains quite unstable, in comparison with the recurrent net models. Finally, the results in Table 1 show that both using eligibility traces and Adam provide performance improvements. While training with RMSProp, the model with traces gets to near optimal performance more than twice as quickly as the other models. With Adam, the model learns to be optimal in just 6 epochs. RMSprop Adam DQN 23 12 RNN λ = 0 28 8 RNN λ = 0.8 10 6 Table 1: Number of epochs before getting to 18 points in Pong. We chose 18 points as the threshold because it represents a near-optimal strategy. Testing is performed with a 5% -greedy policy, stopping the agent from having a perfect score. 4.2 Tennis The second Atari 2600 game we tested was Tennis. A match consists of only one set, which is won by the player who is the first to win 6 "games" (as in regular tennis). The score ranges from 24 to -24, given as the difference between the number of balls won by the two players. As in Pong, we first tried an RNN trained with RMSprop and the standard learning rate of 0.00025, both with and without eligibility traces (using again λ = 0.8 and λ = 0). Figure 3 shows that both RNN models learned to get optimal scores after about 50 epochs. This is in contrast with DQN, which never seems to be able to pass the 0 threshold, with large fluctuations ranging from -24 to 0. After visually inspecting the games played in the testing phase, we noticed that the DQN agent gets stuck in a loop, where it exchanges the ball with the opponent until the timer runs out. In such a case, the agent minimizes the number of points scored against, but never learns to beat the opponent. The score fluctuations depend on how few points the agent allows before entering the loop. We suspect that the agent gets stuck in this policy because the reward for trying to defeat the opponent is delayed, waiting for the ball to reach the opponent and get past it. Furthermore, the experiences of getting a point are relatively sparse. Together, it makes it difficult to propagate the reward back to the action of hitting the ball correctly. 6 We also notice that both the RNN with and without eligibility traces manage to learn a near-optimal policy without getting stuck in the bad policy. The RNN has the capacity of sending the signal back to past states with BPTT, allowing it to do credit assignment implicitly, which might explain their ability to escape the bad policy. Remarkably, this is the only algorithm that succeeds in getting near-optimal scores on Tennis, out of all variants of DQN (Mnih et al. (2015), Munos et al. (2016), Wang et al. (2015), Mnih et al. (2016), Schaul et al. (2015)), which tend to get stuck in the policy of delaying. The model without traces learned at a faster pace than the one with traces, arriving to a score of 20 in 45 epochs as opposed to 62 for its counterpart. It’s possible that the updates for model with traces were smaller, due to the weighting of target values, indirectly leading to a lower learning rate. We also trained the models with RMSprop and a higher learning rate of 0.001. This led to the model with traces getting to 20 points in just 27 epochs, while the model without traces lost its ability to get optimal scores and never passed the 0 threshold. RMSprop lr=0.00025 RMSprop lr=0.001 30 20 10 10 10 scores 20 0 0 0 −10 −10 −10 −20 −20 −20 −30 0 10 20 30 40 50 epochs 60 70 80 −30 0 5 10 15 epochs RNN trace=0.0 20 Adam 30 20 scores scores 30 25 RNN trace=0.8 30 −30 0 5 10 15 epochs 20 25 30 DQN Figure 3: Test scores on Tennis comparing RMSprop and Adam. RMSprop lr=0.00025 RMSprop lr=0.001 Adam lr=0.00025 DQN N/A N/A N/A RNN λ = 0 45 N/A 19 RNN λ = 0.8 62 27 13 Table 2: Number of epochs before getting to 20 points in Tennis. N/A represents the inability to reach such a level. We then tried using Adam as the optimizer, with the original learning rate of 0.00025. Both RNN models learned substantially faster than with RMSprop, with the RNN with traces getting to nearoptimal performance in just 13 epochs. With Adam, the gradient for the positive TD is stored in the momentum part of the equation for quite some time. Once in momentum, the gradient is part of many updates, which makes it enough to overtake the safe strategy. We also notice that the model with traces was much more stable than its counterpart. The model without traces fell back to the policy of delaying the game on two occasions, after having learned to beat the opponent. Finally, we trained DQN with Adam, but the model acted the same way as DQN trained with RMSprop. 5 Discussion and Conclusion In this paper, we analyzed the effects of using eligibility traces and different optimization functions. We showed that eligibility traces can improve and stabilize learning and using Adam can strongly accelerate learning. As shown in the Pong results, the model using eligibility traces didn’t gain much performance from using Adam. One possible cause is the frozen network. While it has a stabilizing effect in DQN, by stopping policies from drastically changing from a single update, it also stops newly learned values from being propagated back. Double DQN seems to partially go around this issue, allowing the 7 policy of the next state to change, while keeping the values frozen. In future experiments, we must consider eliminating or increasing the frozen network’s update frequency. It would also be interesting to reduce the size of experience replay, as with increased learning speed, old observations can become too off-policy and barely be used in eligibility traces. References Marc G Bellemare, Yavar Naddaf, Joel Veness, and Michael Bowling. The arcade learning environment: An evaluation platform for general agents. Journal of Artificial Intelligence Research, 2012. Alex Graves. Generating sequences with recurrent neural networks. arXiv preprint arXiv:1308.0850, 2013. Matthew Hausknecht and Peter Stone. Deep recurrent q-learning for partially observable mdps. arXiv preprint arXiv:1507.06527, 2015. Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8): 1735–1780, 1997. Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. Guillaume Lample and Devendra Singh Chaplot. Playing fps games with deep reinforcement learning. arXiv preprint arXiv:1609.05521, 2016. Sergey Levine and Pieter Abbeel. Learning neural network policies with guided policy search under unknown dynamics. In Advances in Neural Information Processing Systems, pp. 1071–1079, 2014. Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Bellemare, Alex Graves, Martin Riedmiller, Andreas K Fidjeland, Georg Ostrovski, et al. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 2015. Volodymyr Mnih, Adria Puigdomenech Badia, Mehdi Mirza, Alex Graves, Timothy P Lillicrap, Tim Harley, David Silver, and Koray Kavukcuoglu. Asynchronous methods for deep reinforcement learning. arXiv preprint arXiv:1602.01783, 2016. Rémi Munos, Tom Stepleton, Anna Harutyunyan, and Marc G Bellemare. Safe and efficient off-policy reinforcement learning. arXiv preprint arXiv:1606.02647, 2016. Tom Schaul, John Quan, Ioannis Antonoglou, and David Silver. Prioritized experience replay. arXiv preprint arXiv:1511.05952, 2015. David Silver, Aja Huang, Chris J Maddison, Arthur Guez, Laurent Sifre, George Van Den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, et al. Mastering the game of go with deep neural networks and tree search. Nature, 529(7587):484–489, 2016. Richard S Sutton and Andrew G Barto. Reinforcement learning: An introduction, volume 1. MIT press Cambridge, 1998. Richard S Sutton and Andrew G Barto. Reinforcement learning: An introduction, In Preparation. MIT press Cambridge, 2017. Tijmen Tieleman and Geoffrey Hinton. Lecture 6.5-rmsprop: Divide the gradient by a running average of its recent magnitude. COURSERA: Neural Networks for Machine Learning, 4(2), 2012. Harm van Seijen and Rich Sutton. True online td (lambda). In Proceedings of The 31st International Conference on Machine Learning, pp. 692–700, 2014. Ziyu Wang, Nando de Freitas, and Marc Lanctot. Dueling network architectures for deep reinforcement learning. arXiv preprint arXiv:1511.06581, 2015. 8
2cs.AI
ProofWatch: Watchlist Guidance for Large Theories in E Zarathustra Goertzel1 , Jan Jakubův1 , Stephan Schulz2 , and Josef Urban1⋆ arXiv:1802.04007v1 [cs.AI] 12 Feb 2018 1 Czech Technical University in Prague 2 DHBW Stuttgart Abstract. Watchlist (also hint list) is a mechanism that allows related proofs to guide a proof search for a new conjecture. This mechanism has been used with the Otter and Prover9 theorem provers, both for interactive formalizations and for human-assisted proving of open conjectures in small theories. In this work we explore the use of watchlists in large theories coming from first-order translations of large ITP libraries, aiming at improving hammer-style automation by smarter internal guidance of the ATP systems. In particular, we (i) design watchlist-based clause evaluation heuristics inside the E ATP system, and (ii) develop new proof guiding algorithms that load many previous proofs inside the ATP and focus the proof search using a dynamically updated notion of proof matching. The methods are evaluated on a large set of problems coming from the Mizar library, showing significant improvement of E’s standard portfolio of strategies, and also of the previous best set of strategies invented for Mizar by evolutionary methods. 1 Introduction: Hammers, Learning and Watchlists Hammer -style automation tools [5] connecting interactive theorem provers (ITPs) with automated theorem provers (ATPs) have recently led to a significant speedup of formalization. An important component of such tools is premise selection [1]: choosing a small number of the most relevant facts that are given to the ATPs. Premise selection methods based on machine learning from many proofs available in the ITP libraries typically outperform manually specified heuristics [1,17,19,7,4,2]. Given the performance of such ATP-external guidance methods, learning-based internal proof search guidance methods have started to be explored, both for ATPs [36,18,15,23,8] and also in the context of tactical ITPs [10,12]. In this work we develop learning-based internal proof guidance methods for the E [30] ATP system and evaluate them on the large Mizar Mathematical Library [11]. The methods are based on the watchlist (also hint list ) technique developed by Veroff [37], focusing proof search towards lemmas (hints) that were useful in related proofs. Watchlists have proved essential in the AIM project [21] ⋆ Supported by the AI4REASON ERC Consolidator grant number 649043, and by the Czech project AI&Reasoning CZ.02.1.01/0.0/0.0/15 003/0000466 and the European Regional Development Fund. done with Prover9 [25] for obtaining very long and advanced proofs of open conjectures. Problems in large ITP libraries however differ from one another much more than the AIM problems, making it more likely for unrelated watchlist lemmas to mislead the proof search. Also, Prover9 lacks a number of large-theory mechanisms and strategies developed recently for E [16,13,15]. Therefore, we first design watchlist-based clause evaluation heuristics for E that can be combined with other E strategies. Second, we complement the internal watchlist guidance by using external statistical machine learning to pre-select smaller numbers of watchlist clauses relevant for the current problem. Finally, we use the watchlist mechanism to develop new proof guiding algorithms that load many previous proofs inside the ATP and focus the search using a dynamically updated heuristic representation of proof search state based on matching the previous proofs. The rest of the paper is structured as follows. Section 2 briefly summarizes the work of saturation-style ATPs such as E. Section 3 discusses heuristic representation of search state and its importance for learning-based proof guidance. We propose an abstract vectorial representation expressing similarity to other proofs as a suitable evolving characterization of saturation proof searches. We also propose a concrete implementation based on proof completion ratios tracked by the watchlist mechanism. Section 4 describes the standard (static) watchlist mechanism implemented in E and Section 5 introduces the new dynamic watchlist mechanisms and its use for guiding the proof search. Section 6 evaluates the static and dynamic watchlist guidance combined with learning-based preselection on the Mizar library. Section 7 shows several examples of nontrivial proofs obtained by the new methods, and Section 8 discusses related work and possible extensions. 2 Proof Search in Saturating First-Order Provers The state of the art in first-order theorem proving is a saturating prover based on a combination of resolution/paramodulation and rewriting, usually implementing a variant of the superposition calculus [3]. In this model, the proof state is represented as a set of first-order clauses (created from the axioms and the negated conjecture), and the system systematically adds logical consequences to the state, trying to derive the empty clause and hence an explicit contradiction. All current saturating first-order provers are based on variants of the givenclause algorithm. In this algorithm, the proof state is split into two subsets of clauses, the processed clauses P (initially empty) and the unprocessed clauses U . On each iteration of the algorithm, the prover picks one unprocessed clause g (the so-called given clause), performs all inferences which are possible with g and all clauses in P as premises, and then moves g into P . The newly generated consequences are added to U . This maintains the core invariant that all inferences between clauses in P have been performed. Provers differ in how they integrate simplification and redundancy into the system, but all enforce the variant that P is maximally simplified (by first simplifying g with clauses in P , then back- simplifying P with g) and that P contains neither tautologies nor subsumed clauses. The core choice point of the given-clause algorithm is the selection of the next clause to process. If theoretical completeness is desired, this has to be fair, in the sense that no clause is delayed forever. In practice, clauses are ranked using one or more heuristic evaluation functions, and are picked in order of increasing evaluation (i.e. small values are good). The most frequent heuristics are based on symbol counting, i.e., the evaluation is the number of symbol occurrences in the clause, possibly weighted for different symbols or symbols types. Most provers also support interleaving a symbol-counting heuristic with a first-in-first-out (FIFO) heuristic. E supports the dynamic specification of an arbitrary number of differently parameterized priority queues that are processed in weighted roundrobbin fashion via a small domain-specific language for heuristics. Previous work [28,31] has both shown that the choice of given clauses is critical for the success rate of a prover, but also that existing heuristics are still quite bad - i.e. they select a large majority of clauses not useful for a given proof. Positively formulated, there still is a huge potential for improvement. 3 Proof Search State in Learning Based Guidance A good representation of the current state is crucial for learning-based guidance. This is quite clear in theorem proving and famously so in Go and Chess [32,33]. For example, in the TacticToe system [10] proofs are composed from pre-programmed HOL4 [34] tactics that are chosen by statistical learning based on similarity of the evolving goal state to the goal states from related proofs. Similarly, in the learning versions of leanCoP [26] – (FE)MaLeCoP [36,18] – the tableau extension steps are guided by a trained learner using similarity of the evolving tableau (the ATP proof search state) to many other tableaux from related proofs. Such intuitive and compact notion of proof search state is however hard to get when working with today’s high-performance saturation-style ATPs such as E [30] and Vampire [22]. The above definition of saturation-style proof state (Section 2) as either one or two (processed/unprocessed) large sets of clauses is very unfocused. Existing learning-based guiding methods for E [15,23] practically ignore this. Instead, they use throughout the whole proof search only the conjecture and its features for selecting the relevant given clauses. This is obviously unsatisfactory, both when compared to the evolving search state in the case of tableau and tactical proving, and also when compared to the way how humans select the next steps when they search for proofs. The proof search state in our mind is certainly an evolving concept based on the search done so far, not a fixed set of features extracted just from the conjecture. 3.1 Proof Search State Representation for Guiding Saturation One of the motivations for the work presented here is to produce an intuitive, compact and evolving heuristic representation of proof search state in the context of learning-guided saturation proving. As usual, it should be a vector of (realvalued) features that are either manually designed or learned. In a high-level way, our proposed representation is a vector expressing an abstract similarity of the search state to (possibly many) previous related proofs. This can be implemented in different ways, using both statistical and symbolic methods and their combinations. An example and motivation comes again from the work of Veroff, where a search is considered promising when the given clauses frequently match hints. The gaps between the hint matchings may correspond to the more brute-force bridges between the different proof ideas expressed by the hints. Our first practical implementation introduced in Section 5 is to load upon the search initialization N related proofs Pi , and for each Pi keep track of the ratio of the clauses from Pi that have already been subsumed during the search. The subsumption checking is using E’s watchlist mechanism (Section 4). The N -long vector p of such proof completion ratios is our heuristic representation of the proof search state, which is both compact and typically evolving, making it suitable for both hard-coded and learned clause selection heuristics. In this work we start with fast hard-coded watchlist-style heuristics for focusing inferences on clauses that progress the more finished proofs (Section 5). However training e.g. a statistical ENIGMA-style [15] clause evaluation model by adding p to the currently used ENIGMA features is a straightforward extension. 4 Static Watchlist Guidance and Its Implementation in E E originally implemented a watchlist mechanism as a means to force direct, constructive proofs in first order logic. For this application, the watchlist contains a number of goal clauses (corresponding to the hypotheses to be proven), and all newly generated and processed clauses were checked against the watchlist. If one of the watchlist clauses was subsumed by a new clause, the former would be removed from the watchlist. The proof search was complete, once all clauses from the watchlist had been removed. In contrast to the normal proof by contradiction, this mechanism is not complete. However, it is surprisingly effective in practice, and it produces a proof by forward reasoning. It was quickly noted that the basic mechanism of the watchlist can also be used to implement a mechanism similar to the hints successfully used to guide Otter [24] (and its successor Prover9 [25]) in a semi-interactive manner [37]. Hints in this sense are intermediate results or lemmas expected to be useful in a proof. However, they are not provided as part of the logical premises, but have to be derived during the proof search. While the hints are specified when the prover is started, they are only used to guide the proof search - if a clause matches a hint, it is prioritized for processing. If all clauses needed for a proof are provided as hints, in theory the prover can be guided to prove a theorem without any search, i.e. it can replay a previous proof. A more general idea, explored in this paper, is to fill the watchlist with a large number of clauses useful in proofs of similar problems. In E, the watchlist is loaded on start-up, and is stored in a feature vector index [29] that allow for efficient retrieval of subsumed (and subsuming) clauses. By default, watchlist clauses are simplified in the same way as processed clauses, i.e. they are kept in normal form with respect to clauses in P . This increases the chance that a new clause (which always is simplified) can match a similar watchlist clause. If used to control the proof search, subsumed clauses can optionally remain on the watchlist. We have extended E’s domain-specific language for search heuristics with two priority functions to access information about the relationship of clauses to the watchlist - the function PreferWatchlist ranks clauses that subsume at least one watchlist clause higher than others, and the dual function DeferWatchlist ranks them lower. Using the first, we have also defined four built-in heuristics that preferably process watchlist clauses. These include a pure watchlist heuristic, an simple interleaved watch list function (picking 10 out of every eleven clauses from the watchlist, the last using FIFO), and a modification of a strong heuristic obtained from a genetic algorithm [27] that interleaves several different evaluation schemes and was modified to prefer watchlist clauses in two of its four sub-evaluation functions. 5 Dynamic Watchlist Guidance In addition to the above mentioned static watchlist guidance, we propose and experiment with an alternative: dynamic watchlist guidance. With dynamic watchlist guidance, several watchlists, as opposed to a single watchlist, are loaded on start-up. Separate watchlists are supposed to group clauses which are more likely to appear together in a single proof. The easiest way to produce watchlists with this property is to collect previously proved problems and use their proofs as watchlists. This is our current implementation, i.e., each watchlist corresponds to a previous proof. During a proof search, we maintain for each watchlist its completion status, i.e. the number of clauses that were already encountered. The main idea behind our dynamic watchlist guidance is to prefer clauses which appear on watchlists that are closer to completion. Since watchlists now exactly correspond to previous refutational proofs, completion of any watchlist implies that the current proof search is finished. 5.1 Watchlist Proof Progress Let watchlists W1 ,. . .,Wn be given for a proof search. For each watchlist Wi we keep a watchlist progress counter, denoted progress(Wi ), which is initially set to 0. Whenever a clause C is generated during the proof search, we have to check whether C subsumes some clause from some watchlist Wi . When C subsumes a clause from Wi we increase progress(Wi ) by 1. The subsumed clause from Wi is then marked as encountered, and it is not considered in future watchlist subsumption checks.3 Note that a single generated clause C can subsume several clauses from one or more watchlists, hence several progress counters might be increased multiple times as a result of generating C. 5.2 Standard Dynamic Watchlist Relevance The easiest way to use progress counters to guide given clause selection is to assign the (standard) dynamic watchlist relevance to each generated clause C, denoted relevance 0 (C), as follows. Whenever C is generated, we check it against all the watchlists for subsumption and we update watchlist progress counters. Any clause C which does not subsume any watchlist clause is given relevance 0 (C) = 0. When C subsumes some watchlist clause, its relevance is the maximum watchlist completion ratio over all the matched watchlists, formally as follows. Let us write C ⊑ Wi when clause C subsumes some clause from watchlist Wi . For a clause C matching at least one watchlist, its relevance is computed as follows.  progress(W )  relevance 0 (C) = max |W | W ∈{Wi :C⊑Wi } In our current implementation, the relevance is computed at the time of generation of C and it is not updated afterwards. As future work, we propose to also update the relevance of all generated but not yet processed clauses from time to time in order to reflect updates of the watchlist progress counters. Note that this is expensive, as the number of generated clauses is typically high. Suitable indexing could be used to lower this cost or even to do the update immediately just for the affected clauses. To use the watchlist relevance in E, we extend E’s domain-specific language for search heuristics with two priority functions PreferWatchlistRelevant and DeferWatchlistRelevant. The first priority function ranks higher the clauses with higher watchlist relevance4 , and the other function does the opposite. These priority functions can be used to build E’s heuristics just like in the case of the static watchlist guidance. As a results, we can instruct E to process watchlistrelevant clauses in advance. 5.3 Inherited Dynamic Watchlist Relevance The previous standard watchlist relevance prioritizes only clauses subsuming watchlist clauses but it behaves indifferently with respect to other clauses. In order to provide some guidance even for clauses which do not subsume any watchlist clause, we can examine the watchlist relevance of the parents of each generated clause, and prioritize clauses with watchlist-relevant parents. Let parents(C) 3 4 Alternatively, the subsumed watchlist clause D ∈ Wi can be considered for future subsumption checks but the watchlist progress counter progress (Wi ) should not be increased when D is subsumed again. This is because we want the progress counter to represent the number of different clauses from Wi encountered so far. Technically, E’s priority function returns an integer priority, and clauses with smaller values are preferred. Hence we compute the priority as 1000 ∗ (1 − relevance 0 (C)). denote the set of previously processed clauses from which C have been derived. Inherited dynamic watchlist relevance, denoted relevance 1 , is a combination of the standard dynamic relevance with the average of parents relevances multiplied by a decay factor δ < 1.  relevance 1 (C) = relevance 0 (C) + δ ∗ avg relevance 1 (D) D∈parents(C) Clearly, the inherited relevance equals to the standard relevance for the initial clauses with no parents. The decay factor (δ) determines the importance of parents watchlist relevances.5 Note that the inherited relevances of parents(C) are already precomputed at the time of generating C, hence no recursive computation is necessary. With the above relevance 1 we compute the average of parents inherited relevances, hence the inherited watchlist relevance accumulates relevance of all the ancestors. As a result, relevance 1 (C) is greater than 0 if and only if C has some ancestor which subsumed a watchlist clause at some point. This might have an undesirable effect that clauses unrelated to the watchlist are completely ignored during the proof search. In practice, however, it seems important to consider also watchlist-unrelated clauses with some degree in order to prove new conjectures which do not appear on the input watchlist. Hence we introduce two threshold parameters α and β which resets the relevance to 0 as follows. Let length(C) denote the length of clause C, counting occurrences of symbols in C. ( 1 (C) 0 iff relevance 1 (C) < α and relevance <β length(C) relevance 2 (C) = relevance 1 (C) otherwise Parameter α is a threshold on the watchlist inherited relevance while β combines the relevance with the clause length.6 As a result, shorter watchlist-unrelated clauses are preferred to longer (distantly) watchlist-related clauses. 6 Experiments with Watchlist Guidance We experiment with constructing static and dynamic watchlists from the proofs found by E on a benchmark of 57897 Mizar40 [19] problems in the MPTP dataset [35].7 These initial proofs were found by an evolutionarily optimized [14] ensemble of 32 E strategies each run for 5 s. These are our baseline strategies, numbered below from 1 to 32. Due to limited computational resources, we do most of the experiments with the set of top 5 strategies that (greedily) cover most solutions (top 5 greedy cover ). These are strategies number 2, 8, 9, 26 and 28. In 5 s (in parallel) they together solve 21122 problems. We also evaluate these 5 6 7 In out experiments, we use δ = 0.1 In our experiments, we use α = 0.03 and β = 0.009. These values have been found useful by a small grid search over a random sample of 500 problems. Precisely, we have used the small (bushy, re-proving) versions, but without ATP minimization. five strategies in 10 seconds, jointly solving 21657 problems. The 21122 proofs yield over 100000 unique proof clauses that can be used for watchlist-based guidance in our experiments. We also use smaller datasets randomly sampled from the full set of 57897 problems to be able to explore more methods. All problems are run on the same hardware8 and with the same memory limits. Each E strategy is specified as a frequency-weighted combination of parametrized clause evaluation functions (CEF) combined with a selection of inference rules. Below we show a simplified example strategy specifying the term ordering KBO, and combining (with weights 2 and 4) two CEFs made up of weight functions Clauseweight and FIFOWeight and priority functions DeferSOS and PreferProcessed. -tKBO -H(2*Clauseweight(DeferSoS,20,9999,4),4*FIFOWeight(PreferProcessed)) 6.1 Watchlist Selection Methods We have experimented with the following methods for creation of static and dynamic watchlists. Typically we use only the proofs found by a particular baseline strategy to construct the watchlists used for testing the guided version of that strategy. 1. Place all the 100000+ proof clauses on the static watchlist (or all proofs on a dynamic watchlist). This slows E down to 6 given clauses per second. This is comparable to the speed of Prover9 with similarly large watchlists, but there are indexing methods that could speed this up. We have run several smaller tests, however do not use this method in the evaluation so far, due to limited computational resources. 2. Construct static watchlists for each Mizar article separately from the proofs of the article theorems. Such watchlist sizes range from 0 to 4000, which does not cause any significant slow down of E. 3. Use high-frequency proof clauses for static watchlists, i.e., clauses that appear in many proofs. 4. Use k-nearest neighbor (k-NN) learning to suggest useful static watchlists for each problem, based on symbol and term-based features [20] of the conjecture. This is very similar to the standard use of k-NN and other learners for premise selection. In more detail, we use symbols, walks of length 2 on formula trees and common subterms (with variables and skolem symbols equalized). Each proof is turned into a multi-label training example, where the labels are the (serially numbered) clauses used in the proof, and the features are extracted from the conjecture. 5. Use k-NN in a similar way to suggest the most related proofs for dynamic watchlists. This is done in two iterations. In the first iteration, only the conjecture-based similarity is used to select related problems and their proofs. The second iteration then uses data mined from the proofs obtained with dynamic guidance in the first iteration. From each such proof P we create a 8 Intel(R) Xeon(R) CPU E5-2698 v3 @ 2.30GHz with 256G RAM. training example associating P ’s conjecture features with the names of the proofs that matched (i.e., guided the inference of) the clauses needed in P . On this dataset we again train a k-NN learner, which then recommends the most useful related proofs for guiding a particular conjecture. 6.2 Using Watchlists in E Strategies As described in Section 4, watchlist subsumption defines the PreferWatchlist priority function that ranks clauses that subsume at least one watchlist clause higher than others. Below we describe several ways how to use this priority function and the newly defined dynamic PreferWatchlistRelevant priority function and its relevance-inheriting modifications. We provide short names to the methods, which are used in the result tables. 1. We use the default heuristic strategy (Section 4) evolved (genetically [27]) for static watchlist use (EVO ). 2. To each baseline strategy, we add a CEF based on the PreferWatchlist priority function and the default weighting function (Defaultweight). Let n be an integer and f be the sum of other frequencies in the strategy. (uwl n). The resulting static strategies look as follows: -H(n*f *Defaultweight(PreferWatchlist),2*Clauseweight(DeferSoS,20,9999,4) 3. Instead of using the Defaultweight in uwl n, we use the CEFs used in EVO (uwl evo). 4. We replace all priority functions in a baseline strategy with the PreferWatchlist priority function (pref ). The resulting strategies look as follows: -H(2*Clauseweight(PreferWatchlist,20,9999,4),4*FIFOWeight(PreferWatchlist)) 5. We manually modify E’s code to always prefer watchlist clauses and then default to the baseline strategy (uwl ). 6. We additionally modify the watchlist subsumption in E to treat all skolem symbols of the same arity as equal, thus widening the watchlist guidance (ska). 7. For all the above strategies we add a “no-remove” option to keep the subsumed watchlist clause in the watchlist, thus allowing its repeated subsumption with different clauses. 8. We use PreferWatchlistRelevant instead of PreferWatchlist in pref, and select related proofs for dynamic guidance by the first iteration of k-NN (dpref ). 9. We modify dpref to use the k-NN recommendations produced in the second iteration (dpref2 ). 10. We add the relevance inheritance mechanisms to dpref (decpref ). 6.3 Evaluation Preliminary Testing with uwl n for n = 1, 2, 5, 10, 20 was done on baselines strategies 02 and 08 with article-based watchlists. These indicated that n = 1 is preferable, and uwl evo is superior due to using a better weight function, ConjectureRelativeSymbolWeight. However pref and EVO largely cover uwl evo. Thus these watchlist strategies have not been included in the following experimental evaluation. First we measure the slowdown caused by larger static watchlists on the best baseline strategy and a random sample of 10000 problems. The results are shown Table 1. We see that the speed significantly degrades with watchlists of size 10000, while 500-big watchlists incur only a small performance penalty. Size 10 100 256 512 1000 10000 proved 3275 3275 3287 3283 3248 2912 PPS 8935 9528 8661 7288 4807 575 Table 1. Tests of the watchlist size influence (ordered by frequency) on a random sample of 10000 problems using the ”no-remove” option and one common watchlist. PPS is average processed clauses per second, a measure of E’s speed. Table 2 shows the 10 s evaluation of several static and dynamic methods on a random sample of 5000 problems. For comparison, E’s auto strategy proves 1350 of the problems in 10 s and its auto-schedule proves 1629. Given 50 seconds (corresponding to the top 5 cover) the auto-schedule proves 1744 problems compared to our 1964. The pref baseline strategy is the pref strategy run with an empty watchlist, i.e., in practice just with a constant priority function. We have found that the original baseline strategies are typically improved by using the constant priority function. The pref strategy performs best here and a variety of strategies provide better coverage. Performing watchlist subsumption checking with arity-based skolem symbol comparisons only helps for coverage, with 18 problems not covered by pref. The k-NN learner is used to suggest watchlist clauses for pref and watchlist proofs for the dynamic dpref 9 . Strategy baseline pref baseline pref pref ska dpref EVO uwl 02 1238 1493 1503 1496 1500 1303 1247 1255 1296 1315 1307 1316 1300 1277 08 09 1075 1166 1205 1185 1201 1068 1097 26 1102 1133 1176 1176 1175 1330 1132 28 1138 1141 1141 1135 1139 1070 1139 1853 1910 1931 1921 1922 1659 1868 total Table 2. Article-based watchlist benchmark. A top 5 greedy cover proves 1964 problems (in bold). Table 3 evaluates the influence of the number of related proofs loaded for the dynamic strategies and Table 4 evaluates the top 5 greedy cover on the full 9 All clauses in suggested proofs are used. Mizar dataset, already showing significant improvement over the 21657 proofs produced by the 5 baseline strategies. Based on proof data from a full-run of the top-5 greedy cover in Table 4, new k-NN proof suggestions were made and dpref ’s grid search re-run, see Table 5 and Table 6. We also test the relevance inheriting dynamic watchlist feature, primarily to determine if different proofs can be found. The results are shown in Table 7. This version adds 8 problems to the top 5 greedy cover of all the strategies run on the 5000 problem dataset. Finally, Table 8 evaluates all methods together on the 5000 dataset, and then the top 5 cover on the full dataset. The 23192 problems proved is a 7.1% improvement over the top 5 baseline strategies. Size pref02 16 1518 1531 64 256 1528 1024 1532 2048 1520 size dpref02 dpref08 dpref09 dpref26 dpref28 total 4 1531 1352 1235 1194 1165 1957 8 1543 1366 1253 1188 1170 1956 16 1529 1357 1224 1218 1185 1951 32 1546 1373 1240 1218 1188 1962 64 1535 1376 1216 1215 1166 1935 128 1506 1351 1195 1214 1147 1907 1024 1108 963 710 943 765 1404 Table 3. Left size is number of clauses. Right size is number of proofs, averaging 40 clauses per proof. A top 5 greedy cover of dprefs proves 1972 (in bold). dpref02 32 dpref09 8 dpref26 16 dpref28 4 dpref08 64 total 17964 14014 14294 13449 16175 added 17964 2531 1024 760 282 Table 4. K-NN round 1 greedy cover on full dataset and proofs added by each successive strategy for a total of 22579 size dpref202 dpref208 dpref209 dpref226 dpref228 total round 1 total 4 1539 1368 1235 1209 1179 1961 1957 8 1554 1376 1253 1217 1183 1971 1956 1565 1382 1256 1221 1181 1972 1951 16 32 1557 1383 1252 1227 1182 1968 1962 64 1545 1385 1244 1222 1171 1963 1935 128 1531 1374 1221 1227 1171 1941 1907 Table 5. Problems proved by round 2 k-NN proof suggestions. The top 5 greedy cover proves 1981 problems (in bold). dpref202 16 dpref209 16 dpref226 32 dpref228 4 dpref208 4 total 18583 14486 14720 13532 16244 added 18583 2553 1007 599 254 Table 6. K-NN round 2 greedy cover on full dataset and proofs added by each successive strategy for a total of 22996 size decpref202 decpref208 decpref209 decpref226 decpref228 total 4 1432 1354 1184 1203 1152 1885 16 1384 1316 1176 1221 1140 1846 32 1381 1309 1157 1209 1133 1820 128 1326 1295 1127 1172 1082 1769 Table 7. Problems proved by round 2 k-NN proof suggestions with decpref. The top 5 greedy cover proves 1898 problems (in bold). 7 Examples The Mizar theorem YELLOW 5:3610 states De Morgan’s laws for Boolean lattices: theorem Th36 : :: YELLOW_5 :36 for L being non empty Boolean RelStr for a , b being Element of L holds ( ’not ’ ( a "∨" b ) = ( ’ not ’ a ) "∧" ( ’ not ’ b ) & ’not ’ ( a "∧" b ) = ( ’ not ’ a ) "∨" ( ’ not ’ b ) ) Using 32 related proofs results in 2220 clauses placed on the watchlists. The dynamically guided proof search takes 5218 (nontrivial) given clause loops done in 2 s and the resulting ATP proof is 436 inferences long. There are 194 given clauses that match the watchlist during the proof search and 120 (61.8%) of them end up being part of the proof. I.e., 27.5% of the proof consists of steps guided by the watchlist mechanism. The proof search using the same settings, but without the watchlist takes 6550 nontrivial given clause loops (25.5% more). The proof of the theorem WAYBEL 1:8511 is considerably used for this guidance: theorem :: WAYBEL_1 :85 for H being non empty lower - bounded RelStr st H is Heyting holds for a , b being Element of H holds ’not ’ ( a "∧" b ) >= ( ’ not ’ a ) "∨" ( ’ not ’ b ) Note that this proof is done under the weaker assumptions of H being lower bounded and Heyting, rather than being Boolean. Yet, 62 (80.5%) of the 77 clauses from the proof of WAYBEL 1:85 are eventually matched during the proof search. 38 (49.4%) of these 77 clauses are used in the proof of YELLOW 5:36. In Table 9 we show the final state of proof progress for the 32 loaded proofs after the last non empty clause matched the watchlist. For each we show both the computed ratio and the number of matched and all clauses. 10 11 http://grid01.ciirc.cvut.cz/~ mptp/7.13.01_4.181.1147/html/yellow_5#T36 http://grid01.ciirc.cvut.cz/~ mptp/7.13.01_4.181.1147/html/waybel_1#T85 total dpref202 16 dpref209 16 decpref226 16 dpref228 4 decpref202 128 2007 1565 230 97 68 47 23192 18583 2553 1050 584 422 23192 18583 14486 14514 13532 15916 Table 8. Top: Cumulative sum of the 5000 test set greedy cover. The k-NN based dynamic watchlist methods dominate, improving by 2.1% over the baseline and articlebased watchlist strategy greedy cover of 1964 (Table 2). Bottom: Greedy cover run on the full dataset, cumulative and total proved. 0 0.438 42/96 1 0.727 56/77 2 0.865 45/52 3 0.360 9/25 4 0.750 51/68 5 0.259 7/27 6 0.805 62/77 7 0.302 73/242 8 0.652 15/23 9 0.286 8/28 10 0.259 7/27 11 0.338 24/71 12 0.680 17/25 13 0.509 27/53 14 0.357 10/28 15 0.568 25/44 16 0.703 52/74 17 0.029 8/272 18 0.379 33/87 19 0.424 14/33 20 0.471 16/34 21 0.323 20/62 22 0.333 7/21 23 0.520 26/50 6/13 27 0.370 20/54 24 0.524 22/42 25 0.523 45/86 26 0.462 28 0.411 30/73 29 0.364 20/55 30 0.571 16/28 31 0.357 10/28 Table 9. Final state of the proof progress for the (serially numbered) 32 proofs loaded to guide the proof of YELLOW 5:36. We show the computed ratio and the number of matched and all clauses. An example of a theorem that can be proved in 1.2 s with guidance but cannot be proved in 10 s with any unguided method is the following theorem BOOLEALG:6212 about the symmetric difference in Boolean lattices: for L being B _ L a t t i c e for X , Y being Element of L holds ( X \+\ Y ) \+\ ( X "∧" Y ) = X "∨" Y Using 32 related proofs results in 2768 clauses placed on the watchlists. The proof search then takes 4748 (nontrivial) given clause loops and the watchlistguided ATP proof is 633 inferences long. There are 613 given clauses that match the watchlist during the proof search and 266 (43.4%) of them end up being part of the proof. I.e., 42% of the proof consists of steps guided by the watchlist mechanism. Among the theorems whose proofs are most useful for the guidance are the following theorems LATTICES:2313, BOOLEALG:3314 and BOOLEALG:5415 on Boolean lattices: theorem Th23 : :: LATTICES :23 for L being B _ L a t t i c e for a , b being Element of L holds ( a "∧" b ) ‘ = a ‘ "∨" b ‘ theorem Th33 : :: BOOLEALG :33 for L being B _ L a t t i c e for X , Y being Element of L holds X \ ( X "∧" Y ) = X \ Y 12 13 14 15 http://grid01.ciirc.cvut.cz/~ mptp/7.13.01_4.181.1147/html/boolealg#T62 http://grid01.ciirc.cvut.cz/~ mptp/7.13.01_4.181.1147/html/lattices#T23 http://grid01.ciirc.cvut.cz/~ mptp/7.13.01_4.181.1147/html/boolealg#T33 http://grid01.ciirc.cvut.cz/~ mptp/7.13.01_4.181.1147/html/boolealg#T54 theorem :: BOOLEALG :54 for L being B _ L a t t i c e for X , Y being Element of L st X ‘ "∨" Y ‘ = X "∨" Y & X misses X ‘ & Y misses Y ‘ holds X = Y ‘ & Y = X ‘ Finally, we show several theorems16171819 with nontrivial Mizar proofs and relatively long ATP proofs obtained with significant guidance. These theorems cannot be proved by any other method. theorem Th15 : :: RANKNULL :15 for F being Field for W , V being VectSp of F for T being linear - t r a n s f o r m a t i o n of V , W st T is one - to - one holds ker T = (0). V theorem :: CLOSURE1 :21 for I being set for M being M a n y S o r t e d S e t of I for P , R being MSSetOp of M st P is m o n o t o n i c & R is m o n o t o n i c holds P ** R is m o n o t o n i c theorem Th8 : :: PROB_4 :8 for Omega being non empty set for Sigma being S i g m a F i e l d of Omega for ASeq being S e t S e q u e n c e of Sigma for P being P r o b a b i l i t y of Sigma holds ( for A being set st A in rng ASeq holds P . A = 0) iff P . ( union rng ASeq ) = 0 theorem Th2 : :: LATTICE6 :2 for L being Lattice for a , b , c being Element of L st b 6= c holds ( b is - upper - neighbour - of a & c is - upper - neighbour - of a implies a = c "∧" b ) & ( b is - lower - neighbour - of a & c is - lower - neighbour - of a implies a = c "∨" b ) 8 Related Work and Possible Extensions The closest related work is the hint guidance in Otter and Prover9. Our focus is however on large ITP-style theories with large signatures and heterogeneous facts and proofs spanning various areas of mathematics. This motivates using machine learning for reducing the size of the static watchlists and the implementation of the dynamic watchlist mechanisms. Several implementations of internal proof search guidance using statistical learning have been mentioned in Sections 1 and 3. In both the tableau-based systems and the tactical ITP systems the statistical learning guidance benefits from a compact and directly usable notion of proof state, which is not immediately available in saturation-style ATP. By delegating the notion of similarity to subsumption we are relying on fast, crisp and well-known symbolic ATP mechanisms. This has advantages as well as disadvantages. Compared to the ENIGMA [15] and neural [23] statistical guiding methods, the subsumption-based notion of clause similarity is not feature-based or learned. This similarity relation is crisp and sparser compared to the similarity relations induced by the statistical methods. The proof guidance is limited when no derived clauses subsume any of the loaded proof clauses. This can be countered by loading a high number of proofs and widening (or softening) the 16 17 18 19 http://grid01.ciirc.cvut.cz/~ mptp/7.13.01_4.181.1147/html/ranknull#T15 http://grid01.ciirc.cvut.cz/~ mptp/7.13.01_4.181.1147/html/closure1#T21 http://grid01.ciirc.cvut.cz/~ mptp/7.13.01_4.181.1147/html/prob_4#T8 http://grid01.ciirc.cvut.cz/~ mptp/7.13.01_4.181.1147/html/lattice6#T2 similarity relation in various approximate ways. On the other hand, subsumption is fast compared to the deep neural methods (see [23]) and enjoys clear guarantees of the underlying symbolic calculus. For example, when all the (non empty) clauses from a loaded related proof have been subsumed in the current proof search, it is clear that the current proof search is successfully finished. A clear novelty is the focusing of the proof search towards the (possibly implausible) inferences needed for completing the loaded proofs. Existing statistical guiding methods will fail to notice such opportunities, and the static watchlist guidance has no way of distinguishing the watchlist matchers that lead faster to proof completion. In a way this mechanism resembles the feedback obtained by Monte Carlo exploration, where a seemingly statistically unlikely decision can be made, based on many rollouts and averaging of their results. Instead, we rely here on a database of previous proofs, similar to previously played and finished games. The newly introduced heuristic proof search (proof progress) representation may however enable further experiments with Monte Carlo guidance. 8.1 Possible Extensions Several extensions have been already discussed above. We list the most obvious. More sophisticated progress metrics: The current proof-progress criterion may be too crude. Subsuming all the initial clauses of a related proof is unlikely until the empty clause is derived. In general, a large part of a related proof may not be needed once the right clauses in the “middle of the proof” are subsumed by the current proof search. A better proof-progress metric would compute the smallest number of proof clauses that are still needed to entail the contradiction. This is achievable, however more technically involved, also due to issues such as rewriting of the watchlist clauses during the current proof search. Clause re-evaluation based on the evolving proof relevance: As more and more watchlist clauses are matched, the proof relevance of the clauses generated earlier should be updated to mirror the current state. This is in general expensive, so it could be done after each N given clause loops or after a significant number of watchlist matchings. An alternative is to add corresponding indexing mechanisms to the set of generated clauses, which will immediately reorder them in the evaluation queues based on the proof relevance updates. More abstract/approximate matching: Instead of the strict notion of subsumption, more abstract or heuristic matching methods could be used. An interesting symbolic method to consider is matching modulo symbol alignments [9]. A number of approximate methods are already used by the above mentioned statistical guiding methods. Adding statistical methods for clause guidance: Instead of using only hard-coded watchlist-style heuristics for focusing inferences, a statistical (e.g. ENIGMA-style) clause evaluation model could be trained by adding the vector of proof completion ratios to the currently used ENIGMA features. 9 Conclusion The portfolio of new proof guiding methods developed here significantly improves E’s standard portfolio of strategies, and also the previous best set of strategies invented for Mizar by evolutionary methods. The best combination of five new strategies run in parallel for 10 seconds (a reasonable hammering time) will prove over 7% more Mizar problems than the previous best combination of five nonwatchlist strategies. Improvement over E’s standard portfolio is much higher. Even though we focus on developing the strongest portfolio rather than a single best method, it is clear that the best guided versions also significantly improve over their non-guided counterparts. This improvement for the best new strategy (dpref202 used with 16 most relevant proofs) is 26.5% (= 18583/14693). These are relatively high improvements in automated theorem proving. We have shown that the new dynamic methods based on the idea of proof completion ratios improve over the static watchlist guidance. We have also shown that as usual with learning-based guidance, iterating the methods to produce more proofs leads to stronger methods in the next iteration. The first experiments with widening the watchlist-based guidance by relatively simple inheritance mechanisms seem quite promising, contributing many new proofs. A number of extensions and experiments with guiding saturation-style proving have been opened for future research. We believe that various extensions of the compact and evolving heuristic representation of saturation-style proof search as introduced here will turn out to be of great importance for further development of learning-based saturation provers. 10 Acknowledgments We thank Bob Veroff for many enlightening explanations and discussions of the watchlist mechanisms in Otter and Prover9. His “industry-grade” projects that prove open and interesting mathematical conjectures with hints and proof sketches have been a great sort of inspiration for this work. References 1. J. Alama, T. Heskes, D. Kühlwein, E. Tsivtsivadze, and J. Urban. Premise selection for mathematics by corpus analysis and kernel methods. J. Autom. Reasoning, 52(2):191–213, 2014. 2. A. A. Alemi, F. Chollet, N. Eén, G. Irving, C. Szegedy, and J. Urban. DeepMath - deep sequence models for premise selection. In D. D. Lee, M. Sugiyama, U. V. Luxburg, I. Guyon, and R. Garnett, editors, Advances in Neural Information Processing Systems 29: Annual Conference on Neural Information Processing Systems 2016, December 5-10, 2016, Barcelona, Spain, pages 2235–2243, 2016. 3. L. Bachmair and H. Ganzinger. Rewrite-Based Equational Theorem Proving with Selection and Simplification. Journal of Logic and Computation, 3(4):217–247, 1994. 4. J. C. Blanchette, D. Greenaway, C. Kaliszyk, D. Kühlwein, and J. Urban. A learning-based fact selector for Isabelle/HOL. J. Autom. Reasoning, 57(3):219– 244, 2016. 5. J. C. Blanchette, C. Kaliszyk, L. C. Paulson, and J. Urban. Hammering towards QED. J. Formalized Reasoning, 9(1):101–148, 2016. 6. T. Eiter and D. Sands, editors. LPAR-21, 21st International Conference on Logic for Programming, Artificial Intelligence and Reasoning, Maun, Botswana, May 712, 2017, volume 46 of EPiC Series in Computing. EasyChair, 2017. 7. M. Färber and C. Kaliszyk. Random forests for premise selection. In C. Lutz and S. Ranise, editors, Frontiers of Combining Systems - 10th International Symposium, FroCoS 2015, Wroclaw, Poland, September 21-24, 2015. Proceedings, volume 9322 of Lecture Notes in Computer Science, pages 325–340. Springer, 2015. 8. M. Färber, C. Kaliszyk, and J. Urban. Monte Carlo tableau proof search. In L. de Moura, editor, Automated Deduction - CADE 26 - 26th International Conference on Automated Deduction, Gothenburg, Sweden, August 6-11, 2017, Proceedings, volume 10395 of Lecture Notes in Computer Science, pages 563–579. Springer, 2017. 9. T. Gauthier and C. Kaliszyk. Matching concepts across HOL libraries. In S. M. Watt, J. H. Davenport, A. P. Sexton, P. Sojka, and J. Urban, editors, CICM’15, volume 8543 of LNCS, pages 267–281. Springer, 2014. 10. T. Gauthier, C. Kaliszyk, and J. Urban. TacticToe: Learning to reason with HOL4 tactics. In Eiter and Sands [6], pages 125–143. 11. A. Grabowski, A. Kornilowicz, and A. Naumowicz. Mizar in a nutshell. J. Formalized Reasoning, 3(2):153–245, 2010. 12. T. Gransden, N. Walkinshaw, and R. Raman. SEPIA: search for proofs using inferred automata. In Automated Deduction - CADE-25 - 25th International Conference on Automated Deduction, Berlin, Germany, August 1-7, 2015, Proceedings, pages 246–255, 2015. 13. J. Jakubuv and J. Urban. Extending E prover with similarity based clause selection strategies. In M. Kohlhase, M. Johansson, B. R. Miller, L. de Moura, and F. W. Tompa, editors, Intelligent Computer Mathematics - 9th International Conference, CICM 2016, Bialystok, Poland, July 25-29, 2016, Proceedings, volume 9791 of Lecture Notes in Computer Science, pages 151–156. Springer, 2016. 14. J. Jakubuv and J. Urban. BliStrTune: hierarchical invention of theorem proving strategies. In Y. Bertot and V. Vafeiadis, editors, Proceedings of the 6th ACM SIGPLAN Conference on Certified Programs and Proofs, CPP 2017, Paris, France, January 16-17, 2017, pages 43–52. ACM, 2017. 15. J. Jakubuv and J. Urban. ENIGMA: efficient learning-based inference guiding machine. In H. Geuvers, M. England, O. Hasan, F. Rabe, and O. Teschke, editors, Intelligent Computer Mathematics - 10th International Conference, CICM 2017, Edinburgh, UK, July 17-21, 2017, Proceedings, volume 10383 of Lecture Notes in Computer Science, pages 292–302. Springer, 2017. 16. C. Kaliszyk, S. Schulz, J. Urban, and J. Vyskocil. System description: E.T. 0.1. In A. P. Felty and A. Middeldorp, editors, Automated Deduction - CADE-25 25th International Conference on Automated Deduction, Berlin, Germany, August 1-7, 2015, Proceedings, volume 9195 of Lecture Notes in Computer Science, pages 389–398. Springer, 2015. 17. C. Kaliszyk and J. Urban. Learning-assisted automated reasoning with Flyspeck. J. Autom. Reasoning, 53(2):173–213, 2014. 18. C. Kaliszyk and J. Urban. FEMaLeCoP: Fairly efficient machine learning connection prover. In M. Davis, A. Fehnker, A. McIver, and A. Voronkov, editors, Logic for Programming, Artificial Intelligence, and Reasoning - 20th International Conference, LPAR-20 2015, Suva, Fiji, November 24-28, 2015, Proceedings, volume 9450 of Lecture Notes in Computer Science, pages 88–96. Springer, 2015. 19. C. Kaliszyk and J. Urban. MizAR 40 for Mizar 40. J. Autom. Reasoning, 55(3):245– 256, 2015. 20. C. Kaliszyk, J. Urban, and J. Vyskočil. Efficient semantic features for automated reasoning over large theories. In Q. Yang and M. Wooldridge, editors, IJCAI’15, pages 3084–3090. AAAI Press, 2015. 21. M. K. Kinyon, R. Veroff, and P. Vojtechovský. Loops with abelian inner mapping groups: An application of automated deduction. In M. P. Bonacina and M. E. Stickel, editors, Automated Reasoning and Mathematics - Essays in Memory of William W. McCune, volume 7788 of LNCS, pages 151–164. Springer, 2013. 22. L. Kovács and A. Voronkov. First-order theorem proving and Vampire. In N. Sharygina and H. Veith, editors, CAV, volume 8044 of LNCS, pages 1–35. Springer, 2013. 23. S. M. Loos, G. Irving, C. Szegedy, and C. Kaliszyk. Deep network guided proof search. In Eiter and Sands [6], pages 85–105. 24. W. McCune and L. Wos. Otter: The CADE-13 Competition Incarnations. Journal of Automated Reasoning, 18(2):211–220, 1997. Special Issue on the CADE 13 ATP System Competition. 25. W. W. McCune. Prover9 and Mace4. http://www.cs.unm.edu/~ mccune/prover9/, 2005–2010. (acccessed 2016-03-29). 26. J. Otten and W. Bibel. leanCoP: lean connection-based theorem proving. J. Symb. Comput., 36(1-2):139–161, 2003. 27. S. Schäfer and S. Schulz. Breeding theorem proving heuristics with genetic algorithms. In G. Gottlob, G. Sutcliffe, and A. Voronkov, editors, Global Conference on Artificial Intelligence, GCAI 2015, Tbilisi, Georgia, October 16-19, 2015, volume 36 of EPiC Series in Computing, pages 263–274. EasyChair, 2015. 28. S. Schulz. Learning Search Control Knowledge for Equational Theorem Proving. In F. Baader, G. Brewka, and T. Eiter, editors, Proc. of the Joint German/Austrian Conference on Artificial Intelligence (KI-2001), volume 2174 of LNAI, pages 320– 334. Springer, 2001. 29. S. Schulz. Simple and Efficient Clause Subsumption with Feature Vector Indexing. In M. P. Bonacina and M. E. Stickel, editors, Automated Reasoning and Mathematics: Essays in Memory of William W. McCune, volume 7788 of LNAI, pages 45–67. Springer, 2013. 30. S. Schulz. System description: E 1.8. In K. L. McMillan, A. Middeldorp, and A. Voronkov, editors, LPAR, volume 8312 of LNCS, pages 735–743. Springer, 2013. 31. S. Schulz and M. Möhrmann. Performance of clause selection heuristics for saturation-based theorem proving. In N. Olivetti and A. Tiwari, editors, Proc. of the 8th IJCAR, Coimbra, volume 9706 of LNAI, pages 330–345. Springer, 2016. 32. D. Silver, A. Huang, C. J. Maddison, A. Guez, L. Sifre, G. van den Driessche, J. Schrittwieser, I. Antonoglou, V. Panneershelvam, M. Lanctot, S. Dieleman, D. Grewe, J. Nham, N. Kalchbrenner, I. Sutskever, T. P. Lillicrap, M. Leach, K. Kavukcuoglu, T. Graepel, and D. Hassabis. Mastering the game of go with deep neural networks and tree search. Nature, 529(7587):484–489, 2016. 33. D. Silver, T. Hubert, J. Schrittwieser, I. Antonoglou, M. Lai, A. Guez, M. Lanctot, L. Sifre, D. Kumaran, T. Graepel, T. P. Lillicrap, K. Simonyan, and D. Hassabis. 34. 35. 36. 37. Mastering chess and shogi by self-play with a general reinforcement learning algorithm. CoRR, abs/1712.01815, 2017. K. Slind and M. Norrish. A brief overview of HOL4. In O. A. Mohamed, C. A. Muñoz, and S. Tahar, editors, Theorem Proving in Higher Order Logics, 21st International Conference, TPHOLs 2008, Montreal, Canada, August 18-21, 2008. Proceedings, volume 5170 of LNCS, pages 28–32. Springer, 2008. J. Urban. MPTP 0.2: Design, implementation, and initial experiments. J. Autom. Reasoning, 37(1-2):21–43, 2006. J. Urban, J. Vyskočil, and P. Štěpánek. MaLeCoP: Machine learning connection prover. In K. Brünnler and G. Metcalfe, editors, TABLEAUX, volume 6793 of LNCS, pages 263–277. Springer, 2011. R. Veroff. Using hints to increase the effectiveness of an automated reasoning program: Case studies. Journal of Automated Reasoning, 16(3):223–239, 1996.
2cs.AI
arXiv:1801.03122v1 [math.ST] 9 Jan 2018 A detailed treatment of Doob’s theorem Jeffrey W. Miller Harvard University, Department of Biostatistics January 11, 2018 Abstract Doob’s theorem provides guarantees of consistent estimation and posterior consistency under very general conditions. Despite the limitation that it only guarantees consistency on a set with prior probability 1, for many models arising in practice, Doob’s theorem is an easy way of showing that consistency will hold almost everywhere. In this article, we give a detailed proof of Doob’s theorem. 1 Introduction Doob (1949) established a remarkable theorem on consistency in the Bayesian setting. Roughly, Doob’s theorem says that with probability 1, if the true parameter θ0 ∈ Θ is drawn from the prior Π, and X1 , . . . , Xn i.i.d. ∼ Pθ0 for an identifiable model {Pθ : θ ∈ Θ}, then 1. the posterior mean of g(θ) converges to g(θ0 ) for any g ∈ L1 (Π), and 2. the posterior distribution of θ is consistent, i.e., the posterior concentrates in neighborhoods of the true parameter θ0 , as n → ∞, under very general conditions. The theorem is stunning in its generality and elegance. The heart of the proof is a direct application of martingale convergence, however, the bulk of the proof involves showing an essential and nontrivial measurability result: that θ0 is a measurable function of (X1 , X2 , . . . ), i.e., that there is a measurable function f such that with probability 1, θ0 = f (X1 , X2 , . . .). In other words, given infinite data, the true parameter can be recovered in a measurable way. 1 Doob’s theorem has been criticized on the grounds that it only guarantees consistency on a set with prior probability 1, and thus, if for example one chose a prior with all of its mass on a single point θ∗ , then the theorem would apply but consistency would fail everywhere except at θ∗ (Barron et al., 1999). While it is true that the theorem is not very useful for a poorly chosen prior, this misses the point, which is that for a well-chosen prior, consistency can be guaranteed on a very large set. For example, if Θ is a countable union of finite-dimensional spaces, then one can choose a prior with a density with respect to Lebesgue measure that is positive on all of Θ, and Doob’s theorem can be used to guarantee consistency everywhere except on a set of Lebesgue measure zero, assuming identifiability. This approach was used by Nobile (1994) to prove consistency for finite mixture models with a prior on the number of components, under very general conditions. However, this approach has the weakness that one cannot say for any given point whether consistency will hold, and in this respect the criticism of Doob’s theorem is valid. Further, Doob’s theorem is less useful when θ is infinite-dimensional, since the set on which consistency may fail can be very large, even for a seemingly well-chosen prior (Freedman, 1963). These limitations were the impetus for the beginnings of the modern approach to studying the consistency of nonparametric Bayesian procedures (Schwartz, 1965). Nonetheless, for many models arising in practice, Doob’s theorem is an extremely easy method of guaranteeing that consistency will hold almost everywhere. The original justification given by Doob (1949) was hardly even a sketch, providing only the outline of a proof. More complete proofs of Doob’s theorem have been provided for special cases: Van der Vaart (1998) (Theorem 10.10) assumes Θ is a Euclidean space and proves the part of the theorem regarding posterior concentration. Ghosh and Ramamoorthi (2003) (Theorem 1.3.2) prove the posterior concentration part of the theorem, but they leave many details to the reader. Ghosal and van der Vaart (2017) (Theorem 6.9, 6.10) provide a proof for the general case, but their treatment is brief and many details are left to the reader. Lijoi et al. (2004) prove an interesting result related to Doob’s theorem in the context of posterior inference for a density function f0 given i.i.d. samples X1 , X2 , . . . ∼ f0 . They show that if the prior has full Hellinger support then the posterior concentrates in Hellinger neighborhoods of an “essentially unique” random density g̃ with the property that the data are conditionally i.i.d. given g̃. 2 The purpose of this note is to provide a complete and detailed proof of Doob’s theorem in full generality. The rest of the paper is organized as follows. In Section 2, we state the main results, and Section 3 contains the proofs of the main results. In Section 4, we prove the key measurability result that is used in the proofs. In Section 5, for completeness, we prove some supporting results. 2 Main results b be complete separable metric spaces. Let X ⊆ Xb and Θ ⊆ Θ b be Let Xb and Θ Borel measurable subsets, and let A and B be the induced Borel σ-algebras of X and Θ, respectively. For each θ ∈ Θ, let Pθ be a probability measure on (X , A). Let Π be a probability measure on (Θ, B). Assumption 2.1. Assume 1. θ 7→ Pθ (A) is measurable for every A ∈ A, and 2. θ 6= θ′ ⇒ Pθ 6= Pθ′ . In other words, condition (1) is that {Pθ : θ ∈ Θ} is a measurable family, and condition (2) is that θ is identifiable: if θ, θ′ ∈ Θ such that θ 6= θ′ then there exists A ∈ A such that Pθ (A) 6= Pθ′ (A). As indicated in the introduction, Doob’s theorem has two parts: the first concerning consistent estimation (Theorem 2.2), and the second concerning posterior consistency (Theorem 2.4). A word on notation: we use θ for fixed values in Θ, and θ for a random variable taking values in Θ. Let µ be the joint distribution of ((X1 , X2 , . . .), θ) defined by letting θ ∼ Π and X1 , X2 , . . . |θ i.i.d. ∼ Pθ . Theorem 2.2 (Doob’s theorem for estimators). Let (X, θ) ∼ µ, where X = (X1 , X2 , . . . ). If g : Θ → R is a measurable function such that E|g(θ)| < ∞, and Assumption 2.1 holds, then lim E(g(θ) | X1 , . . . , Xn ) = g(θ) a.s.[µ]. n→∞ Remark. The generalization to vector-valued g : Θ → Rk follows by applying the theorem to each coordinate separately. Also, note that the condition on g is equivalent to requiring g ∈ L1 (Π). 3 The following corollary is equivalent to Theorem 2.2, but is presented from a frequentist perspective. Corollary 2.3. Suppose g ∈ L1 (Π) and Assumption 2.1 holds. There exists Θ0 ⊆ Θ with Π(Θ0 ) = 1 such that for all θ0 ∈ Θ0 , if X1 , X2 , . . . ∼ Pθ0 i.i.d. then lim E(g(θ) | X1 , . . . , Xn ) = g(θ0 ) a.s.[Pθ0 ] n→∞ where the conditional expectation is computed under µ. Theorem 2.4 (Doob’s theorem for posterior consistency). If Assumption 2.1 holds, then there exists Θ1 ⊆ Θ with Π(Θ1 ) = 1 such that the posterior is consistent at every θ1 ∈ Θ1 . That is, for all θ1 ∈ Θ1 , if X1 , X2 , . . . ∼ Pθ1 i.i.d. then for any neighborhood B of θ1 , we have lim P(θ ∈ B | X1 , . . . , Xn ) = 1 a.s.[Pθ1 ] n→∞ where P(θ ∈ B | X1 , . . . , Xn ) = E(IB (θ) | X1 , . . . , Xn ) is computed under µ. 3 Proofs of the main results First, we make some clarifying remarks and initial observations. Let Xb∞ = Xb × Xb × · · · = {(x1 , x2 , . . . ) : x1 , x2 , . . . ∈ Xb}. Then Xb∞ can be given a metric under which it is complete (as a metric space) and has the product topology. (For instance, if d is the metric on Xb, then it can be verified that D(x, y) = supk min{1, d(xk , yk )}/k is a metric on Xb∞ satisfying these properties.) It follows that Xb∞ is separable. Therefore, X ∞ = X ×X ×· · · is a Borel measurable subset of a complete separable metric space, Xb∞ . Further, the induced Borel σ-algebra on X ∞ coincides with the product σ-algebra A∞ , which is generated by sets of the form A1 × · · · × Ak × X × X × · · · = {x ∈ X ∞ : x1 ∈ A1 , . . . , xk ∈ Ak } where A1 , . . . , Ak ∈ A and k ∈ {1, 2, . . . }. For each θ ∈ Θ, let Pθ∞ be the product measure on (X ∞ , A∞ ) obtained from Pθ — that is, by the Kolmogorov extension theorem, let Pθ∞ be the unique probability measure on (X ∞ , A∞ ) such that Pθ∞ (A1 × · · · × Ak × X × X × · · · ) = Pθ (A1 ) · · · Pθ (Ak ) 4 for all A1 , . . . , Ak ∈ A and all k ∈ {1, 2, . . . }. The joint distribution µ, defined in Section 2, is equal to the probability measure on (X ∞ × Θ, A∞ ⊗ B) defined by Z µ(E) = Pθ∞ (Eθ ) dΠ(θ) Θ for E ∈ A∞ ⊗ B, where Eθ = {x ∈ X ∞ : (x, θ) ∈ E} is the θ-section of E. In order for this definition to make sense, we need θ 7→ Pθ∞ (Eθ ) to be a measurable function for all E ∈ A∞ ⊗ B; in Section 5, we prove that this is indeed the case, as long as condition (1) of Assumption 2.1 holds. b a metric that makes it a complete separable Similarly, giving Xb∞ × Θ metric space with the product topology, it follows that X ∞ × Θ is a Borel b and the induced Borel σ-algebra on X ∞ × Θ measurable subset of Xb∞ × Θ, coincides with the product σ-algebra A∞ ⊗ B. Proof of Theorem 2.2. Since E|g(θ)| < ∞, E(g(θ) | X1 , . . . , Xn ) is a uniformly integrable martingale, and thus lim E(g(θ) | X1 , . . . , Xn ) = E(g(θ) | X) a.s. n→∞ by, e.g., Kallenberg (2002), 7.23. In Section 4, Theorem 4.1, we prove that there exists f : X ∞ → Θ measurable such that f (x) = θ for µ-almost all (x, θ). Defining h = g ◦ f , we have h : X ∞ → R measurable such that h(x) = g(θ) a.e.[µ], and hence h(X) = g(θ) almost surely. Note that σ(X) = {A × Θ : A ∈ A∞ } ⊆ A∞ ⊗ B. Now, h(X) is a version of E(g(θ)|X), since it is σ(X)-measurable and for any F ∈ σ(X) we have Z Z g(θ)dµ(x, θ) = h(x)dµ(x, θ). F F Hence, E(g(θ)|X) = h(X) = g(θ) almost surely. A minor technical point regarding the preceding proof: even though E(g(θ)|X) = g(θ) almost surely, g(θ) is not necessarily a version of E(g(θ)|X) since g(θ) is not necessarily σ(X)-measurable. It is true that h(x) = g(θ) a.e.[µ] and h is Borel measurable, however, this is not sufficient to guarantee σ(X)-measurability of g(θ) since (X ∞ × Θ, A∞ ⊗ B, µ) is not necessarily a complete measure space. When working in a probability measure space that is not necessarily complete, we follow the usual custom 5 of using “almost everywhere” (and “almost surely” for random variables) to signify that there exists a measurable set of measure 1 on which the condition under consideration holds. Proof of Corollary 2.3. By Theorem 2.2, there exists a set F ∈ A∞ ⊗ B of µ-probability 1 such that for all (x, θ) ∈ F , lim E(g(θ) | x1 , . . . , xn ) = g(θ). n→∞ R R Then 1 = µ(F ) = Θ Pθ∞ (Fθ ) dΠ(θ), and therefore Θ (1−Pθ∞ (Fθ ))dΠ(θ) = 0. Since 1 − Pθ∞ (Fθ ) ≥ 0 for all θ, then Pθ∞ (Fθ ) = 1 a.e.[Π] by, e.g., Kallenberg (2002), 1.24. In other words, there exists Θ0 ∈ B with Π(Θ0 ) = 1 such that Pθ∞ (Fθ ) = 1 for all θ ∈ Θ0 . With this corollary in hand, we are well-positioned to prove the posterior consistency part of Doob’s theorem. Proof of Theorem 2.4. Let C ⊆ B be a countable base for the topology of Θ, using the fact that Θ is a separable metric space. (For example, take the open balls of radius 1/k about every point in a countable dense subset, for all k ∈ {1, 2, . . . }.) For each C ∈ C, choose ΘC according to Corollary 2.3 with g(θ) = IC (θ), so that Π(ΘC ) = 1 and for each θ ∈ ΘC , E(IC (θ) | X1 , . . . , Xn ) −−−→ IC (θ) a.s. n→∞ when X1 , X2 , . . . i.i.d. ∼ Pθ . Let Θ1 = \ ΘC . C∈C Then Π(Θ1 ) = 1 since C is countable. Let θ1 ∈ Θ1 and let B be a neighborhood of θ1 . Since C is a base, there exists C ∈ C such that θ1 ∈ C ⊆ B. Therefore, if X1 , X2 , . . . ∼ Pθ1 i.i.d. then E(IB (θ) | X1 , . . . , Xn ) ≥ E(IC (θ) | X1 , . . . , Xn ) −−−→ IC (θ1 ) = 1 a.s. n→∞ since IB (θ) ≥ IC (θ) and θ1 ∈ Θ1 ⊆ ΘC ; hence, P(θ ∈ B | X1 , . . . , Xn ) → 1 almost surely. 6 4 Measurable recovery In the proof of Theorem 2.2, we postponed a key step: the existence of f . Although it may at first appear to be a simple technical detail, this turns out to be surprisingly nontrivial — or at least, it seems to necessitate the use of a highly nontrivial result (Theorem 4.2). Our proof below is modeled after Ghosh and Ramamoorthi (2003), who provided a proof of the posterior consistency part of Doob’s theorem. Theorem 4.1 (Measurable recovery). Under the setup of Sections 2 and 3, there exists f : X ∞ → Θ measurable such that f (x) = θ a.e.[µ]. In other words, there exists f : X ∞ → Θ measurable such that there is some F ∈ A∞ ⊗ B with µ(F ) = 1 satisfying f (x) = θ for all (x, θ) ∈ F . The difficult part of the theorem is ensuring that f is measurable. Otherwise, it is relatively simple, since if X1 , X2 , . . . ∼ Pθ i.i.d., then from the infinite sequence X = (X1 , X2 , . . . ) one can almost surely recover Pθ (using the strong law of large numbers and separability of X ), and from Pθ one can recover θ (by identifiability, condition (2) of Assumption 2.1). This would determine a map from X to θ, but it comes with no guarantee of measurability. Although measurability is often a technical detail that can be assumed away, one should bear in mind that when dealing with conditional expectations, measurability is of the essence. The following innocent-looking but deep theorem plays a central role in the proof. Theorem 4.2 (Lusin, Souslin, Kuratowski). Let U and V be Borel measurable subsets of complete separable metric spaces, and give them the induced Borel σ-algebras. If E ⊆ U is measurable, and g : U → V is a measurable function such that the restriction g|E is one-to-one, then g(E) is measurable and g|−1 E : g(E) → U is measurable. Proof. See Kechris (1995), Corollary 15.2, or Parthasarathy (2005), Corollary 3.3, for the proof. Proof of Theorem 4.1. Let C ⊆ A be a countable collection that generates A, contains X , and is closed under finite intersections. (For example, let C0 7 be a countable base for X , and let C = {X } ∪ {A1 ∩ · · · ∩ Ak : A1 , . . . , Ak ∈ C0 , k = 1, 2, . . . }.) Let \ E= FA A∈C where FA = ( ) n X 1 (x, θ) ∈ X ∞ × Θ : lim IA (xi ) exists and equals Pθ (A) . n→∞ n i=1 We will abuse notation slightly and write πx and πθ for the projections from X ∞ × Θ to X ∞ and Θ respectively, i.e., πx (x, θ) = x and πθ (x, θ) = θ. Note that πx and πθ are measurable (by the definition of the product σ-algebra). We will show that: (a) E is measurable (i.e. E ∈ A∞ ⊗ B), (b) µ(E) = 1, and (c) for any x ∈ πx (E), there is a unique θ ∈ Θ such that (x, θ) ∈ E. Before proving (a), (b), and (c), let’s see how to prove the result, assuming they are true. We will apply Theorem 4.2 with U = X ∞ × Θ, V = X ∞ , and g = πx . Recall that X ∞ and X ∞ × Θ are Borel measurable subsets of complete separable metric spaces (in their respective Borel σ-algebras), and note that (c) means that the restriction πx |E is one-to-one. Therefore, assuming (a) and (c), Theorem 4.2 implies that πx (E) is measurable and the map ϕ : πx (E) → X ∞ × Θ defined by ϕ = πx |−1 E is measurable. Note that for any (x, θ) ∈ E, we have ϕ(x) = (x, θ) by construction. It is straightforward to show that ϕ has a measurable extension ϕ̃ : X ∞ → X ∞ × Θ. Define f : X ∞ → Θ by f (x) = πθ (ϕ̃(x)). Then f is measurable and for any (x, θ) ∈ E we have f (x) = πθ (ϕ̃(x)) = πθ (x, θ) = θ. Along with (b), this will prove Theorem 4.1. Now, we prove (a), (b), and (c). (a) Let A ∈ A. Since πθ is measurable and θ 7→ Pθ (A) is measurable (by condition (1) in Assumption 2.1), then (x, θ) 7→ Pθ (A) is measurable. Similarly, for any i ∈ {1, 2, . . . }, since πx is measurable and x 7→ xi is measurable then (x, θ) 7→ IA (xi ) is measurable. Hence, the function n hn (x, θ) := 1X IA (xi ) − Pθ (A) n i=1 8 is measurable for any n ∈ {1, 2, . . . }. In terms of hn , the set F A defined above becomes n o F A = (x, θ) ∈ X ∞ × Θ : lim hn (x, θ) exists and equals 0 . n→∞ It to check that F A is measurable, and therefore E = T is straightforward A is measurable. A∈C F (b) For θ ∈ Θ and A ∈ C, the sections Eθ = {x ∈ X ∞ : (x, θ) ∈ E} and = {x ∈ X ∞ : (x, θ) ∈ F A } are measurable, since from the proof of (a) we know that E and F A are measurable. Noting that ( ) n X 1 FθA = x ∈ X ∞ : lim IA (xi ) exists and equals Pθ (A) , n→∞ n i=1 FθA the strong law of large numbers implies that for any θ ∈ Θ and any AT∈ C, we ∞ A have Pθ∞ (FθA ) = 1. Hence, T Pθ (EAθ ) = 1 for any θ ∈ Θ, since Eθ = A∈C Fθ (which follows from E = A∈C F ) and C is countable. Therefore, Z Z ∞ µ(E) = Pθ (Eθ ) dΠ(θ) = dΠ(θ) = Π(Θ) = 1. Θ Θ (c) First, we show that θ 6= θ′ ⇒ Eθ ∩ Eθ′ = ∅. Suppose θ, θ′ ∈ Θ such that θ 6= θ′ . Then Pθ 6= Pθ′ by identifiability (condition (2) of Assumption 2.1). This implies that there exists A ∈ C such that Pθ (A) 6= Pθ′ (A) (by, e.g., Kallenberg (2002), 1.17) since C is a π-system containing X that generates A. Therefore, FθA ∩ FθA′ = ∅, and hence Eθ ∩ Eθ′ = ∅. Now, to prove (c), suppose x ∈ πx (E). Let θ, θ′ ∈ Θ such that (x, θ), (x, θ′ ) ∈ E. (There is at least one such θ by the definition of πx (E).) Then x ∈ Eθ and x ∈ Eθ′ , and therefore θ = θ′ (by the preceding paragraph). This proves (a), (b), and (c), completing the proof of Theorem 4.1. 5 Supporting results For completeness, in this section we provide some additional details. 9 5.1 Joint measures Let (X , A) and (Θ, B) be measurable spaces, let Pθ be a probability measure on (X , A) for each θ ∈ Θ, and let Π be a probability measure on (Θ, B). We would like to define a joint probability measure ν on (X × Θ, A ⊗ B) by Z ν(E) = Pθ (Eθ ) dΠ(θ) Θ for all E ∈ A ⊗ B, where Eθ = {x ∈ X : (x, θ) ∈ E} is the θ-section of E. However, in order for this definition to make sense, we need θ 7→ Pθ (Eθ ) to be a measurable function. Lemma 5.1. If θ 7→ Pθ (A) is measurable for every A ∈ A, then θ 7→ Pθ (Eθ ) is measurable for every E ∈ A ⊗ B. Proof. We apply the π − λ theorem; see, e.g., Kallenberg (2002), 1.1. The collection of rectangles R = {A × B : A ∈ A, B ∈ B} is a π-system. Let L be the collection of sets E ∈ A ⊗ B such that θ 7→ Pθ (Eθ ) is measurable. We will show that L is a λ-system containing R. Since σ(R) = A ⊗ B then A ⊗ B ⊆ L will follow by the π − λ theorem. This will prove the lemma. To see that R ⊆ L, let E ∈ R and write E = A × B with A ∈ A, B ∈ B. Then  A if θ ∈ B Eθ = ∅ if θ 6∈ B, so Pθ (Eθ ) = Pθ (A)IB (θ), which is measurable as a function of θ. Hence, E ∈ L. To show that L is a λ-system, we must show that X × Θ ∈ L and L is closed under increasing unions and proper differences. Since R ⊆ L, then X ×Θ ∈ L If E 1 , E 2 , .S. . ∈ L such that E 1 ⊆ E 2 ⊆ · · · , S is immediate. n and E = n E , then Pθ (Eθ ) = Pθ ( n Eθn ) = limn→∞ Pθ (Eθn ), which is measurable as a function of θ (being a limit of measurable functions). If E, F ∈ L such that E ⊆ F then Pθ ((F \E)θ ) = Pθ (Fθ \Eθ ) = Pθ (Fθ )−Pθ (Eθ ), which is measurable as a function of θ. 5.2 Measurable families are preserved under countable products Now, consider the situation in Sections 2 and 3. Since Assumption 2.1 ensures that θ 7→ Pθ (A) is measurable for all A ∈ A, Lemma 5.1 shows that θ 7→ 10 Pθ (Eθ ) is measurable for all E ∈ A ⊗ B. However, since we would like to define the joint measure as Z µ(E) = Pθ∞ (Eθ ) dΠ(θ) Θ on (X ∞ × Θ, A∞ ⊗ B), what we really need is for θ 7→ Pθ∞ (Eθ ) to be measurable for all E ∈ A∞ ⊗ B. If we can show that θ 7→ Pθ∞ (A) is measurable for all A ∈ A∞ , then this will follow from Lemma 5.1 simply by replacing (X , A, Pθ ) with (X ∞ , A∞ , Pθ∞ ). Lemma 5.2. Under the setup of Sections 2 and 3, θ 7→ Pθ∞ (A) is measurable for every A ∈ A∞ . Proof. This is another application of the indispensable π − λ theorem. For our π-system, we take R = {A1 × · · · × Ak × X × X × · · · : A1 , . . . , Ak ∈ A, k = 1, 2, . . . }. Let L be the collection of sets A ∈ A∞ such that θ 7→ Pθ∞ (A) is measurable. We will show that L is a λ-system containing R. Since σ(R) = A∞ , then A∞ ⊆ L will follow by the π − λ theorem, proving the desired result. To see that R ⊆ L, note that if A1 , . . . , Ak ∈ A then Pθ∞ (A1 × · · · × Ak × X × X × · · · ) = Pθ (A1 ) · · · Pθ (Ak ), which is measurable as a function of θ, since θ 7→ Pθ (Ai ) is measurable for each i = 1, . . . , k by Assumption 2.1. To show that L is a λ-system, we must show that X ∞ ∈ L and L is closed under increasing unions and proper differences. Since R ⊆S L, we have ∞ X ∈ L. If A1 , A2 , . . . ∈ L such that A1 ⊆ A2 ⊆ · · · , and A = i Ai , then Pθ∞ (A) = limi→∞ Pθ∞ (Ai ), which is measurable as a function of θ (being a limit of measurable functions). Lastly, if A, B ∈ L such that A ⊆ B then Pθ∞ (B \ A) = Pθ∞ (B) − Pθ∞ (A) is measurable as a function of θ. References A. Barron, M. J. Schervish, and L. Wasserman. The consistency of posterior distributions in nonparametric problems. The Annals of Statistics, 27(2): 536–561, 1999. 11 J. L. Doob. Application of the theory of martingales. In Actes du Colloque International Le Calcul des Probabilités et ses applications (Lyon, 28 Juin – 3 Juillet, 1948), pages 23–27. Paris CNRS, 1949. (Doob’s original paper can be found at the end of a historical account entitled “Doob at Lyon”, currently available at: www.jehps.net/juin2009/Locker.pdf.). D. A. Freedman. On the asymptotic behavior of Bayes’ estimates in the discrete case. The Annals of Mathematical Statistics, pages 1386–1403, 1963. S. Ghosal and A. van der Vaart. Fundamentals of Nonparametric Bayesian Inference. Cambridge University Press, 2017. J. K. Ghosh and R. V. Ramamoorthi. Bayesian Nonparametrics. SpringerVerlag, New York, 2003. O. Kallenberg. Foundations of Modern Probability (Second Edition). Springer-Verlag, New York, 2002. A. S. Kechris. Classical Descriptive Set Theory. Springer-Verlag, New York, 1995. A. Lijoi, I. Prünster, and S. G. Walker. Extending Doob’s consistency theorem to nonparametric densities. Bernoulli, 10(4):651–663, 2004. A. Nobile. Bayesian Analysis of Finite Mixture Distributions. PhD thesis, Department of Statistics, Carnegie Mellon University, Pittsburgh, PA, 1994. K. R. Parthasarathy. Probability Measures on Metric Spaces. American Mathematical Society, Providence, RI, 2005. L. Schwartz. On Bayes procedures. Probability Theory and Related Fields, 4 (1):10–26, 1965. A. W. Van der Vaart. Asymptotic Statistics. Cambridge University Press, 1998. 12
10math.ST
A Next-Generation Data Language Proposal by Eugene Panferov, [email protected] 2015 Abstract This paper attempts to explain the consequences of the relational calculus not allowing relations to be domains of relations, and to suggest a solution for the issue. On the example of SQL we describe the consequent problem of the multitude of different representations for relations; analyze in detail the disadvantages of the notions “TABLE” and “FOREIGN KEY”; and propose a complex solution which includes brand new data language, abandonment of tables as a representation for relations, and relatively small yet very significant alteration of the data storage concept, called “multitable index”. 2 1. Introduction In the year 1972 E. F. Codd stated his anticipation as follows: "In the near future, we can expect a great variety of languages to be proposed for interrogating and updating data bases." It is now 2015. The only data language of any significance is SQL. He was not wrong, we were too slow. This paper is intended to contribute to the great variety of data language proposals. This paper attempts to explain the consequences of the relational calculus (as defined in section 3 of [2]) not allowing relations to be domains of relations and to suggest a solution for the issue. In section 2 we discuss the state of the art in general terms. In section 3 we particularly focus on the severity of the problem of the multitude of different representations for relations in SQL (which originates from the relational calculus). We analyze in detail the disadvantages of the notions “TABLE” and “FOREIGN KEY”; expose the complete redundancy of the “JOIN” operation. In section 4 we propose a “multitable index”.and demonstrate its relevance to the previously discussed problems. In section 5 we highlight the principal mental step to the design of a next-generation datalanguage. In section 6 we propose a brand new data language that is capable of dealing with relations between relations having single notion of a relation uniformly applicable to all relations (including those of higher order). The proposed language attempts to overcome the following apparent flaws of SQL: – human language mimicking – which leads to inconsistent, completely inextensible, and needlessly complicated syntax – mixing relational operations together and with the output – imperative DDL – impossibility of relations between relations – which leads to non-homogenous representation and undermines the relation abstraction itself, lowering the level of programming The proposed language abandons the notion of table and provides: – frugal, extensible, functional-style syntax – higher than SQL level of programming (no surrogate keys, no foreign keys) – explicit and independent notions of relational operations and I/O operations – declarative DDL – single unified representation for relations capable of adopting another relation as a domain 3 2. State Of The Art SQL is the uncontested data language of today and hence it will be our focus. SQL is a huge, unbelievable success. It is the most successful non-imperative algorithmic language [9]. It is the only non-imperative language commonly accepted by the ignorant majority of which the only way of thinking is strictly imperative. Yet SQL is not perfect, and its use is waning. As environment is constantly changing, imposing new requirements and creating opportunities, SQL remains basically unchanged, keeping initial imperfections and adopting chiefly minor improvements. Although, it must be mentioned that SQL is slowly approaching a noble goal. In the 70s data languages were seen as sub-languages of general-purpose languages [2]. SQL, on the contrary, used to stand alone at first, and now a general purpose language is growing around and from within SQL. Do not confuse this purely SQL's phenomenon with PL/SQL or similar procedural dialects. Markus Winand gave us great overview [11] of the recent SQL's evolutions. So, nowadays, when computers are powerful beyond comprehension, more powerful than the Founding Fathers of Computer Science could dream of, we do not have a data base interrogation (sub)language of a level as high as it was meant to be. We are still choosing “how many bytes to reserve for a surrogate key”. On the other hand hordes of uneducated no-SQL proponents who simply did not get the idea of high level programming are trying to abolish everything that SQL has achieved, pushing us down to the level of imperative (general purpose) languages where a programmer is obliged to take care of every byte and the most advanced data management tool is a garbage collector. Moreover, ISO encourages abandonment of the relational model by facilitating XML manipulation [7] within SQL – the apparent sign of decay, not to mention the utmost inherent failure of XML itself. We propose an opposite way, the way up, to the higher than SQL level of programming. 3. What We Have category item A very typical approach to database design is Entity-Relation diagrams. It is a very intuitive and informative way of visualizing data structure [10] (to declutter our diagrams we omit minimum cardinality for “M”s and maximum cardinality for “1”s for they are 0 and 1 respectively). In the example above we have two entities and one relation between them. Let us map them into a relational database. The entities will be mapped as tables, and the relation will be mapped as a foreign key. 4 Category Id name Item Id category_id name But tables are supposed to represent relations! From the perspective of relational algebra the Item and Category entities are relations. So, we have three relations: Category, Item, and the relation between them. Why do we represent two of them properly (as it meant to be) and at the same time simulate the third one by low level programming of foreign keys? Is there a real need for a nonhomogenous representation? Is the relation “item belongs to category” any worse or better than relations item or category? 3.1. The price of foreign keys Foreign keys are very low-level relatively to tables. Compare a table representing a relation versus a foreign key representing a relation: CREATE TABLE category ( Id INT, name TEXT ); Here you just declare: these two attributes constitutes a relation. You do not care how the association between them will be built and maintained. With this declaration you can freely manipulate pairs (id,name) and apply whatever relational operations to the relation category. CREATE TABLE item ( Id INT, category INT REFERENCES category(id), name TEXT ); Here you have created a fake attribute category for the relation item, you have defined its type which have no correspondence to any domain knowledge entity (remember? Domain knowledge is “item belong to category” – it says nothing about integers), and then you command to your RDBMS to check your input in order to keep obvious garbage out (in other words, this “references” directive defines a subset of the integer, making the type of this fake attribute more relevant). You have created a relation manually! You are involved in the very internals of the representation. The maintenance is up to you. The interpretation is up to you too. The system does not recognize this representation as a relation. You can not apply relational operations to it. 3.2. The price of joins A join creates a relation from existing relations . At first glance, it looks a reasonably useful operation, but practice reveals that the resulting relation already exists... always. Let us select something from the first example “item-->category”: SELECT category.name, item.name 5 FROM category, item WHERE category.id = item.category_id The relation highlighted with bold, is already in our database, but it is hidden behind the foreign key (underlined). And it is not “new” information created inside the database, this information is put inside the database on purpose. Every pair of tables you ever join, you already MADE JOINABLE! A significant part of a programmer's labor is to make all joins precisely predictable. A programmer must make sure all joins will result in a set of relations that are meant to be stored. No join will reveal any new information. Joins do merely convert relation representations, and they do this job each time we are accessing information. Moreover, a programmer is forced to codify this conversion routine itself for many relations separately. It is a resource consuming operation of which the result we already know. 3.3. The price of link-tables Because foreign keys are not capable of representing many-to-many relations, there is another alternative representation for relations: link-tables. It is also a low-level simulation of relations, it also compromises the idea of RDBMS by rivaling tables. And it is available for extra price. Given the simplest case of a relation many-to-many: genre book_genre book The most recommended mainstream way to represent it in terms of tables is: book_genre book book_id genre_id id title author ... genre id name Let us select genres of a book X: SELECT genre.name FROM book_genre, genre, book WHERE book.title = X AND book_id = book.id AND genre_id = genre.id Nothing unusual, all three tables properly joined according to the foreign keys provided. But, look, book_genre is a relation on the cartesian product of book and genre. All information we want to retrieve is located inside this product. In other words we need to perform a search of the dimension (book, genre). What do we do in the select above? We produce a cartesian product of book, genre, and book_genre itself! And then we perform a search of the dimension twice bigger than needed. Easy to see that an RDBMS appears now even less relational. 3.4. The diversity of representations 6 Please, do not confuse these two representations, they have nothing in common and are not related at all. A foreign key (as a representation for relations) is not a part of a link-table representation for relation since in this case a foreign key itself DOES NOT represent any particular relation. However, this diversity has its price too: all foreign keys in a database come in two varieties: (a) representing a relation (b) not representing a relation, so that you have a set of absolutely indistinguishable objects with opposite semantic. Moreover, there are more than these two alternative representations of a relation in SQL. Some RDBMSes introduce subclasses and inheritance. Needless to say that a subclass is a relation on a class, therefore, we have another rival representation. Some RDBMSes introduce complex types, arrays, collections (aka “nested tables” (sic!)) which are sort of relation representations too. Let us take a look at the oracle documentation [13]: ---- a collection is defined as: CREATE OR REPLACE TYPE emp AS OBJECT ( e_name VARCHAR2(53), s_sec VARCHAR2(11), addr VARCHAR2(113) ); ---- You can create a table with this object This is a relation, no more and no less, yet another representation! Which representation should we choose for a particular relation? Is there any method to choose representations from this multitude? Why so many representations? This representation zoo is the price of the “table” notion. 3.5. The price of tables A typical RDBMS suggests the following mapping: relation → table; domain → attribute. Note that a table can not adopt another table as an attribute. Therefore, there simply is no room for relations between relations. Taking in account that a typical domain knowledge contains a whole hierarchy of relations with the majority of them being relations between relations, with tables we can represent only SOME of them. Once we represent any relation with a table we prevent table representations for all relations that includes the current one and all that are included by the current one. The representation of the former takes link-tables and foreign-keys. The representation of the latter takes complex types and collections. This is why we are stockpiling alternative representations. And it is not a solution at all. An RDBMS controls relations represented as tables, which are (as we just demonstrated) a mere part of the data model. The model really consists of many more relations having alternative representations, so that our data model resides partially (and mostly) outside the system constituted of tables. As only the tables are considered “relations” by an RDBMS, on what premises do you call your data model “relational”? 7 4. What Do We Have To Have Any domain knowledge is not a plain set of relations, it is always a whole hierarchy of relations. And not surprisingly only a minority of relations are leaves of this hierarchy. Typically a majority of relations adopt other relations as domains. First of all we must make relations between relations possible. In order to achieve this, we have to improve slightly the definition of the relation, making it self recurrent (for definitions we use an intuitive BNF-like notation [5]): relation domains domains domain domain ::= ::= ::= ::= ::= domains graph domain domains domain relation scalar_type It is very important from the standpoint of the set theory that a relation (being a set) might play a role of a domain. Exactly this is missing in relational calculus and relational algebra as defined by Codd in [2] and [1] The “scalar_type” is merely a predefined set, provided by an underlying computational system, for example “number” or “string of characters” (that were considered basic types by E. F. Codd in his original definition of the relational model of data) Everything is plain and clear in this definition except for the mysterious “graph” that is yet to be defined. (A relation's graph is defined in the set theory, see [8]) Let's say we have a binary relation ρ between two sets A and B: ρ A B keys keys 1 4 7 9 2 3 8 9 a representation Relation graph G(ρ) = {12,13,48,49,73,99} This is the relation graph Assuming we already have the domains A and B somehow represented, we only have to represent the edges of the graph. Therefore we may treat a relation graph as a set. Finite set. And every finite set can be represented as a set of integers. In this particular example we have the relation graph represented as a set of six integers. Let us create an index on this set: 8 50 25 12 13 75 48 49 73 99 This index (by-design) represents the graph of the relation ρ The primary purpose of a relation graph is to answer the question: “whether a tuple is a member of the relation”. This is the question an index is supposed to answer too. A graph and an index share the purpose and share representation. Because of this, from our perspective: a relation graph IS an index. If a key is missed on this index it is not a member of ρ. If a key is on this index then its node contains a primary key reference to the element of the domain. Furthermore, nothing prevents this index from holding storage node references. We did not impose any restrictions on the domains A and B – these are just sets – therefore, these domains of the relation ρ can be relations. We have just created a relation between relations. It is merely an index. The only novelty is that attributes of this index come from different tables. It is a significant novelty. But contemporary software (with very little improvement) could handle such indexes. Also we can treat it as usual relation, as we just did few paragraphs before and succeeded. Strictly speaking an index is a very special relation – a relation with linear order? But it is still a relation anyway, and it contains all information we need. Thus, introduction of multitable indexes will allow us to store relations between relations and treat them as other relations. So that we would stick with single unified representation for relations, that leads to a homogenous (rather to say self-similar) recursive representation of domain knowledge. Also, multitable indexes put joins out of the job. Since we can just store relations between relations we do not have to recalculate them repeatedly. 5. Paradigm Shift As we demonstrated, tables are incapable of representing relations. But tables already replaced the very idea of relations. Everybody think of relations as a “geeky euphemism” for tables [6]. It is gross, but it is very strong public opinion, and despite being unexpressed, it is probably the principal cause of SQL's waning. Tables aren't relations! – Indexes are! 9 6. The Language Proposal We need a language to be pure, simple, and coherent. Notation must be clear, unambiguous, and intuitively human readable (but not alike a human language, in fact resemblance of a human language does only complicate understanding [3]). Ideally, similar objects must be described by the similar sentences of the language, while dissimilar ones be described by easily distinguishable sentences. Also, we want to keep a number of keywords and unique syntax constructs to the bare minimum. As everything is already invented, we will try to stick with s-expressions [4] and follow the functional style. Abolish human language mimicking. Decades of practical use of SQL worldwide proved “ordinary” humans incapable of speaking SQL despite its intend to be human-friendly. Today's SQL has become completely a machine-to-machine language. There is no need to keep the useless legacy handicap. Separate relational operations. We want an explicit notation for projection and pure relational selection (without “order by”, “limit” etc). Separate output operation and make it explicit. It allows us to further purify scripting, and at the same time enrich output formatting. Split context. In SQL we had to deal with certain limitations on SELECT depending on its context. In some context certain clauses are disallowed. We want to get rid of this complication by introducing two distinguishable contexts (relational (where any selection is possible) and non-relational (where no selection possible)) and a predefined (fixed) set of operations that cause context shift (e.g. “order by” takes relational object and returns nonrelational object). Declutter the notation. We will keep the notation free from meaningless variety of separators – space is enough. For example, if we want to construct a triple, we have to provide triple members (and optionally their order), like this: ( x1, x2, x3 ). The question is what information the comma symbol adds to this notation? The only right answer is: void. Because of this, we simply discard the garbage, so we got: ( x1 x2 x3 ). This seemingly superficial change in fact is a very significant improvement to the syntax. It effectively removes the whole parasite idea of “in between”, which ordinarily causes whole series of tiny annoying problems (particularly nasty in machine generated scripting (beginning with “duplicate separator”)). Make basic types and relations interchangeable. This is the pivot point of the language. It makes the language capable of expressing relations between relations. Introduce variables and assignments. SQL does not provide a room for assignments, they are totally alien to the SQL's structure, yet strongly demanded (recently the “WITH” clause (which is primarily a counterintuitive assignment) was introduced into SQL). Our variables will be IMMUTABLE, will have a single transaction lifespan and visibility, will be interchangeable with relations in every context except for data definition, and will represent only sets of tuples (subsets of arbitrary relations, practically). Assignments have no need to be calculated immediately. Make DML returning value. Since we have explicit output operations, and separated relational operations, and we have assignments, then we can spare the whole “RETURNING” clause by making DML return affected rows by default. And since we may utilize a return value only explicitly, then we can just discard it by not utilizing it. Keep types as few as possible. The epoch of counting bytes has passed. There is no need in keeping several different types for integers, also we do not see any high level application for bitwise operations and related stuff. We now want computers to count their bytes (if they are concerned). On the other hand we provide a useful tool for constructing complex types of 10 arbitrary complexity, namely relations – we do not need to anticipate all possible user's wishes by maintaining a library of fancy peculiar types which will be rarely known and never used (because user's wishes always prove themselves more peculiar than our wildest anticipation). Respect the fact that a relation is a function of its primary key. Indeed we can treat them as functions all the way long and that gives us an opportunity to create a procedural language later on. Typographic Convention: To describe syntax we will use BNF. We will type terminals in bold font, keeping their literal value, if this value is predefined. We will type terminals plain UPPERCASE, if their value is variable. We will give lowercase identifiers for non-terminals. We will highlight rules of particular significance with red sign ::= NOTE: These BNF snippets are not the actual grammar used in the prototype software. These are designed for better understanding, using broader set of tokens and redundant rules, these describe the language from the perspective of a user. The actual grammar differs to these BNF snippets since it is designed for different purpose (see file: “parser.y” in the source code). 6.1. Data Definition definition definition definition domains domains domain domain type type // we will ::= relation ( NAME domains ) ::= domain ( NAME domains ) ::= function ( NAME domains ) expression ::= domain ::= domains domain ::= type ::= ( NAME type ) ::= TYPE_NAME ::= RELATION_NAME define expression later There are three classes of relations (they are all relations in any sense): simple relation – a relation which tuples are defined by a user, domain – a relation which always contains all possible tuples, function – a relation which tuples are formally defined (can be calculated and cannot be altered). Examples: Let there be a tiny public library: genre department book_genre book author available Assuming hereafter that we have predefined scalar types: timestamp, text, int, real 11 The definition of this library will look like: relation relation relation relation relation relation (author (name text) (birthdate timestamp)) (book author (title text) timestamp) (genre text) (book_genre book genre) (department text) (available book department) Now let us illustrate a domain definition: domain (point2d real real) domain (circle (radius real) (center point2d)) relation (my_circle circle) In the example above circle is a set of all possible circles. While my_circle is a set of user defined circles – user himself controls which tuples do belong to the latter set. Domains play a role of complex types. Of course we can select from them too, if we can determine finiteness of a set prior to output, then why not. Of course we are assuming laziness. Laziness is so natural in a transactional context – the entire workflow is already cut by checkpoints. 6.2. Arithmetic We like sex. expression ::= ( OPERATOR list ) expression ::= ( member OPERATOR list ) expression ::= ( TYPE_NAME expression ) // this is a typecast list ::= member list ::= list member member ::= CONST member ::= NAME member ::= selection member ::= expression // we will define selection later To keep some operators (namely comparison) easily readable for everyone we decided to allow alternative placement of an operator within an expression, nevertheless we prefer prefix notation. Examples: (+ 1 2 3 4 5) (& (> (-17) (* 1 2 3 (-5))) (“xcf” < “fgh”)) function (avg2 (a real) (b real)) (/ (+ a b) 2) (+ (int “123”) 4) // operator type is defined by the type of the first operand // however, we will be glad to get rid of operator overloading 12 6.3. Selection What information do we need to provide to a system in order to select all tuples of a relation? The relation name – and nothing more! So that selection operation basically looks like: (author) (book) selection ::= ( NAME ) selection ::= ( NAME list ) selection ::= ( NAME : expression ) list ::= member list ::= list member member ::= selection member ::= expression member ::= CONST member ::= . // this is a shorthand for a non-captured domain // and probably this one too selection ::= ( NAME list : expression ) Here the list acts like a positional reference to the relation's domains, so that selection may be treated as function call. The expression after “:” acts like a “where” clause, it is a filter of the relation's tuples. These both are equivalent in any sense. Examples: (author “Dawkins” “1941”) (author :(name ~ “A.*”)) (book (author :(name ~ “A.*”)) (text) (timestamp)) // here “meaningless” selections (text) and (timestamp) stand for // non-captured arguments // the two last domains of a book may be of any value. // Surely we must create a shorthand for this. (book (author :(name ~ “A.*”)) . .) // all books of all authors with the name's initial “A” 6.4. Tuple Constructors And Set Constructors Quite naturally, for tuple construction we will employ Cartesian product, for set construction we will employ union operation, and we will create the following notation for them: product ::= { list } union ::= ( list ) list ::= member // sets list member member member ::= ::= ::= ::= list member CONST expression selection we do not see a practical reason for explicit construction of empty 13 Examples: {1 2 “txt”} (1 2 3) ({1 2} {3 4}) {(1 2) 3} // // // // a triple of two integers and one text a set of integers a set of two pairs of integers also a set of two pairs: {1 3} and {2 3} Of course we can do all the same with functions and selections: put selections into their arguments, and put function calls into selections and arbitrary combine them with constructors. All functions accept SETS instead of each argument and they act as if they are “MAPPED” by each argument (see, for example, “map” function definition in Haskell). Examples: {(author) “he is author”} // we extend each selected tuple ((genre) “bore”) // we extend a selected set (avg2 (1 2 3) 3) // == ((avg2 1 3) (avg2 2 3) (avg2 3 3)) 6.5. Join-like Operation Since we have all relations between relations explicitly defined, the data scheme is a graph. So that a pathfinding problem can be formalized. It gives us very powerful operation: finding a connection between a relation and another relation's subset. connection ::= { NAME selection } Example: // select “all genres of the given author” {genre (author 'Dawkins' ?)} The difference to the “JOIN” is that we do not have to specify the exact connection between relations (are being searched). On the contrary! We command a computer to find this connection and utilize. Please, refer to the “Data Definition” example, a path from the genre to the book is clearly visible there. However, it's semantic is not specified, we (as we designed this data scheme) know what it means. We think this operation must return a Cartesian product of the two relations involved in the search. We are not sure about a return value in case there is no connection between given relations. 14 6.7. Projection Operation As we are tampering with the parenthesis notation, we have no option but to employ this notation again (not because of the style, but because of the resolving of expressions). Please, note: since domains themselves could be relations you may apply projection operation to them as well. projection ::= [ selection list ] list ::= member list ::= list member member ::= DOMAIN_NAME member ::= [ DOMAIN_NAME list ] // possible the closure, // in order to utilize projection in a relational context selection ::= projection Examples: [(book) author title] [(book_genre . (genre 'sci-fi')) [book author]] [(book_genre . (genre 'sci-fi')) [book [author name] title]] 6.8. Data Management The most difficult and even controversial matter is the UPDATE operation. In the perspective of a pure relational system it is rather doubtful if this operation have even a right to exist. It is no-brainer in a context of old-school tables keeping spreadsheets of junk fields. But in our system, every field matters (remember we put all insignificant fields aside), so that changing a field value is in fact creating an entirely different tuple. Where by “different” I mean a tuple semantic. What is a reason of changing “Shakespeare” record into “Dawkins” record? If you want to, I strongly suggest “add / remove” procedure. The most sensible apology for update operation are probable data input mistakes. So that keeping them in mind I propose the following syntax: command ::= add RELATION_NAME set command ::= remove RELATION_NAME set command ::= update RELATION_NAME set ( list ) set ::= product set ::= union set ::= selection list ::= member list ::= list member member ::= DOMAIN_NAME expression member ::= DOMAIN_NAME CONST // plus “remove cascade” written in a single word command ::= abolish RELATION_NAME set 15 Examples: add genre {“bore”} add author ({“Dawkins” “1941”} {“Homer” “800 BC”}) remove book (book . “War And Piece” .) // removal with respect to another relation remove book (genre “bore”) update author (author) (name (capitalize name)) update author (book:(title ~ “A.*”) ( name (capitalize name) birthdate “1910” ) Thus, we achieve significant improvement in notation for DML operations referring multiple relations, such as notoriously ugly “DELETE FROM FROM” and “UPDATE FROM” We are not sure about positional “field” assignments, but they may be possible too. 6.9. Assignments, Laziness, Transactions We have quite a structure in our database. Putting a tuple into a relation may require several tuples in other relations. Assume we do not have “Homer” and we try to add “Ulysses”. add book ((author “Homer”) “Ulysses” “750 BC”) it will cause data integrity error. So that we do: add author {“Homer” “800 BC”} add book {(author “Homer”) “Ulysses” “750 BC”} commit Here we have a point of optimization. Common sense tells us that we do not need do explicitly select a tuple we just added to a relation, we may maintain a sort of a pointer left over the DML operation. Perhaps this particular imperfection would be algorithmically detectible, and possible for a machine to optimize, but pointers will also improve the outfit of the notation (if there are more than one of them, of course): Homer = add author ('Homer' '800 BC') add book {(Homer) 'Ulysses' '750 BC'} commit Theoretically (taking transaction qualities in account) we may naturally introduce laziness into DML. Everything we did before commit we actually did not, we only put plans for the operation we need to perform. It looks like laziness perfectly fits this application. Also we can defer error reporting until a commit point, allowing a user to temporarily “violate” some constraints. Because it is just a plan that have no immediate effect on a database, you can even think 16 about it as an unfinished sentence. This is a good problem to think about. Do we really need the immense multitude of these oldschool options affecting the behavior of transactions? Can we, in our new environment, put this cultural pluralism to an end by creating a single (or few?) firmly defined behavior that always makes sense? Also assignments will be useful to break complicated selections. Dawkins = ('Dawkins' '1941-03-26') His_Books = (book (Dawkins) . .) (book_genre (His_Books) .) Note: we do not demand assignments to be materialized, we also appreciate them as nominators. This is another ground for laziness. In order to make fun with variables as less messy as possible we constitute the following principles: – variables are immutable – the visibility and the lifespan is a single transaction – the type always is “set of tuples” – variables are interchangeable with relations (variable can and only can substitute relations in every context) Note: the parenthesis around variables, it is a selection, hence NAME terminal can not be an expression, but selection can. The definition of assignment is: assignment ::= NAME = command assignment ::= NAME = selection while variable usage is already defined above, you can put variable's name in any context where you can put relation's name (except for the DML statements... but, wait, why not?). Thus, a variable's simplest usage comes wrapped in parenthesis, as shown in examples above. By the way it is an unconditional selection, and we may do conditional selections (from variables) as well. A = (author:(name ~ “A.*”)) B = (A:(birthdate > “1940”)) C = (A . “1940”) 6.10. Output output ::= output selection output ::= output formatting selection Here we define WHERE we want TO LOCALAZE all nasty output formatting stuff that breaks relational model and makes SQL astray. The formatting features themselves are out of the scope of this article. 17 Strict isolation of the output formatting allows us to define much more sophisticated and diverse format methods. We are free to do literally anything with our selection result, since in the context of the “output” operation it is no longer in the relational context and we are not limited to relational operations. 6.11. PL All in all we inevitably will need procedural language. However, it is out of the article's scope, easy to observe that we can turn our transactions into procedures – stored parameterized transactions. Also we already introduced pure functions. Also the proposed language seems to be capable of seamless incorporation in a functional workflow. 6.12. Plausibility Of The Example There you could have noticed damn few “attributes” in the relations I have pictured, which is very unlike “real” 100-fields tables. There is a reason, besides an educational purpose, to keep this example data structure so seemingly oversimplified. All those 100-field tables (being results of “optimization”) ARE NOT RELATIONS. Most of their numerous fields are not their domains (usually only few of the fields are, while the rest represent all sorts of META-information or information somehow linked to relation tuples and should be stored separately). We suppose that only significant fields must constitute a data definition while all the rest should be TOASTed aside (see [12]). However, it is a very disputable topic, if we need that dangerous distinction between “significant” and “insignificant” and where the margin should be drawn. 6.13. Style Questions – case sensitivity – assignment syntax (there is an opportunity for several alternatives, will they be useful?) – filter symbol ( “:” doesn't look good, while usual set-comprehension “|” looks even worse) – arithmetic notation (shall we allow operator sign to appear second on a list) – product and union parenthesis (there is a reasonable opinion (opposing to the current proposal) to use “{}” for enumerated sets or unions and to use “()” for cartesian products) 7. Conclusion In this paper we have demonstrated the following: – Traditional SQL paradigm has several severe flaws – Multitable indexes are not any more complicated than ordinary indexes 18 – A multitable index itself is a relation between relations – The following alteration of the data language paradigm is required: – We better think of all indexes as relations, and stop thinking of tables as relations – A single column table represents an enumerable type – The idea of a multicolumn table must perish – The idea of foreign key must perish – By manipulating index's content we define a relation graph All these above provides us A UNIFORMITY of relations. Relations of all types are treated equally and could be represented recursively. Compact functional-style notation of the proposed language allows seamless embedding in general purpose languages. 19 Bibliography 1: E. F. Codd, A Relational Model Of Data For Large Shared Data Banks, 1970 2: E. F. Codd, Relational Completeness Of data Base Sublanguages, 1972 3: E. W. Dijkstra, On The Foolishness Of Natural Language Programming, 2005 4: M. Sperber et al, Revised6 Report on the Algorithmic Language Scheme, 2007 5: T. R. N. Rao, The Panini-Backus Form in Syntax of Formal Languages, 1998 6: Gordon Everest, Tableitis, https://sites.google.com/a/umn.edu/geverest/home/datamodeling-course/-tableitis 7: ISO/IEC 9075-14 XML-Related Specifications (SQL/XML), http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=53686 8: Binary Relations, http://en.wikipedia.org/wiki/Binary_relation#Formal_definition 9: Programming Language Popularity, http://langpop.com/ 10: Crow Foot Notation , http://www.tdan.com/view-articles/7474 11: Modern SQL in PostgreSQL, http://www.slideshare.net/MarkusWinand/modern-sql 12: TOAST, http://www.postgresql.org/docs/8.3/static/storage-toast.html 13: Collections, http://docs.oracle.com/cd/B10501_01/appdev.920/a97269/pc_18col.htm
6cs.PL
1 Resource Optimization with Flexible Numerology and Frame Structure for Heterogeneous Services Lei You1 , Qi Liao2 , Nikolaos Pappas3, and Di Yuan3 1 Department of Information Technology, Uppsala University, Sweden 2 Nokia Bell Labs, Stuttgart, Germany 3 Department of Science and Technology, Linköping University, Sweden I. I NTRODUCTION The fifth generation (5G) of wireless communications systems is required to support a large variety of services, given the fundamental trade-offs between requirements of these services [1]. A promising solution for higher resource efficiency while providing lower latency is the scalable transmission time intervals (TTIs) [2]–[7]. These works fall within the general notion of flexible resource allocation in the time-frequency domain, leading to new types of optimization problems. Optimization along the frequency dimension yields similar structures to problems such as multi-dimensional K NAPSACK or weighted M ATCHING [8]–[10]. Resource optimization adopting flexibility in both dimensions regarding frequency and time, named 2-dimensional (2-D) resource allocation, poses new challenges [11], [12]. This transition calls for new ideas to be proposed for algorithm design, as well as analysis to be done for tractability. Although flexible resource allocation along both the time and frequency dimensions is not entirely new [11], [12], frequency selective resource optimization with flexible sizes of resource units in the frequency and time twodimensional space in 5G, has not yet been addressed to the best of our knowledge. Based on 3GPP release for scalable numerologies and frame structures [13], we consider the resulting 2-D resource allocation problem. We address tractability and propose an algorithm with scalability. Our results suggest that considering the primal space and dual space are complementary to each other for problem solving. We show numerically that a flexible numerology and frame structure significantly outperforms the conventional scheme in both throughput enhancement and meeting mission critical services. For convenience, we use the term “flexible structure” to refer to the architecture in which both numerology and TTI are flexible. The traditional resource allocation in LTE which employs a fixed size of resource units, is referred to as “non-flexible structure”. Block 1 Block 3 Abstract—We explore the potential of optimizing resource allocation with flexible numerology in frequency domain and variable frame structure in time domain, in presence of services with different types of requirements. We analyze the computational complexity and propose a scalable optimization algorithm based on searching in both the primal space and dual space that are complementary to each other. Numerical results show significant advantages of adopting flexibility in both time and frequency domains for capacity enhancement and meeting the requirements of mission critical services. {nikolaos.pappas, di.yuan}@liu.se Frequency [email protected] Block 2 arXiv:1801.02066v1 [cs.IT] 6 Jan 2018 {lei.you}@it.uu.se Block 4 Time Figure 1. An illustration of resource allocation with three types of blocks. A rectangle of the grid is an MRU. A service is allocated with one or multiple blocks, and each block can be assigned to up to one service. Note that blocks 1 and 4 are different blocks with the same shape. II. S YSTEM M ODEL Consider a base station and two categories of services. The first category, denoted by K(ℓ) , has strict latency requirement. For any service k ∈ K(ℓ) , denote its data demand (in bit) by qk that has to be met with a latency tolerance of τk . The second category of services is denoted by K(c) , for which the target is to maximize the throughput. We define K = K(l) ∪ K(c) the set of all services. The resource in time-frequency domain consists of minimum resource units (MRUs). An MRU is characterized by its numerology and frame structure. The former is defined by sub-carrier spacing (SCS) and cyclic prefix (CP) length (a.k.a. the “guard interval” between the symbols), while the latter includes TTI duration. One resource allocation to a service involves a set of adjacent SCSs and TTIs in the frequency and time domain respectively with a configured CP length. For simplicity, hereafter we refer to the resource configuration of numerology and frame structure as blocks, and consider a candidate set B of blocks, each consisting of multiple MRUs, see Figure 1. For each b ∈ B, the achieved throughput on block b if b is assigned to service k (k ∈ K) is denoted by rb,k . Comparing to LTE that applies a fixed SCS of 15 kHz and TTI of 0.5 ms, 5G/new radio (NR) [14] permits a large number of block shapes with numerology varying from 15 kHz to 480 kHz, and TTI varying from 0.125 ms to 0.5 ms. Here, we consider the four most widely accepted block shapes, see Table I. Note that Shape 4 supports extended CP length to trade off overhead against delay spread. Given the channel profile, the transmission power, and the noise power, the throughput rb,k depends on the configuration of block b, including the time span and frequency range (characterized by SCS and TTI duration), CP length, and 2 Table I C ANDIDATE BLOCKS TTI duration (ms) SCS (kHz) Symbol duration (µs) CP (µs) Number of symbols Shape 1 0.5 15 66.7 4.7 7 Shape 2 0.25 30 33.3 2.3 7 Shape 3 0.125 60 16.7 1.2 7 Shape 4 0.125 60 16.7 4.17 6 symbol duration. We assume a total number of nine multipath channel profiles [13, Table B.2.1-4], and we predefine the mapping from the configuration parameters to the throughput based on the model in [15]. Due to limited space, and the fact that capacity model is not in the scope of this paper, we omit the details but provide the tutorial and source code in a public repository on GitHub [16]. III. P ROBLEM F ORMULATION AND T RACTABILITY Consider the problem of maximizing the total throughput for K(c) , subject to latency and the demand constraints of K(ℓ) . Denoting by I the set of MRUs, we use a binary parameter ab,i to map an MRUs i to a block b, namely, ab,i = 1 if and only if the block b includes MRU i. We use the variable xb,k ∈ {1, 0} to indicate whether block b (b ∈ B) is assigned to the service k (k ∈ K). A block b is infeasible for k (k ∈ K(ℓ) ), if the ending time of b exceeds τk . This is modeled by setting rb,k = 0. The problem is formulated as follows, where the two sets of constraints impose the bits demand requirement for K(ℓ) and state non-overlapping allocation of blocks, respectively. X X rb,k xb,k (1a) [P0] max x b∈B k∈K(c) s.t. X rb,k xb,k ≥ qk , k ∈ K(ℓ) (1b) b∈B XX ab,i xb,k ≤ 1, i ∈ I (1c) k∈K b∈B xb,k ∈ {0, 1}, b ∈ B, k ∈ K (1d) Theorem 1: P0 is N P-hard. Proof: We construct a polynomial-time reduction from the PARTITION P ROBLEM (PP) for a set of integers {d1 , . . . , dn }. The task is to determine whether or not there is Pna partition such that the two subsets have equal sum of i=1 di /2, where the numerator is assumed to be even. We define a single TTI size and multiple blocks that take the shape of one MRUs. There are two services, denoted by k ℓ and k c , ℓ in K(ℓ) and K(c) , respectively. The latency parameter Pn of k equals that of the TTI size, and the demand equals i=1 di /2. Moreover, rb,1 = rb,2 = db , b = 1, . . . , n. By construction, (1c) has no effect. Next, one can observe that partitioning the n MRUs into two subsets, each providing a total throughput P of ni=1 di /2, is equivalent to a feasible solution to PP. In addition, this can occurPif and only if the objective function n defined for k c reaches i=1 di /2. Hence the conclusion. IV. P ROBLEM S OLVING Our solution approach consists in performing assignment of blocks to services, based on utility values generated from linear programming (LP) relaxation and the Lagrangian dual (LD). For each candidate block-service assignment, the utility value is expected to reflect its priority of being considered in the resource allocation solution. We first discuss the assignment of blocks to services. Then, we discuss the derivation of the utility values by using LP and LD in Sections IV-B and IV-C, respectively. The overall algorithm selects the best output from the two methods. A. Block Assignment We denote by matrix u of size |B| × |K| the utility matrix for all pairs of blocks and services. Namely, an element ub,k represents the utility of a block-service pair (b, k) (b ∈ B and k ∈ K). Note that u is of the same dimensions as x. Block assignments for K(ℓ) and K(c) are treated separately. The former is performed first because of the latency requirement. Consider the permutation of all elements in K(ℓ) . For a given permutation, the blocks are allocated to the services sequentially according to the permutation. For each service k ∈ K(ℓ) under consideration, the block b with the highest value of ub,k is allocated. Next, all blocks sharing any MRU with b are discarded. This is repeated for service k until its demand is met. The procedure then repeats for the remaining element of K(ℓ) . In next step, resource allocation is carried out for K(c) . Here, two strategies are considered. Similar to the resource allocation for K(ℓ) shown above, the non-overlapping constraint is accounted for both the strategies in K(c) . In the first strategy, given a permutation of K(c) , blocks are sequentially allocated to each service according to the utilities. A block is allocated to a service only if the corresponding utility is larger than a threshold ρ. After completing checking all blocks for the first service in the permutation, we move to the next service, and so on. When this procedure completes for all services in K(c) , there may still be blocks not being allocated yet. Each of these blocks is then allocated to the service with highest possible utility. In the second strategy, we generate a permutation of B. According to the permutation, each block is allocated to the service with the highest utility. These two strategies will be used by the LP and LD based solution methods, respectively. Monte Carlo sampling is used for generating multiple permutations following a uniform distribution. The number of generated permutations is denoted by N . The best blockservice assignment of all the permutations is selected. B. Utility Estimation by LP Relaxation A straightforward way to compute the utility matrix u is to solve the LP relaxation of P0 and to use the LP optimum to set the utility values. X X rb,k xb,k (2a) [P0-LP] max x b∈B k∈K(c) s.t. (1b), (1c), 0 ≤ xb,k ≤ 1, b ∈ B, k ∈ K(ℓ) (2b) 3 C. Utility Estimation by LD By relaxing the constraints (1c) of P0 with Lagrangian multiplier λi (i ∈ I), the Lagrangian is defined as follows: X X X XX L(x, λ) = rb,k xb,k + λi (1 − ab,i xb,k ) i∈I b∈B k∈K(c) b∈B k∈K The LD function is defined in (3). [P1] g(λ) = max L(x, λ) s.t. (1b) and (1d). x (3) Accordingly, we have the LD problem: [P0-LD] min g(λ). λ≥0 (4) P We define αb = i∈I λi ab,i . Problem P1 decomposes for K(c) and K(ℓ) : The constraints (1b) are only for K(ℓ) . Therefore, solving P1 amounts to solving the two problems P2 and P3 for K(c) and K(ℓ) respectively, shown below. X X (rb,k − αb )xb,k (5a) [P2] max x b∈B k∈K(c) s.t. X xb,k ≤ 1, b ∈ B (5b) xb,k ∈ {0, 1}, b ∈ B, k ∈ K(c) (5c) k∈K(c) [P3] min x X X αb xb,k (6a) b∈B k∈K(ℓ) s.t. X rb,k xb,k ≥ qk , k ∈ K(ℓ) (6b) xb,k ∈ {0, 1}, b ∈ B, k ∈ K(ℓ) (6c) b∈B Note constraints (5b) are not present in P0, though these are implied by (1c) for services in K(c) . The effect of (5b) is to partially restore the fact that (1c) is relaxed by Lagrangian multiplier, thus achieving the strengthening effect without affecting the complexity of P2. Computing the optimum of P2 is straightforward. Each block b is allocated to the service arg maxk rb,k − αb with rb,k − αb > 0. (ℓ) Problem P3 further decomposes to problems P3[k] PK (ℓ) α xb,k , constraints (k ∈ K ), each with objective max b b∈B P b∈B rb,k xb,k ≥ qk , and binary variables xb,k (b ∈ B). Since there is only one service considered in each of these problems, we omit the index k in the formulation of P3[k] (k ∈ K(ℓ) ). X [P3[k]] min αb xb,k (7a) x b∈B s.t. X rb,k xb,k ≥ qk (7b) xb,k ∈ {0, 1}, b ∈ B (7c) b∈B Each P3[k] can be reformulated as a K NAPSACK P ROBLEM, by replacing every xb,k with 1 − κb,k (κb,k ∈ {0, 1}). Since rb,k and qk are integers (as they denote the amount of bits), the problem can be optimally solved by dynamic programming. Consider the P0-LD. The dual problem P0-LD can be solved using a sub-gradient method [17]. Denote by M the number of iterations in the sub-gradient method (one can also use convergence check as a candidate stopping rule). The utilities matrix u is set as follows. For K(ℓ) , the optimal solutions to P3 in all iterations are averaged. The averaged values are used as utilities for corresponding block-service pairs. We remark that constraints (5b) impose that each block is assigned to up to one service. Therefore, for k ∈ K(c) , rb,k − αb reflects the utility of block b to service k. The normalized value of rb,k − αb (ranging from 0 to 1) at the final sub-gradient iteration is then used as utility for (b, k). V. N UMERICAL R ESULTS This section numerically shows the benefit of using flexible structure, compared against the non-flexible one. In addition, we show the deviation of the solution found by our algorithm from the global optimality. The advantage of combining LP with LD for problem solving is illustrated as well. The demands and latency tolerance (deadlines) of services in K(ℓ) are set to be uniform, denoted by q and τ , respectively. Parameter settings are given in Table II. Table II S IMULATION PARAMETERS . Parameter Number of users Time-frequency domain SNR range Demand q Latency tolerance τ Sub-gradient iterations Generated permutations Threshold (Section IV-A) Value |K(ℓ) | = |K(c) | = 5 2 ms and 2 MHz [5, 30] (dB) {16, 32, 64, 128, 256, 512} (kbps) {0.125, 0.25, 0.5, 1.0, 1.5, 2} (ms) M = 200 N = 400 ρ = 0.5 Figure 2 compares the flexible structure and the non-flexible structure in terms of the throughput performance. It shows the average bit rate of services in K(c) depending on the latency tolerance τ of K(ℓ) . For the non-flexible structures, Shape 1, Shape 2, and Shape 3 in Table I are used separately. Each of these structures is referred to in the format of “TTI-SCS” (e.g. 0.25ms-30kHz means a shape of a fixed TTI of 0.25 ms and a fixed SCS of 30 kHz). We use the global optimum obtained by solving the integer programming problem (1) as the baseline for the flexible structure. The flexible structure significantly outperforms the nonflexible ones. When the latency tolerance τ is lower than 1 ms, the bit rate achieved by our proposed algorithm is at least 4 times as high as the non-flexible cases. Via flexible structure, the system tends to benefit more on throughput when the latency tolerance becomes more stringent. On average, our block assignment algorithm with flexible structure increases the throughput by 170%. Among the three non-flexible schemes, 0.25ms-30kHz outperforms the other two. Interestingly, in the case of short latency tolerance, the block with long TTI and narrow bandwidth (i.e. 0.5ms-15kHz) performs better than the one with shorter TTI and wider bandwidth (i.e. 0.125ms-60kHz). This is because the block 0.125ms-60kHz has a large span in frequency dimension, such that the flexibility in spectrum resources usage is significantly impacted. This inefficiency in 0.125ms-60kHz 400 Combined LP-Only LD-Only 0.5 0.5ms-15kHz Optimality gap Bit rate per user in K(c) (kbps) 4 0.25ms-30kHz Flexible Structure 200 0.4 0.3 0.2 0.1 0 0.25 0.5 1.0 1.5 2.0 Latency tolerance τ of K(ℓ) (ms) Figure 2. The figure shows bit rate of K(c) with respect to latency tolerance τ of K(ℓ) . The bit rate demand of K(ℓ) equals 128 kbps. All the three cases of non-flexible structures are solved to optimality. When τ = 0.25, using the block 0.5ms-15kHz results in infeasibility. 16 32 64 128 Bit rate demand of K (ℓ) 256 512 (kbps) Figure 3. The figure shows the optimality gaps of the solutions obtained by all the three schemes. For instance, “0.1” in the y-axis in Figure 3 means that the relative deviation to the optimum is 10% on average. R EFERENCES spectrum utilization can be hidden when the latency tolerance becomes relatively longer, allowing higher flexibility of the resource allocation in time domain. The results suggest that employing a flexible structure may enhance the throughput dramatically by combining the use of various block shapes. Though not shown by the figures here, we remark that the problem feasibility of the three non-flexible schemes is very sensitive to the latency tolerance. This issue is alleviated by the flexible structure. Figure 3 shows the optimality gaps of the algorithms proposed in the paper, as functions of the demand of K(ℓ) . We compare three cases: using only LP, using only LD, and combining both together. The three cases are named by “LPOnly”, “LD-Only”, and “Combined”, respectively. One can observe that the optimality gap increases with the user demand. Meanwhile, searching in the dual space for computing blockservice utilities in most cases leads to significantly better results than considering the LP relaxation. With high user demand, solving the LP relaxation is clearly inferior in terms of utility estimation. On the other hand, the accuracy is not affected too much by the demand in LD-Only. We remark that this happens in low demand cases that the LP relaxation leads to better evaluation of block-pair utilities than LD. Thus, these two are complementary to each other. Overall, the gap is below 20% for our proposed algorithm. VI. C ONCLUSION The paper concludes that combining a flexible numerology and frame structure in resource allocation serves as a promising option for increasing spectral efficiency. Both mission critical service scheduling and capacity enhancement benefit from flexible structure. The paper suggests that, though resource allocation under such a flexible structure exhibits computational hardness theoretically, searching in primal space as well as dual space enables efficient algorithms for problem solving: LP and LD are complementary together for improving the objective value towards optimality. [1] B. Soret, P. Mogensen, K. I. Pedersen, and M. C. Aguayo-Torres, “Fundamental tradeoffs among reliability, latency and throughput in cellular networks,” in IEEE Globecom Workshops, 2014, pp. 1391–1396. [2] K. Pedersen, F. Frederiksen, G. Berardinelli, and P. Mogensen, “A flexible frame structure for 5G wide area,” in IEEE VTC-Fall, 2015, pp. 1–5. [3] G. Pocovi, B. Soret, K. I. Pedersen, and P. Mogensen, “MAC layer enhancements for ultra-reliable low-latency communications in cellular networks,” in IEEE ICC Workshops, 2017, pp. 1005–1010. [4] K. Pedersen, G. Pocovi, J. Steiner, and S. Khosravirad, “Punctured scheduling for critical low latency data on a shared channel with mobile broadband,” in IEEE VTC-Fall, 2017, pp. 1005–1010. [5] Q. Liao, P. Baracca, D. Lopez-Perez, and L. G. Giordano, “Resource scheduling for mixed traffic types with scalable TTI in dynamic TDD systems,” in IEEE Globecom Workshops, 2016, pp. 1–7. [6] E. Fountoulakis, N. Pappas, Q. Liao, V. Suryaprakash, and D. Yuan, “An examination of the benefits of scalable TTI for heterogeneous traffic management in 5G networks,” in WiOpt, 2017, pp. 1–6. [7] A. Anand, G. de Veciana, and S. Shakkottai, “Joint scheduling of URLLC and eMBB traffic in 5G wireless networks,” arXiv.org, 2017. [8] L. You, L. Lei, and D. Yuan, “A performance study of energy minimization for interleaved and localized FDMA,” in IEEE CAMAD, 2014, pp. 16–20. [9] D. Yuan, J. Joung, C. K. Ho, and S. Sun, “On tractability aspects of optimal resource allocation in OFDMA systems,” IEEE Transactions on Vehicular Technology, vol. 62, no. 2, pp. 863–873, 2013. [10] Y. Zhang and C. Leung, “Resource allocation in an OFDM-based cognitive radio system,” IEEE Transactions on Communications, vol. 57, no. 7, pp. 1928–1931, 2009. [11] T. Wang, H. Feng, and B. Hu, “Two-dimensional resource allocation for OFDMA system,” in IEEE ICC Workshops, 2008, pp. 1–5. [12] Y. Ben-Shimol, I. Kitroser, and Y. Dinitz, “Two-dimensional mapping for wireless OFDMA systems,” IEEE Transactions on Broadcasting, vol. 52, no. 3, pp. 388–396, 2006. [13] 3GPP. (2017, Apr.) TS 36.101, Evolved Universal Terrestrial Radio Access (E-UTRA); User Equipment (UE) radio transmission and reception. Release 14. [Online]. Available: http://www.3gpp.org [14] ——. (2017, Sep.) TS 38.802, Study on New Radio Access Technology Physical Layer Aspects. Release 14. [Online]. Available: http://www.3gpp.org [15] M. Batariere, K. Baum, and T. P. Krauss, “Cyclic prefix length analysis for 4G OFDM systems,” in IEEE VTC-Fall, 2004, pp. 543–547. [16] L. You and Q. Liao. (2017, Nov.) GitHub. [Online]. Available: https://github.com/youlei202/Flexible TTI [17] S. Sen and H. D. Sherali, “A class of convergent primal-dual subgradient algorithms for decomposable convex programs,” Mathematical Programming, vol. 35, no. 3, pp. 279–297, 1986.
7cs.IT
Towards a Theory of Glue Simon Bliudze École Polytechnique Fédérale de Lausanne Rigorous System Design Laboratory INJ Building, Station 14, 1015 Lausanne, Switzerland [email protected] We propose and study the notions of behaviour type and composition operator making a first step towards the definition of a formal framework for studying behaviour composition in a setting sufficiently general to provide insight into how the component-based systems should be modelled and compared. We illustrate the proposed notions on classical examples (Traces, Labelled Transition Systems and Coalgebras). Finally, the definition of memoryless glue operators, takes us one step closer to a formal understanding of the separation of concerns principle stipulating that computational aspects of a system should be localised within its atomic components, whereas coordination layer responsible for managing concurrency should be realised by memoryless glue operators. 1 Introduction Component-based design is central in system engineering. Complex systems are built by assembling components. Large components are obtained by “gluing” together simpler ones. “Gluing” can be considered as an operation on sets of components. Component-based techniques have seen significant development, especially through the use of object technologies supported by languages such as C++, Java, and standards such as UML and CORBA. There exist various component frameworks encompassing a large variety of mechanisms for composing components. They focus rather on the way components interact than on their internal behaviour. We lack adequate notions of expressiveness to compare the merits and weaknesses of these frameworks. For a meaningful and systematic comparison of component frameworks to be possible, one needs a sufficiently abstract formalisation of the notions of both behaviour and glue. These notions should capture the properties essential for reasoning about system composition. Intuitively, one can think of coordination as imposing constraints on the joint behaviour of the components of the system [9, 12, 32]. Imposing coordination constraints means “reducing” the joint behaviour of the involved components. Beyond the simple definition of a component model, this requires the following two questions to be answered: • What is the behaviour of several “parallel” components without any coordination constraints? • How does one compare two behaviours? We argue that these aspects, as well as the notions of common behaviour of two components and minimal behaviour possible in a given framework, cannot be dissociated from the notion of behaviour as a whole. There are several goals, for which the work in this paper is a starting point. • There is a long-standing debate with a plethora of points of view about separation of concerns [11, 13, 14, 21, 26] and in what sense it should be respected. In [6, 8], we have advocated for an approach respecting a separation of concerns principle, whereby all “computation” performed by the system is localised within its constituent atomic components, whereas the coordination layer M. Carbone, I. Lanese, A. Silva, A. Sokolova (Eds.): 5th Interaction and Concurrency Experience (ICE’12). EPTCS 104, 2012, pp. 48–66, doi:10.4204/EPTCS.104.6 S. Bliudze 49 responsible for managing the parallelism consists of memoryless glue operators. Separation of concerns applied in the context of the BIP framework resulted in a very powerful deadlock detection tool D-Finder [5]. Furthermore, it has allowed us to reduce a hard (sometimes undecidable) problem of synthesis of reactive systems [20, 25] to a less ambitious, but more tractable design methodology [9]. This separation of concerns principle is rather fragile: in [15], it is shown that a slight extension of the BIP glue renders it Turing complete, which makes it possible to construct non-trivial systems without a single atomic component. We speculate that, in the setting proposed in the present paper, operators such as prefixing and choice are not glue operators. This hypothesis, should it be verified, would give formal grounds to our view of the separation of concern principle. • Another goal is to define a generic setting for an expressiveness study. In [7], we have proposed a first notion of glue expressiveness for component-based systems, generalising the concepts presented in [28] that guided the design of the BIP (Behaviour, Interaction, Priority) framework [4]. However, this approach lacks abstraction, since it strongly depends on the choice of the formalism for modelling both behaviour (Labelled Transition Systems; LTS) and glue (Structural Operational Semantics; SOS [24]), which makes the expressiveness comparison questionable and dependent on ad-hoc manipulation to make different frameworks comparable. For instance, in a more recent paper [9], we have proposed a slightly modified formal model of component behaviour in BIP. This entailed a corresponding modification to the definition of glue operators, which resulted in a framework only partially comparable to that in [7]. A general definition of behaviour and glue, as in the present paper, is necessary to solve this problem. • Finally, a common practice in system engineering consists in applying existing solutions (architectures) to given components to ensure behavioural properties (mutual exclusion, scheduling, communication protocols, etc.). These architectures can be modelled as composition operators. Their simultaneous application should then ensure the application of the coordination constraints imposed by both operators. Hence, it is important to understand when and how these architectures can be combined. This brings forward another question: How does one model the simultaneous application of several composition operators and what are the conditions ensuring the non-interference among them? This paper is a modest first step towards the above goals. It focuses primarily on the notions of behaviour types and composition operators defined in such a way as to allow reasoning about their essential properties in a setting sufficiently general to provide insight into how component-based systems should be modelled and compared. To allow answering the questions that we have emphasised above, a behaviour type B must explicitly comprise certain elements beyond the minimal component model such as LTS. As illustrated, for instance, by CCS and SCCS [22], different parallel composition operators can be defined on the same objects. Hence a parallel composition operator k must be defined as part of a behaviour type. In order to avoid confusion with any of the existing parallel composition operators, we use the term maximal interaction operator, since, intuitively, the operator defines the maximal set of interactions between two components in absence of coordination constraints. In order to address the question of comparing the behaviour, we require that two preorders be defined: a simulation preorder ⊑ and a semantic preorder 4. Intuitively, simulation preorder relates two components if one of them performs only actions that can also be performed by the other, thus generalising the classical simulation relation and allowing a formalisation of the notion that composing component behaviour amounts to imposing coordination constraints. The role of the semantic preorder is to relate components that behave in a similar manner, in particular, the equivalence ≃ induced by this preorder Towards a Theory of Glue 50 is a congruence with respect to composition operators, thus generalising such classical notions as ready simulation equivalence and bisimilarity. Finally, we need a meet operator ⊗, rendering (B/≃, 4, ⊗) a meet-semilattice, to talk about simultaneous application of two composition operators (Section 3.2). Let f1 and f2 be two composition operators, which we would like to apply ”simultaneously” to a behaviour B. Viewing composition operators as constraints on B, simultaneous application of the two constraints corresponds intuitively to applying their conjunction. However, this idea does not fit into the functional view of operators, since neither f1 ( f2 (B)) nor f2 ( f1 (B)) need correspond to the conjunction of the two constraints. Moreover, neither of these two behaviours need be defined, in particular, since the arity constraints of the operators are not respected in general. A more direct approach consists in considering the maximal common behaviour of f1 (B) and f2 (B), which is precisely f1 (B) ⊗ f2 (B). The paper is structured as follows. Section 2 introduces the notion of behaviour type and provides three examples: traces, LTS and coalgebras of a particular type. Section 3 presents the notion of composition operators and some of their properties. In Section 4, we discuss some related and future work, then we conclude in Section 5. 2 Behaviour types Definition 2.1 (Behaviour type). A behaviour type over B is a tuple (B, k, ⊑, 4, ⊗, 0) consisting of the following data: • A monoid (B, k, 0), where k : B 2 → B is a totally defined associative binary operator with 0 ∈ B the neutral element; • A preorder ⊑ ⊆ B × B, such that 1. it is preserved by k, i.e. for any B1 , B2 , B3 ∈ B, B2 ⊑ B3 implies B1 k B2 ⊑ B1 k B3 , 2. for any B ∈ B, holds 0 ⊑ B; • A preorder 4 ⊆ B × B and a meet operator ⊗ : B × B → B, such that 3. 4 is preserved by k, i.e. for any B1 , B2 , B3 ∈ B, B2 4 B3 implies B1 k B2 4 B1 k B3 , de f 4. (B/≃, 4, ⊗), with ≃ = 4 ∩ 4−1 , is a meet-semilattice. Elements of B are behaviours. k is the maximal interaction operator. Intuitively, B1 k B2 is the parallel composition of B1 and B2 in absence of any coordination constraints. ⊑ is the simulation preorder. It has the same meaning as the classical simulation preorder, i.e. B1 ⊑ B2 means that “B2 can perform at least the same executions as B1 ”. 4 is the semantic preorder. Intuitively, B1 4 B2 means that B2 can act as B1 in the same coordination context. B1 ⊗ B2 is the greatest behaviour realisable by both B1 and B2 . Often behaviour definition explicitly involves an interface, consisting at least of the set of actions a component can perform. In this context, it is usually assumed that a universal set of actions is given. Furthermore, it is convenient also to assume that this set is equipped with some lattice structure. A straightforward example consists in considering finite sets rather than individual actions with the lattice structure induced by set union and intersection. 2.1 Example: Traces Let A be a universal set of actions and Traces be the set of pairs B = (A, T ), where A ⊆ A is a set of actions and T ⊆ A∗ is a prefix-closed set of traces. In particular, ε ∈ T , where ε is the empty word. S. Bliudze 51 For B1 = (T1 , A1 ) and B2 = (T2 , A2 ), we define the maximal interaction operator k, as the interleaving of de f actions of the two behaviours, by putting B1 k B2 = (A1 ∪ A2 , T ), where o n de f T = w = (wi )ni=1 ∈ A∗ ∃I ⊆ [1, n] : (wi )i∈I ∈ T1 ∧ (wi )i6∈I ∈ T2 . (1) This makes (Traces, k, 0), with 0 = (0, / {ε }), a commutative monoid. Equation (1) defines the maximal interaction operator through interleaving of traces. The corresponding semantic preorder is defined through the notion of sub-sequence, which we denote ∝ and define by putting, for v, w ∈ A∗ , de f v ∝ w ⇐⇒ ∃I ⊆ [1, |w|] : v = (wi )i∈I , de f where |w| is the length of w. Furthermore, for an alphabet A and a language T , we define T ≀A = {v ∈ A∗ | ∃w ∈ T : v ∝ w} (notice that, if T ⊆ A∗ , we have T ⊆ T ≀A ). Finally, we define the semantic preorder and the operator ⊗ as follows: de f B1 4 B2 ⇐⇒ A1 ⊆ A2 ∧ T1 ⊆ T2 ≀A1 , B1 ⊗ B2 de f = (A1 ∩ A2 , T1 ≀A1 ∩A2 ∩ T2 ≀A1 ∩A2 ) , (2) (3) the preorder ⊑ coincides with 4. Clearly, for two alphabets A ⊆ B and a set of traces T , holds the equality (T ≀B )≀A = T ≀A , which implies immediately that the operator ⊗ defined by (3) is, indeed, the meet operator with respect to the preorder 4. Hence, (Traces/≃, 4, ⊗) is a meet-semilattice. To prove that (Traces, k, ⊑, 4, ⊗, 0) is a behaviour type we only have to show that condition 1 (and condition 3) of Definition 2.1 holds. Proposition 2.2. Maximal interaction operator k defined by (1) preserves the semantic preorder 4 defined by (2). Proof. For i = 1, 2, 3, let Bi = (Ai , Ti ) ∈ Traces be such that B2 4 B3 . By definition (2) of 4, we then have A2 ⊆ A3 and T2 ⊆ T3 ≀A2 . Consequently, A1 ∪ A2 ⊆ A1 ∪ A3 . Let B1 k B2 = (A1 ∪ A2 , T12 ) and B1 k B3 = (A1 ∪ A3 , T13 ), and consider w = (wi )ni=1 ∈ T12 . By (1), there exists I ⊂ [1, n] such that (wi )i∈I ∈ T1 and (wi )i6∈I ∈ T2 . Since T2 ⊆ T3 ≀A2 , there exists v ∈ T3 such that (wi )i6∈I ∝ v. Denoting by ṽ the projection of v on A1 ∪ A2 , we have ṽ ∝ v, which implies ṽ ∈ T3 ≀A1 ∪A2 . It is clear that (wi )i6∈I ∝ ṽ and that one can interleave ṽ with (wi )i∈I in such a manner that the positions of wi , for all i 6∈ I, be preserved. Denoting the obtained trace by u, we obviously obtain w ∝ u ∈ T1 ≀A1 ∪A2 T3 ≀A1 ∪A2 = T13 ≀A1 ∪A2 . Hence T12 ⊆ T13 ≀A1 ∪A2 and B1 k B2 4 B1 k B3 . 2.2 Example: Labelled Transition Systems Let again A be a universal set of actions and let LT S be the set of triples B = (Q, A, →), with Q 6= 0/ a finite a set of states, A ⊆ A a set of actions, and → ⊆ Q × 2A × Q a set of transitions. The infix notation q → q′ is commonly used to denote a transition (q, a, q′ ) ∈→. Note that, with this definition, transitions are labelled with interactions, i.e. sets of actions. This approach is particularly well suited for characterising behaviour of components that can communicate through several ports during a single transition [6]. Such behaviour naturally arises when composite components are assembled by parallel composition of subcomponents. Thus, labels are combined by set union, often denoted by juxtaposition. Towards a Theory of Glue 52 As in the previous example, we take coinciding preorders ⊑ and 4. For B1 = (Q1 , A1 , →1 ) and B2 = (Q2 , A2 , →2 ), we define the maximal interaction operator k and the semantic preorder 4 as follows. de f We put B1 k B2 = (Q1 × Q2 , A1 ∪ A2 , →), where → is the minimal transition relation satisfying the following SOS rules: a b a q2 →2 q′2 q1 →1 q′1 , a q1 q2 −→ q′1 q2 , b q1 q2 −→ q1 q′2 b q1 →1 q′1 q2 →2 q′2 a∪b q1 q2 −→ q′1 q′2 . (4) With 0 = ({1}, 0, / 0), / it is straightforward to conclude that (LT S, k, 0) is a commutative monoid. For B1 = (Q1 , A1 , →1 ) and B2 = (Q2 , A2 , →2 ), such that A1 ⊆ A2 consider the maximal simulation relation R ⊆ Q1 × Q2 such that   a b (5) q1 Rq2 =⇒ ∀q1 →1 q′1 , ∃ q′2 ∈ Q2 , b ⊆ A2 : q2 → q′2 ∧ a ⊆ b ∧ q′1 Rq′2 . The semantic preorder 4, is defined by putting B1 4 B2 iff R is total on Q1 . Finally, we define the meet operator by putting, for B1 = (Q1 , A1 , →1 ) and B2 = (Q2 , A2 , →2 ), B1 ⊗ de f B2 = (Q1 × Q2 , A1 ∩ A2 , →), where → is the minimal transition relation satisfying the rule a q1 →1 q′1 b q2 →2 q′2 a∩b q1 q2 −→ q′1 q′2 a ∩ b 6= 0/ . (6) Conditions 1–3 of the Definition 2.1 clearly hold, and, to show that (LT S, k, ⊑, 4, ⊗, 0) is a behaviour type, we only have to prove the following proposition. Proposition 2.3. (LT S/≃, 4, ⊗) is a meet-semilattice. Proof. To prove the proposition, we have to show that, for any B̃, B1 , B2 ∈ LT S, holds B1 ⊗ B2 4 B1 , B2 and B̃ 4 B1 , B2 implies B̃ 4 B1 ⊗ B2 . Let B̃ = (Q̃, Ã, →), Bi = (Qi , Ai , →) (for i = 1, 2) and B1 ⊗ B2 = (Q1 × Q2 , A1 ∩ A2 , →) as defined above (for clarity, we skip the indices on the transition relations). 1. First of all A1 ∩ A2 ⊆ A1 , A2 . By symmetry, it is sufficient to show that B1 ⊗ B2 4 B1 . Let R ⊆ (Q1 × Q2 ) × Q1 be the projection on the first component. c Consider a state q = (q1 , q2 ) ∈ Q1 × Q2 . By definition of ⊗, for any q → q′ in B1 ⊗ B2 , there exist a b transitions q1 → q′1 and q2 → q′2 such that a ∩ b = c and q′ = (q′1 , q′2 ). Hence, we have c ⊆ a and q′ Rq′1 , satisfying the implication (5) is satisfied. Since R is total on Q1 × Q2 , we have B1 ⊗ B2 4 B1 . 2. Since B̃ 4 B1 , B2 , there exist total relations Ri ⊆ Q̃ × Qi (for i = 1, 2) satisfying the implication (5). We define a relation R ⊆ Q̃ × (Q1 , Q2 ) by putting q̃R(q1 , q2 ) iff q̃Ri qi , for both i = 1, 2. Since à ⊆ A1 ∩ A2 and R is clearly total, we only have to show that (5) is satisfied. c Let q̃ ∈ Q̃ and (q1 , q2 ) ∈ Q1 × Q2 be related by R. Consider a transition q̃ → q̃′ in B̃. Since q̃Ri qi , a b for i = 1, 2, there exist two transitions q1 → q′1 and q2 → q′2 such that c ⊆ a, b and q̃′ Ri q′i . We then have c ⊆ a ∩ b and q̃′ R(q′1 , q′2 ), which satisfies (5) and proves the proposition. 2.3 Example: Coalgebras Coalgebras [27] provide a general framework for unifying various state-based behaviour models such as both deterministic and non-deterministic automata, LTS, Mealy machines, etc. The presentation below is largely inspired by that in [29]. S. Bliudze 53 Table 1: Extensions of set operations to mappings ( f : X → Y , f1 : X1 → Y1 and f2 : X2 → Y2 ) f1 × f2 : X1 × X2 → Y1 ×Y2 f1 + f2 : X1 + X2 → Y1 +Y2   (x1 , x2 ) 7→ f1 (x1 ), f2 (x2 ) x 7→ κi ( fi (x′ )) f A : XA → Y A P ω ( f ) : P ω (X ) → P ω (Y ) g 7→ f ◦ g S 7→ { f (x) | x ∈ S} Table 2: Structural induction definition of NDF ′ functors (for any set X and any mapping f : X → Y ) F(X ) F( f ) Structure of F X f F = Id B idB F =B F1 (X ) × F2(X ) F1 ( f ) × F2 ( f ) F = F1 × F2 G(X )A G( f )A F = GA P ω (G(X )) P ω (G( f )) F = P ω (G) We recall, in Table 1, the extensions from sets to mappings of the following four operations: Cartesian product X ×Y , disjoint union X +Y , exponentiation X A (set of mappings A → X ) and powerset P ω (X ) (set of finite subsets of X ). Let F be a functor on Set. An F-coalgebra is a pair (S, f : S → F(S)), where S is the set of states. The mapping f determines the transition structure of (S, f ), whereas the functor F is the type of the coalgebra. Example 2.4. Functors M = (B × Id)A , D = B × (1 + Id)A and N = B2 × P ω (Id)A , where B = {0, 1} and 1 = {∗}, are respectively the types of the coalgebraic definitions for, respectively, input-enabled Mealy machines with the input domain A and output domain B, deterministic and non-deterministic automata. For instance, in a D-coalgebra (S, f : S → D(S)), the components of the mapping f = ω × δ , and δ : S → (1+ S)A , determine, foro each state s ∈ S, whether it is a final state (mapping with ω : S → Bn ω ) and the set s, a, δ (s)(a) a ∈ A, δ (s)(a) ∈ S of transitions leaving s. The case where there is no transition labelled a leaving the state s is reflected by δ (s)(a) = ∗ ∈ 1. Notice that, in this example, we do not account for initial states of automata; determinism, here, means that only one transition is possible from any given state with a given action. We define a class NDF ′ of non-deterministic functors1 on the category Set of sets, defined by the following grammar F ::= Id | B | F × F | F A | P ω (F) , (7) where A is the universal set of actions, Id is the identity functor and B 6= 0/ is a join-semilattice with bottom. Typical examples of semilattices used to define non-deterministic functors are B = {0, 1} with 0 ∨ 1 = 1 and 0 ∧ 1 = 0; and the trivial lattice 1 = {∗}. The functors in NDF− are defined by structural induction in Table 2 (cf. also Table 1). Consider F ∈ NDF ′ and let (S1 , f1 ) and (S2 , f2 ) be two F-coalgebra. For a relation R ⊆ S1 × S2 , we 1 NDF ′ is a subclass of the class NDF of non-deterministic functors as defined, for example, in [29]. Towards a Theory of Glue 54 define a relation ≤FR ⊆ F(S1 ) × F(S2 ) by structural induction on F. For x ∈ F(S1 ) and y ∈ F(S2 ), we put   (x, y) ∈ R, if F = Id,      if F = B, x ∨ y = y, de f F F1 F2 x ≤R y ⇐⇒ x1 ≤R y1 ∧ x2 ≤R y2 , if F = F1 × F2 , x = (x1 , x2 ) and y = (y1 , y2 ),   G  ∀a ∈ A, x(a) ≤R y(a), if F = GA ,     ′ ′ ∀x ∈ x, ∃y′ ∈ y : x′ ≤G R y , if F = P ω (G). We define the simulation preorder on F-coalgebra by putting (S1 , f1 ) ⊑ (S2 , f2 ), iff there exists a relation R ⊆ S1 × S2 total on S1 and such that ∀(s1 , s2 ) ∈ R, f1 (s1 ) ≤FR f2 (s2 ). Definition 2.5 (Coalgebra homomorphism). An F-homomorphism of two F-coalgebras (S1 , f1 ) and (S2 , f2 ) is a mapping h : S1 → S2 preserving the transition structure, i.e. such that the following diagram commutes ( f2 ◦ h = F(h) ◦ f1 ) S1   f1 y h −−−−→ S2  f y2 F(S1 ) −−−−→ F(S2 ) F(h) where F(h) is the image of h by the functor F. In particular, for F ∈ NDF ′ , F(h) is defined by the second column in Table 2. Definition 2.6 (Bisimulation). Let (S1 , f1 ) and (S2 , f2 ) be two F-coalgebras. A relation R ⊆ S1 × S2 is a bisimulation iff there exists a witness mapping g : R → F(R), such that projections πi : R → Si , for i = 1, 2, are coalgebra homomorphisms, i.e. the following diagram commutes S1   f1 y π ←−−1−− R   gy π −−−2−→ S2  f y2 (8) F(S1 ) ←−−−− F(R) −−−−→ F(S2 ) F(π1 ) F(π2 ) Remark 2.7. In the context of Definition 2.6, if F = F1 × F2 , g = g1 × g2 and fi = fi1 × fi2 (i = 1, 2), the left diagram in (9) commutes, for j = 1, 2, and defines a bisimulation on Fj -coalgebras (S1 , f1j ) j and (S2 , f2 ). Similarly, for F = GA , the right diagram in (9) commutes, for all a ∈ A, and defines a bisimulation on G-coalgebras (S1 , f1 (a)) and (S2 , f2 (a)). S1  j f1 y π ←−−1−− R  gj y π −−−2−→ S2   j y f2 Fj (S1 ) ←−−−− Fj (R) −−−−→ Fj (S2 ) Fj (π1 ) Fj (π2 ) S1   f1 (a)y π ←−−1−− R   g(a)y π −−−2−→ S2   f (a) y2 (9) G(S1 ) ←−−−− G(R) −−−−→ G(S2 ) G(π1 ) G(π2 ) Lemma 2.8 ([27]). Consider coalgebras (S, f ), (S1 , f1 ) and (S2 , f2 ) with coalgebra homomorphisms g : S → S1 and h : S → S2 . The image (g, h)(S) = {(g(s), h(s)) | s ∈ S} is a bisimulation on S1 and S2 . Theorem 2.9 ([27]). The union (S2 , f2 ) is again a bisimulation. S k Rk of a family {Rk }k of bisimulations on coalgebras (S1 , f1 ) and S. Bliudze 55 Lemma 2.10. Consider F-coalgebras (S1 , f1 ), (S2 , f2 ) and (S3 , f3 ) with F ∈ NDF ′ . The composition R1 ◦ R2 of two bisimulations R1 ⊆ S1 × S2 and R2 ⊆ S2 × S3 is a bisimulation on S1 and S3 . Proof. This lemma follows immediately from the following two facts: 1) comosition of bisimulations on F-coalgebras is a bisimulation when F preserves weak pullbacks [27]; 2) NDF ′ functors preserve weak pullbacks [30]. Although Theorem 2.9 allows us to speak of the maximal bisimulation on two coalgebras, the witness mapping on this maximal bisimulation need not be unique. The following proposition provides a construction of a canonical witness mapping on a bisimulation of two coalgebras. Proposition 2.11. Consider a bisimulation R ⊆ S1 × S2 on two F-coalgebras (S1 , f1 ) and (S2 , f2 ) with F F ∈ NDF ′ . Let g1 , g2 : R → F(R) be two witness mappings. The mapping g1 ∪ g2 : R → F(R) defined below is again a witness for bisimulation R.   g1 = g2 , if F = Id or F = B    F1 F2  (g1 ∪ g1 ) × (g2 ∪ g2 ) if F = F × F , g = g1 × g2 (i = 1, 2) F 1 2 i de f i i 1  2 G 1 2 (10) g1 ∪ g2 = A   λ a. g (a) ∪ g (a) , if F = G 1 2     g1 ∪ g2 , if F = P ω (G), with g1 ∪ g2 : (s1 , s2 ) 7→ g1 (s1 , s2 ) ∪ g2 (s1 , s2 ). F Proof. To prove the proposition, we have to show that ∪ is well defined, i.e. that g1 = g2 for either F = Id F or F = B, and that projections πi : R → Si (i = 1, 2) are coalgebra homomorphisms from (R, g1 ∪ g2 ) to (Si , fi ). For F = Id, we have, g1 = (π1 ◦ g1 , π2 ◦ g1 ) = ( f1 ◦ π1 , f2 ◦ π2 ) = (π1 ◦ g2 , π2 ◦ g2 ) = g2 . For F = B, we have F(π1 ) = idB and g1 = idB ◦ g1 = f1 ◦ π1 = idB ◦ g2 = g2 . The proof that πi are coalgebra homomorphisms is by structural induction on F. It is trivial for the cases F = Id and F = B. For the cases F = F1 × F2 and F = GA , it follows immediately from Remark 2.7. Finally, for F = P ω (G), we have P ω (G)(πi ) ◦ (g1 ∪ g2 ) = (P ω (G)(πi ) ◦ g1 ) ∪ (P ω (G)(πi ) ◦ g2 ) = ( fi ◦ πi ) ∪ ( fi ◦ πi ) = ( fi ◦ πi ). We define the semantic preorder on F-coalgebras with F ∈ NDF ′ by putting (S1 , f1 ) 4 (S2 , f2 ) iff de f they have a bisimulation total on S1 . The meet operator is defined by putting (S1 , f1 ) ⊗ (S2 , f2 ) = (R, g), where R is their maximal bisimulation and g : R → F(R) is the witness mapping maximal with respect F F to ∪ defined by (10). Observe that ∪ can be applied point-wise. Furthermore, for each (s1 , s2 ) ∈ S1 × S2 , there is only a finite number of possible values for the bisimulation witness mapping. Hence, (R, g) is defined uniquely. Proposition 2.12. (SetNDF ′ /≃, 4, ⊗) is a meet-semilattice, where SetNDF ′ is the category of F-coalgebra with F ∈ NDF ′ . Proof. First of all, Lemma 2.10 implies the transitivity of 4. To complete the proof, we must show that, in the above context, (R, g) is, indeed, the meet of (S1 , f1 ) and (S2 , f2 ). Let (S, f ) be an F-coalgebra such that (S, f ) 4 (Si , fi ), for i = 1, 2. Then there exist two corresponding coalgebras (Ri , gi ) such that each Ri ⊆ S × Si is a bisimulation on (S, f ) and (Si , fi ) total on S. Since R1 and R2 are total on S, and since R is maximal, R is total on the image R1 (S) ⊆ S1 . Towards a Theory of Glue 56 Since both idR and the projection π : R → S1 are coalgebra homomorphisms (the latter by definition of bisimulation), Lemma 2.8 implies that the image (π , idR )(R) is a bisimulation on (S1 , f1 ) and (R, g). Moreover, it is total on R1 (S). We conclude, by observing that, by Lemma 2.10, R1 ◦ (π , idR ) is a bisimulation on (S, f ) and (R, g), total on S, i.e. (S, f ) 4 (R, g).2 In the general case, the subject of coalgebra composition has been considered, for example, in [3, 17]. Here we provide, for a functor F ∈ NDF ′ , an example of the F-coalgebra composition operator along the lines of [17]. We define the maximal interaction operator k by putting, for any two F-coalgebras (S1 , f1 ) and (S2 , f2 ), de f (S1 , f1 ) k (S2 , f2 ) = (S1 × S2 , f1 k f2 ) , (11) with ( f1 k f2 ) : S1 × S2 → F(S1 × S2 ) F (s1 , s2 ) 7→ f1 (s1 ) ⊲⊳ f2 (s2 ) , (12) S1 ,S2 F ⊲⊳ : F(X ) × F(Y ) → F(X × Y ) is defined by structural induction on F. For any x ∈ F(X ) and where X,Y y ∈ F(Y ), we put   (x, y),       x ∨ y,      F  F2 1 F de f x1 ⊲⊳ y1 , x2 ⊲⊳ y2 , ⊲⊳ y = x X,Y X,Y  X,Y    G   λ a. x(a) ⊲⊳ y(a) ,   X,Y  n G o   ′  x′ ⊲⊳ y x′ ∈ x, y′ ∈ y , X,Y if F = Id, if F = B, if F = F1 × F2 , x = (x1 , x2 ) and y = (y1 , y2 ), (13) if F = GA . if F = P ω (G). As it has been observed in [17], the composition operator defined by (11) and (12) is well-behaved, F provided that ⊲⊳ is a natural transformation of functors from F × F to F. In particular, this would guarantee that this composition operator preserves coalgebra homomorphisms and, consequently the semantic preorder defined above. F Proposition 2.13. ⊲⊳ is a natural transformation from F × F : Set2 → Set to F : Set2 → Set. Proof. We prove, by structural induction on F that, for any morphism h = (h1 × h2 ) : X ×Y → X ′ ×Y ′ , the diagram F ⊲⊳ X,Y F(X ) × F(Y ) −−−−→ F(X ×Y )   F(h)  (F×F)(h)y y F(X ′ ) × F(Y ′ ) −−−−→ F(X ′ ×Y ′ ) F ⊲⊳ ′ ′ X ,Y 2 Observe that the maximality of g is only used to prove the uniqueness of (R, g). Thus, (S, f ) 4 (R, g′ ), for any witness mapping g′ : R → F(R). S. Bliudze 57 is commutative, i.e. that, for any x ∈ F(X ) and y ∈ F(Y ), holds  F  F ⊲⊳ y F(h2 )(y) . F(h1 × h2 ) x X,Y = F(h1 )(x) ⊲⊳ ′ ′ (14) X ,Y Case 1. (F = Id)  Id  Id Id(h2 )(y) . Id(h1 × h2 ) x ⊲⊳ y = (h1 × h2 )(x, y) = (h1 (x), h2 (y)) = Id(h1 )(x) ⊲⊳ ′ ′ X,Y X ,Y Case 2. (F = B)  B  B B(h1 × h2 ) x ⊲⊳ y = idB (x ∨ y) = x ∨ y = idB (x) ∨ idB (y) = B(h1 )(x) ⊲⊳ B(h2 )(y) . ′ ′ X ,Y X,Y Case 3. (F = F1 × F2 ) Let x = (x1 , x2 ) and y = (y1 , y2 ).   F1 ×F2 ⊲⊳ (y1 , y2 ) = (F1 × F2 )(h1 × h2 ) (x1 , x2 ) X,Y  F  F ⊲⊳1 y1 , x2 ⊲⊳2 y2 = (F1 (h1 × h2 ) × F2 (h1 × h2 )) x1 X,Y X,Y    F   F 1 ⊲⊳ y1 , F2 (h1 × h2 ) x2 ⊲⊳2 y2 = F1 (h1 × h2 ) x1 X,Y X,Y   F2 F1 ⊲⊳ F (h )(y ) F (h )(y ), F (h )(x ) = F1 (h1 )(x1 ) ⊲⊳ 2 2 2 1 2 1 2 1 2 X ′ ,Y ′ X ′ ,Y ′   F ×F   1 2 = F1 (h1 )(x1 ), F2 (h1 )(x2 ) ⊲⊳ F (h )(y ), F (h )(y ) 1 2 1 2 2 2 ′ ′ X ,Y F ×F 1 2 (F1 × F2 )(h2 )(y1 , y2 ) = (F1 × F2 )(h1 )(x1 , x2 ) ⊲⊳ ′ ′ by (13) and the definition in Table 2 by the definition in Table 1 by the induction hypothesis by (13) by the definition in Table 1. X ,Y Case 4. (F = GA )  A  G GA (h1 × h2 ) x ⊲⊳ y = X,Y   G = G(h1 × h2 ) ◦ λ a. x(a) ⊲⊳ y(a) X,Y    G ⊲⊳ y(a) = λ a. G(h1 × h2 ) x(a) X,Y   G = λ a. G(h1 )(x(a)) ⊲⊳ G(h )(y(a)) 2 X ′ ,Y ′  GA    λ a.G(h )(y(a)) = λ a.G(h1 )(x(a)) ⊲⊳ 2 ′ ′ by (13) and the definitions in Tables 1 and 2 GA (h2 )(y) = GA (h1 )(x) ⊲⊳ ′ ′ by the definitions in Tables 1 and 2. X ,Y GA X ,Y by the definition of function composition by the induction hypothesis by (13) Towards a Theory of Glue 58 Case 5. (F = P ω (G))   P ω (G) P ω (G)(h1 × h2 ) x ⊲⊳ y = X,Y   G  x′ ∈ x  = G(h1 × h2 ) x′ ⊲⊳ y′ X,Y y′ ∈ y o n G ′ x′ ∈ x G(h )(y ) = G(h1 )(x′ ) ⊲⊳ 2 y′ ∈ y X ′ ,Y ′   ′′ ′ ′ G ′′ x ∈ {G(h1 )(x ) | x ∈ x} ′′ ⊲⊳ = x ′ ′y y′′ ∈ {G(h2 )(y′ ) | y′ ∈ y} X ,Y   ′′ G ′′ ⊲⊳ ′′ x ∈ P ω (G(h1 ))(x) = x ′ ′y y′′ ∈ P ω (G(h2 ))(y) X ,Y P ω (G) = P ω (G)(h1 )(x) ⊲⊳ P ω (G)(h2 )(y) ′ ′ X ,Y by (13) and the definitions in Tables 1 and 2 by induction hypothesis by the definition in Table 1 by (13) and the definition in Table 2. Finally, we put 0F = (1, fF0 ), with fF0 : 1 → F(1) defined, once again, by structural induction on F: fF0 (∗) de f =   ∗,     ⊥, ( fF01 (∗), fF02 (∗)),    λ a. fG0 (∗),     0 { fG (∗)}, if F if F if F if F if F = Id, = B, = F1 × F2 , = GA , = P ω (G), where ⊥ ∈ B is the bottom of B. Clearly, taken together, the elements defined in this section form a behaviour type over the family of F-coalgebras. 3 Behaviour composition 3.1 Composition operators Assume that a behaviour type (B, k, ⊑, 4, ⊗, 0) is given. Definition 3.1 (Composition operator). An n-ary operator f : B n → B is a composition operator iff it satisfies the following properties, for any B1 , . . . , Bn , B̃ ∈ B: 1. f (B1 , . . . , Bn ) ⊑ B1 k · · · k Bn , 2. For any i ∈ [1, n], Bi 4 B̃ implies f (B1 , . . . , Bi , . . . , Bn ) 4 f (B1 , . . . , B̃, . . . , Bn ). We denote by C the set of all composition operators. C = n-ary composition operators. S n≥1 C (n) , where C (n) is the set of all Among the immediate consequences of the above definition, one should notice the following facts. Lemma 3.2. 1. The equivalence relation ≃ = 4 ∩ 4−1 is a congruence with respect to composition operators; S. Bliudze 59 2. The maximal interaction operator k is a composition operator; 3. For any B1 , B2 ∈ B, one has B1 ⊑ B1 k B2 . Proof. The first two statements of the lemma are trivial. The third one is proven by observing that 0 ⊑ B2 and, consequently, B1 ≃ B1 k 0 ⊑ B1 k B2 . Definition 3.3 (Composition of operators). For an n-ary operator f1 : B n → B, an m-ary operator f2 : B m → B, and i ∈ [1, n], the (n + m − 1)-ary operator f1 ◦i f2 is defined by   ( f1 ◦i f2 ) B1 , . . . , Bn+m−1 de f =   f1 B1 , . . . , Bi−1 , f2 (Bn , . . . , Bn+m−1 ), Bi , . . . , Bn−1 . (15) Lemma 3.4. A composition of two composition operators is also a composition operator. Example 3.5 (BIP interaction model). A convenient way of defining composition operators is through the use of SOS rules. For example, consider the behaviours specified by LTS (see Section 2.2). In the BIP interaction model [6], given γ ⊆ 2A , the corresponding n-ary composition operator is defined on de f behaviours Bi = (Qi , Ai , →i ), for i ∈ [1, n], by putting γ (B1 , . . . , Bn ) = (∏ni=1 Qi , ni=1 Ai , →), where → is the minimal transition relation satisfying the following set of SOS rules   n o o n S ai   ′ ′   qi = qi qi →i qi i∈I ai = a i6∈I i∈I a∈γ . (16) a   ′ ′   q1 . . . qn −→ q1 . . . qn S Proposition 3.6. Any operator f defined as above is a composition operator on LTS. Proof. We have to show that f preserves the preorder 4. By symmetry, it is sufficient to prove that, for B1 4 B˜1 and B2 , . . . , Bn , we have f (B1 , B2 , . . . , Bn ) 4 f (B˜1 , B2 , . . . , Bn ). First of all, since A1 ⊆ A˜1 , we S S have ni=1 Ai ⊆ A˜1 ∪ ni=2 Ai . Since B1 4 B˜1 , there exists a relation R 1 ⊆ Q1 × Q̃1 total on Q1 and satisfying (5). We can then define a relation R ⊆ (Q1 × ∏ni=2 Qi ) × (Q̃1 × ∏ni=2 Qi ), by putting (q1 , q2 , . . . , qn )R(q˜1 , q′2 , . . . , q′n ) iff a q1 R 1 q˜1 and qi = q′i , for i ∈ [2, n]. This relation is clearly total. Let q1 q2 . . . qn → q′1 . . . q′n be a transition in f (B1 , B2 , . . . , Bn ) and let q1 R 1 q˜1 . By definition of the operator f , this transition must be inferred by S a the rule (16) from a set of transitions {qi →i i q′i }i∈I with a = i∈I ai . If 1 6∈ I, then clearly q1 = q′1 and the a corresponding transition q˜1 q2 . . . qn → q˜1 q′2 . . . q′n is possible in f (B˜1 , B2 , . . . , Bn ). If 1 ∈ I, by (5), there b exists a transition q˜1 →1 q˜1 ′ such that a1 ⊆ b1 and q′1 R 1 q˜1 ′ . Hence, a = a1 ∪ b b and, by (16), q˜1 q2 . . . qn → q˜1 ′ q2 . . . qn , which proves the proposition. S i∈I\{1} ai ⊆ b∪ S i∈I\{1} ai de f = Example 3.7 (Negative premises). Consider the family of SOS operators with negative premises, that is defined by the rules of the form n bkj a qi →i i q′i i ∈ I o n o qi = q′i i 6∈ I n a bkj q j 6−→ j j ∈ J, k ∈ K j q1 . . . qn −→ q′1 . . . q′n o a= S i∈I ai , (17) where q j 6−→ j means that there is no transition labelled bkj possible from the state q j of behaviour B j . Towards a Theory of Glue 60 It is easy to see that such operators do not preserve simulation relation 4 and therefore are not composition operators on the LTS behaviour type as defined in Section 2.2. An adaptation of the ready simulation relation from the initial proposition by Bloom [10] is necessary to obtain a behaviour type, for which such operators would, indeed, be composition operators. Let us now revisit the separation of concerns principle mentioned in the introduction. In our context, this principle consists in separating the computation of a system from the application of glue operators coordinating its atomic components. Intuitively, this means that no additional behaviour should be introduced by application of a glue operator. Not only glue operators are limited to restricting the behaviour of atomic components by imposing coordination constraints (cf. condition 1 of Definition 3.1), but, on top of that, they should be memoryless. Intuitively, this corresponds to requiring that two conditions be satisfied: 1) the glue operator should not add state to the coordinated system and 2) the actions possible in a global state of the composed system are completely determined by the properties of the corresponding states of the constituent subsystems. The latter condition is justified by the fact that a memoryless operator is unaware of any states of the system other than the current one. In order to impose these additional requirements, we need a formal notion of state, provided precisely by coalgebras. Definition 3.8. Let F be a Set-functor. An n-ary composition operator gl on a behaviour type over the family of F-coalgebras is a glue operator iff there exists a natural transformation sync : F n → F, such that, for any set {Bi = (Si , fi ) | i ∈ [1, n]} of F-coalgebras, gl(B1 , . . . , Bn ) = (S, f ) with S = ∏ni=1 Si and f (s) = sync( f1 (s1 ), . . . , fn (sn )), for all s = (s1 , . . . , sn ) ∈ S. We now consider two classical operators, namely the prefixing operator and choice. The former is a unary operator, which consists in executing a given action before “running” the behaviour to which the prefixing is applied. The latter is an associative and commutative binary operator, which consists in running exactly one of the behaviours to which it is applied. In order to implement either of these two operators, one has to ”remember” that, respectively, the initial transition or the choice of the two components has been made, thus adding state to the composed system. For behaviour types based on coalgebras, the binary choice operator + can be formally defined as de f the coproduct functor on the category of coalgebras, i.e. (S1 , f1 ) + (S2 , f2 ) = (S1 + S2 , f1 + f2 ). Hypothesis 3.9. Let F be a Set-functor weakly preserving pullbacks. In a behaviour type over Fcoalgebras with the semantic preorder defined as in Section 2.3 there is no glue operator gl, in the sense of Definition 3.8, such that gl ≃ +. To formulate a similar hypothesis for the prefixing operator, a notion of initial state is necessary. Although such a notion is provided by pointed coalgebras, we omit this discussion in this paper. Notice also the distinction between choice and interleaving. The former consists in choosing once and for all the behaviour to run, whereas the latter makes this choice independently at each execution step. 3.2 Combining composition operators Although composition of operators introduced in Definition 3.3 allows to combine several operators hierarchically, it does not allow “simultaneous” application of the constraints imposed by two operators. Example 3.10 (Simultaneous application of two operators). Indeed, consider, for example, for i ∈ [1, 4], Bi = (Qi , Ai , →) ∈ LT S (see Section 2.2) and four given actions ai , such that ai ∈ Ai and ai 6∈ A j for i 6= j. Consider also two quaternary composition operators f1 , f2 ∈ C (4) , such that the action of f1 consists in synchronising the actions a1 and a2 (cf. Example 3.5) of the first two components it is applied S. Bliudze 61 to, whereas f2 synchronises the actions a3 and a4 of the last two of its arguments. More precisely, f1 (B1 , B2 , B3 , B4 ) = γa1 a2 (B1 , B2 ) k B3 k B4 and f2 (B1 , B2 , B3 , B4 ) = B1 k B2 k γa3 a4 (B3 , B4 ), where the binary operator γa , parametrised by an interaction a (here, a = a1 a2 , for f1 , and a = a3 a4 , for f2 ) is defined by the following rules, x and y being action variables, x x x y q1 → q′1 q2 → q′2 x, y 6∈ a q2 → q′2 x 6∈ a q1 → q′1 x 6∈ a , , , x x x∪y ′ ′ ′ ′ q1 q2 −→ q1 q2 q1 q2 −→ q1 q2 q1 q2 −→ q1 q2 o o n n a∩A qi = q′i a ∩ Ai = 0/ qi −→i q′i a ∩ Ai 6= 0/ . a q1 q2 −→ q′1 q′2 (18) (19) Intuitively, simultaneous application of f1 and f2 to any components B1 , B2 , B3 , B4 should enforce, on one hand, the synchronisation of a1 and a2 in B1 and B2 respectively, and, on the other hand, the synchronisation of respectively a3 and a4 in B3 and B4 . However, the result f1 (B1 , B2 , B3 , B4 ) of applying f1 is a single component, to which f2 cannot be applied any more, since the latter is a quaternary operator. Furthermore, considering the specification of the γa operator above as “enforcing the synchronisation of actions belonging to the interaction a”, one would expect the simultaneous application of γa1 a2 and γa3 a4 to any set of behaviours to achieve the same effect as above, without having to explicitly define operators f1 and f2 and avoiding the associated problem discussed in the previous paragraph. First of all, the semantic preorder 4 and the operator ⊗ can be canonically extended to composition operators, provided they have the same arity: for any n ≥ 1 and gl1 , gl2 ∈ C (n) ,   de f f1 4 f2 ⇐⇒ ∀B1 , . . . , Bn ∈ B, f1 (B1 , . . . , Bn ) 4 f2 (B1 , . . . , Bn ) , (20) de f ∀B1 , . . . , Bn ∈ B, ( f1 ⊗ f2 )(B1 , . . . , Bn ) = f1 (B1 , . . . , Bn ) ⊗ f2 (B1 , . . . , Bn ) . (21) Proposition 3.11. (C (n) /≃, 4, ⊗) is a meet-semilattice. Proof. Let f1 , f2 ∈ C (n) be two composition operators and consider f ∈ C (n) such that f1 ⊗ f2 4 f 4 f1 , f2 . The right-hand relation implies that, for any B ∈ B, f (B) 4 f1 (B) ⊗ f2 (B) = ( f1 ⊗ f2 )(B). Hence f 4 f1 ⊗ f2 and, together with the left-hand relation, this implies f ≃ f1 ⊗ f2 . Example 3.12 (Preorder on SOS operators). Consider once again the LT S behaviour type defined in Section 2.2 and the corresponding family of composition operators defined by (16) in Example 3.5. Identifying each operator with the set of its defining SOS rules, it follows directly from [7, Lemma 3] that, for two such operators f1 and f2 , f1 4 f2 is equivalent to f1 ⊆ f2 . Hence, f1 ⊗ f2 = f1 ∩ f2 . Going back to Example 3.10, ( f1 ⊗ f2 )(B1 , B2 , B3 , B4 ) represents the behaviour where both the actions of B1 are synchronised with those of B2 , and the actions of B3 are synchronised with those of B4 , as defined respectively by f1 and f2 . In order to allow application of a given composition operator to any set of component behaviours with cardinality at least the arity of the composition operator in question, we introduce below the arity extension for composition operators. Definition 3.13. The arity extension of an n-ary composition operator f ∈ C (n) to arity m ≥ n is the composition operator f (m) ∈ C (m) defined by putting, for all B1 , . . . , Bn ∈ B,  O  de f f Bσ (1) , . . . , Bσ (n) k Bσ (n+1) k · · · k Bσ (m) , (22) f (m) (B1 , . . . , Bn ) = σ ∈Sm Towards a Theory of Glue 62 where Sm is the group of all permutations of [1, m]. The right-hand side of (22) consists in simultaneously applying f to all possible subsets of n components. For operators f1 and f2 of Example 3.10, we have f1 = (γa1 a2 )(4) and f2 = (γa3 a4 )(4) . Lemma 3.14 (Isotony of arity extension). Arity extension preserves the semantic preorder, that is, for any f1 , f2 ∈ G(n) and m ≥ n, f1 4 f2 implies f1 (m) 4 f2 (m) . Example 3.15 (Disjoint behaviours). Going back to Example 3.10 of Section 3.2 and considering that, for i 6= j, ai 6∈ A j , one can see that f1 ⊗ f2 ≃ γa1 a2 (4) ⊗ γa3 a4 (4) ≃ (γa1 a2 ⊗ γa3 a4 )(4) . The assumption that, for i 6= j, ai 6∈ A j is essential here. It guarantees that the operators γa1 a2 and γa3 a4 do not interfere with the behaviour of components B3 , B4 and B1 , B2 respectively. Precise characterisation of such a notion of non-interference will be an important part of our future work. 3.3 Symmetrical composition operators Notice that the operator f (m) defined by (22) is symmetrical in the sense of the following definition. Definition 3.16. An operator f : X n → Y is called symmetrical iff, for any permutation σ ∈ Sn and any x1 , . . . , xn ∈ X , holds the equation f (x1 , . . . , xn ) = f (xσ (1) , . . . , xσ (n) ). Clearly, an operator f ∈ C (n) is symmetrical iff f ≃ f (n) . Furthermore, for symmetrical operators, one can also unambiguously define the arity reduction. Definition 3.17. The arity reduction of a symmetrical n-ary composition operator f ∈ C (n) to arity m ≤ n is the composition operator f (m) ∈ C (m) defined by putting, for all B1 , . . . , Bm ∈ B, f (m) (B1 , . . . , Bn ) de f = f (B1 , . . . , Bn , 0, . . . , 0) . (23) Given a symmetrical operator f ∈ C , one can combine both concepts—arity extension and reduction— de f to define the operator f˜ : P ω (B) → B, by putting, for any finite subset B ⊆ B, f˜(B) = f (|B|) (B). Observe that several popular parallel composition operators, such as the ones used in CCS [23], CSP [18] and BIP [6], are symmetrical. 4 Discussion and related work The complete bibliography, as related to the motivations behind the present paper, is yet to be established. However, several contributions can already be mentioned. Based on the same observations about the importance of studying glue as a first-class notion, Abstract Behavior Types (ABM) were proposed in [2] guiding the design of the Reo language. ABT propose to characterise components as channels (or dataflow transformers) that do not provide any information as to the manner in which the defining transformations are computed. This approach is radically different from the one taken in the present paper, since the main emphasis is put on one aspect of component behaviour (namely the dataflow transformation) and its expressive power with regards to assembling more complex transfer functions. In particular composition of channels boils down to pipeline assembly. Although, ABT are likely to provide another interesting case study for the behaviour types we propose, they lack the abstraction necessary to model a larger class of behaviour as intended here. S. Bliudze 63 It would be interesting to further verify the robustness of the proposed framework by defining behaviour types based on interface [1] or modal [19] automata, whereof the particularity is that the corresponding standard refinement relations are contravariant as opposed to the examples of this paper. Furthermore, although all the examples provided in this paper can be interpreted as state-based behaviour types and, therefore, modelled as coalgebras of the appropriate types, the intention is to keep the abstraction level sufficiently high in order to be able to accommodate for behaviour types that do not have a clearly identifiable notion of state. In particular, it would be interesting to investigate applicability of this framework to continuous time systems as modelled in Simulink3 or Modelica4 . As mentioned above, most—if not all—behaviour types, of interest for the author of this paper, can be modelled as coalgebras of a suitable type. Since their introduction as a model for system behaviour, coalgebras have been subject to extensive studies. It seems, however, that most of these studies were focusing primarily on coalgebras as a way to model individual component behaviour. Although, in [3, 17], coalgebra composition has been addressed in a much more general form than in the present paper, some questions remain unanswered: What is the class of coalgebra types, for which a meaningful maximal interaction operator can be constructively defined? How does one characterise the composition operators other than maximal interaction? The latter question is related to the work presented in [16, 31], where GSOS-style operational semantics is studied from the categorical point of view. Last but not least, an important subject that we have mentioned in this paper and that we are planning to address as part of our future work is the interference between glue operators. Consider two glue operators gl1 and gl2 , and a family of behaviours {Bi }ni=1 . Assume, furthermore, that, for i = 1, 2, gli (n) (B1 , . . . , Bn ) satisfies some given property Pi . What conditions have to be satisfied by gl1 and gl2 , on one hand, and {Bi }ni=1 , on the other hand, for any of the composite behaviours gli (1) (gl j (n) (B1 , . . . , Bn )) (i 6= j), (gl1 ⊗ gl2 )(n) (B1 , . . . , Bn ), etc. to satisfy P1 ∧ P2 ? Given computable representations of gl1 and gl2 how does one compute the operator imposing P1 ∧ P2? The latter question was partially addressed in Example 3.12 of Section 3.2. Furthermore, our result in [7] suggests that this example can be generalised, on a suitable behaviour type, to SOS operators with negative premises. Can a similar result be obtained for a larger class of coalgebras types? A first, naı̈ve approach consists in defining a class of distributive behaviour types characterised by the distributivity of their maximal interaction operator over the meet operator, that is, for any B1 , B2 , B3 ∈ B, (B1 ⊗ B2 ) k B3 ≃ (B1 k B3 ) ⊗ (B2 k B3 ) . It is easy to see that distributivity of a behaviour type implies that of the arity extension of composition operators over the meet operator: for any f1 , f2 ∈ C (n) and m ≥ n, ( f1 ⊗ f2 )(m) ≃ f1 (m) ⊗ f2 (m) . Assuming that we know how to compute f1 ⊗ f2 , we can then reasonably expect the obtained operator to satisfy both properties imposed by f1 and f2 . Although none of behaviour types considered in this paper appear to be distributive, all the counterexamples we have considered while preparing the paper were based on the fact that several components shared certain actions. As illustrated by Example 3.15 of Section 3.2, “local distributivity” can be achieved provided the “absence of conflicts” in the component interfaces. An important question to be addressed in the future work is: How can these notions of “local distributivity” and “absence of conflicts” be formalised and generalised to larger classes of behaviour types? 3 http://www.mathworks.com/products/simulink/ 4 http://www.modelica.org/ Towards a Theory of Glue 64 5 Conclusion The goal of this paper was to make a first step towards the definition of a formal framework for studying behaviour composition in a setting sufficiently general to provide insight into how the component-based systems should be modelled and compared. We have proposed the notions of behaviour type and composition operator, which, while striving for generality, allow to capture some essential properties expected when reasoning intuitively about component composition. We have illustrated the notion of behaviour type on three examples, namely Traces, Labelled Transition Systems and F-coalgebras with a restricted class of non-deterministic functors. In the framework proposed in this paper, a behaviour type is a tuple (B, k, ⊑, 4, ⊗, 0), where B is the set of underlying behaviours (Traces, Labelled Transition Systems, Coalgebras, etc.); k is the maximal interaction operator defining the joint behaviour of two components without any coordination constraints; ⊑ and 4 are two preorders used respectively to represent “containment”, or simulation, relation between two behaviours and the semantic relation reflecting the fact that one component can be substituted by another one while essentially preserving the intended behaviour. The relation ≃ = 4 ∩ 4−1 is a congruence for composition operators. The example provided in Section 2.3 supports our idea that these two preorders need not necessarily be the same. We require that (B/≃, 4, ⊗) be a meetsemilattice, whereby the meet operator ⊗ identifies the common behaviour of two components. Finally, the notion of zero behaviour 0 serves as a “sanity check” for the behaviour type. Intuitively, it represents a component that does nothing. On one hand, it should not influence the behaviour of other components when placed in parallel (for any B ∈ B, B k 0 ≃ B) and, on the other hand, it should be simulated by all other behaviours (for any B ∈ B, 0 ⊑ B). The requirement that the semantic preorder of a given behaviour type induce a meet-semilattice structure has allowed us to define a meet of composition operators, representing their simultaneous application to a given set of behaviours and, consequently, to extend any composition operator to a symmetrical one, applicable to any finite set of behaviours. This, together with the definition of memoryless glue operators, takes us one step closer to a formal understanding of the separation of concerns principle that we have advocated in our previous papers, and which stipulates that the computational aspects of the system should be localised in the atomic components, whereas the coordination layer responsible for managing concurrency should be realised by memoryless glue operators. Finally, we have discussed some related work and key questions, arising from the proposed framework, that are important for the understanding of fundamental principles of component-based design. Acknowledgements I would like to express my gratitude to the anonymous reviewers for the instructive discussion on the ICE 2012 forum. I would also like to thank Ana Sokolova and Alexandra Silva for the discussion after the workshop and the pointers to the literature allowing me to include the powerset functor in Section 2.3. References [1] Luca de Alfaro & Thomas A. Henzinger (2001): Interface automata. SIGSOFT Softw. Eng. Notes 26(5), pp. 109–120, doi:10.1145/503271.503226. [2] Farhad Arbab (2005): Abstract Behavior Types: A foundation model for components and their composition. Sci. Comput. Program. 55(1–3), pp. 3–52, doi:10.1016/j.scico.2004.05.010. S. Bliudze 65 [3] Luı́s Soares Barbosa (2000): Components as Processes: An Exercise in Coalgebraic Modeling. In Scott F. Smith & Carolyn L. Talcott, editors: FMOODS, IFIP Conference Proceedings 177, Kluwer, pp. 397–418. [4] Ananda Basu, Marius Bozga & Joseph Sifakis (2006): Modeling Heterogeneous Real-time Components in BIP. In: 4th IEEE Int. Conf. on Software Engineering and Formal Methods (SEFM06), pp. 3–12, doi:10. 1109/SEFM.2006.27. Invited talk. [5] Saddek Bensalem, Andreas Griesmayer, Axel Legay, Thanh-Hung Nguyen, Joseph Sifakis & Rongjie Yan (2011): D-Finder 2: towards efficient correctness of incremental design. In: Proceedings of the 3rd international conference on NASA Formal methods, NFM’11, Springer-Verlag, Berlin, Heidelberg, pp. 453–458, doi:10.1007/978-3-642-20398-5_32. Available at http://dl.acm.org/citation.cfm? id=1986308.1986344. [6] Simon Bliudze & Joseph Sifakis (2007): The Algebra of Connectors — Structuring Interaction in BIP. In: Proc. of the EMSOFT’07, ACM SigBED, pp. 11–20, doi:10.1145/1289927.1289935. [7] Simon Bliudze & Joseph Sifakis (2008): A Notion of Glue Expressiveness for Component-Based Systems. In Franck van Breugel & Marsha Chechik, editors: CONCUR 2008, LNCS 5201, Springer, pp. 508–522. [8] Simon Bliudze & Joseph Sifakis (2010): Causal semantics for the algebra of connectors. Formal Methods in System Design 36(2), pp. 167–194, doi:10.1007/s10703-010-0091-z. [9] Simon Bliudze & Joseph Sifakis (2011): Synthesizing Glue Operators from Glue Constraints for the Construction of Component-Based Systems. In Sven Apel & Ethan Jackson, editors: 10th International Conference on Software Composition, LNCS 6708, Springer, pp. 51–67, doi:10.1007/978-3-642-22045-6_ 4. [10] Bard Bloom (1989): Ready Simulation, Bisimulation, and the Semantics of CCS-Like Languages. Ph.D. thesis, Massachusetts Institute of Technology. [11] Roberto Bruni, Ivan Lanese & Ugo Montanari (2006): A basic algebra of stateless connectors. Theor. Comput. Sci. 366(1), pp. 98–120, doi:10.1016/j.tcs.2006.07.005. [12] Dave Clarke, José Proença, Alexander Lazovik & Farhad Arbab (2009): Deconstructing Reo. ENTCS 229(2), pp. 43–58, doi:10.1016/j.entcs.2009.06.028. [13] Paul C. Clements (1995): From Subroutines to Subsystems: Component-Based Software Development. The American Programmer 8(11). [14] Geoff Coulson, Gordon Blair, Paul Grace, Francois Taiani, Ackbar Joolia, Kevin Lee, Jo Ueyama & Thirunavukkarasu Sivaharan (2008): A generic component model for building systems software. ACM Trans. Comput. Syst. 26(1), pp. 1:1–1:42, doi:10.1145/1328671.1328672. [15] Cinzia Di Giusto & Jean-Bernard Stefani (2011): Revisiting Glue Expressiveness in Component-Based Systems. In Wolfgang De Meuter & Gruia-Catalin Roman, editors: COORDINATION, Lecture Notes in Computer Science 6721, Springer, pp. 16–30, doi:10.1007/978-3-642-21464-6_2. [16] Ichiro Hasuo (2011): The Microcosm Principle and Compositionality of GSOS-Based Component Calculi. In Andrea Corradini, Bartek Klin & Corina Cı̂rstea, editors: CALCO, Lecture Notes in Computer Science 6859, Springer, pp. 222–236, doi:10.1007/978-3-642-22944-2_16. [17] Ichiro Hasuo, Bart Jacobs & Ana Sokolova (2008): The Microcosm Principle and Concurrency in Coalgebra. In Roberto M. Amadio, editor: FoSSaCS, LNCS 4962, Springer, pp. 246–260, doi:10.1007/ 978-3-540-78499-9_18. [18] C. A. R. Hoare (1985): Communicating Sequential Processes. Prentice Hall International Series in Computer Science, Prentice Hall. [19] Kim Larsen, Ulrik Nyman & Andrzej Wa̧sowski (2007): Modal I/O Automata for Interface and Product Line Theories. In Rocco De Nicola, editor: Programming Languages and Systems, Lecture Notes in Computer Science 4421, Springer Berlin / Heidelberg, pp. 64–79, doi:10.1007/978-3-540-71316-6_6. 66 Towards a Theory of Glue [20] Yoad Lustig & Moshe Y. Vardi (2009): Synthesis from Component Libraries. In: FOSSACS’09: Proceedings of the 12th International Conference on Foundations of Software Science and Computational Structures, Springer-Verlag, Berlin, Heidelberg, pp. 395–409, doi:10.1007/978-3-642-00596-1_28. [21] Philip K. McKinley, Seyed Masoud Sadjadi, Eric P. Kasten & Betty H.C. Cheng (2004): Composing adaptive software. Computer 37(7), pp. 56–64, doi:10.1109/MC.2004.48. [22] Robin Milner (1983): Calculi for synchrony and asynchrony. Theoretical Computer Science 25(3), pp. 267– 310, doi:10.1016/0304-3975(83)90114-7. [23] Robin Milner (1989): Communication and Concurrency. Prentice Hall International Series in Computer Science, Prentice Hall. [24] Gordon D. Plotkin (1981): A Structural Approach to Operational Semantics. Technical Report DAIMI FN19, University of Aarhus. Available at http://citeseer.ist.psu.edu/plotkin81structural.html. [25] Amir Pnueli & Roni Rosner (1990): Distributed reactive systems are hard to synthesize. Annual IEEE Symposium on Foundations of Computer Science 2, pp. 746–757, doi:10.1109/FSCS.1990.89597. [26] Awais Rashid, Peter Sawyer, Ana Moreira & João Araújo (2002): Early aspects: a model for aspect-oriented requirements engineering. In: Proceedings of the IEEE Joint International Conference on Requirements Engineering (RE’02)., pp. 199–202, doi:10.1109/ICRE.2002.1048526. [27] Jan J. M. M. Rutten (2000): Universal coalgebra: a theory of systems. Theor. Comput. Sci. 249(1), pp. 3–80, doi:10.1016/S0304-3975(00)00056-6. [28] J. Sifakis (2005): A Framework for Component-based Construction. In: Proceedings of the Third International Conference on Software Engineering and Formal Methods (SEFM), IEEE Computer Society, pp. 293–300. [29] Alexandra Silva (2010): Kleene Coalgebra. Ph.D. thesis, CWI, Amsterdam, The Netherlands. [30] Ana Sokolova (2005): Coalgebraic Analysis of Probabilistic Systems. Ph.D. thesis, TU Eindhoven, Eindhoven, The Netherlands. [31] Daniele Turi & Gordon D. Plotkin (1997): Towards a Mathematical Operational Semantics. In: LICS, IEEE Computer Society, pp. 280–291, doi:10.1109/LICS.1997.614955. [32] Peter Wegner (1996): Coordination as constrained interaction (extended abstract). In: Proc. of the First International Conference on Coordination Languages and Models, LNCS 1061, Springer-Verlag, Springer Berlin / Heidelberg, pp. 28–33, doi:10.1007/3-540-61052-9.
6cs.PL
Lisco: A Continuous Approach in LiDAR Point-cloud Clustering arXiv:1711.01853v1 [cs.DS] 6 Nov 2017 Hannaneh Najdataei, Yiannis Nikolakopoulos, Vincenzo Gulisano, Marina Papatriantafilou Chalmers University of Technology Gothenburg, Sweden {hannajd,ioaniko,vinmas,ptrianta}@chalmers.se Abstract—The light detection and ranging (LiDAR) technology allows to sense surrounding objects with fine-grained resolution in a large areas. Their data (aka point clouds), generated continuously at very high rates, can provide information to support automated functionality in cyberphysical systems. Clustering of point clouds is a key problem to extract this type of information. Methods for solving the problem in a continuous fashion can facilitate improved processing in e.g. fog architectures, allowing continuous, streaming processing of data close to the sources. We propose Lisco, a singlepass continuous Euclidean-distance-based clustering of LiDAR point clouds, that maximizes the granularity of the data processing pipeline. Besides its algorithmic analysis, we provide a thorough experimental evaluation and highlight its up to 3x improvements and its scalability benefits compared to the baseline, using both real-world datasets as well as synthetic ones to fully explore the worst-cases. Keywords-streaming, clustering, pointcloud, LiDAR I. I NTRODUCTION Active sensors that are able to measure properties of the surrounding environment with very fine-grained time resolution are utilized more and more in cyber-physical systems, such as autonomous vehicles, digitalized automated industrial environments and more. These sensors can produce large streams of readings, with the LiDAR (light detection and ranging) sensor being a prominent example. A LiDAR sensor commonly mounts several lasers on a rotating column; at each rotation step, these lasers shoot light rays and, based on the time the reflected rays take to reach back the sensor, they produce a stream of distance readings at high rates, in the realm of million of readings per second. As common in big data applications, one of the challenges in leveraging the information carried by such large streams is the need for efficient methods that can rapidly distill the valuable information from the raw measurements [5], [8], [17], [28]. A common problem in the analysis of the LiDAR sensor data is clustering of the raw distance measurements, in order to detect objects surrounding the sensor [22]. This can, for instance, enable the detection of surrounding obstacles and prevent accidents (e.g. avoiding pedestrians in autonomous driving) or study the motion feasibility of objects in factories’ production paths [1]. Challenges and contributions The processing time incurred by clustering of raw measurements (aka point clouds) represents one of the main challenges in this context because of the high rates and the need for the clustering outcome to be available in a timely manner for it to be useful. Furthermore, the accuracy of the clustering is challenging as well, since readings from objects that are at different distances from the sensor can vary a lot in density. A key performance enabler for high-rate data streaming analysis is the pipelining of its composing tasks. Nevertheless, common state-of-the art approaches for clustering of LiDAR data (cf [27], [21], [24] and more detail in § VII elaborating on related work) first organize the points to be clustered (e.g. sorting them so that points close in space are also close in the data structure maintaining them) and only then perform the clustering by querying the organized data (e.g. by running neighbor-query as discussed in § II). By doing this, they introduce a batch based processing that affects the clustering performance. To overcome this, we target a single-pass analysis that will enable fine-grained pipelining in processing the data. We propose a new method that achieves LiDAR data-point clustering, called Lisco, that allows to boost processing throughput by maximizing the internal pipelining of the analysis steps, through a key idea that can exploit the inner ordering of the data generated by a LiDAR sensor. In more detail, we make the following contributions: 1) We introduce Lisco, a new algorithm for Euclideandistance-based clustering of LiDAR point clouds, that maximizes the granularity of the data processing pipeline, without the need for supporting sorting data structures. 2) We provide a fully implemented prototype and we discuss Lisco’s complexity in connection to the stateof-the-art Euclidean-distance-based clustering method in the Point Cloud Library (PCL), which we adopt as baseline due to its known accuracy, efficiency and wide use-base [22].1 3) We perform a thorough comparative evaluation, using both real-world datasets as well as synthetic ones to fully explore the worst-cases and the spectrum of trade-offs. We achieve a significant improvement, up to 3 times faster than the baseline and we also show significant scalability benefits. 1 Available through: http://pointclouds.org The rest of the paper is organized as follows. § II overviews the LiDAR sensor, the data it produces and clustering-related techniques that exist for such data. § III presents the main idea, the outline and argues about the properties of the proposed Lisco method, while the algorithmic implementation is given in § IV. We evaluate the proposed method in § VI. Finally, we discuss related work and conclude in § VII and § VIII, respectively. II. P RELIMINARIES In this section, we give details about the key properties of LiDAR sensors and the data they generate. We also provide a detailed problem description and evaluation criteria of solutions. Finally, we briefly describe the Euclidean-distance based clustering method in PCL, which we use as baseline as explained in the introduction. A. LiDAR - sensor and data The light detection and ranging (LiDAR) technology allows sensing surrounding objects with fine-grained resolution in a large areas. The LiDAR sensor mounts L lasers in a column, each measuring the distance from the target by means of the time difference from emitted and reflected light pulses. The column of lasers performs R rotations per second, each consisting of S steps, producing a set of n points, also called point cloud. The number of points reported by the LiDAR sensor for each rotation can be lower than L×S, since some of the emitted pulses might not hit any obstacle. We refer to the angle in the x-y plane between two consecutive steps2 as ∆α (e.g. measured in radians) and to the elevation angle from the x-y plane between two consecutive lasers as ∆θ. Each point p is described through attributes hd, l, si where d, l, s are the measured distance, the laser index and the step index. The measured distance, d, is a value greater than or equal to 0. Value 0 for d shows no reflection in the point. In the following, we use the notation px to refer to attribute x of point p (i.e., pd refers to the distance reported for point p). Let us consider in the following examples that L = 8 and S = 8. We visually present the points by unfolding them as a 2D matrix, where each column contains L rows and each rotation step is a column. We assume that new data is delivered from the physical sensor with the granularity of one rotation step (Figure 1). B. Problem formulation: from point clouds to clusters Given a set of points corresponding to LiDAR measurements, we want to identify disjoint groups of them that can be potential objects in the environment surrounding the sensor. A natural criterion, commonly used in the literature and 2 If the horizontal angle between steps is not constant and lasers are not perfectly aligned in the x-y plane, then ∆α refers to the minimum such angle. Similarly, if the vertical angle between lasers is not constant, ∆θ refers to the minimum such angle. applications, is the distance between points. In particular, adopting the problem definition in [20] (Chapter 4), which we paraphrase here for ease of reference: Definition 1. [Euclidean-distance based clustering] Given n points in 3D space, we seek to partition them into some (unknown) number of clusters C using the Euclidean-distance metric, such that every cluster contains at least a predefined number of points (minP ts), that is ∀j, |Cj | ≥ minP ts, and all clusters are disjoint, that is Ci ∩ Cj = ∅, ∀i 6= j. Two points pi and pj should be clustered together if their Euclidean distance ||pi − pj ||2 is at most , with  being a predefined threshold. To facilitate the presentation of the baseline algorithm and our proposed one, we introduce the -neighborhood of a point p: the set of points of the input whose Euclidean distance from p is at most . A set of points closed under the union of their -neighborhoods is characterized as noise if its cardinality is less than minP ts. It should be noticed that, when clustering data from scenarios like the vehicular one, a pre-processing task is usually defined to filter out points that refer to the ground, since many objects laying on it would be otherwise clustered together. Since ground removal can be implemented as a non expensive and continuous filtering operation [10] (e.g. by removing points below a certain threshold, as we do in § VI) we do not further discuss it in the remainder. C. Euclidean-distance based clustering in PCL PCL [22] provides a set of tools based on a collection of state-of-the-art algorithms to process 3D data, including filtering, clustering, surface reconstruction and more. In this section we review its method for cluster extraction, which is an Euclidean-distance based clustering and we use it as a baseline. For brevity we call this algorithm PCL E Cluster in the rest of this document. PCL E Cluster works on batches of data points. It first builds a kd-tree to facilitate finding the nearest neighbors of points. Subsequently, it proceeds as described by algorithm 1 to extract the clusters. Algorithm 1 Main loop of PCL E Cluster 1: clusters = ∅ 2: for p ∈ P do 3: Q=∅ 4: if p.status 6= processed then 5: Q.add(p) 6: for q ∈ Q do 7: q.status = ’processed’ 8: N = GetNeighbors(q, ) 9: Q.addAll(N ) 10: if size(Q) ≥ minPts then clusters.add(Q) Starting from any arbitrary unprocessed point p, the algorithm adds it in an empty list, Q (line 5). Then, S steps S steps pd Δα p A. Top view Object L lasers Object L lasers ct Obje pd p Δθ B. Side view C. 2D view Figure 1: Top and side views for the LiDAR’s emitted light pulses showing steps and lasers, together with the resulting 2D view. In the 2D view, non-reflected pulses are white while reflected ones are coloured. PCL E Cluster adds all the points of the -neighborhood of each member of Q to it. After processing all members of the list Q, if its size is greater than or equal to minPts, the list is returned a cluster. The algorithm continues with the next unprocessed point, to explore another cluster. The procedure is terminated when all input points have been processed. We discuss the computational complexity of algorithm 1 in § V. III. Lisco We present in this section Lisco. We first discuss the intuition behind the algorithm, i.e. a continuous, singlepass approach in clustering in contrast to existing batch based methods as discussed in § II. Subsequently, we focus on the challenges and trade-offs that continuous clustering introduces. A. Towards continuous clustering Based on the clustering requirements as introduced in Definition 1, each point p reported by the LiDAR sensor is temporarily clustered with each neighbor point p0 within distance  from p. A cluster of points is eventually delivered if it contains at least minPts points, otherwise its points are characterized as noise. As discussed in § II-C, implementations such as the one provided by PCL limit the pipelining of the analysis because of processing stages that cannot be executed concurrently. More concretely, they first traverse all the points to populate a supporting data structure that facilitates finding the points in the -neighborhood of each point p (a kd-tree in the case of PCL) and subsequently they traverse a second time all the points to cluster them. As shown in Figure 2, the intuition behind Lisco is that the search space for the -neighborhood of point p can be translated into a set of readings given by certain steps (Figure 2.A) and lasers (Figure 2.B) around p, and within a certain distance range from the LiDAR’s emitting sensors. It should be noted that these constraints describe a region of space that may also contain points whose distance from p is greater than . Nevertheless, if points within distance  from p exist, they will be returned by one of these steps and lasers and will fall within the given distance range, as we further explain in § V. Thus, in order to discover the -neighborhood of point p, by leveraging the sorted delivering of tuples from the LiDAR sensor step after step, it is enough to explore a neighbor mask centered in p, as shown in Figure 2.C. In this way, we eliminate the need for a search-optimized data structure like kd-trees, and we allow the algorithm to process data as they are received from the sensor. B. Coping with the challenges of continuous clustering The continuous one-pass analysis of Lisco introduces several challenges that are not found in batch based approaches. Here we discuss and explain how they are addressed in Lisco in the following. 1) Partial view of neighbor mask: Algorithm 2 shows how the neighbor mask is computed, i.e. the number of previous and subsequent steps σ and the number of upper and lower lasers λ that possibly contain points within distance  from p. As discussed in § II, ∆α and ∆θ refer to the minimum angle differences between two consecutive steps and lasers, respectively. Algorithm 2 Given point p, compute the number of previous steps σ and upper and lower lasers λ bounding at least all the points within distance  from p. 1: procedure getNeighborMask(p) 2: λ ← d| arcsin(/pd )|/∆θe 3: σ ← d| arcsin(/pd )|/∆αe 4: return λ, σ Algorithm 3 Main loop of Lisco 1: subclusters = ∅ 2: upon event reception of step s do 3: for l ∈ 1, . . . , L do 4: p = M [l, s] 5: if pd > 0 then 6: λ, σ = getNeighborMask(p) 7: cluster(p,σ,λ,subclusters) 8: upon event all steps processed do 9: for subcluster ∈ subclusters do 10: if size(subcluster) ≥ minPts then return subcluster A. Top view B. Side view C. 2D view Distance range containing points within distance ε from p ε p S steps ε p L lasers L lasers S steps p Sphere containing p’s neighbors (within distance ε) Steps that can report points within distance ε from p Lasers that can report points within distance ε from p Neighbor mask covering at least all the points within distance ε from p Figure 2: Top and side views (A and B) showing which steps and lasers, respectively, to include in the neighbor mask (C) for the latter to contain at least all the points within distance  from p. The main loop of Lisco, Algorithm 3, processes points in M , the 2D matrix of input points (described in § II), in step and laser order (Line 4). Each point is processed only if its distance is greater than 0 (that is, if the LiDAR’s pulse has been reflected for the point’s step and laser index) (Line 5). Once all the points have been processed, all the clusters containing at least minPts points are delivered. As it can be noticed, the parameter minPts does not have an effect in the complexity of the algorithm, since it is only used to filter the delivered clusters at the very end of the clustering process. We describe how clusters are discovered and managed within the function cluster in the following. Given points p1 and p2 within distance , p1 ’s neighbor mask will contain p2 and vice versa. To avoid comparing each pair of neighboring points twice, it is enough to consistently traverse half the neighbor mask. Lisco explores the half containing the λ lasers above and below p and the σ steps on p’s left side. This allows for points in p’s step to be processed as soon as they are delivered (points on p’s right side are yet to be delivered upon reception of p’s step points). Take into account that, for a minority of steps, not all the points on p’s left side lay on columns with a lower index than p’s (i.e., they are not stored on the left side of the M matrix). For instance, if a point in column 2 should be compared with 3 columns on the left (λ = 3), then it should be compared with columns S-1, S and 1. In such a case, some comparisons must be postponed until such steps are delivered. A point p0 on the left side of p and within distance  lays on a lower index than p if 0 ≤ ps − p0s ≤ σ. On the other hand, if p0s + σ > S, then p0 is on the left side and within distance  from points in steps 1, . . . , ps + σ − S. In both cases, the clustering semantics defined in § II require p and p0 to be compared, as we do in Algorithm 4. 2) Continuous cluster management: A second challenge brought by the continuous nature of Lisco is that subclusters evolve as more steps arrive. Hence, a cluster identified once all the points in a rotation are processed might be the union of several previously discovered subclusters, as seen in Figure 3. Figure 3.A shows the subclusters found when C1 C x C2 A. 4 out of 8 steps have been received, 2 clusters C1 and C2 have been identified so far B. 8 out of 8 steps have been received, 1 clusters C is eventually found Figure 3: Example showing how the points of two subclusters, that evolve concurrently in Lisco’s continuous analysis, may end up in the same cluster at a subsequent step. half of the points in the rotation have been processed. In the example, 5 points have been clustered in C1 and 4 points have been clustered in C2 . The other non-colored points have not been clustered since they had no neighbors within distance . Figure 3.B shows the clusters found when all the points in the rotation have been processed. At this stage, the points previously clustered in different subclusters are now clustered together. The point marked with x represents the point that has one neighbor in each of the two disjoint subclusters found by Lisco. Once x is processed, these two subclusters should be merged. Based on this observation, we introduce the following informal notions to facilitate the detailed description of Lisco. A subcluster is a set of points that have been clustered together during the processing of the previously received steps of the input. A cluster is a set of at least minPts points that have been clustered together once all the steps of the input have been processed, i.e. a subcluster with cardinality at least minPts is characterized as a cluster after all the steps have been processed. Finally, we consider each subcluster to have a unique identifier called head. Based on the above, one can notice that a subcluster can contain points that previously belonged to two or more subclusters. Because subclusters are found continuously while the points of a rotation are being processed, the clustering algorithm requires methods to: (1) retrieve the head of the points belonging to a subcluster and (2) merge two subclusters together in order for the final cluster to be delivered as a single item. In order to do this, we use in Algorithm 4 (overviewing the clustering process applied to each incoming point p) the functions Head H = getH(Point p) and merge(Head H1,Head H2). Once two subclusters are merged invoking function merge, we expect the function getH to return the same head for any point of the two subclusters. Without loss of generality, we assume this head to be H1 in the following. Because of this we define a third function setH(point p,Head H). Finally, we define the function createH() to allow for newly discovered subclusters to be instantiated. Algorithm 4 Given point p, cluster it together with all the points already received from the LiDAR sensor that are within distance  from it. 1: procedure cluster(p,λ,σ,subclusters) 2: for p0 |(0 ≤ ps − p0s ≤ σ ∨ 1 ≤ p0s ≤ ps + σ − S) ∧ 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: |pl − p0l | ≤ λ ∧ |pd − p0d | ≤  do H1 =getH(p) H2 =getH(p’) if H1 6= H2 ∧ ||p − p0 ||2 ≤  then if H1 = ∅ ∧ H2 = ∅ then H = createH() setH(p,H) setH(p0 ,H) subclusters.add(H) else if H1 = ∅ ∧ H2 6= ∅ then setH(p,H2 ) else if H1 6= ∅ ∧ H2 = ∅ then setH(p0 ,H1 ) else subclusters.remove(H2 ) merge(H1 ,H2 )) As shown in Algorithm 4, four different cases should be checked for two points within distance  that do not belong to the same subcluster: • Line 6: None of the two points belongs to a subcluster. In this case, a new subcluster head is created and set for both points • Line 11: Point p does not belong to a subcluster while point p0 does. In such a case, point p will refer to the same head as point p0 . 0 • Line 13: Point p belongs to a subcluster while point p 0 does not. In such a case, point p will refer to the same head as point p. 0 • Line 15: Both points p and p have been clustered but to different subclusters. In such a case these two subclusters are merged together. IV. A LGORITHMIC IMPLEMENTATION We discuss the details of the algorithmic implementation of Lisco in this section. Data points are kept in a 2D matrix, M . The number of rows and columns in the matrix is equal to the number of lasers and steps respectively. Upon reception of a column of points from LiDAR, which contains the reflected points of all lasers in one step, we store them in the corresponding column of the matrix. By using the laser and the step number, all the attributes of a point can be extracted in constant time. Each entry in M holds the attributes of the corresponding point and a pointer (initially set to NULL) to the head of its subcluster. The head of a subcluster is defined as the point with the lowest indices in lexicographical order of steps and lasers during the creation of a new subcluster. When two subclusters are merged, the head from the subcluster with the largest number of members is maintained. Subclusters is a hash map used in order to keep track of subclusters and their corresponding members. It is implemented as a linked list of arrays, where each key is the header of a subcluster and its members are stored in the array. If the size of a subcluster exceeds the size of the array, a new array is linked to the tail of the current array, so that subclusters can grow without restriction. At the end of the clustering procedure, we use subclusters to traverse through subcluster heads. Each subcluster that has more than minPts members is announced as a cluster, otherwise it is characterized as noise. To keep of Lisco’s time complexity low (discussed in § V) we aim at efficient time complexity of the main methods used in our algorithms. As shown in Algorithm 2, function getNeighborMask is executed in constant number of steps, since it boils down to a fixed number of numerical operations. Similarly, functions createH and setH can be also implemented to incur in O(1) complexity, as we discuss in the following. The algorithmic implementation of getH and merge induces the following trade-off. On the one hand, merge can be implemented to induce O(1) time-cost; this can be done by maintaining a hierarchy of subclusters being part of the same subcluster while incurring a higher cost for the getH, linear in the number of subclusters. Figure 4 shows how some of the points clustered together once all the data is processed point to head H1 via head H2 . For these points the getH method has a cost higher than that of the points directly pointing to H1 , which depends on the chains induced by the data structure to maintain the hierarchy. In the proposed implementation we opt for an O(1) cost for method getH and a higher cost for merge, as seen in Figure 5 and § V. The reason, as can be seen in Algorithm 4 and based also on our empirical evaluation in § VI, is that getH is executed twice for pairs of points being compared, while merge is executed significantly less often. In detail, the implementations of the functions used in Algorithm 4 are as follows: - createH: This function gets two points that do not belong to any subcluster, and returns the one with the lower indexpair for step and laser. Since the returned point will be head of a subcluster, a new node is created in the subclusters H1 H1 x H2 H2 A. The subclusters have different heads B. After merging, one subcluster’s head (H1) points to the other (H2) Figure 4: Possible implementation in which the merge method is made O(1) by hierarchically linking heads of subclusters belonging to the same subcluster. Notice that the complexity of getH is no longer O(1) but linear in the number of subclusters for some of the points. H1 H1 x H2 A. The subclusters have different heads B. After merging, all the points are directly linked to the head Figure 5: Possible implementation in which the getH method can run in O(1) steps by having all points directly linked with the subcluster head. Notice the head of all the points of subcluster C2 has been updated when the subcluster has been merged with subcluster C1 . and the head is mapped to it. - setH: This function sets the pointer of a point to the head point. By calling this function, we are adding a point to a subcluster with an identified head. The point also needs to be added as the last element in the array of the mapped head. - getH: This function reads the pointer to get the head point. If two points are in the same subcluster, they get the same head point as the result of this function. - merge: If two points belong to different subclusters, Lisco merges the two subclusters by calling this function. It chooses the subcluster with bigger number of members as the base subcluster, and merges the other one by changing the head of its members to the base subcluster’s head. After merging subclusters, it is also necessary to remove the merged subcluster’s head from the subclusters hash map and append its array to the base subcluster’s array. V. A NALYSIS A. Correctness Based on Lisco’s functionality and algorithmic implementation, we discuss here why Lisco’s outcome satisfies Definition 1. Claim 1. If two points p and p0 are in the -neighborhood of each other they will either be in the same cluster at the end of Lisco procedure or be characterized as noise, in the same way as given in Definition 1. Proof: (sketch) Consider that, w.l.o.g. p is processed second. As argued in paragraph getNeighborMask in the previous section, p0 will be found that it belongs in the -neighborhood of p. This implies that they will be merged/inserted in the same subcluster. Unless that subcluster in the end is found to contain fewer points than M inP ts, it will be return as a final cluster in the end of the main loop of Lisco. B. Complexity In this section, we discuss the complexity analysis of Lisco and compare it with PCL E Cluster. Regarding PCL E Cluster, the required processing work volume is similar to the DBSCAN algorithm, i.e. building a spatial index (kd-tree) and using it to execute region queries for each point, resulting in an overall expected time complexity of O(nlogn) processing steps [4], [19], [25]. Claim 2. Lisco’s time complexity is linear in the number of points, multiplied by a factor that depends on the size of the clusters in the set of data points. In the worst-case where there is a big cluster of O(n) points, it can take O(nlogn) processing steps for Lisco to complete. Proof: (sketch) Overall, the time complexity of Lisco is the number of iterations in the main loop (i.e. n, as the number of points), times the work in each iteration, i.e. for each point (i) finding its -neighborhood, and (ii) working with each point in the neighborhood. Part (i) from above, induces an asymptotically constant cost, depending on , as it is performed through the comparisons implied by the masking operation getNeighborMask. Part of the -neighborhood of a point p, i.e. the points with smaller step index, is compared with p through step 2 of Algorithm 4 on behalf of p, while for each of the remaining points p0 in p’s -neighborhood, p will be identified as part of the -neighborhood of p0 when the respective step is executed on behalf of p0 . Regarding part (ii), functions’ createH and setH algorithmic implementation incurs a constant number of processing steps each, as we explain in § IV. Moreover, as explained in the aforementioned section, getH induces O(1) timecost, as a point can identify its head in O(1) (e.g. with a direct link). This incurs a cost that is O(x) for merge, where x is the size of the smaller subcluster, since the merging itself needs to update the head for all the points of the smaller one of the subclusters being merged. Since the merge function chooses the subcluster with the bigger number of points as the base subcluster, in the worstcase the clustering has a huge subcluster of O(n) points, and an unlikely scenario for constructing it, might require Lisco to merge roughly equally-sized subclusters at each of the merge operations leading to the big subcluster – any other combination of subclusters would lead at most to an equal cost as the one described. Since halving O(n) points can be made at most O(logn) times, we can observe that the worst-case total number of merge-related processing steps will be dominated by a sequence of O(nlogn) steps, which will be the dominating cost in the worst case complexity of Lisco. VI. E VALUATION In this section, we present our experimental methodology and results of Lisco and compare them with those of PCL E Cluster algorithm. Since the clustering outcomes of PCL E Cluster and Lisco are the same, we do not need to compare the clusters and we can focus on the completion time for each approach. points (including NULL points and ground points) is the same and it is equal to 72000. After removing the ground points and eliminating NULL points, we get a number of reflected points. As shown in the table, with the same number of objects in the environment (e.g. SCEN1 and SCEN2), if we change the position of objects to near or far, we get different numbers of reflected points. Name SCEN1 SCEN2 SCEN3 SCEN4 SCEN5 # Points after removing NULL points and ground points 26891 16218 39028 18229 64518 Table I: Properties of synthetic datasets and the effect of number of objects and their distances from LiDAR on number of points after ground removal. C. Performance evaluation A. Evaluation setup we use the To run PCL E Cluster EuclideanClusterExtraction class from PCL library, which is designed to cluster 3D point clouds and is implemented in C++. We also implemented Lisco in C++11 and compiled both of algorithms with gcc-4.8.4 using the -O3 optimization flag. All the experiments have been run on the same system running Linux with 2.00GHz Intel(R) Xeon(R) E5-2650 processor and 64GB Ram. B. Data We used both synthetic and real-world datasets. The realworld dataset has been collected from the Ford Campus dataset [18] and the synthetic ones have been generated using the Webots simulator [15]. We use synthetic datasets to explore the effect of data (e.g. different total number of points that have been collected by the LiDAR, different densities and distances of objects) on the performance of algorithms. There are five scenarios for synthetic datasets. SCEN1 and SCEN2 have the same and few number of objects but we changed the position of the objects to near and far from LiDAR. Near objects reflect more points while far objects reflect fewer points with a larger gap between two nearby points. Similarly, SCEN2 and SCEN3 have the same number of objects (number of objects are more than previous scenarios) and we only changed the position of the objects. Finally, SCEN5 represents a high density environment with a lot of objects. Figure 6 shows five simulated environments for several scenarios. In all the environments, a VelodyneHDL64E is used to collect data points and generate a dataset within one physical rotation. Table I summarizes the properties of the synthetic datasets. Since we used the same specifications for the LiDAR in all scenarios, the number of steps and lasers for one physical rotation is the same, so the total number of The execution time is measured from the time-instant the first data point of the dataset is received until the time instant when the clustering algorithm has processed all data points of one full physical rotation. A higher value of  implies a larger -neighborhood of a point, hence the clustering algorithm needs more time to search in the neighborhood. 1) Synthetic datasets: Figure 7 shows the average execution time with confidence level 99% on 20 runs with different values of  and constant value of minPts = 10. Since the maximum margin of error for a confidence level 99% is small, we can not distinguish them clearly in the figure. We chose a range [0.1 − 1] meters for , so that for example if  = 0.4, all the objects that their closest points have at least 40 centimetres distance from each other, should be detected as separated objects. While clustering with smaller values of  find at least one cluster for each object, bigger values increase the probability of clustering distinct objects together. For example, with  = 1 for SCEN3, all the cars at each side of the black car, are clustered together which leads to incorrect segmentation. As expected, by increasing the value of the , the execution time increases for both algorithms. As it can be seen, when the number of points is high, regardless of the value of the , Lisco is always faster than PCL. Only for a dataset with a relatively small number of points and when  is set to a high value PCL has slightly better performance than Lisco (figure 7 SCEN2 and SCEN4). The effect of number of points is also shown in figure 8. As discussed in § V building a kd-tree and using it to find nearest neighbors in PCL becomes a bottleneck when the number of points is high. 2) Real-world dataset: This Ford Campus dataset is collected by an autonomous ground vehicle testbed, with a Velodyne HDL-64E LiDAR scanner [18]. The vehicle path trajectory in this dataset contains several large and small objects (e.g. buildings, vehicles, pedestrians, vegetation, (a) SCEN1 - The simulated sparse environment in which objects are close to the LiDAR which is located on the black car (b) SCEN2 - The simulated sparse environment in which objects are far from the LiDAR which is located on the black car (c) SCEN3 - The simulated dense environment in which objects are close to the LiDAR which is located on the black car (d) SCEN4 - The simulated dense environment in which objects are far from LiDAR which is located on the black car (e) SCEN5 - The simulated room for high density environment. The LiDAR is located on the purple column Figure 6: Different scenarios for simulated environments. SCEN1 Execution Time (sec) 0.8 SCEN2 0.2 0.6 SCEN3 4 0.15 SCEN4 0.25 0.2 3 10 0.15 0.4 0.1 2 0.1 0.2 0.05 0 1 0 0 0.5 1 SCEN5 15 0 0 0.5 (m) 1 5 0.05 0 0 (m) 0.5 1 0 0 0.5 (m) PCL 1 0 (m) 0.5 1 (m) Lisco Figure 7: The average execution time on synthetic datasets with confidence level 99% over 20 runs for minPts = 10 and different values of  1.2 PCL Lisco Execution Time (sec) Execution Time (sec) 8 6 4 2 0 2 4 #points 6 104 Figure 8: Scalability of Lisco and PCL with respect to the number of points etc.). We have tested PCL E Cluster and Lisco on 2280 rotations of this dataset and compare their execution times with confidence level 99%. Figure 9 shows the results of the comparison for  values 0.3, 0.4, and 0.7. Among all the rotations, the minimum number of reflected points after ground removal is 5000, the maximum is 75550, and the average is 50225. As shown in the figure, Lisco outperforms PCL E Cluster in real-world PCL Lisco 1 0.8 0.6 0.4 0.2 0 0.3 0.4 (m) 0.7 Figure 9: The average execution time of running PCL and Lisco over 2280 rotations of real-world dataset for minPts = 10 and different values of  datasets. In real-world data, generally there are more objects around the LiDAR and therefore there are more reflected points besides the ground. Since Lisco processes points upon receiving them from LiDAR, it can save more time and it has thus better throughput. VII. OTHER RELATED WORK Data clustering has been studied for several decades and existing algorithms have been categorized into four classes: density-based, partition-based, hierarchy-based, and grid based [9]. Due to their ability in finding arbitrarily shaped clusters without requiring to know the number of the clusters a priori, density-based methods are widely used in different applications. Well-known algorithms of this class include DBSCAN [4] and OPTICS [2]. However, to use these algorithms in big data applications and overcome their performance bottleneck in dealing with extremly large datasets, there are several attempts to parallelize DBSCAN [13], [19]. In parallel models, the clustering procedure is divided into three steps: 1) data distribution (e.g. using kdtree) 2) local clustering (which is splitted on several machines) 3) merging of local clusters. Although the efficiency is improved by splitting the clustering on several machines, pipelining of steps has not being studied yet. Rusu et al. [21] introduce an Euclidean-distance-based clustering which is a partition-based clustering method that produces arbitrarily shaped clusters. This approach is designed for unorganized data points. So, to facilitate searching for nearest neighbors, first a kd-tree is built over the dataset and then clustering is being performed. In other works [24], [27], an octree is used to identify the neighbors before starting the clustering procedure. Since LiDAR data points are implicitly ordered, organizing them (e.g. in a tree) may be avoided, similar to the spirit of this paper. Specifically, the characteristics of the sensor data can be used to establish neighborhood relations between points [12], [16]. Klasing [12] et al. proposed a clustering method for 2D laser scans that rotate with an independent motor to cover a 3D environment. While the proposed method compares points across different scans similarly to the problem studied in this work, the semantics of Definition 1 are not enforced resulting to a lower accuracy. Moosmann et al. [16] proposed an approach to turn the scan into an undirected graph to retrieve the neighborhood information of each point during clustering, but they have not studied pipelining building the graph and clustering. Zermas et al. [29] recently proposed a clustering method specific to the structure of LiDAR data points. This approach processes one scan-line (a layer (rotation) of points that are produced from the same laser) at a time and merges nearby clusters from different scan-lines. However, the entire rotation is needed as the algorithm does more than one pass over the data. Also, this approach, similarly to previous works, still relies on a kd-tree for some necessary nearest neighbor searches. Moreover, the neighborhood criterion for points clustered in the same scan-line does not take into account the distance of the point from the sensor, and thus does not guarantee the semantics of Definition 1. Clustering LiDAR data points are being used in wide range of applications [11], [14], [23]. Among all, autonomous vehicle applications are one of the most challenging since they need fast and accurate results [3], [10], [26], [29]. In [3], a set of voxelisation and meshing segmentation methods are presented. Wang et al. [26] first separates data into foreground and background. then a clustering procedure is conducted only on the foreground segments. VIII. C ONCLUSIONS AND F UTURE W ORK This work is about one of the challenges in common big data applications, namely leveraging the information carried by high-rate streams through efficient methods that can rapidly distill the valuable information from the raw measurements. A common problem in the analysis of LiDAR sensor data, that generate date at rates of megabytes per second, is clustering of the raw distance measurements, in order to facilitate detection of objects surrounding the sensor. Lisco represents a streaming approach to process the LiDAR points while the data is being collected. This characteristic helps to facilitate extraction of clusters in a continuous fashion and contribute to real-time processing. By keeping track of the different subcluster heads, Lisco can deliver subclusters to the user at anytime by request, i.e. provide continuous information. Important follow-up questions include the parallelization of Lisco’s processing pipeline to take advantage of computing architectures for the corresponding deploy environments. This necessitates algorithmic implementations in a variety of processing architectures, such as manycores/GPUs, SIMD systems, single board devices and high-end servers, to explore Lisco’s properties in a broad range of cloud and fog architectures and evaluate its impact on applications that can be deployed on such systems. In addressing such questions it will be useful to leverage the benefits of efficient finegrained synchronization methods in streaming-centered and bulk-operations-enabled data structures, as proposed in [6]– [8], [17]. R EFERENCES [1] Annual report, point cloud achievements, profile project, department of production. Technical report, FraunhoferChalmers Research Center for Industrial Mathematics (FCC), 2015. [http://www.fcc.chalmers.se/mediadir/2014/09/fcc vb 2015.pdf; accessed 18-August-2017]. [2] Mihael Ankerst, Markus M Breunig, Hans-Peter Kriegel, and Jörg Sander. Optics: ordering points to identify the clustering structure. In ACM Sigmod record, volume 28, pages 49–60. ACM, 1999. [3] Bertrand Douillard, James Underwood, Noah Kuntz, Vsevolod Vlaskine, Alastair Quadros, Peter Morton, and Alon Frenkel. On the segmentation of 3d lidar point clouds. In Robotics and Automation (ICRA), 2011 IEEE International Conference on, pages 2798–2805. IEEE, 2011. [4] Martin Ester, Hans-Peter Kriegel, Jörg Sander, Xiaowei Xu, et al. A density-based algorithm for discovering clusters in large spatial databases with noise. In Kdd, pages 226–231, 1996. [5] Zhang Fu, Magnus Almgren, Olaf Landsiedel, and Marina Papatriantafilou. Online temporal-spatial analysis for detection of critical events in cyber-physical systems. In Big Data (Big Data), 2014 IEEE International Conference on, pages 129–134. IEEE, 2014. [6] Vincenzo Gulisano, Yiannis Nikolakopoulos, Daniel Cederman, Marina Papatriantafilou, and Philippas Tsigas. Efficient data streaming multiway aggregation through concurrent algorithmic designs and new abstract data types. CoRR, abs/1606.04746, 2016. [7] Vincenzo Gulisano, Yiannis Nikolakopoulos, Marina Papatriantafilou, and Philippas Tsigas. Scalejoin: A deterministic, disjoint-parallel and skew-resilient stream join. IEEE Transactions on Big Data, 2016. [17] Yiannis Nikolakopoulos, Marina Papatriantafilou, Peter Brauer, Martin Lundqvist, Vincenzo Gulisano, and Philippas Tsigas. Highly concurrent stream synchronization in manycore embedded systems. In Proceedings of the Third ACM International Workshop on Many-core Embedded Systems, MES ’16, pages 2–9, New York, NY, USA, 2016. ACM. [18] Gaurav Pandey, James R McBride, and Ryan M Eustice. Ford campus vision and lidar data set. The International Journal of Robotics Research, 30(13):1543–1552, 2011. [19] Mostofa Ali Patwary, Diana Palsetia, Ankit Agrawal, Weikeng Liao, Fredrik Manne, and Alok Choudhary. A new scalable parallel dbscan algorithm using the disjoint-set data structure. In Proceedings of the International Conference on High Performance Computing, Networking, Storage and Analysis, page 62. IEEE Computer Society Press, 2012. [20] Radu Bogdan Rusu. Semantic 3d object maps for everyday manipulation in human living environments. KI-Künstliche Intelligenz, 24(4):345–348, 2010. [8] Vincenzo Gulisano, Yiannis Nikolakopoulos, Ivan Walulya, Marina Papatriantafilou, and Philippas Tsigas. Deterministic real-time analytics of geospatial data streams through scalegate objects. In Proceedings of the 9th ACM International Conference on Distributed Event-Based Systems, DEBS ’15, pages 316–317, New York, NY, USA, 2015. ACM. [21] Radu Bogdan Rusu, Nico Blodow, Zoltan Csaba Marton, and Michael Beetz. Close-range scene segmentation and reconstruction of 3d point cloud maps for mobile manipulation in domestic environments. In Intelligent Robots and Systems, 2009. IROS 2009. IEEE/RSJ International Conference on, pages 1–6. IEEE, 2009. [9] Jiawei Han, Jian Pei, and Micheline Kamber. Data mining: concepts and techniques. Elsevier, 2011. [22] Radu Bogdan Rusu and Steve Cousins. 3d is here: Point cloud library (pcl). In Robotics and Automation (ICRA), 2011 IEEE International Conference on, pages 1–4. IEEE, 2011. [10] Michael Himmelsbach, Felix V Hundelshausen, and H-J Wuensche. Fast segmentation of 3d point clouds for ground vehicles. In Intelligent Vehicles Symposium (IV), 2010 IEEE, pages 560–565. IEEE, 2010. [11] Klaas Klasing, Dirk Wollherr, and Martin Buss. A clustering method for efficient segmentation of 3d laser data. In Robotics and Automation, 2008. ICRA 2008. IEEE International Conference on, pages 4043–4048. IEEE, 2008. [12] Klaas Klasing, Dirk Wollherr, and Martin Buss. Realtime segmentation of range data using continuous nearest neighbors. In Robotics and Automation, 2009. ICRA’09. IEEE International Conference on, pages 2431–2436. IEEE, 2009. [13] Sonal Kumari, Poonam Goyal, Ankit Sood, Dhruv Kumar, Sundar Balasubramaniam, and Navneet Goyal. Exact, fast and scalable parallel dbscan for commodity platforms. In Proceedings of the 18th International Conference on Distributed Computing and Networking, page 14. ACM, 2017. [14] Wenkai Li, Qinghua Guo, Marek K Jakubowski, and Maggi Kelly. A new method for segmenting individual trees from the lidar point cloud. Photogrammetric Engineering & Remote Sensing, 78(1):75–84, 2012. [15] Olivier Michel. Cyberbotics ltd. webots: professional mobile robot simulation. International Journal of Advanced Robotic Systems, 1(1):5, 2004. [16] Frank Moosmann, Oliver Pink, and Christoph Stiller. Segmentation of 3d lidar data in non-flat urban environments using a local convexity criterion. In Intelligent Vehicles Symposium, 2009 IEEE, pages 215–220. IEEE, 2009. [23] Aparajithan Sampath and Jie Shan. Segmentation and reconstruction of polyhedral building roofs from aerial lidar point clouds. IEEE Transactions on geoscience and remote sensing, 48(3):1554–1567, 2010. [24] Anh-Vu Vo, Linh Truong-Hong, Debra F Laefer, and Michela Bertolotto. Octree-based region growing for point cloud segmentation. ISPRS Journal of Photogrammetry and Remote Sensing, 104:88–100, 2015. [25] Ingo Wald and Vlastimil Havran. On building fast kd-trees for ray tracing, and on doing that in o (n log n). In Interactive Ray Tracing 2006, IEEE Symposium on, pages 61–69. IEEE, 2006. [26] Dominic Zeng Wang, Ingmar Posner, and Paul Newman. What could move? finding cars, pedestrians and bicyclists in 3d laser data. In Robotics and Automation (ICRA), 2012 IEEE International Conference on, pages 4038–4044. IEEE, 2012. [27] H Woo, E Kang, Semyung Wang, and Kwan H Lee. A new segmentation method for point cloud data. International Journal of Machine Tools and Manufacture, 42(2):167–178, 2002. [28] Nikos Zacheilas, Vana Kalogeraki, Yiannis Nikolakopoulos, Vincenzo Gulisano, Marina Papatriantafilou, and Philippas Tsigas. Maximizing determinism in stream processing under latency constraints. In Proceedings of the 11th ACM International Conference on Distributed and Event-based Systems, DEBS ’17, pages 112–123, New York, NY, USA, 2017. ACM. [29] Dimitris Zermas, Izzat Izzat, and Nikolaos Papanikolopoulos. Fast segmentation of 3d point clouds: A paradigm on lidar data for autonomous vehicle applications. In Robotics and Automation (ICRA), 2017 IEEE International Conference on, pages 5067–5073. IEEE, 2017.
8cs.DS
arXiv:1708.07732v2 [cs.SY] 28 Aug 2017 Multi-Agent Q-Learning for Minimizing Demand-Supply Power Deficit in Microgrids Raghuram Bharadwaj D. D. Sai Koti Reddy Shalabh Bhatnagar IISc, Bangalore, India [email protected] IISc, Bangalore, India [email protected] IISc, Bangalore, India [email protected] Abstract—We consider the problem of minimizing the difference in the demand and the supply of power using microgrids. We setup multiple microgrids, that provide electricity to a village. They have access to the batteries that can store renewable power and also the electrical lines from the main grid. During each time period, these microgrids need to take decision on the amount of renewable power to be used from the batteries as well as the amount of power needed from the main grid. We formulate this problem in the framework of Markov Decision Process (MDP), similar to the one discussed in [1]. The power allotment to the village from the main grid is fixed and bounded, whereas the renewable energy generation is uncertain in nature. Therefore we adapt a distributed version of the popular Reinforcement learning technique, Multi-Agent Q-Learning to the problem. Finally, we also consider a variant of this problem where the cost of power production at the main site is taken into consideration. In this scenario the microgrids need to minimize the demand-supply deficit, while maintaining the desired average cost of the power production. I. I NTRODUCTION Electricity is one of the most important components of the modern life. According to a recent survey, there are a total of 18,452 un-electrified villages in India [2]. Providing electricity to these villages is difficult for a number of reasons. The village may be situated very far away from the main grid and it would be difficult to establish a direct electrical line between the main grid and the village. Also, due to increasing global warming, we want to make less use of fossil fuels for the generation of power. Our objective in this work is to provide a solution to electrifying these villages. The concept of smart grid [3], is aimed at improving traditional power grid operations. It is a distributed energy network composed of intelligent nodes (or agents) that can either operate autonomously or communicate and share energy. The power grid is facing wide variety of challenges due to incorporation of renewable and sustainable energy power generation sources. The aim of smart grid is to effectively deliver energy to consumers and maintain grid stability. A microgrid is a distributed networked group consisting of renewable energy generation sources with the aim of providing energy to small areas. This scenario is being envisaged as an important alternative to the conventional scheme with large power stations transmitting energy over long distances. The microgrid technology is useful particularly in the Indian context where extending power supply from the main grids to remote villages is a challenge. While the main power stations are highly connected, microgrids with local power generation, storage and conversion capabilities, act locally or share power with a few neighboring microgrid nodes [4]. Integrating microgrids into smartgrid poses several technical challenges. These challenges need to be addressed in order to maintain the reliable and stable operation of electric grid. Research on smartgrids can be classified into two areas - Demand-side management and Supply-side management. Demand side management (DSM) ([5], [6], [7], [8], [9], [10]) deals with techniques developed to efficiently use the power by bringing the customers into the play. The main idea is to reduce the consumption of power during peak time and shifting it during the other times. This is done by dynamically changing the price of power and sharing this information with the customers. Key techniques to address DSM problem in smart grid are peak clipping, valley filling, load shifting [11]. In [12], Reinforcement Learning (RL) is used in smart grids for pricing mechanism so as to improve the profits of broker agents who procure energy from power generation sources and sell it to consumers. Supply-side management deals with developing techniques to efficiently make use of renewable and non-renewable energy at the supply side. In this paper, we consider one such problem of minimizing Demand-Supply deficit in microgrids. In [1], authors developed an MDP and applied Dynamic optimization methods to this problem. But when the model information (the renewable energy generation in this case) is not known, we cannot apply these techniques. In our current work, we setup microgrids closer to the village. These microgrids has power connections from the main grid and also with the batteries that can store renewable energy. Owing to their cost, these batteries will have limited storage capacities. Each microgrid needs to take decision on amount of renewable energy that needs to be used at every time slot and the amount of power that needs to be drawn from the main grid. Consider a scenario where, microgrids will use the renewable energy as it is generated. That is, they do not store the energy. Then, during the peak demand, if the amount of renewable energy generated is low and power obtained from the main grid is also low, it leads to huge blackout. Thus, it is important to intelligently store and use the renewable energy. In this work, we apply Multi-agent Q-learning algorithm to solve this problem. O RGANIZATION OF THE PAPER The rest of the paper is organized as follows. The next section describes the important problems associated with the microgrids and solution techniques to solve them. Section III presents the results of experiments of our algorithms. Section IV provides the concluding remarks and Section V discusses the future research directions. II. O UR W ORK In this section, we discuss two important problems associated with the microgrids. We first formulate the problem in the framework of Markov Decision Process (MDP), similar to the one described in [1]. We then apply cooperative Multi-Agent Q-Learning algorithm to solve the problems. A. Problem 1 - Minimizing Demand-Supply Deficit Consider a village that has not been electrified yet. We setup microgrids close to the village, and provides electrical connections to the village. It also has power connections from the main grid. Decision on power supply is generally taken in time slots, for example every two hours. Microgrids do not have non-renewable power generation capabilities. They have access to the renewable power and needs to obtain the excess power from the main grid. For ease of explanation, we consider two renewable sources - solar and wind. At the beginning of each time slot, microgrids obtain the power demand from customers with the help of the smart meters [13]. These microgrids need to take decisions on amount of renewable power to be used so that the expected long term demand-supply deficit is minimized. One natural solution without the use of storage batteries is to fully use the solar and wind power generated in each time slot. The excess demand will be then requested from the main grid. If the requested power is less than or equal to the maximum allotted power, the main grid transfers this to the microgrids. Other wise, it transfers the maximum allotted power. This idea is described in Algorithm 1. Our objective in the current work is to do better than the above described solution. Microgrids are equipped with batteries that can store the renewable power. That is, we deploy the microgrids at the sites where there is availability of renewable resources. The goal is to intelligently use the stored power in batteries and take the optimal action at every time slot to minimize the demand-supply deficit. We formulate the problem in the framework of Markov Decision Process (MDP). MDP [14] is the most popular mathematical framework for modeling optimal sequential decision making problems under uncertainty. A Markov decision process is defined via tuple < S; A; P ; R >, where S is the set of states. A is the set of actions. P respectively the probability 0 transition matrix. Pa (s, s ) is the probability that by taking 0 action a in the state s, the system moves into the state s . R is 0 the reward function where Ra (s, s ) is the reward obtained by 0 taking action a in the state s and the s being the next state. In infinite horizon discounted setting [15], the goal is to obtain Algorithm 1 1: Demand ← Initial Demand 2: get Demand(Demand) : Function that gives next Demand based on the current Demand. 3: solar() : Function that computes solar power generated in a time slot 4: wind() : Function that computes wind power generated in a time slot 5: max prod : Maximum power alloted by the main grid. 6: Deficit = 0 ; iterations = 0 7: procedure AT EVERY T IME S LOT 8: solar action = solar() 9: wind action = wind() 10: main action = max(0, min(max prod, Demand− (solar action + wind action))) 11: Demand ← get Demand(Demand). 12: Def icit+ = Demand − (solar action + wind action + main action) 13: iterations+ = 1; 14: end procedure 15: AverageDef icit = Def icit/iterations; a stationary policy π, which is a mapping from state space to action space that maximizes the following objective: ∞ X γ t Rat (st , st+1 ), (1) t=0 where at = π(st ), and γ ∈ [0, 1] is the discount factor. We model Power Demand as a Markov process. That is, the current Demand depends only on the previous value. The Demand value, and the amount of power left in the batteries form the state of the MDP. That is, state = [Demand, solar batterylevel, wind batterylevel]. (2) Based on the current state, the microgrids need to take decision on the number of units of power to be used from their batteries, and the number of units of power that is needed from the main grid. Note that the power from the main grid is fixed and bounded during all the time periods, while power from the renewable sources is uncertain in nature. Action = [solar power, wind power, main power], (3) The state evolves as follows: solar batterylevel = solar batterylevel − solar power + solar(), (4) and wind batterylevel = wind batterylevel − wind power + wind(), (5) where solar() and wind() are the solar and wind power generation policies. Our objective is to minimize the expected long term discounted difference in the demand and supply of the power. So, the single stage Reward function is as follows: R = −(Demand− (solar power + wind power + main power))2 (6) When there is uncertainty in the system, like the renewal energy generation in this case, traditional solution techniques like value iteration and policy iteration cannot be applied. Reinforcement Learning provides us with the algorithms which can be applied when the model information is not completely known. One such popular model-free algorithm is Q-learning [16]. However, microgrids applying Q-Learning independently is not a feasible solution, as they are working towards a common goal. Hence we apply co-operative Multi-Agent QLearning algorithm [17] to solve the problem. At every time slot, the microgrids exchange the battery level information among themselves. Then they apply Q-Learning on the joint state and obtain the joint action. Each microgrid then selects its respective action. Let the joint state at time k be sk . We select a joint action, based on an −greedy policy. An −greedy policy is one where we select the action that gives maximum reward with probability 1 −  and a random action with probability . Let it be ak and so we move to a new state sk+1 . Let the single stage reward obtained be rk Then the Q-values are updated as follows: Q(sk , ak ) = Q(sk , ak )+ α[rk + γmaxa Q(sk+1 , a) − Q(sk , ak )], (7) where α ∈ [0, 1] is the learning parameter and γ ∈ [0, 1] is the discount factor. We update this Q-values until convergence. At the end of this process, we will have an optimal policy that gives for each state, the optimal action to be taken. The idea is described in Algorithm 2. B. Problem 2 - Balancing Demand-Supply Deficit and cost of Power Production In the above formulation, cost of the non-renewable power production at the main grid site is not taken into consideration. Therefore, it is natural to use the maximum alloted power from the main grid and the optimization is done on the amount of power drawn from the solar and the wind batteries. In this formulation, we put a cost on amount of power that can be obtained from the main grid. That is, we modify our single stage Reward as follows: −c ∗ (Demand − (solar power + wind power+ main power))2 + (1 − c) ∗ (main power)2 . (8) c ∈ [0, 1], where c is the parameter that controls the demand-supply objective and the main grid production cost. Note here that when c = 1, it is same as the problem 1. In this formulation, Algorithm 2 1: State ← Initial State 2: get Demand(Demand) : Function that gives next Demand based on the current Demand. 3: solar() : Function that computes solar power generated in a time slot 4: wind() : Function that computes wind power generated in a time slot. 5: max prod : Maximum power alloted by the main grid. 6: Deficit = 0 ; iterations = 0 7: procedure AT EVERY T IME S LOT AND FOR ALL THE MICROGRIDS 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: Select an joint action a vector according to -greedy policy. new solar = solar − a(solar action) + solar() new wind = wind − a(wind action) + wind() new Demand = get Demand(Demand) Update the Q-values according to (7) state = [new Demand, new solar, new wind] Def icit+ = Demand − (a(solar action) + a(wind action) + a(main action)) iterations+ = 1; end procedure AverageDef icit = Def icit/iterations; our objective is not only to minimize the demand-supply deficit, but also maintain a desired average production of power at the main site. Similar to the above problem, we apply multi-agent Q-Learning to obtain the optimal solution. III. E XPERIMENTS We consider two microgrids operating on the solar and the wind power batteries respectively. Demand values are taken to be 8,10 and 12. The probability transition matrix for the Demand is given below.   0.1 0.6 0.3 P =  0.3 0.1 0.6  . 0.6 0.3 0.1 (9) The maximum storage capacity of the batteries is set to 5. The renewable energy generation process for simulation purposes is taken to be Poisson with mean 2. Discount factor of the Q-learning algorithm is set to 0.9. We begin our simulations with the state [8, 5, 5]. First we run Algorithm 1 for 106 iterations and compute the average deficit in demand and supply. Then we run Algorithm 2 for 108 iterations with −greedy policy with  = 0.85 and obtain an optimal policy. We then compute the average deficit using optimal Q-values for 104 iterations. We compare both the algorithms in Figure 1. With regard to the problem 2, we plot the values of average deficit in the power and the average production at the main grid obtained by different values of c in (8). The maximum power allocation at the main site is taken to be 8. This is shown in Figure 2. • to store the power in the batteries. This is the main result of our paper. In Figure 2, we observe that as the value of c increases, the average demand-supply deficit decreases and the average power obtained from the main grid increases. IV. C ONCLUSION Fig. 1. Comparison of Algorithms on Problem 1 We considered the problem of electrifying a village by setting up microgrids close to the village. These microgrids have access to the renewable energy storage batteries and also electrical connections from the main grid. We identified two problems associated with the microgrid. First problem is to minimize the expected long-run discounted demand-supply deficit. We model this problem in the framework of MDP [1]. This formulation doesn’t take into consideration the cost of power production at the main grid site. Finally, we formulated MDP taking the cost of power production into consideration. We applied Multi-Agent Q-Learning algorithm to solve these problems. Simulations show that, when maximum power allocation at the main site is not very less, storing the power in the batteries and using them intelligently is the better solution compared to not using the storage batteries. V. F UTURE W ORK As future work, we would like to consider the possibility of power sharing between the microgrids. In this case, along with decision on amount of power to be used from stored batteries, microgrids also have to make decision on the amount of power that can be shared with others. We would also like to consider the heterogeneous power price system. In this scenario, the price of power production at the main grid will vary from time to time. ACKNOWLEDGMENT The authors would like to thank Robert Bosch Centre for Cyber-Physical Systems, IISc, Bangalore, India for supporting part of this work. R EFERENCES Fig. 2. Algorithm 2 applied to Problem 2 A. Observations • • In Figure 1, we see that the Algorithm 1 performs better than the Algorithm 2, when the Maximum Power Allocation (MPA) at the main site is less than 3. This is because, when the MPA is very less compared to the minimum demand value, storing the power in the batteries doesn’t provide any advantage. On the other hand, if the MPA is not very small and comparable to the minimum demand, the Algorithm 2 outperforms Algorithm 1. Thus, in this case it is useful [1] M. Kangas and S. Glisic, “Analogies in modelling wireless network stability and advanced power grid control,” in IEEE International Conference on Communications (ICC), 2013. IEEE, 2013, pp. 4035– 4040. [2] “Rural households electrification,” https://garv.gov.in/garv2/dashboard/ main. [3] H. Farhangi, “The path of the smart grid,” IEEE power and energy magazine, vol. 8, no. 1, 2010. [4] G. Weiss, Multiagent systems: a modern approach to distributed artificial intelligence. MIT press, 1999. [5] T. Logenthiran, D. Srinivasan, and T. Z. Shun, “Multi-agent system for demand side management in smart grid,” in IEEE Ninth International Conference on Power Electronics and Drive Systems (PEDS), 2011. IEEE, 2011, pp. 424–429. [6] P. Wang, J. Huang, Y. Ding, P. Loh, and L. Goel, “Demand side load management of smart grids using intelligent trading/metering/billing system,” in Power and Energy Society General Meeting, 2010 IEEE. IEEE, 2010, pp. 1–6. [7] A.-H. Mohsenian-Rad, V. W. Wong, J. Jatskevich, R. Schober, and A. Leon-Garcia, “Autonomous demand-side management based on game-theoretic energy consumption scheduling for the future smart grid,” IEEE transactions on Smart Grid, vol. 1, no. 3, pp. 320–331, 2010. [8] A. Moshari, G. Yousefi, A. Ebrahimi, and S. Haghbin, “Demandside behavior in the smart grid environment,” in Innovative Smart Grid Technologies Conference Europe (ISGT Europe), 2010 IEEE PES. IEEE, 2010, pp. 1–7. [9] L. Gelazanskas and K. A. Gamage, “Demand side management in smart grid: A review and proposals for future direction,” Sustainable Cities and Society, vol. 11, pp. 22–30, 2014. [10] A. M. Kosek, G. T. Costanzo, H. W. Bindner, and O. Gehrke, “An overview of demand side management control schemes for buildings in smart grids,” in IEEE international conference on Smart energy grid engineering (SEGE), 2013. IEEE, 2013, pp. 1–9. [11] I. K. Maharjan, Demand side management: load management, load profiling, load shifting, residential and industrial consumer, energy audit, reliability, urban, semi-urban and rural setting. LAP Lambert Academic Publ, 2010. [12] P. P. Reddy and M. M. Veloso, “Learned behaviors of multiple autonomous agents in smart grid markets.” in AAAI. Citeseer, 2011. [13] S. S. S. R. Depuru, L. Wang, and V. Devabhaktuni, “Smart meters for power grid: Challenges, issues, advantages and status,” Renewable and sustainable energy reviews, vol. 15, no. 6, pp. 2736–2742, 2011. [14] R. S. Sutton and A. G. Barto, Reinforcement Learning: An Introduction. MIT press Cambridge, 1998, vol. 1, no. 1. [15] D. P. Bertsekas, Dynamic Programming and Optimal Control. Athena Scientific Belmont, MA, 1995, vol. 1, no. 2. [16] D. Bertsekas, “Dynamic Programming and Optimal Controlvolume 2,” 1999. [17] L. Busoniu, R. Babuska, and B. De Schutter, “A comprehensive survey of multiagent reinforcement learning,” IEEE Transactions on Systems Man and Cybernetics Part C Applications and Reviews, vol. 38, no. 2, p. 156, 2008.
3cs.SY
Accepted to Algorithmica. The final publication is available at link.springer.com. http://link.springer.com/article/10.1007/s00453-015-0017-7. arXiv:1210.0508v5 [cs.LG] 20 Jan 2017 Inference algorithms for pattern-based CRFs on sequence data Rustem Takhanov Vladimir Kolmogorov [email protected] Nazarbayev University, Kazakhstan [email protected] Institute of Science and Technology Austria Abstract We consider Conditional Random Fields (CRFs) with pattern-based potentials defined on a chain. In this model the energy of a string (labeling) x1 . . . xn is the sum of terms over intervals [i, j] where each term is non-zero only if the substring xi . . . xj equals a prespecified pattern α. Such CRFs can be naturally applied to many sequence tagging problems. We present efficient algorithms for the three standard inference tasks in a CRF, namely computing (i) the partition function, (ii) marginals, and (iii) computing the MAP. Their complexities are respectively O(nL), O(nL`max ) and O(nL min{|D|, log(`max +1)}) where L is the combined length of input patterns, `max is the maximum length of a pattern, and D is the input alphabet. This improves on the previous algorithms of [Ye et al. NIPS 2009] whose complexities are respectively O(nL|D|), O n|Γ|L2 `2max and O(nL|D|), where |Γ| is the number of input patterns. In addition, we give an efficient algorithm for sampling, and revisit the case of MAP with non-positive weights. This paper addresses the sequence labeling (or the sequence tagging) problem: given an observation z (which is usually a sequence of n values), infer labeling x = x1 . . . xn where each variable xi takes values in some finite domain D. Such problem appears in many domains such as text and speech analysis, signal analysis, and bioinformatics. One of the most successful approaches for tackling the problem is the Hidden Markov Model (HMM). The kth order HMM is given by the probability distribution p(x|z) = Z1 exp{−E(x|z)} with the energy function X X E(x|z) = ψi (xi , zi ) + ψij (xi:j ) (1) i∈[1,n] (i,j)∈Ek where Ek = {(i, i + k) | i ∈ [1, n − k]} and xi:j = xi . . . xj is the substring of x from i to j. A popular generalization is the Conditional Random Field model [3] that allows all terms to depend on the full observation z: X X E(x|z) = ψi (xi , z) + ψij (xi:j , z) (2) i∈[1,n] (i,j)∈Ek A preliminary version of this paper appeared in Proceedings of the 30th International Conference on Machine Learning (ICML), 2013 [8]. This work was partially supported by the European Research Council under the European Unions Seventh Framework Programme (FP7/2007-2013)/ERC grant agreement no 616160. 1 We study a particular variant of this model called a pattern-based CRF. It is defined via X X α E(x|z) = ψij (z) · [xi:j = α] (3) α∈Γ [i,j]⊆[1,n] j−i+1=|α| where Γ is a fixed set of non-empty words, |α| is the length of word α and [·] is the Iverson bracket. If we take Γ = D ∪ Dk then (3) becomes equivalent to (2); thus we do not loose generality (but gain more flexibility). Intuitively, pattern-based CRFs allow to model long-range interactions for selected subsequences of labels. This could be useful for a variety of applications: in part-of-speech tagging patterns could correspond to certain syntactic constructions or stable idioms; in protein secondary structure prediction - to sequences of dihedral angles corresponding to stable configuration such as α-helixes; in gene prediction - to sequences of nucleatydes with supposed functional roles such as “exon” or “intron”, specific codons, etc. Inference This paper focuses on inference algorithms for pattern-based CRFs. The three standard inference tasks are P • computing the partition function Z = x exp{−E(x|z)}; • computing marginal probabilities p(xi:j = α|z) for all triplets (i, j, α) present in (3); • computing MAP, i.e. minimizing energy (3). P The complexity of solving these tasks is discussed below. We denote L = α∈Γ |α| to be total length of patterns and `max = maxα∈Γ |α| to be the maximum length of a pattern. A naive approach is to use standard message passing techniques for an HMM of order k = `max − 1. However, they would take O(n|D|k+1 ) time which would  become impractical for large k. More efficient algorithms with complexities O(nL|D|), O n|Γ|L2 `2max and O(nL|D|) respectively were given by Ye et al. [10].1 Our first contribution is to improve this to O(nL), O(nL`max ) and O(nL·min{|D|, log(`max + 1)}) respectively (more accurate estimates are given in the next section). We also give an algorithm for sampling from the distribution p(x|z). Its complexity is either (i) O(nL) per sample, or (ii) O(n) per sample with an O(nL|D|) preprocessing (assuming that we have an oracle that produces independent samples from the uniform distribution on [0, 1] in O(1) time). α (z) are non-positive. Komodakis and Paragios [2] Finally, we consider the case when all costs ψij gave an O(nL) technique for minimizing energy (3) in this case. We present a modification that has the same worst-case complexity but can beat the algorithm in [2] in the best case. Related work The works of [10] and [2] are probably the most related to our paper. The former applied pattern-based CRFs to the handwritten character recognition problem and to the problem of identification of named entities from texts. The latter considered a pattern-based CRF on a grid for a computer vision application; the MAP inference problem in [2] was converted to sequence labeling problems by decomposing the grid into thin “stripes”. Qian et al. [5] considered a more general formulation in which a single pattern is characterized by a set of strings rather than a single string α. They proposed an exact inference algorithm and applied it to the OCR task and to the Chinese Organization Name Recognition task. However, their algorithm could take time exponential in the total lengths of input patterns; no subclasses of inputs were identified which could be solved in polynomial time. A different generalization (for non-sequence data) was proposed by Rother et al. [6]. Their inference procedure reduces the problem to the MAP estimation in a pairwise CRF with cycles, which 1 Some of the bounds stated in [10] are actually weaker. However, it is not difficult to show that their algorithms can be implemented in times stated above, using our Lemma 1. 2 is then solved with approximate techniques such as BP, TRW or QPBO. This model was applied to the texture restoration problem. Nguyen et al. [4] extended algorithms in [10] to the Semi-Markov model [7]. We conjecture that our algorithms can be extended to this case as well, and can yield a better complexity compared to [4]. In [8] we applied the pattern-based CRF model to the problem of the protein dihedral angles prediction. 1 Notation and preliminaries First, we introduce a few definitions. • A pattern is a pair α = ([i, j], x) where [i, j] is an interval in [1, n] and x = xi . . . xj is a sequence over alphabet D indexed by integers in [i, j] (j ≥ i − 1). The length of α is denoted as |α| = |x| = j − i + 1. • Symbols “∗” denotes an arbitrary word or pattern (possibly the empty word ε or the empty pattern εs , ([s + 1, s], ε) at position s). The exact meaning will always be clear from the context. Similary, “+” denotes an arbitrary non-empty word or pattern. • The concatenation of patterns α = ([i, j], x) and β = ([j + 1, k], y) is the pattern αβ , ([i, k], xy). Whenever we write αβ we assume that it is defined, i.e. α = ([·, j], ·) and β = ([j + 1, ·], ·) for some j. • For a pattern α = ([i, j], x) and interval [k, `] ⊆ [i, j], the subpattern of α at position [k, `] is the pattern αk:` , ([k, `], xk:` ) where xk:` = xk . . . x` . If k = i then αk:` is called a prefix of α. If ` = j then αk:` is a suffix of α. • If β is a subpattern of α, i.e. β = αk:` for some [k, `], then we say that β is contained in α. This is equivalent to the condition α = ∗β∗. • Di:j = {([i, j], x) | x ∈ D[i,j] } is the set of patterns with interval [i, j]. We typically use letter x for patterns in D1:s and letters α, β, . . . for other patterns. Patterns x ∈ D1:s will be called partial labelings. • For a set of patterns Π and index s ∈ [0, n] we denote Πs to be the set of patterns in Π that end at position s: Πs = {([i, s], α) ∈ Π}. • For a pattern α let α− be the prefix of α of length |α| − 1; if α is empty then α− is undefined. We will consider the following general problem. Let Π◦ be the set of patterns of words in Γ placed at all possible positions: Π◦ = {([i, j], α) | α ∈ Γ)}. Let (R, ⊕, ⊗) be a commutative semiring with elements O, 1 ∈ R which are identities for ⊕ and ⊗ respectively. Define the cost of pattern x ∈ Di:j via O f (x) = cα (4) α∈Π◦ ,x=∗α∗ where cα ∈ R are fixed constants. (Throughout the paper we adopt the convention that operations ⊕ and ⊗ over the empty set of arguments give respectively O and 1, and so e.g. f (εs ) = 1.) Our goal is to compute M Z= f (x) (5) x∈D1:n 3 Example 1 If (R, ⊕, ⊗) = (R, +, ×) then problem (5) is equivalent to computing the partition function α (z)}. for the energy (3), if we set c([i,j],α) = exp{−ψij Example 2 If (R, ⊕, ⊗) = (R, min, +) where R , R ∪ {+∞} then we get the problem of minimizing α (z). energy (3), if c([i,j],α) = ψij The complexity of our algorithms will be stated in terms of the following quantities: • P = |{α | ∃α∗ ∈ Γ, α 6= ε}| is the number of distinct non-empty prefixes of words in Γ. Note that P ≤ L. • P 0 = |{α | ∃α+ ∈ Γ}| is the number of distinct proper prefixes of words in Γ. There holds P P 0 ∈ [1, |D|]. If Γ = D1 ∪ D2 ∪ . . . ∪ Dk then PP0 = |D|. If Γ is a sparse random subset of the set above then P P 0 ≈ 1. • I(Γ) = {α | ∃α∗, ∗α ∈ Γ, α 6= ε} is the set of non-empty words which are both prefixes and suffixes of some words in Γ. Note that Γ ⊆ I(Γ) and |I(Γ)| ≤ P . We will present 6 algorithms: Sec. 2: Θ(nP ) algorithm for the case when (R, ⊕, ⊗) is a ring, i.e. it has operation that satisfies (a b) ⊕ b = a for all a, b ∈ R. This holds for the semiring in Example 1 (but not for Example 2). Sec. 3: Θ(nP ) algorithm for sampling. Alternatively, it can be implemented to produce independent samples in Θ(n) P time per sample with a Θ(nP |D|) preprocessing. Sec. 4: O(n α∈I(Γ) |α|) algorithm for computing marginals for all patterns α ∈ Π◦ . Sec. 5: Θ(nP 0 |D|) algorithm for a general commutative semiring, which is equivalent to the algorithm in [10]. It will be used as a motivation for the next algorithm. Sec. 6: O(nP log P ) algorithm for a general commutative semiring; for the semiring in Example 2 the complexity can be reduced to O(nP log(`max + 1)). Sec. 7: O(nP ) algorithm for the case (R, ⊕, ⊗) = (R, min, +), cα ≤ 0 for all α ∈ Π◦ . All algorithms will have the following structure. Given the set of input patterns Π◦ , we first construct another set of patterns Π; it will typically be either the set of prefixes or the set of proper prefixes of patterns in Π◦ . This can be done in a preprocessing step since sets Πs will be isomorphmic (up to a shift) for indexes s that are sufficiently far from the boundary. (Recall that Πs is the set of patterns in Π that end at position s.) Then we recursively compute messages Ms (α) for α ∈ Πs which have the following interpretation: Ms (α) is the sum (“⊕”) of costs f (x) over a certain set of partial labelings of the form x = ∗α ∈ D1:s . In some of the algorithms we also compute messages Ws (α) which is the sum of f (x) over all partial labelings of the form x = ∗α ∈ D1:s . Graph G[Πs ] The following construction will be used throughout the paper. Given a set of patterns Π and index s, we define G[Πs ] = (Πs , E[Πs ]) to be the Hasse diagram of the partial order  on Πs , where α  β iff α is a suffix of β (β = ∗α). In other words, G[Πs ] is a directed acyclic graph with the following set of edges: (α, β) belongs to E[Πs ] for α, β ∈ Πs if α ≺ β and there exists no “intermediate” pattern γ ∈ Πs with α ≺ γ ≺ β. It can be checked that graph G[Πs ] is a directed forest. If εs ∈ Πs then G[Πs ] is connected and therefore is a tree. In this case we treat εs as the root. An example is shown in Fig. 1. Computing partial costs Recall that f (α) for a pattern α is the cost of all patterns inside α (eq. (4)). We also define φ(α) to be the cost of only those patterns that are suffixes of α: O φ(α) = cβ (6) β∈Π◦ ,α=∗β Quantities φ(α) and f (α) will be heavily used by the algorithms below; let us show how to compute them efficiently. 4 ...... . . . . .0 . . . . .1 . . . . 10 . . . 100 . . . 101 . . 1000 . . 1010 ε 0 1 1000 100 10 101 1010 Figure 1: Graph G[Πs ] for the set of 8 patterns shown on the left (for brevity, their intervals are not shown; they all end at the same position s.) This set of patterns would arise if Γ = {0, 1, 1000, 1010} and Π was defined as the set of all prefixes of patterns in Π◦ . Lemma 1. Let Π be a set of patterns with εs ∈ Π for all s ∈ [0, n]. Values φ(α) for all α ∈ Π can be computed using O(|Π|) multiplications (“⊗”). The same holds for values f (α) assuming that Π is prefix-closed, i.e. α− ∈ Π for all non-empty patterns α ∈ Π. Proof. To compute φ(·) for patterns α ∈ Πs , we use the following procedure: (i) set φ(εs ) := 1; (ii) traverse edges (α, β) ∈ E[Πs ] of tree G[Πs ] (from the root to the leaves) and set ( φ(α) ⊗ cβ if β ∈ Π◦ φ(β) := φ(α) otherwise Now suppose that Π is prefix-closed. After computing φ(·), we go through indexes s ∈ [0, n] and set f (εs ) := 1, f (α) := f (α− ) ⊗ φ(α) ∀α ∈ Πs − {εs } Sets of partial labelings Let Πs be a set of patterns that end at position s. Assume that εs ∈ Πs . For a pattern α ∈ Πs we define Xs (α) = {x ∈ D1:s | x = ∗α} [ Xs (α; Πs ) = Xs (α) − Xs (β) (7) (8) (α,β)∈E[Πs ] It can be seen that sets Xs (α; Πs ) are disjoint, and their union over α ∈ Πs is D1:s . Furthermore, there holds Xs (α; Πs ) = {x ∈ Xs (α) | x 6= ∗β ∀β = +α ∈ Πs } (9) We will use eq. (9) as the definition of Xs (α; Πs ) in the case when α ∈ / Πs . 2 Computing partition function In this section we give an algorithm for computing quantity (5) assuming that (R, ⊕, ⊗) is a ring. This can be used, in particular, for computing the partition function. We will assume that D ⊆ Γ; we can always add D to Γ if needed2 . 2 Note that we still claim complexity O(nP ) where P is the number of distinct non-empty prefixes of words in the original set Γ. Indeed, we can assume w.l.o.g. that each letter in D occurs in at least one word α ∈ Γ. (If not, then we can “merge” non-occuring letters to a single letter and add this letter to Γ; clearly, any instance over the original pair (D, Γ) can be equivalenly formulated as an instance over the new pair. The transformation increases P only by 1). The assumption implies that |D| ≤ P . Adding D to Γ increases P by at most P , and thus does not affect bound O(nP ). 5 First, we select set Π as the set of prefixes of patterns in Π◦ : Π = {α | ∃α∗ ∈ Π◦ } (10) We will compute the following quantities for each s ∈ [0, n], α ∈ Πs : M M f (x) f (x) , Ws (α) = Ms (α) = (11) x∈Xs (α) x∈Xs (α;Πs ) It is easy to see that for α ∈ Πs the following equalities relate Ms and Ws : M Ws (β) Ms (α) = Ws (α) (12a) (α,β)∈E[Πs ] M Ws (α) = Ms (α) ⊕ Ws (β) (12b) (α,β)∈E[Πs ] These relations motivate the following algorithm. Since |Πs | = P + 1 for indexes s that are sufficiently far from the boundary, its complexity is Θ(nP ) assuming that values φ(α) in eq. (13a) are computed using Lemma 1. L Algorithm 1 Computing Z = x∈D1:n f (x) for a ring 1: initialize messages: set W0 (ε0 ) := O 2: for s = 1, . . . , n traverse nodes α ∈ Πs of tree G[Πs ] starting from the leaves and set   M Ms (α) := φ(α) ⊗ Ws−1 (α− ) Ws−1 (β − ) (13a) (α,β)∈E[Πs ] Ws (α) := Ms (α) ⊕ M Ws (β) (13b) (α,β)∈E[Πs ] Exception: if α = εs then set Ms (α) := O instead of (13a) 3: return Z := Wn (εn ) Theorem 2. Algorithm 1 is correct, i.e. it returns the correct value of Z = 2.1 L x F (x). Proof of Theorem 2 Eq. (13b) coincides with (12b); let us show that eq. (13a) holds for any α ∈ Πs − {εs }. (Note, for α = εs step 2 is correct: assumption D ⊆ Γ implies that Ds:s ⊆ Πs , and therefore Xs (εs ; Πs ) = ∅, Ms (εs ) = O). For a partial labeling x ∈ D1:s define the “reduced partial cost” as O cα (14) f − (x) = α∈Π◦ ,x=∗α+ It is easy to see from (11) that for any α ∈ Πs − {εs } X Ws−1 (α− ) = f − (x) x∈Xs (α) 6 (15) Consider α ∈ Πs − {εs }. We will show that for any x ∈ Xs (α) there holds  M Jx ∈ Xs (α; Πs )K ⊗ f (x) = φ(α) ⊗ f − (x)  f − (x) (16) (α,β)∈E[Πs ]:x∈Xs (β) where J·K = 1 if the argument is true, and O otherwise. This will be sufficient for establishing the theorem: summing these equations over x ∈ Xs (α) and using (11), (15) yields eq. (13a). Two cases are possible: Case 1: x ∈ Xs (β) for some (α, β) ∈ E[Πs ]. (Such β is unique since sets Xs (β) are disjoint.) Then both sides of (16) are O. Case 2: x ∈ Xs (α; Πs ). Then eq. (16) is equivalent to f (x) = φ(α) ⊗ f − (x). This holds since there is no pattern γ ∈ Π◦s (x) with |γ| > |α| (otherwise we would have γ ∈ Πs and thus x ∈ / Xs (α; Πs ) by definition (9) - a contradiction). 3 Sampling In this section consider the semiring (R, ⊕, ⊗) = (R, +, ×) from Example 1. We assume that all costs cα are strictly positive. We present an algorithm for sampling labelings x ∈ D1:n according to the probability distribution p(x) = f (x)/Z. As in the previous section, we assume that D ⊆ Γ, and define Π to be the set of prefixes of patterns in Π◦ (eq. (10)). For a node α ∈ Πs let Ts (α) be the set of nodes in the subtree of G[Πs ] rooted at α, with α ∈ Ts (α) ⊆ Πs . For a pattern α ∈ Πs+1 − {εs+1 } we define set [ ∆s (α) = Ts (α− ) − Ts (β − ) (17) (α,β)∈G[Πs+1 ] We can now present the algorithm (see Algorithm 2). Algorithm 2 Sample x ∼ p(x) = f (x)/Z 1: run Algorithm 1 to compute messages Ms (α) for all patterns α = ([·, s], ·) ∈ Π 2: sample αn ∈ Πn with probability p(αn ) ∝ Mn (αn ) 3: for s = n−1, . . . , 1 sample αs ∈ ∆s (αs+1 ) with probability p(αs ) ∝ Ms (αs ) 4: return labeling x with xs:s = (αs )s:s for s ∈ [1, n] We say that step s of the algorithm is valid if either (i) s = n, or (ii) s ∈ [1, n − 1], step s + 1 is valid, αs+1 6= εs+1 and Ms (α) > 0 for some α ∈ ∆s (αs+1 ). (This is a recursive definition.) Clearly, if step s is valid then line 3 of the algorithm is well-defined. Theorem 3. (a) With probability 1 all steps of the algorithm are valid. (b) The returned labeling x ∈ D1:n is distributed according to p(x) = f (x)/Z. Complexity Assume that we have an oracle that produces independent samples from the uniform distribution on [0, 1] in O(1) time. The main subroutine performed by the algorithm is sampling from a given discrete distribution. Clearly, this can be done in Θ(N ) time where N is the number of allowed values of the random variable. With a Θ(N ) preprocessing, a sample can also be produced in O(1) time by the so-called “alias method” [9]. This leads to two possible complexities: (i) Θ(nP ) (without preprocessing); (ii) Θ(n) per sample (with preprocessing). Let us discuss the complexity of this preprocessing. Running Algorithm 1 takes 7 Θ(nP ) time. After that, for each α ∈ Πs+1 we need to run the linear time procedure of [9] for distributions p(β) ∝ Ms (β), β ∈ ∆s (αs+1 ). The following theorem implies that this takes Θ(nP |D|) time. P Theorem 4. There holds α∈Πs −{εs } |∆s−1 (α)| = |Πs−1 | · |D|. Proof. Consider pattern β ∈ Πs−1 . For a letter a ∈ Ds:s let β a ∈ Πs be longest suffix α of βa with α ∈ Πs (at least one such suffix exists, namely a). It can be seen that the set {β a | a ∈ Ds:s } is exactly the set of patterns α ∈ Πs − {εs } for which ∆s−1 (α) Pcontains β (checking this fact is just definition chasing). Therefore, the sum in the theorem equals β∈Πs−1 |{β a | a ∈ Ds:s }| = |Πs−1 | · |D|. To summarize, we showed that with a Θ(nP |D|) preprocessing we can compute independent samples from p(x) in Θ(n) time per sample. 3.1 Proof of Theorem 3 Suppose that step s ∈ [1, n] of the algorithm is valid; this means that patterns αt for t ∈ [s, n] are well-defined. For t ∈ [s, n] we then define the set of patterns At = ∆t (αt+1 ) ⊆ Πt (if t = n then we define At = Πt instead). We also define sets of labelings Yt (α) = {yxt+1:n | y ∈ Xt (α; Πt )} ∀α ∈ At Yt = Yt (αt ) (18) (19) where x is a labeling with xt:t = (αt )t:t for t ∈ [s, n]. Let Yn+1 = D1:n . Lemma 5. Suppose that step s ∈ [1, n] is valid. (a) Ys+1 is a disjoint union S of sets Ys (α) over α ∈ As . (b) For each y ∈ Ys+1 = α∈As Ys (α) there holds f (y) = consts · f (y1:s ), and consequently for any α ∈ As there holds X X f (y) = consts · f (y) = consts · Ms (α) y∈Ys (α) y∈Xs (α;Πs ) Theorem 3 will follow from this lemma. Indeed, the lemma shows that the algorithm implicitly computes a sequence of nested sets D1:n = Yn+1 ⊇ Yn ⊇ . . . ⊇ Y1 = {x}. At step s we divide set Ys+1 into disjoint subsets P Ys (α), α ∈ As and select one of them, Ys = Ys (αs ), with the probability proportional to Ms (αs ) ∝ y∈Ys (αs ) f (y). We still need to show that if step s ∈ [2, n] is valid then step s − 1 is valid as well with probability 1. It follows from the precondition that αs sampled in line 3 satisfies PMs (αs ) > 0 with probability 1; this implies that αP above s 6= εs . From the paragraph y∈Ys f (y) > 0 with probability P P we get that P f (y) = 1. We also have M (α) ∝ s−1 α∈As−1 α∈As−1 y∈Ys−1 (α) y∈Ys f (y) > 0 implying that Ms−1 (α) > 0 for some α ∈ As−1 . This concludes the proof that step s − 1 is valid with probability 1. It remains to prove Lemma 5. − Part (a) First, we need to check that Xs (αs+1 ; Π− s+1 ) is equal to the disjoint union of Xs (α; Πs ) − − over α ∈ ∆s (αs+1 ) where Πs+1 = {α | α ∈ Πs+1 }. Disjointness of Xs (α; Πs ) for different α ∈ Πs is − − obvious. Since Π− s+1 ⊆ Πs , then for any α ∈ ∆s (αs+1 ), Xs (α; Πs ) ⊆ Xs (αs+1 ; Πs+1 ) is straightforward − from the definition of ∆s (αs+1 ). Thus, we only need to check the inclusion of Xs (αs+1 ; Π− s+1 ) in the union.  − Elements of Π− can be seen as nodes in tree G[Πs ]. Then any pattern x from s+1 ∪ αs+1 − − Xs (αs+1 ; Π− ) defines the longest suffix s(x) such that s(x) ∈ Πs . It is easy to see that s(x) ∈ Ts (αs+1 ), s+1 − and moreover, the descending path in G[Πs ] from αs+1 to s(x) does not contain elements from 8  − − Π− / Xs (αs+1 ; Π− s+1 − αs+1 , otherwise x, s(x) ∈ s+1 ). It is easy to see that this is equivalent to − s(x) ∈ ∆s (αs+1 ). Since x ∈ Xs (s(x); Πs ), Xs (αs+1 ; Π− s+1 ) is a subset of the union of Xs (α; Πs ) over α ∈ ∆s (αs+1 ). Now according to definition of Ys+1 we can write: Ys+1 = {yxs+2:n | y ∈ Xs+1 (αs+1 ; Πs+1 )} − = {y(αs+1 )s+1:s+1 xs+2:n | y ∈ Xs (αs+1 ; Π− s+1 )} [ {y(αs+1 )s+1:s+1 xs+2:n | y ∈ Xs (α; Πs )} = α∈∆s (αs+1 ) It only remains to check that in the last union the set corresponding to α ∈ ∆s (αs+1 ) is exactly equal to Ys (α). Part (b) Let p be the start position of αs+1 , i.e. αs+1 = ([p, s + 1], ·). Consider labeling y ∈ Ys+1 , we then must have y = ∗αs+1 ∗. Let β = ([i, j], ·) be a pattern with y = ∗β∗, j > s. We will prove that i ≥ p; this will imply the claim. Suppose on the contrary that i < p. Denote γ = βi:s+1 , then γ ∈ Πs+1 and γ = +αs+1 . Therefore, y1:s+1 ∈ / Xs+1 (αs+1 ; Πs+1 ) (since y1:s+1 = ∗γ). However, this contradicts the assumption that y ∈ Ys+1 = Ys+1 (αs+1 ). 4 Computing marginals In this section we again consider the semiring (R, ⊕, ⊗) = (R, +, ×) from Example 1 where all costs cα are strictly positive, and consider a probablity distribution p(x) = f (x)/Z over labelings x ∈ D1:n . For a pattern α we define Ω(α) = {x ∈ D1:n | x = ∗α∗} X Z(α) = f (x) (20) (21) x∈Ω(α) We also define the set of patterns Π = {α | ∃α∗, ∗α ∈ Π◦ , α is non-empty} (22) Note that Π◦ ⊆ Π and |Πs | = |I(Γ)| for indexes s that are sufficiently far fromP the boundary. We will present an algorithm for computing Z(α) for all patterns α ∈ Π in time O(n α∈I(Γ) |α|). Marginal probabilities of a pattern-based CRF can then be computed as p(xi:j = α) = Z(α)/Z for a pattern α = ([i, j], ·). In the previous section we used graph G[Πs ] for a set of patterns Πs ; here we will need an analogous but a slightly different construction for patterns in Π. For patterns α, β we write α v β if β = ∗α∗. If we have β = +α+ then we write α < β. Now consider α ∈ Π. We define Φ(α) to be the set of patterns β ∈ Π such that α < β and there is no other pattern γ ∈ Π with α < γ v β. Our algorithm is given below. In the first step it runs Algorithm 1 from left to right and from − → ← − right to left; as a result, we get forward messages W j (α) and backward messages W i (α) for patterns α = ([i, j], ·) such that X X − → ← − W j (α) = f (x) W i (α) = f (y) (23) x=∗α x∈D1:j y=α∗ y∈Di:n 9 Algorithm 3 Computing values Z(α) 1: 2: − → ← − run Algorithm 1 in both directions to get messages W j (α), W i (α). For each pattern α = ([i, j], ·) ∈ Π set − → ← − W j (α)W i (α) W (α) := (24a) f (α) − → ← − W j−1 (αi:j−1 )W i+1 (αi+1:j ) W − (α) := (24b) f (αi+1:j−1 ) for α ∈ Π (in the order of decreasing |α|) set X   Z(β) − W − (β) Z(α) := W (α) + (25) β∈Φ(α) Theorem 6. Algorithm 3 is correct. We prove the theorem in section 4.1, but first let us discuss algorithm’s complexity. We claim that all values f (α) used by the algorithm can be computed in O(n(P + S)) time where P and S are respectively the number of distinct non-empty prefixes and suffixes of words in Γ. Indeed, we first → − compute these values for patterns in the set Π , {α | ∃α∗ ∈ Π◦ }; by Lemma 1, this takes O(nP ) time. This covers values f (α) used in eq. (24a). As for the value in eq. (24b) for pattern α = ([i, j], ·) ∈ Π, we can use the formula f (α)c̃α f (αi+1:j−1 ) = → − ← − φ (α) φ (α) where c̃α = cα if α ∈ Π◦ and c̃α = 1 otherwise, and Y → − φ (α) = cβ , β∈Π◦ ,α=∗β Y ← − φ (α) = cβ β∈Π◦ ,α=β ∗ The latter values can be computed in O(n(P + S)) time by applying Lemma 1 in the forward and backward directions. (In fact, they were already computed when running Algorithm 1.) We showed that step 1 can be implemented step 2. The P in O(n(P + S)) time; let us analyzeP following lemma implies that it performs O(n |α|) arithmetic operations; since α∈I(Γ) α∈I(Γ) |α| ≥ P P α∈Γ |α| ≥ max {P, S}, we then get that the overall complexity is O(n α∈I(Γ) |α|). Lemma 7. For each β ∈ Π there exist at most 2|β| patterns α ∈ Π such that β ∈ Φ(α). Proof. Let Ψ be the set of such patterns α. Note, there holds β = +α+. We need to show that m , |Ψ| ≤ 2|β|. Let us order patterns α = ([i, j], ·) ∈ Ψ lexicographically (first by i, then by j): Ψ = {α1 , . . . , αm } with αt = ([it , jt ], ·), and denote σt = (it − k) + (jt − k) ∈ [2, 2(` − k − 1)] where [k, `] is the interval for β. We will prove by induction that σt ≥ t + 1 for t ∈ [1, m]; this will imply that m + 1 ≤ σm ≤ 2(` − k − 1) = 2(|β| − 2), as desired. The base case is trivial. Suppose that it holds for t − 1; let us prove it for t. If it = it−1 then jt > jt−1 by the definition of the order on Ψ, so the claim holds. Suppose that it > it−1 . If jt < jt−1 then αt < αt−1 < β contradicting the condition β ∈ Φ(αt ). Thus, jt ≥ jt−1 , and so the claim of the induction step holds. 10  Remark 1 An alternative method for computing marginals with complexity O n|Γ|L2 `2max was − → ← − given in [10]. They compute value Z(α) directly from messages M j 0 (·) and M i0 (·) by summing over pairs of patterns (thus the square factor in the complexity). In contrast, we use a recursive rule that uses previously computed values of Z(·). We also use the existence of the “ ” operation. This allows us to achieve better complexity. 4.1 Proof of theorem 6 Consider labeling x ∈ D1:n . We define Λ(x) = {α ∈ Π◦ | x = ∗α∗} to be the set of patterns contained in x. For an interval [i, j] ⊆ [1, n] we also define sets Λij (x) = {β ∈ Λ(x) | β = +xi:j +} (26a) Λ− ij (x) (26b) = {β ∈ Λ(x) | β = ∗xi:j ∗} and corresponding costs Y fij (x) = cβ (27a) cβ (27b) β∈Λ(x)−Λij (x) fij− (x) Y = β∈Λ(x)−Λ− ij (x) It can be checked that quantities W (α), W − (α) defined via (23) and (24) satisfy X X W (α) = fij (x) W − (α) = fij− (x) x∈Ω(α) (28) x∈Ω(α) where [i, j] is the interval for α. Consider pattern α = ([i, j], ·) ∈ Π. We will show that for any x ∈ Ω(α) there holds X   − f (x) = fij (x) + f (x) − fk` (x) (29) β=([k,`],·)∈Φ(α):x=∗β∗ This will be sufficient for establishing algorithm’s correctness: summing these equations over x ∈ Ω(α) and using (21),(28) yields eq. (25). Lemma 8. The sum in (29) contains at most one pattern β = ([k, `], ·) ∈ Φ(α) with x = ∗β∗. Proof. Consider two such patterns β 1 = ([k 1 , `1 ], ·) and β 2 = ([k 2 , `2 ], ·). Define k = max{k 1 , k 2 }, ` = min{`1 , `2 }, β = xk:` , then α < β v β t for t ∈ {1, 2}. Using the definition of set Π, it can be checked that β ∈ Π. The fact that β t ∈ Φ(α) then implies that β t = β for t ∈ {1, 2}, and so β 1 = β 2 . We now consider two possible cases. Case 1: There are no patterns β = ([k, `], ·) ∈ Φ(α) with x = ∗β∗. This implies that Λij (x) is empty, and therefore f (x) = fij (x). Eq. (29) thus holds. Case 2: There exists a (unique) pattern β = ([k, `], ·) ∈ Φ(α) with x = ∗β∗. Eq. (29) then becomes − equivalent to the condition fij (x) = fk` (x). We will prove this by showing that Λij (x) = Λ− k` (x). − The inclusion Λk` (x) ⊆ Λij (x) is obvious; let us show the other direction. Suppose that γ = ([p, q], ·) ∈ Λij (x). Define p̂ = max{k, p}, q̂ = min{q, `}, γ̂ = xp̂:q̂ . It can be checked that γ̂ ∈ Π. We also have α < γ̂ v β. Therefore, condition β ∈ Φ(α) implies that γ̂ = β, and so p ≤ k, q ≥ `, and γ ∈ Λ− k` (x). 11 5 General case: O(nP 0 |D|) algorithm In this section and in the next one we consider the case of a general commutative semiring (R, ⊕, ⊗) (without assuming the existence of an inverse operation for ⊕). This can be used for computing MAP in CRFs containing positive costs cα . The algorithm closely resembles the method in [10]; it is based on the same idea and has the same complexity. Our primary goal of presenting this algorithm is to motivate the O(nP log(`max + 1)) algorithm for the MAP problem given in the next section. First, we select Π as the set of proper prefixes of patterns in Π◦ : Π = {α | ∃α+ ∈ Π◦ } (30) For each α ∈ Πs we will compute message M Ms (α) = f (x) (31) x∈Xs (α;Πs ) b s: In order to go from step s−1 to s, we will use an extended set of patterns Π b s = {α | α− ∈ Πs−1 } ∪ {εs } Π = {αc | α ∈ Πs−1 , c ∈ D s:s (32) } ∪ {εs } It can be checked that b s and Π◦s ⊆ Π bs Πs ⊆ Π (33) b s . Note, we now use the generalized In step s we compute values Ms (α) in eq. (31) for all α ∈ Π definition of Xs (α; Πs ) (eq. (9)) since we may have α ∈ / Πs . After completing step s, messages Ms (α) b s −Πs can be discarded. for α ∈ Π b s | = P 0 |D| + 1 for indexes s that are sufficiently far from Our algorithm is given below. We have |Π the boundary, and thus the algorithm’s complexity is Θ(nP 0 |D|) (if Lemma 1 is used for computing values φ(α)). L Algorithm 4 Computing Z = x∈D1:n f (x) 1: initialize messages: set M0 (ε0 ) := O b s of tree G[Π b s ] starting from the leaves and set 2: for s = 1, . . . , n traverse nodes α ∈ Π M   Ms (α) := φ(α) ⊗ Ms−1 (α− ) ⊕ Ms (β) (34) b s ],β ∈Π (α,β)∈E[Π / s − If α = εs then Luse Ms−1 (α ) = O 3: return Z := α∈Πn Mn (α) Theorem 9. Algorithm 4 is correct. Remark 2 As we already mentioned, Algorithm 4 resembles the algorithm in [10]. The latter computes the same set of messages as we do but using the following recursion: for a pattern α ∈ Πs − {εs } they set M Ms (α) := φ(γa) ⊗ Ms−1 (γ) (35) γ∈Ts−1 (α− )− Ts−1 (β − ) S (α,β)∈E[Πs ] 12 where a = αs:s is the last letter of α and Ts−1 (β) = {γ | γ = ∗β, γ ∈ Πs−1 } for β ∈ Πs−1 is the set of patterns in the branch of G[Πs−1 ] rooted at β. It can be shown that updates (34) and (35) are equivalent: they need exactly the same number of additions (and the same number of multiplications, if φ(γa) in eq. (35) is replaced with φ(α) and moved before the sum). 5.1 Proof of Theorem 9 b s. To prove the correctness, we need to show that eq. (34) holds for each α ∈ Π b s there holds Lemma 10. For any α ∈ Π φ(α) ⊗ Ms−1 (α− ) = M f (x) (36) b s) x∈Xs (α;Π b s (since εs−1 ∈ Πs−1 ), therefore Xs (α; Π b s) = ∅ Proof. For α = εs the claim is trivial: we have Ds:s ⊆ Π b and the sum in (36) is O. We thus assume that α ∈ Πs − {εs }. Using definition (33), it can be checked b s ) → Xs−1 (α− ; Πs−1 ). Consider x ∈ Xs (α; Π b s ). We that the mapping x 7→ x− is a bijection Xs (α; Π b s (since Π◦ ⊆ Π b s ), and so if claim that if x = ∗γ and γ ∈ Π◦ then |γ| ≤ |α|. Indeed, we have γ ∈ Π s b |γ| > |α| then x ∈ / Xs (α; Πs ) - a contradiction. Using the claim, we conclude that φ(α) ⊗ f (x− ) = f (x). This implies the lemma. b s implies the following characterization of Xs (α; Πs ) for α ∈ Π b s: The fact Πs ⊆ Π   x 6= ∗β for any β in the subtree Xs (α; Πs ) = x ∈ Xs (α) b s ] with β ∈ Πs , β 6= α of α in G[Π b s ] is defined as the set of descendants of α in G[Π b s ] (including α). where the subtree of α in G[Π b b Now it becomes clear that Xs (α; Πs ) ⊆ Xs (α; Πs ) and Xs (α; Πs )−Xs (α; Πs ) equals the set of partial labelings x ∈ Xs (α) such that b s − Πs , (α, β) ∈ E[Π b s ], and • x ends with β ∈ Π b s ]. • x does not end with any pattern γ ∈ Πs from the subtree of β in G[Π It is easy to check that the last set of partial labelings equals Xs (β; Πs ), and such sets for different b s ) and Xs (β; Πs ) for β’s are disjoint. We showed that Xs (α; Πs ) is a disjoint union of sets Xs (α; Π b (α, β) ∈ E[Πs ], β ∈ / Πs . This fact together with Lemma 10 implies eq. (34). 6 General case: O(nP log P ) algorithm In the previous section we presented an algorithm for a general commutative semiring with complexity O(nP 0 |D|). In some applications the size of the input alphabet can be very large (e.g. hundreds or thousands), so the technique may be very costly. Below we present a more complicated version with complexity O(nP log P ). If (R, ⊕, ⊗) = (R, min, +) then this can be reduced to O(nP log(`max + 1)) using the algorithm for Range Minimum Queries by [1]. We assume that D ⊆ Γ. b s as in the previous section, and the same We will use the same definitions of sets Πs and Π intepretation of messages Ms (α) given by eq. (31). We need to solve the following problem: given messages Ms−1 (α) for α ∈ Πs−1 , compute messages Ms (α) for α ∈ Πs . 13 α ͘͘͘ ͘͘͘ ͘͘͘ β ͘͘͘ ͘͘͘ ͘͘͘ ͘͘͘ ͘͘͘ ͘͘͘ ͘͘͘ ͘͘͘ ͘͘͘ ͘͘͘ ͘͘͘ ͘͘͘ β↓ ͘͘͘ ͘͘͘ ͘͘͘ ͘͘͘ ͘͘͘ ͘͘͘ ͘͘͘ ͘͘͘ ͘͘͘ ͘͘͘ ͘͘͘ ͘͘͘ ͘͘͘ ͘͘͘ b s ] rooted at a node α ∈ Σs . White circles represent nodes Figure 2: Structure of the subtree of G[Π in As (so all their children are also white), gray circles - nodes in Bs , and black circles - nodes in Σs . Note, if β ∈ Bs is a child of α then (α, β↓ ) ∈ E[Σs ]. Recall that in the previous section this was done by computing messages Ms (α) for patterns in b s of size O(P 0 |D|). The idea of our modification is to compute these messages only the extended set Π for patterns in the set Σs where bs Σ◦s ⊆ Σs ⊆ Π Σ◦s = Πs ∪ Π◦s |Σs | ≤ 2|Σ◦s | Note that |Σ◦s | ≤ P + 1. Patterns in Σs will be called special. To define them, we will use the following b s: notation for a node α ∈ Π b s (α) is the set of children of α in the tree G[Π b s ]. • Φ b s ] rooted at α. We have α ∈ Tbs (α) ⊆ Π b s. • Tbs (α) is the set of nodes in the subtree of G[Π b s is special if either (i) α ∈ Σ◦ , or (ii) α has at least We now define set Σs as follows: pattern α ∈ Π s b s (α) such that subtree Tbs (βi ) for i ∈ {1, 2} contains a pattern from Σ◦ , i.e. two children β1 , β2 ∈ Φ s Tbs (βi ) ∩ Σ◦s 6= ∅. b s − Σs will be split into two sets As and Bs as follows: The set of remaining patterns Π b s − Σ◦ such that subtree Tbs (α) does not contain patterns from • As is the set of patterns α ∈ Π s ◦ Σs . b s − Σ◦ such that α has exactly one child β in G[Π b s ] for which • Bs is the set of patterns α ∈ Π s ◦ b Ts (β) ∩ Σs 6= ∅. b s is a disjoint union of As , Bs and Σs . Clearly, Π b s ] that Consider a node α ∈ Bs . From the definition, α has exactly one link to a child in G[Π belongs to Bs ∪ Σs . If this child does not belong to Σs , then it belongs to Bs and the same argument can be repeated for it. By following such links we eventually get to a node in Σs ; the first such node will be denoted as α↓ . We will need two more definitions. For an index t and patterns α, β ending at position t with β = +α we denote M Wt (α) = f (x) (37a) x∈Xt (α) M Vt (α, β) = f (x) x∈Xt (α)−Xt (β) We can now formulate the structure of the algorithm (see Algorithm 5). 14 (37b) L Algorithm 5 Computing Z = x∈D1:n f (x) 1: initialize messages: set M0 (ε) := O 2: for each s = 1, . . . , n traverse nodes α ∈ Σs of tree G[Σs ] starting from the leaves and set M Ms (β) Ms (α) := φ(α) ⊗ [Ms−1 (α− ) ⊕ As (α) ⊕ Bs (α)] ⊕ (38) (α,β)∈E[Σs ],β ∈Π / s where As (α) = M Ws−1 (β − ) (39a) Vs−1 (β − , β↓ − ) (39b) b s (α)∩As β∈Φ Bs (α) = M b s (α)∩Bs β∈Φ − If α = εs then Luse Ms−1 (α ) := O 3: return Z := α∈Πn Mn (α) To fully specify the algorithm, we still need to describe how we compute quantities As (α) and Bs (α) defined by eq. (39a) and (39b). This is addressed by the theorem below. Theorem 11. (a) Algorithm 5 is correct. (b) There holds |Σs | ≤ 2|Σ◦s | − 1 ≤ 2P + 1. (c) Let h be the maximum depth of tree G[Πs−1 ]. (Note, h ≤ `max + 1.) With an O(P 0 log h) preprocessing, values Vs−1 (α, β) for any α, β ∈ Πs−1 with β = +α can be computed in O(log h) time. (d) Values As (α) for all α ∈ Σs can be computed in O(P log P ) time, or in O(P ) time when (R, ⊕, ⊗) = (R, min, +). Clearly, the theorem implies that the algorithm can be implemented in O(nP log P ) time, or in O(nP log(`max + 1)) time when (R, ⊕, ⊗) = (R, min, +). To see this, observe that the sum in (39b) is effectively over a subset of children of α in the tree G[Σs ] (see Fig. 2), and this tree has size O(P ). Before presenting the proof, let us make a few remarks. To give some insights into how we prove the theorem, let us make a few remarks. b s ] has the following structure: the root εs has |D| children, It can be easily checked that graph G[Π s:s b s the subtree of G[Π b s ] rooted at c is isomorphismic to the tree G[Πs−1 ]. and for each child c ∈ D ⊆ Π b The isomorphism Ts (c) → Πs−1 is given by the the mapping α 7→ α− . For nodes α, β ∈ Πs−1 with β = +α we denote Ps−1 (α, β) to be the unique path from α to β in b s with β = +α let G[Πs−1 ] (treated as a set of edges in E[Πs−1 ]). Analogously, for nodes α, β ∈ Π b b Ps (α, β) be the unique path from α to β in G[Πs ]. It follows from the previous paragraph that if bs (α, β) is isomorphic to the path Ps−1 (α− , β − ). α 6= εs then path P 6.1 Proof of Theorem 11(a) The statement is equivalent to the correctness of (38). Let us first divide the sum over β in the last b expression (38) into two parts: nodes β that belong to Φ(α) and those that do not: M M Ms (β) ⊕ Ms (β) (40) b s (α)∩(Σs −Πs ) β∈Φ (α,β)∈E[Σs ],β ∈Π / s ∪Φs (α) 15 P It is easy to see that the second sum can be written as β∈Φb s (α)∩Bs M s (β↓ ) (see Fig. 2), where ( Ms (γ) if γ ∈ / Πs (41) M s (γ) = O otherwise Using the distributive law, we can rewrite (38) as   Ms (α) := φ(α) ⊗ Ms−1 (α− ) M [φ(α) ⊗ Ws−1 (β − )] ⊕ b s (α)∩As β∈Φ M ⊕ [φ(α) ⊗ Vs−1 (β − , β↓ − )] ⊕ M s (β↓ ) b s (α)∩Bs β∈Φ M ⊕ Ms (β) (42) b s (α)∩(Σs −Πs ) β∈Φ We will use eq. (34) (for which the correctness is already proved) for the case when α ∈ Σs . We can rewrite it as follows (we use the fact that As ∩ Πs = Bs ∩ Πs = ∅): M   Ms (α) := φ(α) ⊗ Ms−1 (α− ) ⊕ Ms (β) b s (α)∩As β∈Φ ⊕ M M Ms (β) ⊕ Ms (β) (43) b s (α)∩(Σs −Πs ) β∈Φ b s (α)∩Bs β∈Φ The first and the last terms of the sum in (43) equal to that of the sum in (42). The lemma below implies that the same holds for the second and third terms, thus proving the correctness of eq. (42). Lemma 12. (a) For any α ∈ As there holds Ms (α) = φ(α) ⊗ Ws−1 (α− ) (44) (b) For any α ∈ Bs there holds Ms (α) = [φ(α) ⊗ Vs−1 (α− , α↓ − )] ⊕ M s (α↓ ) (45) Proof. Part (a) Suppose that α ∈ As . This means that there are no patterns β ∈ Π◦s of the form β = +α (recall that Π◦s ⊆ Σ◦s ). This in turn implies that Ms (α) = Ws (α). This also implies that for any x ∈ Xs (α) there holds f (x) = f (x− ), and consequently Ws (α) = φ(α) ⊗ Ws−1 (α− ). Part (b) Suppose that α ∈ Bs . The definition of Bs implies that set Tbs (α) − Tbs (α↓ ) does not contain nodes in Πs or in Π◦s . Using this fact and the definition of sets Xs (·), Xs (·; ·) we get the following. (i) If α↓ ∈ Πs then Xs (α; Πs ) = Xs (α) − Xs (α↓ ). (ii) If α↓ ∈ / Πs then Xs (α; Πs ) is a disjoint union of Xs (α) − Xs (α↓ ) and Xs (α↓ ; Πs ). (iii) Partial labeling x ∈ Xs (α) − Xs (α↓ ) cannot end with a pattern β = +α ∈ Π◦s . (If such β exists then from the fact above we get β ∈ Tbs (α↓ ), i.e. β = ∗α↓ and x ∈ XsP (α↓ ) - a contradiction.) Therefore, for such x we have f (x) = φ(α) ⊗ f (x− ). This implies that x∈Xs (α)−Xs (α↓ ) f (x) = φ(α) ⊗ Vs−1 (α− , α↓ − ). P Recall that Ms (α) = x∈Xs (α;Πs ) f (x). Using this fact and properties (i)-(iii), we conclude that (45) holds in each of the two cases (α↓ ∈ Πs and α↓ ∈ / Πs ). 16 6.2 Proof of Theorem 11(b) b s we denote Ts◦ (α) = Tbs (α) ∩ Σ◦s . For a node α ∈ Π b s ] starting from the root. At Let us consider the process of a breadth-first search in the tree G[Π each step we will keep a certain set of nodes of the tree (which we call active nodes), and the transition to the next step is made by choosing one of the active nodes and replacing it with its children. The process stops when the set of active nodes becomes equal to the set of the leaves of the tree. To each step of the process we correspond a partition of the set Σ◦s . The partition is defined by the following k S S Ts◦ (α` ) {α}. Let rule: if α1 , . . . , αk are active nodes, then the partition is Σ◦s = `=1 / s◦ (α` ),`=1,k α∈Σ◦s ,α∈T us denote the partition at step t as Dt . Partitions of the set Πs is a poset with respect to the natural order defined as follows: {Si }i∈I ≤ {Pj }j∈J if for any i ∈ I there is j ∈ J such that Si ⊆ Pj . It is easy to see that D0 ≥ D1 ≥ D2 ≥ . . .. Moreover, if a chosen active node α at step t is a special one and does not belong to Σ◦s then Dt > Dt+1 . Indeed, there are at least two children of α, denoted as α1 and α2 , such that sets Ts◦ (α1 ) and Ts◦ (α2 ) are nonempty (by the definition of a special node). As step t + 1 these sets are separate components of partition Dt+1 , but at step t these sets still belong to the same component of Dt ; thus, Dt 6= Dt+1 . We know that the length of a chain Dt1 > Dt2 > . . . cannot exceed |Σ◦s |. We conclude that the number of special patterns that do not belong to Σ◦s is bounded by |Σ◦s |−1; this implies Theorem 11(b). 6.3 Proof of Theorem 11(c) For brevity denote t = s − 1, and define a set of pairs J = {(α, β) | α, β ∈ Πt , β is a strict descendant of α in G[Πt ]} Note that E[Πt ] ⊆ J. In this section we describe a O(P 0 log h) preprocessing which will allow computing values Vt (α, β) for any (α, β) ∈ J in O(log h) time. The procedure will be based on the following observation; it follows trivially from the definition (37b). Lemma 13. For any (α, β) ∈ J there holds Vt (α, β) = M Vt (α0 , β 0 ) (46) (α0 ,β 0 )∈Pt (α,β) During preprocessing we will compute values Vt (α, β) for pairs (α, β) in a certain set Je ⊆ J of size e we need some notation. For a pattern α ∈ Πt let hα = |Pt (εt , α)| be O(P 0 log h). In order to define J, the height of α in G[Πt ], and for an integer d ∈ [0, hα ] let α↑d be the node of tree G[Πt ] obtained from α by taking d steps towards the root. We now define Je = {(α↑d , α) | α ∈ Πt , d ∈ [0, hα ], d = 2r for r ∈ Z≥0 } The preprocessing will consist of 3 steps. Step 1: compute values Wt (α) for all α ∈ Πt . We do it by traversing nodes α ∈ Πt of tree G[Πt ] and setting M Wt (α) := Mt (α) ⊕ Wt (β) (47) (α,β)∈E[Πt ] This takes O(P 0 ) time. Step 2: go through α ∈ Πt and compute values Vt (α, β) for all β ∈ Φt (α) where Φt (α) is the set of children of α in G[Πt ]. 17 A naive way is to use the formula M Vt (α, β) = Mt (α) ⊕ Wt (γ) γ∈Φt (α)−{β} for all β ∈ Γt (α); however, this would take O(k 2 ) time where k = |Φt (α)|. Instead, we do the following. Let us order patterns in Φt (α) arbitrarily: Φt (α) = {β1 , . . . , βk }. For i ∈ [1, k] denote i−1 k M ← − Si = Wt (βj ) M → − Si = Wt (βj ) j=1 j=i+1 → − ← − We compute these values in O(k) time by setting S 1 := O, S k := O and then using recursions → − → − S i+1 := S i ⊕ Wt (βi ) After that we set ← − ← − S i−1 := S i ⊕ Wt (βi ) → − ← − Vt (α, βi ) := Mt (α) ⊕ S i ⊕ S i For a given α ∈ Πt the procedure takes O(|Φt (α)|) time, and thus for all α ∈ Πt it takes O(P 0 ) time. We now have values Vt (α, β) for all (α, β) ∈ E[Πt ]. Step 3: compute values Vt (α, β) for all (α, β) ∈ Je using the recursion Vt (α↑2d , α) := Vt (α↑2d , α↑d ) + Vt (α↑d , α) e for d = 20 , 21 , . . . , 2r , . . . and (α↑2d , α) ∈ J. Evaluating queries for (α, β) ∈ J We showed how to compute values Vt (α, β) for (α, β) ∈ Je in time O(P 0 log h); let us now describe how to compute value Vt (α, β) for a given (α, β) ∈ J in time O(log h). Let us construct a sequence β0 , β1 , . . . , as follows: β0 = β, and for i ≥ 0 let βi+1 = βi↑d where d is the maximum value such that d = 2r for r ∈ Z≥0 and βi↑d is still a descendant of α. We stop when we get βk = α; clearly, this happens after k = O(log h) steps. We now set Vt (α, β) := k−1 M Vt (βi+1 , βi ) i=0 6.4 Proof of Theorem 11(d) We will consider the general case of a commutative semiring and the case when (R, ⊕, ⊗) = (R, min, +); the latter will be called the MAP case. e Let dα for α ∈ Πs−1 be the number of children of α in G[Πs−1 ], dP max = maxα∈Πs−1 dα , and dα for α ∈ Σs be the number of children of α in G[Σs ]. We will present a O( α∈Πs−1 dα log dα ) preprocessing technique that will allow computing value As (α) for α ∈ Σs − {εs } in time O((deα + 1) log dα− ). The resulting complexity will be P P O( dα log dmax ) + O((deα + 1) log dmax ) = O(P log dmax ) α∈Πs−1 α∈Σs In the MAP case (i.e. when +)) we will present a faster solution. Namely, the P (R, ⊕, ⊗) = (R, min, 0 preprocessing will take O( α∈Πs−1 dα ) = O(P ) time, and computing value As (α) for α ∈ Σs − {εs } will take O(deα + 1) time, leading to the overall complexity O(P ). For that we will use the Range Minimum Query (RMQ) problem which is defined as follows: given N numbers z1 , . . . , zN , compute 18 mink∈I zk for a given interval I = [i, j] ⊆ [1, N ]. It is known [1] that with an O(N ) preprocessing each query for can be answered in O(1) time per interval. As in the previous section, we denote t = s − 1. We assume that for each α ∈ Πt we already have values Wt (α) for all α ∈ Πt (they were computed in the previous section). Preprocessing Consider α ∈ Πt , and let us fix an ordering of children of α: Φt (α) = {β1 , . . . , βd } where d = dα . For an interval I ⊆ [1, d] we denote M SI (α) = Wt (βi ) (48) i∈I The goal of preprocessing is to build a data structure that we will allow an efficient computation of SI (α) for any given interval I. In the MAP case we simply run the preprocessing of [1] for the sequence Wt (β1 ), . . . , Wt (βd ); this takes O(d) time. Value SI (α) for an interval I can then be computed in O(1) time. In the general case we do the following. Define a set of intervals Jd = {[i, j] ⊆ [1, d] | j − i = 2r − 1, r ∈ Z≥0 } Note that |Jd | = O(d log d). We compute quantities SI (α) for all I ∈ Jd . This can be done in O(d log d) time by setting S[i,i] (α) := Wt (βi ) for i ∈ [1, d] and then using recursions S[i,i+2δ−1] (α) = S[i,i+δ−1] (α) ⊕ S[i+δ,i+2δ−1] (α) for δ = 20 , 21 , . . .. Value SI (α) for an interval I can now be computed in S O(log d) time. Indeed, we can represent I as a disjoint union of m = O(log d) intervals from Jd : I = m i=1 Ii with Ii ∈ Jd . We can then use the formula m M SI (α) = (49) SIi (α) i=1 b s (α) (the set of children Computing As (α) for α ∈ Σs −{εs } Denote d = dα− . As discussed earlier, Φ − b s ]) is isomorphic to Φs−1 (α ). Let Γ b s (α) = {β1 , . . . , βd } be the ordering of patterns in of α in G[Π − − b Φs (α) such that β1 , . . . , βd is the ordering of patterns in Φs−1 (α− ) chosen in the preprocessing step. We need to compute M As (α) = Ws−1 (βi− ) , J , {i ∈ [1, d] | βi ∈ As } i∈J Denote J = [1, d] − J. We can represent J as a disjoint union of at most |J| + 1 intervals I1 , . . . , Im where Ii ⊆ [1, p]. Clearly, |J| = deα (see Fig. 2), and so m ≤ deα + 1. We can write As (α) = m M SIi (α− ) (50) i=1 As discussed above, each value SIi (α− ) can be computed in O(1) time in the MAP case and in O(log d) in the general case. Thus, computing As (α) takes respectively O(deα + 1) and O((deα + 1) log dα− ) time, as desired. 19 7 MAP for non-positive costs In this section we assume that (R, ⊕, ⊗) = (R, min, +) and cα ≤ 0 for all α ∈ Π◦ . [2] gave an algorithm that makes Θ(nP ) comparisons and Θ(nP ) additions. We will present a modification that makes only O(n|I(Γ)|) comparisons. The number of additions in general will still be O(nP ), but we will show that in certain scenarios it can be reduced using a Fast Fourier Transform (FFT). We will assume that Γ contains at least one word α with |α| = 1 (it can always be added if needed). As usual, we first select a set of patterns Π with Π0 = {ε0 }; this step will be described later. For a pattern α ∈ Π let α← be the longest proper prefix of α that is in Π (α = α← +, α← ∈ Π). If Π does not contains proper prefixes of α then α← is undefined. We can now present the algorithm. Algorithm 6 Computing Z = min f (x) (if cα ≤ 0) x∈D1:n initialize messages: set M0 (ε0 ) := 0 2: for s = 1, . . . , n traverse nodes α ∈ Πs of forest G[Πs ] starting from the leaves and set 1: Ms (α) := min{Mp (α← ) + ψ(α), min (α,β)∈E[Πs ] Ms (β)} (51) where p is the end position of α← (α← = ([·, p], ·)) and ψ(α) = f (α) − f (α← ). If α← is undefined then ignore the first expression in (51). 3: return Z := minα∈Πn Mn (α) Selecting Π It remains to specify how to choose set Π. For patterns α, β, γ we define hα|β|γi = {u = +β + | αβγ = ∗u∗} Theorem 14. Suppose that Π0 = {ε0 } and set Π contains set   ∃ labeling xαβγy ∈ D1:n s.t. e Π= β (a) αβ, βγ ∈ Π◦ ; (b) hxα|β|γyi ∩ Π◦ = ∅ (52) (53) Then Alg. 6 returns the correct value of Z = min f (x). x∈D1:n A proof of this theorem is given in Sec. 7.2. e is slightly more A simple valid option is to set Π = {α | ∃α∗, ∗α ∈ Π◦ }. Computing set Π complicated, but can still be done in polynomial time for a given Π (we omit this procedure). In order e let us define to analyze set Π,   ∃ word xαβγy with |x| = |y| = δ Iδ = β s.t. (a) αβ, βγ ∈ Γ; (b) hxα|β|γyi ∩ Γ = ∅ where set h·|·|·i for words is defined similarly to (52): hα|β|γi = {α̂βγ̂ | α = ∗α̂, γ = γ̂ ∗ and α̂, γ̂ 6= ε} (54) As δ increases, set Iδ monotonically shrinks, and stops changing after δ ≥ `max = maxα∈Γ |α|. We e s = {([·, s], α) | α ∈ I∞ } denote this limit set as I∞ , so that I∞ ⊆ I0 ⊆ I(Γ) ∪ {ε}. It can be seen that Π for all s ∈ [`max , n−`max +1]. e The algorithm performs two types of operations: comparComplexity Assume that we use Π = Π. isons (to compute minima) and arithmetic operations (to compute the first expression in (51)). The 20 number of comparisons does not exceed the total number of edges in graphs G[Πs ] = (Πs , E[Πs ]) for s ∈ [1, n], which is smaller than the number of nodes (since graphs are forests). Thus, comparisons take O(n|I∞ |) time. The time for arithmetic operations depends on how we compute quantities f (α). One possible b where Π b is the set of prefixes of patterns approach is to use Lemma 1 for computing f (α) for all α ∈ Π ◦ b We have |Π b s | ≤ P + 1, and therefore the resulting overall complexity is in Π (note that Π ⊆ Π). O(nP ). Next, we describe an alternative approach based on a Fast Fourier Transform. 7.1 Computing f (α) using FFT For a word α and index s ≥ |α| let αs be the pattern ([s − |α| + 1, s], α). It is easy to see that X X f (αs ) = fs (α|β) where fs (α|β) = cβt t:αs =∗βt ∗ β∈Γ Lemma 15. For fixed words α, β quantities fs (α|β) for s ∈ [1, n] can be computed in O(n log n) time. Proof. We assume that |α| ≥ |β|, otherwise the claim is trivial. Let p = |α| − |β| + 1, and define sequences a ∈ Rn−|α|+1 , b ∈ Rn−|β|+1 , λ ∈ {0, 1}p via ai = fi+|α| (α|β) ∀i ∈ [1, n−|α|] bj ∀j ∈ [1, n−|β|+1] = c([j,j+|β|−1],β) ∀k ∈ [1, p] λk = [αk:k+|β|−1 = β] where [·] is the Iverson bracket. It can be checked that ai = p X ∀i ∈ [1, n−|α| ] bi+k λk k=1 Thus, a is the convolution of b and the reverse of λ. The convolution of such sequences can be computed in O(n log n) using a Fast Fourier Transform. In practice this method can be useful for computing fs (α|β) when |α|  |β|. A natural way to do this is first choose a subset S ⊆ Γ of words that are very often included as subwords in words from I∞ (usually, this means S = {β | β ∈ Γ, |β| ≤ δ} where δ is some threshold constant). Then computing fs (α|β) for all α ∈ I∞ and β ∈ S will take O (|I∞ | · |S| n log n) time. For β ∈ Γ − S quantities fs (α|β) can be computed directly. An example of using such an approach is the following theorem; it is proved by taking δ = 1 and S = D. Theorem 16. Suppose Γ = D ∪ A where A consists of words of a fixed length `. Then Algorithm 6 can be implemented in O (|I∞ | · |D| n log n) time. 7.2 Proof of Theorem 14 (correctness) First, let us prove that for all patterns α = ([·, s], ·) ∈ Π there holds Ms (α) ≥ min x=∗α∈D1:s f (x) (55) We use induction on the order used in the algorithm. The base case α = ε0 is ensured by the initialization step. Consider pattern α ∈ Π − {ε0 }. Suppose that α← is defined; let p be the end 21 position of α← . Consider partial labeling y = ∗α← ∈ D1:p , and let x be its unique extension by s − p letters (x = y+) such that x = ∗α. Due to non-positivity of costs cβ we have X f (x) = f (y) + ψ(α) + cβ ≤ f (y) + ψ(α) β=([i,j],·)∈Π◦ x=∗β∗ i≤s−|α|, j>p Applying the induction hypothesis and the inequality above yields the desired claim: Ms (α) = min{Mp (α← ) + ψ(α), min (α,β)∈E[Πs ] ≥ min{ min← f (y) + ψ(α), y=∗α Ms (β)} min min f (x)} (α,β)∈E[Πs ] x=∗β ≥ min{ min f (x), min f (x)} = min f (x) x=∗α x=∗α x=∗α where in the equations above x always denotes a partial labeling in D1:s and y denotes a partial labeling in D1:p . If α← is undefined then we can write similar inequalities but omitting expressions contaiting α← . By applying the claim to patterns α = ([·, n], ·) ∈ Π we conclude that Z ≥ minx∈D1:n f (x). The remainder of this section is devoted to the proof of the reverse inequality: Z ≤ minx∈D1:n f (x). Let us fix x∗ ∈ arg minx∈D1:n f (x). Let Λ = {α ∈ Π◦ | x∗ = ∗α∗} be the set of patterns present in x∗ , and b = {α ∈ Λ | there is no α Λ b ∈ Λ − {α} with α b = ∗α∗} be the set of maximal patterns in Λ. We can assume w.l.o.g. that for each k ∈ [1, n] there exists b with k ∈ [i, j]. Indeed, if it is not the case for some k then we can modify x∗ by α = ([i, j], ·) ∈ Λ replacing the k-th letter of x∗ with some letter c ∈ Γ ∩ D; this operation does not increase f (x∗ ). b as the lexicographical order with compoWe define a total order  on patterns α = ([i, j], ·) ∈ Λ nents (i, j) (the first component is more significant). b there holds β ∈ Π. Lemma 17. (a) For each pattern β ∈ Λ b with α1 = ([i1 , j1 ], ·), α2 = ([i2 , j2 ], ·), and let (b) Consider two consecutive patterns α1 ≺ α2 in Λ ∗ β = xi2 :j1 be the pattern at which they intersect. (By the assumption above, i2 ≤ j1 + 1). There holds β ∈ Π. (c) For the patterns in (b), condition Mj1 (α1 ) ≤ f (x∗1:j1 ) implies Mj2 (α2 ) ≤ f (x∗1:j2 ). Proof. Part (a) We can write labeling x∗ as x∗ = xαβγy where patterns α, β are empty. Let us show that this choice satisfies conditions in (53). Condition (a) holds since αβ = βγ = β ∈ Π◦ . Suppose that (b) does not hold, then there exists pattern u = x∗k:` ∈ Π◦ with u = +β+. We have b - a contradiction. Therefore, β ∈ Π. u ∈ Λ and thus β ∈ /Λ b imply that i1 < i2 . (If i1 = i2 then we must have j1 < j2 , Part (b) The definitions of  and Λ b b -a but then α1 ∈ / Λ - a contradiction.) There also holds j1 < j2 (otherwise we would have α2 ∈ / Λ ∗ ∗ contradiction). This means that we can write labeling x as x = xαβγy where αβ = α1 , βγ = α2 and the pattern intervals are as follows: x [1, i1 −1] α [i1 , i2 −1] β γ [i2 , j1 ] [j1 +1, j2 ] 22 y [j2 +1, n] Let us show that this choice satisfies conditions in (53). Condition (a) holds since αβ = α1 ∈ Π◦ and βγ = α2 ∈ Π◦ . Suppose that (b) does not hold, then there exists pattern u = x∗k:` ∈ Π◦ where k < i2 and ` > j1 . This means that u ∈ Λ. b To summarize, we b with [k, `] ⊆ [b b there exists pattern u From the definition of Λ, b = xb∗ b ∈ Λ k, `]. k:` b have b k ≤ k < i2 and j1 < ` ≤ `. b and thus α1 ∈ b - a contradiction. Thus, there must hold b If b k ≤ i1 then [i1 , j1 ] ⊂ [b k, `] / Λ k > i1 . b Similarly, we prove that ` < j2 . This implies that α1 ≺ u b ≺ α2 , and therefore patterns α1 and α2 are b - a contradiction. not consecutive in Λ Part (c) β is a proper prefix of α that belongs to Π. Therefore, α← is defined. We can define a sequence of patterns β0 = β, β1 , . . . , βm = α2 with βk = ([i2 , sk ], ·), s0 = j1 < s1 < . . . < sm = j2 respectively such that βk ∈ Π and βk−1 = βk← for k ∈ [1, m]. Let us prove by induction on k that Msk (βk ) ≤ f (x∗1:sk ) for k ∈ [0, m]. Let us first check the base of the induction. Since β, α1 ∈ Πj1 and α1 = ∗β, by the definition of graph G[Πj1 ] there is a (unique) path γ0 , γ1 , . . . , γr from γ0 = β to γr = α1 with (γl , γl+1 ) ∈ E[Πj1 ]. By eq. (51), Mj1 (γl ) ≤ Mj1 (γl+1 ). Therefore, Mj1 (β) ≤ Mj1 (α1 ) ≤ f (x∗1:j1 ) where the last inequality holds by the assumption of part (c). This establishes the base case. Now suppose that the claim holds for k − 1 ∈ [0, m − 1]; let us prove it for k. Denote p = sk−1 and s = sk . Note, p is the index in step 2 of the algorithm during the processing of (s, βk ). From eq. (51) and the induction hypothesis we get Ms (βk ) ≤ Mp (βk−1 ) + ψ(βk ) ≤ Fp (x∗1:p ) + ψ(βk ) We will prove next that f (x∗1:p ) + ψ(βk ) = f (x∗1:s ), thus completing the induction step. It suffices to show that there is no pattern γ = x∗i:j with i < i2 and p < j ≤ s. b there exists pattern Suppose on the contrary that such pattern exists. By the definition of Λ b b b b b b b γ b = ([i, j], ·) ∈ Λ with [i, j] ⊆ [i, j]. We have i ≤ i < i2 and j ≥ j > p ≥ s0 = j1 . These facts imply b that α1 ≺ γ b ≺ α2 , contradicting the assumption that α1 and α2 are consecutive patterns in Λ. Lemma 17 implies the main claim. b there holds Mj (α) ≤ f (x∗ ), and therefore Z ≤ f (x∗ ). Corollary 18. For each α = ([i, j], ·) ∈ Λ 1:j b starts at position 1; for such Proof. We use induction on the total order . The lowest pattern α ∈ Λ pattern the claim follows by inspecting Algorithm 6. The induction step follows from Lemma 17(c). Acknowledgements We thank Herbert Edelsbrunner for helpful discussions. References [1] Omer Berkman and Uzi Vishkin. Recursive star-tree parallel data structure. SIAM Journal on Computing, 22(2):221–242, 1993. [2] N. Komodakis and N. Paragios. Beyond pairwise energies: Efficient optimization for higher-order MRFs. In CVPR, 2009. [3] J. Lafferty, A. McCallum, and F Pereira. Conditional random fields: Probabilistic models for segmenting and labeling sequence data. In ICML, 2001. 23 [4] Viet Cuong Nguyen, Nan Ye, Wee Sun Lee, and Hai Leong Chieu. Semi-Markov conditional random field with high-order features. In ICML 2011 Structured Sparsity: Learning and Inference Workshop, 2011. [5] Xian Qian, Xiaoqian Jiang, Qi Zhang, Xuanjing Huang, and Lide Wu. Sparse higher order conditional random fields for improved sequence labeling. In ICML, 2009. [6] C. Rother, P. Kohli, W. Feng, and J. Jia. Minimizing sparse higher order energy functions of discrete variables. In CVPR, 2009. [7] S. Sarawagi and W. Cohen. Semi-Markov conditional random fields for information extraction. In NIPS, 2004. [8] R. Takhanov and V. Kolmogorov. Inference algorithms for pattern-based CRFs on sequence data. In ICML, 2013. [9] M. D. Vose. A linear algorithm for generating random numbers with a given distribution. IEEE Transactions on software engineering, 17(9):972–975, 1991. [10] Nan Ye, Wee Sun Lee, Hai Leong Chieu, and Dan Wu. Conditional random fields with high-order features for sequence labeling. In NIPS, 2009. 24
8cs.DS
How much does a treedepth modulator help to obtain polynomial kernels beyond sparse graphs? Marin Bougeret1 and Ignasi Sau2 arXiv:1609.08095v1 [cs.DS] 26 Sep 2016 1 LIRMM, Université de Montpellier, Montpellier, France. [email protected] 2 CNRS, LIRMM, Montpellier, France, and Departamento de Matemática, UFC, Fortaleza, Brazil. [email protected] Abstract. In the last years, kernelization with structural parameters has been an active area of research within the field of parameterized complexity. As a relevant example, Gajarskỳ et al. [ESA 2013] proved that every graph problem satisfying a property called finite integer index admits a linear kernel on graphs of bounded expansion and an almost linear kernel on nowhere dense graphs, parameterized by the size of a c-treedepth modulator, which is a vertex set whose removal results in a graph of treedepth at most c, where c ≥ 1 is a fixed integer. The authors left as further research to investigate this parameter on general graphs, and in particular to find problems that, while admitting polynomial kernels on sparse graphs, behave differently on general graphs. In this article we answer this question by finding two very natural such problems: we prove that Vertex Cover admits a polynomial kernel on general graphs for any integer c ≥ 1, and that Dominating Set does not for any integer c ≥ 2 even on degenerate graphs, unless NP ⊆ coNP/poly. For the positive result, we build on the techniques of Jansen and Bodlaender [STACS 2011], and for the negative result we use a polynomial parameter transformation for c ≥ 3 and an or-cross-composition for c = 2. As existing results imply that Dominating Set admits a polynomial kernel on degenerate graphs for c = 1, our result provides a dichotomy about the existence of polynomial kernels for Dominating Set on degenerate graphs with this parameter. Keywords: parameterized complexity; polynomial kernels; structural parameters; treedepth; treewidth, sparse graphs. 1 Introduction Motivation. There is a whole area of parameterized algorithms and kernelization investigating the complexity ecology (see for example [27]), where the objective is to consider a structural parameter measuring how “complex” is the input, rather than the size of the solution. For instance, parameterizing a problem by the treewidth of its input graph has been a great success for FPT algorithms, triggered by Courcelle’s theorem [6] stating that any problem expressible in MSO logic is FPT parameterized by treewidth. However, the situation is not as good for kernelization, as many problems do not admit polynomial kernels by treewidth unless NP ⊆ coNP/poly [3]. Within structural parameters, of fundamental importance are parameters measuring the so-called “distance from triviality” of the input graphs, like the size of a vertex cover (distance to an independent set) or of a feedback vertex set (distance to a forest). Unlike treewidth, these parameters may lead to both positive and negative results for polynomial kernelization. An elegant way to generalize these parameters is to consider a parameter 2 Marin Bougeret and Ignasi Sau allowing to quantify the triviality of the resulting instance, measured in terms of its treewidth. More precisely, for a positive integer c, a c-treewidth modulator of a graph G is a set of vertices X such that the treewidth of G−X is at most c. Note that for c = 0 (resp. c = 1), a c-treewidth modulator corresponds to a vertex cover (resp. feedback vertex set). Treewidth modulators have been extensively studied in kernelization, specially on classes of sparse graphs, where they have been at the heart of the recent developments of meta-theorems for obtaining linear and polynomial kernels on graphs on surfaces [4], minor-free graphs [15], and topological-minor-free graphs [19, 22], all based in a generic technique known as protrusion replacement. However, as observed in [17, 22], if one tries to move further in the families of sparse graphs by considering, for instance, graphs of bounded expansion, for several natural problems such as Treewidth-t Vertex Deletion (minimizing the number of vertices to be removed to get a graph of treewidth at most t), parameterizing by a treedepth modulator is as hard as on general graphs. This observation led Gajarskỳ et al. [17] to consider another type of modulators, namely c-treedepth modulators (defined analogously to c-treewidth modulators), where treedepth is a graph invariant – which we define in Section 2 – that plays a crucial structural role on graphs of bounded expansion and nowhere dense graphs [25]. Gajarskỳ et al. [17] proved that any graph problem satisfying a property called finite integer index admits a linear kernel on graphs of bounded expansion and an almost linear kernel on nowhere dense graphs when parameterized by the size of a c-treedepth modulator. Shortly afterwards this result was obtained, the authors asked [1] to investigate this parameter on general graphs, namely to find natural problems that admit and that do not admit polynomial kernels parameterized by the size of a c-treedepth modulator. More precisely, are there natural problems Π1 and Π2 fitting into the framework of [17] such that Π1 /ctdmod admits a polynomial kernel on general graphs, but Π2 /c-tdmod does not?3 Our results. In this article we answer the above question by proving that Vertex Cover and Dominating Set are such problems Π1 and Π2 , respectively. Let us now elaborate a bit more on our results, the techniques we use to prove them, and how do they compare to previous work in the area (see the preliminaries of Section 2 for any undefined terminology). Note first that both VC/c-tdmod and DS/c-tdmod (where DS stands for Dominating Set) are FPT on general graphs, as they are FPT by treewidth [6], which is a smaller parameter than c-tdmod, as for any graph G and any integer c ≥ 0, it holds that tw(G) ≤ td(G)−1 ≤ c-tdmod(G)+c−1. Thus, asking for polynomial kernels is a pertinent question. In Section 3 we prove that VC/c-tdmod admits a polynomial kernel on general graphs. Our approach is based on the techniques introduced by Jansen and Bodlaender [20] to prove that VC/1-twmod (or equivalently, VC/FVS) admits a polynomial kernel. More precisely, we use three reduction rules inspired from the rules given in [20], and we present a recursive algorithm that, starting from a c-treedepth modulator, constructs an appropriate (c−1)-treedepth modulator and calls itself inductively. The kernel obtained in this manner O(c2 ) has x2 vertices, where x is the size of the c-treedepth modulator. This result completes the following panorama of structural parameterization for Vertex Cover, which has been a real testbed for structural parameterizations in the last years: • VC/1-twmod (or equivalently, VC/FVS) admits a polynomial kernel [20]. • VC/c-twmod for c ≥ 2 does not admit a polynomial kernel unless NP ⊆ coNP/poly [8]. • VC/c-degmod (distance to a graph of maximum degree c) and VC/c-CVD (distance to a disjoint collection of cliques of size at most c) admits a polynomial kernel [24]. 3 As defined in Section 2, “/c-tdmod” means “parameterized by the size of a c-treedepth modulator”. How much does a treedepth modulator help to obtain polynomial kernels? 3 Note that our result generalizes the latter kernel, as a disjoint collection of cliques of size at most c is a particular case of a graph having treedepth at most c. • VC/pfm (distance to a pseudoforest) admits a polynomial kernel [16]. In Section 4 we turn to negative results for Dominating Set. We provide a characterization, according to the value of c, of the existence of polynomial kernels for DS/c-tdmod on degenerate graphs. Indeed, using the results of Philip et al. [28] it is almost immediate to prove that DS/1-tdmod (or equivalently, DS/VC) admits a polynomial kernel on degenerate graphs. For c ≥ 3, we rule out the existence of polynomial kernels for DS/c-tdmod on 2-degenerate graphs by a simple polynomial parameter transformation from DS/1-tdmod on general graphs, which does not admit polynomial kernels unless NP ⊆ coNP/poly [11]. The remaining case, namely DS/2-tdmod, turns out to be more interesting, and we rule out the existence of polynomial kernels on 4-degenerate graphs by providing an or-cross-composition from 3-Sat. This dichotomy for the existence of polynomial kernels for DS/c-tdmod on degenerate graphs is to be compared with the dichotomy for VC/c-twmod on general graphs discussed above [8, 20]. As mentioned before, it is commonly admitted that almost no natural problem admits a polynomial kernel parameterized by tw, or even with td. However, to the best of our knowledge the only published negative results are those in [3], where the authors prove that IS/tw and DS/tw do not admit a polynomial kernel unless NP ⊆ coNP/poly. As this result only holds for general graphs, for the sake of completeness we complete it in Section 5, by showing that a large majority of the problems considered in [17] having an almost linear kernel parameterized by c-tdmod on nowhere dense graphs do not admit polynomial kernels parameterized by td, even on planar graphs of bounded maximum degree. 2 Preliminaries Graphs. Unless explicitly mentioned, all graphs considered here are simple and undirected, and we refer the reader to [10] for any undefined notation. Given a graph G = (V, E) and X ⊆ V , we denote NX (v) = N (v) ∩ X, where N (v) = {u ∈ V | {u, v} ∈ E}. We denote by α(G) the size of a maximum independent set of G. For any function f defined on any induced subgraph of a given graph G, given a subset of vertices V 0 of G, we denote by f (V 0 ) = f (G[V 0 ]) (for example, α(V 0 ) = α(G[V 0 ])). For any integer n, we denote by [n] = {i ∈ N, 1 ≤ i ≤ n}. For the following definitions relative to treedepth, bounded expansion, and nowhere dense graph classes, we refer the reader to [25] for more details, and we only recall here some basic notations and facts. The treedepth of a graph G (denoted td(G)) is the minimum height of a rooted forest F (called a treedepth decomposition) such that G is a subgraph of the closure of F , where the closure of a rooted tree is the graph obtained by adding an edge between any internal vertex and all its ancestors, and the height of a rooted tree is the number of vertices in a longest path from the root to a leaf. Let c ≥ 1 be an integer. A c-treedepth modulator is a subset of vertices X ⊆ V such that td(G[V \ X]) ≤ c, and we denote by c-tdmod(G) the size of a smallest c-treedepth modulator of G. A ctreewidth modulator is defined in the same way. Recall that as these parameters are greater than their associated measure (i.e., tw(G) ≤ c-twmod(G) + c) the negative results for kernelization by treewidth and treedepth do not immediately apply, but the positive FPT results do. Concerning graph classes, we recall that in the sparse graph hierarchy, graphs of bounded expansion (BE) and nowhere dense graphs (ND) are related to classic sparse families as follows (see [25] for the definitions): planar graphs ⊆ minor-free graphs ⊆ BE 4 Marin Bougeret and Ignasi Sau ⊆ ND. Note also that the class of graphs of bounded degeneracy is a natural superclass of BE (intuitively, BE also requires the minors to be degenerate), and is incomparable with ND. We refer the reader to Appendix A for the definition and acronyms of problems considered in the paper, like IS for the independent set problem. Parameterized complexity. We refer the reader to [7, 13, 14, 26] for more details on parameterized complexity and kernelization, and we recall here only some basic definitions, with special emphasis on tools for polynomial kernelization. A parameterized problem is a language L ⊆ Σ ∗ ×N. For an instance I = (x, k) ∈ Σ ∗ ×N, k is called the parameter. Given a classical (non-parameterized) decision problem Lc ⊆ Σ ∗ and a function κ : Σ ∗ → N, we denote by Lc /κ = {(x, κ(x)} | x ∈ Lc } the associated parameterized problem. For example, IS/c-tdmod denotes the independent Set problem parameterized by the size of a c-treedepth modulator. A parameterized problem is fixed-parameter tractable (FPT) if there exists an algorithm A, a computable function f , and a constant c such that given an instance I = (x, k), A (called an FPT algorithm) correctly decides whether I ∈ L in time bounded by f (k) · |I|c . Given a computable function g, a kernelization algorithm (or simply a kernel ) for a parameterized problem L of size g is an algorithm A that given any instance I = (x, k) of L, runs in polynomial time and returns an equivalent instance I 0 = (x0 , k 0 ) with |I 0 | + k 0 ≤ g(k). It is well-known that the existence of an FPT algorithm is equivalent to the existence of a kernel (whose size may be exponential), implying that problems admitting a polynomial kernel form a natural subclass of FPT. Some tools for (ruling out) polynomial kernelization. Among the wide literature on polynomial kernelization, we only recall here the two following tools used in this paper: compositions (used to prove that a parameterized problem does not admit a polynomial kernel unless NP ⊆ coNP/poly), and polynomial parameter transformations from L1 to L2 , denoted by L1 ≤ppt L2 (used to prove that a polynomial kernel for L2 implies a polynomial kernel for L1 ). Definition 1 ( [13]). An or-composition algorithm for a parameterized problem L ⊆ Σ ∗ × N is an algorithm that • receives as input a sequence ((x1 , k), . . . , (xt , k)), with (xi , k) ∈ Σ ∗ × N for each 1 ≤ i ≤ t, Pt • uses time polynomial in i=1 |xi | + k, and 0 ∗ • outputs (y, k ) ∈ Σ × N such that 1. (y, k) ∈ L if and only if (xi , k) ∈ L for some 1 ≤ i ≤ t. 2. k 0 is polynomially bounded by a function of k. We can similarly define an and-composition algorithm. A parameterized problem admitting a or-composition (resp. and-composition) is called an or-compositional (resp. and-compositional ) problem. Definition 2 ([7]). Let L ⊆ Σ ∗ be a (classical) problem and Q ⊆ Σ ∗ × N be a parameterized problem. We say that L or-cross-composes (resp and-cross-composes) into Q if there exists a polynomial equivalence relation R and an algorithm A, called the crosscomposition, satisfying the following conditions. The algorithm A takes as input a sequence of strings x1 , . . . , xt ∈ Σ ∗ that are equivalent with respect to R, runs in time polynomial Pt in i=1 |xi |, and outputs one instance (y, k) ∈ Σ ∗ × N such that: • k ≤ p(maxti=1 i|xi | + log(t)) for some polynomial p(·), and How much does a treedepth modulator help to obtain polynomial kernels? 5 • (y, k) ∈ Q if and only if there exists at least one index i such that xi ∈ L (resp. if for every i ∈ [t], xi ∈ L). Compositions are a great tool to get negative results for kernelization. Theorem 1 ([7, 13]). Let L be an or-compositional or an and-compositional parameterized problem whose derived classical problem is NP-complete. Then, L does not admit a polynomial kernel unless NP ⊆ coNP/poly. Theorem 2 ([7, 13]). Assume that an NP-hard language L cross-composes into a parameterized language Q. Then Q does not admit a polynomial compression unless NP ⊆ coNP/poly. Note that as a polynomial kernel is also a polynomial compression, the previous theorem also rules out the existence of a polynomial kernel. Definition 3 ([5]). Let P and Q be parameterized problems. We say that P is polynomial time and parameter reducible to Q, written P ≤ppt Q, if there exist a polynomial time computable function f : Σ ∗ × N → Σ ∗ × N and a polynomial p, and for all x ∈ Σ ∗ and k ∈ N, if f (x, k) = (x0 , k 0 ), then the following hold: • (x, k) ∈ P , if and only if (x0 , k 0 ) ∈ Q, and • k 0 ≤ p(k). We call f a polynomial time and parameter transformation from P to Q ( PPT for short). The following theorem can be used to obtain either positive or negative results. Theorem 3 ([5]). Let P and Q be parameterized problems, and suppose that Pc and Qc are the derived classical problems. Suppose that Qc is NP-complete, and that Pc ∈ NP. Suppose that P ≤ppt Q. If Q has a polynomial kernel, then P has a polynomial kernel. 3 A polynomial kernel for VC/c-tdmod on general graphs In this section we prove that for any positive integer c, VC/c-tdmod admits a polynomial kernel on general graphs. Recall that this was only known for VC/1-tdmod and VC/2tdmod, as for c = 1 this corresponds to the standard parameterization and we can use the linear kernel of [2], and for c = 2 we have 1-twmod ≤ 2-tdmod (as a 1-twmod corresponds to the distance to a forest, while 2-tdmod corresponds to the distance to a star forest), and thus we can use the polynomial kernel of [20] for VC/1-twmod. We also recall that we cannot expect to extend our result to VC/c-twmod for any c ≥ 2 [8]. As VC/c-tdmod and IS/c-tdmod are equivalent for this parameterization, we provide the result for IS/c-tdmod. More specifically, in Subsection 3.1 we provide a polynomial kernel for a-c-tdmod-IS, an annotated version of our problem defined below, and in Subsection 3.2 we derive a polynomial kernel for IS/c-tdmod. 3.1 A polynomial kernel for a-c-tdmod-IS/(|X| + |H|) We will find a polynomial kernel for the following annotated version of IS on hypergraphs. Working with hypergraphs is useful because we will use a reduction rule identifying a subset X 0 of the modulator that cannot be entirely contained in a solution; this will be modeled by adding a hyperedge on the vertex set X 0 . 6 Marin Bougeret and Ignasi Sau Annotated c-treedepth modulator Independent Set (a-c-tdmod-IS) Instance: (G, X, k) where • G = (V, E, H) is a hypergraph structured as follows: V = X ] R, E = EX,R ] ER,R is a set of edges where edges in EA,B have one endpoint in A and the other in B, and H ≤ 2X is a set of hyperedges where each H ∈ H is entirely contained in X. • X is a c-treedepth modulator (as G[V \ X] is not a hypergraph, its treedepth is correctly defined and we have td(V \ X) ≤ c). • k is a positive integer. Question: Decide whether α(G) ≥ k (where an independent in a hypergraph is a subset of vertices that does not contain any hyperedge, corresponding here to a subset S ⊆ V such that for every h ∈ E ∪ H, h * S). Throughout this subsection I = (G, X, k) denotes the input of a-c-tdmod-IS with G = (V, E, H) and V = X ] R. Note that G[X] is a hypergraph and that G[R] is a graph, and that the parameter we consider here is |X|+|H|. For any X 0 ⊆ X and R0 ⊆ R, observe that the notation NR0 (X 0 ) is not ambiguous and denotes {v ∈ R0 | ∃x ∈ X 0 with {x, v} ∈ E}. We use the following definition that was introduced in [20] for VC/1-twmod. Definition 4 ( [20]). Given X 0 ⊆ X and R0 ⊆ R, let conf R0 (X 0 ) = α(R0 ) − α(R0 \ NR0 (X 0 )) be the conflicts induced by X 0 on R0 . Intuitively, conf R0 (X 0 ) measures the loss in the size of a maximum independent set of R due to X 0 . We extend the previous definition in the following way: for any R0 ⊆ R and any Y 0 ⊆ R0 , let conf R0 (Y 0 ) = α(R0 ) − α(R0 \ Y 0 ). We can see that conf R0 (Y 0 ) = 0 is equivalent to the existence of an independent set S ∗ ⊆ R0 such that |S ∗ | = α(R0 ) and S ∗ ∩ Y 0 = ∅. 0 Lemma 1. Let R0 ⊆ R be a connected component of R. If conf R0 (Y 0 ) > 0, there exists Y¯0 ⊆ Y 0 such that conf R0 (Y¯0 ) > 0 and |Y¯0 | ≤ f (c) with f (c) = 2c . Proof: As it holds that td(R0 ) ≤ c, let us consider a treedepth decomposition of R0 with root r and can partition S t ≥ 1 subtrees, where Ai , i ∈ [t] is the0 vertex set of subtree i. We Y 0 = i∈[t+1] Yi0 with Yi0 ⊆ Ai for i ∈ [t], Yt+1 ⊆ {r}, where the Yi0 ’s are possibly P empty. We will prove the lemma by induction on c. Observe that i∈[t] α(Ai ) ≤ α(R0 ) ≤ P 1 + i∈[t] α(Ai ), and thus we distinguish two cases according to the value of α(R0 ). P Case 1: α(R0 ) = 1 + i∈[t] α(Ai ). In this case any maximum independent set S ∗ of R0 contains r. Hence for every i ∈ [t] S ∗ ∩ Ai is a maximum independent set in Ai \ NAi (r), and thus α(Ai \ NAi (r)) = α(Ai ). Indeed, if P we had α(Ai \ NAi (r)) < α(Ai ) for some i, then |S ∗ | would be strictly smaller than 1 + i∈[t] α(Ai ). 0 If r ∈ Y 0 (i.e., if Yt+1 6= ∅) then we can take Y¯0 = {r} (as any optimal solution of 0 R must contain r we get α(R0 \ {r}) < α(R0 ), and |Y¯0 | = 1 ≤ 2c ), and thus we suppose 0 henceforth that Yt+1 = ∅. We claim that there exists i0 ∈ [t] such that conf Ai0 \NAi (r) (Yi00 ) > 0. Indeed, otherwise 0 we could define for any i ∈ [t] an independent set Si ⊆ Ai \ NAi (r) with |Si | = α(Ai \ NAi (r)) = α(Ai ) and Si ∩ Yi0 = ∅. Thus, S ∗ = {r} ∪i∈[t] Si would be an independent 0 set of size α(R0 ), and as Yt+1 = ∅ we would have S ∗ ∩ Y 0 = ∅, a contradiction to the 0 hypothesis that conf R0 (Y ) > 0. Thus, there exists i0 ∈ [t] such that conf Ai0 \NAi (r) (Yi00 ) > 0 0, and as td(Ai0 \ NAi0 (r)) < c, by induction hypothesis there exists Y¯i00 ⊆ Yi00 such that conf A \N (r) (Y¯0 ) > 0 and |Y¯0 | ≤ 2c−1 . Let us verify that Y¯0 = Y¯0 satisfies i0 Ai 0 i0 i0 i0 How much does a treedepth modulator help to obtain polynomial kernels? b1 b2 b1 A1 v1 a1 c1 a2 c2 a1 v2 b2 b3 b4 b2 A2 a2 v1 (a) b1 7 c1 v1 a1 c1 c2 a2 c i0 v2 a3 a4 c3 c4 v2 (b) Fig. 1. (a) Example of a graph G[R0 ] (left) with an associated treedepth decomposition (right) as used in Lemma 1, with Y 0 = {c1 , c2 }. This case corresponds to one of the subcases of Case 2, as α(R0 ) = α(A1 ) + α(A2 ) = 4, conf A1 (Y10 ) > 0, conf A2 (Y20 ) = 0. Moreover, p2 and p02 are true, while p3 is false (but p03 is true). (b) Example for t = 2 of the construction of Lemma 2, where the circled vertices belong to S. conf R0 (Y¯0 ) > 0. Let S ∗ be an independent R0 with S ∗ ∩ Y¯0 = ∅. If r ∈ / S ∗ then P set of ∗ 0 ∗ ∗ clearly |S | < α(R ). Otherwise, |S | = ( i∈[t] |S ∩(Ai \NAi (r))|)+1 ≤ α(Ai0 \NAi0 (r))− P 1 + ( i∈[t],i6=i0 α(Ai \ NAi (r))) + 1 < α(R0 ). P Case 2: α(R0 ) = i∈[t] α(Ai ). In this case there exists i0 ∈ [t] such that conf Ai0 (Yi00 ) > 0. Indeed, otherwise we could define for any i ∈ [t] an independent set Si ⊆ Ai with |Si | = α(Ai ) and Si ∩ Yi0 = ∅, and the existence of S ∗ = ∪i∈[t] Si would be a contradiction to the hypothesis that conf R0 (Y 0 ) > 0. Thus, by the induction hypothesis there exists Y¯i00 ⊆ Yi00 such that conf Ai0 (Y¯i00 ) > 0 and |Y¯i00 | ≤ 2c−1 . 0 If r ∈ Y 0 (i.e., if Yt+1 6= ∅) then we can take Y¯0 = Y¯i00 ∪ {r}. Let us verify that 0 ∗ ∗ ¯0 conf R0 (Y¯0 ) > 0. Let S ∗ be P an independent set of R Pwith S ∩ Y = ∅. As S cannot contain r we have |S ∗ | = i∈[t] |S ∗ ∩ Ai | < α(Ai0 ) + i∈[t],i6=i0 |S ∗ ∩ Ai | = α(R0 ). Thus, we suppose from now on 0 Property p1 : Yt+1 = ∅. Note that in this case (when p1 is true) we cannot simply set Y¯0 = Y¯i00 , as shown in the example depicted in Fig. 1. Indeed, in this example we would have Y¯0 = Y¯i00 = {c1 }, however conf R0 ({c1 }) = 0 as S ∗ = {b1 , v1 , c2 , v2 } verifies |S ∗ | = α(R0 ) and S ∗ ∩ {c1 } = ∅. Properties related to α. Let us prove that we can always assume the following Property p2 : for every i 6= i0 , α(Ai \ NAi (r)) = α(Ai ). Indeed, if p2 is not true, then there exists i1 6= i0 , i1 ∈ [t] such that α(Ai1 \ NAi1 (r)) < α(Ai1 ), and we set Y¯0 = Y¯i00 . Let S ∗ be an independent set of R0 with S ∗ ∩ Y¯0 = ∅. If ∗ r∈ / SP then as previously |S ∗ | < α(R0 ), otherwise we get |S ∗ | ≤ α(Ai0 ) − 1 + α(Ai1 ) − 1 + ( i∈[t],i6=i0 ,i6=i1 α(Ai )) + 1 < α(R0 ). Thus, we now assume p2 . Let us now prove the following Property p02 : α(Ai0 ∪ {r}) = α(Ai0 ). By contradiction, suppose that there exists an independent set S1∗ of Ai0 ∪{r} containing r such that |S1∗ | = α(Ai0 ) + 1. According to p2 , for every Pi 6= i0 there exists an independent set Si of Ai \ NAi (r) of size α(Ai ), and thus α(R0 ) > i∈[t] α(Ai ), a contradiction. Thus, we now assume p02 . Properties related to conf Ai (Yi0 ). Let us prove than we can assume the following Property p3 : for every i 6= i0 , conf Ai \NAi (r) (Yi0 ) = 0. 8 Marin Bougeret and Ignasi Sau Indeed, if p3 is not true we can get the desired result as follows. Let i1 6= i0 , i1 ∈ [t] such that conf Ai1 \NAi (r) (Yi01 ) > 0. We use the same arguments as in the previous paragraph 1 . Using the same notation, . Note that |Y¯0 | ≤ |Y¯i00 | + |Y¯i01 | ≤ 2cP and define Y¯0 = Y¯i00 ∪ Y¯i01P ∗ ∗ if r ∈ / S then |S | = ( i∈[t] |S ∗ ∩ Ai |) ≤ α(Ai0 ) − 1 + ( i∈[t],i6=i0 α(Ai )) < α(R0 ), P and otherwise |S ∗ | = ( i∈[t] |S ∗ ∩ (Ai \ NAi (r))|) + 1 ≤ α(Ai0 ) − 1 + α(Ai1 ) − 1 + P ( i∈[t],i6=i0 ,i6=i1 α(Ai )) + 1 < α(R0 ). Thus, we now assume p3 . Note that p2 and p3 imply Property p03 : for every i 6= i0 , conf Ai (Yi0 ) = 0. 2a: @S ∗ maximum independent set of R0 such that r ∈ S ∗ . In this case, we set Y¯i00 . Let us prove that conf R0 (Y¯0 ) > 0. Let S ∗ P be a maximum independent set ∗ with S ∗ ∩ Y¯0 = ∅. As r ∈ / S ∗ , we get |S ∗ | = i∈[t] |S ∩ Ai | ≤ α(Ai0 ) − 1 + 0 i∈[t],i6=i0 α(Ai ) < α(R ). Case Y¯0 = of R0 P Case 2b: ∃S ∗ maximum independent set of R0 such that r ∈ S ∗ . This implies that α(Ai0 \NAi0 (r)) = α(Ai0 )−1. Let us prove that conf Ai0 \NAi (r) (Yi00 ) > 0. If it was not the 0 case, there would exist an independent set Si∗0 of Ai0 \ NAi0 (r) of size α(Ai0 \ NAi0 (r)) = α(Ai0 ) − 1 such that Si∗0 ∩ Yi00 = ∅. By p3 , there would exist, for every i 6= i0 , an independent set Si∗ of Ai \ NAi (r)S of size α(Ai \ NAi (r)) = α(Ai ) (by p2 ) such that Si∗ ∩ Yi0 = ∅. Thus, S ∗ = {r} ∪ ( i∈[t] Si∗ ) would be an independent set of size α(R0 ) such that S ∗ ∩ Y 0 = ∅ (recall that by p1 , r ∈ / Y 0 ), a contradiction. Thus, we know that both conf Ai0 \NAi (r) (Yi00 ) > 0 and conf Ai0 (Yi00 ) > 0 (which was established at 0 the beginning of Case 2). Using twice the induction hypothesis we get that there ex2 1 1 ists Y¯i00 ⊆ Yi00 such that conf Ai0 \NAi (r) (Y¯i00 ) > 0 and there exists Y¯i00 ⊆ Yi00 such 0 2 1 2 that conf A (Y¯0 ) > 0, with both |Y¯0 | and |Y¯0 | bounded by 2c−1 . Thus, we set i0 i0 i0 i0 1 2 Y¯0 = Y¯i00 ∪ Y¯i00 . Let us verify that conf R0 (Y¯0 ) > P 0. Let S ∗ be an independent set 0 ∗ ∗ ∗ 0 ¯ of R with S ∩ Y = ∅. If r ∈ S , then |S | = |S ∗ ∩ (Ai \ NAi (r))| + 1 = i∈[t]P P α(Ai0 \ NAi0 (r)) − 1 + i∈[t],i6=i0 α(Ai ) + 1 = α(Ai0 ) − 2 + i∈[t],i6=i0 α(Ai ) + 1 < α(R0 ). P P Otherwise, |S ∗ | = i∈[t] |S ∗ ∩ Ai | = α(Ai0 ) − 1 + i∈[t],i6=i0 α(Ai ) < α(R0 ).  A first lower bound on the function f of Lemma 1 can be obtained by considering a clique R0 on c vertices (hence, with td(R0 ) = c) and Y 0 = R0 , as any Y¯0 ( Y 0 satisfies conf R0 (Y¯0 ) = 0. However, as shown in Lemma 2 below, we can even obtain an exponential lower bound, showing that the function f (c) = 2c of Lemma 1 is almost tight. Lemma 2. There exists a constant λ such that for any c ≥ λ there exists a graph G = (R, E) and Y ⊆ R such that td(G) = c, |Y | ≥ 2c−3 , conf R (Y ) > 0, and for every Ȳ ( Y , conf R (Ȳ ) = 0. Proof: Given an integer S t, let G = (R, E) S with R = {{v1 }, {{ai , bi } | i ∈ [2t]}, {v2 }} S and E = i∈[2t] {ai , bi } ∪ i∈[t] {b2i−1 , b2i } ∪ i∈[t−1] {a2i , a2i+1 } ∪ {v1 , a1 } ∪ {a2t , v2 } (G is S a path on 2t + 2 vertices). We add to R the set C = {ci | i ∈ [2t]} and to E the set i∈[2t] {ci , ai } ∪ {ci , bi }; see Fig. 1(a) for an example for t = 1. We would like to point out that R corresponds to the edge gadget of [8], except that we removed some edges (namely, {a2i−1 , a2i }) to lower its treedepth by a factor 2. Let Y = C. We have α(R) = 2t + 2, and α(R \ Y ) = α(R) − 1 < α(R). Let Ȳ ( Y , and let i0 such that ci0S∈ / Ȳ . By symmetry, we can supposeSthat i0 is even with i0 = 2i00 . Let S = {v1 , v2 } ∪ i∈[i0 −1] {b2i−1 , a2i } ∪ {b2i00 −1 , c2i00 } ∪ i∈[i0 +1,t] {a2i−1 , b2i }; see Fig. 1(b) 0 0 for an example for t = 2. As S is an independent set of size α(R) with S ∩ Ȳ = ∅, we get that conf R (Ȳ ) = 0. How much does a treedepth modulator help to obtain polynomial kernels? 9 Observe also that td(R) ≤ log(t) + 3. Indeed, the treedepth of the initial path P2t+2 on 2t + 2 vertices is at most dlog(2t + 3)e ≤ log(t) + 2, for t large enough. Then, td(R) ≤ td(P2t+2 ) + 1 as for any i ∈ [2t], we can add to the treedepth decomposition of P2t+2 a vertex ci as a new leaf attached to the downmost vertex of {ai , bi } in the decomposition.  Observation 1 Lemma 1 was proven in [20] when R0 is a forest and |X20 | ≤ 2. Even if we already know that IS/2-twmod does not admit a polynomial kernel unless NP ⊆ coNP/poly [8], it remains interesting to observe that, in particular, this lemma becomes false for 2-twmod, as the graph of Lemma 2 has treewidth 2. This points out one crucial difference between c-treewidth and c-treedepth modulators. Let us now start the description of the kernel for a-c-tdmod-IS/(|X| + |H|). Given an input (G, X, k) of a-c-tdmod-IS, we define the following three rules. Note that these rules and definitions (and the associated safeness proofs) correspond to Rules 1, 2, and 3 of [20], except that we now bound the sizes of the subsets by a function f (c) instead of by 2. Definition 5. Given an input (G, X, k) of a-c-tdmod-IS (with td(G[R]) ≤ c with R = V \ X), the chunks of the input are defined by X = {X 0 ⊆ X | there is no H ∈ H such that H ⊆ X 0 , and 0 < |X 0 | ≤ f (c)}, where f (c) = 2c . Intuitively, the chunks correspond to all possible small traces of an independent set of G in X. We are now ready to define the first two rules. Reduction Rule 1: If there exists u ∈ X such that conf R ({u}) > |X|, remove u from X. Reduction Rule 2: If there exists X 0 ∈ X such that conf R (X 0 ) > |X|, add X 0 to H. Lemma 3. Rule 1 and Rule 2 are safe: if I = (G, X, k) is the original input of a-c-tdmodIS and I 1 = (G1 , X 1 , k) is the input after the application of Rule 1 or Rule 2, then I and I 1 are equivalent. Proof: Let us only prove the safeness of Rule 2, as Rule 1 corresponds to Rule 2 using X 0 = {u}. Indeed, adding hyperedge {u} is equivalent to removing u, as by definition no independent set could contain u anymore. Let us prove that α(G) ≥ k implies that α(G1 ) ≥ k. Let S be an independent set of G of size at least k. If X 0 * S then S is also an independent set of G1 of size k. Otherwise, let S 1 be an independent set of R of size α(R). Observe that k ≤ |S| = |S ∩ X| + |S ∩ R| ≤ |X| + (α(R) − |X|) ≤ |S 1 |, and we get the desired result.  Reduction Rule 3: If R contains a connected component R0 such that for every X 0 ∈ X , conf R0 (X 0 ) = 0, delete R0 from the graph and decrease k by α(R0 ). To prove that Rule 3 is safe we need the following lemma. Recall that we say that X 0 ⊆ X is an independent set if and only if there is no H ∈ H such that H ⊆ X 0 . Lemma 4. Let I = (G, X, k) be an instance of a-c-tdmod-IS. Let R0 be a connected component of R. If there exists an independent set X 0 ⊆ X such that conf R0 (X 0 ) > 0, then there exists X̄ 0 ∈ X such that conf R0 (X̄ 0 ) > 0. 10 Marin Bougeret and Ignasi Sau Proof: Let Y 0 = NR0 (X 0 ). As conf R0 (X 0 ) > 0 we know that conf R0 (Y 0 ) > 0. By Lemma 1, there exists Y¯0 ⊆ Y 0 such that conf R0 (Y¯0 ) > 0 and |Y¯0 | ≤ f (c). For any y 0 ∈ Y¯0 , there exists a vertex f (y 0 ) ∈ X 0 such that {f (y 0 ), y 0 } ∈ E, and thus we define X̄ 0 = ∪y0 ∈Y¯0 f (y 0 ). As X̄ 0 ⊆ X 0 , X̄ 0 is still an independent set, and |X̄ 0 | ≤ |Y¯0 | ≤ f (c), we get that X̄ 0 ∈ X .  Lemma 5. Rule 3 is safe: if I = (G, X, k) is the original input of a-c-tdmod-IS and I 0 = (G0 , X 0 , k 0 ) is the input after the application of Rule 3, then I and I 0 are equivalent. Proof: α(G) ≥ k ⇒ α(G0 ) ≥ k 0 = k − α(R0 ) is straightforward, as if S is an independent set of G of size at least k then S \ R0 is an independent set of G0 of size at least k − α(R0 ). α(G) ≥ k ⇐ α(G0 ) ≥ k 0 = k −α(R0 ): Let S 0 be an independent set of G0 of size at least k 0 . As Rule 3 applied, we know that for every X1 ⊆ X , conf R0 (X1 ) = 0. Using the contrapositive of Lemma 4, it follows that for any independent set X1 ⊆ X, conf R0 (X1 ) = 0. In particular we get that XS = S 0 ∩ X verifies conf R0 (XS ) = 0. Thus, there exists an independent set SR0 of G[R0 ] of size α(R0 ) and such that NR0 (XS ) ∩ SR0 = ∅, and thus S 0 ∪ SR0 is an independent set of G of size at least k.  Lemma 6. Let I = (G, X, k) be an instance of a-c-tdmod-IS, and let s be the number of connected components of R = V \ X. If none of Rule 1, Rule 2 and Rule 3 can be applied, then s = O(|X|f (c)+2 ), where f is the function of Lemma 1. P Proof: First, as Rule 1 and Rule 2 cannot be applied, we have σ = X 0 ∈X conf R (X 0 ) ≤ Pf (c) |X| f (c)+2 ). On the other side, as Rule 3 cannot be applied, for any i=1 i |X| = O(|X| connected component R0 ⊆ R there exists X 0 ∈ X such that conf R0 (X 0 ) > 0, and thus we have σ ≥ s, implying the desired result.  We are now ready to present in Algorithm 1 our polynomial kernel for a-c-tdmod-IS. Theorem 4. For any fixed integer c ≥ 0, Algorithm 1 is a polynomial kernel for a-ctdmod-IS/(|X| + |H|). More precisely, for any input I = (G, X, k) (with G = (V, E, H), R = V \ X) where X is a c-treedepth modulator, Algorithm 1 produces an equivalent 1 (c+1)(c+2) instance I˜ = (G̃, X̃, k̃) (with G̃ = (Ṽ , Ẽ, H̃), R̃ = Ṽ \ X̃) where |X̃| = O(|X|2 2 ), 1 (c+1)(c+2) |H̃| = |H| + O(|X|2 2 ), and R̃ = ∅. Proof: Observe first that Algorithm 1 is polynomial for fixed c. Indeed, computing conf R0 (X 0 ) is polynomial (as tw(R0 ) ≤ td(R0 ) and it is well-known that IS/tw is FPT [6]) and there are at most O(|X|c ) applications of Rules 1 and 2, and O(s|X|c ) applications of Rule 3. Moreover, an optimal treedepth decomposition of each connected component can be computed in FPT time parameterized by c, using [25] or [29]. Let us prove the result by induction on c. The result is trivially true for c = 0. Let us suppose that the result holds for c−1 and prove it for c. Observe that X 0 is now a (c−1)-treedepth modulator, and thus we can apply the induction hypothesis on A(I 0 , c − 1). For any ` ∈ [3], let I` = (G` , X` , k` ) with G` = (V` , E` , H` ) and R` = V` \ X` denote the instance after exhaustive application of Rule `, respectively. Equivalence of the output. By Lemma 3 and Lemma 5, we know that Rules 1, 2, and 3 are safe, and thus that I and I3 are equivalent. Note that I3 is equivalent to I 0 as the underlying input is the same (except that some vertices were added to the modulator). How much does a treedepth modulator help to obtain polynomial kernels? 11 Algorithm 1: A polynomial kernel for a-c-tdmod-IS/(|X| + |H|). Input: (I, c), where I = (G, X, k) and X is a c-treedepth modulator of G. if c = 0 then return X. else Apply Rule 1 exhaustively. /* this rule suppresses vertices of X */ Apply Rule 2 exhaustively. /* this rule adds hyperedges of size at most f (c) to H */ Define the set X of chunks. Apply Rule 3 exhaustively. /* this rule suppresses some connected components */ /* of R and decreases k accordingly */ Let I3 = (G3 , X3 , k3 ) be the obtained instance, where G3 = (V3 , E3 ) and R3 = V3 \ X3 . For every connected component R0 ⊆ R3 , compute an optimal treedepth decomposition of R0 with root rR0 . Let Xr = ∪R0 ⊆R3 ,R0 connected {rR0 } be the set of roots. Let I 0 = (G0 = (V3 , E 0 , H0 ), X 0 , k3 ) be defined as follows: X 0 = X3 ∪ Xr , Z = {e ∈ E3 | e ∩ Xr 6= ∅ and e ∩ X3 6= ∅}, E 0 = E3 \ Z, H0 = H3 ∪ Z. /* I 0 corresponds to I3 where we added Xr to the modulator, removed */ /* edges Z from E3 , and added them as hyperedges of X 0 */ /* Note that X 0 is now a (c − 1)-treedepth modulator */ return A(I 0 , c − 1). As using induction hypothesis A(I 0 , c − 1) outputs an instance I˜ equivalent to I 0 , we get the desired result. Size of the output. We have • |X1 | ≤ |X|, |H1 | = |H|. • |X2 | = |X1 |, |H2 | ≤ |H1 | + |X1 |f (c) . • |X3 | = |X2 |, |H3 | = |H2 |. By Lemma 6, s, the number of connected components of R3 , verifies s = O(|X3 |f (c)+2 ). • |X 0 | ≤ |X3 | + s, and |H0 | ≤ |H3 | + s|X3 |. c+1 Thus we get |X 0 | = O(|X|f (c)+2 ) = O(|X|2 ) and |H0 | = |H| + O(|X|f (c)+3 ). Us1 c(c+1) ing induction hypothesis we get that |X̃| = O(|X 0 |2 2 0 1 0 2 2 c(c+1) that |H̃| = |H | + O(|X | 1 O(|X| 3.2 2 2 (c+1)(c+2) ), as claimed. 2c +3 ) = |H| + O(|X| 1 (c+1)(c+2) ) = O(|X|2 2 ), and 1 ) + O(|X| 2 2 (c+1)(c+2) ) = |H| +  Deducing a polynomial kernel for IS/c-tdmod Observe first that we can suppose that the modulator is given in the input, i.e., that IS/c-tdmod ≤ppt c-tdmod-IS/|X| (≤ppt is defined in Definition 3). Indeed, given an input (G, x, k) of IS/c-tdmod (where x denotes the size of a c-treedepth modulator), using the 2c -approximation algorithm of [17] for computing a c-treedepth modulator, wet get in polynomial time a set X such that |X| ≤ 2c · x and td(R) ≤ c, where R = V \ X. 12 Marin Bougeret and Ignasi Sau z4 z3 z1 y1a y1b y3a y3b y4a y4b n WH′ Fig. 2. Example of the construction of G0 for n = 5, m = 1, and H = {1, 3, 4}. Observe also that IS/|X| ≤ppt a-c-tdmod-IS/(|X| + |H|) using the same set X and with |H| ≤ |X|2 . Now, as usual when using bikernels, we could claim that as IS is Karp NP-hard and as a-c-tdmod-IS is in NP, there exists a polynomial reduction from a-ctdmod-IS, implying the existence of a polynomial kernel for IS/c-tdmod. However, let us make such a reduction explicit to provide an explicit bound on the size of the kernel. Lemma 7. Let I = (G, k) with G = (X, H) be an instance of a-c-tdmod-IS as produced by Theorem 4 (as R = ∅ the set of vertices is reduced to X, and H is a set of hyperedges on X). We can build in polynomial time an equivalent instance I 0 = (G0 , k 0 ) of IS with G0 = (V 0 , E 0 ) where |V 0 | ≤ O(|X| · |H|). Proof: Let n = |X|, X = {vi | i ∈ [n]} and m = |H|. We refer the reader to Fig. 2 for an example of the construction of G0 . For any i ∈ [n], we add to G0 the vertex gadget constituted of Vi0 = {yia , yib , zi } and edges {zi , yia } and {zi , yib , }. Taking a vertex yia and yib in a solution for I 0 will correspond to taking vi in the solution of I. For S corresponding 0` 0 0` is an = `∈[|H|] WH , where each WH any H ∈ H, we add to G0 the edge gadget WH 0 independent set of size n, and we add edges to make G[WH ] a complete |H|-partite graph  2 with |H| 2 n edges. Finally, for every H ∈ H, H = {vH` | ` ∈ [|H|]} and ` ∈ [|H|], we add a b 0` ∪ {yH , yH }] a complete bipartite graph with 2n edges. Thus, the edges to make G[WH ` ` 0 `-th “column” of WH corresponds to the `-th vertex of H. This completes the description of G0 . Let k 0 = n + k + nm. α(G) ≥ k ⇒ α(G0 ) ≥ k 0 : Without loss of generality let S = {vi | i ∈ [k]} be an independentSset of G. For any ∈ [|H|]} there exists ` such that vH` ∈ / S. We S H = {vH` | ` S 0H` define S 0 = i∈[k] {yia , yib } ∪ i∈[n]\[k] {zi } ∪ H∈H WH . α(G) ≥ k ⇐ α(G0 ) ≥ k 0 : Let S 0 be an independent set of G0 of size at least k 0 . We can 0` 0` always assume that for any H ∈ H and ` ∈ [|H|], if WH ∩ S 0 6= ∅ then WH ⊆ S 0 (as 0` 0` all vertices of WH have the same neighborhood, we can safely add WH ). Note that there 0 cannot exist H ∈ H such that WH ∩ S 0 = ∅. Indeed, otherwise |S 0 | ≤ n(m − 1) + 2n < k 0 . Thus, for every H = {vH` | ` ∈ [|H|]} there exists (a unique) `H ∈ [|H|] such that 0`H WH ⊆ S 0 . As there remain n + k vertices to take in the Vi0 ’s, and as yia and yib have the same neighborhood, we get that, without loss of generality, for every i ∈ [k] we have {yia , yib } ⊆ S 0 , and for every i ∈ [n] \ [k] we have zi ∈ S 0 . Thus, we define S = {vi | i ∈ [k]}. 0`H Let us verify that S is an independent set. Let H ∈ H. As WH ⊆ S 0 and S 0 is an in0`H dependent set, we deduce that there are no edges in G0 between WH and any of the {yia , yib } for i ∈ [k], implying that vH`H ∈ / S, and therefore S is indeed an independent set.  How much does a treedepth modulator help to obtain polynomial kernels? 13 Putting pieces together we get the main theorem of this section, whose proof is now immediate. Theorem 5. For every integer c ≥ 1, IS/c-tdmod (or equivalently, VC/c-tdmod) admits   1 (c+1)(c+2)+1 22 vertices, where x is the size a polynomial kernel on general graphs with O x of a c-treedepth modulator. 4 Excluding polynomial kernels for DS/c-tdmod on degenerate graphs Given a graph G, we define Gc-sub as the graph obtained from G by subdividing each edge c times. In other words, we add a set Xe = {x`e | ` ∈ [c]} of c vertices of degree 2 for every edge e ∈ E of G. Observation 2 For any c ≥ 0 and any k ≥ 0, G has a dominating set of size k if and only if G3c-sub has a dominating set of size k + mc, where m is the number of edges of G. Proof: Indeed, if S is a dominating set of G of size k, then we construct a dominating set of G3c-sub of size k + mc by taking S and the following vertices. For any e = {u, v} with u ∈ S and v ∈ / S we take {x3` e | 1 ≤ ` ≤ c} (we add to the dominating set every third vertex in the set Xe starting from u). Otherwise (if both or none of {u, v} belong to | 0 ≤ ` ≤ c − 1}. The other direction is also true, as any solution must S) we take {x3`+2 e include at least c vertices in each Xe , and any solution can be modified so that it does not include more than c vertices in each Xe . Thus, the k vertices of a solution of G3c-sub corresponding to original vertices of G form a dominating set of G.  Let us start with the following proposition, which follows from existing negative results for Dominating Set parameterized by the size of a vertex cover [11]. Proposition 1. DS/c-tdmod does not admit a polynomial kernel on 2-degenerate graphs for any c ≥ 3, unless NP ⊆ coNP/poly. Proof: Let us prove that DS/VC ≤ppt DSCdege /3-tdmod, where Cdege is the class of 2degenerate graphs. As DS/VC (and even DS/k+VC) does not admit a polynomial kernel unless NP ⊆ coNP/poly [11], we will get the desired result using Theorem 3. Let (G, k) be an instance of DS/VC with G = (V, E) and m = |E|. We define G0 = G3-sub , and let V 0 be the set of vertices of G0 . By Observation 2, G has a dominating set of size k if and only if G0 has a dominating set of size k + m. Moreover, it is clear that G0 is 2-degenerate. Finally, any vertex cover X of G is a 3-treedepth modulator of G0 . Indeed, in G0 [V 0 \ X], to each edge e ∈ E entirely contained in X corresponds in G0 [V 0 \ X] an isolated P3 , and to each v ∈ V \ X corresponds in G0 [V 0 \ X] a spider rooted at v of height 4 with x ≥ 1 leaves. Thus, G0 [V 0 \ X] is a disjoint collection of P3 ’s and spiders of height 4, both having treedepth at most 3. As 3-tdmod (G0 ) ≤ vc(G) (the size of a minimum vertex cover of G), this is a PPT reduction and we get the desired result. We can get the same result for DSCdege /c-tdmod for c ≥ 4 by subdividing 3f (c) times each edge of G, for an appropriate function f .  Observation 3 DS/1-tdmod (or equivalently DS/ VC) admits a polynomial kernel on degenerate graphs. Indeed, given an instance (G, k) of DS/ VC, we compute in polynomial time a 2-approximate vertex cover X of G. If |X| ≤ k then we output a trivial Yesinstance, otherwise VC(G) ≥ k2 and we can apply the polynomial kernel for DS/k on degenerate graphs of Philip et al. [28]. 14 Marin Bougeret and Ignasi Sau c11 x1 c1m y1 x¯1 r1 ri ci1 ciℓ cim yi ct1 rt ctm yt a1 ∈ E iff xiℓ ∈ Cℓi xℓ aℓ x̄ℓ ∈ E iff x̄iℓ ∈ Cℓi xn an x¯n α Fig. 3. Example of the or-cross-composition of Theorem 6. Thus, by Proposition 1 and Observation 3, the only remaining case for degenerate graphs is DS/2-tdmod. We would like to point out that the composition of [11] for DS/(k+VC) on general graphs cannot be easily adapted to DS/2-tdmod on degenerate graphs, as for example subdividing each edge also leads to a result for DS/3-tdmod. Thus, we treat the case DS/2-tdmod on degenerate graphs using an ad-hoc reduction. Theorem 6. DS/2-tdmod does not admit a polynomial kernel on 4-degenerate graphs unless NP ⊆ coNP/poly. Proof: We prove this result by using an or-cross-composition from 3-Sat (see Definition 2). We consider t instances of 3-Sat, where for very i ∈ [t], instance I i has mi clauses {Cji | j ∈ [mi ]} and ni variables X i = {xi` | ` ∈ [ni ]}, each clause containing 3 variables. We can choose the equivalence relation R of Definition 2 such that for every i ∈ [t], we have mi = m and ni = n. Let us now construct a graph G = (V, E) asSfollows; see Fig. 3 for an illustration. We start by adding to V the set of vertices X = `∈[n] {x` , x¯` } (and thus |X | = 2n) and S C i = {ci` | ` ∈ [m]} for every i ∈ [t]. Let C = i∈[t] C i . For every i ∈ [t], ` ∈ [n], j ∈ [m], we set {x` , cij } ∈ E i (resp. {x¯` , cij } ∈ E i ) if and only if Cji contains xi` (resp. x̄i` ). We S add to E the set i∈[t] E i . Then, we add to V the set A = {a` | ` ∈ [n]}, and create n triangles by adding to E edges {x` , x¯` }, {a` , x` }, and {a` , x¯` } for every ` ∈ [n]. Finally, we add to V the set Y = {y i | i ∈ [t]}, R = {ri | i ∈ [t]}, and a vertex α. Then, for every i ∈ [t], we add to E edges {ri , ci` } for every ` ∈ [m], edges {ri , y i }, and edges {y i , α}. This concludes the construction of G. To summarize, G has 3n + t(m + 2) + 1 vertices (vertices are partitioned into V = (X ∪ A) ∪ (C ∪ Y ∪ R) ∪ {α}) and, in particular, for every i ∈ [t], G[{ri } ∪ C i ∪ y i ] is a star, and G[{α} ∪ Y ] is also a star. The or-equivalence. Let us prove that there exists i ∈ [t] such that I i is satisfiable if and only if G has a dominating set of size at most k = n + t. Suppose first, without loss of generality, that I 1 is satisfiable, and let SX ⊆ X be the set of n literals corresponding to this assignment (thus for every ` ∈ [n] we have |SX ∩ {x` , x¯` }| = 1). Let S = SX ∪ y 1 ∪ (R \ {r1 }). We have |S| = n + t, and S is a dominating set of G as • X ∪ A is dominated by SX , How much does a treedepth modulator help to obtain polynomial kernels? 15 • C 1 is dominated by SX as it corresponds to an assignment satisfying I 1 , and for every i ∈ [t], i ≥ 2, C i is dominated by ri , • y 1 ∈ S, and for every i ∈ [t], i ≥ 2, y i is dominated by ri , • r1 is dominated by y 1 , and for any i ∈ [t], r ≥ 2, ri ∈ S, and • α is dominated by y 1 . For the other direction, let S = S1 ∪ S2 , with S1 = S ∩ (X ∪ A), be a dominating set of G of size at most k = n + t. Without loss of generality, we can always suppose that S1 ⊆ X , as if a` ∈ S we can always remove a` from S and add (arbitrarily) x` or x¯` . Let us first prove that |S1 | = n. Observe first that |S1 | ≥ n as dominating A requires at least n vertices. Suppose now by contradiction that |S1 | > n. Then, there would remain at most t − 1 vertices to dominate R, which is not possible. Note that we even have that for any ` ∈ [n], |S1 ∩ {x` , x¯` }| = 1, as every a` must be dominated and |S2 | = t. Let us now analyze S2 (recall that, by definition, S2 ⊆ (C ∪ Y ∪ R) ∪ {α}). We cannot have that for every i ∈ [t], |S2 ∩ (C i ∪ ri )| ≥ 1, as otherwise there would be no remaining vertex to dominate α. Thus, there exists i0 such that |S2 ∩ (C i0 ∪ ri0 )| = 0. This implies that C i0 is dominated by S1 . As for every ` ∈ [n], |S1 ∩ {x` , x¯` }| = 1, S1 corresponds to a valid truth assignment that satisfies all the C`i ’s, ` ∈ [m], and the instance I i0 is satisfiable. Size of the parameter. Let M = X ∪ A ∪ {α}. As G[V \ M ] contains t disjoint stars, we have that 2-tdmod (G) ≤ |M | ≤ poly(n), as required. Degeneracy. Let us prove that G is 4-degenerate. Observe that any vertex in C has degree at most 4 (three neighbors in X and one in R). Thus, any ordering of V (G) of the form (C, R, Y, α, X , A) (with arbitrary order within each set) is a 4-elimination order of G.  5 Excluding polynomial kernels parameterizing by tw or td Our objective in this section is to show that the meta-result of Gajarskỳ et al [17] cannot be improved by replacing c-tdmod with td, even when restricting ourselves to planar graphs of bounded maximum degree. S When proving lower bounds on the size of kernel for a parameter κ such that κ( Gi ) ≤ poly(max(κ(Gi ))) (such as tw or td), compositions are generally simple, as taking the union of the input graphs preserves the parameter as required (which is obviously not true, for example, when parameterizing by the size of a solution). However, there is a problem occurring when proving that if the large union graph is a Yes-instance, then every (or there exists, depending if we are designing an and- or or-composition) instance is a Yes-instance, as the sizes of the solutions in the different Gi ’s are not necessarily balanced. This explains why in [3] and in this work we introduce bounded versions of decision problems, where we already know that either a small solution exists, or there is no larger solution. Let us now explain in detail how Bodlaender et al. [3] prove that several problems (including IS and DS) do not admit a polynomial kernel parameterized by tw unless NP ⊆ coNP/poly. To that end, they first define a refinement problem, where the input of the classical problem is augmented with a witness I (corresponding to a subset of vertices or edges), and the question is to decide whether there exists a solution of size |I| + 1 (or |I| − 1 for a minimization problem). For example, in the IS-ref problem, given a graph G and an independent set I, the question is to decide whether G has an independent set of size |I| + 1. Then, they show that 16 Marin Bougeret and Ignasi Sau 1. IS-ref is Karp NP-hard (by a Karp reduction from IS that simply adds k − 1 independent vertices connected to all the old vertices), 2. IS-ref/tw is or-compositional, 3. IS-ref/tw does not admit a polynomial kernel unless NP ⊆ coNP/poly (which is a direct consequence of the two previous points using Theorem 1), and 4. IS/tw does not admit a polynomial kernel unless NP ⊆ coNP/poly (by simply observing that IS-ref/tw ≤ppt IS/tw and using Theorem 3). A drawback of this approach is that we loose planarity in Step 1. To obtain the same results for planar graphs, we propose the following modification of the previous approach, where we replace the positive witness by an upper bound (or a lower bound, for minimization problems), and use an and-composition instead. In the following, ΠC will denote any NPO optimization graph problem where input graphs belong to a graph class C and, and ΠCdec its associated decision problem (given G ∈ C and k, we have to decide whether opt(G) ≥ k for an maximization problem, or opt(G) ≤ k for a minimization one). Definition 6 (Decision problem with negative witness). Given a maximization (resp. minimization) problem ΠC , we define ΠCsup (resp ΠCinf ) as follows: Input: In instance (G, k) of ΠCdec such that opt(G) ≤ k (resp. opt(G) ≥ k). Question: Decide whether opt(G) = k. Definition 7. We say that an optimization problem is additive if for every two graphs G1 and G2 , opt(G1 ∪ G2 ) = opt(G1 ) + opt(G2 ). Observe that many classical optimization problems are additive, like IS or DS. Proposition 2. Let C be a graph class stable under disjoint union and let ΠC be an additive optimization problem. Then ΠCsup /td and ΠCinf /td are and-compositionnal. Proof: Let us only prove the result for ΠCsup , as the proof is similar for ΠCinf . Let t be an integer and let, for i ≤ t, ((Gi , ki ), td) be an instance of ΠCsup , where td(Gi ) = td. Let G0 be Pt the disjoint union of the Gi ’s and let k 0 = i=1 ki . We have td(G0 ) ≤ max(td(Gi )). As C is stable under disjoint union, to verify that (G0 , k 0 ) is an instance of ΠCsup P it only remains to prove that opt(G0 ) ≤ k 0 . However, as Π is additive, we have opt(G0 ) = 1≤i≤t opt(Gi ) ≤ k0 . It remains to verify that opt(G0 ) = k 0 ⇔ P ∀i, opt(Gi ) = ki . ⇐: is straightforward by the additivity of Π. ⇒: Let us suppose that 1≤i≤t opt(Gi ) = k 0 , and let ` ≤ t. Again, as for every i we have opt(Gi ) ≤ ki , we deduce opt(G` ) ≥ k` , and thus opt(G` ) = k` .  According to Theorem 1, we get the following results. Note that as ΠCsup ≤ppt ΠCdec , we use Theorem 3 and also state the result for ΠCdec in the next theorem. Theorem 7. Let C be a graph class stable under disjoint union. • For any additive maximization problem Π such that ΠCsup is Karp NP-hard, ΠCsup /td (and thus ΠCdec /td) does not admit a polynomial kernel unless NP ⊆ coNP/poly. • For any additive minimization problem Π such that ΠCinf is Karp NP-hard, ΠCinf /td (and thus ΠCdec /td) does not admit a polynomial kernel unless NP ⊆ coNP/poly. According to the previous theorem, it turns out that to exclude a kernel by treedepth we only have to prove that the “negative witness” version of a decision problem is Karp NP-hard, which is usually almost already given by classical reductions. How much does a treedepth modulator help to obtain polynomial kernels? 17 Proposition 3. ISsup is Karp NP-hard, where C is the class of planar graphs of maxiC mum degree at most 4. Proof: It is sufficient to observe that the reduction from planar 3-Sat(5) (where each variable appears in at most 5 clauses) to planar IS provided in [23] is in fact a reduction to planar ISsup . For the sake of completeness let us recall this reduction. An instance of planar 3-Sat(5) is described by a set C of m clauses ci and a set X of n variables xj , where each ci contains exactly three literals (where a literal is of the form xj or x¯j ). Consider the occurrence graph (which is planar) G = (V, E) that has V = C ∪ X and has an edge from a variable to a clause if the variable or its negation appear in the clause. We define G0 by replacing each ci with a triangle Tci (each vertex of the triangle is associated with a literal of the clause) and each xj with a cycle on four 0 vertices Cxj = {vx1j , vx1¯j , vx2j , vx2¯j } with edges {vxt j , vxt¯j | t, t0 ∈ {1, 2}}. Then, we add edges between Tci and Cxj in the following way. If Tci contains a vertex v corresponding to x` (resp. x¯` ), we add an edge {v, vxt¯` } (resp. {v, vxt ` }) where t ∈ {1, 2}. Note that we can always choose t such that G0 remains planar. Indeed, as each variable appears in at most 5 clauses, it is always possible to embed the Cxj ’s such that the 5 edges of the form {v1 , v2 } with v2 ∈ Cxj do not cross when connecting to Cxj . It is easy to verify that the edges can be added in such a way that the maximum degree of the constructed planar graph is at most 4. Observe that G0 can be partitioned into m triangles and n C4 ’s, implying α(G0 ) ≤ m + 2n. As α(G0 ) = m + 2n if and only if the original instance of planar 3-Sat(5) is satisfiable, we get the desired result.  Note that it could be tempting to directly conclude that ISsup is NP-hard on planar graphs using the classical Turing reduction from IS on planar graphs (i.e., starting with an instance of ISsup with k = n, and decreasing k while the oracle for ISsup answers ‘No’). However, this would only prove that ISsup is Turing NP-hard on planar graphs, which is not sufficient to use Theorem 1 that requires Karp NP-hardness, even if this detail is generally not mentioned in the statement. As IS is an additive problem, we immediately deduce the following corollary. Corollary 1. IS/td does not admit a polynomial kernel on planar graphs of maximum degree at most 4 unless NP ⊆ coNP/poly. To propagate the previous result to almost all problems covered by the meta-result of Gajarskỳ et al [17], we will use Theorem 3 on folklore reductions and verify that the treedepth is polynomially preserved. To avoid tedious enumeration of problems, we restrict our attention to problems mentioned in Corollary 2 below. Note that for problems like Longest path and Treewidth where opt(G1 ∪ G2 ) = max(opt(G1 ), opt(G2 )), we also get that a polynomial kernel is unlikely to exist on planar graphs, as taking the union of input graphs provides a trivial or-composition. Corollary 2. The following problems do not admit a polynomial kernel when parameterized by td or tw on planar graphs of bounded maximum degree unless NP ⊆ coNP/poly: VC, FVS, OCT, DS, r-DS, Chordal Vertex Deletion, Induced Matching. Proof: We split the proof into several problems. FVS, OCT, DS. For these three problems we use the same folkore reduction. Given an input (G, k) of VC, we define G0 by adding for each edge {u, v} of G a vertex xuv , and two edges {xuv , u} and {xuv , v}. It is straightforward to verify that G admits a vertex cover of size at most k if and only if G0 admits a FVS (or OCT, or DS) of size at most k. 18 Marin Bougeret and Ignasi Sau As td(G0 ) ≤ td(G) + 1 (in the treedepth decomposition of G, for each vertex u in G we add degree of u new leaves attached to u), this is a PPT reduction. Chordal vertex deletion. We use almost the same reduction as above: given an input (G, k) of VC, we define G0 by adding for each edge {u, v} of G two vertices x1uv , x2uv , and edges {u, x1uv }, {x1uv , x2uv }, {x2uv , v}. r-DS. Given an input (G, k) of DS, we define G0 by adding a pendant Pr attached to each vertex of G, and we set k 0 = k. As r is constant, the treedepth is polynomially preserved. Induced Matching. Given an input (G, k) of IS, we define G0 by adding a pendant vertex to each vertex of G, and we set k 0 = k.  Note that Corollary 2 does not apply for C 1 , defined as the class of connected planar graphs of bounded maximum degree, as C 1 is obviously not stable under disjoint union. However, there are two ways to get the same result for all problems of Corollary 2 for C 1 , using the following observations. If a problem Π is solvable on planar graphs in time O∗ (ctd ) for some constant c (which is often the case [9, 12, 30]), we can show using an ad-hoc argument (i.e., depending on the problem) that ΠC /td≤ppt ΠC 1 /td. Let us illustrate this for IS. Given an instance (G, k) of ISC /td having k1 ≤ k connected components Xi , let vi ∈ Xi be a vertex on the outer face of Xi . For every i we add two vertices ai , bi and edges {ai , bi }, {bi , vi } so that any optimal solution takes ai and not bi , and we connect all the bi ’s by creating a path. We get a graph G0 , and we set k 0 = k + k1 so that (G, k) and (G0 , k 0 ) are equivalent. G0 is still planar of bounded maximum degree and td(G0 ) ≤ td(G)dlog2 (k1 + 1)e) (as td(Pk1 ) ≤ dlog2 (k1 + 1)e). If log2 (k1 ) ≤ td(G) then this is PPT reduction. Otherwise, we can solve the original input in polynomial time and also get the reduction. Alternatively, it is generally possible to directly cross-compose from ΠCinf1 (or ΠCsup 1 ) to ΠC 1 /td using again an ad-hoc argument to connect the graph. Given the t instances {Gi } of ΠCinf1 , we define G0 by adding a dummy vertex vi on the outer face of Gi and connecting the vi ’s by creating a path. If the dummy vertices are added such that G0 is a yes-instance if and only if all the Gi ’s are yes-instances, we have an and-cross-composition, as again td(G0 ) ≤ max(td(Gi ))dlog2 (k1 + 1)e), and this log factor is allowed in the parameter of a cross-composition. 6 Concluding remarks and further research In this article we studied the existence of polynomial kernels for problems parameterized by the size of a c-treedepth modulator, on graphs that are not necessarily sparse. On the positive side, we proved that Vertex Cover (or equivalently, Independent Set) parameterized by the size x of a c-treedepth modulator admits a polynomial kernel on O(c2 ) general graphs with x2 vertices, for every c ≥ 1. A natural direction is to improve the size of this kernel. Since Vertex Cover parameterized by the distance to a disjoint collection of cliques of size at most c does not admit a kernel with O(xc− ) vertices unless NP ⊆ coNP/poly [24], and since a clique of size c has treedepth c, the same lower bound applies to our parameterization; in particular, this rules out the existence of a uniform kernel. However, there is still a large gap between both bounds, hence there should be some room for improvement. On the negative side, we proved that Dominating Set parameterized by the size of a c-treedepth modulator does not admit a polynomial kernel on 4-degenerate graphs for any c ≥ 2. As Dominating Set with this parameterization admits a polynomial kernel on nowhere dense graphs [17], it follows that sparse graphs constitute the border for How much does a treedepth modulator help to obtain polynomial kernels? 19 the existence of polynomial kernels for Dominating Set. This leads us to the following natural question: are there smaller parameters for which Dominating Set still admits polynomial kernels on sparse graphs? Since considering as parameter the treedepth of the input graph does not allow for polynomial kernels (see Section 5), we may consider as parameter the size x of a vertex set whose removal results in a graph of treedepth at most b(x), for a function b that is not necessarily constant. We prove in Appendix B that Dominating Set does not admit polynomial kernels on graphs of bounded expansion for b(x) = Ω(log x), unless NP ⊆ coNP/poly. On the other hand, by combining the approach of Garnero et al. [19] to obtain explicit kernels via dynamic programming with the techniques of Gajarskỳ et al. [17] on graphs of bounded expansion, it can be shown – we omit the details here – that Dominating Set admits a polynomial kernel for b(x) = O(log log log x) on graphs of bounded expansion whose expansion function f is not too “large” 4 , namely f (d) = 2O(d) . While this result is somehow anecdotal, we think that it may be the starting point for a systematic study of this topic. We leave as an open question the existence of polynomial kernels on general graphs for other natural problems parameterized by the size of a treedepth modulator, such as Feedback Vertex Set (already studied by Jansen et al. [21] under several parameterizations) or Odd Cycle Transversal. In the spirit of the recent meta-kernelization results on sparse graphs [4,15,17,19,22], it would be interesting to find generic conditions for a problem to admit polynomial kernels on general graphs with this parameter. To the best of our knowledge, the only meta-kernelization result with structural parameters on general graphs is by Ganian et al. [18], where the parameter is the minimum number of parts Vi ’s required in a vertex partition such that every Vi is a module (for every v ∈ V \Vi , either all or no vertex of Vi is adjacent to v) and G[Vi ] has bounded rankwidth5 . Finally, it is worth studying whether the 2c -approximation algorithm of [17] for computing a c-treedepth modulator can be improved (maybe, using the algorithm of Reidl et al. [29] for computing treedepth), or whether a lower bound can be proved. References 1. Open problem session of the Workshop on Kernelization (WorKer), Warsaw, Poland, 2013. Summary available at http://worker2013.mimuw.edu.pl/slides/worker-opl.pdf. 2. F. N. Abu-Khzam, M. R. Fellows, M. A. Langston, and W. H. Suters. Crown structures for vertex cover kernelization. Theory of Computing Systems, 41(3):411–430, 2007. 3. H. L. Bodlaender, R. G. Downey, M. R. Fellows, and D. Hermelin. On problems without polynomial kernels. Journal of Computer and System Sciences, 75(8):423–434, 2009. 4. H. L. Bodlaender, F. V. Fomin, D. Lokshtanov, E. Penninkx, S. Saurabh, and D. M. Thilikos. (Meta) Kernelization. In Proc. of the 50th IEEE Symposium on Foundations of Computer Science (FOCS), pages 629–638. IEEE Computer Society, 2009. 5. H. L. Bodlaender, S. Thomassé, and A. Yeo. Analysis of data reduction: Transformations give evidence for non-existence of polynomial kernels. Technical report, Citeseer, 2008. 6. B. Courcelle. The monadic second-order theory of graphs I: recognisable sets of finite graphs. Information and Computation, 85(12-75):663, 1990. 7. M. Cygan, F. V. Fomin, L. Kowalik, D. Lokshtanov, D. Marx, M. Pilipczuk, M. Pilipczuk, and S. Saurabh. Parameterized Algorithms. Springer, 2015. 4 5 That is, the function F that bounds the grad with rank d of the graphs in the family, see [25]. Note that our kernel for VC/c-tdmod is not covered by the meta-result of [18]. Indeed, given a c-treedepth modulator X = {vi | i ∈ [|X|]}, we could define a partition of V (G) with Vi = {vi } for i ∈ [|X|] and V|X|+1 = V (G) \ X. The number of parts is polynomial in |X|, each satisfying the rankwidth condition: rw(V|X|+1 ) ≤ tw(V|X|+1 ) + 1 ≤ td(V|X|+1 ) + 1 ≤ c + 1. However, V|X|+1 is not a module in general. 20 Marin Bougeret and Ignasi Sau 8. M. Cygan, D. Lokshtanov, M. Pilipczuk, M. Pilipczuk, and S. Saurabh. On the hardness of losing width. Theory of Computing Systems, 54(1):73–82, 2014. 9. M. Cygan, J. Nederlof, M. Pilipczuk, M. Pilipczuk, J. M. M. van Rooij, and J. O. Wojtaszczyk. Solving Connectivity Problems Parameterized by Treewidth in Single Exponential Time. In Proc. of the 52nd Annual IEEE Symposium on Foundations of Computer Science (FOCS), pages 150–159. IEEE Computer Society, 2011. 10. R. Diestel. Graph Theory. Graduate Texts in Mathematics, 2005. 11. M. Dom, D. Lokshtanov, and S. Saurabh. Kernelization lower bounds through colors and ids. ACM Transactions on Algorithms, 11(2):13, 2014. 12. F. Dorn, E. Penninkx, H. L. Bodlaender, and F. V. Fomin. Efficient Exact Algorithms on Planar Graphs: Exploiting Sphere Cut Decompositions. Algorithmica, 58(3):790–810, 2010. 13. R. G. Downey and M. R. Fellows. Fundamentals of parameterized complexity. Springer, 2013. 14. J. Flum and M. Grohe. Parameterized Complexity Theory. Texts in Theoretical Computer Science. Springer, 2006. 15. F. V. Fomin, D. Lokshtanov, S. Saurabh, and D. M. Thilikos. Bidimensionality and kernels. In Proc. of the 21st ACM-SIAM Symp. on Disc. Algorithms (SODA), pages 503–510, 2010. 16. F. V. Fomin and T. J. F. Strømme. Vertex cover structural parameterization revisited. CoRR, abs/1603.00770, 2016. 17. J. Gajarskỳ, P. Hliněnỳ, J. Obdržálek, S. Ordyniak, F. Reidl, P. Rossmanith, F. S. Villaamil, and S. Sikdar. Kernelization using structural parameters on sparse graph classes. In Proc. of the 21st European Symposium on Algorithms (ESA), volume 8125 of LNCS, pages 529–540. 2013. 18. R. Ganian, F. Slivovsky, and S. Szeider. Meta-kernelization with structural parameters. Journal of Computer and System Sciences, 82(2):333–346, 2016. 19. V. Garnero, C. Paul, I. Sau, and D. M. Thilikos. Explicit linear kernels via dynamic programming. SIAM Journal on Discrete Mathematics, 29(4):1864–1894, 2015. 20. B. Jansen and H. Bodlaender. Vertex cover kernelization revisited: Upper and lower bounds for a refined parameter. In Proc. of the 28th Symposium on Theoretical Aspects of Computer Science (STACS), volume 9 of LIPIcs, pages 177–188, 2011. 21. B. M. Jansen, V. Raman, and M. Vatshelle. Parameter ecology for feedback vertex set. Tsinghua Science and Technology, 19(4):387–409, 2014. 22. E. J. Kim, A. Langer, C. Paul, F. Reidl, P. Rossmanith, I. Sau, and S. Sikdar. Linear kernels and single-exponential algorithms via protrusion decompositions. ACM Transactions on Algorithms, 12(2):21, 2016. 23. D. Lichtenstein. Planar formulae and their uses. SIAM Journal on Computing, 11(2):329– 343, 1982. 24. D. Majumdar, V. Raman, and S. Saurabh. Kernels for structural parameterizations of vertex cover - case of small degree modulators. In Proc. of the 10th International Symposium on Parameterized and Exact Computation (IPEC), volume 43 of LIPIcs, pages 331–342, 2015. 25. J. Nesetril and P. Ossona De Mendez. Sparsity: Graphs, Structures, and Algorithms. Algorithms and Combinatorics. Springer, 2012. 26. R. Niedermeier. Invitation to Fixed-Parameter Algorithms. Oxford University Press, 2006. 27. R. Niedermeier. Reflections on multivariate algorithmics and problem parameterization. In Proc. of the 27th International Symposium on Theoretical Aspects of Computer Science (STACS), volume 5 of LIPIcs, pages 17–32, 2010. 28. G. Philip, V. Raman, and S. Sikdar. Solving dominating set in larger classes of graphs: FPT algorithms and polynomial kernels. In Proc. of the 17th Annual European Symposium on Algorithms (ESA), volume 5757 of LNCS, pages 694–705, 2009. 29. F. Reidl, P. Rossmanith, F. S. Villaamil, and S. Sikdar. A faster parameterized algorithm for treedepth. In Proc. of the 41st International Colloquium on Automata, Languages, and Programming (ICALP), volume 8572 of Lecture Notes in Computer Science, pages 931–942, 2014. 30. J. Rué, I. Sau, and D. M. Thilikos. Dynamic programming for graphs on surfaces. ACM Transactions on Algorithms, 10(2):8, 2014. 31. X. Zhu. Colouring graphs with bounded generalized colouring number. Discrete Mathematics, 309(18):5562–5568, 2009. How much does a treedepth modulator help to obtain polynomial kernels? A 21 List of problems considered in this article Independent Set (IS) Instance: (G, k) with G = (V, E) a graph and k an integer. Question: Decide whether α(G) ≥ k, i.e., if ∃S ⊆ V such that ∀e ∈ E, e * S and |S| ≥ k. c-treedepth modulator Independent Set (c-tdmod-IS) Instance: (G, X, k) with G = (V, E) a graph, X a c-treedepth modulator, k ∈ N. Question: Decide whether α(G) ≥ k. Annotated c-treedepth modulator Independent Set (a-c-tdmod-IS) Instance: (G, X, k) where • G = (V, E, H) is a hypergraph structured as follows: V = X ] R, E = EX,R ] ER,R is a set of edges where edges in EA,B have one endpoint in A and the other in B, and H ≤ 2X is a set of hyperedges where each H ∈ H is entirely contained in X. • X is a c-treedepth modulator (as G[V \ X] is not a hypergraph, its treedepth is correctly defined and we have td(V \ X) ≤ c). • k is a positive integer. Question: Decide whether α(G) ≥ k (where an independent in a hypergraph is a subset of vertices that does not contain any hyperedge, corresponding here to a subset S ⊆ V such that for every h ∈ E ∪ H, h * S). Vertex Cover (VC) Instance: (G, k) with G = (V, E) a graph and k an integer Question: decide whether G has a vertex cover of size at most k, i.e., if ∃S ⊆ V such that ∀e ∈ E, e ∩ S 6= ∅ and |S| ≤ k. Feedback Vertex Set (FVS) Instance: (G, k) with G = (V, E) a graph and k an integer. Question: Decide whether G has a feedback vertex set of size at most k, i.e., if ∃S ⊆ V such that G[V \ S] is a forest and |S| ≤ k Dominating Set (DS) Instance: (G, k) with G = (V, E) a graph and k an integer. Question: Decide whether G has a dominating set of size at most k, i.e., if ∃S ⊆ V such that ∀u ∈ V \ S, ∃v ∈ S | {u, v} ∈ E and |S| ≤ k. Red Blue Dominating Set (RBDS) Instance: (U, W, E, k) where (U, W, E) is a bipartite graph and k is an integer. Question: Decide whether there exists S ⊆ W such that N (S) = U and |S| ≤ k. 22 B Marin Bougeret and Ignasi Sau Stronger negative results for Dominating Set In this section we rule out the existence of polynomial kernels for Dominating Set on graphs of bounded expansion for a parameter that is smaller than the size of a c-treedepth modulator. Let b : N → R be a function. A b-treedepth modulator of a graph G = (V, E) is a subset of vertices X ⊆ V such that td(G[V \ X]) ≤ b(|X|), and we denote by btdmod(G) the size of a smallest b-treedepth modulator of G. Note that, in the particular case where the function b is constantly equal to a positive integer c, b-treedepth modulators correspond exactly to c-treedepth modulators. In the following proposition we show that DS does not admit polynomial kernels on graphs of bounded expansion parameterized by the size of a b-treedepth modulator with b(x) = Ω(log x). Proposition 4. DS/ log-tdmod does not admit a polynomial kernel on graphs of bounded expansion unless NP ⊆ coNP/poly. Proof: As in the proof of Proposition 1, it is sufficient to prove that RBDS/U ≤ppt DSCBE / log-tdmod, as RBDS/U (and even RBDS/(k + U )) does not admit a polynomial kernel unless NP ⊆ coNP/poly [11]. Let (G = (U, W, E), k) be an instance of RBDS/U with u = |U |, w = |W |, and m = |E|. Let G0 = G3u-sub ∪ G̃, where G̃ is a square grid on (3u + 1)4 vertices plus a vertex α connected to all vertices of this grid. G has a RBdominating set of size k if and only if G0 has a dominating set of size k + um + 1 (as we also have to take α in the solutions of G0 ). Let X = U ∪ Ṽ where Ṽ is the vertex set of G̃. Note that G0 [V 0 \ X] is a disjoint collection of spiders Sv (one rooted at each v ∈ W ) of height 3u + 1. As td(Sv ) ≤ 1 + td(P3u ) ≤ 2 + log(3u + 1) ≤ 2 log(3u + 1) = O(log |X|) and td(G0 ) ≥ td(G̃) ≥ (3u + 1)2 , we get that X is a log-treedepth modulator of G0 , and that log-tdmod (G0 ) ≤ |X| ≤ poly(|U |). To summarize, we added a large grid to artificially increase the treedepth of G0 . Moreover, observe that we could not reduce directly from 1 . Let DS/VC as before, as we need a lower bound depending on VC of the form poly(u) us finally verify that G0 has bounded expansion. As G̃ is an apex graph, it has bounded expansion (as, for instance, planar graphs are well-known to have bounded expansion, and the addition of an apex vertex preserves this property), and thus it remains to verify 3u-sub that G3u-sub has bounded expansion. Let K = Ku,w . As G3u-sub ⊆ K as a subgraph, it is sufficient to prove that K verifies the condition of bounded expansion. To that end, we prove that K has bounded generalized coloring number, which according to [31] is equivalent to bounded expansion. For completeness, let us briefly recall the definition of bounded generalized coloring. Given a permutation π on the vertices of a graph G and an integer r, we say that u is weakly r-accessible from v if u < v and there exists a u-v path P of length at most r with u < min(P ) (where min(P ) is the minimum index of a vertex of P ). We denote by Nrπ (v) the set of vertices weakly r-accessible from v, and colπr (G) = maxv Nrπ (v) + 1. The weak r-coloring number of G is wcolr (G) = minπ colπr (G). A class C has bounded generalized coloring number if, for every r, there exists c(r) such that wcolr (G) ≤ c(r) for every G ∈ C. Let r ≥ 1, and let π be any permutation of the S form (U, W, XE ) (where the permutation is arbitrary within each set) where XE = e={u1 ,u2 },u1 ∈U,u2 ∈W Xe are the 3u3 w vertices of degree 2 added when subdividing Ku,w . Let v ∈ U ∪ W ∪ XE . Let us verify that |Nrπ (v)| ≤ c(r). If v ∈ XE then this is clearly true as |Nrπ (v)| ≤ 2. Let us now suppose that v ∈ U ∪ W . If r < 3u then |Nrπ (v)| = 0. It remains the case where r ≥ 3u. Let us prove that for any v ∈ U ∪ W we have Nrπ (v) ⊆ U , implying the desired result. If v ∈ U then Nrπ (v) ⊆ U as U is before W in π. Otherwise (that is, if v ∈ W ), we also have Nrπ (v) ⊆ U , as any path from v to a vertex v 0 ∈ W would have to use a vertex in U , which is not allowed. Thus, this is a PPT reduction and we get the desired result. 
8cs.DS
PREPRINT VERSION Simplified firefly algorithm for 2D image key-points search C. Napoli, G. Pappalardo, E. Tramontana, Z. Marszałek, D. Połap and M. Woz̀niak arXiv:1412.6464v1 [cs.NE] 19 Dec 2014 PUBLISHED ON: 2014 IEEE Symposium on Computational Intelligence for Human-like Intelligence BIBITEX: @inproceedings{Napoli2014Simplified, year={2014}, isbn={978-1-4799-4507-8}, booktitle={2014 IEEE Symposium on Computational Intelligence for Human-like Intelligence}, title={Simplified firefly algorithm for 2D image key-points search}, publisher={IEEE}, author={Napoli, Christian and Pappalardo, Giuseppe and Tramontana, Emiliano and Marszałek, Zbigniew and Połap, David and Woz̀niak, Marcin}, month={December 9-12}, address={Orlando, Florida, USA}, pages={118-125} } Published version copyright c 2014 IEEE UPLOADED UNDER SELF-ARCHIVING POLICIES NO COPYRIGHT INFRINGEMENT INTENDED Simplified firefly algorithm for 2D image key-points search Christian Napoli† , Giuseppe Pappalardo† , Emiliano Tramontana† , Zbigniew Marszałek∗ , Dawid Połap∗ and Marcin Woźniak∗ † Department of Mathematics and Informatics, University of Catania, Viale A. Doria 6, 95125 Catania, Italy Email: [email protected], [email protected], [email protected] ∗ Institute of Mathematics, Silesian University of Technology, Kaszubska 23, 44-100 Gliwice, Poland Email: [email protected], [email protected], [email protected] Abstract—In order to identify an object, human eyes firstly search the field of view for points or areas which have particular properties. These properties are used to recognise an image or an object. Then this process could be taken as a model to develop computer algorithms for images identification. This paper proposes the idea of applying the simplified firefly algorithm to search for key-areas in 2D images. For a set of input test images the proposed version of firefly algorithm has been examined. Research results are presented and discussed to show the efficiency of this evolutionary computation method. I. I NTRODUCTION In modern computer science, evolutionary computation (EC) is one of most important fields, widely applied in various tasks. There are many applications of EC in sciences and industry. The power of computational intelligence (CI) with dedicated mechanisms is used to simulate even sophisticated phenomenon. EC is efficient for searching optimal solutions, easy to implement and precise. Let us give same examples. EC applied to create learning sets for artificial intelligence (AI) control systems is discussed in [1], [2], [3]. Some aspects of positioning computing network models by the use of EC are presented in [4], [5], [6] and [7], [8] or [9]. In [10], [11] and [12], [13] applications of EC methods in dynamic systems positioning and simulation is presented. Optimization of industry processes, i.e. iron cast simulation is shown in [14]. EC methods are also supposed to be more adaptive and efficient in comparison to classic optimization methods, see [15], [16] and [17], [18]. Summing up, EC methods are applied where CI may help to improve data processing. All this gave some inspiration to implement dedicated EC in 2D image processing. First attempts to apply CI methods in 2D image processing are discussed in [19], [20] and [21]. In [19], [22] some aspects of handwriting preprocessing for artificial intelligence (AI) classification systems are discussed. [20] and [21] show ideas of a novel approach to identify simple objects in 2D images by the use of EC methods. These results can help in move methods refactoring of large systems (please see [23], [24], [25]) and surface plasmon polaritons in thin metals (please see [26]), where we need to identify input objects, as well as an advanced modelling technique for a wide variety of systems [27], [28], [29]. In this paper we discuss potential efficiency of dedicated firefly algorithm (FA) to search for key areas in 2D input objects. The purpose of the developed algorithm is to find a advanced solution to obtain precise whole-areas recognition by means of a few iterations. Moreover the proposed FA is designed for better efficiency with respect to other similar recognition algorithms, while still being easy to implement thanks to its simplicity. The rest of this paper is structured as follows. Section II gives the background on the Key-Points search and some classical approaches, then introduces the proposed FA solution. Section III describes the implementation of the proposed FA and presents the experimental results. Finally, Section IV draws our conclusions. II. K EY-P OINTS SEARCH In computer image, each classified object consists of points, which have special position and properties. Among them one can name saturation, sharpness, brightness and more. All these features compose an image of the input object that is visible to our eyes. An exemplary model is shown in Fig. 1. By analysing such features it is possible to identify objects. However recognising objects depends on the selection of meaningful key parts of the image. Therefore one may say, that the position of each pixel (each one has measurable coordinates x = (x, y) = (xi,1 , xi,2 )) and it’s properties (like brightness) are important aspects to make right decision. We decide to recognise some parts or important areas, which can be defined for a computer system. Thus, Key-Point is a pixel in 2D input image, which has peculiar properties making it important for object recognition. Key-Area is containing many key-points that all together compose an object to recognize. In other words, to find the object our eyes search for areas in the picture that contain many points of the same kind. They compose an image of the object, which is being recognized in our brain. This process has some features that may be implemented in Then, the input image is blurred to get DoG (Difference of Gaussian) images, which help to find edges. To localize interesting points it is used non–maximum suppression in 3 × 3 × 3 neighborhood (for more results please see also [20] and [21]). Maximum determinant of Hessian matrix is interpolated at scale σ, which helps to differ between first level and each octave. The applied SURF for RGB (RedGreen-Blue) color values model is presented in algorithm 1. Figure 1. Schematic key-points position in 2D input image a computer algorithm. CI brings many interesting methods that can help. It is possible to apply EC method, in particular simplified FA, to perform the process of searching keyareas which compose input objects we are looking for. In our experiments we take sample images from open test images database1 to examine. The performed experiments show potential efficiency of dedicated FA in the search for key-areas in various 2D pictures. This makes the presented solution not only efficient but also much easier to implement in comparison to classic methods. 1. A. SURF - Classic Attempt The classic methods used for key-areas recognition is SURF (Speeded-Up Robust Features) algorithm. This method describe the input image by selecting characteristic key-points. Let us give only a short description here, for more details please see [30], [31], [32], [33] or [34]. In this work we used SURF combining selection of key-points with calculating 64-element vector (descriptor). In the SURF it is applied integrated image and filter approximation of block Hessian determinant. To detect interesting points we used particular Hessian-matrix approximation (for details please see [30] and [31]). The implementd SURF algorithm define Hessian matrix H(x, σ) for point x = (x, y) in 2D image I at scale σ using formula   L (x, σ) Lxy (x, σ) H(x, σ) = xx , (1) Lxy (x, σ) Lyy (x, σ) where the notations are: Lxx (x, σ) – convolution of Gaus∂2 sian second order derivative ∂x 2 . We define approximation Dxx , Dyy and Dxy using formula  2 |Lxy (σ)|F |Dxx (σ)|F det(Hap ) = Dxx Dyy − Dxy . |Lxx (σ)|F |Dxy (σ)|F (2) 1 www.imageprocessingplace.com Algorithm 1 The SURF method applied to search for keypoints in 2D images 1: Calculate number of pixels and rows in 2D image, 2: while j < rows do 3: while i < pixels do 4: rowsumj = (Rij )2 + (Gij )2 + (Bij )2 , 5: end while 6: end while 7: Integral image is sum of rowsum, 8: Calculate approximated Hessian value using (1), 9: Build response layers for the image, 10: while i < pixels do 11: Calculate descriptor vector for each point, 12: Determine orientation, 13: end while 14: Construct descriptor vector for each image point. B. SIFT - Classic Attempt SIFT (Scale-Invariant Feature Transform) transforms image into scale-invariant coordinates relative to local aspects. This generates features that may densely cover image for full range of scales and locations, please see [35] and [36]. SIFT idea is based on [37], where possibility of matching Harris corners over large image by using correlation window around each corner was discussed (see also [38] and [39] for details). This idea was developed in [40] to general image recognition, where Harris corners were applied to select keypoints by rotationally invariant descriptor of local image regions. However Harris corner detector can be sensitive to changes in image scale, what makes it inefficient in processing images of different sizes. Therefore [41], [35] and [42] extended local feature approach to achieve scale invariance. Then some special features like multidimensional histograms summarizing distribution of measurements useful for recognition of textured objects with deformable shapes were discussed in [43]. Final version of this scale descriptor, less sensitive to local image distortions, was given in [44]. In the implemented SIFT, features are first extracted from set of images and stored in memory. Key-point are matched by individually compared examined feature to these previously stored using Euclidean distance of feature vectors. Correct key-points are filtered from set of matches by identifying subsets of interest points that agree on object, it’s location, scale and orientation. To determine these clusters we perform hash table implementation of generalized Hough transform. Each cluster of features is then subject to further verification. SIFT uses special detector to find scale-space extrema where continuous function is Gaussian. According to [44] we have used L(X, γD ) as scale space of image defined in L(X, γD ) = G(X, γD ) ∗ I(X), (3) where L(X, γD ) is produced from convolution of variablescale Gaussian G(X, γD ) with input image point. To scale selection is used approximated DoG filter. Then key-point is localized by taking Taylor series expansion of scale-space function T ~ ~ = D + DxT X ~ + 0.5X~T Dxx D(X) X, (4) ~ and it’s derivatives are evaluated at image where D(X) points and T is offset from these points (for details see [45]). Finally after filtering, descriptor operations are performed. Descriptor is local statistic of orientations of the gradient of the Gaussian scale space. Algorithm 2 Simplified SIFT applied to search for keypoints in 2D images 1: Calculate maximum number of Level, 2: Build DoG pyramid, 3: Find maximum and minimum of Level, 4: Compare vector of pixel with it’s rescaled neighbors, 5: for Each Level of DoG pyramid do 6: Match to sub pixel maximum location, 7: Eliminate edge points, 8: end for 9: Construct keys using interpolated value. C. Simplified Firefly Algorithm - A Novel Approach Very efficient methods that can be applied in the process of key-areas search are EC algorithms. One of them is simplified firefly algorithm (SFA). It is mapping behavior of flying and blinking insects while searching for a partner. This process, in our simplified version, is applied in 2D images key-areas search. Since classic version of FA, first presented in [46] and [47], it was applied in many fields. In [48] chaotic FA was applied in reliability-redundancy optimization. In [49] it is applied to minimum cross entropy threshold selection. In [50] and [51] this method is applied to solve traveling salesman problem and jobs scheduling. It is also efficient in continuous optimization (see [52]) or multimodal optimization (see [53]). While in [54] is presented efficient application of FA in vector quantization. FA is also efficient in neural network training and power systems positioning (see [55] and [56], respectively). Finally some important aspects of applying FA in the process of image compression are described in [49] and [20]. Where in [20] was discussed idea for potential application of FA classic version in 2D image processing. Therefore here we present SFA method devoted to 2D image processing. Let us now present mathematical model of the SFA algorithm. The SFA is mapping behavior of fireflies in natural conditions. Individuals are described by several biological traits: specific way of flashing, specific way of moving and specific perception of the others. These are mathematically modeled in implementation of SFA as: • γ–light absorption coefficient in given circumstances, • µ–firefly random motion factor, • βpop –firefly attractiveness factor, which implement behavior of different species of fireflies and natural conditions of the environment. Just as in nature, a firefly goes to the most attractive other one by measuring the intensity of flickers over the distance between them characterized by a suitable metric. In SFA an average distance rij between any two fireflies i and j maps the inverse square law. Attractiveness of individuals decreases with increasing distance rij between them. We also map air absorption of light, which makes fireflies visible to certain distance. Using these we built CI to map the behavior of fireflies. In description of SFA we assume: • All fireflies are unisex, therefore one individual can be attracted to any other firefly regardless of gender, • Attractiveness is proportional to brightness. Thus, for every two fireflies less clear flashing one will move toward brighter one, • Attractiveness decreases with increasing distance between individuals, • If there is no clearer and more visible firefly within the range, then each one will move randomly. Distance between any two fireflies i and j situated at points xi and xj in 2D image we define using Cartesian metric v u 2 uX t t t (5) r = kx − x k = t (xt − xt )2 , ij i j i,k j,k k=1 where notations in t iteration are: xti , xtj –points in R × R space (here pixels coefficients on axis X and Y - see Fig. 1), xti,k , xtk,j –k-th components of the spatial coordinates xti and xtj that describe each firefly (2D image point) in the space. Attractiveness of firefly i to firefly j decreases with increasing distance. Attractiveness is proportional to intensity of light seen by surrounding individuals and defined as t 2 t βij (rij ) = βpop · e−γ·(rij ) , t βij (rij )–attractiveness (6) where notations in t iteration are: of t firefly i to firefly j, rij –distance between firefly i and firefly j, γ–light absorption factor mapping natural conditions, βpop –firefly attractiveness factor. Firefly i motions toward more attractive and clearer flashing individual j using information about other individuals in the population denotes simplified formula t xt+1 = bxti + βij (rij ) · (xtj − xti ) + µei c, i (7) where notations in t iteration are: xti , xtj –points in R × R t space (pixels coefficients on axis X and Y), rij –distance bet tween fireflies i and j modeled in (5), βij (rij )–attractiveness of firefly i to firefly j modeled in (6), µ–coefficient mapping natural random motion of fireflies, ei –randomized vector changing position of firefly on each axis. Formula (7) is dedicated and simplified version for 2D images. We introduce it for 2D image key-area search. Using only integer values for X and Y coefficients we can precisely move from pixel to pixel. SFA implementation is presented in algorithm 3. Algorithm 3 Simplified FA to search for 2D image keypoints 1: Define all coefficients: γ–light absorption factor, βpop – attractiveness factor, µ–natural random motion factor, number of f iref lies and generation–number of iterations in the algorithm, 2: Define fitness function for the algorithm – properties of pixels to search for according to (8), 3: Create at random initial population of f iref lies in the picture, 4: t:=0, 5: while t ≤ generation do 6: Calculate distance between individuals in population P using (5), 7: Calculate attractiveness for individuals in population P using (6), 8: Evaluate individuals in population P using (8), 9: Create population O: move individuals towards closest and most attractive individual using (7), 10: Evaluate individuals in population O using (8), 11: Replace best ratio individuals from population P with best ratio individuals from population O, the rest take at random, 12: Rest of f iref lies take at random, 13: Next generation t := t + 1, 14: end while 15: Best f iref lies from the last generation in population P are potential key-points in 2D image. III. R ESEARCH R ESULTS SFA was applied to search for 2D image key-areas. Each firefly is representing a single pixel (point in 2D input image according to coordinates in Fig. 1). Therefore in this paper we simultaneously change names: pixel, 2D image point and firefly. In each iteration we move entire population to search between all image points. Fireflies move from pixel to pixel and search for specific areas according to a given criterion. In our experiments we have used simplified fitness function, which reflects brightness and sharpness of the input image points  0.1 . . . 1 saturation Φ(xi ) = Φ((xi,1 , xi,2 )) = , (8) 0 other where notation Φ(xi ) denotes quality of evaluated pixel. This measure reflects a value in the range from 0.0 to 1.0, where color saturation change from black to white. Therefore using SFA with simple fitness function we are to build SFA classifier based on canny or sobel filter (for details on 2D image filtering please see [57]). Using filtering we extract borders of input objects, which will be marked in white on dark background. Therefore these filtered 2D images will be perfect input objects for final SFA classifier. However, here we would like to discuss only the first part of the project. It is SFA efficiency in classifying key-areas in 2D input images. When fireflies fly for each iterations, they pick pixels with best fitness within the range of their flight. They take position and wait for classification. From all the individuals we take best ratio of them with highest or lowest fitness function value (depending on the experiment). These points (fireflies) are taken to next generation. The rest of population is randomly placed among all input image points, what helps to search entire input object for the points of interest. Let us present results of search for quality of pixel defined in (8), using simplified SURF from section II-A, SIFT from section II-B and SFA from section II-C. Simulations were performed for 400 fireflies in 20 generations with set: βpop = 0.3, γ = 0.3, µ = 0.25, best ratio = 35%. We have examined SFA on standard test images downloaded from open test image databases (see section I). Experiments were performed on various types of 2D input pictures: sharp, blurred, landscapes and human postures or faces. Each of resulted key-points (pixels) is marked in red. We have provided some close-ups of classified areas for better presentation. First we present dark areas where Φ(xi ) = 0 or Φ(xi ) = 0.1. In second attempt we present bright areas where Φ(xi ) = 0.9 or Φ(xi ) = 1. A. Dark areas in 2D images Let us first present research results for dark objects localization. Dark objects are present in many different images. They can represent objects in landscape (trees, blocks, different constructions, etc.), natural phenomena (tornadoes, shadows, etc.), human figures or human appearance (face features, hair, eyes, etc.). In Fig.2 – Fig.5 are presented research results for dark key-areas in input images. We can see that SFA can easily find dark objects of different shapes like human posture, human appearance features (hair, eyes, etc.). It is also Figure 2. Dark key-points search in sharp and human posture images: in first row on the left simplified SURF result and on the right simplified SIFT result, in the second row SFA result Figure 3. Dark key-points search in sharp and human face images: in first row on the left simplified SURF result and on the right simplified SIFT result, in the second row SFA result efficient in finding some aspects in landscapes. In Fig.4 and Fig.5 are presented research results of searching for shades under trees, buildings, bridges or some other natural phenomena. All these areas were found by SFA correctly. like sails or boats located on water, which was also lightened by the Sun. Moreover there were also some clouds on the sky. All these features made processing more complicated. However this can be used as an advance in SFA final classifier based on canny and sobel filter. If applied to filtered 2D images, SFA operates on objects which are filtered and we see only white borders. Therefore recognition process will be easy to perform. B. Bright areas in 2D images Let us now present research results for bright objects localization. Bright objects are present in various images. They can represent landscape (bright or lightened constructions, boats, sails, etc.), natural phenomena (clouds, sun, stars, etc.), human figures or human appearance (gray hair, eyes, make-up, bright clothing, etc.). In Fig.6 – Fig.9 are presented research results for bright key-areas in 2D input images. We can see that SFA can find bright objects of various shapes like human faces or bright clothes (see Fig. 7). It is also efficient in locating bright or lightened constructions like bridges or buildings present in Fig.6 and Fig.9. If compared to SURF, SFA results are better. This method may find more areas that correspond to given criterion in shorter time. This task is more complicated than searching for dark areas. Here the SFA must find bright points among many pixels of similar kind. As the photos were taken during day and all objects of bright properties are lightened in some way. Therefore calculations are slightly more complex. For example in Fig.8 we were looking for bright constructions C. Conclusions Application of SFA allows us to easily and reliably find key-areas in examined 2D input images. SFA is efficient when applied to search for areas like human postures, human face appearance (hair or eyes), building or nature elements (trees, dark constructions or nature phenomena like shades). Table I presents comparison and assessments of the examined methods. The grade was given in a scale from - - (what represents weak grade) to + + (what represents high grade). Comparing research results we conclude that calculations performed by SFA are simple. We just use formulas (5) – (7) to calculate position and perform move of each point in examined 2D input images. SURF and SIFT may present better precision in recognition of input object border line recognition, as it is one of their original purposes. SFA is covering whole recognized objects with points. However SFA, in final 2D classifier will be applied Figure 4. Dark key-points search in landscape images: in first row on the left simplified SURF result and on the right simplified SIFT result, in the second row SFA result Table I C OMPARISON AND ASSESSMENT Verified feature Easy to implement Fast recognition Simple mathematic operations Precision in border recognition Precision in whole area recognition Precision using low number of iterations Possible to increase efficiency Examined method SURF SIFT SFA SURF SIFT SFA SURF SIFT SFA SURF SIFT SFA SURF SIFT SFA SURF SIFT SFA SURF SIFT SFA Figure 5. Dark key-points search in sharp landscape images: in first row on the left simplified SURF result and on the right simplified SIFT result, in the second row SFA result filter for SFA input images. Grade + ++ +/+/--++ + ++ + + + ++ + ++ +/+/++ to search for certain objects in 2D input images, therefore we can think of it as a main advantage. Moreover SFA algorithm efficiency is increased if we are looking for key-points with high contrast in relation to surroundings, what will be used in final 2D recognition system based on canny and sobel IV. F INAL R EMARKS Research presented in this paper show that EC methods are an excellent tool to perform process of key-areas search in 2D images of any kind. It is possible to improve object recognition by application of sophisticated fitness function, which can precisely describe properties of objects and introduction of image filtering. In presented experiments we were looking for sample objects. Recognized points present various, miscellaneous but hypothetical cases. However, in the real applications, identification of objects in 2D images becomes nontrivial problem. Search objects can be not easy to recognize, as discussed for some examples in section III-B due to e.g. wear (expenditure) of elements not enough contrast and environment conditions (lightness, rain, fog etc.). Therefore we will continue research on application of EC methods in the process of 2D image classification to develop the final 2D recognition system based on canny and sobel filter for SFA input images. Summing up, presented application of EC methods to search for 2D images key-areas allows to select areas of interest. SFA is efficient and in comparison to classic methods may give better results. At the same time it allows to easily explore entire 2D input image in search for selected objects without many complicated mathematical operations Figure 6. Bright key-points search in sharp and human posture images: in first row on the left simplified SURF result and on the right simplified SIFT result, in the second row SFA result Figure 7. Bright key-points search in sharp and human face images: in first row on the left simplified SURF result and on the right simplified SIFT result, in the second row SFA result like these in classic methods. It is possible to increase efficiency of SFA. If applied to filtered objects located among many other of low brightness, presented SFA may be used as dedicated recognition system for 2D input images. This is second part of the project we are working on. Early results are promising, however the idea needs more research. For example we have implemented the canny and sobel filter also in the GPU parallel version dedicated for SFA recognition. Therefore in the future research we hope to present efficient SFA recognition system for 2D input images based on GPU parallel canny and sobel filter. R EFERENCES [1] M. Gabryel, R. K. Nowicki, and M. Woźniak, “Creating learning sets for control systems using an evolutionary method,” Lecture Notes in Computer Science - SIDE’2012, vol. 7269, pp. 206–213, 2012. [2] G. Capizzi, C. Napoli, and L. Paternò, “An innovative hybrid neuro-wavelet method for reconstruction of missing data in astronomical photometric surveys,” in Artificial Intelligence and Soft Computing. Springer Berlin Heidelberg, 2012, pp. 21–29. [3] C. Napoli, F. Bonanno, and G. Capizzi, “An hybrid neurowavelet approach for long-term prediction of solar wind,” IAU Symposium, no. 274, pp. 247–249, 2010. Figure 8. Bright key-points search in landscape images: on the left SURF result and on the right simplified FA result Applied Mathematics and Computer Science, pp. accepted–in press, 2014. [10] A. Nowak and M. Woźniak, “Analysis of the active module mechatronical systems,” in Proc. International Conference Mechanika, Kaunas University of Technology, Liethuanija, 2008, pp. 371–376. [11] ——, “Algorithm for optimization of the active module by the use of genetic algorithm,” Acta Mechanica Slovaca, vol. 3, no. C, pp. 307–316, 2008. [12] ——, “Optimization of the active vibroisolation system for operator’s cabin with the hydropneumatical element,” Transactions of the Universities of Košice, vol. 3, pp. 113–116, 2009. [13] F. Banno, D. Marletta, G. Pappalardo, and E. Tramontana, “Tackling consistency issues for runtime updating distributed systems,” in Proceedings of International Symposium on Parallel & Distributed Processing, Workshops and Phd Forum (IPDPSW). IEEE, 2010, pp. 1–8. Figure 9. Bright key-points search in sharp landscape images: in first row on the left simplified SURF result and on the right simplified SIFT result, in the second row SFA result [4] M. Gabryel, R. K. Nowicki, M. Woźniak, and W. M. Kempa, “Genetic cost optimization of the gi/m/1/n finite-buffer queue with a single vacation policy,” Lecture Notes in Artificial Intelligence - ICAISC’2013, vol. 7895, PART II, pp. 12–23, 2013. [5] M. Woźniak, “On applying cuckoo search algorithm to positioning gi/m/1/n finite-buffer queue with a single vacation policy,” in Proc. IEEE Mexican International Conference on Artificial Intelligence (MICAI’2013), Mexico City, Mexico, 2013, pp. 59–64. [6] C. Napoli, F. Bonanno, and G. Capizzi, “Exploiting solar wind time series correlation with magnetospheric response by using an hybrid neuro-wavelet approach,” Proceedings of the International Astronomical Union, vol. 6, no. S274, pp. 156–158, 2010. [7] M. Woźniak, W. M. Kempa, M. Gabryel, R. K. Nowicki, and Z. Shao, “On applying evolutionary computation methods to optimization of vacation cycle costs in finite-buffer queue,” Lecture Notes in Artificial Intelligence - ICAISC’2014, vol. 8467, PART I, pp. 480–491, 2014. [8] C. Napoli, G. Pappalardo, and E. Tramontana, “A hybrid neuro–wavelet predictor for qos control and stability,” in AI* IA 2013: Advances in Artificial Intelligence. Springer International Publishing, 2013, pp. 527–538. [9] M. Woźniak, W. M. Kempa, M. Gabryel, and R. K. Nowicki, “A finite-buffer queue with single vacation policy - analytical study with evolutionary positioning,” International Journal of [14] E. Hetmaniok, D. Słota, and A. Zielonka, “Experimental verification of immune recruitment mechanism and clonal selection algorithm applied for solving the inverse problems of pure metal solidification,” International Journal of Pure and Applied Mathematics, vol. 85, no. 1, pp. 171–178, 2013. [15] J. Cabello, J. Cejudo, M. Luque, F. Ruiz, K. Deb, and R. Tewari, “Optimization of the sizing of a solar thermal electricity plant: Mathematical programming versus genetic algorithms,” in Proc. IEEE Congress on Evolutionary Computation (IEEE CEC’2009), Trondheim, Norway, May 2009, pp. 1193–1200. [16] G. Capizzi, F. Bonanno, and C. Napoli, “Hybrid neural networks architectures for soc and voltage prediction of new generation batteries storage,” in Clean Electrical Power (ICCEP), 2011 International Conference on. IEEE, 2011, pp. 341–344. [17] M. Hu, T. Wu, and J. D. Weir, “An adaptive particle swarm optimization with multiple adaptive methods,” IEEE Transactions on Evolutionary Computation, vol. 17, no. 5, pp. 705– 720, 2013. [18] F. Bonanno, G. Capizzi, A. Gagliano, and C. Napoli, “Optimal management of various renewable energy sources by a new forecasting method,” in Power Electronics, Electrical Drives, Automation and Motion (SPEEDAM), 2012 International Symposium on. IEEE, 2012, pp. 934–940. [19] M. Woźniak, D. Połap, and Z. Marszałek, “On handwriting preprocessing for 2d object recognition systems,” in International Conference on Advances in Information Processing and Communication Technologies - IPCT’2014. Santa Barbara, California, USA: The IRED, Seek Digital Library, 2014, pp. 46–53. [20] M. Woźniak and Z. Marszałek, “An idea to apply firefly algorithm in 2d images key-points search,” Communications in Computer and Information Science - ICIST’2014, no. accepted–in press, 2014. [21] M. Woźniak and D. Połap, “Basic concept of cuckoo search algorithm for 2d images processing with some research results,” in Proceedings of the 10th International Conference on Signal Processing and Multimedia Applications SIGMAP’2014. SciTePress, 2014, pp. accapted–in press. [22] E. Tramontana, “Automatically characterising components with concerns and reducing tangling,” in Proceedings of QUORS workshop at Compsac. IEEE, 2013. [23] C. Napoli, G. Pappalardo, and E. Tramontana, “Using modularity metrics to assist move method refactoring of large systems,” in Seventh International Conference on Complex, Intelligent, and Software Intensive Systems - CISIS 2013, July 2013, pp. 529–534. [24] R. Giunta, G. Pappalardo, and E. Tramontana, “AODP: refactoring code to provide advanced aspect-oriented modularization of design patterns,” in Proceedings of Symposium on Applied Computing (SAC). ACM, 2012. [25] G. Pappalardo and E. Tramontana, “Suggesting extract class refactoring opportunities by measuring strength of method interactions,” in Proceedings of Asia Pacific Software Engineering Conference (APSEC). IEEE, December 2013. [26] F. Bonanno, G. Capizzi, G. L. Sciuto, C. Napoli, G. Pappalardo, and E. Tramontana, “A cascade neural network architecture investigating surface plasmon polaritons propagation for thin metals in openmp,” Lecture Notes in Artificial Intelligence - ICAISC’2014, vol. 8468, PART I, pp. 22–33, 2014. [27] F. Bonanno, G. Capizzi, and C. Napoli, “Some remarks on the application of rnn and prnn for the charge-discharge simulation of advanced lithium-ions battery energy storage,” in Power Electronics, Electrical Drives, Automation and Motion (SPEEDAM), 2012 International Symposium on. IEEE, 2012, pp. 941–945. [28] G. Capizzi, F. Bonanno, and C. Napoli, “Recurrent neural network-based control strategy for battery energy storage in generation systems with intermittent renewable energy sources,” in Clean Electrical Power (ICCEP), 2011 International Conference on. IEEE, 2011, pp. 336–340. [29] ——, “A new approach for lead-acid batteries modeling by local cosine,” in Power Electronics Electrical Drives Automation and Motion (SPEEDAM), 2010 International Symposium on. IEEE, 2010, pp. 1074–1079. [30] P. Abeles, “Speeding up surf,” Advances in Visual Computing - LNCS, vol. 8034, pp. 454–464, 2013. [31] H. Bay, A. Ess, T. Tuytelaars, and L. V. Gool, “Surf: Speeded up robust features,” Computer Vision and Image Understanding, vol. 110, no. 3, pp. 346–359, 2008. [32] P. Decker and D. Paulus, “Model based pose estimation using surf,” Lecture Notes in Computer Science - ACCV’2010, vol. 6469, pp. 11–20, 2011. [33] D. Gossow, P. Decker, and D. Paulus, “An evaluation of open source surf implementations,” Lecture Notes in Computer Science - RoboCup’2010, vol. 6556, pp. 169–179, 2011. [34] H. Mehrotra, B. Majhi, and P. Gupta, “Annular iris recognition using surf,” Lecture Notes in Computer Science - PRMI’2009, vol. 5909, pp. 464–469, 2009. [35] A. Pope and D. Lowe, “Probabilistic models of appearance for 3-d object recognition,” International Journal of Computer Vision, vol. 40, no. 2, pp. 149–167, 1998. [36] S. Se, D. Lowe, and J. Little, “Global localization using distinctive visual features,” in ICIROS’2002 Proceedings, 2002, pp. 226–231. [37] Z. Zhang, R. Deriche, O. Faugeras, and Q. Luong, “Viewbased object recognition using saliency maps,” Artificial Intelligence, no. 78, pp. 87–119, 1995. [38] P. Azad, T. Asfour, and R. Dillmann, “Combining harris interest points and the sift descriptor for fast scale-invariant object recognition,” in IROS’2009 Proceedings. IEEE, 2009, pp. 4275 – 4280. [39] C. Sun, J. Wang, Z. Liu, and J. Li, “Weighted multi-scale image matching based on harris-sift descriptor,” TELKOMNIKA, vol. 11, no. 10, pp. 5965–5972, 2013. [40] C. Schmid and R. Mohr, “Local gray value invariants for image retrieval,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 19, no. 5, pp. 530–534, 1997. [41] R. Nelson and A. Selinger, “Large-scale tests of a keyed, appearance-based 3-d object recognition system,” Vision Research, vol. 38, no. 15, pp. 2469–2488, 1998. [42] A. Shokoufandeh, I. Marsic, and S. Dickinson, “View-based object recognition using saliency maps,” Image and Vision Computing, vol. 17, pp. 445–460, 1999. [43] B. Schiele and J. Crowley, “Recognition without correspondence using multidimensional receptive field histograms,” International Journal of Computer Vision, vol. 36, no. 1, pp. 31–50, 2000. [44] G. Lowe, “Distinctive image features from scale-invariant keypoints,” International Journal of Computer Vision, vol. 60, no. 2, pp. 91–110, 2004. [45] M. Brown and D. Lowe, “Invariant features from interest point groups,” in BMVC’2002 Proceedings, 2002, pp. 656– 665. [46] X. S. Yang, Engineering Optimization: An Introduction with Metaheuristic Applications. USA: John Wiley and Sons, 2010. [47] ——, “Firefly algorithms for multimodal optimization,” Lecture Notes in Computer Science - SAGA’2009, vol. 5792, pp. 169–178, 2009. [48] L. dos Santos Coelho, D. L. de Andrade Bernert, and V. C. Mariani, “A chaotic firefly algorithm applied to reliabilityredundancy optimisation,” in Proc. IEEE Congress on Evolutionary Computation (IEEE CEC’2011), New Orleans, LA, USA, 2011, pp. 517–521. [49] M. H. Horng and R. J. Liou, “Multilevel minimum cross entropy threshold selection based on the firefly algorithm,” Expert Systems with Applications, vol. 38, pp. 14 805–14 811, 2011. [50] G. K. Jati and S. Suyanto, “Evolutionary discrete firefly algorithm for travelling salesman problem,” Lecture Notes in Artificial Intelligece - ICAIS’2011, vol. 6943, pp. 393–403, 2011. [51] A. Yousif, A. H. Abdullah, S. M. Nor, and A. A. Abdelaziz, “Scheduling jobs on grid computing using firefly algorithm,” Journal of Theoretical and Applied Information Technology, vol. 33, no. 2, pp. 155–164, 2011. [52] X. S. Yang, Z. H. Cui, R. B. Xiao, A. H. Gandomi, and M. Karamanoglu, Swarm Intelligence and Bio-inspired Computation: Theory and Applications. Waltham: Elsevier, 2013. [53] X. S. Yang and S. Deb, “Eagle strategy using lévy walks and firefly algorithm for stochastic optimization,” Studies in Computational Intelligence - NICSO’2010, vol. 284, pp. 101– 111, 2010. [54] M. H. Horng, “Vector quantization using the firefly algorithm for image compression,” Expert Systems with Applications, vol. 39, pp. 1078–1091, 2012. [55] S. Nandy, P. P. Sarkar, and A. Das, “Analysis of natureinspired firefly algorithm based back-propagation neural network training,” International Journal of Computer Applications, vol. 43, no. 22, pp. 8–16, 2012. [56] B. Rampriya, K. Mahadevan, and S. Kannan, “Unit commitment in deregulated power system using lagrangian firefly algorithm,” in Proc. IEEE International Conference on Communication Control and Computing Technologies (ICCCCT’2010), Nadu, India, 2010, pp. 389–393. [57] W. Pratt, Digital Image Processing: PIKS Inside, 3rd ed. New York, NY, USA: John Wiley & Sons, Inc., 2001.
9cs.NE
THE CONE OF BETTI TABLES OVER A RATIONAL NORMAL CURVE arXiv:1301.7005v2 [math.AC] 30 Oct 2013 MANOJ KUMMINI AND STEVEN V SAM Abstract. We describe the cone of Betti tables of Cohen–Macaulay modules over the homogeneous coordinate ring of a rational normal curve. 1. Introduction The study of the cone generated by the graded Betti tables of finitely generated modules over graded rings has received much attention recently. (See Definition 2.1 for the relevant definitions.) This began with a conjectural description of this cone in the case of polynomial rings by M. Boij and J. Söderberg [BS1] which was proved by D. Eisenbud and F.-O. Schreyer [ES1]. We refer to [ES2, Flo] for a survey of this development and related results. Similarly, in the local case, there is a description of the cone of Betti sequences over regular local rings [BEKS]. However, not much is known about the cone of Betti tables over other graded rings, or over non-regular local rings. The cone of Betti tables for rings of the form k[x, y]/q(x, y) where q is a homogeneous quadric is described in [BBEG]. In the local hypersurface case, [BEKS] gives some partial results and some asymptotic results. We also point to [EE, §§9, 10] for a study of Betti tables in the non-regular case. In this paper, we consider the coordinate ring of a rational normal curve. These rings are of finite Cohen–Macaulay representation type, and the syzygies of maximal Cohen–Macaulay modules have a simple description; see Discussion 2.2. Our main result is Theorem 4.1, describing the cone generated by finite-length modules over such a ring. Remark 4.10 explains how the argument extends to Cohen–Macaulay modules of higher depth. We work out a few explicit examples of our result in §5 for the rational normal cubic. In Remark 6.1, we consider the cone generated by sequences of total Betti numbers, and get a picture reminiscent of the case of regular local rings from [BEKS]. We thank Jerzy Weyman for helpful discussions and Daniel Erman for suggestions which significantly improved an earlier draft. 2. Preliminaries Let k be a field, which we fix for the rest of the article. Definition 2.1. Let R be any Noetherian graded k-algebra. For a finitely generated R-module M , R (M ) := dim TorR (k, M ) . Let t = pdim(R) + 1 (possibly define its graded Betti numbers βi,j k j i t = ∞). The Betti table of M is   R β R (M ) := βi,j (M ) 0≤i<t, , j∈Z Date: October 29, 2013. 2010 Mathematics Subject Classification. 13D02; 13C05. Key words and phrases. Graded Betti numbers, rational normal curve. MK was partially supported by a CMI Faculty Development Grant; SVS was supported by a Miller research fellowship. Additionally, both authors thank Mathematical Sciences Research Institute, Berkeley, where they were members during Fall 2012 when part of this work was done. 1 2 MANOJ KUMMINI AND STEVEN V SAM which is an element of the Q-vector space VR := Y M Q. 0≤i<t j∈Z The cone of Betti tables over R is the cone B(R) generated by the rays Q≥0 · β R (M ) in VR .  L Let S = k[x, y]. Fix d ≥ 1. Let B = n Snd ⊂ S, i.e., the homogeneous coordinate ring of the rational normal curve of degree d. For a coherent sheaf F on P1 , define (d) Γ∗ (F ) = M H0 (P1 , F ⊗ O(dj)). j∈Z (1) f be the associated coherent We set Γ∗ = Γ∗ . Also, for a finitely generated B-module M , let M 1 sheaf on P . There is an exact sequence (d) f) → H1 (M ) → 0 0 → H0m (M ) → M → Γ∗ (M m where Him denotes local cohomology with respect to the homogeneous maximal ideal m ⊂ B [IL+ , (d) f ) is an isomorphism if (and only if) M is a maximal Theorem 13.21] and hence the map M → Γ∗ (M + Cohen–Macaulay module by [IL , Theorem 9.1]. Discussion 2.2 (Maximal Cohen–Macaulay modules over B). Ignoring the grading for a moment, the indecomposable maximal Cohen–Macaulay B-modules are exactly the modules M (ℓ) := M Snd+ℓ , for ℓ = 0, . . . , d − 1. n≥0 f is a vector bundle on P1 , To see this, let M be a maximal Cohen–Macaulay B-module. Then M 1 and by Grothendieck’s theorem, every vector bundle on P is a direct sum of line bundles. Note (d) f ∼ (d) ) = M , we conclude that M that Γ∗ (O(i)) = M (ℓ) if i ≡ ℓ (mod d) and 0 ≤ ℓ < d. Since Γ∗ (M (ℓ) is a direct sum of the M for various ℓ. For each 0 ≤ ℓ ≤ d − 1, consider the exact sequence 0 → O P1 (−1)ℓ → H0 (P1 , O P1 (ℓ)) ⊗ O P1 → O P1 (ℓ) → 0. (d) Applying Γ∗ to this sequence, we conclude that M (ℓ) is minimally generated by ℓ+ 1 homogeneous elements of the same degree, and that for 1 ≤ ℓ ≤ d − 1, the first syzygy module of M (ℓ) is (M (d−1) (−1))ℓ . Iterating this remark gives a linear minimal free resolution for M (ℓ) over B.  3. Pure resolutions Definition 3.1. We say that a finite length B-module M has a pure resolution if there is a minimal exact sequence of the form 0 → E2 → F1 → F0 → M → 0, where each Fi is generated in a single degree di , the modules F0 , F1 are free, and E2 = M (ℓ) (−d2 )⊕r for some ℓ and r. In this case, we call (d0 , d1 , d2 ; ℓ) the degree sequence of M . We remark that ℓ = 0 means that the module has finite projective dimension.  Proposition 3.2. If M has a pure resolution of type (d0 , d1 , d2 ; ℓ), then its Betti numbers are determined up to scalar multiple. In particular, they are determined by the first 3 Betti numbers (β0 , β1 , β2 ), which is a multiple of β B (d0 , d1 , d2 ; ℓ) = (d(d2 − d1 ) − ℓ, d(d2 − d0 ) − ℓ, d(d1 − d0 )(ℓ + 1)). The other Betti numbers satisfy βi = (d − 1)i−3 β2 dℓ , ℓ+1 (i ≥ 3). THE CONE OF BETTI TABLES OVER A RATIONAL NORMAL CURVE 3 Proof. The Hilbert series of B is HB (t) = 1+(d−1)t (1−t)2 . Suppose that M is a finite length module with pure resolution of type (d0 , d1 , d2 ; ℓ). By definition, we have an exact sequence of the form 0 → M (ℓ) (−d2 )β2 → B(−d1 )β1 → B(−d0 )β0 → M → 0 for some (β0 , β1 , β2 ). By Discussion 2.2, M (ℓ) has a resolution of the form 2ℓ · · · → B(−3)d(d−1) → B(−2)d(d−1)ℓ → B(−1)dℓ → B ℓ+1 → M (ℓ) → 0, so M has a free resolution of the form · · · → B(−d4 )β4 → B(−d2 − 1)β2 dℓ/(ℓ+1) → B(−d2 )β2 → B(−d1 )β1 → B(−d0 )β0 . For i > 3, we have di = di−1 + 1 = d2 + (i − 2) and βi = (d − 1)βi−1 = (d − 1)i−3 β2 dℓ/(ℓ + 1). Taking the alternating sum, we get X dℓ d2 t HB (t) (−1)i (d − 1)i−3 ti−2 HM (t) = β0 td0 HB (t) − β1 td1 HB (t) + β2 td2 HB (t) + β2 ℓ+1 i≥3 = (β0 td0 − β1 td1 + β2 td2 )(1 + (d − 1)t) 1 dℓ d2 +1 1 + (d − 1)t − β2 t 2 2 (1 − t) ℓ+1 (1 − t) 1 − (1 − d)t = (β0 td0 − β1 td1 + β2 td2 )(1 + (d − 1)t) − (1 − t)2 dℓ d2 +1 ℓ+1 β2 t . Since HM (t) is a polynomial, the numerator h(t) of the last expression is divisible by (1 − t)2 . This translates to h(1) = h′ (1) = 0 (where h′ is the derivative with respect to t), which gives two linearly independent conditions on (β0 , β1 , β2 ) since d0 6= d1 and d 6= 0:   ! β d 0 d −d ℓ+1 β1  = 0. d − 1) d0 + (d0 + 1)(d − 1) −d1 − (d1 + 1)(d − 1) d2 + (d2 + 1)( ℓ+1 β2 So (β0 , β1 , β2 ) is determined up to simultaneous scalar multiple, and it is straightforward to check that β B (d0 , d1 , d2 ; ℓ) is a valid solution.  Since it will be used later, we record a relation amongst these pure Betti tables   ℓ ℓ (3.3) β B (d0 , d1 , d2 ; d − 1). β B (d0 , d1 , d2 ; 0) + β B (d0 , d1 , d2 ; ℓ) = 1 − d−1 d−1 This relation extends to all of the Betti numbers since the later Betti numbers are multiples of β2 . 4. Main result Theorem 4.1. The extremal rays of the subcone of B(B) generated by the Betti tables of finite length modules are spanned by Betti tables of modules with pure resolutions of type (d0 , d1 , d2 ; ℓ) where d0 < d1 < d2 and ℓ = 0 or ℓ = d − 1. The proof will be given at the end of the section. The idea is to embed this cone as a certain quotient cone of B(S) and to deduce the result from [ES1]. Let M be a finite length B-module. Let (F• , ∂• ) be a minimal graded B-free resolution of M ; B L then Fi = j B(−j)βi,j (M ) . Consider the exact sequences 0 → image ∂2 → F1 → image ∂1 → 0, 0 → image ∂1 → F0 → M → 0. Using [Eis, Corollary 18.6], we conclude that depth(image ∂i ) = i for i = 1, 2, so image ∂2 is a maximal Cohen–Macaulay B-module. By Discussion 2.2, we may write image ∂2 = d−1 MM (M (ℓ) (−j))bℓ,j (M ) , ℓ=0 j∈Z 4 MANOJ KUMMINI AND STEVEN V SAM for some integers bℓ,j (M ). Hence (4.2) image ∂3 = M (M (d−1) sj (−j − 1)) where sj = j∈Z d−1 X ℓbℓ,j (M ). ℓ=0 Sheafifying the complex 0 → image ∂2 → F1 → F0 , we get the locally free resolution 0→ d−1 MM M O(−jd + ℓ)bℓ,j (M ) → B O(−jd)β1,j (M ) → f = 0 over P1 . Applying Γ∗ to this complex, we get the complex of M 0→ d−1 MM S(−jd + ℓ)bℓ,j (M ) → ℓ=0 j∈Z M B O(−jd)β0,j (M ) j∈Z j∈Z ℓ=0 j∈Z M B S(−jd)β1,j (M ) → M B S(−jd)β0,j (M ) , j∈Z j∈Z which is acyclic by [Eis, Lemma 20.11], and hence a resolution of an S-module, which we denote by M ′ . This resolution is minimal, and M ′ is a finite length module. It follows that S βi,j (M ′ ) (4.3) =  B   βi,j/d (M ), b if i ∈ {0, 1} and d | j, d⌈j/d⌉−j,⌈j/d⌉   0, (M ), if i = 2, otherwise. Note, parenthetically, that the association M 7→ M ′ is functorial. Since M (ℓ) is minimally generated as a B-module by ℓ + 1 elements, we get relations B β2,j (M ) = d−1 X (ℓ + 1)bℓ,j (M ) = ℓ=0 d−1 X (4.4) B β3,j+1 (M ) = d ℓbℓ,j (M ) = d ℓ=0 d−1 X S (ℓ + 1)β2,jd−ℓ (M ′ ), and, ℓ=0 d−1 X S ℓβ2,jd−ℓ (M ′ ). ℓ=0 From these, we obtain another relation B B (M ) = d (M ) − β3,j+1 dβ2,j (4.5) d−1 X S (M ′ ). β2,jd−ℓ ℓ=0 We want to say that the correspondence M 7→ M ′ descends to a combinatorial map on Betti tables β B (M ) 7→ β S (M ′ ). Unfortunately, β B (M ) does not uniquely determine β S (M ′ ) as Example 4.6 shows (one needs the finer invariants bℓ,j (M )), so such a map does not exist. Example 4.6. Consider the case d = 5 and the degree sequences (0, 5, i) for i = 6, . . . , 10 over the polynomial ring S = k[x, y]. The respective pure Betti diagrams are total: 0: 1: 2: 3: 4: 0 1 1 . . . . 1 6 . . . . 6 2 5 . . . . 5 total: 0: 1: 2: 3: 4: 5: 0 2 2 . . . . . 1 7 . . . . 7 . 2 5 . . . . . 5 total: 0: 1: 2: 3: 4: 5: 6: 0 3 3 . . . . . . 1 8 . . . . 8 . . 2 5 . . . . . . 5 total: 0: 1: 2: 3: 4: 5: 6: 7: 0 4 4 . . . . . . . 1 9 . . . . 9 . . . 2 5 . . . . . . . 5 total: 0: 1: 2: 3: 4: 5: 6: 7: 8: 0 1 1 . . . . . . . . 1 2 . . . . 2 . . . . 2 1 . . . . . . . . 1 THE CONE OF BETTI TABLES OVER A RATIONAL NORMAL CURVE 5 Pick rational numbers c1 , . . . , c5 . Then there is some integer D > 0 so that the weighted sum of these Betti diagrams with coefficients Dci is the Betti table of some finite length S-module N . We B (M )) will see in the proof of Lemma 4.8 that N = M ′ for some B-module M . The data (βi,j i=0,1,2,3 only contains 4 numbers which we can express as linear combinations of the ci : B β0,0 (M ) = c1 + 2c2 + 3c3 + 4c4 + c5 B β1,1 (M ) = 6c1 + 7c2 + 8c3 + 9c4 + 2c5 B β2,2 (M ) = 5 · 5c1 + 4 · 5c2 + 3 · 5c3 + 2 · 5c4 + c5 B β3,3 (M ) = 5(4 · 5c1 + 3 · 5c2 + 2 · 5c3 + 5c4 ). In particular, for any such data, there are infinitely many 5-tuples (c1 , . . . , c5 ) which give rise to B (M ) (even up to scalar multiple).  this data, so (c1 , . . . , c5 ) cannot be recovered from βi,j There is an easy solution though: we can define an equivalence relation on B(S) to account for the fact that the sums on the right hand sides of (4.4) and (4.5) are uniquely determined by β B (M ). Then β S (M ′ ), under this equivalence relation, is well-defined since the equivalence relation captures all possible choices for the bℓ,j (M ). We record this discussion now. Notation 4.7. Define an equivalence relation on VS and B(S) by γ ∼ γ ′ if d−1 X ℓ=0 γ2,jd−ℓ = d−1 X ′ γ2,jd−ℓ and ℓ=0 d−1 X ℓγ2,jd−ℓ = ℓ=0 d−1 X ′ ℓγ2,jd−ℓ for all j. ℓ=0 Write B(S)/ ∼ for the set of equivalence classes under this relation. Let φ : VB → VS / ∼ be the following map: for β ∈ VB , define φ(β) to be the class of any γ ∈ VS where γ is such that (a) γi,j = βi,j/d if i ∈ {0, 1} and d | j. Pd−1 P 1 (b) d−1 ℓ=0 ℓγ2,jd−ℓ = d β3,j+1 for all j. ℓ=0 (ℓ + 1)γ2,jd−ℓ = β2,j and (c) γi,j = 0 if i ∈ {0, 1} and d ∤ j or if i ≥ 3.  Lemma 4.8. (a) φ(β B (M )) ∼ β S (M ′ ). (b) φ(β + β ′ ) ∼ φ(β) + φ(β ′ ). (c) If γ ∼ γ ′ and δ ∼ δ′ , then γ + δ ∼ γ ′ + δ′ . (d) φ(B(B)) ⊆ B(S)/ ∼. (e) The restriction of φ to B(B) is injective, and its image is generated by the classes of the Betti tables over S of degree sequences of the form (da0 < da1 < a2 ) where a2 ≡ 0, 1 (mod d). Proof. Properties (a), (b), and (c) follow directly from the definition of ∼. Since B(B) is additively generated by elements of the form β B (M ), (d) follows from (a), (b), and (c). ′ for all 0 ≤ i ≤ 3 and Let β, β ′ ∈ B(B). Set γ = φ(β), γ ′ = φ(β ′ ). If γ ∼ γ ′ , then βi,j = βi,j   B (M ) for all j. To show that φ is injective, we need that for any graded B-module M , βi,j determines β B (M ). Even stronger, by (4.2) and (4.4), these invariants determine image ∂3 : image ∂3 ∼ = M 0≤i≤3, j∈Z B (M (d−1) (−j))β3,j (M )/d . j∈Z Now we describe the image of φ. Let a0 , a1 , a2 be integers such that da0 < da1 < a2 . Let N be a finite length graded S-module with pure resolution with degree sequence (da0 < da1 < a2 ). Let L M = n∈Z Ndn . Then M is a finite length graded B-module. Take a minimal S-free resolution S β2,a (N ) 0 → S(−a2 ) 2 S β1,da (N ) → S(−da1 ) 1 S β0,da (N ) → S(−da0 ) 0 6 MANOJ KUMMINI AND STEVEN V SAM of N . Restricting this complex to degrees nd for n ∈ Z, we see that bℓ,j (M ) = ( S (N ), β2,a 2 0, if jd − ℓ = a2 with 0 ≤ ℓ ≤ d − 1, otherwise. B (M ) = β S (N ). Note that N = M ′ , so the class of β S (N ) is in image φ. and that, for i = 0, 1, βi,j i,jd The converse inclusion, that image φ is inside the cone generated by the classes of the Betti tables over S of degree sequences of the form (da0 < da1 < a2 ) follows from noting that for all B-modules M , β S (M ′ ) has a decomposition into pure Betti tables of this form [ES1, §1]. We may further impose that a2 ≡ 0 (mod d) or a2 ≡ 1 (mod d) if we just want generators for the cone. This follows from what we have just shown, additivity of φ, and the relation (3.3).  Proof of Theorem 4.1. Lemma 4.8 shows that the subcone of B(B) generated by Betti tables of finite length B-modules is already generated by pure Betti tables of type (d0 , d1 , d2 ; ℓ) where d0 < d1 < d2 and ℓ ∈ {0, d − 1}, and also shows that there exist finite length modules which have these Betti tables. To show that these are extremal rays of this subcone, we have to show that no such pure Betti table is a nonnegative linear combination of the other ones. We know that in B(S), the pure Betti tables for different degree sequences have this property. Hence we reduce to fixing d0 , d1 , d2 and showing there are no dependencies as we vary ℓ. But we only allow ℓ = 0 and ℓ = d − 1, and it is clear that the images of their Betti tables under φ are not scalar multiples of each other.  Remark 4.9. By Theorem 4.1, the extremal rays of B(B) are of the form (d0 , d1 , d2 ; ℓ) where ℓ = 0 or ℓ = d − 1. The proof also gives a natural correspondence between these extremal rays and a subset of the extremal rays of B(S) via (d0 , d1 , d2 ; 0) ↔ (dd0 , dd1 , dd2 ), (d0 , d1 , d2 ; d − 1) ↔ (dd0 , dd1 , dd2 − (d − 1)). The extremal rays in B(S) have a partial order structure by pointwise comparison, i.e., (e0 , e1 , e2 ) ≤ (e′0 , e′1 , e′2 ) if and only if ei ≤ e′i for i = 0, 1, 2. We can transfer this partial order structure to the extremal rays of B(B) which gives (d0 , d1 , d2 ; ℓ) ≤ (d′0 , d′1 , d′2 ; ℓ′ ) if and only if d0 ≤ d′0 , d1 ≤ d′1 and dd2 − ℓ ≤ dd′2 − ℓ′ . We can define a simplicial structure on B(B) by defining a simplex to be the convex hull of any set of extremal rays that form a chain in this partial order. Then any two simplices intersect in a common simplex since the same property is true in B(S) [BS1, Proposition 2.9]. Furthermore, every point β ∈ B(B) lies in one of these simplices: from the proof of Lemma 4.8, we see that φ(β) is a (i) (i) (i) positive linear combination of pure Betti tables corresponding to a chain {(da0 , da1 , da2 − ℓ(i) )}, and using (3.3), we can also assume that it is a chain where ℓ(i) ∈ {0, d − 1} for all i. This allows us to use a greedy algorithm as in [ES1, §1] to decompose elements of B(B) as a positive linear combination of pure diagrams.  Remark 4.10. We can modify Theorem 4.1 to describe the cone of Cohen–Macaulay B-modules of a fixed depth. We have just described the depth 0 case, and the depth 2 case corresponds to maximal Cohen–Macaulay modules, which are easily classified (Discussion 2.2), so the only interesting case remaining is depth 1. In this case, one sheafifies the complex 0 → image ∂1 → F0 and the resulting module M ′ is Cohen–Macaulay of depth 1 (it has a length 1 resolution, and its Hilbert polynomial is the same as the Hilbert polynomial of M , and hence has dimension 1). The equivalence relation ∼ on B(S) needs to be changed, but the required changes are straightforward. The end result is that we can define depth 1 Cohen–Macaulay modules with pure resolutions (their type is of the form (d0 , d1 ; ℓ)) and the analogue of Theorem 4.1 holds.  5. An example We give a few explicit examples for d = 3. In this case, B is the homogeneous coordinate ring of the rational normal cubic. We will use Macaulay2 [M2] and the package BoijSoederberg. THE CONE OF BETTI TABLES OVER A RATIONAL NORMAL CURVE 7 We wish to construct a finite length B-module with pure resolution of type (d0 , d1 , d2 ; ℓ) where 0 ≤ ℓ ≤ 2. Consider the case (0, 2, 3; 1). Let N be a finite length module over S = k[x, y] with pure resolution of degree sequence 0 < 6 < 8, for example we can take N to be the quotient by the ideal L6 of 4 random sextics. In any case we have N = i=0 Ni and we set M = N0 ⊕ N3 ⊕ N6 , which is a B-module. If we consider the free resolution 0 → S(−8)3 → S(−6)4 → S for N and throw out all graded pieces whose degree is not divisible by 3 (and then divide all remaining degrees by 3), then we get the exact sequence 0 → M (1) (−3)3 → B(−2)4 → B → M → 0. We now give an example of decomposing the Betti table of a B-module M . Set a = x3 , b = x2 y, c = xy 2 , d= y 3 sothat we can identify B as the polynomial ring in a, b, c, d modulo the 2 × 2 a b c . Consider the B-module M = B/I where I is the ideal (a + c, d2 , cd). The minors of b c d Betti table of M over B is 0 1 2 total: 1 3 5 0: 1 1 . 1: . 2 5 3 4 5 9 18 36 . . . 9 18 36 ... and we wish to decompose it as a nonnegative sum of pure diagrams. Define an S-module M ′ by using the same presentation matrix. Then M ′ = S/J where J is the ideal (x3 + xy 2 , y 6 , xy 5 ). Its Betti table and its decomposition into a nonnegative sum of pure Betti tables is: total: 0: 1: 2: 3: 4: 5: 6: 0 1 1 . . . . . . 1 3 . . 1 . . 2 . 2 1 / 0 1 2\ 2 / 0 1 2\ 1 / 0 1 2\ 2 (-)|total: 4 7 3| + (--)|total: 1 7 6| + (-)|total: 1 4 3| . 7 | 0: 4 . .| 21 | 0: 1 . .| 3 | 0: 1 . .| . | 1: . . .| | 1: . . .| | 1: . . .| . = | 2: . 7 .| | 2: . . .| | 2: . . .| . | 3: . . .| | 3: . . .| | 3: . . .| . | 4: . . .| | 4: . . .| | 4: . . .| 1 \ 5: . . 3/ \ 5: . 7 6/ | 5: . 4 .| 1 \ 6: . . 3/ These 3 pure diagrams translate to the exact sequences 0 → M (2) (−3)3 → B(−1)7 → B 4 , 0 → M (2) (−3)6 → B(−2)7 → B, 0 → M (1) (−3)6 → B(−2)4 → B, and hence we get the sum of pure diagrams 1 / (-)|total: 7 | 0: \ 1: 0 4 4 . 1 7 7 . 2 3 4 5 \ 2 / 0 1 2 3 4 5 \ 1 / 0 1 9 18 36 72 | + (--)|total: 1 7 18 36 72 144 | + (-)|total: 1 4 . . . . | 21 | 0: 1 . . . . . | 3 | 0: 1 . 9 18 36 72 .../ \ 1: . 7 18 36 72 144 .../ \ 1: . 4 2 6 . 6 3 4 5 \ 9 18 36 | . . . | 9 18 36 .../ Alternatively, we can use Remark 4.9 to get a decomposition of β B (M ) without understanding Then the greedy algorithm in [ES1, §1] tells us to subtract the largest positive multiple of the pure diagram of type (0, 1, 3; 2) that leaves a nonnegative table. By Proposition 3.2, this has Betti table β S (M ). 0 1 2 3 4 5 total: 4 7 9 18 36 72 0: 4 7 . . . . 1: . . 9 18 36 72 ... So the largest multiple we can subtract is 1/7, which leaves us with 1 / (--)|total: 7 | 0: \ 1: 0 1 2 3 4 5 \ 4 14 26 45 90 180 | 3 . . . . . | . 14 26 45 90 180 .../ Now we repeat by subtracting the largest possible multiple of the pure diagram of type (0, 2, 3; 2) that leaves a nonnegative table. When we do this, the result is another pure diagram. The final decomposition is 8 MANOJ KUMMINI AND STEVEN V SAM 1 / (-)|total: 7 | 0: \ 1: 0 4 4 . 1 7 7 . 2 3 4 5 \ 5 / 0 1 2 3 4 5 \ 1 / 0 1 9 18 36 72 | + (--)|total: 1 7 18 36 72 144 | + (-)|total: 1 3 . . . . | 28 | 0: 1 . . . . . | 4 | 0: 1 . 9 18 36 72 .../ \ 1: . 7 18 36 72 144 .../ \ 1: . 3 2 2 . 2 \ | | / Using (3.3), this pure diagram decomposition of β(M ) is equivalent to the previous one. 6. Questions 1. Unfortunately, our techniques do not allow us to describe the cone B(B) of all finitely generated B-modules (i.e., allowing those that are not Cohen–Macaulay). Given the situation for polynomial rings [BS2], we might conjecture that B(B) is the sum (over c = 0, 1, 2) of the cones of Betti tables for Cohen–Macaulay B-modules of codimension c. Is this correct? 2. For the polynomial ring, the inequalities that define the facets of its cone of Betti tables has an interpretation in terms of cohomology tables of vector bundles on projective space [ES1, §4]. Are there interpretations for the inequalities that define the cone of finite length B-modules? Remark 6.1. With reference to Question 1, let us look at the cone Btot (B) generated by the total Betti numbers (b0 (M ), b1 (M ), b2 (M ), b3 (M )) ∈ Q4 of finitely generated graded B-modules M . Consider an exact sequence 0 → E3 → F2 → F1 → F0 → M → 0 such that F0 , F1 , and F2 are free, E3 is a direct sum of copies of M (d−1) and image(Fi+1 → Fi ) ⊆ mFi for i = 0, 1. (See Discussion 2.2.) Note that for i = 0, 1, 2, bi (M ) = rank Fi and that b3 (M ) = d rank(E3 ). By considering the partial Euler characteristics of the above exact sequence, we get four inequalities: b3 (M ) b3 (M ) b3 (M ) , b1 (M ) ≥ b2 (M ) − , b0 (M ) ≥ b1 (M ) − b2 (M ) + . d−1 d d To prove the second inequality, we have an exact sequence 0 → E3 → F2 → N → 0 where N is a maximal Cohen–Macaulay module, and so rank(E3 ) ≤ (d − 1) rank(N ). Consider the set b3 (M ) ≥ 0, b2 (M ) ≥ {(b0 , b1 , b2 , b3 ) ∈ Q4 : b3 ≥ 0, b2 − b3 b3 b3 ≥ 0, b1 − b2 + ≥ 0, b0 − b1 + b2 − ≥ 0}. d−1 d d This is a convex polyhedral cone, with extremal rays generated by (1, 0, 0, 0), (1, 1, 0, 0), (0, 1, 1, 0) and (0, 1, d, d(d − 1)). We claim that this is the closure of Btot (B); of course, the rays generated by (0, 1, 1, 0) and (0, 1, d, d(d − 1)) do not belong to Btot (B). This picture, and the proof below, are analogous to the case of regular local rings [BEKS, §2]. The point (1, 0, 0, 0) comes from a free module of rank one, while (1, 1, 0, 0) comes from M = B/(f ) for some non-zero f ∈ B. Consider the modules Mt , t ≥ 1 with pure resolutions of type (0, t, t + 1; 0). By Proposition 3.2, (b0 (Mt ), b1 (Mt ), b2 (Mt ), b3 (Mt )) is a multiple of (1, t + 1, t, 0), which limits to the ray (0, 1, 1, 0) as t → ∞. Now consider modules Nt , t ≥ 1 with pure resolutions of type (0, td, td + 1; d − 1). By Proposition 3.2, (b0 (Nt ), b1 (Nt ), b2 (Nt ), b3 (Nt )) is a multiple of (1, td2 + 1, td3 , td3 (d − 1)), which, as t → ∞, approaches the ray generated by (0, 1, d, d(d − 1)).  Remark 6.2. One might wonder whether a similar argument works for the Veronese embedding (P2 , O P2 (2)), whose homogeneous coordinate ring is the only other Veronese subring with finite Cohen–Macaulay representation type. There are significant obstacles to overcome, which we outline. In §4, we took the sheafification of a resolution 0 → image ∂2 → F1 → F0 of the finite length Bmodule M by maximal Cohen–Macaulay B-modules and, thereafter, applied Γ∗ to obtain a minimal S-free resolution of the finite length S-module M ′ ; the key point is that for a maximal Cohen– e ) is a maximal Cohen–Macaulay (hence free) S-module. This is not Macaulay B-module N , Γ∗ (N true for the Veronese embedding (P2 , O P2 (2)). THE CONE OF BETTI TABLES OVER A RATIONAL NORMAL CURVE 9 L More specifically, set S = k[x, y, z] and B = n S2n . Then, up to twists, B has three nonisomorphic maximal Cohen–Macaulay modules M (0) ≃ B, the canonical module M (1) and the syzygy module M (3) of M (1) (see the proof of [Yos, Proposition 16.10]). The first syzygy of M (ℓ) is ] (3) ) is not maximal Cohen–Macaulay over S; its depth is (M (3) )⊕ℓ , for ℓ = 0, 1, 3. However, Γ∗ (M two. To see this, note that the exact sequence 0 → M (3) → B 3 → M (1) → 0 gives the Euler sequence ] (3) ) is the second syzygy of k(1) as an 0 → Ω1P2 (1) → O 3P2 → O P2 (1) → 0 on P2 ; it follows that Γ∗ (M S-module and has depth two. From this it follows that if we begin with a B-free resolution (F• , ∂• ) of a B-module of finite length and apply Γ∗ to the sheafification of 0 → image ∂3 → F2 → F1 → F0 , the ensuing complex of S-modules need not consist of free S-modules.  References [BBEG] C. Berkesch, J. Burke, D. Erman, C. Gibbons, The cone of Betti diagrams over a hypersurface ring of low embedding dimension, J. Pure Appl. Algebra 216 (2012), no. 10, 2256–2268, arXiv:1109.5198v2. 1 [BEKS] C. Berkesch, D. Erman, M. Kummini, S. V Sam, The shape of free resolutions over local rings, Math. Ann. 216 (2012), no. 10, 2256–2268, arXiv:1105.2244v2. 1, 8 [BS1] M. Boij, J. Söderberg, Graded Betti numbers of Cohen-Macaulay modules and the multiplicity conjecture, J. Lond. Math. Soc. (2) 78 (2008), no. 1, 85–106, arXiv:math/0611081v2. 1, 6 [BS2] M. Boij, J. Söderberg, Betti numbers of graded modules and the multiplicity conjecture in the non-CohenMacaulay case, Algebra Number Theory 6 (2012), no. 3, 437–454, arXiv:0803.1645v1. 8 [Eis] D. Eisenbud, Commutative Algebra with a View toward Algebraic Geometry, Graduate Texts in Mathematics 150, Springer-Verlag, New York, 1995. 3, 4 [EE] D. Eisenbud, D. Erman, Categorified duality in Boij–Söderberg theory and invariants of free complexes, arXiv:1205.0449v1. 1 [ES1] D. Eisenbud, F.-O. Schreyer, Betti numbers of graded modules and cohomology of vector bundles, J. Amer. Math. Soc. 22 (2009), no. 3, 859–888, arXiv:0712.1843v3. 1, 3, 6, 7, 8 [ES2] D. Eisenbud, F.-O. Schreyer, Boij–Söderberg theory, Combinatorial aspects of commutative algebra and algebraic geometry, 35–48, Abel Symp., 6, Springer, Berlin, 2011. 1 [Flo] G. Fløystad, Boij–Söderberg theory: Introduction and survey, Progress in commutative algebra 1, 1–54, de Gruyter, Berlin, 2012, arXiv:1106.0381v2. 1 [M2] D. R. Grayson, M. E. Stillman, Macaulay2, a software system for research in algebraic geometry, available at http://www.math.uiuc.edu/Macaulay2/. 6 [IL+ ] S. B. Iyengar, G. J. Leuschke, A. Leykin, C. Miller, E. Miller, A. K. Singh, U. Walther, Twenty-four Hours of Local Cohomology, Graduate Studies in Mathematics 87, American Mathematical Society, Providence, RI, 2007. 2 [Yos] Y. Yoshino, Cohen–Macaulay modules over Cohen–Macaulay rings, London Mathematical Society Lecture Note Series 146 (1990). 9 Chennai Mathematical Institute, Siruseri, Tamilnadu 603103, India E-mail address: [email protected] Department of Mathematics, University of California, Berkeley, USA E-mail address: [email protected]
0math.AC
Property FW, differentiable structures, and smoothability of singular actions arXiv:1803.08567v1 [math.DS] 22 Mar 2018 Yash Lodha∗ Nicolás Matte Bon† Michele Triestino‡ Abstract We provide a smoothening criterion for group actions on manifolds by singular diffeomorphisms. We prove that if a countable group Γ has the fixed point property FW for walls (e.g. if it has property (T)), every aperiodic action of Γ by diffeomorphisms that are of class C r with countably many singularities is conjugate to an action by diffeomorphisms of class C r on a homeomorphic (possibly non-diffeomorphic) manifold. As applications, we show that Navas’s rigidity result for actions of Kazhdan groups on the circle, as well as the recent solutions to Zimmer’s conjecture, generalise to aperiodic actions by diffeomorphisms with countably many singularities. 1 1 Introduction Let Γ be a countable group acting by homeomorphisms on a compact differentiable manifold M . Assume that every g ∈ Γ acts as a diffeomorphism on the complement of some finite subset of points, called the singularities of g. We are interested in the following question: when is such a singular action smoothable, i.e. conjugate to an action by honest diffeomorphisms? The purpose of this paper is to show that this is always the case provided Γ has Kazhdan’s property (T) and the action has no finite orbit. More generally, the same holds true for actions with a countable set of singularities (in a sense made precise below). Recall that a countable group Γ is a Kazhdan group (or has Kazhdan’s property (T)) if every isometric affine action of Γ on a Hilbert space has a fixed point. Even if this is not the original definition, it is equivalent after the Delorme–Guichardet theorem. (See [3] as a general reference on property (T).) In fact, our results are based on a property weaker than property (T), namely the fixed point property for walls FW, named after Barnhill–Chatterji [2] and extensively studied by Cornulier [11, 12] (see also [10] for a recent application to birational dynamics). To recall its definition, let Γ be a countable group acting on a set X. A subset A ⊂ X is said to be commensurated if the symmetric difference g(A)4A is finite for every g ∈ Γ. It is said to be transfixed if there exists a Γ-invariant subset B ⊂ X such that A4B is finite. A group Γ has property FW if for every Γ-action, every commensurated subset is transfixed. Property FW is equivalent to a fixed point property for actions on CAT(0) cube complexes, and admits various other equivalent definitions, for which we refer to [12]. Property (T) implies property FW. For any real r ∈ [1, ∞] we will denote by Diff r (M ) the group of C r diffeomorphisms of a manifold M , with the convention that when r is not integer, this means functions whose brc-th ∗ EPFL SB MATH EGG, MA C3 584 (Batiment MA) Station 8, CH-1015 Lausanne, CH-1015, Switzerland. D-MATH ETH Zürich Rämistrasse 101, 8092 Zürich, Switzerland. ‡ IMB Université Bourgogne Franche-Comté, CNRS UMR 5584, 9 av. Alain Savary, 21000 Dijon, France. 1 MSC2010: Primary 37C85, 57M60. Secondary 37E10. Key-words: Group actions, Groupoid of germs, Property (T), Property FW, Geometric structures, Piecewise linear homeomorphisms, Zimmer’s program, Singularities. † 1 derivative exists and is (r − brc)-Hölder continuous. We further let ΩDiff r (M ) be the group of countably singular diffeomorphisms of class C r , defined as the group of all homeomorphisms g of M such that there exists a dense open subset Ug ⊂ M whose complement is countable and such that g is of class C r in restriction to Ug . It can happen that two manifolds M and N are homeomorphic through a countably singular diffeomorphism, yet they are are not diffeomorphic. This famous discovery is due to Milnor [30], who showed that there are manifolds homeomorphic to the 7-sphere, but not diffeomorphic to it. Manifolds homeomorphic to spheres are now known as exotic spheres. In fact, every exotic sphere of dimension d ≥ 7 admits a singular diffeomorphism to Sd with just one singular point. On the other hand if M and N are as above, then the groups ΩDiff r (M ) and ΩDiff r (N ) are isomorphic. For this reason, exotic differentiable structures arise naturally in the context studied in this paper. We prove the following theorem. Theorem 1.1. Let M be a closed differentiable manifold, and fix r ∈ [1, ∞]. Let Γ be a finitely generated group with property FW. For every homomorphism ρ : Γ → ΩDiff r (M ), one of the following holds: (i) the action of ρ(Γ) on M has a finite orbit; (ii) there exist a closed differentiable manifold N and a countably singular diffeomorphism ϕ : M → N such that ϕρ(Γ)ϕ−1 ⊂ Diff r (N ). This is a special case of Theorem 3.1, which deals with more general geometric structures on manifolds. In the second case, the manifold N delivered by the proof is a connected sum of M with finitely many exotic spheres. In particular, it is homeomorphic to M , but not necessarily diffeomorphic. If the dimension d of M is such that the d-sphere admits a unique differentiable structure, then it is possible to choose N = M (see Theorem 3.1). It is known that the differentiable structure on Sd is unique for d = 1, 2, 3, 5, 6, 12, 56, 61 [23, 24, 38], and never unique for odd d 6= 1, 3, 5, 61 [24, 38], while a general answer is unknown in even dimension. This is a widely open problem for d = 4, known as the 4-dimensional smooth Poincaré conjecture. In the particular case of representations of Γ into groups of singular diffeomorphisms with finitely many singularities, we obtain a more precise statement in the finite-orbit case (i), namely that the action is conjugate to an action that is of class C r away from a finite invariant subset (Theorem 3.6). Let us discuss applications of Theorem 1.1 in dimension n = 1, namely when M = S1 . It is an open problem whether every action of a Kazhdan group on the circle by homeomorphisms factors through a finite quotient. Andrés Navas proved that the answer is affirmative for actions by diffeomorphisms of class C 3/2 [32]. (More precisely, this result is proven in [32] for C r -actions with r > 3/2, but according to [33, Rmk. 5.2.24] it can be extended to C 3/2 -actions, relying on work by Bader–Furman–Gelander–Monod [1], by means of an Lp -analogue of property (T) due to Fisher–Margulis.) Theorem 1.2 (Navas). If Γ is a Kazhdan group, every homomorphism ρ : Γ → Diff 3/2 (S1 ) has finite image. Motivated by a question asked by him (cf. [4, Question 4.8], [33, Rmk. 5.2.24] and [34, §1]), it is natural to study this problem for actions by countably singular diffeomorphisms. A relevant special case is the one of actions by piecewise diffeomorphisms (or piecewise differentiable homeomorphisms), i.e. those for which the singular set is finite, and moreover at every singular point the right and 2 left derivatives exist up to the required order of regularity. We denote by PDiff r (S1 ) the group of all piecewise differentiable homeomorphisms of the circle of class C r . Well-studied examples of groups of piecewise differentiable homeomorphisms of the circle include groups of piecewise linear and piecewise projective homeomorphisms, and the existence of infinite Kazhdan groups was an open question even in this case. Since Kazhdan’s property (T) implies property FW, the combination of Theorem 1.1 with Navas’ theorem allows to answer to this question for actions by piecewise differentiable homeomorphisms. In the case of actions by countably singular diffeomorphisms, it allows to reduce the question to actions on the real line. Corollary 1.3. Let Γ be a Kazhdan group. Then the following hold. (i) Every homomorphism ρ : Γ → PDiff 3/2 (S1 ) has finite image. (ii) For every homomorphism ρ : Γ → ΩDiff 3/2 (S1 ), the action of ρ(Γ) on S1 has a finite orbit. In an independent preprint [13], Yves de Cornulier has obtained part (i) of Corollary 1.3 also allowing the presence of finitely many points of discontinuity for actions by piecewise linear or projective homeomorphisms (see Question 1.16 below and the remark following it). Remark 1.4. The relevant difference between parts (i) and (ii) in Corollary 1.3 is that Thurston’s stability theorem holds in piecewise C 1 regularity. Remark 1.5. Corollary 1.3 cannot be strengthened to obtain √ that every subgroup of PDiff r (S1 ) with property FW is finite. For example the group PSL(2, Z[ 2]) acts on the circle by Möbius transformations. This group has property FW, as proved by Cornulier relying on work of Haglund and Carter–Keller [12, Ex. 6.A.8]. Remark 1.6. There exist finitely generated subgroups of the group PDiff ∞ (S1 ) that are not smoothable, and even not isomorphic to groups of C 1 -diffeomorphisms [4, 29]. Remark 1.7. If we allow an uncountable closed set of singularities (of empty interior), then every group of circle homeomorphisms is isomorphic to a group of singular diffeomorphisms. Blowing up an orbit, it is possible to obtain any desired level of regularity on the complement of a Cantor set. It is a classical leitmotiv that Kazhdan groups should behave like lattices in higher-rank simple Lie groups, which are the primary source of examples of Kazhdan groups. This is certainly far from true in full generality (e.g. there are Kazhdan groups that are hyperbolic), and it is an interesting problem to see how far one can go with this comparison. That is, what are the rigidity properties of Kazhdan groups? For higher-rank lattices, beyond the classical rigidity theorems by Mostow, Margulis and Zimmer, one of the most interesting rigidity properties is described by the so-called Zimmer’s program. An important conjecture in this program states that a lattice in a higher rank simple Lie group has only (virtually) trivial actions on closed manifolds of dimension < d, where d is an explicit constant depending on the ambient Lie group (bounded below by its real rank). This conjecture has been (partially) solved recently with the breakthrough work of Brown, Fisher and Hurtado [6, 7, 15]. For what concerns actions on one-dimensional manifolds, earlier and more precise results were obtained by Ghys, Burger–Monod, and Witte Morris [8, 17, 40]. In relation to our work, the main result of [8, 17] implies that any morphism from a lattice in a simple Lie group of rank ≥ 2 to the group PDiff 1 (S1 ) has finite image. It is a well known open problem whether Zimmer’s conjecture holds for action by homeomorphisms that are not diffeomorphisms. In combination with the aforementioned results of Brown–Fisher– Hurtado [6, 7], Theorem 1.1 yields the following. 3 Corollary 1.8. Let M d be a closed manifold of dimension d. Let G be a connected Lie group, whose Lie algebra is simple and with finite centre. Assume that the real rank of G is r > d and let Γ ⊂ G be a cocompact lattice, or Γ = SL(r + 1, Z). For any morphism ρ : Γ → ΩDiff 2 (M ), the action of ρ(Γ) on M has a finite orbit. Using a more general version of Theorem 1.1 (namely Theorem 3.1), we also establish an analogous statement in the case of actions preserving a volume form, see Corollary 3.7. Remark 1.9. Here we have simplified the statement for avoiding introducing unnecessary notations. The interested reader will be able to improve the above statement from the results appearing in [6, 7, 9, 15]. Note also that Theorem 3.6 gives a stronger result for actions by elements with finitely many singularities. Remark 1.10. For the particular classes of groups of elementary matrices, and automorphism groups of free groups (and some relatives) questions related to Zimmer’s program have been largely investigated by Ye, with no restrictions on regularity (see e.g. [41, 42, 44]). Let us give an outline of the paper and of the proof of Theorem 1.1. The core of our argument has purely topological dynamical nature (no manifolds are involved, only group actions on locally compact spaces), and is contained in Section 2. We consider an action of a countable group Γ on a locally compact space X whose germs at every point belong to a given groupoid of germs H, except for a finite set of singular points for every group element (all the necessary terminology will be defined in Section 2). We provide a criterion on H that implies, when Γ has property FW, that the action is conjugate to an action whose germ at every point belongs to H. To do so we construct a commensurating action of Γ inspired from work of Juschenko–Nekrashevych–de la Salle on amenability of groups of homeomorphisms [21]. We then extend this to the case of countably many singularities by transfinite induction on the Cantor–Bendixson rank of the set of singular points of the generators of Γ. In Section 3 we apply this criterion to singular actions on manifolds. In fact, the set of diffeomorphisms of class C r do not play any special role in the proof of Theorem 1.1. We shall work in a more general setting (see Theorem 3.1), by allowing actions that are countably singular with respect to an arbitrary given groupoid of germs G of local homeomorphisms of Rd , provided M has the structure of a G-manifold, i.e. admits an atlas whose changes of charts have germs in G (see Thurston’s book [37, Ch. 3] as a standard reference on G-manifolds). In the course of the proof, we are faced to the problem of extending a finite collection of germs of singular diffeomorphisms to the whole ambient manifold, without introducing new singularities. Such an extension does not always exist. In the case of actions by diffeomorphisms the obstruction to its existence is measured by the group of twisted n-spheres Γn = π0 (Diff + (Sn−1 ))/π0 (Diff + (Dn )), which is is in one-to-one correspondence with the differentiable structures of Sn (for n 6= 4). Taking a connected sum with exotic spheres allows to eliminate this obstruction by producing another manifold, homeomorphic to the original one, on which the action can be regularised. In Section 4 we discuss the case of piecewise differentiable circle diffeomorphisms, and then focus on the example of groups of piecewise linear (PL) homeomorphisms of the circle. In this case, we provide a more elementary proof of the fact that they do not have property (T), which only relies on Hölder’s theorem. Namely, we will exhibit an isometric action of PL+ (S1 ) on the Hilbert space `2 (S1 ), with linear part defined by the action of the groups on S1 : we twist the linear action with a cocycle that measures the failure of elements to be affine. This cocycle has been widely used (implicitly or explicitly) for understanding many properties of groups of piecewise linear homeomorphisms [18, 19, 27, 31] (just to cite a few). This is to be compared to the result by Farley and Hughes [16, 26] that Thompson’s group V has the Haagerup property, which is also proved by exhibiting an explicit 4 proper action of V on a Hilbert space (Farley’s proof of this result in [16] had a gap and has been fixed by Hughes [26]). Let us end this introduction with a list of problems. Question 1.11. Which subgroups of PDiff r (S1 ) have the Haagerup property? Question 1.12. Does the group ΩDiff r (R) of countably singular diffeomorphisms of the real line contain infinite property (T) subgroups? Question 1.13. Study Zimmer’s conjecture for piecewise differentiable (or PL) actions of higher rank lattices on manifolds of small dimension. (cf. the work of Ye [43].) Question 1.14. Consider the renormalised linear action of SL(n + 1, Z) on the sphere Sn , with n ≥ 7. For which differentiable structures on Sn is this action topologically conjugate to a smooth action? Question 1.15. Extend Corollary 1.3 to groups of discontinuous transformations, such as AIET, the group of affine interval exchange transformations. (The group of isometric interval exchange transformations does not contain infinite Kazhdan subgroups [14].) Question 1.16 (cf. [35]). Classify the subgroups of the group of piecewise projective circle homeomorphisms PP+ (S1 ) that are topologically conjugate to PSL(2, R), up to PP conjugacy. Questions 1.15 and 1.16 (that were written in a preliminary version of this paper) have been answered by Yves de Cornulier in [13]. His answer to Question 1.16 makes use of the classification √ of projective one-manifolds and their automorphism groups: using the fact that PSL(2, Z[ 2]) has property FW (Remark 1.5) and is dense in PSL(2, R), he concludes that the action of a topological PSL(2, R) must preserve a projective structure on S1 . Property FW and singular actions on locally compact spaces 2 2.1 Groupoids of germs Throughout the section, we let X be a locally compact Hausdorff space (not necessarily a manifold). We will be primarily interested in the case where the space X is compact. However, in the course of the proofs, it will be useful to consider non-compact spaces as well. Recall that the support of a homeomorphism h of X is the subset supp(h) = {x ∈ X : h(x) 6= x} of X, which is the closure of the set of points which are moved by h. A germ (on the space X) is the equivalence class of a pair (h, x), where x ∈ X and h is a homeomorphisms defined from a neighbourhood of x to a neighbourhood of h(x) ∈ X, where (h1 , x1 ) and (h2 , x2 ) are equivalent if x1 = x2 and h1 and h2 coincide on a neighbourhood of x1 . We denote by [h]x the equivalence class of (h, x). If γ = [h]x is a germ, where (h, x) is a representative pair of γ, the points s(γ) = x and t(γ) = h(x) are called the source and the target of γ. Two germs γ1 , γ2 can be multiplied provided t(γ2 ) = s(γ1 ), and in this case γ1 γ2 = [h1 h2 ]s(γ2 ) , where (h1 , s(γ1 )) and (h2 , s(γ2 )) are any choice of −1 representatives of γ1 , γ2 . They are inverted according to the rule [h]−1 x = [h ]h(x) . Given a point x ∈ X, we will denote by 1x the germ of the identity homeomorphism at x. Definition 2.1. A groupoid of germs (over X) is a set G of germs on X which verifies the following properties: (i) if γ1 , γ2 ∈ G are such that s(γ1 ) = t(γ2 ), then γ1 γ2 ∈ G, and we have γ −1 ∈ G for every γ ∈ G; 5 (ii) we have 1x ∈ G for every x ∈ X; (iii) every γ ∈ G admits a representative pair (h, s(γ)) with the property that [h]y ∈ G for every y in the domain of definition of h. The topological full group of G is the group F (G) of all compactly supported homeomorphisms g of X with the property that [g]x ∈ G for every x ∈ X. 2.2 Finitely many singularities In this subsection we study group actions on locally compact spaces whose germs at every point belong to a given groupoid of germs, except for finitely many isolated “singularities”. To formalise this idea, we will work in the following setting. Definition 2.2. Let H ⊂ G be groupoids of germs over X. We say that the pair H ⊂ G is co-discrete if every γ ∈ G admits a representative (h, s(γ)) with the property that [h]y ∈ H for every y 6= s(γ) in the domain of definition of h. We will say that γ ∈ G is singular if it does not belong to H, and that it is regular otherwise. / H, and regular Similarly given g ∈ F (G), we will say that a point x ∈ X is singular for g if [g]x ∈ otherwise. The terminology “co-discrete” comes from the fact that a groupoid of germs is naturally endowed with a topology (the so-called sheaf topology), and the condition above is equivalent to the fact that the complement G \ H is discrete with the induced topology (however we will not take this point of view). A simple compactness argument yields the following lemma: Lemma 2.3. Assume that H ⊂ G is a co-discrete pair. Then every g ∈ F (G) has finitely many singular points. Proof. This follows from the fact that elements of F (G) are compactly supported, and from a simple compactness argument. We also give the following definition. Definition 2.4. Let H ⊂ G be a co-discrete pair. We say that it has resolvable singularities if the following holds. For every choice of finitely many germs γ1 , . . . , γ` ∈ G such that t(γ1 ), . . . , t(γ` ) are distinct points, and every compact subset K ⊂ X there exists an element ϕ ∈ F (G) with the following properties. (i) We have [ϕ]t(γi ) γi ∈ H for every i = 1, . . . , `. (ii) We have [ϕ]y ∈ H for every y ∈ K \ {t(γ1 ), . . . t(γ` )}. Intuitively, this means that any finite family of singular germs γ1 , . . . γ` ∈ G can be “resolved” (i.e. brought back to H) by post-composing them with an element ϕ ∈ F (G) that can be chosen without any additional singularities in any arbitrarily large compact subset. Note that if X is compact, the compact subset K is redundant in the definition as we can choose K = X. The reader can have in mind the following example: H is the groupoid of all germs of partially defined diffeomorphisms of the circle, and G is defined similarly by allowing isolated singularities for the derivatives. In this situation, the fact that the pair H ⊂ G has resolvable singularities is easy to verify (and will follow from Proposition 3.5). We consider now subgroups of the topological full group F (G). 6 Remark 2.5. If a group Γ is countable, then property FW implies automatically that it is finitely generated (this is already a consequence of property FA of Serre, which is implied by FW, see [12]). Given a subgroup Γ ⊂ F (G), its support supp(Γ) = h∈Γ supp(h) is the closure in X of the set of points of X that are moved by some element of Γ. When the subgroup is finitely generated, as it is the case for countable subgroups with property FW, the support of Γ is just the union of the supports of elements in a symmetric generating system. We also say that a point x ∈ X is singular for Γ if there exists g ∈ Γ such that x is singular for g. S Proposition 2.6. Let H ⊂ G be a co-discrete pair of groupoids of germs over X with resolvable singularities. Let Γ ⊂ F (G) be a countable subgroup, with property FW. Then there exists ϕ ∈ F (G) such that the set of singular points of the group ϕΓϕ−1 is finite and consists of points with a finite ϕΓϕ−1 -orbit. In particular, if the action of Γ on its support has no finite orbits, then Γ is conjugate in F (G) to a subgroup of F (H). In the proof, we will use the following terminology. Given a pair of groupoids of germs H ⊂ G, there is a well-defined coset space G/H. The latter is defined as the set of equivalence classes of the equivalence relation on G that identifies γ1 , γ2 ∈ G if t(γ1 ) = t(γ2 ) and γ1−1 γ2 ∈ H. The equivalence class of γ is denoted by γH. Note that the target map t : G → X descends to a well-defined map t : G/H → X, t(γH) = t(γ). Proof. We let the group Γ act on the coset space G/H by the rule g · γH = [g]t(γ) γH, g ∈ Γ, γH ∈ G/H. Observe that the target map t : G/H → X is equivariant for this action. Let Y = supp(Γ) ⊂ X be the support of Γ. The action of Γ is trivial in restriction to fibres t−1 (x), x ∈ / Y . Therefore, the subset t−1 (Y ) = {γH ∈ G/H : t(γ) ∈ Y } is a Γ-invariant subset of G/H. Consider the trivial section A = {1x H : x ∈ Y } ⊂ t−1 (Y ) in G/H. Claim 1. The subset A is commensurated. / A is equivalent Proof of claim. Take g ∈ Γ. For every 1x H ∈ A, the condition that g · 1x H = [g]x H ∈ / H, and there are only finitely many points x ∈ Y with this property by to the fact that [g]x ∈ Lemma 2.3. This shows that g(A) \ A is finite. The same reasoning applied to g −1 shows that A \ g(A) is also finite. Hence A is commensurated. Since we are assuming that Γ has FW, it follows that A is transfixed. Let B ⊂ t−1 (Y ) in G/H, be a Γ-invariant subset such that A4B is finite. Claim 2. There exists a finite subset E ⊂ Y which is Γ-invariant and such that for every x ∈ Y \ E, we have |t−1 (x) ∩ B| = 1. Proof of claim. We set E = {x ∈ Y : |t−1 (x) ∩ B| 6= 1}. Then, by invariance of B and equivariance of t, it follows that E is Γ-invariant. Since B4A is finite, and A ∩ t−1 (x) = {1x H} for every x ∈ Y , we deduce that E must be finite. For every x ∈ Y \ E, denote by γx H the unique element of t−1 (x) ∩ B (where we fix arbitrarily a representative γx of the coset for every x ∈ Y \ E). Note that, since B4A is finite, we have γx H = 1x H for all but finitely many x. Note also that t(γx ) = x for every x ∈ Y . Invariance of B reads as follows. γg(x) H = [g]x γx H, ∀x ∈ Y \ E, ∀g ∈ Γ. (1) 7 Claim 3. There exists ϕ ∈ F (G) with the property that [ϕ−1 ]ϕ(x) H = γx H ∀x ∈ Y \ E. Proof of claim. Let Σ ⊂ Y \ E be the finite subset of points x ∈ Y \ E such that γx H 6= 1x H. We use the assumption that the pair H ⊂ G has resolvable singularities, applied to the finite collection of germs {γx : x ∈ Σ} and to the compact subset K = Y . We obtain that there exists ϕ ∈ F (G) such that (a) for every x ∈ Σ we have [ϕ]x γx ∈ H, (b) for every x ∈ Y \ Σ we have [ϕ]x ∈ H. Property (a) can be rewritten as [ϕ−1 ]ϕ(x) H = γx H for x ∈ Σ. Moreover if x ∈ Y \ (E ∪ Σ) property (b) implies that [ϕ−1 ]ϕ(x) H = 1x H, which is equal to γx H since x ∈ / Σ. This concludes the proof of the claim. Claim 4. All singular points of ϕΓϕ−1 are contained in ϕ(E). Proof of claim. Let y ∈ / ϕ(E) and let us show that for every g ∈ Γ the germ of ϕgϕ−1 at y belongs to H. Since ϕΓϕ−1 is supported on ϕ(Y ), we can assume that y = ϕ(x) for some x ∈ Y \ E and the claim is equivalent to: [ϕ]g(x) [g]x [ϕ−1 ]ϕ(x) ∈ H ∀x ∈ Y \ E, which is equivalent to [ϕ−1 ]ϕ(g(x)) H = [g]x [ϕ−1 ]ϕ(x) H, which by Claim 3 is equivalent to γg(x) H = [g]x γx H which is exactly (1). It follows that all the singular points of ϕΓϕ−1 are contained in the finite ϕΓϕ−1 -invariant subset ϕ(E). This concludes the proof of Proposition 2.6. 2.3 Countably many singularities The purpose of the remainder of this section is to study a more general situation where we allow group actions with a countable set of singularities with respect to a given groupoid of germs H. We work in the following setting. Definition 2.7. Let H be a groupoid of germs over X. We let ΩH be the groupoid of all germs γ that admit a representative (h, s(γ)) with the property that [h]y ∈ H for all but at most countably many points y in the domain of definition of h. It is easy to check that ΩH is a well-defined groupoid of germs. Given an element g ∈ F (ΩH), we will say that a point x ∈ X is singular for g if [g]x ∈ / H. Lemma 2.8. For every g ∈ F (ΩH), the set of singular points of g is countable and closed. Proof. Recall that every element g ∈ F (ΩH) has compact support, by the definition we use of the full group. Countability follows from a compactness argument. The fact that the complement of the set of singular points of g is open is a consequence of condition (iii) in Definition 2.1. 8 Our aim is to prove a result analogous to Proposition 2.6 that applies to the pair H ⊂ ΩH. In order to state it we first need to give an alternative point of view on the groupoid ΩH via the notion of Cantor–Bendixson rank of a compact space (see [22, Sec. 6]). Let us recall here its definition in the special case of countable compact spaces, that will be enough for our purposes. Let C be a countable compact space. If such as space is non-empty, then it must contain isolated points by Baire’s theorem. Its Cantor–Bendixson derivative, denoted C 0 , is defined as the complement of the subset of isolated points in C. Given a countable ordinal α define a compact countable subset Cα ⊂ C by transfinite induction by setting C0 = C, and ( Cα = C0 Tβ β<α Cβ if α = β + 1, if α is a limit ordinal. The family Cα is a decreasing ordered family of closed subsets of C. Using the fact that C is countable, it follows that there exists a smallest countable ordinal ρ such that Cρ = ∅. The ordinal ρ will be called the Cantor–Bendixson rank of C. Note also that, as a consequence of compactness of C, the ordinal ρ is of the form ρ = β + 1 and Cβ is a finite subset (the reader should be warned that sometimes its predecessor β is called the Cantor–Bendixson rank of C). Now let H be a groupoid of germs over X. We denote by SH the groupoid of germs consisting of all germs γ that admit a representative (h, s(γ)) such that [h]y ∈ H for all y 6= s(γ) in the domain of definition of h. Note that the pair H ⊂ SH is co-discrete, by definition. For every countable ordinal α we define a groupoid Hα by setting: ( Hα = SHβ S S( β<α Hβ ) if α = β + 1, if α is a limit ordinal. Lemma 2.9. Assume X is compact. Let g ∈ F (ΩH), and let C ⊂ X be the set of singular points of g. Let ρ be the Cantor–Bendixson rank of C. Then g ∈ F (Hρ ). Note that C is countable and compact by Lemma 2.8. Proof. Let Cα be the transfinite sequence as in the definition of Cantor–Bendixson rank. We show by induction on α ≤ ρ that if x ∈ C \ Cα then [g]x ∈ Hα . First assume that α = 1. Then x ∈ C \ C1 is an isolated point in C, and therefore x has a neighbourhood U in X that does not intersect C, i.e. such that [g]y ∈ H for every y ∈ U , y 6= x. It follows that [g]x ∈ SH = H1 . For the induction step, assume first that α is a limit ordinal. This implies that x ∈ C \ Cβ for some β < α and by the inductive hypothesis we have [g]x ∈ Hβ ⊂ Hα . Assume now that α = β + 1 is a successor. We can assume that x ∈ Cβ \ Cα , or we are done again by the inductive hypothesis. Note that Cβ \ Cα consists of isolated points in Cβ , and therefore we can find a neighbourhood U of x such that (U \ {x}) ∩ C ⊂ (C \ Cβ ) and it follows by inductive hypothesis that for every y ∈ U ∩ C, y 6= x, we have [g]y ∈ Hβ , from which we conclude that [g]x ∈ Hα = SHβ . Definition 2.10. We say that H has countably resolvable singularities if for every countable ordinal α the following holds: (i) if α = β + 1 is a successor, then the pair Hβ ⊂ Hα has resolvable singularities; (ii) if α is a limit ordinal, then the pair S β<α Hβ ⊂ Hα has resolvable singularities. Once again, the reader can have in mind the example of the groupoid of germs of all partially defined diffeomorphisms of the circle (Proposition 3.5). We are now ready to state the final result of this section: 9 Proposition 2.11. Let H be a groupoid of germs over X with countably resolvable singularities. Let Γ ⊂ F (ΩH) be a finitely generated subgroup with property FW. Then one of the following possibilities holds. (i) The action of the group Γ on its support has a finite orbit. (ii) The group Γ is conjugate in F (ΩH) to a subgroup of F (H). Proof of Proposition 2.11. We assume that (i) does not hold and show that (ii) holds. Note that the support of the action of Γ is compact (contained in the union of the supports of its generators). Using Lemma 2.9 we obtain that Γ ⊂ F (Hρ ) for some countable ordinal ρ (it is enough to take the largest such ordinal over a finite generating subset of Γ). We show by induction on ρ that Γ is conjugate in F (Hρ ) to a subgroup of F (H). Assume first that ρ = β + 1 is a successor, so that Hρ = SHβ . Then the pair Hβ ⊂ Hρ is co-discrete by definition, and it has resolvable singularities by Definition 2.10. As we are assuming that the action of Γ has no finite orbit in its support, Proposition 2.6 yields that Γ is conjugate in F (Hρ ) to a subgroup of F (Hβ ), and since the assumption that Γ does not have finite orbits in its support is invariant under conjugacy, we are reduced to the inductive hypothesis. S S Next, assume that ρ is a limit ordinal, so that Hρ = S( β<ρ Hβ ). The pair β<ρ Hβ ⊂ Hρ is co-discrete and has resolvable singularities, and using again Proposition 2.6 we obtain that there S S exists ϕ ∈ F (Hρ ) such that ϕΓϕ−1 ⊂ F ( β<ρ Hβ ) = β<ρ F (Hβ ). Using again that ϕΓϕ−1 is finitely generated, it cannot be written as an increasing union of proper subgroups. Therefore it must be contained in F (Hβ ) for some β < ρ. By the inductive hypothesis, this concludes the proof of the proposition. 3 Singular actions on manifolds Throughout the section we fix d ≥ 1 and let G be a groupoid of germs over Rd . Let M be a topological manifold of dimension d (all topological manifolds will be assumed to be Hausdorff and second countable). We will say that M is a G-manifold if it endowed with an atlas such that the corresponding changes of charts have all germs in the groupoid G. See Thurston’s book [37, Ch. 3] for more details. Whenever M, N are G-manifolds, a homeomorphism ϕ : M → N between G-manifolds will be called a G-homeomorphism if in coordinate charts, all the germs of ϕ belong to G. An ΩG-homeomorphism (or a countably singular G-homeomorphism) ϕ : M → N between G-manifolds is a homeomorphism of topological manifolds which is moreover a G-homeomorphism in restriction to an open subset of M whose complement is countable. We will denote by HomeoG (M ) the group of self G-homeomorphism of a G-manifold M , and by ΩHomeoG (M ) the group of countably singular ones. As the main example, fix r ≥ 1 and let Dr be the groupoid of germs of all local diffeomorphisms of class C r of Rd . Then a Dr -manifold M is simply a C r -differentiable manifold, and a Dr homeomorphism is a diffeomorphism of class C r . By a classical theorem of Whitney [39], every C r differentiable manifold admits a unique compatible C ∞ -differentiable structure up to diffeomorphism, therefore in this case we simply say that M is a differentiable manifold. We will say that a differentiable manifold is an exotic sphere if it is homeomorphic to a euclidean sphere Sd (in particular, we use the convention that the standard euclidean sphere is itself an exotic sphere). r As another example that will be relevant, let DLeb be the set of C r -diffeomorphisms of Rd whose Jacobian at every point has determinant 1 (that is, those that preserve the Lebesgue volume form dx1 ∧ · · · ∧ dxd ). Then a G-manifold M is an oriented C r -manifold endowed with a volume form ω 10 (see [37, Ex. 3.1.12]), and G-homeomorphisms are homeomorphisms that preserve the corresponding volume forms. We are now ready to state the main theorem of this section, which implies Theorem 1.1. Theorem 3.1. Let G be a groupoid of germs of Rd , and let M be a closed G-manifold. Let Γ be a finitely generated group with property FW. For every homomorphism ρ : Γ → ΩHomeoG (M ), one of the following holds: (i) the action of ρ(Γ) on M has a finite orbit; (ii) there exist a closed G-manifold N and an ΩG-homeomorphism ϕ : M → N such that ϕρ(Γ)ϕ−1 ⊂ HomeoG (N ). If moreover G = Dr (so that M is a differentiable manifold) and if the dimension d is such that the euclidean sphere Sd is the unique exotic d-sphere up to diffeomorphism, then in part (ii) one can choose N = M . Remark 3.2. In [13], Cornulier obtains results in similar spirit but in a different setting, namely by considering partially defined actions where the action of each element is defined on the complement of a finite set and preserves the G-structure on its domain of definition. The main differences are that while [13] only treats actions with finitely many singularities, in dimension one the results of [13] can be applied to discontinuous actions with finitely many discontinuity points, while we only treat actions that are globally continuous. Another difference is that [13] works more generally with modelled spaces in the sense of Ehresmann (not necessarily manifolds), i.e. spaces with charts taking values in a given model space X (not necessarily homeomorphic to Rd ) with changes of charts prescribed by a given pseudogroup of transformations of X. Here we consider only manifolds, but we point out that this is not essential. Theorem 3.1 (except for the last sentence) extends with the same proof if Rd is replaced by any model space X satisfying mild local conditions (more precisely, any Hausdorff space which does not contain open countable subsets). In the proof we will use the following lemma, whose proof is an elementary cut-and-paste argument. Lemma 3.3. Let M be a G-manifold of dimension d, and x1 , . . . , x` ∈ M be distinct points in M . Assume that U1 , . . . , U` are pairwise disjoint open neighbourhoods of x1 , . . . , x` , and that for every i = 1, . . . , ` we are given an ΩG-homeomorphism hi : Ui → Vi , where Vi is a G-manifold. Then there exists a G-manifold N such that the following hold. 1. As topological manifolds, N and M are homeomorphic. 2. There exists an ΩG-homeomorphism τ : M → N such that for every i = 1, . . . , ` there exist an open neighbourhood Wi ⊂ Ui of xi , and G-homeomorphic embeddings λi : hi (Wi ) ,→ N such that (i) the set of singular points of τ is compactly contained in W1 ∪ · · · ∪ W` ; (ii) for every i = 1, . . . , ` the restriction τ |Wi coincides with λi ◦ hi |Wi . 3. Assume further G ⊂ Dr for some r ≥ 1 (in particular M and N also inherit a structure of differentiable manifolds). Then, seen as a differentiable manifold, N is diffeomorphic to a connected sum of M with finitely many exotic spheres. In particular if the dimension d is such that the standard sphere Sd is the unique exotic d-sphere up to diffeomorphism, then N is diffeomorphic to M . 11 For a definition of the connected sum of differentiable manifolds and its basic properties, we refer the reader to [23, §1]. Proof. Since every hi is a G-homeomorphism on the complement of a countable closed subset of Ui , using compactness we can choose disjoint neighbourhoods Wi ⊂ Ui of the xi ’s such that the following properties are satisfied for every i = 1, . . . , `: (a) the closure W i is a G-manifold with boundary, topologically homeomorphic to a closed ball and is contained in Ui ; (b) hi is a G-homeomorphism in restriction to some open neighbourhood Li of ∂W i in Ui . Set Zi = hi (Wi ), and  let Z i be its closure in Vi , i = 1, . . . , `. Consider the open subset M0 = M \ W 1 ∪ · · · ∪ W ` of M , and let M 0 be its closure in M . We have ∂M 0 = ∂W 1 ∪ · · · ∪ ∂W ` . Let N be the space obtained by gluing M 0 to Z 1 t · · · t Z ` , by identifying every ∂W i with ∂Z i via the map hi , for every i = 1, . . . , `. We denote by λ0 : M 0 ,→ N and λi : Z i ,→ N, i = 1 . . . , ` the canonical inclusions. Define the (topological) homeomorphism τ : M → N given by ( τ (x) = λ0 (x) x ∈ M0 , λi ◦ hi (x) x ∈ W i , i = 1, . . . , `. In particular M and N are homeomorphic as topological manifolds. Let us endow N with the − − + structure of a G-manifold as follows. Write Li = L+ i ∪ Li , where Li = Li \ Wi and Li = Li ∩ W i , so − − + that L+ i ⊂ M 0 , Li ⊂ W i , and Li ∩ Li = ∂W i . The subset Ki = τ (Li ) is an open neighbourhood in N of ∂W i 'hi ∂Z i . We transport the structure of G-manifold of Li to Ki via the homeomorphism τ |Li : Li → Ki , i = 1, . . . , `. Moreover we transport the G-manifold structures of M0 , Z1 , . . . , Z` to λ0 (M0 ), λ1 (Z1 ), . . . , λ` (Z` ) via the identifications λ0 , . . . , λ` . Note that the corresponding structures are compatible on the intersections Ki , because every hi is a G-homeomorphism on the interior of L− i . Therefore this defines uniquely a structure of G-manifold on N . By construction, the homeomorphism τ defined above satisfies the conclusion of part 2. It remains to check part 3. To this end, recall that by (a) the sets Wi above are such that W i is a differentiable manifold with boundary homeomorphic to a closed ball. For i = 1, . . . , `, let Ri be the differentiable manifold obtained by gluing W i and Z i by identifying ∂W i with ∂Z i using the diffeomorphism hi |∂W i . Since both W i and Z i are homeomorphic to disks, and Ri is an exotic sphere, it readily follows from the construction of N that it is diffeomorphic to a connected sum of M with R1 , . . . , R` . The last sentence in part 3 follows from the fact that taking a connected sum with standard spheres does not change the diffeomorphism class of a manifold. Given a closed G-manifold M we denote by GM the groupoid consisting of all germs of Ghomeomorphisms between open subsets of M . Observe that, keeping the notations introduced in the previous section, we have F (GM ) = HomeoG (M ) and F (ΩGM ) = ΩHomeoG (M ). The groupoid GM , however, needs not satisfy the requirements for Proposition 2.11. In order to get around this, we will instead view it as a subgroupoid of a larger groupoid, consisting of all germs of G-homeomorphims between G-manifolds of dimension d. More precisely, let Bd be a set of closed compact G-manifolds of dimension d that contains infinitely many representatives for each G-homeomorphism class (one representative would be enough, but taking infinitely many will slightly simplify the discussion). F We define a space Xd as the disjoint union Xd = M ∈Bd M . We let GXd be the groupoid of germs over the space Xd consisting of all germs of all G-homeomorphisms defined from an open subset of some manifold in Bd to an open subset of some (perhaps different) manifold in Bd . 12 For a fixed G-manifold M ∈ Bd , the group ΩHomeoG (M ) is naturally a subgroup of F (ΩGXd ) supported on M . In particular, it acts on the groupoid ΩGXd by post-composition whenever the target of the element of the groupoid lies in M , and as the identity otherwise. Proposition 3.4. The groupoid GXd has countably resolvable singularities. Proof. To simplify the notations set H = GXd and let Hα be the transfinite sequence as in the previous section. Assume that α = β + 1 is a successor, and let us show that the pair Hβ ⊂ Hα has resolvable singularities (the case of a limit ordinal is totally analogous and we omit it). To this end take γ1 , . . . , γ` ∈ Hα and let K ⊂ Xd be a compact subset as in Definition 2.4. Setting xi = t(γi ), i = 1, . . . `, we can assume that x1 , . . . , x` belong to a closed G-manifold M ⊂ Xd (equal to the union of all the connected G-manifolds that contain x1 , . . . , x` ). Choose representatives (h1 , x1 ), . . . , (h` , x` ) of γ1−1 , . . . , γ`−1 whose domains of definitions are open neighbourhoods U1 , . . . , U` of x1 , . . . , x` respectively, that we can assume to be pairwise disjoint and contained in M . Moreover, by definition of Hα = SHβ , upon reducing the Ui ’s we can assume that [hi ]y ∈ Hβ for every y ∈ Ui \ {xi }. We apply Lemma 3.3 to this data, and let N be the G-manifold and τ : M → N and Wi ⊂ Ui and λi : hi (Wi ) ,→ N be as in the conclusion of the lemma. Without loss of generality, we can suppose that N belongs to Bd , so that N ⊂ Xd . Moreover, since we assume that Bd contains infinitely many representatives of every G-homeomorphism class, we can assume that N ∩ K = ∅ and that N ∩ M = ∅ in Xd . Let ϕ ∈ F (Hα ) be the element given by: ϕ(x) =    τ (x) τ −1 (x)   x x ∈ M, x ∈ N, x∈ / M ∪ N. We claim that ϕ satisfies the conclusions (i,ii) of Definition 2.4. To see this, observe that for every i = 1, . . . , ` we have [ϕ]xi γi = [λi ]hi (xi ) [hi ]xi γi = [λi ]hi (xi ) γi−1 γi = [λi ]hi (xi ) ∈ H ⊂ Hβ . In a similar way one checks that for every x ∈ M \ {x1 , . . . , x` } we have [ϕ]x ∈ Hβ . Since ϕ is supported on M ∪ N and N ∩ K = ∅, this shows that [ϕ]x ∈ Hβ for every x ∈ K \ {x1 , . . . , x` }. This concludes the proof. Note that in the above proof, we have not used part 3 of Lemma 3.3. Taking it into account, the r denotes the groupoid same proof yields the following when G = Dr , r ≥ 1. (In the statement, DM r consisting of all germs of C diffeomorphisms between open subsets of M .) Proposition 3.5. Let M be a closed differentiable manifold of dimension d, and assume that d is such that the standard sphere Sd is the unique standard exotic d-sphere up to diffeomorphism. Then r has countably resolvable singularities. the groupoid DM Proof of Theorem 3.1. Let M be a closed manifold and ρ : Γ → ΩDiff r (M ) be as in the statement, and assume that Γ has no finite orbit. Since property FW passes to quotients, we can identify Γ with its image. We identify M with a subset of Xd , where d is the dimension of M , and Γ with a subgroup of F (ΩDdr ) supported on M . By Proposition 3.4 we are in position to apply Proposition 2.11 and we obtain that either Γ has a finite orbit in M , or that there exists an element ϕ ∈ F (ΩDdr ) such that ϕΓϕ−1 ⊂ F (Ddr ). Note that ϕΓϕ−1 is supported on the manifold N = ϕ(M ), which is the manifold in the statement. If the dimension d is as in the last sentence, then we may repeat the r by Proposition 3.5 and we obtain that M = N . same reasoning using the groupoid DM 13 If we restrict the attention to actions with finitely many singularities, the conclusion can be made more precise in the finite-orbit case. Given a G-manifold M we denote SHomeoG (M ) = F (SGM ) the group of finitely singular G-homeomorphisms of M , i.e. those that are G-homeomorphisms in restriction to the complement of a finite set. It is naturally a subgroup of the topological full group F (SGXd ) (with the notations of the previous section). It follows from Proposition 3.4 that the pair SGd ⊃ Gd satisfies the requirements for Proposition 2.6. Using this, one obtains: Theorem 3.6. Let M be a closed G-manifold. Let Γ be a finitely generated group with property FW. For every homomorphism ρ : Γ → SHomeoG (M ), there exists a closed G-manifold N and a finitely singular G-homeomorphism ϕ : M → N such that the set of singular points of ϕρ(Γ)ϕ−1 is finite and consists of points with a finite ϕρ(Γ)ϕ−1 -orbit. Again, if G = Dr and if the dimension d is such that Sd is the unique exotic d-sphere up to diffeomorphism, then we can choose M = N . Let us now explain the applications related to Zimmer’s conjecture. Corollary 3.7. Let G be a connected Lie group of real rank r ≥ 2, whose Lie algebra is simple and with finite centre. Let Γ ⊂ G be a cocompact lattice, or Γ = SL(r + 1, Z). Let M d be a closed manifold of dimension d, and let ρ : Γ → ΩDiff 2 (M ). Then (i) If d < r, then the action of ρ(Γ) on M has a finite orbit. (ii) If there is a volume form ω on M such that ρ(Γ) preserves the measure associated to ω, and if d ≤ r, then ρ(Γ) has a finite orbit. Remark 3.8. Note that the condition that ρ(Γ) preserve the measure associated to ω is equivalent to say that for every γ ∈ Γ, the element ρ(γ) preserves the form ω outside its singular set (as the singular set of ρ(γ) is countable, it has measure zero). Proof of Corollary 3.7. Both facts follow by combining the main results in [6, 7] with Theorem 3.1, 2 applied to the groupoids G = D2 and G = DLeb respectively. 4 Singular actions on the circle This section is devoted to the more precise results that we can obtain in the case of actions on the circle. 4.1 Piecewise differentiable homeomorphisms Definition 4.1. A homeomorphism g : S1 → S1 is said to be piecewise differentiable of class C r if there exists a finite subset BP(g) ⊂ S1 such that g is a C r -diffeomorphism in restriction to S1 \ BP(g), and for every x ∈ BP(g) the right and left derivatives of g exist up to order brc at x, and the derivative D(brc) g is (r − brc)-Hölder continuous. The subset BP(g) will be called the set of breakpoints of g. The group of all piecewise differentiable homeomorphisms of S1 of class C r is denoted by PDiff r (S1 ). In the following, we will simply denote by Dr the groupoid of diffeomorphic germs DSr1 over S1 , and by PDr the groupoid of piecewise-C r germs over S1 . The difference between SDr and PDr is that in the latter case we require that every germ is represented by a local homeomorphism having left and right first brc derivatives defined at every point of the domain of definition, and with the 14 brc-th left and right derivatives (r − brc)-Hölder continuous. Observe that the pair of groupoids PDr ⊃ Dr is co-discrete, and it is not difficult to show that it has resolvable singularities. We let PDr+ be the subgroupoid consisting of orientation preserving germs. For every x ∈ X we let (PDr+ )x be the isotropy group at x of this groupoid, which consists of all γ ∈ PDr+ such that s(γ) = t(γ) = x. We first settle the following special case of Theorem 4.3. Proposition 4.2. Let Γ be a countable property FW subgroup of PDiff 1 (S1 ) that has a finite orbit. Then Γ is finite. Proof. Assume by contradiction that Γ is infinite, and note that it is finitely generated because of property FW. Since property FW passes to finite index subgroups, we can assume that Γ preserves orientation and fixes a point x ∈ S1 , and using that Γ is finitely generated, without loss of generality we can assume that there exists an element g ∈ Γ such that g is not the identity in restriction to a right neighbourhood of x. Hence we obtain a non-trivial group homomorphism Γ → (PD1+ )x . The image of this homomorphism is a non-trivial finitely generated subgroup of (PD1+ )x , and therefore admits a non-trivial homomorphism to R by the Thurston’s stability theorem [36]. Hence so does Γ. This contradicts property FW, since FW passes to quotients, and an abelian infinite finitely generated group never has FW. Theorem 4.3. Fix r ∈ [1, ∞]. Every countable subgroup of PDiff r (S1 ) with property FW is conjugate in PDiff r (S1 ) to a subgroup of Diff r (S1 ). Proof. Let Γ ⊂ PDiff r (S1 ) be a subgroup with property FW. As the pair PDr ⊂ Dr is co-discrete, with resolvable singularities, we can invoke Proposition 2.6 and claim that the action of Γ on S1 has a finite orbit, or Γ is conjugate in F (SDr ) = PDiff r (S1 ) to a subgroup of F (Dr ) = Diff r (S1 ). However, because of Proposition 4.2, the former is possible only if Γ is finite. Proof of Corollary 1.3. Let Γ be a subgroup of PDiff 3/2 (S1 ), with property (T) and hence property FW. (We again identify Γ with its image.) After Theorem 4.3, there exists a homeomorphism ϕ : S1 → S1 such that ϕΓϕ−1 is a group of C r circle diffeomorphisms. Navas’ theorem (Theorem 1.2) gives that Γ is finite. 4.2 PL circle homeomorphisms and isometric actions In this subsection we will give an alternative and more elementary proof of Corollary 1.3 for groups of piecewise linear homeomorphisms, that we state below. For simplicity, we will always assume that homeomorphisms do preserve the orientation. Definition 4.4. A homeomorphism h : S1 → S1 is piecewise linear if, when seeing S1 as the flat torus R/Z (so with its quotient affine structure), for all but finitely many points x ∈ S1 there exists an open neighbourhood I(x) such that the restriction h|I(x) is an affine map, that is of the form y 7→ ay + b. A point x ∈ S1 where this condition is not verified is a breakpoint of h. We write BP(h) for the set of breakpoints of h. We denote by PL+ (S1 ) the group of piecewise linear homeomorphisms of S1 . Theorem 4.5. If Γ is a Kazhdan group, every homeomorphism ρ : Γ → PL+ (S1 ) has finite image. We consider the Hilbert space H = `2 (S1 ). If a group Γ acts on S1, the action induces an  isometric action on H, just by permutation of the basis: h · (ax )x∈S1 = ah−1 (x) . We write 1 x∈S 15 π : Γ → O(H) for this (left) representation. Given an element h ∈ PL+ (S1 ), we write D− h and D+ h for its left and right derivatives (which are well-defined at every point). The map b : PL+ (S1 ) × S1 → R D+ h(x) (h, x) 7→ log D− h(x) is a cocycle (i.e. b(gh, x) = b(g, h(x)) + b(h, x)), as one sees by applying the chain rule. Observe that we have b(h−1 , x) = −b(h, h−1 (x)). As h is a piecewise linear homeomorphism, for fixed h, the function b(h, −) is zero at all but finitely many points (the breakpoints of h). This allows to define an isometric affine action ρ : Γ → Isom(H), with linear part π and translation part b: Lemma 4.6. Let Γ be a subgroup of PL+ (S1 ). The map ρ, defined for h ∈ Γ and (ax ) ∈ `2 (S1 ) by ρ(h)(ax )x∈S1 := π(h)(ax )x∈S1 + (b(h−1 , x))x∈S1  = ah−1 (x) + b(h−1 , x)  x∈S1 , defines a homomorphism ρ : Γ → Isom(H). Proof. One needs a few simple verifications. First, we check that the map ρ actually defines a homomorphism. This is guaranteed by the fact that b is a cocycle (over π):   ρ(g)ρ(h)(ax )x∈S1 = ρ(g) ah−1 (x) + b(h−1 , x)  = ah−1 g−1 (x) + b(h  −1 ,g −1 x∈S1 (x)) + b(g −1 , x) = a(gh)−1 (x) + b(h−1 g −1 , x)  x∈S1  x∈S1 = ρ(gh)(ax )x∈S1 . Secondly, we have to verify that if a sequence (ax )x∈S1 is in H, then also its ρ(h)-image is. This is because for a fixed element h ∈ PL+ (S1 ), the cocycle b(h−1 , −) is zero at all but finitely many points. Finally, we have to verify that for fixed h ∈ PL+ (S1 ), the map ρ(h) is an isometry. This is because ρ(h) is the composition of the isometry π(h) with the translation b(h−1 , −). Lemma 4.7. Let f ∈ PL+ (S1 ) be a non-trivial element acting with a fixed point on S1 , then ρ(f ) : H → H has an unbounded orbit. Proof. We reproduce an argument appearing in [28, §C]. Let I = (x0 , x1 ) be a connected component of the open support {x ∈ S1 : f (x) 6= x} (possibly x0 = x1 ). Without loss of generality, we can assume that f is contracting on I, i.e. f (y) < y for every y ∈ I. Claim 1. The set of values S = {b(f n , x) : n ∈ N, x ∈ I} is finite. Proof of claim. Choose x0 < z < x1 such that the restriction of f to I0 = (x0 , z) is linear. Given x ∈ I and n ∈ N, the logarithm of the jump of derivatives b(f n , x) can be written as the sum b(f n , x) = n−1 X b(f, f k (x)). k=0 Notice that only points f k (x) that are breakpoints of f contribute to the sum above. As f is a contraction, the sequence {f k (x)}k∈N is strictly decreasing to x0 , so the forward orbit of x visits any breakpoint of f at most once. Therefore b(f n , x) can only take values in the finite set P { c∈E b(f, c)}E⊂BP(f ) . 16 Claim 2. Let Mn denote the number of breakpoints of f n . Then Mn is unbounded as n → ∞. Proof of claim. Suppose, by way of contradiction, that every f n has at most M breakpoints. Fix n ∈ N and set λn = inf x∈I D+ f n (x). By the previous claim, the set S is finite, hence C := (maxσ∈S eσ )M is finite. As the derivative D+ f n can change only when passing through breakpoints, we have the upper bound D+ f n (y) ≤ Cλn for every y ∈ I. By averaging over I, using the fact that R + n I D f (x) dx = |I|, we obtain the inequality 1 ≤ Cλn . As f is a contraction, λn → 0 as n → +∞. This gives the desired contradiction. Take β = minσ∈S\{0} |σ|. The image ρ(f −n )~0 of the vector ~0 is exactly the vector (b(f −n , x))x∈S1 . Its `2 -norm is at least Mn β. As the sequence Mn is unbounded, also the sequence kρ(f n )(0)k is unbounded. Remark 4.8. In the proof of Claim 2, the fact that elements are piecewise linear is fundamental for the proof. Indeed, every non-trivial piecewise linear homeomorphism of an interval has at least one breakpoint. This is no longer true, even for Möbius transformations. We next recall a classical result due to Hölder [33, Theorem 2.2.32]. For its statement, recall that a group action is free if every point has trivial stabiliser. Theorem 4.9 (Hölder). Let Γ be a subgroup of Homeo+ (S1 ), whose action on S1 is free. Then Γ is isomorphic to a group of rotations. More precisely, if Φ : Γ → Φ(Γ) ⊂ SO(2) denotes the isomorphism, there exists a monotone continuous degree 1 map h : S1 → S1 such that hg = Φ(g)h (i.e. Γ is semi-conjugate to a group of rotations). We can now prove the main result of the section: Proof of Theorem 4.5. As the quotient of a Kazhdan group is also a Kazhdan group, it is enough to prove that every subgroup of PL+ (S1 ) which has property (T) is actually finite. So let Γ ⊂ PL+ (S1 ) be an infinite subgroup. We consider the representation ρ : Γ → Isom(H) of Lemma 4.6. Even if property (T) is not inherited by subgroups, we can however restrict to subgroups to show that a particular isometric affine action has unbounded orbits. If Γ contains a non-trivial element acting with a fixed point, then Lemma 4.7 implies that the ρ has an unbounded orbit, disproving property (T). Otherwise, Theorem 4.9 implies that Γ is isomorphic to a group of rotations (in fact, by Denjoy’s theorem, which holds for piecewise linear homeomorphisms [20], it is topologically conjugate), which is abelian, and hence cannot have property (T). A direct application of the work of Minakawa on exotic circles of PL+ (S1 ) [31] (not to be confused with exotic spheres in the sense of differentiable topology) gives a more precise statement for Corollary 1.3 in the PL case. For this, we set some notations. A topological circle in PL+ (S1 ) is a one-parameter subgroup S = {gα ; α ∈ S1 } ⊂ PL+ (S1 ) which is topologically conjugate to the group of rotations SO(2). The topological circle is called exotic, if the conjugating map cannot be taken in PL+ (S1 ). For A > 1 one sets IA = [1/(A − 1), A/(A − 1)], which is an interval of length 1, and defines h : IA → [0, 1] x 7→ log(A−1)x log A which naturally extends to a homeomorphism hfA commuting with the translation by 1 and hence defines, by quotient, a homeomorphism hA of S1 . Set SA = h−1 A SO(2)hA . When A < 1, we set SA = ιSA ι−1 , where ι : S1 → S1 is the order-reversing involution defined by ι(x) = −x. These are exotic circles. For A = 1, SA will simply stay for SO(2). The circles SA are contained in PL+ (S1 ) 17 (these examples had previously appeared in [5, 20]) and Minakawa shows that every topological circle in PL+ (S1 ) is PL conjugate to one of the exotic circles SA (and vice versa). More precisely, he proves that the only irrational rotations for which 1) the number of breakpoints of iterates is bounded and 2) the set of jumps is finite, are contained in a topological circle (see also [27]). Relying on this, one can prove: Theorem 4.10. Let Γ be an infinite discrete subgroup of PL+ (S1 ). The following statements are equivalent: 1. the affine isometric action ρ : Γ → Isom(H) defined in Lemma 4.6 has bounded orbits; 2. the subgroup Γ is PL conjugate into a topological circle of rotations SA . Remark 4.11. Exotic circles were one of the main reasons for suspecting that PL+ (S1 ) might have contained subgroups with property (T) (cf. [4]). The statement in Theorem 4.10 clearly gives a negative answer, and at the same time explains the rôle of exotic circles in this problem. Acknowledgements M.T. thanks Christian Bonatti for the helpful discussion about germs of singular diffeomorphisms. N.M.B. thanks Peter Feller for useful clarifications about exotic spheres. The authors show their gratitude to Yves de Cornulier for sharing his work [13] and for the several remarks. Y.L. was supported by an SNSF Ambizione grant. M.T. was partially supported by PEPS – Jeunes Chercheur-e-s – 2017 (CNRS) and Projet “Jeunes Géométres” of F. Labourie (financed by the Louis D. Foundation). References [1] U. Bader, A. Furman, T. Gelander, and N. Monod, Property (T ) and rigidity for actions on Banach spaces, Acta Math. 198 (2007), 57–105. [2] A. Barnhill and I. Chatterji, Property (T) versus Property FW, Section 5 in Guido’s book of conjectures. Collected by Indira Chatterji, Enseign. Math. (2) 54 (2008), no. 1–2, 3–189. [3] B. Bekka, P. de la Harpe, and A. Valette, Kazhdan’s property (T), New Mathematical Monographs, vol. 11, Cambridge University Press, Cambridge, 2008. [4] C. Bonatti, Y. Lodha, and Triestino M., Hyperbolicity as an obstruction to smoothability for one-dimensional actions. arXiv:1706.05704. [5] M. Boshernitzan, Dense orbits of rationals, Proc. Amer. Math. Soc. 117 (1993), no. 4, 1201–1203. [6] A. Brown, D. Fisher, and S. Hurtado, Zimmer’s conjecture: Subexponential growth, measure rigidity, and strong property (T). arXiv:1608.04995. [7] , Zimmer’s conjecture for actions of SL(m, Z). arXiv:1710.02735. [8] M. Burger and N. Monod, Bounded cohomology of lattices in higher rank Lie groups, J. Eur. Math. Soc. (JEMS) 1 (1999), no. 2, 199–235. [9] S. Cantat, Progrès récents concernant le programme de Zimmer [d’après A. Brown, D. Fisher, et S. Hurtado]. Séminaire Bourbaki, 70ème année, 2017-2018, no. 1136. [10] S. Cantat and Y. de Cornulier, Commensurating actions of birational groups and groups of pseudoautomorphisms. arXiv:1704.02043. [11] Y. de Cornulier, Irreducible lattices, invariant means, and commensurating actions, Math. Z. 279 (2015), no. 1-2, 1–26. [12] , Group actions with commensurated subsets, wallings and cubings. arXiv:1302.5982. [13] , Commensurated actions for groups of piecewise continuous transformations (2018). Preprint. [14] F. Dahmani, K. Fujiwara, and V. Guirardel, Free groups of interval exchange transformations are rare, Groups Geom. Dyn. 7 (2013), no. 4, 883–910. [15] D. Damjanovic and Z. Zhang, C 1 actions on manifolds by lattices in Lie groups with sufficiently high rank. arXiv:1801.04009. 18 [16] D.S. Farley, A proper isometric action of Thompson group V on Hilbert space, IMRN 45 (2003), 2409–2414. [17] É. Ghys, Actions de réseaux sur le cercle, Invent. Math. 137 (1999), no. 1, 199–231. [18] É. Ghys and V. Sergiescu, Sur un groupe remarquable de difféomorphismes du cercle, Comment. Math. Helv. 62 (1987), no. 2, 185–239. [19] N. Guelman and I. Liousse, Distortion in groups of affine interval exchange transformations. arXiv:1705.00144. [20] M.R. Herman, Sur la conjugaison différentiable des difféomorphismes du cercle à des rotations, IHÉS Publ. Math. 49 (1979), 5–233. [21] K. Juschenko, V. Nekrashevych, and M. de la Salle, Extensions of amenable groups by recurrent groupoids, Invent. Math. 206 (2016), no. 3, 837–867. [22] A.S. Kechris, Classical descriptive set theory, Graduate Texts in Mathematics, vol. 156, Springer-Verlag, New York, 1995. [23] M. A. Kervaire and J. W. Milnor, Groups of homotopy spheres. I, Ann. of Math. (2) 77 (1963), 504–537. [24] M. A. Hill, M. J. Hopkins, and D. C. Ravenel, On the nonexistence of elements of Kervaire invariant one, Ann. of Math. (2) 184 (2016), no. 1, 1–262. [25] M.W. Hirsch, Differential topology, Springer-Verlag, New York-Heidelberg, 1976. Graduate Texts in Mathematics, No. 33. [26] B. Hughes, Local similarities and the Haagerup property, Groups Geom. Dyn. 3 (2009), no. 2, 299–315. With an appendix by Daniel S. Farley. [27] I. Liousse, PL Homeomorphisms of the circle which are piecewise C 1 conjugate to irrational rotations, Bull. Braz. Math. Soc. (N.S.) 35 (2004), 269–280. [28] , Nombre de rotation, mesures invariantes et ratio set des homéomorphismes affines par morceaux du cercle, Ann. Inst. Fourier (Grenoble) 55 (2005), 431–482. [29] Y. Lodha, A finitely presented infinite simple group of homeomorphisms of the circle. arXiv:1710.06220. [30] J. Milnor, On manifolds homeomorphic to the 7-sphere, Ann. of Math. (2) 64 (1956), 399–405. [31] H. Minakawa, Classification of exotic circles in P L(S 1 ), Hokkaido Math. J. 26 (1997), 685–697. [32] A. Navas, Actions de groupes de Kazhdan sur le cercle, Annales Sci. de l’École Normale Supérieure 35 (2002), 789–758. [33] [34] , Groups of circle diffeomorphisms, Chicago Lectures in Mathematics, University of Chicago Press, Chicago, IL, 2011. , Group actions on 1-manifolds: a list of very concrete open questions. arXiv:1712.06462. [35] V. Sergiescu, Versions combinatoires de Diff(S 1 ). Groupe de Thompson, Prépublication de l’Institut Fourier 630 (2003). [36] W.P. Thurston, A generalization of the Reeb stability theorem, Topology 13 (1974), 347–352. [37] , Three-dimensional geometry and topology. Vol. 1, Princeton Mathematical Series, vol. 35, Princeton University Press, Princeton, NJ, 1997. Edited by Silvio Levy. [38] G Wang and Z. Xu, The triviality of the 61-stem in the stable homotopy groups of spheres, Ann. of Math. (2) 186 (2017), no. 2, 501–580. [39] H. Whitney, Differentiable manifolds, Ann. of Math. (2) 37 (1936), no. 3, 645–680, DOI 10.2307/1968482. MR1503303 [40] D. Witte, Arithmetic groups of higher Q-rank cannot act on 1-manifolds, Proc. Amer. Math. Soc. 122 (1994), no. 2, 333–340. [41] S. Ye, Low-dimensional representations of matrix groups and group actions on CAT(0) spaces and manifolds, J. Algebra 409 (2014), 219–243. [42] , Euler characteristics and actions of automorphism groups of free groups, Algebr. Geom. Topol. to appear. [43] , Piecewise linear actions and Zimmer’s program. arXiv:1301.6366. [44] , Symmetries of flat manifolds, Jordan property and the general Zimmer program. arXiv:1704.03580. 19
4math.GR
arXiv:1511.06773v1 [cs.DS] 20 Nov 2015 Unifying and Strengthening Hardness for Dynamic Problems via the Online Matrix-Vector Multiplication Conjecture∗ Monika Henzinger† Sebastian Krinninger† University of Vienna, Austria Faculty of Computer Science University of Vienna, Austria Faculty of Computer Science Danupon Nanongkai‡ Thatchaphol Saranurak§ KTH Royal Institute of Technology KTH Royal Institute of Technology Abstract Consider the following Online Boolean Matrix-Vector Multiplication problem: We are given an n × n matrix M and will receive n column-vectors of size n, denoted by v1 , . . . , vn , one by one. After seeing each vector vi , we have to output the product M vi before we can see the next vector. A naive algorithm can solve this problem using O(n3 ) time in total, and its running time can be slightly improved to O(n3 / log2 n) [Williams SODA’07]. We show that a conjecture that there is no truly subcubic (O(n3− )) time algorithm for this problem can be used to exhibit the underlying polynomial time hardness shared by many dynamic problems. For a number of problems, such as subgraph connectivity, Pagh’s problem, d-failure connectivity, decremental single-source shortest paths, and decremental transitive closure, this conjecture implies tight hardness results. Thus, proving or disproving this conjecture will be very interesting as it will either imply several tight unconditional lower bounds or break through a common barrier that blocks progress with these problems. This conjecture might also be considered as strong evidence against any further improvement for these problems since refuting it will imply a major breakthrough for combinatorial Boolean matrix multiplication and other long-standing problems if the term “combinatorial algorithms” is interpreted as “non-Strassen-like algorithms” [Ballard et al. SPAA’11]. The conjecture also leads to hardness results for problems that were previously based on diverse problems and conjectures – such as 3SUM, combinatorial Boolean matrix multiplication, triangle detection, and multiphase – thus providing a uniform way to prove polynomial hardness results for dynamic algorithms; some of the new proofs are also simpler or even become trivial. The conjecture also leads to stronger and new, non-trivial, hardness results, e.g., for the fully dynamic densest subgraph and diameter problems. ∗ A preliminary version of this paper was presented at the 47th ACM Symposium on Theory of Computing (STOC 2015). † Work partially done while visiting the Simons Institute for the Theory of Computing. The research leading to these results has received funding from the European Research Council under the European Union’s Seventh Framework Programme (FP7/2007-2013) / ERC Grant Agreement number 340506. ‡ Work partially done while at University of Vienna, Austria. § Work partially done while at University of Vienna, Austria and Saarland University, Germany. 1 Contents 1 Introduction 1.1 OMv-Hardness for Dynamic Algorithms 1.2 Discussions . . . . . . . . . . . . . . . . 1.3 Notation . . . . . . . . . . . . . . . . . . 1.4 Organization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3 8 10 10 2 Intermediate Problems 10 2.1 OMv with Polynomial Preprocessing Time and Arbitrary Dimensions . . . . . 10 2.2 The Online Vector-Matrix-Vector Multiplication Problem (OuMv) . . . . . . 14 2.2.1 Interpreting OuMv as Graph Problems and a satisfiability problem . . 17 3 Hardness for Amortized Fully Dynamic and Worst-case Partially Dynamic Problems 3.1 Lower Bounds for Graph Problems with High Query Time . . . . . . . . . . . 3.2 Lower Bounds for Graph Problems with a Trade-off . . . . . . . . . . . . . . 3.3 Lower Bounds for Graph Problems with other Parameters . . . . . . . . . . . 3.4 Lower Bounds for Non-graph Problems . . . . . . . . . . . . . . . . . . . . . . 3.5 (2 − ) Approximate Diameter on Weighted Graphs . . . . . . . . . . . . . . . 3.6 Densest Subgraph Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 19 24 25 27 29 31 4 Hardness for Total Update Time of Partially Dynamic Problems 34 5 Further Discussions 38 5.1 Multiphase Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 5.1.1 Converting Worst-case Bounds to Amortized Bounds . . . . . . . . . . 38 5.2 Open Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 6 Acknowledgement 41 References 41 A Conjectures (from [AVW14]) 45 2 1 Introduction Consider the following problem called Online Boolean Matrix-Vector Multiplication (OMv): Initially, an algorithm is given an integer n and an n × n Boolean matrix M . Then, the following protocol repeats for n rounds: At the ith round, it is given an n-dimensional column vector, denoted by vi , and has to compute M vi . It has to output the resulting column vector before it can proceed to the next round. We want the algorithm to finish the computation as quickly as possible. This problem is a generalization of the classic Matrix-Vector Multiplication problem (Mv), which is the special case with only one vector. The main question is whether we can preprocess the matrix in order to make the multiplication with n sequentially given vectors faster than n matrix-vector multiplications. This study dates back to as far as 1955 (e.g., [Mot55]), but most major theoretical work has focused on structured matrices; see, e.g., [Pan01, Wil07] for more information. A naive algorithm can multiply the matrix with each vector in O(n2 ) time, and thus requires O(n3 ) time in total. It was long known that the matrix can be preprocessed in O(n2 ) time in order to compute M vi in O(n2 / log n) time, implying an O(n3 / log n) time algorithm for OMv; see, e.g., [Sav74, SU86] and a recent extension in [LZ09]. More recently, Williams [Wil07] showed that the matrix can be preprocessed in O(n2+ ) time in order to compute M vi in O(n2 / log2 n) time for any 0 <  < 1/2, implying an O(n3 / log2 n) time algorithm for OMv. This is the current best running time for OMv. In this light, it is natural to conjecture that this problem does not admit a so-called truly subcubic time algorithm: Conjecture 1.1 (OMv Conjecture). For any constant  > 0, there is no O(n3− )-time algorithm that solves OMv with an error probability of at most 1/3. In fact, it can be argued that this conjecture is implied by the standard combinatorial Boolean matrix multiplication (BMM) conjecture which states that there is no truly subcubic (O(n3− )) time combinatorial algorithm for multiplying two n × n Boolean matrices if the term “combinatorial algorithms” (which is not a well-defined term) is interpreted in a certain way – in particular if it is interpreted as “non-Strassen-like algorithms”, as defined in [BDH+ 12], which captures all known fast matrix multiplication algorithms; see Section 1.2 for further discussion. Thus, breaking Conjecture 1.1 is arguably at least as hard as making a breakthrough for Boolean matrix multiplication and other long-standing open problems (e.g., [DHZ00, VWW10, AVW14, RT13, HKN13]). This conjecture is also supported by an algebraic lower bound [Blä14]. 1.1 OMv-Hardness for Dynamic Algorithms We show that the OMv conjecture can very well capture the underlying polynomial time hardness shared by a large number of dynamic problems, leading to a unification, simplification, and strengthening of previous results. By dynamic algorithm we mean an algorithm that allows a change to the input. It usually allows three operations: (1) preprocessing, which is called when the input is first received, (2) update, which is called for every input update, and (3) query, which is used to request an answer to the problem. For example, in a typical dynamic graph problem, say s-t shortest path, we will start with an empty graph at the preprocessing step. Each update operation consists of an insertion or deletion of one edge. 3 The algorithm has to answer a query by returning the distance between s and t at that time. Corresponding to the three operations, we have preprocessing time, update time, and query time. There are two types of bounds on the update time: worst-case bounds, which bound the time that each individual update takes in the worst case, and amortized bounds which bound the time taken by all updates and then averaging it over all updates. The bounds on query time can be distinguished in the same way. We call a dynamic algorithm fully dynamic if any of its updates can be undone (e.g., an edge insertion can later be undone by an edge deletion); otherwise, we call it partially dynamic. We call a partially dynamic graph algorithm decremental if it allows only edge deletions, and incremental if it allows only edge insertions. For this type of algorithm, the update time is often analyzed in terms of total update time, which is the total time needed to handle all insertions or deletions. Previous hardness results for dynamic problems are often based on diverse conjectures, such as those for 3SUM, combinatorial Boolean matrix multiplication (BMM), triangle detection, all-pairs shortest paths, and multiphase (we provide their definitions in Appendix A for completeness). This sometimes made hardness proofs quite intricate since there are many conjectures to start from, which often yield different hardness results, and in some cases none of these results are tight. Our approach results in stronger bounds which are tight for some problems. Additionally, we show that a number of previous proofs can be unified as they can now start from only one problem, that is OMv, and can be done in a much simpler way (compare, e.g., the hardness proof for Pagh’s problem in this paper and in [AVW14]). Thus proving the hardness of a problem via OMv should be a simpler task. We next explain our main results and the differences to prior work: As shown in Figure 1, we obtain more than 15 new tight1 hardness results2 . (Details of these results are provided in Tables 4 and 8 for tight results and Tables 5 to 7 for improved results. We also provide a summary of the problem definitions in Tables 1 to 3.) (1) Generally speaking, for most previous hardness results in [Pat10, AVW14, KPP16] that rely on various conjectures, except those relying on the Strong Exponential Time Hypothesis (SETH), our OMv conjecture implies hardness bounds on the amortized time per operation that are the same or better. (2) We also obtain new results such as those for vertex color distance oracles (studied in [HLW+ 11, Che12] and used to tackle the minimum Steiner tree problem [LOP+ 15]), restricted top trees with edge query problem (used to tackle the minimum cut problem in [FKN+ 14]), and the dynamic densest subgraph problem [BHN+ 15]. (3) Some minor improvement can in fact immediately be obtained since our conjecture implies a very strong bound for Pǎtraşcu’s multiphase problem [Pat10], giving improved bounds for many problems considered in [Pat10]. We can, however, improve these bounds even more by avoiding a reduction via the multiphase problem. (We discuss this further in Section 1.2.) The conjecture leads 1 Our results are tight in one of the following ways: (1) the query time of the existing algorithms cannot be improved without significantly increasing the update time, (2) the update time of the existing algorithms cannot be improved without significantly increasing the query time, (3) the update and query time of the existing algorithms cannot be improved simultaneously, and (4) the approximation guarantee cannot be improved without significantly increasing both query and update time. 2 For the s-t reachability problem, our result does not subsume the result based on the Boolean matrix multiplication (BMM) conjecture because the latter result holds only for combinatorial algorithms, and it is in fact larger than an upper bound provided by the non-combinatorial algorithm of Sankowski [San04] (see Section 1.2 for a discussion). Also note that the result based on the triangle detection problem which is not subsumed by our result holds only for a more restricted notion of amortization (see Section 1.2). This explains the solid lines in Figure 1. 4 Fully dynamic problems Langerman's zero prefix sum Erickson's problem Pagh's problem Multiphase Multiphase BMM Reachability st ss Triangle 3SUM d-failure connectivity Subgraph Connectivity st Partially dynamic problems ss Shortest Path ap st Strong connectivity ss bipartite max. matching bipartite min. vertex cover Approx. vertex color distance oracle OMv Approx. Shortest Path ss Approx. Shortest Path (unweighted) ap st Transitive Closure ss Bipartite Max. Matching BMM 3SUM Shortest Path (unweighted) st ss Approximate Diameter Triangle Detection s-Triangle Detection Densest Subgraph Figure 1: Overview of our and previous hardness results. An arrow from a conjecture to a problem indicates that there is a hardness result based on the conjecture. A thick blue arrow indicates that the hardness result is tight, i.e., there is a matching upper bound. A dotted arrow means that the result is subsumed in our paper. (Footnote 2 discusses results that are not subsumed.) Note that all hardness results based on BMM hold only for combinatorial algorithms. 5 to an improvement for all problems whose hardness was previously based on 3SUM. (4) A few other improvements follow from converting previous hardness results that hold only for combinatorial algorithms into hardness results that hold for any algorithm. We note that removing the term “combinatorial” is an important task as there are algebraic algorithms that can break through some bounds for combinatorial algorithms. (We discuss this more in Section 1.2.) (5) Interestingly, all our hardness results hold even when we allow an arbitrary polynomial preprocessing time. This type of results was obtained earlier only in [AVW14] for hardness results based on SETH. (6) Since the OMv conjecture can replace all other conjectures except SETH, these two conjectures together are sufficient to show that all hardness results for dynamic problems known so far hold even for arbitrary polynomial preprocessing time. (7) We also note that all our results hold for a very general type of amortized running time; e.g., they hold even when there is a large (polynomial) number of updates and, for graph problems, even when we start with an empty graph. No previous hardness results, except those obtained via SETH, hold for this case. We believe that the universality and simplicity of the OMv conjecture will be important not only in proving tight hardness results for well-studied dynamic problems, but also in developing faster algorithms; for example, as mentioned earlier it can be used to show the limits of some specific approaches to attack the minimum Steiner tree and minimum cut problems [LOP+ 15, FKN+ 14]. Below is a sample of our results. A list of all of them and detailed proofs can be found in later sections. Subgraph Connectivity. In this problem, introduced by Frigioni and Italiano [FI00], we are given a graph G, and we have to maintain a subset S of nodes where the updates are adding and removing a node of G to and from S, which can be viewed as turning nodes on and off. The queries are to determine whether two nodes s and t are in the same connected component in the subgraph induced by S. The best upper bound in terms of m is an algorithm with Õ(m4/3 ) preprocessing time, Õ(m2/3 ) amortized update time and Õ(m1/3 ) worst-case query time [CPR11]. There is also an algorithm with Õ(m6/5 ) preprocessing time, Õ(m4/5 ) worst-case update time and Õ(m1/5 ) worst-case query time [Dua10]. An upper bound in terms of n is an algorithm with Õ(m) preprocessing time, Õ(n) worst-case update time, and O(1) worst-case query time3 . For hardness in terms of m, Abboud and Vassilevska Williams [AVW14] showed that the 3SUM conjecture can rule out algorithms with m4/3− preprocessing time, mα− amortized update time and m2/3−α− amortized query time, for any constants 1/6 ≤ α ≤ 1/3 and 0 <  < α. In this paper, we show that the OMv conjecture can rule out algorithms with polynomial preprocessing time, mα− amortized update time and m1−α− amortized query time4 , for any 0 ≤ α ≤ 1. This matches the upper bound of [CPR11] when we set α = 2/3. For hardness in terms of n, Pǎtraşcu [Pat10] showed that, assuming the hardness of his multiphase problem, there is no algorithm with nδ− worst-case update time and query time, for some constant 0 < δ ≤ 1. By assuming the combinatorial BMM conjecture, Abboud and 3 This update time is achieved by using O(n) updates for dynamic connectivity data structure under edge updates by [KKM13]. The query time needs only O(1) time because this data structure internally maintains a spanning forest, so we can label vertices in each component in the spanning forest in time O(n) after each update. 4 We note the following detail: The 3SUM-hardness result of Abboud and Vassilevska Williams holds when m ≤ n1.5 and our hardness result holds when m ≤ min{n1/α , n1/(1−α) } 6 Vassilevska Williams [AVW14] could rule out combinatorial algorithms with n1− amortized update time, and n2− query time. These two bounds cannot rule out some improvement over [KKM13], e.g., a non-combinatorial algorithm with n1− amortized update time, and O(1) amortized query time. In this paper, we show that the OMv conjecture can rule out any algorithm with polynomial preprocessing time, n1− amortized update time and n2− amortized query time. Thus, there is no algorithm that can improve the upper bound of [KKM13] without significantly increasing the query time. Decremental Shortest Paths. In the decremental single-source shortest paths problem, we are given an unweighted undirected graph G and a source node s. Performing an update means to delete an edge from the graph. A query will ask for the distance from s to some node v. The best exact algorithm for this problem is due to the classic result of Even and Shiloach [ES81] and requires O(m) preprocessing time, O(mn) total update time, and O(1) query time. Very recently, Henzinger, Krinninger, and Nanongkai [HKN14a] showed a (1+)-approximation algorithm with O(m1+o(1) ) preprocessing time, O(m1+o(1) ) total update time, and O(1) query time. Roditty and Zwick [RZ11] showed that the combinatorial BMM conjecture implies that there is no combinatorial exact algorithm with mn1− preprocessing time and mn1− total update time if we need Õ(1) query time. This leaves the open problem whether we can develop a faster exact algorithm for this problem using algebraic techniques (e.g., by adapting Sankowski’s techniques [San04, San05a, San05b]). Our OMv conjecture implies that this is not possible: there is no exact algorithm with polynomial preprocessing and mn1− total update time if we need Õ(1) query time. For the decremental all-pairs shortest paths problem on undirected graphs, (1 + )approximation algorithms with Õ(mn) total update time are also known in both unweighted and weighted cases [RZ12, Ber13]. For combinatorial algorithms, this is tight even in the static setting under the combinatorial BMM conjecture [DHZ00]. Since fast matrix multiplication can be used to break this bound in the static setting when the graph is dense, the question whether we can do the same in the dynamic setting was raised by Bernstein [Ber13]. In this paper, we show that this is impossible under the OMv conjecture. (Our hardness result holds for any algorithm with approximation ratio less than two.) Pagh’s Problem. In this problem, we want to maintain a family X of at most k sets {Xi }1≤i≤k over [n]. An update is by adding the set Xi ∩ Xj to X. We have to answer a query of the form “Does element j belong to set Xi ?”. A trivial solution to this problem requires O(kn) preprocessing time, O(n) worst-case update time and O(1) worst-case query time. Previously, Abboud and Williams [AVW14] showed that, assuming the combinatorial BMM conjecture, for any n ≤ k ≤ n2 there is no combinatorial algorithm with k 3/2− preprocessing time, k 1/2− amortized update time, and k 1/2− amortized query time. They also obtained hardness for non-combinatorial algorithms but the bounds are weaker. Our OMv conjecture implies that for any k = poly(n) there is no algorithm with poly(k, n) preprocessing time, n1− update time, and k 1− query time, matching the trivial upper bound. Note that our hardness holds against all algorithms, including non-combinatorial algorithms. Also note that while the previous proof in [AVW14] is rather complicated (it needs, e.g., a universal hash function), our proof is almost trivial. 7 Fully Dynamic Weighted Diameter Approximation. In this problem, we are give a weighted undirected graph. An update operation adds or deletes a weighted edge. The query asks for the diameter of the graph. For the unweighted case, Abboud and Vassilevska Williams [AVW14] showed that the Strong Exponential Time Hypothesis (SETH) rules out any (4/3 − )-approximation algorithm with polynomial preprocessing time, n2− update and query time. Nothing was known for the weighted setting. In this paper, we show that for the weighted case, OMv rules out any (2 − )-approximation algorithm with polynomial preprocessing time, n1/2− update time and n1− query time. This result is among a few that require a rather non-trivial proof. 1.2 Discussions OMv vs. Combinatorial BMM. The combinatorial BMM conjecture states that there is no truly subcubic combinatorial algorithm for multiplying two n × n Boolean matrices. There are two important points to discuss here. First, it can be easily observed that any reduction from the OMv problem can be turned into a reduction from the combinatorial BMM problem since, although we get two matrices at once in the BMM problem, we can always pretend that we see one column of the second matrix at a time (this is the OMv problem). This means that bounds obtained via the OMv conjecture will never be stronger than bounds obtained via the combinatorial BMM conjecture. However, the latter bounds will hold only for combinatorial algorithms, leaving the possibility of an improvement via an algebraic algorithm. This possibility cannot be overlooked since there are examples where an algebraic algorithm can break through the combinatorial hardness obtained by assuming the combinatorial BMM conjecture. For example, it was shown in [AVW14] that the combinatorial BMM conjecture implies that there is no combinatorial algorithm with n3− preprocessing time, n2− update time, and n2− query time for the fully dynamic s-t reachability and bipartite perfect matching problems. However, we can break these bounds using Sankowski’s algebraic algorithm [San04, San07] which requires nω preprocessing time, n1.449 worst-case update time, and O(1) worst case query time, where ω is the exponent of the best known matrix multiplication algorithm (currently, ω < 2.3728639 [Gal14]).5 Second, it can be argued that the combinatorial BMM conjecture actually implies the OMv conjecture, if the term “combinatorial algorithm” is interpreted in a certain way. Note that while this term has been used very often (e.g., [DHZ00, VWW10, AVW14, RT13, HKN13]), it is not a well-defined term. Usually it is vaguely used to refer as an algorithm that is different from the “algebraic” approach originated by Strassen [Str69]; see, e.g., [BVW08, BW12, BKM95]. One formal way to interpret this term is by using the term “Strassen-like algorithm”, as defined by Ballard et al. [BDH+ 12]. Roughly speaking, a Strassen-like algorithm divides both matrices into constant-size blocks and utilizes an algorithm for multiplying two blocks in order to recursively multiply matrices of arbitrary size (see [BDH+ 12, Section 5.1] for a detailed definition6 ). As pointed out in [BDH+ 12], this is the structure of all the fast 5 Furthermore, the exponent 1.449 is the result of balancing the terms n1+ and nω(1,,1)− , where ω(1, , 1) is the exponent of the best known algorithm [Gal12] for multiplying an n × n matrix with an n × n matrix. The value 1.449 is obtained by a linear interpolation of the values of ω(1, , 1) reported in [Gal12], which upperbounds ω(1, , 1). 6 Note that Ballard et al. also need to include a technical assumption in the Strassen-like algorithms that they consider to prove their results (see [BDH+ 12, Section 5.1.1]). This assumption is irrelevant to us. 8 matrix multiplication algorithms that were obtained since Strassen’s, including the recent breakthroughs by Stothers [Sto10] and Vassilevska Williams [VW12]. Since OMv reveals one column of the second matrix at a time, it naturally disallows an algorithm to utilize block multiplications, and thus Strassen-like algorithms cannot be used to solve OMv. We note that the OMv problem actually excludes even some combinatorial BMM algorithms; e.g., the O(n3 (log log n)2 / log2.25 n)-time algorithm of Bansal and Williams [BW12] cannot be used to solve OMv. Finally, even if one wants to interpret the term “combinatorial algorithm” differently and argue that the combinatorial BMM conjecture does not imply the OMv conjecture, we believe that breaking the OMv conjecture will still be a breakthrough since it will yield a fast matrix multiplication algorithm that is substantially different from those using Strassen’s approach. OMv vs. Multiphase. Pǎtraşcu [Pat10] introduced a dynamic version of set disjointness called multiphase problem, which can be rephrased as a variation of the Matrix-Vector multiplication problem as follows (see [Pat10] for the original definition). Let k, n, and τ be some parameters. First, we are given a k × n Boolean matrix M and have O(nk · τ ) time to preprocess M . Second, we are given an n-dimensional vector v and have O(n · τ ) additional computation time. Finally, we are given an integer 1 ≤ i ≤ n and must output (M v)[i] in O(τ ) time. Pǎtraşcu conjectured that if there are constants γ > 0 and δ > 0 such that k = nγ , then any solution to the multiphase problem in the Word RAM model requires τ = nδ , and used this conjecture to prove polynomial time hardness for several dynamic problems. How strong these hardness bounds are depends on how hard one believes the multiphase problem to be. By a trivial reduction, the OMv conjecture implies that the multiphase conjecture holds with δ = 1 when γ = 1. (We found it quite surprising that viewing the multiphase problem as a matrix problem, instead of a set problem as originally stated, can give an intuitive explanation for a possible value of δ.) This implies the strongest bound possible for the multiphase problem. Moreover, while hardness based on the multiphase problem can only hold for a worst-case time bound, it can be shown that under a general condition we can make them hold for an amortized time bound too if we instead assume the OMv conjecture (see Section 5.1 for details). Thus, with the OMv conjecture it seems that we do not need the multiphase conjecture anymore. Note that, as argued before, we can also conclude that the combinatorial BMM conjecture implies the multiphase conjecture. To the best of our knowledge this is the first connection between these conjectures. OMv vs. 3SUM and SETH. As mentioned earlier, all previous hardness results that were based on the 3SUM conjecture can be strengthened through the OMv conjecture. However, we do not have a general mechanism that can always convert any hardness proof based on 3SUM into a proof based on OMv. Finding such a mechanism would be interesting. Techniques for proving hardness for dynamic algorithms based on SETH were very recently introduced in [AVW14]. Results from these techniques are the only ones that cannot be obtained through OMv. SETH together with OMv seems to be enough to prove all the hardness results known to date. It would be very interesting if the number of conjectures one has to start with can be reduced to one. 9 Remark On the Notion of Amortization. We emphasize that there are two different ways to define the notion of amortized update time. First, we can define it as an amortized update time when we start from an empty graph; equivalently, the update time has to be amortized over all edges that ever appear. The second way is to allow the algorithm to preprocess an arbitrary input graph and amortize the update time over all updates (not counting the edges in the initial graph as updates); for example, one can start from a graph with n2 edges and have only n updates. The first definition is more common in the analysis of dynamic algorithms but it is harder to prove hardness results for it. Our hardness results hold for this type of amortization; in fact, they hold even when there is a large (polynomial) number of updates. Many previous hardness results hold only for the second type of amortization, e.g., the results in [AVW14] that are not based on SETH and 3SUM. 1.3 Notation All matrices and vectors in this paper are Boolean and Õ(·) hides logarithmic factors in O(·). We will also use the following non-standard notation. Definition 1.2 (õ˜ Notation). For any parameters n1 , n2 , n3 , we say that a function f (n1 , n2 , n3 ) = õ˜(nc11 nc22 nc33 ) iff there exists some constant  > 0 such that f = O(nc11 − nc22 nc33 + nc11 nc22 − nc33 + nc11 nc22 nc33 − ). We use the analogous definition for functions with one or two parameters. 1.4 Organization Instead of starting from OMv, our reductions will start from an intermediate problem called OuMv. We describe this and prove necessary results in Section 2. In Section 3 we prove hardness results for the amortized update time of fully dynamic algorithms and the worstcase update time of partially dynamic algorithms. In Section 4 we prove hardness results for the total update time of partially dynamic problems. In Section 5 we provide further discussions. 2 Intermediate Problems In this section we show that the OMv conjecture implies that OMv is hard even when there is a polynomial preprocessing time and different dimension parameters (Section 2.1). Then in Section 2.2, we present the problem whose hardness can be proved assuming the OMv conjecture, namely the online vector-matrix-vector multiplication (OuMv) problem, which is the key starting points for our reductions in later sections. 2.1 OMv with Polynomial Preprocessing Time and Arbitrary Dimensions We first define a more general version of the OMv problem: (1) we allow the algorithm to preprocess the matrix before the vectors arrive and (2) we allow the matrix to have arbitrary dimensions with a promise that the size of minimum dimension is not too “small” compared to the size of maximum dimension. Definition 2.1 (γ-OMv). Let γ > 0 be a fixed constant. An algorithm for the γ-OMv problem is given parameters n1 , n2 , n3 as input with a promise that n1 = bnγ2 c. Next, it is given a 10 Name and short name Subgraph Connectivity Update Input stSubConn Query A fixed undirected graph G, and a subset S of its vertices Insert/remove a node into/from S A directed graph Edge insertions/deletions An undirected unweighted graph Edge insertions/deletions An undirected graph Edge insertions/deletions ssSubConn apSubConn Reachability Shortest Path (undirected) st-Reach ss-Reach ap-Reach (Transitive Closure or TC) st-SP ss-SP ap-SP Triangle Detection s-Triangle Detection Are s and t connected in G[S] the subgraph induced by S? For any v, are s and v connected in G[S] the subgraph induced by S? For any u, v, are u and v connected in G[S] the subgraph induced by S? Is t reachable from s? For any v, is v reachable from s? For any u, v, is v reachable from u? Find the distance d(s, t). Find the distance d(s, v), for any v. Find the distance d(u, v), for any u, v. Is there a triangle in the graph? Is there a triangle containing s in the graph? Table 1: Definitions of dynamic graph problems (1) Name Input Update Query Densest Subgraph An undirected graph Edge insertions/deletions What is the density |E(S)|/|S| of the densest subgraph S? A fixed undirected graph Roll back to original graph. Then remove any d vertices from the graph. A fixed undirected graph Change the color of any vertex An undirected graph Edge insertions/deletions Given s and color c, find the shortest distance from s to any c-colored vertex. Find the diameter of the graph. A directed graph Edge insertions/deletions Is the graph strongly connected? d-failure connectivity [DP10] Vertex color distance oracle [Che12, LOP+ 15] Diameter Strong Connectivity Is s connected to t, for any given (s, t)? Table 2: Definitions of dynamic graph problems (2) 11 Name Input Update Query Pagh’s Problem A family X of sets X1 , X2 , . . . , Xk ⊆ [n] Given i, j, insert Xi ∩ Xj into X Given index i and j ∈ [n], is j ∈ Xi ? An array A[1 . . . n] of integers Set A[i] = x for any i and x Is there a k s.t. A matrix of integers of size n×n Increment all values in a specified row or column Find the maximum value in the matrix Langerman’s Zero Prefix Sum Erickson’s Problem Pk i=1 A[i] = 0? Table 3: Definitions of dynamic non-graph problems matrix M of size n1 × n2 that can be preprocessed. Let p(n1 , n2 ) denote the preprocessing time. After the preprocessing, an online sequence of vectors v 1 , . . . , v n3 is presented one after the other and the task is to compute each M v t before v t+1 arrives. Let c(n1 , n2 , n3 ) denote the computation time over the whole sequence. Note that the γ-OMv problem can be trivially solved with O(n1 n2 n3 ) total computing time and without preprocessing time. Obviously, the OMv conjecture implies that this running time is (almost) tight when n1 = n2 = n3 = n. Interestingly, it also implies that this running time is tight for other values of n1 , n2 , and n3 : Theorem 2.2. For any constant γ > 0, Conjecture 1.1 implies that there is no algorithm for γ-OMv with parameters n1 , n2 , n3 using preprocessing time p(n1 , n2 ) = poly(n1 , n2 ) and computation time c(n1 , n2 , n3 ) = õ˜(n1 n2 n3 ) that has an error probability of at most 1/3. The rest of this section is devoted to proving the above theorem. The proof proceeds in two steps. First, we show that, assuming Conjecture 1.1, there is no algorithm for γ-OMv when the preprocessing time is (n1 n2 )1+ for any constant  < 1/2 and the computation time is õ˜(n1 n2 n3 ). Lemma 2.3. For any constant γ > 0 and integer n, fix any n1 , n2 where n1 = nγ2 , max{n1 , n2 } = n and n3 = n.7 Suppose there is an algorithm A for γ-OMv with parameters n1 , n2 , n3 using preprocessing time p(n1 , n2 ) and computation time c(n1 , n2 , n3 ) that has an error probability of at most δ. Then there is an algorithm B for OMv with parameter n using 2 2 3 (no preprocessing time and) computation time Õ( nn1 n2 p(n1 , n2 ) + nn1 n2 c(n1 , n2 , n) + nn2 ) that has an error probability of at most δ. Proof. We will construct B by using A as a subroutine. We partition M into blocks {Mx,y }1≤x≤n/n1 ,1≤y≤n/n2 where Mx,y is of size n1 × n2 .8 We feed Mx,y to an instance Ix,y 2 of A and preprocess using nn1 n2 p(n1 , n2 ) time. For each vector v t , we partition it into blocks {vyt }1≤y≤n/n2 each of size n2 . For each x, y, we compute Mx,y vyt using the instance Ix,y for 2 all t ≤ n. The total time for computing Mx,y vyt , for all x, y, t, is nn1 n2 c(n1 , n2 , n). We keep the error probability to remain at most δ by a standard application of the Chernoff bound: Actually, we need n1 = bnγ2 c but from now we will always omit it and assume that nγ2 is an integer. This affects the running time of the statement by at most a constant factor. 8 Here we assume that n1 and n2 divides n and we will similarly assume this whenever we divide a matrix into a blocks. This assumption can be removed easily: for each “boundary” blocks Mx,y where x = dn/n1 e or y = dn/n2 e, we keep the size Mx,y to be n1 × n2 but it may overlap with other block. This will affect the running time by at most a constant factor. 7 12 repeat the above procedure for computing Mx,y vyt , for each x, y, t, O(log(n1 n2 n3 )) many times and take the most frequent answer. W Let ct = M v t . We write ct as blocks {ctx }1≤x≤n/n1 each of size n1 . Since ctx = y Mx,y vyt (bit-wise OR) for each x, t, we can compute ctx in time nn2 n1 for each x, t (there are nn2 many y’s and Mx,y vyt is a vector of size n1 ). The total time for this, over all x, t, is n n n3 n1 n × n2 n1 = n2 . Corollary 2.4. For any constants γ > 0 and  < 1/2, Conjecture 1.1 implies that there is no algorithm for γ-OMv with parameters n1 , n2 , n3 using preprocessing time p(n1 , n2 ) ≤ (n1 n2 )1+ and computation time c(n1 , n2 , n3 ) = õ˜(n1 n2 n3 ) that has an error probability of at most 1/3. Proof. Suppose there is such an algorithm. Then by Lemma 2.3, we can solve OMv with 2 2 3 parameter n in time Õ( nn1 n2 p(n1 , n2 ) + nn1 n2 c(n1 , n2 , n) + nn2 ) with error probability at 2 most 1/3 where n1 = nγ2 and max{n1 , n2 } = n. We have nn1 n2 p(n1 , n2 ) ≤ n2 (n1 n2 ) ≤ 2 3 n2+2 = õ˜(n3 ), and nn1 n2 c(n1 , n2 , n) + nn2 = õ˜(n3 ) where the last equality holds because n1 , n2 ≥ min{nγ , n1/γ }. The total time is õ˜(n3 ) and the error probability is at most 1/3 contradicting Conjecture 1.1. For the second step, we show that the hardness of γ-OMv even when the preprocessing time is p(n1 , n2 ) = poly(n1 , n2 ). Lemma 2.5. For any constant γ > 0 and integers n1 , n2 , n3 where n1 = nγ2 , fix any k1 , k2 where k1 ≤ n1 , k2 ≤ n2 , and k1 = k2γ . Suppose there is an algorithm A for γ-OMv with parameters k1 , k2 , n3 , preprocessing time p(k1 , k2 ) and computation time c(k1 , k2 , n3 ) that has an error probability of at most δ. Then there is an algorithm B for γ-OMv with parameters n1 , n2 , n3 , preprocessing time Õ( nk11 kn22 p(k1 , k2 )) and computation time Õ( nk11 nk22 c(k1 , k2 , n3 ) + n1 n2 n3 k2 ) that has an error probability of at most δ. Proof. We will construct B by using A as a subroutine. We partition M into blocks {Mx,y }1≤x≤n1 /k1 ,1≤y≤n2 /k2 where Mx,y is of size k1 × k2 . We feed Mx,y to an instance Ix,y of A and then preprocess. This takes nk11 nk22 p(k1 , k2 ) total preprocessing time. Once the vector v t arrives, we partition it into blocks {vyt }1≤y≤n2 /k2 each of size k2 . For each x, y, we compute Mx,y vyt using the instance Ix,y . The total computation time, over all t, for doing this will be nk11 nk22 c(k1 , k2 , n3 ). By repeating the procedure for a logarithmic number of times as in Lemma 2.3, the error probability remains at most δ. W Let ct = M v t . We write ct as blocks {ctx }1≤x≤n1 /k1 each of size k1 . Since ctx = y Mx,y vyt for each x, t, we can compute ctx in time nk22 k1 for each x, t. The total time for this, over all x, t, is nk11 n3 × nk22 k1 = n1 nk22 n3 . We conclude the proof of Theorem 2.2. Proof of Theorem 2.2. We construct an algorithm B for γ-OMv with parameters n1 , n2 , n3 that contradicts Conjecture 1.1 by using an algorithm A from the statement of Theorem 2.2 as a subroutine. That is, A is an algorithm for γ-OMv with parameters k1 , k2 , k3 , preprocessing time (k1 k2 )c for some constant c, and computation time õ˜(k1 k2 k3 ) with error probability 13 /c /c 1/3. Let  < min{1/2, c} be a constant. We choose k1 , k2 such that k1 = n1 , k2 = n2 and k3 = n3 . Note that k1 ≤ n1 , k2 ≤ n2 and k1 = k2γ . So we can apply Lemma 2.5 and get B which has error probability 1/3 and, ignoring polylogarithmic factors, uses preprocessing time nk11 nk22 p(k1 , k2 ) ≤ n1 n2 · p(k1 , k2 ) ≤ (n1 n2 )1+ and computation time nk11 nk22 c(k1 , k2 , n3 ) + n1 n2 n3 n1 n2 ˜ /c /c n1 n2 n3 = /c = õ˜(n1 n2 n3 ). This contradicts Conjecture 1.1 by /c õ(n1 n2 n3 ) + /c k2 n1 n2 Corollary 2.4. 2.2 n2 The Online Vector-Matrix-Vector Multiplication Problem (OuMv) Although we base our results on the hardness of OMv, the starting point of most of our reductions is a slightly different problem called online vector-matrix-vector multiplication problem. In this problem, we multiply the matrix with two vectors, one from the left and one from the right. Definition 2.6 (γ-OuMv problem). Let γ > 0 be a fixed constant. An algorithm for the γ-OuMv problem is given parameters n1 , n2 , n3 as its input with the promise that n1 = bnγ2 c. Next, it is given a matrix M of size n1 × n2 that can be preprocessed. Let p(n1 , n2 ) denote the preprocessing time. After the preprocessing, an online sequence of vector pairs (u1 , v 1 ), . . . , (un3 , v n3 ) is presented one after the other and the task is to compute each (ut )> M v t before (ut+1 , v t+1 ) arrives. Let c(n1 , n2 , n3 ) denote the computation time over the whole sequence. The γ-uMv problem with parameters n1 , n2 is the special case of γ-OuMv where n3 = 1. We also write OuMv and uMv to refer to, respectively, γ-OuMv and γ-uMv without the promise. Our reductions will exploit the fact that the result of this multiplication is either 0 or 1; thus using only 1 bit as opposed to n bits in OMv. Starting from OuMv instead of OMv will thus give simpler reductions and better lower bounds on the query time. Using a technique for finding “witnesses”, which will be defined below, when the result of a vector-matrix-vector multiplication is 1, we can reduce the γ-OMv problem to the γ-OuMv problem and establish the following hardness for γ-OuMv. Theorem 2.7. For any constant γ > 0, Conjecture 1.1 implies that there is no algorithm for γ-OuMv with parameters n1 , n2 , n3 using preprocessing time p(n1 , n2 ) = poly(n1 , n2 ) and computation time c(n1 , n2 , n3 ) = õ˜(n1 n2 n3 ) that has an error probability of at most 1/3. An γ-uMv algorithm with preprocessing time p(n1 , n2 ) and computation time c(n1 , n2 ) implies an γ-OuMv algorithm with preprocessing time Õ(p(n1 , n2 )), computation time Õ(n3 c(n1 , n2 )) and the same error probability by a standard application of the Chernoff bound as in the proof of Lemma 2.3. Therefore, we also get the following: Corollary 2.8. For any constant γ > 0, Conjecture 1.1 implies that there is no algorithm for γ-uMv with parameters n1 , n2 using preprocessing time p(n1 , n2 ) = poly(n1 , n2 ) and computation time c(n1 , n2 ) = õ˜(n1 n2 ) that has an error probability of at most 1/3. The rest of this section is devoted to the proof of Theorem 2.7. 14 Definition 2.9 (Witness of OuMv). We say that any index i is a witness for a pair of vectors (ut , v t ) in an instance I of OuMv if uti ∧ (M v t )i = 1, i.e., the i-th entries of vectors ut and M v t are both one. Observe that (ut )> M v t = 1 if and only if there is a witness for (ut , v t ). The problem of listing all the witnesses of γ-OuMv is defined similarly as γ-OuMv except that for each vector pair (ut , v t ), we have to list all witnesses of (ut , v t ) (i.e., output every index i such that i is a witness) before (ut+1 , v t+1 ) arrives. We first show a reduction from the problem of listing all the witnesses of γ-OuMv to the γ-OuMv problem itself. The reduction is similar to [VWW10, Lemma 3.2]. Lemma 2.10. Fix any constant γ > 0 and integers n1 , n2 and n3 . Suppose there is an algorithm A for γ-OuMv with parameters n1 , n2 , n3 preprocessing time p(n1 , n2 ) and computation time c(n1 , n2 , n3 ) that has an error probability of at most δ. Then there is an algorithm B for listing all witnesses of γ-OuMv with the same parameters using preprocessing P time Õ(p(n1 , n2 )) and computation time Õ((1 + t Õ(wt )/n3 ) · c(n1 , n2 , n3 )) that has an error probability of at most δ, where wt is the number of witnesses of (ut , v t ). Proof. We will show a reduction for deterministic algorithms. This reduction can be extended to work for randomized algorithms as well by a standard application of the Chernoff bound as in the proof of Lemma 2.3. We construct B using A as a subroutine. Let M be the input matrix of B. We use A to preprocess M . For any vector pair (u, v), we say the “query (u, v)” to A returns true if, by using A, we get u> M v = 1. For any a set of indices I of entries of u, let uI be the n1 -dimensional vector where (uI )i = (u)i for all i ∈ I and (uI )i = 0 otherwise. Suppose that I contains w many witnesses of (u, v). We now describe a method to identify all witnesses of (u, v) in I using 1 + O(w log n1 ) queries. Note that the witnesses of (u, v) contained in I are exactly the witnesses of (uI , v). We check if w = 0 by querying (uI , v) one time. If w > 0, then we identify an arbitrary witness of (uI , v) one by one using binary search. More precisely, if I is of size one, then return the only index i ∈ I which must be a witness. Otherwise, let I0 ⊂ I be a set of size b|I|/2c. If the query (uI0 , v) return true, then recurse on I0 . Otherwise, recurse on I \ I0 . This takes O(log n1 ) queries because |I| ≤ n1 . Once we find a witness i ∈ I, we do the same procedure on I \ {i} until we find all w witnesses. Therefore, the total number of queries for finding w many witnesses of (u, v) in I is 1 + O(w log n1 ). Once (ut , v t ) arrives, we list all witnesses of (ut , v t ) using 1 + O(wt log n1 ) queries by the P above procedure where I = [n1 ]. The total number of queries is n3 + t Õ(wt ). However, A is an algorithm for γ-OuMv with parameters n1 , n2 , n3 . So once there are n3 queries to A, we need P to roll back A to the state right after preprocessing. Hence, we need to n3 + Õ(wt ) P t roll back = 1 + t Õ(wt )/n3 times. Therefore, the total computation time is n3 P (1 + t Õ(wt )/n3 )c(n1 , n2 , n3 ). Next, using Lemma 2.10, we can show the reduction from γ-OMv to γ-OuMv. Lemma 2.11. For any constant γ > 0 and integers n1 , n2 , n3 where n1 = nγ2 , fix k1 , k2 and k3 such that k1 k2 = n2 , k1 = k2γ and k3 = n3 . Suppose there is an algorithm A for γ-OuMv with parameters k1 , k2 , k3 and preprocessing time p(k1 , k2 ) and computation time c(k1 , k2 , k3 ) that has an error probability of at most δ. Then there is an algorithm B for 15 γ-OMv with parameters n1 , n2 , n3 using preprocessing time Õ(n1 · p(k1 , k2 )) and computation time Õ(n1 · c(k1 , k2 , n3 )) that has an error probability of at most δ. Proof. Again, we show a reduction for deterministic algorithms. This can be extended to work for randomized algorithms by a standard application of the Chernoff bound as in the proof of Lemma 2.3. By plugging A into Lemma 2.10, we have an algorithm A0 for listing all witnesses of γ-OuMv with parameters k1 , k2 , k3 . We will formulate B using A0 as a subroutine. Let M be an input matrix M of B of size n1 × n2 , we partition M into blocks {Mx,y }1≤x≤n1 /k1 ,1≤y≤n2 /k2 each of size k1 × k2 . For each x and y, let Ix,y be an instance of A0 and we feed Mx,y into Ix,y to preprocess. The total preprocessing time is n1 n2 k1 k2 · p(k1 , k2 ) = n1 · p(k1 , k2 ). In the γ-OMv problem, for any t ≤ n3 , once v t arrives, we need to compute bt = M v t before v t+1 arrives. To do so, we first partition v t into blocks {vyt }1≤y≤n2 /k2 each of size k2 . W W We write bt = {btx }1≤x≤n1 /k1 as blocks each of size k1 . Note that btx = y Mx,y vyt ( means bit-wise OR). To compute btx , the procedure iterates over all values for y from 1 to n2 /k2 . When y = 1, we set utx,1 to be the all-ones vector. Let Wx,y,t be the set of witnesses (utx , vyt ). We feed (utx,y , vyt ) to the instance Ix,y for listing the witnesses Wx,y,t . For all i ∈ Wx,y,t , we now know that (btx )i = 1. To find other indices i such that (btx )i = 1, we set utx,y+1 to be same as utx,y except that (utx,y+1 )i = 0 for all found witnesses i ∈ Wx,y,t . Then we proceed with y ← y + 1. We repeat this until y = n2 /k2 . Then btx is completely computed. Once this procedure is done for all x, bt is completely computed. We repeat until t = n3 , and we are done. P Now, we denote wx,y = t |Wx,y,t |. By Lemma 2.10 the computation time of the instance Ix,y is n3 +Õ(wxy ) c(k1 , k2 , n3 ). n3 Summing over all x, y, we have a total running time of X n n 1≤x≤ k 1 ,1≤y≤ k 2 1 n3 + Õ(wxy ) c(k1 , k2 , n3 ) . n3 2 To conclude that the computation time is Õ(n1 · c(k1 , k2 , n3 )), it is enough to show that P x,y wx,y ≤ n1 n3 . Note that for a fixed t, the witness sets Wx,y,t are disjoint for different x and y as we set the entries in the ‘u’-vectors to 0 for witnesses that we already found. S Furthermore for every i ∈ y Wx,y,t , we have (btx )i = 1. As the number of 1-entries of bt is at P P P most n1 , we have x,y |Wx,y,t | ≤ n1 . So x,y,t |Wx,y,t | ≤ n1 n3 . Hence x,y wx,y ≤ n1 n3 . Now we are ready to prove the main theorem. Proof of Theorem 2.7. We will construct an algorithm B for γ-OMv with parameters n1 , n2 , n3 that contradicts Conjecture 1.1 by using an algorithm A for γ-OuMv from the statement of Theorem 2.7 as a subroutine. That is, A is an algorithm for γ-OuMv with parameters k1 , k2 , k3 using preprocessing time p(k1 , k2 ) = poly(k1 , k1 ) and computation time c(k1 , k2 , k3 ) = õ˜(k1 k2 k3 ) that has an error probability of at most 1/3. We choose k1 , k2 such that k1 k2 = n2 , k1 = k2γ and k3 = n3 . By Lemma 2.11, ignoring polylogarithmic factors, B has error probability 1/3 and uses preprocessing time poly(n1 , n2 ) and computation time n1 · c(k1 , k2 , n3 ) = n1 õ˜(k1 k2 n3 ) = õ˜(n1 n2 n3 ) which contradicts Conjecture 1.1 by Theorem 2.2. 16 2.2.1 Interpreting OuMv as Graph Problems and a satisfiability problem In this section, we show that OuMv can be viewed as graph problems and satisfiability problem, namely edge query, independent set query and 2-CNF query, as stated in Theorem 2.12. This section is independent from the rest and will not be used later. The edge query problem, however, can be helpful when one wants to show a reduction from OuMv to graph problems. For example, it is implicit in the reduction from OuMv to the subgraph connectivity problem. Moreover, the independent set query problem was shown to have an O(n2 n0 / log2 n) time algorithm by Williams [Wil07] using his OMv algorithm. The 2-CNF query problem was shown to be equivalent to the independent set query problem in [BW12]. So it is interesting that these problem are equivalent to OuMv and thus cannot be solved much faster (i.e., in õ˜(n2 n0 ) time) assuming the OMv conjecture. Theorem 2.12. For any integers n and n0 , consider the following problems. • OuMv with parameters n1 , n2 = Θ(n) and n3 = n0 , preprocessing time p(n1 , n2 ) and computation time c(n1 , n2 , n3 ). • Independent set (respectively vertex cover) query [BW12]: preprocess a graph G = (V, E), 0 when |V | = n, in time pind (n). Then given a sequence of sets S 1 , . . . , S n ⊆ V , decide if S t is an independent set (respectively a vertex cover) before S t+1 arrives in total time cind (n, n0 ). • 2-CNF query [BW12]: preprocess a 2-CNF F on n variables in time pcnf (n). Then 0 given a sequence of assignments X 1 , . . . , X n , decide if F (X t ) = 1 before X t+1 arrives in total time ccnf (n, n0 ). • Edge query: preprocess a graph G = (V, E), when |V | = n, in time pedge (n). Then 0 0 given a sequence of set pairs (S 1 , T 1 ), . . . , (S n , T n ), decide if there is an edge (a, b) ∈ E(S t , T t ), before S t+1 arrives in total time cedge (n, n0 ). We have that p(n1 , n2 ) = Θ(pind (n)) = Θ(pcnf (n)) = Θ(pedge (n)) and c(n1 , n2 , n3 ) = Θ(cind (n, n0 )) = Θ(ccnf (n, n0 )) = Θ(cedge (n, n0 )). Another observation that might be useful in proving OMv hardness results is the following. Theorem 2.13. In the OuMv problem, we can assume that the matrix M is symmetric, and each vector pair (ut , v t ) is such that either ut = v t or the supports of ut and v t are disjoint (i.e., the inner product between ut and v t is 0). The rest of this section is devoted to proving the above theorems. First, we need this fact. Proposition 2.14. Consider a Booleanh matrixi M ∈ {0, 1}n1 ×n2 and Boolean vectors u ∈ {0, 1}n1 and v ∈ {0, 1}n2 . Let M 0 = M0T M , w = [ uv ], x = [ u0 ] and y = [ v0 ] where 0 w, x, y ∈ {0, 1}n1 +n2 . Then u> M v = w> M 0 w = x> M 0 y. Proof. It is easy to verify that w> M 0 w = w> Similarly, x> M 0 y = x   > Mv 0 = u> M v. 17 h Mv MT u i = (u> M v) ∨ (v > M > u) = u> M v. Theorem 2.13 follows immediately from Proposition 2.14. Now we prove Theorem 2.12. Proof of Theorem 2.12. Let AOMv , Aind and Aedge be the algorithms for OMv, independent set query and edge query respectively. (OuMv ⇒ independent set query) Given an input graph G = (V, E) of Aind , preprocess the adjacency matrix M of G using AOMv . Once S t arrives, let v t be the indicator vector of S t (i.e., for all i ∈ V , (v t )i = 1 if i ∈ S t , otherwise (v t )i = 0). Observe that (v t )> M v t = 0 iff S t is independent. So we can use AOMv to answer the query of Aind . (OuMv ⇒ edge query) Given an input graph G of Aedge , preprocess the adjacency matrix M of G using AOMv . Once (S t , T t ) arrives, let ut and v t be the indicator vectors of S t and T t respectively. Observe that (ut )> M v t = 1 iff there is an edge (a, b) ∈ E(S t , T t ). So we can use AOMv to answer the query of Aedge . (independent set query ⇒ OuMv) Given ani input matrix M of AOMv , let G the graph h 0 M 0 defined by the adjacency matrix M = M T 0 . We preprocess G using Aind . Once (ut , v t ) arrives, let S t be the set indicated by w = h ut vt i (i.e., i ∈ S t iff wi =1). We have that S t is independent iff (ut )> M v t = w> M 0 w = 0 by Proposition 2.14. So we can use Aind to answer the query of AOMv . (edge query ⇒ OuMv) Given matrix M of AOMv , let G be the graph defined by h an input i 0 M 0 the adjacency matrix M = M T 0 . We preprocess G using Aedge . Once (ut , v t ) arrives, t let S t , T t be the sets indicated by x = u0 and y = v0t . There is an edge (a, b) ∈ E(S t , T t ) iff (ut )> M v t = x> M 0 y = 1 by Proposition 2.14. So we can use Aedge to answer the query of AOMv . (independent set query ⇔ 2-CNF query) See [BW12, Section 2.3].     Note that we can use an OMv algorithm to solve the dominating set query problem, defined in a similar way as independent set query problem. Indeed, let M be the adjacency matrix of G, and v be an indicator vector of S. We have that M v ∨ v (bit-wise OR) is the all-one vector iff S is a dominating set. However, it is not clear if the reverse reduction exists. 3 Hardness for Amortized Fully Dynamic and Worst-case Partially Dynamic Problems In this section, we give reductions from our intermediate problems to various dynamic problems. In Section 3.1, we give conditional lower bounds for those graph problems whose √ algorithms cannot have the update time u(m) = õ˜( m) and the query time q(m) = õ˜(m) simultaneously. In Section 3.2, we give the bounds for those problems that cannot have the update time u(m) = õ˜(m1−δ ) and the query time q(m) = õ˜(mδ ) simultaneously, for any constant 0 < δ < 1. In Sections 3.3 and 3.4, we give the lower bounds for the remaining graph and non-graph problems, whose lower bound parameters of update/query time are in a different form (see Figure 2). We devote Sections 3.5 and 3.6 to proving the lower bounds for approximating the diameter of a weighted graph and the densest subgraph problem, respectively, because their reductions are more involved. 18 (𝑎) (𝑏) 𝑚 (𝑐) 𝑚 𝑞(𝑛) 𝑚 𝑚 𝑚 𝑚 𝑢(𝑛) Figure 2: Horizontal and vertical axes represent the update and query time of dynamic algorithms respectively. The shaded areas indicate the ranges of update/query time whose existence of dynamic algorithm with such parameters would contradict Conjecture 1.1. Chart (a) and (b) are for problems in Section 3.1 and Section 3.2 respectively. Chart (c) is for problems in Sections 3.3 to 3.6 where the lower bound parameters are in many different forms. Our hardness results, compared to previously known bounds, for fully dynamic problems are summarized in Table 5 and Table 6. Our tight hardness results are summarized in Table 4. Given a matrix M ∈ {0, 1}n1 ×n2 , we denote by GM = ((L, R), E) the bipartite graph where L = {l1 , . . . , ln1 }, R = {r1 , . . . , rn2 }, and E = {(rj , li ) | Mij = 1}. In this section, our proofs usually follow two simple steps. First, we show the reductions in lemmas that given a dynamic algorithm A for some problem, one can solve uMv by running the preprocessing step of A on some graph and then making some number of updates and queries. Then, we conclude in corollaries that if either 1) A has low worst-case update/query time, or 2) A has low amortized update/query time and A is fully dynamic, then this contradicts Conjecture 1.1. 3.1 Lower Bounds for Graph Problems with High Query Time √ To show hardness of the problems in this section, we reduce from uMv where n1 = n2 = m. The idea is that when u and v arrive, we make the update operations of the dynamic algorithm A to “handle” both u and v. Then make only 1 query to A to answer 1-uMv. Since the reduction is efficient in the number of queries, we get a high lower bound of query time. s-t Subgraph Connectivity (st-SubConn) 9 implies the same bound for all reachablity problems (including transitive closure), strong connectivity, bipartite perfect matching, size of maximum matching, minimum vertex cover, maximum independent set on bipartite graph, size of st-maxflow on undirected unit capacity. See some reductions from [AVW14] 10 implies all shortest path problems (ss-SP,ap-SP) with same approximation factor 11 implies the same bound for st-Reach 12 implies the same bound for ap-SubConn, ss-Reach, transitive closure. 13 implies the same bound for ap-SP with same approximation factor. 19 Problems Upper Bounds p(m, n) u(m, n) q(m, n) Lower Bounds p(m, n) u(m, n) q(m, n) m4/3 m2/3 m1/3 poly m2/3− m1/3− m6/5 m4/5 m1/5 poly m4/5− m1/5− 1 1 m poly m1/2− m1− m n 1 poly n1− n2− 1 1 m poly m1/2− m1− 1 m 1 poly m1− m 1 1 m poly m1/2− m1− Erickson’s problem 1 n 1 poly n1− n1− d-failure connectivity 3-approx vertex color distance oracle mn1/c √ m n d2c+4 √ n d 1 poly(n) poly poly(d) n1− d1− n2− Pagh’s problem over k sets in a universe [n] Multiphase over k sets in a universe [n] 1 n 1 poly n1− k1− ss-SubConn, ap-SubConn st-SubConn, (unweighted) st-SP, st-Reach, s-triangle detection, strong connectivity (unweighted) ss-SP, ss-Reach 1 τ ≤ max{k, n} poly 0 Remark Upper: [CPR11], amortized only; Lower: when m = O(n3/2 ) Upper: [Dua10]; Lower: when m = O(n5/4 ) Lower: when m = O(n2 ) Upper: [KKM13]; Lower: m = Θ(n2 ) Lower: when m = O(n2 ) Lower: when m= O(n1/(1−) ), 0 <  Lower: when m = O(n2 ) Upper: binary search tree Upper: [DP10] Upper: [HLW+ 11, Che12, LOP+ 15]; Lower: when (3 − )-approx τ ≥ min{k, n}1− Table 4: Our tight results along with the matching upper bounds (or better upper bounds when worse approximation ratio is allowed). The polylogarithmic factors are omitted. The lower bounds state that there is no algorithm achieving stated preprocessing time, amortized update time, and query time simultaneously, unless the OMv conjecture fails. The matching upper bounds of update time are all worst-case time except the bound by [CPR11]. The upper bounds without remark are the naive ones. 20 Problems p(m, n) u(m, n) q(m, n) Conj. Reference Remark m4/3 mδ− m2/3−δ− 3SUM [AVW14] m1+δ− mδ− m2δ− Triangle [AVW14] n3− m4/3 n1− mδ− n2− m2/3−δ− BMM 3SUM [AVW14] [AVW14] m1+δ− m2δ− m2δ− (*) Triangle [AVW14] n3− n2− n2− (*) BMM [AVW14] poly(n) m1/2− m1− OMv Corollary 3.4 Choose any δ ∈ [1/6, 1/3]. m ≤ O(n1.5 ) For some δ < 0.41 depending on the conjecture When m = Θ(n2 ) Choose any δ ∈ [1/6, 1/3]. m ≤ O(n1.5 ) Only lower bound for amortized time over O(n) updates; for some δ < 0.41 depending on the conjecture Only lower bound for amortized time over O(n) updates; m = Θ(n2 ) Choose any m ≤ n2 poly(n) mδ− m1−δ− OMv Corollary 3.8 poly(n) n1/2− n1− OMv Corollaries 3.10, 3.22 and 3.26 n2− poly(n) (dn)1/2− (dn)1− d1/2− d1− 3SUM OMv [KPP16] Corollary 3.13 poly(n) d1/δ d1− OMv Corollary 3.12 st-SubConn st-Reach st-SubConn9 , st-Reach, unweighted (α, β)st-SP where 3α + β < 5 10 , Triangle Detection, s-Triangle Detection11 , etc. (See footnotes) ss-SubConn12 , unweighted (α, β)ss-SP where 2α, β < 413 , unweighted (α, β)vertex color distance oracle where α + β < 3, etc. (See footnotes) unweighted (3 − )st-SP, (2 − )diameter on weighted Graphs, Densest Subgraph of size at least 5 d-failure Connectivity Choose any δ ∈ (0, 1), and m ≤ min{n1/δ , n1/(1−δ) } Choose any δ ∈ (0, 1/2], d = mδ , m = Θ(n1/(1−δ) ) Choose any δ ∈ (0, 1/2], d = mδ , m ≤ Θ(n1/(1−δ) ) Table 5: Amortized lower bounds for fully dynamic graph problems and worst-case lower bounds for partially dynamic graph problems. Bounds which are not subsumed are highlighted. Each row states that there is no algorithm achieving stated preprocessing time, update time, and query time simultaneously, unless the conjecture fails. Except for (2 − )approx diameter on weighted graphs, all the lower bounds also hold for the worst-case update time of partially dynamic algorithms. Bounds marked with the asterisk (*) hold when the update time is amortized over only O(n) updates. It is not clear how to get this parameter for an update time amortized over any polynomially many updates like all our bounds. 21 Problems Langerman’s p(m, n) u(m, n) q(m, n) Conj. Reference Remark n1+δ− nδ/2− nδ/2− [Pat10] If τ ≥ nδ− , δ ∈ (0, 1) poly(n) k1+δ− n1/2− kδ− n1/2− kδ− multi phase OMv Triangle k3/2− k1/3− poly(n) n2+δ− k1/2− k1/3− n1− nδ− k1/2− k1/3− k1− nδ− poly(n) n4− poly(k, n) n1− n2− 1/2− τ ≥n τ ≥min{k, n}1− Corollary 3.17 [AVW14] Pagh’s over k sets in a universe [n] Erickson over a matrix of size n×n Multiphase over k sets in a universe [n] BMM 3SUM OMv multi phase OMv 3SUM OMv [AVW14] [AVW14] Corollary 3.15 [Pat10] Corollary 3.19 [Pat10] Corollary 5.3 n ≤ k ≤ n2 , Choose δ ∈ (1/3, 0.41) depending on the conjecture n ≤ k ≤ n2 0 k = Θ(n1.5+ ) k ≤ poly(n) If τ ≥ nδ− , δ ∈ (0, 1) k = Θ(n5/2 ) Table 6: Amortized lower bounds for fully dynamic non-graph problems. Bounds which are not subsumed are highlighted. Each row states that there is no algorithm achieving stated preprocessing time, update time, and query time simultaneously, unless the corresponding conjecture fails. The lower bounds based on the multiphase problem are only for worst case time and their parameters are implicit from [Pat10]. Lemma 3.1. Given a partially dynamic algorithm A for st-SubConn, one can solve 1-uMv with parameters n1 and n2 by running the preprocessing step of A on a graph with O(m) √ √ √ edges and Θ( m) vertices, and then performing O( m) turn-on operations (or O( m) √ turn-off operations) and 1 query, where m is such that n1 = n2 = m. Proof. We only prove the decremental case, because the incremental case is symmetric. Given M , we construct the bipartite graph GM and add to it vertices s, t, and edges (t, li ), (rj , s) for all rj ∈ R, li ∈ L. Thus, the total number of edges is at most n1 n2 + n1 + n2 = O(m). In the beginning, every vertex is “turned on”, i.e., included in the set S of the st-SubConn algorithm Once u and v arrive, we turn off li iff ui = 0 and turn off rj iff vj = 0. We have u> M v = 1 √ iff s is connected to t. In total, we need to do at most n1 + n2 = O( m) updates and 1 query. Distinguishing between 3 and 5 for s-t distance (st-SP (3 vs. 5)) Lemma 3.2. Given a partially dynamic algorithm A for (α, β)-approximate st-SP with 3α + β < 5, one can solve 1-uMv with parameters n1 and n2 by running the preprocessing step √ √ of A on a graph with O(m) edges and Θ( m) vertices, and then making O( m) insertions √ √ (or O( m) deletions) and 1 query, where m is such that n1 = n2 = m. Proof. We only prove the decremental case, because the incremental case is symmetric. Given M , we construct the bipartite graph GM and add to it vertices s, t, and edges (t, li ), (rj , s) for all rj ∈ R, li ∈ L. Thus, the total number of edges is at most n1 n2 + n1 + n2 = O(m). Once u and v arrive, we delete (t, li ) iff ui = 0 and delete (rj , s) iff vj = 0. If u> M v = 1, √ then d(s, t) = 3, otherwise d(s, t) ≥ 5. In total, we need to do at most n1 + n2 = O( m) updates and 1 query. 22 Triangle Detection and Triangle Detection at vertex s Lemma 3.3. Given a partially dynamic algorithm A for (s-)triangle detection, one can solve 1-uMv with parameters n1 and n2 by running the preprocessing step of A on a graph with √ √ √ O(m) edges and Θ( m) vertices, and then making O( m) insertions (or O( m) deletions) √ and 1 query, where m is such that n1 = n2 = m. Proof. We only prove the decremental case. Given M , we construct the bipartite graph GM and add to it a vertex s and edges (s, li ), (rj , s) for all rj ∈ R, li ∈ L. Thus, the total number of edges is at most n1 n2 + n1 + n2 = O(m). Once u and v arrive, we delete (s, li ) iff ui = 0 and delete (rj , s) iff vj = 0. We have > u M v = 1 iff there is a triangle in a graph iff there is a triangle incident to s. In total, we √ need to do n1 + n2 = O( m) updates and 1 query. Corollary 3.4. For any n and m ≤ n2 , unless Conjecture 1.1 fails, there is no partially dynamic algorithm A for the problems in the list below for graphs with n vertices and m √ edges with preprocessing time p(m) = poly(m), worst update time u(m) = õ˜( m) and query time q(m) = õ˜(m) that has an error probability of at most 1/3. Moreover, this is true also for fully dynamic algorithms with amortized update time. The problems are: • st-SubConn • st-SP (3 vs. 5) • (s-)triangle detection Proof. Suppose there is such a partially dynamic algorithm A. That is, on a graph with n0 √ vertices and m0 = O(n20 ) edges, A has worst-case update time u(m0 ) = õ˜( m0 ) and query time q(m0 ) = õ˜(m0 ). We will construct an algorithm B for 1-uMv with parameters n1 and n2 which contradicts Conjecture 1.1. Using Lemmas 3.1 to 3.3, by running A on a graph √ √ with n0 = Θ( m) vertices and m0 = O(m) edges where m is such that n1 = n2 = m (note that, indeed, m0 = O(n20 )), B has preprocessing time poly(m) and computation time √ O( mu(m) + q(m)) = õ˜(m) which contradicts Conjecture 1.1 by Corollary 2.8. Next, suppose that A is fully dynamic and only guarantees an amortized bound. We will construct an algorithm C for 1-OuMv with parameters n1 , n2 , and n3 which again contradicts Conjecture 1.1 by running A on the same graph as for solving 1-uMv while the number of updates and queries needed is multiplied by O(n3 ). This can be done because A is fully dynamic. So, for each vector pair (u, v) for C, if A makes k updates to the graph, then A can undo these updates with another k updates so that the updated graph is the same as right after the preprocessing. Recall that, by the notion of amortization, if there are t updates, then A takes O((t + m0 ) · u(m0 )) time where m0 is a number of edges ever √ appearing in the graph. By choosing n3 = m, we have that C has preprocessing time √ √ poly(m) and computation time O(( mn3 + m)u(m) + n3 q(m)) = õ˜(m m) which contradicts Conjecture 1.1 by Theorem 2.7. Note that st-SubConn is reducible to the following problems in a way that preserves the parameters of the lower bounds (see [AVW14] for the first three reductions): • st-Reach, • Strong connectivity, • Bipartite perfect matching, • Size of bipartite maximum matching (and, hence, vertex cover), 23 • st-maxflow in undirected and unit capacity graph (see [Mąd11, Theorem 3.6.1]). Therefore, these problems have the same lower bound. 3.2 Lower Bounds for Graph Problems with a Trade-off To show hardness of the problems in this section, we reduce from uMv where n1 = mδ and n2 = m1−δ for any constant δ ∈ (0, 1). When u and v arrive, we make m1−δ updates of the dynamic algorithm A to handle only v. Then make mδ queries to A to find the value of uMv. Since the choice of δ is free, we get a trade-off lower bound between update time and query time. Through out this subsection, δ ∈ (0, 1) is any constant. Single Source Subgraph Connectivity (ss-Subconn) Lemma 3.5. Given a partially dynamic algorithm A for ss-SubConn, after polynomial preprocessing time, one can solve ( 1−δ δ )-uMv with parameters n1 and n2 by running the preprocessing step of A on a graph with Θ(m1−δ + mδ ) nodes and O(m) edges, then making O(m1−δ ) insertions (or O(m1−δ ) deletions) and O(mδ ) queries, where m is such that mδ = n1 (so m1−δ = n2 ). Proof. We only prove the decremental case because the incremental case is symmetric. Given M , we construct the bipartite graph GM , with an additional vertex s and edges (rj , s) for all j ≤ n2 . Thus, the total number of edges is n1 n2 + n2 = O(m). In the beginning, every node is turned on. Once u and v arrive, we turn off rj iff vj = 0. If u> M v = 1, then s is connected to li for some i where ui = 1. Otherwise, s is not connected to li for all i where ui = 1. We distinguish these two cases by querying, for every 1 ≤ i ≤ n2 , whether s and li are connected. In total, we need to do n2 = m1−δ updates and n1 = mδ queries. Distinguishing between 2 and 4 for distances from s (ss-SP (2 vs. 4)) Lemma 3.6. Given a partially dynamic algorithm A for (α, β)-approximate ss-SP with 2α + β < 4, one can solve ( 1−δ δ )-uMv with parameters n1 and n2 by running the preprocessing step of A on a graph with O(m) edges and O(mδ + m1−δ ) vertices, and then making O(m1−δ ) insertions (or O(m1−δ ) deletions) and O(mδ ) queries, where m is such that mδ = n1 (so m1−δ = n2 ). Proof. We only prove the decremental case. Given M , we construct the bipartite graph GM and add to it a vertex s and edges (rj , s) for all rj ∈ R. Thus, the total number of edges n1 n2 + n2 = O(m). Once u and v arrive, we disconnect s from rj iff vj = 0. We have that if u> M v = 1, then d(s, li ) = 2 for some i where ui = 1 , otherwise d(s, li ) ≥ 4 for all i where ui = 1. In total, we need to do n2 = O(m1−δ ) updates and n1 = O(mδ ) queries. Vertex-color Distance Oracle (1 vs. 3) Vertex-color distance oracles are studied in [HLW+ 11, Che12]. Given a graph G, one can change the color of any vertex and must handle the query that, for any vertex u and color c, return d(u, c) the distance from u to the nearest vertex with color c. Chechik [Che12] showed, for any integer k ≥ 2, a dynamic oracle 24 with update time Õ(n1/k ) and query time O(k) which (4k − 5) approximates the distance. Lacki et al. [LOP+ 15] extended the result when k = 2 by handling additional operations and used it as a subroutine to get an algorithm for dynamic (6 + )-approximate Steiner tree. Lemma 3.7. Given a dynamic algorithm A for (α, β)-approximate vertex-color distance oracle with α + β < 3, one can solve ( 1−δ δ )-uMv with parameters n1 and n2 by running the preprocessing step of A on a graph with O(m) edges and O(mδ + m1−δ ) vertices, and then making O(m1−δ ) vertex-color changes and O(mδ ) queries, where m is such that mδ = n1 (so m1−δ = n2 ). Proof. Given M , we construct the bipartite graph GM . Set the color of li for all li ∈ L to c. The colors of the other vertices (i.e., those in R) are set to c0 6= c. Once u and v arrive, we set the color of li to c0 6= c iff ui = 0. If u> M v = 1, then d(rj , c) = 1 for some j where vj = 1. Otherwise, d(rj , c) ≥ 3 for all j where vj = 1. In total, we need to do n1 = O(mδ ) updates and n2 = O(m1−δ ) queries. Corollary 3.8. For any n, m ≤ O(min{n1/δ , n1/(1−δ) }), and constant δ ∈ (0, 1), unless Conjecture 1.1 fails, there is no partially dynamic algorithm A for the problems in the list below for graphs with n vertices and at most m edges with preprocessing time p(m) = poly(m), worst-case update time u(m) = õ˜(mδ ), and query time q(m) = õ˜(m1−δ ) that has an error probability of at most 1/3. Moreover, this is true also for fully dynamic algorithms with amortized update time. The problems are: • ss-SubConn • ss-SP (2 vs. 4) • Vertex-color Distance Oracle (1 vs. 3) Proof. Suppose there is such a partially dynamic algorithm A. That is, on a graph with 1/δ 1/(1−δ) n0 vertices and m0 = O(min{n0 , n0 }) edges, A has worst-case update time u(m0 ) = ). We will give an algorithm B for ( 1−δ õ˜(mδ0 ) and query time q(m0 ) = õ˜(m1−δ 0 δ )-uMv with parameters n1 and n2 which contradicts Conjecture 1.1. Using Lemmas 3.5 to 3.7, by running A on a graph with n0 = Θ(mδ + m1−δ ) vertices and m0 = O(m) edges, where m is such 1/δ 1/(1−δ) that mδ = n1 and so m1−δ = n2 (note that, indeed, m0 = O(min{n0 , n0 }) ), B has preprocessing time poly(m) and computation time O(m1−δ u(m) + mδ q(m)) = õ˜(m) which contradicts Conjecture 1.1 by Corollary 2.8. The argument for fully dynamic algorithm is similar as in the proof of Corollary 3.4. These results show that improving the approximation ratio of 3 of vertex-color distance oracle will cost too much; i.e., we will need Ω(n) update or query time in a dense graph assuming Conjecture 1.1 by setting δ = 1/2 and m = n2 . In particular, one cannot improve the approximation ratio of dynamic Steiner tree with sub-linear update time by improving the approximation ratio of vertex-color distance oracle. 3.3 Lower Bounds for Graph Problems with other Parameters (3 − )-approximate s-t Shortest Path ((3 − )st-SP) By subdividing edges, we can get a weaker lower bound, but better approximation factor, for distance related problems. 25 Lemma 3.9. Given a partially dynamic algorithm A for (3 − )-approximate st-SP, one can solve uMv with parameters n1 and n2 by running the preprocessing step of A on a graph √ √ with O(n) vertices and then making O( n) insertions (or O( n) deletions) and 1 query, √ where n is such that n1 = n2 = n. Proof. We only prove the decremental case, because the incremental case is symmetric. Given M , we construct the bipartite graph GM and add to it vertices s, t, and edges (t, li ), (rj , s) for all rj ∈ R, li ∈ L. Furthermore we replace each edge e in GM by a path Pe of length 4 . Thus, the total number of vertices is at most O(n1 n2 /) = O(n/). Once u and v arrive, we delete (t, li ) iff ui = 0 and delete (rj , s) iff vj = 0. If u> M v = 1, then d(s, t) = 2 + 4 , otherwise d(s, t) ≥ 2 + 3 · 4 . One can verify that √  > 0. In total, we need to do n1 + n2 = O( n) updates and 1 query. 2+3· 4 2+ 4 > 3 −  for any Corollary 3.10. Unless Conjecture 1.1 fails, there is no partially dynamic algorithm for (3 − ) st-SP on a graph with n vertices with preprocessing time p(n) = poly(n), worst-case √ update time u(n) = õ˜( n), and query time q(n) = õ˜(n) that has an error probability of at most 1/3. Moreover, this is true also for fully dynamic algorithm with amortized update time. d-failure Connectivity d-failure connectivity problem is a “1-batch-update” version of dynamic subgraph connectivity. The update, for turning off up to d vertices, comes in one batch. Then one can query whether two nodes s and t are connected. We want the update time u(d) for a batch of size d and the query time q(d) to depend mainly on d. Lemma 3.11. Let δ ∈ (0, 1/2] be a fixed constant. Given an algorithm A for d-failure δ connectivity, one can solve ( 1−δ )-uMv with parameters n1 and n2 by running the preprocessing step of A on a graph with O(m) edges and Θ(m1−δ ) vertices, then making 1 batch of O(mδ ) updates and O(m1−δ ) queries, where m is such that m1−δ = n1 (so mδ = n2 ). Proof. Given M , we construct the bipartite graph GM and add to it a vertex s and edges (rj , s) for all rj ∈ R. There are n1 n2 = O(m) edges and n1 + n2 = Θ(mδ + m1−δ ) = Θ(m1−δ ) vertices. Once u and v arrive, we turn off all rj where vj = 0 in one batch of O(mδ ) updates. u> M v = 1 iff, for some i, ui = 1, s is connected to ui . This can be checked using at most m1−δ queries. Corollary 3.12. For any n, m = O(n1/(1−δ) ), and constant δ ∈ (0, 1/2], unless Conjecture 1.1 fails, there is no algorithm for d-failure connectivity for a graph with n vertices and at most m edges with preprocessing time p(n) = poly(n), update time u(d) = õ˜(d1/δ ), and query time q(d) = õ˜(d) that has an error probability of at most 1/3, when d = mδ . δ Proof. Suppose there is such an algorithm A. By Lemma 3.11, we can solve ( 1−δ )-uMv with 1−δ δ δ 1−δ parameters n1 = m and n2 = m by running A in time O(u(m ) + m q(mδ )) = õ˜(m). This contradicts Conjecture 1.1 by Corollary 2.8. Corollary 3.12 implies that Duan and Pettie’s result [DP10] with preprocessing time Õ(d1−2/c mn1/c−1/(c log(2d)) ), update time Õ(d2c+4 ) and query time O(d), for any integer 26 c ≥ 1, is tight in the sense that we cannot improve the query time significantly as long as we want to have update time polynomial in d (because we can choose δ to be any possible constant close to zero). However, improving the update time does not contradict the OMv conjecture. With the same argument we also get the following lower bound. Corollary 3.13. For any n, m = Θ(n1/(1−δ) ), and constant δ ∈ (0, 1/2], unless Conjecture 1.1 fails, there is no algorithm for d-failure connectivity for a graph with n vertices and at most m edges with preprocessing time p(n) = poly(n), update time u(n, d) = õ˜(dn), and query time q(d) = õ˜(d) that has an error probability of at most 1/3, when d = mδ . 3.4 Lower Bounds for Non-graph Problems In this section, we mimic the reductions from [Pat10] to show hardness of non-graph problems. However, our results imply amortized lower bounds while the results in [Pat10] are for worst-case lower bounds. Pagh’s problem. Lemma 3.14. Given an algorithm A for Pagh’s problem (cf. Table 3), for any constant γ > 0, one can solve γ-uMv with parameters k and n by running the preprocessing step of A on k initial sets in the universe [n] using poly(k, n) preprocessing time, k updates (adding k more sets into the family) and n queries. Proof. Given a matrix M , let M̄ be the matrix defined by M̄i,j = 1 − Mi,j for all i and j. Let Mi be the i-th row of M and treat it as a subset of [n] i.e., j ∈ Mi iff Mi,j = 1. We S similarly treat the i-th row M̄i of M̄ as a set. Note that u> M ej = 1 iff j ∈ i:ui =1 Mi iff T j∈ / i:ui =1 M̄i . Thus, at the beginning, we compute M̄i for each i ≤ k. Once u and v arrive, T T we compute ui =1 M̄i using k updates. There is a j with vj = 1 such that j ∈ / ui =1 M̄i iff u> M v = 1. We need n queries to check if such a j exists. Corollary 3.15. For any constant γ > 0, Conjecture 1.1 implies that there is no dynamic algorithm A for Pagh’s problem maintaining k sets over the universe [n] where k = nγ , with poly(k, n) preprocessing time, u(k, n) = õ˜(n) amortized update time, and q(k, n) = õ˜(k) query time that has an error probability of at most 1/3. Proof. Recall that, by the notion of amortization, if A initially maintains k sets, then the total update time of A is O((t + k) · u(t + k, n)). By Lemma 3.14, we can solve uMv with parameters k and n by running A and making k updates and n queries in time O(2k · u(2k, n) + n · q(2k, n)) = õ˜(nk). This contradicts Conjecture 1.1 by Corollary 2.8. Langerman’s Zero Prefix Sum problem Lemma 3.16. Given an algorithm A for Langerman’s problem (cf. Table 3), one can solve 1-uMv with parameters n1 and n2 by running the preprocessing step of A on an array √ √ of size O(n), and then making O( n) updates and O( n) queries where n is such that √ n1 = n2 = n 27 2(n2 − j) + 1 0 0 −2n2 −2n2 0 1 1 2 1 2 1 1 0 1 0 2 2 2 2 1 0 0 0 0 1 ··· ··· ··· ··· ··· 2 1 1 2 2 0 1 1 0 0 −2n2 −2n2 0 0 −2n2 Figure 3: The array in the reduction from uMv to Langerman’s zero prefix sum problem Proof. Given a matrix M , we construct an array R of size 1 + n1 · (2n2 + 2) = O(n). For convenience, we will imagine that R is arranged as a two-dimensional array {Ri,j }i∈[n1 ],j∈[2n2 +2] (Ri,2n2 +2 is before Ri+1,1 ) with one additional entry R0 at the beginning. For all i ≤ n1 , we set Ri,1 = 0 and Ri,2n2 +2 = −2n2 . For each entry of Mi,j , if Mi,j = 1, then we set Ri,2j = 1 and Ri,2j+1 = 1. If Mi,j = 0, then we set Ri,2j = 2 and Ri,2j+1 = 0. P Note that j Ri,j = 0 for all i, so the rows of R are “independent”. Once u and v arrive, we swap the values of Ri,1 and Ri,2n2 +2 for all i where ui = 1 by setting Ri,1 = −2n2 and Ri,2n2 +2 = 0. For each j where vj = 1, we set R0 = 2(n2 − j) + 1 √ and query for a zero prefix sum. See Figure 3. In total, we need to do O(n1 + n2 ) = O( n) √ updates and O(n2 ) = O( n) queries. To show correctness, we claim that a zero prefix sum exists iff u> M ej = 1 where ej has 1 at only the j-th entry. First, the prefix sums cannot reach zero at row i of R if ui = 0, because in that row i, each number is positive except Ri,2n2 +2 = −2n2 which just resets the sum within the row to zero. Second, for each row i where ui = 1, the prefix sum from R0 to Ri,1 is −2j + 1. Then each pair of entries in the row increments the sum by 2. The prefix sum reaches zero iff Mi,j = 1. If Mi,j = 0, then Ri,2j = 2 so the prefix sums to Ri,2j−1 and Ri,2j are −1 and 1, respectively. The prefix sum then stays positive until row i finishes. If Mi,j = 1, then Ri,2j = 1 and the prefix sum from R0 to Ri,2j is exactly 0. Corollary 3.17. Conjecture 1.1 implies that there is no algorithm for Langerman’s problem on an array of size n with preprocessing time p(n) = poly(n), amortized update time √ √ u(n) = õ˜( n), and query time q(m) = õ˜( n) that has an error probability of at most 1/3. Proof. Suppose there is such an algorithm A. By Lemma 3.16 and by “resetting” the array √ √ when the new vector pair arrives, one can solve OuMv with parameters n1 = n, n2 = n, √ √ and n3 = n in time O(n · u(n) + n · q(n)) = õ˜(n n). This contradicts Conjecture 1.1 √ by Theorem 2.7. Note that by the choice of n3 = n as the third parameter of OuMv we perform Θ(n) updates to A, which allows use to use the amortized update time u(n) of A in this argument. Erickson’s problem Lemma 3.18. Given an algorithm A for Erickson’s problem (cf. Table 3), one can solve 1-OuMv with parameters n1 ,n2 , and n3 by running the preprocessing step of A on a matrix of size n × n and then making O(n · n3 ) updates and n3 queries, where n is such that n1 = n2 = n. Proof. Given a Boolean matrix M , A runs on the same matrix but treats it as an integer matrix. Once ut and v t arrive, we increment the row i iff uti = 1 and increment the column j 28 iff vjt = 1. Before ut+1 and v t+1 arrive, we increment the remaining rows i where uti = 0 and remaining column where vjt = 0. Therefore, we have that (ut )> M v t = 1 iff the maximum value in the matrix is 2t + 1. Corollary 3.19. Unless Conjecture 1.1 fails, there is no algorithm for Erickson’s problem on a matrix of size n × n with preprocessing time p(n) = poly(n), amortized update time u(n) = õ˜(n), and query time q(n) = õ˜(n2 ) that has an error probability of at most 1/3. Proof. Otherwise, we can solve 1-OuMv with parameters n1 = n, n2 = n, and n3 using polynomial preprocessing time and õ˜(n1 n2 n3 ) computation time which contradicts Conjecture 1.1 by Theorem 2.7. 3.5 (2 − ) Approximate Diameter on Weighted Graphs We show that, for any  > 0, it is OMv-hard to maintain a (2 − )-approximation of the √ diameter in a weighted graph under both insertions and deletions with õ˜( n) update time and õ˜(n) query time, even if the edge weights are only 0 and 1. This reduction is inspired by a lower bound in distributed computation [FHW12]. It is different from previous reductions in that we can show the hardness for this problem only in the fully dynamic setting and not in the partially dynamic setting. Lemma 3.20. For any γ > 0, Given a fully dynamic algorithm A for (2 − )-approximate diameter on a {0, 1}-weighted undirected graph, one can solve γ-uMv with parameters n1 √ and n2 by running the preprocessing step of A on a graph with O(n1 n2 ) vertices, and then √ making n2 + O(n1 n2 ) updates and n1 queries to A. Proof. First, let us define an undirected graph H v , called vector graph, from a vector v of size n2 . A vector graph H v = (B v ∪ C v ) has two halves, called upper and lower halves denoted √ by B v and C v respectively. B v and C v are both cliques of size n2 . Let {bvx }1≤x≤√n2 and {cvx }1≤x≤√n2 be the vertices of B v and C v respectively. We include an edge (bvx , cvy ) iff v(x−1)√n2 +y = 0. The weight of all edges in H v is 1. Given a matrix M of size n1 × n2 , let Mi be the i-th row of M . We construct a vector graph H Mi for each 1 ≤ i ≤ n1 , and another vector graph H v where v is the zero vector. There are two special vertices a and z. Connect a to all vertices in H v with weight one. Connect z to a and all vertices in H Mi with weight zero, for every 1 ≤ i ≤ n1 . Once (u, v) arrives, we update H v to be the vector graph of v in n2 updates. Then we work in stages i, for each i where ui = 1. Before going to the next stage, we undo all the updates. In stage i, 1) disconnect z from each vertex in H Mi , 2) connect a to each vertex v Mi v i in H Mi with weight one, and 3) add 0-weight matching edges (bM x , bx ) and (cy , cy ) for all √ √ x, y ≤ n2 . All three steps need O( n2 ) updates. Let G(Mi , v) denote the resulting graph (see Figure 4 for example). We query the diameter of G(Mi , v) and will use the result to √ solve γ-uMv. After finishing all stages, there are n2 + O(n1 n2 ) updates and n1 queries in total. If there is some stage i where the diameter of the graph G(Mi , v) is 2, then report u> M v = 1. Otherwise report 0. The following claim justifies this answer. Claim 3.21. The diameter of G(Mi , v) is 1 if Mi> v = 0. Otherwise, the diameter is 2. 29 𝑎 𝐻𝑀1 𝑧 𝐻𝑣 𝐻 𝑀𝑖 𝐻𝑀𝑛1 Figure 4: An example of G(Mi , v) from the proof of Lemma 3.20. Dashed lines are edges of weight zero. Other lines are edges of weight one. Proof. First, every edge incident to z has weight 0. So we can treat all the adjacent vertices of z, which are exactly a and those in H Mi0 where i0 6= i, as a single vertex. Therefore, we just have to analyze the distance among vertices in H Mi , H v and the vertex a. Note that a is connected to all vertices in H Mi and H v by 1-weight edges. The distance between vertices among the upper halves B Mi and B v is at most 1, because B Mi and B v are cliques and there are matching edges of weight zero. Similarly, for the lower halves C Mi and C v . Now, we are left with analyzing the distance between a vertex in the upper halves and another vertex in the lower ones. There are two cases. √ Mi i If Mi> v = 0, then for each x, y ≤ n2 , there is either an edge (bM x , cy ) or an edge Mi Mi v v Mi Mi Mi i (bvx , cvy ). So given any bM x and cy , there is either a path (bx , bx , cy , cy ) or a path (bx , cy ) Mi Mi v Mi v i both of weight 1. Since d(bM x , cy ) = 1, the distance among bx , bx , cy , cy is at most 1. Since this is true for any x, y, the diameter of the graph is 1. Mi i If Mi> v = 1, then there are some x, y such that neither the edge (bM x , cy ) nor the edge Mi Mi Mi i (bvx , cvy ) exists. To show that d(bM x , cy ) ≥ 2, it is enough to show that d(bx , cy ) > 1 i because every non-zero edge weight is 1. The set of vertices with distance 1 from bM x includes M M v i i exactly the neighbors of bx in H and their “matching” neighbors in H , the neighbors of bvx in H v and their “matching” neighbors in H Mi , and the vertex a, which combines z and all Mi Mi i vertices in H Mi0 where i0 = 6 i. But this set does not include cM y . Therefore d(bx , cy ) ≥ 2 and we are done. Corollary 3.22. Assuming Conjecture 1.1, there is no fully dynamic algorithm for (2 − )approximate diameter on {0, 1}-weighted graphs with n vertices with preprocessing time 30 √ p(n) = poly(n), amortized update time u(n) = õ˜( n), and query time q(n) = õ˜(n) that has an error probability of at most 1/3. Proof. Suppose such a fully dynamic algorithm A exists. By Lemma 3.20 and by “undoing” the operations as in the proof of Corollary 3.4, we can solve 2-OuMv with parameters √ √ n1 = n, n2 = n, and n3 = n by running A on a graph with Θ(n1 n2 ) = Θ(n) vertices, and √ √ then making O(n2 + n1 n2 ) × n3 = O(n2 ) updates and n1 n3 = O(n n) queries in total. √ √ The computation time is O(n2 u(n) + n nq(n)) = õ˜(n2 n), contradicting Conjecture 1.1 by √ Theorem 2.7. Note that we choose n3 = n n to make sure that the number of updates is at least the number of edges in the graph, so that we can use the amortized time bound. 3.6 Densest Subgraph Problem In this section, we show a non-trivial reduction from 1-uMv to the densest subgraph problem and hence show the hardness of this problem. Theorem 3.23. Given a partially dynamic A for maintaining the density of the densest subgraph, one can solve 1-uMv with parameters n1 = n and n2 = n by running the preprocessing step of A on a graph with Θ(n3 ) vertices, and then making Θ(n) updates and 1 query. Problem definition We are given an undirected input graph G = (V, E) with vertices V and edges E. For every subset of vertices S ⊆ V , let G(S) = (S, E(S)) denote the subgraph of G induced by the vertices in S, i.e., we have E(S) = {(u, v) ∈ E | u, v ∈ S}. The density of any subset of vertices S ⊆ V is defined as ρ(S) = |E(S)|/|S|. For the reduction described in the following let M be a Boolean matrix of size n × n and set k = 6n. Preprocessing. We construct the graph G as follows: • Bit graphs for M . For each bit mi,j of M , construct a graph Bi,j consisting of k vertices. There are two special vertices in Bi,j , called special vertex 1 and special vertex 2. If the bit mi,j is set, connect the nodes in Bi,j by a path of k − 1 edges in Bi,j from special vertex 1 to special vertex 2. If the bit mi,j is not set, insert no edges into Bi,j . • Row graph for M. For each row i of M , construct a graph Ri consisting of 3 vertices. One of these vertices is special. Add an edge from the special vertex of Ri to special vertex 1 of Bi,j for all 1 ≤ j ≤ n. • Column graph for M . For each column j of M , construct a graph Cj consisting of 3 vertices. One of these vertices is special. Add an edge from the special vertex of Cj to special vertex 2 of Bi,j for all 1 ≤ i ≤ n. Observe that G has O(n3 ) vertices. Revealing u and v We execute the following O(n) edge operations and one query. • For each i where ui = 1, turn the row graph Ri into a triangle by inserting O(n) edges. 31 • For each j where vj = 1, turn the column graph Ci into a triangle by inserting O(n) edges. • Then ask for the size of the densest subgraph. This describes the reduction of Theorem 3.23. Note that we only need a partially dynamic algorithm. Before proving the correctness of this reduction below, we observe the following easy lemma. Lemma 3.24. For all numbers a, b, c, d, and r we have: 1. If a b ≥ r and c d ≥ r, then a+c b+d ≥ r. 2. If a b ≥ r and c d ≤ r, then a−c b−d ≥ r. Theorem 3.25. There exists a subset S ⊆ V with density ρ(S) ≥ u> M v = 1. k+7 k+6 if and only if Proof. Assume first that u> M v = 1. So there are indices i and j such that ui Mi,j vj = 1. Consider the subgraph consisting of the union of Ri , Bi,j and Cj . It consists of k + 6 vertices and k + 7 edges, i.e., it has density k+7 k+6 . Now assume that u> M v = 0 and let S ⊆ V . To show that ρ(S) ≤ k+7 k+6 we will make the following assumptions: (1) For every i and j, either the full bit graph Bi,j together with two edges leaving the bit graph is contained in S or no node of Bi,j is contained in S. (2) For every row i of a set bit (i.e., where ui = 1), either the full row graph Ri is contained in G(S) or no node of Ri is contained in G(S) (3) For every row i of an unset bit (i.e., where ui = 0), either the special node of the row graph Ri is contained in S or no node of Ri is contained in G(S) (4) For every column j of a set bit (i.e., where vj = 1), either the full column graph Rj is contained in G(S) or no node of Cj is contained in G(S) (5) For every column j of an unset bit (i.e., where vj = 0), either the special node of the column graph Cj is contained in S or no node of Cj is contained in G(S) These assumptions can be made without loss of generality as we argue in the following. (1) Suppose S contains some subset U of nodes of Bi,j and either U does not contain all nodes of Bi,j or one of the special nodes of Bi,j is not contained in S. Then by removing U from S we remove some q ≤ k nodes and at most q edges from G(S). Thus, we are removing a piece of density at most 1. If ρ(S) ≥ k+7 k+6 ≥ 1, then removing U from S will not decrease a ρ(S) by Part 2 of Lemma 3.24 (using r = k+7 k+6 , ρ(S) = b , c ≤ q, and d = q). Therefore we may assume without loss of generality that S does not contain U . (2) If only one of the nodes of Ri is contained in S, then by adding the two other nodes we add 2 nodes and 3 edges to G(S). As 32 > k+7 k+6 , doing so will not decrease the density of a S to below k+7 by Part 1 of Lemma 3.24 (using r = k+7 k+6 k+6 , ρ(S) = b , c = 3, and d = 2) and thus we may assume without loss of generality that all the nodes of Ri are contained in S. 32 Similarly, if only two of the nodes of Ri are contained in S, then by adding the third node we add 1 node and 2 edges to G(S). Again, by Lemma 3.24, we may assume without loss of generality that all three nodes of Ri are contained in S. (3) There are no edges incident to the non-special nodes of Ri . By removing the nonspecial nodes of Ri from S we only increase ρ(S). Thus, we may assume without loss of generality, that only the special node is contained in S. (4) and (5) follow the same arguments as (2) and (3). Using these assumptions we conclude that G(S) has the following structure: it contains some full bit graphs (i.e., paths) of set bits, each with two outgoing edges, some full row or column graphs (i.e., triangles) of set bits, and some special nodes of row or column graphs of unset bits. In the rest of this proof we will use the following notation: x denotes the number of bit graphs contained in S, y denotes the number of row or column graphs of set bits contained in S, and z denotes the number of row or column graphs of unset bits contained in C. Thus, G(S) has the density ρ(S) = The inequality ρ(S) < k+7 k+6 , 3y + (k + 1)x . 3y + z + kx which we want to prove, is now equivalent to 6x < (k + 7)z + 3y . Consider some bit graph contained in G(S). As argued above, this graph has one edge going to a row graph and one edge going to a column graph. As u> M v = 0 at least one of those edges must go to a row or column graph of an unset bit. In this way we assign at most n bit graphs to every unset row or column bit and it follows that x ≤ nz. As we have defined k = 6n we obtain 6x ≤ 6nz = kz < (k + 7)z + 3y as desired. This complete the proof of Theorem 3.23. Corollary 3.26. Unless Conjecture 1.1 fails, there is no partially dynamic algorithm A for maintaining the density of the densest subgraph on a graph with n vertices with polynomial preprocessing time, worst-case update time u(n) = õ˜(n1/3 ), and query time q(n) = õ˜(n2/3 ) that has an error probability of at most 1/3. Moreover, this is true also for fully dynamic algorithms with amortized update time. Proof. Suppose that such a partially dynamic algorithm A exists. By Theorem 3.23 and by scaling down the parameter from n to n1/3 , we can solve 1-uMv with parameters n1/3 and n1/3 , by running A on a graph with Θ(n) vertices, in time O(n1/3 u(n) + q(n)) = õ˜(n2/3 ) contradicting Conjecture 1.1 by Corollary 2.8. If A is fully dynamic, the argument is similar as in the proof of Corollary 3.4. 33 Problems Bipartite Max Matching unweighted st-SP unweighted ss-SP unweighted (α, β)ap-SP, 2α + β < 4 Transitive Closure p(m, n) u(m, n) q(m, n) Conj. Reference Remark m4/3− m4/3− m1/3− 3SUM [KPP16] poly poly poly (mn)1− poly (mn)1− m3/2− m3/2− m3/2− (mn)1− (mn)1− (mn)1− m1− m1− m1− 0 mδ − 0 mδ − 0 mδ − OMv OMv OMv BMM OMv BMM Corollary 4.4 Corollary 4.2 Corollary 4.2 [RZ11] Corollary 4.8 [DHZ00] m = Θ(n); only for incremental case.14 m = Θ(n) m = O(n2 ) m = O(n2 ) poly (mn)1− poly (mn)1− (mn)1− (mn)1− mδ − 0 mδ − 0 mδ − OMv BMM OMv Corollary 4.8 [DHZ00] Corollary 4.8 0 Choose any δ 0 ∈ (0, 1/2], 0 m = Θ(n1/(1−δ ) ) Table 7: Lower bounds for total update time of partially dynamic problems. Bounds which are not subsumed are highlighted. Each row states that there is no algorithm achieving stated preprocessing time, total update time, and query time simultaneously, unless the conjecture fails. Lower bounds based on BMM apply to only combinatorial algorithms. 4 Hardness for Total Update Time of Partially Dynamic Problems Our lower bounds, compared to previously known bounds, for the total update time of partially dynamic problems are summarized in Table 7. Tight results are summarized in Table 8 Given a matrix M ∈ {0, 1}n1 ×n2 , we denote a bipartite graph GM = ((L, R), E) where L = {l1 , . . . , ln1 }, R = {r1 , . . . , rn2 }, and E = {(rj , li ) | Mij = 1}. In this section, our proofs again follow two simple steps as in Section 3. First, we show the reductions in lemmas that given a partially dynamic algorithm A for some problem, one can solve OuMv by running the preprocessing step of A on some graph and then making some number of updates and queries. Then, we conclude in corollaries that if A has low total update update time and query time then this contradicts Conjecture 1.1. In the proofs of the lemmas of this section, we only usually show the reduction from OuMv to the decremental algorithm, because it is symmetric in the incremental setting. s-t Shortest Path (st-SP) Lemma 4.1. Given an incremental (respectively decremental) dynamic algorithm A for st-SP, one can solve 1-OuMv with parameters n1 , n2 , and n3 by running the preprocessing step of A √ on a graph with Θ( m) vertices and O(m) edges which is initially empty (respectively initially √ √ has Θ(m) edges), and then making m queries, where m is such that n1 = n2 = n3 = m. Proof. Given an input matrix M of 1-OuMv, we construct a bipartite graph GM , and also two paths P and Q with n3 vertices each. Let P = (p1 , p2 , . . . , pn3 ) where p1 = s, and 14 Kopelowitz, Pettie, and Porat [KPP16] show a higher lower bound for the amortized update time of incremental algorithms. But they allow reverting the insertion which is not allowed in our setting. 34 Problem dec. unweighted Exact ss-SP dec. unweighted (1 + ) ss-SP dec. unweighted (1 + , 0) ap-SP dec. unweighted (1 + , 2) ap-SP dec. unweighted (2 + , 0) ap-SP dec. Transitive Closure Upper Bounds p(m, n) u(m, n) q(m, n) m mn 1 m1+o(1) m1+o(1) 1 mn mn 1 Lower Bounds p(m, n) u(m, n) q(m, n) poly poly n5/2 n5/2 1 n5/2 n5/2 1 mn mn 1 poly mn1− mn1− mn1− mδ mδ 0 0 − − mδ 0 − Problem dec. unweighted Exact ss-SP dec. (α, β) ap-SP, 2α + β < 4 dec. transitive closure Remark Upper: [ES81] Upper: [HKN14a] Upper: [HKN13, RZ12, Ber13] Upper: [HKN13] Upper: [Lac13] Table 8: Our tight results along with the matching upper bounds (or better upper bounds when worse approximation ratio is allowed). The polylogarithmic factors are omitted. The lower bounds state that there is no algorithm achieving stated preprocessing time, total update time, and query time simultaneously, unless the conjecture fails. The table shows that one cannot improve the approximation factor of decremental (1 + ) ss-SP/(1 + , 2) ap-SP/(2 + , 0) ap-SP without scarifying fast running time. All lower bounds hold, for any 0 δ 0 ∈ (0, 1/2], when m = Θ(n1/(1−δ ) ).  > 0 is any constant. Q = (q1 , q2 , . . . , qn3 ) where q1 = s0 . Add the edge (pt , li ) and (qt , rj ) for all i ≤ n1 , j ≤ n2 √ and t ≤ n3 . There are Θ(n1 + n2 + n3 ) = Θ( m) vertices and O(n1 n2 + n3 ) = O(m) edges. Once ut and v t arrive, we disconnect pt from li iff uti = 0, and disconnect qt from rj iff t vj = 0. We have that if (ut )> M v t = 1, then d(s, s0 ) = 2t + 1, otherwise d(s, s0 ) ≥ 2t + 2. This is because, before ut+1 and v t+1 arrive, we disconnect pt from li for all i ≤ n1 and √ disconnect qt from rj for all j ≤ n2 . So for each t, we need 1 query, and hence n3 = m queries in total. Corollary 4.2. For any n and m = O(n2 ), Conjecture 1.1 implies that there is no partially dynamic st-SP algorithm A on a graph with n vertices and at most m edges with polynomial preprocessing time, total update time õ˜(m3/2 ), and query time õ˜(m) that has an error probability of at most 1/3. Proof. Suppose there is such an algorithm A. By Lemma 4.1, we construct an algorithm √ √ √ B for 1-OuMv with parameters n1 = m, n2 = m, and n3 = m by running A on a √ graph with n0 = Θ( m) vertices and m0 = O(m) edges. Note that m0 = O(n20 ). Since A uses polynomial preprocessing time, total update time õ˜(m3/2 ) and total query time √ O( mq(m)) = õ˜(m3/2 ) B has polynomial preprocessing time and õ˜(m3/2 ) computation time contradicting Conjecture 1.1 by Theorem 2.7. Note that, when m = Θ(n2 ), Corollary 4.2 implies that there is no algorithm with õ˜(n3 ) total update time and õ˜(n2 ) query time. There is a matching upper bound of total update time O(mn) = O(n3 ) due to [ES81]. Bipartite Maximum Matching 35 Lemma 4.3. Given an incremental (respectively decremental) dynamic algorithm for bipartite maximum matching, one can solve 1-OuMv with parameters n1 , n2 , and n3 by running A on a graph with Θ(m) vertices and Θ(m) edges which is initially empty (respectively initially √ √ has Θ(m) edges), and then making m queries, where m is such that n1 = n2 = n3 = m. Proof. Given an input matrix M of 1-OuMv, we perform the following preprocessing. First, we construct a bipartite graph GM which has O(n1 n2 ) = O(m) edges. There are also additional sets of vertices 1) L0 = {l10 , . . . , ln0 1 } and R0 = {r10 , . . . , rn0 2 }, 2) Xt = {xt,1 , . . . , xt,n1 } and 0 , . . . , y0 Xt0 = {x0t,1 , . . . , x0t,n1 } for all t ≤ n3 , and 3) Yt = {yt,1 , . . . , yt,n1 } and Yt0 = {yt,1 t,n1 } for all t ≤ n3 . These are all vertices in the graph, so there are Θ(n1 + n2 + n1 n3 + n2 n3 ) = Θ(m) 0 ) for each vertices in total. Next, we add edges (li , li0 ), (rj , rj0 ), (xt,i , x0t,i ) and (yt,j , yt,j i ≤ n1 , j ≤ n2 , t ≤ n3 . These edges form a perfect matching of size Θ(m). Finally, we add edges (xt,i , li ) and (yt,j , rj ) for each i ≤ n1 , j ≤ n2 , t ≤ n3 . These Θ(m)-many edges do not change the size of matching. In total, there are Θ(m) edges. 0 ) Once (ut , v t ) arrives, we delete the edge (xt,i , x0t,i ) for each ui = 1 and the edge (yt,j , yt,j for each vj = 1. Let dt be the number of edges we delete in this way. Observe that (ut )> M v t = 1 iff there is an edge (li , rj ) for some i, j where ui = 1, vj = 1 iff there is an augmenting path from xt,i to yt,j for some i, j. So if (ut )> M v t = 1, then the size of maximum matching is decreased by at most dt − 1 Otherwise, the size of maximum matching is decreased by dt . Before (ut+1 , v t+1 ) arrives, we delete all edges (xt,i , li ) and (yt,j , lj ) for each i ≤ n1 , j ≤ n2 . Therefore, the graph now has a perfect matching again. So for each t, √ we need 1 query, and hence n3 = m queries in total. Corollary 4.4. For any n and m = O(n), Conjecture 1.1 implies that there is no partially dynamic algorithm for bipartite maximum matching on a graph with n vertices and at most m edges with preprocessing time p(n) = poly(n), total update time u(m, n) = õ˜(m3/2 ), and query time q(m) = õ˜(m) that has an error probability of at most 1/3. Proof. Same argument as Corollary 4.2. Note that the hardness proof in Corollary 4.4 applies only to sparse graphs. Single Source Shortest Path (ss-SP) Lemma 4.5. Given an incremental (respectively decremental) dynamic algorithm A for δ ss-SP, one can solve ( 1−δ )-OuMv with parameters n1 , n2 , and n3 by running A on a graph δ 1−δ with Θ(m +m ) vertices and Θ(m) edges which is initially empty (respectively initially has Θ(m) edges), and then making m2(1−δ) queries, where m is such that n1 = m1−δ , n2 = mδ and n3 = m1−δ . δ Proof. Given an input matrix M of ( 1−δ )-OuMv, we construct the bipartite graph GM , and also a path Q = (q1 , q2 , . . . , qn3 ) where q1 = s. Add the edge (qt , rj ) for all j ≤ n2 , t ≤ n3 . There are Θ(n1 + n2 + n3 ) = Θ(mδ + m1−δ ) vertices and Θ(n1 n2 + n2 n3 ) = Θ(m) edges. Once ut and v t arrive, we disconnect qt from rj iff vjt = 0. We have that if (ut )> M v t = 1, then d(s, li ) = t + 1 for some i where ui = 1, otherwise d(s, li ) ≥ t + 2 for all i where ui = 1. So n1 queries are enough to distinguish these two cases. Before ut+1 and v t+1 arrive, we disconnect qt from rj for all j ≤ n2 . So for each t, we need n1 queries, and hence n1 n3 = m2(1−δ) queries in total. 36 Distinguishing Distance among Vertices between 2 and 4 (ap-SP (2 vs. 4)) Lemma 4.6. Given an incremental (respectively decremental) dynamic algorithm A for δ (α, β)-approximate ap-SP with 2α + β < 4, one can solve ( 1−δ )-OuMv with parameters n1 , δ 1−δ n2 , and n3 by running A on a graph with Θ(m + m ) vertices and Θ(m) edges which is initially empty (respectively initially has Θ(m) edges), and then making m2(1−δ) queries, where m is such that n1 = m1−δ , n2 = mδ and n3 = m1−δ . δ Proof. Given an input matrix M of ( 1−δ )-OuMv, we construct a bipartite graph GM , and another set of vertices Q = {q1 , . . . , qn3 }. Add the edge (qt , rj ) for all j ≤ n2 , t ≤ n3 . There are Θ(n1 + n2 + n3 ) = Θ(mδ + m1−δ ) vertices and Θ(n1 n2 + n2 n3 ) = Θ(m) edges. Once ut and v t arrive, we disconnect qt from rj iff vjt = 0. We have that if (ut )> M v t = 1, then d(qt , li ) = 2 for some i where ui = 1, otherwise d(s, li ) ≥ 4 for all i where ui = 1. So for each t, we need n1 queries, and hence n1 n3 = m2(1−δ) queries in total. Transitive Closure Lemma 4.7. Given an incremental (respectively decremental) dynamic algorithm A for δ transitive closure, one can solve ( 1−δ )-OuMv with parameters n1 , n2 , and n3 by running A on a graph with Θ(mδ + m1−δ ) vertices and Θ(m) edges which is initially empty (respectively initially has Θ(m) edges), and then making m2(1−δ) queries, where m is such that n1 = m1−δ , n2 = mδ and n3 = m1−δ . δ Proof. Given an input matrix M of ( 1−δ )-OuMv, we construct a directed graph GM where the edges are directed from R to L, and another set of vertices Q = {q1 , . . . , qn3 }. Add the directed edge (qt , rj ) for all j ≤ n2 , t ≤ n3 . There are Θ(n1 + n2 + n3 ) = Θ(mδ + m1−δ ) vertices and Θ(n1 n2 + n2 n3 ) = Θ(m) edges. Once ut and v t arrive, we disconnect qt from rj iff vjt = 0. We have that (ut )> M v t = 1 iff qt can reach li for some i where ui = 1. So for each t, we need n1 queries, and hence n1 n3 = m2(1−δ) queries in total. Corollary 4.8. For any n, m = Θ(n1/(1−δ) }) and constant δ ∈ (0, 1/2], Conjecture 1.1 implies that there is no partially dynamic algorithm for the problems listed below for a graph with n vertices and at most m edges with preprocessing time p(m) = poly(m), total update time u(m) = õ˜(mn), and query time q(m) = õ˜(mδ ) per query that has an error probability of at most 1/3. The problems are: • ss-SP • ap-SP (2 vs. 4) • Transitive Closure Proof. Suppose there is such an algorithm A for any problem in the list. By Lemmas 4.5 δ to 4.7, we construct an algorithm B for ( 1−δ )-OuMv with parameters n1 = m1−δ , n2 = mδ , 1−δ and n3 = m by running A on a graph with n0 = Θ(mδ + m1−δ ) = Θ(m1−δ ) vertices and 1/(1−δ) m0 = Θ(m) edges. Note that m0 = Θ(n0 ). Since A uses polynomial preprocessing time, 2−δ ˜ ˜ total update time õ(mn) = õ(m ) and total query time O(m2(1−δ) q(m)) = õ˜(m2−δ ), B has polynomial preprocessing time and õ˜(m2−δ ) computation time contradicting Conjecture 1.1 by Theorem 2.7. 37 5 Further Discussions 5.1 Multiphase Problem The multiphase problem is introduced in [Pat10] as a problem which can easily provide hardness for various dynamic problems. Though, the lower bounds obtained are always worst-case time lower bounds. In this section, we first prove that the OMv conjecture implies a tight lower bound for this problem. Then, we show a general approach for getting amortized lower bounds using the known reductions from the multiphase problem. Definition 5.1 (Multiphase Problem). The multiphase problem with parameters n1 , n2 is a problem with 3 phases. Phase 1: Preprocess a Boolean matrix M of size n1 × n2 in time O(n1 n2 τ ). Phase 2: Get an n2 -dimensional vector v and spend time O(n2 τ ). Phase 3: Given an index i, answer if (M v)i = 1 in time O(τ ). We call τ the update time. We note that the equivalent problem definition described in [Pat10] uses a family of sets and a set instead of a matrix and a vector. Assuming that there is no truly subquadratic 3SUM algorithm, Pǎtraşcu [Pat10] showed that one cannot solve multiphase with parameters ˜√ n1 , n2 when n1 = n2.5 2 and τ = õ( n2 ). Based on OMv, we can easily prove a better a lower bound for τ . Lemma 5.2. For any γ > 0, given an algorithm for multiphase problem with parameters n1 , n2 and τ update time, one can solve γ-OMv with parameters n1 , n2 , n3 in time O((n1 n2 + n2 n3 + n1 n3 )τ ). Proof. Given a matrix M of n1 × n2 , we run Phase 1 of the multiphase algorithm in time O(n1 n2 τ ). For every v t , 1 ≤ t ≤ n3 , we run n3 many instances of Phase 2 in time n3 ×O(n2 τ ). To compute M v t , we run n1 n3 many instances of Phase 3 in time n1 n3 × O(τ ). Corollary 5.3. For any n1 , n2 , Conjecture 1.1 implies that there is no algorithm A for the multiphase problem with parameters n1 , n2 such that τ = õ˜(min{n1 , n2 }). Proof. Suppose there is such an algorithm A. Then, by Lemma 5.2 and setting n3 = min{n1 , n2 }, one can solve γ-OMv with parameters n1 , n2 , n3 in time O(n1 n2 + n2 n3 + n1 n3 ) × õ˜(min{n1 , n2 }). Assume w.l.o.g. that n1 ≤ n2 then we get the expression O(n1 n2 + n21 ) × õ˜(n1 ) = õ˜(n21 n2 ) = õ˜(n1 n2 n3 ), which contradicts Conjecture 1.1 by Theorem 2.2. 5.1.1 Converting Worst-case Bounds to Amortized Bounds In the following, let A be a fully dynamic algorithm that maintains some object G, e.g., a graph, a matrix, an array etc. Similar to Lemma 5.2, by running many instances of phase 2 and 3 of the multiphase algorithm, we have the following. Lemma 5.4. For any constant γ > 0, suppose that one can solve the multiphase problem with parameters n1 , n2 by running A on G of size s(n1 , n2 ) using p(n1 , n2 ) preprocessing time, and then making ki updates/queries on phase i, for i ∈ 2, 3. Then one can solve γ-OMv problems with parameters n1 , n2 , n3 by running A on G using p(n1 , n2 ) preprocessing time, and then using O(k2 n3 + k3 n1 n3 ) updates/queries. 38 Corollary 5.5. Suppose that one can solve the multiphase problem with parameters n1 , n2 , where n1 = nγ2 , by running A on G of size s(n1 , n2 ) using poly(n1 , n2 ) preprocessing time, and then using ki updates/queries on phase i, for i ∈ 2, 3. Then Conjecture 1.1 implies that A cannot maintain an object G of size s(n1 , n2 ) with polynomial preprocessing time and õ˜(min{ nk1 n2 2 , nk32 }) amortized update and query time. Proof. Suppose that A has such an amortized update/query time. Then, by Lemma 5.4, one can solve γ-OMv with parameters n1 , n2 , n3 using poly(n1 , n2 ) preprocessing time, and computation time õ˜(min{ nk1 n2 2 , nk32 } × O(k2 n3 + k3 n1 n3 ) = õ˜(n1 n2 n3 ). This contradicts Conjecture 1.1 by Theorem 2.2. Example. It is shown in [Pat10] that, given a fully dynamic algorithm A for subgraph connectivity that runs on a graph with O(n1 + n2 ) vertices, the multiphase problem with parameters n1 , n2 can be solved using k2 = n2 operations in phase 2 and k3 = 1 operations in phase 3. By Corollary 5.5 and by setting n1 = n2 = n, the amortized cost of A on a graph with Θ(n) vertices cannot be õ˜(n) unless the OMv conjecture fails. Note however that this lower bound is subsumed by the one we give in Corollary 3.4. 5.2 Open Problems Of course it is very interesting to settle the OMv conjecture. Besides this, there are still many problems for which this work does not provide tight lower bounds, and it is interesting to prove such lower bounds based on the OMv or other reasonable conjectures. Minimum Cut. Thorup and Karger [Tho00] presented a (2 + o(1))-approximation algo√ rithm with polylogarithmic amortized update time. Thorup [Tho07] showed that in Õ( n) worst-case update time the minimum cut can be maintained exactly when the minimum cut size is small and (1 + )-approximately otherwise. Improving this result using amortization is mentioned as a major open problem in [Tho07]. Very recently Fakcharoenphol et al. [FKN+ 14] showed some related hardness results (e.g., for some subroutine used in Thorup’s algorithm). However, currently there is no evidence that the minimum cut cannot be maintained in polylogarithmic update time. In fact, it is not even known if polylogarithmic update time is possible or impossible for a key subroutine in Thorup’s algorithm called min-tree cut, where we are given edge updates on a graph and its spanning tree and have to maintain the minimum cut among the cuts obtained by removing one edge from the spanning tree. We believe that understanding this subroutine is an important step in understanding the dynamic minimum cut problem. Approximation Algorithms for Non-Distance Problems. In this paper we provide hardness results for several approximation algorithms for distance-related problems. However, we could not extend the techniques to non-distance graph problems in undirected graphs such as approximating maximum matching, minimum cut, maximum flow, and maximum densest subgraph. Total Update Time for Partially Dynamic Algorithms. While there are many hardness results in the partially dynamic setting in this and previous work, quite a few 39 problems are still open. Of particular interest are problems that are known to be easy when one type of updates is allowed but become challenging when the other type of updates is allowed. For example, the single-source reachability problem can be solved in O(m) total update time in the incremental setting [Ita86] but the best time in the decremental setting is still larger than mn0.9 (e.g., [HKN14b, HKN15]). This is also the case for the minimum cut problem where the incremental setting can be (1 + )-approximated in Õ(m) total update time [RH97] while the current best decremental (1 + )-approximation algorithm requires √ Õ(m + n n) total update time [Tho07], and the topological ordering problem which is trivial in the decremental setting but challenging otherwise (e.g., [HKM+ 12, BFG09]). Since known hardness techniques – including those presented in this paper – usually work for both the incremental and the decremental setting, proving non-trivial hardness results for the above problems seems to be challenging. Worst-Case Update Time. While there are fully dynamic algorithms with polylogarithmic amortized update time for many problems, not much is known for worst-case update time. The only exception that we are aware of is the connectivity problem (due to the recent breakthrough of Kapron et al. [KKM13]). Other basic graph problems, such as minimum spanning tree, 2-edge connectivity, biconnectivity, maximum matching, and densest subgraph are not known to have polylogarithmic worst-case update time. A polynomial hardness result for worst-case update time for these problems based on a natural assumption will be very interesting. The challenge in obtaining this is that such a result must hold only for the worst-case update time and not for the amortized one. Such results were published previously (e.g., those in [AVW14, Pat10, KPP16]), but most of these results are now known to hold for amortized update time as well assuming OMv and SETH (some exceptions are those for partially dynamic problems). Deterministic Algorithms. Derandomizing the current best randomized algorithms is an important question for many problems, e.g., approximate decremental single-source and all-pairs shortest paths [Ber13, HKN14a] and worst-case connectivity and spanning tree [KKM13]. This is important since deterministic algorithms do not have to limit the power of the adversary generating the sequence of updates and queries. Proving that derandomization is impossible for some problems will be very interesting. The challenge is that such hardness results must hold only for deterministic algorithm and not for randomized algorithms. Trade-off between Query and Update Time In this paper we present hardness results with a trade-off between query and update time for several problems. Are these hardness results tight? This seems to be a non-trivial question since not much is known about the upper bounds for these problems. A problem for which it is particularly interesting to study this question is the subgraph connectivity problem, since it is the starting point of many reductions that lead to hardness results with a trade-off. In this paper, we show that for any 0 < α < 1 getting an O(mα ) update time requires a query time of Ω(m1−α ). This matches two known upper bounds in [Dua10, CPR11] when α = 4/5 and α = 2/3. It is reasonable to conjecture that there is a matching upper bound for all 0 < α < 1; however, it is not clear if this is true or not. 40 6 Acknowledgement D. Nanongkai would like to thank Parinya Chalermsoomsook, Bundit Laekhanukit, and Virginia Vassilevska Williams for comments. T. Saranurak would like to thank Markus Bläser and Gorav Jindal for discussions. References [AVW14] Amir Abboud and Virginia Vassilevska Williams. “Popular conjectures imply strong lower bounds for dynamic problems”. In: Symposium on Foundations of Computer Science (FOCS). 2014, pp. 434–443 (cit. on pp. 3, 4, 6–10, 19, 21–23, 40, 45). [BDH+ 12] Grey Ballard, James Demmel, Olga Holtz, and Oded Schwartz. “Graph Expansion and Communication Costs of Fast Matrix Multiplication”. In: Journal of the ACM 59.6 (2012), 32:1–32:23 (cit. on pp. 1, 3, 8). [Ber13] Aaron Bernstein. “Maintaining Shortest Paths Under Deletions in Weighted Directed Graphs”. In: Symposium on Theory of Computing (STOC). 2013, pp. 725–734 (cit. on pp. 7, 35, 40). [BFG09] Michael A. Bender, Jeremy T. Fineman, and Seth Gilbert. “A New Approach to Incremental Topological Ordering”. In: Symposium on Discrete Algorithms (SODA). 2009, pp. 1108–1115 (cit. on p. 40). [BHN+ 15] Sayan Bhattacharya, Monika Henzinger, Danupon Nanongkai, and Charalampos E. Tsourakakis. “Space- and Time-Efficient Algorithm for Maintaining Dense Subgraphs on One-Pass Dynamic Streams”. In: Symposium on Theory of Computing (STOC). 2015, pp. 173–182 (cit. on p. 4). [BKM95] Julien Basch, Sanjeev Khanna, and Rajeev Motwani. On Diameter Verification and Boolean Matrix Multiplication. Tech. rep. Stanford University, 1995 (cit. on p. 8). [Blä14] Markus Bläser. “Lower Bounds for Online Matrix-Vector Multiplication”. Manuscript. 2014 (cit. on p. 3). [BVW08] Guy E. Blelloch, Virginia Vassilevska, and Ryan Williams. “A New Combinatorial Approach for Sparse Graph Problems”. In: International Colloquium on Automata, Languages and Programming (ICALP). 2008, pp. 108–120 (cit. on p. 8). [BW12] Nikhil Bansal and Ryan Williams. “Regularity Lemmas and Combinatorial Algorithms”. In: Theory of Computing 8.1 (2012). Announced at FOCS’09, pp. 69–94 (cit. on pp. 8, 9, 17, 18). [Che12] Shiri Chechik. “Improved Distance Oracles and Spanners for Vertex-Labeled Graphs”. In: European Symposium on Algorithms (ESA). 2012, pp. 325–336 (cit. on pp. 4, 11, 20, 24). [CPR11] Timothy M. Chan, Mihai Patrascu, and Liam Roditty. “Dynamic Connectivity: Connecting to Networks and Geometry”. In: SIAM Journal on Computing 40.2 (2011). Announced at FOCS’08, pp. 333–349 (cit. on pp. 6, 20, 40). 41 [DHZ00] Dorit Dor, Shay Halperin, and Uri Zwick. “All-Pairs Almost Shortest Paths”. In: SIAM Journal on Computing 29.5 (2000). Announced at FOCS’96, pp. 1740– 1759 (cit. on pp. 3, 7, 8, 34). [DP10] Ran Duan and Seth Pettie. “Connectivity Oracles for Failure Prone Graphs”. In: Symposium on Theory of Computing (STOC). 2010, pp. 465–474 (cit. on pp. 11, 20, 26). [Dua10] Ran Duan. “New Data Structures for Subgraph Connectivity”. In: International Colloquium on Automata, Languages and Programming (ICALP). 2010, pp. 201– 212 (cit. on pp. 6, 20, 40). [ES81] Shimon Even and Yossi Shiloach. “An On-Line Edge-Deletion Problem”. In: Journal of the ACM 28.1 (1981), pp. 1–4 (cit. on pp. 7, 35). [FHW12] Silvio Frischknecht, Stephan Holzer, and Roger Wattenhofer. “Networks Cannot Compute Their Diameter in Sublinear Time”. In: Symposium on Discrete Algorithms (SODA). 2012, pp. 1150–1162 (cit. on p. 29). [FI00] Daniele Frigioni and Giuseppe F. Italiano. “Dynamically Switching Vertices in Planar Graphs”. In: Algorithmica 28.1 (2000), pp. 76–103 (cit. on p. 6). [FKN+ 14] Jittat Fakcharoenphol, Tanee Kumpijit, Danupon Nanongkai, Thatchaphol Saranurak, and Pattara Sukprasert. “Fully-Dynamic Minimum Cut on Plane Graphs in Poylogarithmic Time”. Manuscript. 2014 (cit. on pp. 4, 6, 39). [Gal12] François Le Gall. “Faster Algorithms for Rectangular Matrix Multiplication”. In: Symposium on Foundations of Computer Science (FOCS). 2012, pp. 514–523 (cit. on p. 8). [Gal14] François Le Gall. “Powers of Tensors and Fast Matrix Multiplication”. In: International Symposium on Symbolic and Algebraic Computation (ISSAC). 2014, pp. 296–303 (cit. on p. 8). [HKM+ 12] Bernhard Haeupler, Telikepalli Kavitha, Rogers Mathew, Siddhartha Sen, and Robert Endre Tarjan. “Incremental Cycle Detection, Topological Ordering, and Strong Component Maintenance”. In: ACM Transactions on Algorithms 8.1 (2012). Announced at ICALP’08, p. 3 (cit. on p. 40). [HKN13] Monika Henzinger, Sebastian Krinninger, and Danupon Nanongkai. “Dynamic Approximate All-Pairs Shortest Paths: Breaking the O(mn) Barrier and Derandomization”. In: Symposium on Foundations of Computer Science (FOCS). 2013, pp. 538–547 (cit. on pp. 3, 8, 35). [HKN14a] Monika Henzinger, Sebastian Krinninger, and Danupon Nanongkai. “Decremental Single-Source Shortest Paths on Undirected Graphs in Near-Linear Total Update Time”. In: Symposium on Foundations of Computer Science (FOCS). 2014, pp. 146–155 (cit. on pp. 7, 35, 40). [HKN14b] Monika Henzinger, Sebastian Krinninger, and Danupon Nanongkai. “SublinearTime Decremental Algorithms for Single-Source Reachability and Shortest Paths on Directed Graphs”. In: Symposium on Theory of Computing (STOC). 2014, pp. 674–683 (cit. on p. 40). 42 [HKN15] Monika Henzinger, Sebastian Krinninger, and Danupon Nanongkai. “Improved Algorithms for Decremental Single-Source Reachability on Directed Graphs”. In: International Colloquium on Automata, Languages and Programming (ICALP). 2015, pp. 725–736 (cit. on p. 40). [HLW+ 11] Danny Hermelin, Avivit Levy, Oren Weimann, and Raphael Yuster. “Distance Oracles for Vertex-Labeled Graphs”. In: International Colloquium on Automata, Languages and Programming (ICALP). 2011, pp. 490–501 (cit. on pp. 4, 20, 24). [Ita86] Giuseppe F. Italiano. “Amortized Efficiency of a Path Retrieval Data Structure”. In: Theoretical Computer Science 48.3 (1986), pp. 273–281 (cit. on p. 40). [KKM13] Bruce M. Kapron, Valerie King, and Ben Mountjoy. “Dynamic graph connectivity in polylogarithmic worst case time”. In: Symposium on Discrete Algorithms (SODA). 2013, pp. 1131–1142 (cit. on pp. 6, 7, 20, 40). [KPP16] Tsvi Kopelowitz, Seth Pettie, and Ely Porat. “Higher Lower Bounds from the 3SUM Conjecture”. In: Symposium on Discrete Algorithms (SODA). 2016, to appear (cit. on pp. 4, 21, 34, 40). [Lac13] Jakub Łącki. “Improved Deterministic Algorithms for Decremental Reachability and Strongly Connected Components”. In: ACM Transactions on Algorithms 9.3 (2013). Announced at SODA’11, p. 27 (cit. on p. 35). [LOP+ 15] Jakub Łącki, Jakub Oćwieja, Marcin Pilipczuk, Piotr Sankowski, and Anna Zych. “The Power of Dynamic Distance Oracles: Efficient Dynamic Algorithms for the Steiner Tree”. In: Symposium on Theory of Computing (STOC). 2015, pp. 11–20 (cit. on pp. 4, 6, 11, 20, 25). [LZ09] Edo Liberty and Steven W. Zucker. “The Mailman algorithm: A note on matrixvector multiplication”. In: Information Processing Letters 109.3 (2009), pp. 179– 182 (cit. on p. 3). [Mot55] Theodore S. Motzkin. “Evaluation of polynomials and evaluation of rational functions”. In: Bulletin of the AMS 61.163 (1955), p. 10 (cit. on p. 3). [Mąd11] Aleksander Mądry. “From Graphs to Matrices, and Back: New Techniques for Graph Algorithms”. PhD thesis. Massachusetts Institute of Technology, 2011 (cit. on p. 24). [Pan01] Victor Y. Pan. Structured Matrices and Polynomials: Unified Superfast Algorithms. New York, NY, USA: Springer-Verlag New York, Inc., 2001. isbn: 0-8176-4240-4 (cit. on p. 3). [Pat10] Mihai Patrascu. “Towards Polynomial Lower Bounds for Dynamic Problems”. In: Symposium on Theory of Computing (STOC). 2010, pp. 603–610 (cit. on pp. 4, 6, 9, 22, 27, 38–40). [RH97] Monika Rauch Henzinger. “A Static 2-Approximation Algorithm for Vertex Connectivity and Incremental Approximation Algorithms for Edge and Vertex Connectivity”. In: Journal of Algorithms 24.1 (1997), pp. 194–220 (cit. on p. 40). 43 [RT13] Liam Roditty and Roei Tov. “Approximating the Girth”. In: ACM Transactions on Algorithms 9.2 (2013). Announced at SODA’11, 15:1–15:13 (cit. on pp. 3, 8). [RZ11] Liam Roditty and Uri Zwick. “On Dynamic Shortest Paths Problems”. In: Algorithmica 61.2 (2011). Announced at ESA’04, pp. 389–401 (cit. on pp. 7, 34). [RZ12] Liam Roditty and Uri Zwick. “Dynamic Approximate All-Pairs Shortest Paths in Undirected Graphs”. In: SIAM Journal on Computing 41.3 (2012). Announced at FOCS’04, pp. 670–683 (cit. on pp. 7, 35). [San04] Piotr Sankowski. “Dynamic Transitive Closure via Dynamic Matrix Inverse”. In: Symposium on Foundations of Computer Science (FOCS). 2004, pp. 509–517 (cit. on pp. 4, 7, 8). [San05a] Piotr Sankowski. “Shortest Paths in Matrix Multiplication Time”. In: Algorithms - ESA 2005, 13th Annual European Symposium, Proceedings. 2005, pp. 770–778 (cit. on p. 7). [San05b] Piotr Sankowski. “Subquadratic Algorithm for Dynamic Shortest Distances”. In: International Computing and Combinatorics Conference (COCOON). 2005, pp. 461–470 (cit. on p. 7). [San07] Piotr Sankowski. “Faster Dynamic Matchings and Vertex Connectivity”. In: Symposium on Discrete Algorithms (SODA). 2007, pp. 118–126 (cit. on p. 8). [Sav74] John E. Savage. “An Algorithm for the Computation of Linear Forms”. In: SIAM Journal on Computing 3.2 (1974), pp. 150–158 (cit. on p. 3). [Sto10] Andrew James Stothers. “On the Complexity of Matrix Multiplication”. PhD thesis. The University of Edinburgh, 2010 (cit. on p. 9). [Str69] Volker Strassen. “Gaussian Elimination is not Optimal.” In: Numerische Mathematik 13 (1969), pp. 354–356 (cit. on p. 8). [SU86] Nicola Santoro and Jorge Urrutia. “An Improved Algorithm for Boolean Matrix Multiplication”. In: Computing 36.4 (1986), pp. 375–382 (cit. on p. 3). [Tho00] Mikkel Thorup. “Dynamic Graph Algorithms with Applications”. In: Scandinavian Workshop on Algorithm Theory (SWAT). 2000, pp. 1–9 (cit. on p. 39). [Tho07] Mikkel Thorup. “Fully-Dynamic Min-Cut”. In: Combinatorica 27.1 (2007). Announced at STOC’01, pp. 91–127 (cit. on pp. 39, 40). [VW12] Virginia Vassilevska Williams. “Multiplying Matrices Faster Than CoppersmithWinograd”. In: Symposium on Theory of Computing (STOC). 2012 (cit. on p. 9). [VWW10] Virginia Vassilevska Williams and Ryan Williams. “Subcubic Equivalences between Path, Matrix and Triangle Problems”. In: Symposium on Foundations of Computer Science (FOCS). 2010, pp. 645–654 (cit. on pp. 3, 8, 15). [Wil07] Ryan Williams. “Matrix-Vector Multiplication in Sub-Quadratic Time: (Some Preprocessing Required)”. In: SODA. 2007, pp. 995–1001 (cit. on pp. 1, 3, 17). 44 Appendix A Conjectures (from [AVW14]) Conjecture A.1 (No truly subquadratic 3SUM (3SUM)). In the Word RAM model with words of O(log n) bits, any algorithm requires n2−o(1) time in expectation to determine whether a set S ⊂ {−n3 , . . . , n3 } of |S| = n integers contains three distinct elements a, b, c ∈ S with a + b = c. Conjecture A.2 (No truly subcubic APSP (APSP)). There is a constant c, such that in the Word RAM model with words of O(log n) bits, any algorithm requires n3−o(1) time in expectation to compute the distances between every pair of vertices in an n node graph with edge weights in {1, ..., nc }. Conjecture A.3 (Strong Exponential Time Hypothesis (SETH)). For every  > 0, there exists a k, such that SAT on k-CNF formulas on n variables cannot be solved in O∗ (2(1−)n ) time, where O∗ (·) hides polynomial factor. Conjecture A.4 (No almost linear time triangle (Triangle)). There is a constant δ > 0, such that in the Word RAM model with words of O(log n) bits, any algorithm requires m1+δ−o(1) time in expectation to detect whether an m edge graph contains a triangle. Conjecture A.5 (No truly subcubic combinatorial BMM (BMM)). In the Word RAM model with words of O(log n) bits, any combinatorial algorithm requires n3−o(1) time in expectation to compute the Boolean product of two n × n matrices. 45
8cs.DS
A binary differential evolution algorithm learning from explored solutions Yu Chena,b,∗, Weicheng Xieb , Xiufen Zoub a School b School of Science, Wuhan University of Technology, Wuhan, 430070, China of Mathematics and Statistics, Wuhan University, Wuhan, 430072, China arXiv:1401.1124v2 [cs.NE] 10 May 2014 Abstract Although real-coded differential evolution (DE) algorithms can perform well on continuous optimization problems (CoOPs), it is still a challenging task to design an efficient binary-coded DE algorithm. Inspired by the learning mechanism of particle swarm optimization (PSO) algorithms, we propose a binary learning differential evolution (BLDE) algorithm that can efficiently locate the global optimal solutions by learning from the last population. Then, we theoretically prove the global convergence of BLDE, and compare it with some existing binary-coded evolutionary algorithms (EAs) via numerical experiments. Numerical results show that BLDE is competitive to the compared EAs, and meanwhile, further study is performed via the change curves of a renewal metric and a refinement metric to investigate why BLDE cannot outperform some compared EAs for several selected benchmark problems. Finally, we employ BLDE solving the unit commitment problem (UCP) in power systems to show its applicability in practical problems. Keywords: Binary differential evolution algorithm, Convergence in probability, Renewal metric, Refinement metric. 1. Introduction 1.1. Background Differential evolution (DE) [26], a competitive evolutionary algorithm emerging more than a decade ago, has been widely utilized in the science and engineering fields [24, 4]. The simple and straightforward evolving mechanisms of DE endow it with powerful capability of solving continuous optimization problems (CoOPs), however, hamper its applications on discrete optimization problems (DOPs). To take full advantage of the superiority of mutations in classic DE algorithms, Pampará and Engelbrecht [21] introduced a trigonometric generating function to transform the real-coded individuals of DE into binary strings, and proposed an angle modulated differential evolution (AMDE) algorithm for DOPs. Compared with the binary differential evolution (BDE) algorithms that directly manipulate binary strings, AMDE was much slower but outperformed BDE algorithmsx with respect to accuracy of the obtained solutions [7]. Meanwhile, Gong and Tuson proposed a binary DE algorithm by forma analysis [9], but it cannot perform well on binary constraint satisfaction problems due to its weak exploration ability [32]. Trying to simulate the operation mode of the continuous DE mutation, Kashan et al. [14] design a dissimilarity based differential evolution (DisDE) algorithm incorporating a measure of dissimilarity in mutation. Numerical results show that DisDE is competitive to some existing binary-coded evolutionary algorithms (EAs). Moreover, the performances of BDE algorithms can also be improved by incorporating recombination operators of other EAs. Hota and Pat [12] proposed an adaptive quantum-inspired differential evolution algorithm (AQDE) applying quantum computing techniques, while He and Han [10] introduced the negative selection in artificial immune systems to obtain an artificial immune system based differential evolution (AIS-DE) algorithm. With respect to the fact that the logical operations introduced in AIS-DE tends to produce “1” bits with increasing probability, Wu and Tseng [30] proposed an modified binary differential evolution strategy to improve the performance of BDE algorithms on topology optimization of structures. ∗ Corresponding author. Tel:86-27-87108027 Email address: [email protected] (Yu Chen) Preprint submitted to Elsevier May 13, 2014 1.2. Motivation and Contribution Existing researches tried to incorporate the recombination strategies of various EAs to get efficient BDEs for DOPs, whereas there are still some points to be improved: • AMDE [21] has to transform real values to binary strings, which leads to the explosion of computation cost for function evaluations. Meanwhile, the mathematical properties of the transformation function can also influence its performances on various DOPs; • BDE algorithms directly manipulating bit-strings, such as binDE [9], AIS-DE [10] and MBDE [30], etc., cannot effectively imitate the mutation mechanism of continuous DE algorithms. Thus, they cannot perform well on high-dimensional DOPs due to their weak exploration abilities; • DisDE [14], which incorporates a dissimilarity metric in the mutation operator, has to solve a minimization problem during the mutation process. As a consequence, the computation complexity of DisDE is considerably high. Generally, it is a challenging task to design an efficient BDE algorithm perfectly addressing the aforementioned points. Recently, variants of the particle swarm optimization (PSO) algorithm [15] have been successfully utilized in real applications [6, 1, 23, 2, 17]. Although DE algorithms perform better than PSO algorithms in some real world applications [28, 25, 22], it is still promising to improve DE by incorporating PSO in the evolving process [3, 18, 19]. Considering that the learning mechanism of PSO can accelerate the convergence of populations, we propose a hybrid binary-coded evolutionary algorithm learning from the last population, named as the binary learning differential evolution (BLDE) algorithm. In BLDE, the searching process of population is guided by the renewed information of individuals, the dissimilarity between individuals and the best explored solution in the population. By this means, BLDE can performance well on DOPs. The remainder of the paper is structured as follows. Section 2 presents a description of BLDE, and its global convergence is theoretically proved in Section 3. Then, in Section 4 BLDE is compared with some existing algorithms by numerical results. To test performance of BLDE on real-life problems, we employ it to solve the unit commitment problem (UCP) in Section 5. Finally, discussions and conclusions are presented in Section 6. 2. The binary learning differential evolution algorithm 2.1. Framework of the binary learning differential evolution algorithm For a binary maximization problem (BOP) 1 max x∈S f (x) = f (x1 , . . . , xn ), S ⊂ {0, 1}n , (1) the BLDE algorithm illustrated by Algorithm 1 possesses two collections of µ solutions, the population X(t) and the archive A(t) . At the first generation, the population X(1) and the archive A(1) are generated randomly. Then, repeat the following operations until the stopping criterion is satisfied. For each individual w ∈ X(t) a trial solution is generated by three randomly selected individuals x, y ∈ X(t) and z ∈ A(t) . At first, initialize the trial individual tx = {tx1 , . . . , txn } as the winner of two individuals y ∈ X(t) and z ∈ A(t) . ∀ j ∈ {1, 2, . . . , n}, if y and z coincide on the jth bit, the jth bit of tx is changed as follows. • If the jth bit of x differs from that of xgb , tx j is set to be xgb, j , the jth bit of xgb ; • otherwise, tx j is randomly mutated with a preset probability p. Then, replace w with tx if f (tx) ≥ f (w). After the update of population X(t) is completed, set t = t+1 and A(t) = X(t−1) . 1 When a CoOP is considered, the real-value variables can be coded as bit-strings, and consequently, a binary optimization problem is constructed to be solved by binary-coded evolutionary algorithms. 2 Algorithm 1 The binary learning differential evolution (BLDE) algorithm 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: Randomly generate two populations X(1) and A(1) of µ individuals; Set t := 1; while the stop criterion is no satisfied do Let xgb = (xgb,1 , . . . , xgb,n ) , arg max{ f (x)}; x∈X(t) for all w ∈ X(t) do Randomly select x = (x1 , . . . , xn ) and y = (y1 , . . . , yn ) from X(t) , as well as z = (z1 , . . . , zn ) from A(t) ; tx = (tx1 , . . . , txn ) , arg max{ f (y), f (z)}; for j = 1, 2, · · · , n do if y j = z j then if xgb, j , x j then tx j = xgb, j ; else if rand(0,  1) ≤ p then 1    with probability ; 0 2 tx j =    1 otherwise. end if end if end if end for if f (tx) ≥ f (w) then w = tx; end if end for t := t + 1; A(t) = X(t−1) ; end while 2.2. The positive functions of the learning scheme Generally speaking, the trial solution tx is generated by three randomly selected individuals. Meanwhile, it also incorporates conditional learning strategies in the mutation process. • By randomly selecting y ∈ X(t) , BLDE can learn from any member in the present population. Because the elitism strategy is employed in the BLDE algorithm, BLDE could learn from any pbest solution in the population, unlike that particles in PSO can only learn from their own pbest individuals. • By randomly selecting z ∈ A(t) , BLDE can learn from any member in the last population. At the early stage of the iteration process, individuals in the population X(t) are usually different with those in A(t) = X(t−1) . Combined with the first strategy, this scheme actually enhances the exploration ability of the population, and to some extent, accelerates convergence of the population. • When bits of y coincide with the corresponding bits of z, trial solutions learn from the gbest on condition that randomly selected x ∈ X(t) differs from xgb on the these bits. This scheme imitates the learning strategy of PSO, and meanwhile, can also prevent the population from being governed by dominating patterns, because the increase of probability P{xgb, j = x j } will lead to the random mutation performed on tx, preventing the duplicate of the dominating patterns in the population. In PSO algorithms, each particle learns from the pbest (the best solution it has obtained so far) and the gbest (the best solution the swarm has obtained so far), and particles in the swarm only exchange information via the gbest solution. The simple and unconditional learning strategy of PSO usually results in its fast convergence rate, however, sometimes leads to its premature convergence to local optima. The BLDE algorithm learning from X(t) as well as 3 A(t) can explore the feasible region in a better way, and meanwhile, by conditionally learning from xgb it will not be attracted by local optimal solutions. 3. Convergence analysis of BLDE Denote x∗ to be an optimal solution of BOP (1), the global convergence of BLDE can be defined as follows. Definition 1. Let {X(t) , t = 1, 2, dots} be the population sequence of BLDE. It is said to converge in probability to the optimal solution x∗ of BOP (1), if it holds that lim P{x∗ ∈ X(t) } = 1. t→∞ To confirm the global convergence of the proposed BLDE algorithm, we first show that any feasible solution can be generated with a positive probability. Lemma 1. In two generations, BLDE can generate any feasible solution of BOP (1) with a probability greater than or equal to a positive constant c. (t) (t) (t) th (t) (t) (t) Proof: Denote x(t) (i) = (x(t) 1 (i), . . . , xn (i)) and a (i) = (a1 (i), . . . , an (i)) to be the i individuals of X and A , (t) (t) respectively. Let tx(t) (i) = (tx1 (i), . . . , txn (i)) be the ith trial individual generated at the tth generation. There are two different cases to be investigated. 1. If X(t) and A(t) include at least one common individual, the probability P{y = z} is greater than or equal to 1 , where y ∈ X(t) and z ∈ A(t) are selected randomly from X(t) and A(t) , respectively. Then, the random µ2 mutation illustrated by Lines 12 - 14 of Algorithm 1 will be activated with probability µ1 , which is the minimum (t) probability of selecting x to be x(t) gb , the best individual in the present population X . For this case, both p P{tx j = 0} and P{tx j = 1} are greater than or equal to 2µ3 . Then, any feasible solution can be generated with a  n positive probability greater than or equal to 2µp3 . 2. If all individuals in X(t) differ from those in A(t) , two different solutions y ∈ X(t) and z ∈ A(t) are located at the same index i0 with probability 1 P{y = x(t) (i0 ), z = a(t) (i0 )} = 2 . µ Since y , z, I1 = { j; y j , z j } is not empty. Moreover, the elitism update strategy ensure that the trial individual tx(t) (i0 ) is initialized to be tx(t) (i0 ) = y. Then, (t) tx(t) j (i0 ) = y j = x j (i0 ), ∀ j ∈ I1 , and ∀ j < I1 , tx(t) (i0 ) will keep unchanged with a probability greater than 1−p µ , the probability of selecting x = xgb and not activating the mutation illustrated by Lines 12-14 of Algorithm 1. That is to say, the probability of generating a trial individual tx(t) (i0 ) = y = x(t) (i0 ) is greater than or equal to 1−p . µ3 th For this case, the ith individual of the population will keep unchanged at the t generation, and at the next gener0 ation (generation t + 1), x(t+1) (i0 ) will coincide with a(t+1) (i0 ). Then, it comes to the first case, and consequently, (t+1) the (i) can reach any feasible solution with a positive probability greater than or equal to  p trial n individual tx p n . For this case, any feasible solution can be generated with a probability greater than 1−p . 2µ3 µ3 2µ3 In conclusion, in two generations the trial individual will reach any feasible solution with a probability greater than  p tx n 1−p or equal to a positive constant c, where c = µ3 2µ3 . Theorem 1. BLDE converges in probability to the optimal solution x∗ of OP (1). 4 Proof: Lemma 1 shows that there exists a positive number c > 0 such that P{x∗ ∈ X(t+2) | x∗ < X(t) } ≥ c, ∀ t ≥ 1. Denoting P = P{x∗ ∈ X(t+2) | x∗ < X(t) }, we know that P{x∗ < X(t+2) |x∗ < X(t) } = 1 − P. Thus, P{x∗ ∈ X (t) } = 1 − P{x∗ < X (t) } = 1 − P{x∗ < X(t) |x∗ < X(t−2) }. If t is even, lim P{x∗ ∈ X (t) } = t→∞ 1 − lim P{x∗ < X (t) } t→∞ = 1 − lim (1 − p)t/2 P{x∗ < X(0) } = 1; t→∞ otherwise, lim P{x∗ ∈ X (t) } = t→∞ 1 − lim P{x∗ < X (t) } t→∞ = 1 − lim (1 − p)(t−1)/2 P{x∗ < X(1) } = 1. t→∞ In conclusion, BLDE converges in probability to the optimal solution x∗ of BOP (1). 4. Numerical experiments Although Theorem 1 validates the global convergence of the BLDE algorithm, its convergence characteristics have not been investigated. In this section, we try to show its competitiveness to existing algorithms by numerical experiments. 4.1. Benchmark problems Tab. 1 illustrates the selected benchmark problems, properties and settings of which are listed in Tab. 2. As for the continuous problems P3 − P7 , all real variables are coded by bit-strings. For the multiple knapsack problem (MKP) P8 , we test BLDE via five test instances characterized by data files “weing6.dat, sent02.dat, weish14.dat, weish22.dat and weish30.dat” [31], termed as P8−1 , P8−2 , P8−3 , P8−4 and P8−5 , respectively. When a candidate solution is evaluated, it 1+max p is penalized by PT (x) = mini, j wj i, ji · maxi {max j (wi, j x j − Wi ), 0} [27]. 4.2. Parameter settings For numerical comparisons, BLDE is compared with the angle modulated particle swarm optimization (AMPSO) [20], the angle modulated differential evolution (AMDE) [21], the dissimilarity artificial bee colony (DisABC) algorithm [13], the binary particle swarm optimization (BPSO) algorithm [16], the binary differential evolution (binDE) [9] algorithm and the self-adaptive quantum-inspired differential evolution (AQDE) algorithm[12]. As is suggested by the designers of the algorithms, the parameters of AMPSO, AMDE, DisABC, BPSO, binDE, and AQDE, are listed in Table 3. Prerun for BLDE shows that when the mutation ability p is less than 0.05, its weak exploration ability leads to its premature to the local optima of multi-modal problems; while when p is greater than min{0.15, 10/n}, it cannot efficiently exploit the local region of global optima. Thus, in this paper we set p = max{0.05 min{0.15, 10/n}} to keep a balance between exploration and exploitation. All compared algorithms are tested with a population of size 50, and the results are compared after 300 × n FEs, except that numerical results are compared after 300 × n × m function evaluations (FEs) for MKPs, where n is the bitstring length, m is the number of constraints for MKP. 5 Table 1: Descriptions of the selected benchmark problems. Problems P1 : Descriptions. max f1 (x) = n Q i P i=1 j=1 x j, x j ∈ {0, 1}, j = 1, . . . , n. P2 : Long Path Problem : Root2path [11] P3 : max f3 (x) = − max |xi |, P4 : max f4 (x) = P5 : max f5 (x) = P6 : max f6 (x) = P7 : max f7 (x) = P8 : max f8 (x) = xi ∈ [−10, 10], i = 1, . . . , D. i=1,...,m D D Q 1 P √ ) − 1, − 4000 (xi − 100)2 + cos( xi −100 xi ∈ [−300, 300], i = 1, . . . , D. i i=1 i=1 D P − ix4i − rand[0, 1), xi ∈ [−1.28, 1.28], i = 1, . . . , D. i=1 D−1 P − (100(xi+1 − x2i )2 + (1 − xi )2 ), xi ∈ [−2.048, 2.048], i = 1, . . . , D. i=1 r m m P P x2i ) + exp( m1 cos(2πxi )) − e, xi ∈ [−30, 30], i = −20 + 20 exp(−0.2 m1 i=1 i=1 n n P P max p j x j , s.t. wi, j x j ≤ Wi , i = 1, · · · , m, x j ∈ {0, 1}, j = 1, . . . , n. j=1 j=1 1, . . . , D. 4.3. Numerical comparisons Implemented by the MATLAB package, the compared algorithms are run on a PC with a INTEL(R) CORE(R) CPU, running at 2.8GHZ with 4 GB RAM. After 50 independent runs for each problem, the results are compared in Tab. 4 via the average best fitness (AveFit), the standard deviation of best fitness (StdDev), the success rate (SR) and the expected runtime (RunTime). Taking AveFit and StdDev as the sorting indexes, the overall ranks of the compared algorithms are list in Tab. 5. Numerical results in Tab. 4 show that BLDE is generally competitive to the compared algorithms for the selected benchmark problems, which is also illustrated by Tab. 5, where BLDE averagely ranks first for the benchmark problems. Meanwhile, because it contains no time-consuming operations, for most cases BLDE spends less CPU time for the selected benchmark problems. Considering that AveFit and StdDev are two overall statistical indexes of the numerical results, we also perform a Wilcoxon rank sum test [8] with a significance level of 0.05 to compare performances of the tested algorithms, and the results are listed in Tab. 6. The results of Wilcxon rank sum tests demonstrate that BPSO performs significantly better on P5 and P7 , the nosiy quadric problem and the maximization problem of Ackley’s function, respectively. Because BPSO imitates the evolving mechanisms of PSO by simultaneously changing all bits of the individuals, it can quickly converge to the global optimal solutions. However, BLDE sometimes mutates bit by bit, and consequently, its evolving process is more vulnerable to be influenced by noises and the multimodal landscapes of benchmark problems. Thus, BPSO also performs better than BLDE on P5 and P7 . For similar reasons, BPSO outperform BLDE on P8−1 , a low-dimensional MKP. Meanwhile, binDE obtains better results than BLDE on the low-dimensional MKPs P8−1 − P8−3 , but performs worse than BLDE on the other problems, which is attributed to the fact that the exploitation ability of binDE descend with the expansion of the searching space. Consequently, binDE cannot perform well on the high-dimensional problems. Similarly, AQDE, which is specially designed for Knapsack problems, only outperforms BLDE for the low-dimensional MKP P8−1 , and cannot perform better than BLDE for other selected benchmark problems. 4.4. Further comparison on the exploration and exploitation abilities To further explore the underlying causes resulting in BLDE performing worse than the BPSO, binDE and AQDE on several given test problems, we try to investigate how their exploration and exploitation abilities change during the evolving process. Thus, a renewal metric and a refinement metric are defined to respectively quantify the exploration and exploitation abilities. 6 Table 2: Properties and settings of the benchmark problems Problem Binary/Real Dimension Bit-length Constraints Maximum Objective Value P1 Binary 30 30 - 30 P2 Binary 29 29 - 49992 P3 Real 30 180 - 0 P4 Real 30 480 - 0 P5 Real 30 240 - 0 P6 Real 30 300 - 0 P7 Real 30 300 - 0 P8−1 Binary 28 28 2 130623 P8−2 Binary 60 60 30 8722 P8−3 Binary 60 60 5 6954 P8−4 Binary 80 80 5 8947 P8−5 Binary 90 90 5 11191 Table 3: Parameter settings for the tested algorithms Algorithm Parameter settings AMPSO c1 = 1.496180, c2 = 1.496180, φ = 0.729844, Vmax = 4.0. AMDE CR = 0.25, F = 1. DisABC φmax = 0.9, φmin = 0.5, p s = 0.5, Nlocal = 50, plocal = 0.01. BPSO C = 2, Vmax = 6.0. binDE F = 0.8, CR = 0.5. AQDE F = 0.1 ∗ r1 ∗ r2 , CR = 0.5 + 0.0375 ∗ r3 , r1 , r2 ∼ U(0, 1), r3 ∼ N(0, 1). BLDE p = max(0.05, min(0.15, 10/n)). 7 Problem P1 P2 P3 P4 P5 P6 P7 P8−1 P8−2 P8−3 P8−4 P8−5 AMPSO AveFit± StdDev (SR,Runtime) 3.00E+01±0.00E+00 (100, 3.01E-01) 5.0E+04±0.00E+00 (100, 2.34E+02) -8.92E+00±2.15E+00 (0, 3.45E+02) -4.55E+01±3.53E+01 (0, 1.03E+03) -1.13E+01±1.15E+01 (22, 4.72E+02) -2.94E+03±9.26E+02 (0, 6.37E+02) -7.87E+00±3.29E+00 (0, 6.02E+02) 1.21E+05±4.61E+03 (0, 7.35E-01) 7.62E+03±4.80E+02 (0, 2.71E+01) 5.30E+03±2.12E+02 (0, 4.29E+00) 6.52E+03±4.14E+02 (0, 6.04E+00) 8.10E+03±5.96E+02 (0, 7.09E+00) AMDE AveFit± StdDev (SR,Runtime) 3.00E+01±0.00E+00 (100, 2.78E-01) 5.0E+04±1.54E+02 (88, 2.03E+02) -5.48E+00±3.21E+00 (2, 3.47E+02) -1.12E+01±1.99E+01 (48, 1.04E+03) -1.27E+00±3.67E+00 (22, 4.76E+02) -1.18E+02±3.51E+02 (8, 6.41E+02) -4.57E+00±2.84E+00 (0, 6.08E+02) 1.23E+05±2.70E+03 (0, 6.85E-01) 8.02E+03±1.19E+02 (0, 2.61E+01) 5.24E+03±1.83E+02 (0, 4.13E+00) 6.43E+03±2.22E+02 (0, 5.90E+00) 8.37E+03±2.87E+02 (0, 6.91E+00) DisABC AveFit± StdDev (SR,Runtime) 3.00E+01±0.00E+00 (100, 1.60E+01) 4.53E+04±7.19E+03 (34, 2.92E+02) -6.88E+00±2.86E-01 (0, 3.75E+02) -5.70E+01±5.48E+00 (0, 1.21E+03) -3.11E+01±5.55E+00 (0, 5.21E+02) -4.23E+03±4.05E+02 (0, 7.00E+02) -1.10E+01±3.19E-01 (0, 6.72E+02) 1.28E+05±1.14E+03 (2, 3.28E+00) 8.49E+03±4.21E+01 (0, 1.20E+02) 6.01E+03±1.19E+01 (0, 1.92E+01) 7.19E+03±1.89E+02 (0, 2.75E+01) 9.33E+03±2.29E+02 (0, 3.28E+01) BPSO AveFit± StdDev (SR,Runtime) 3.00E+01±0.00E+00 (100, 2.95E-01) 3.96E+04±1.65E+04 (66, 2.81E+02) -4.88E+00±7.39E-01 (0, 3.53E+02) -6.18E+00±2.40E+00 (0, 1.06E+03) -1.90E-02±8.20E-03 (10, 4.82E+02) -5.54E+02±2.82E+02 (0, 6.49E+02) -1.67E+00±5.40E-03 (0, 6.22E+02) 1.29E+05±2.99E+03 (18, 9.82E-01) 8.66E+03±3.56E+01 (0, 3.65E+01) 6.87E+03±7.85E+01 (26, 5.88E+00) 8.81E+03±1.02E+02 (8, 8.31E+00) 1.11E+04±4.40E+01 (2, 9.64E+00) binDE AveFit± StdDev (SR,Runtime) 2.94E+01±3.14E-01 (96, 4.07E-01) 4.52E+04±8.92E+03 (40, 2.79E+02) -6.34E+00±3.04E-01 (0, 3.53E+02) -4.07E+01±4.27E+00 (0, 1.04E+03) -2.35E+01±3.91E+00 (0, 4.83E+02) -3.58E+03±2.92E+02 (0, 6.48E+02) -1.06E+01±2.74E-01 (0, 6.20E+02) 1.30E+05±2.04E+02 (52, 1.25E+00) 8.72E+03±4.45E+00 (84, 4.41E+01) 6.95E+03±0.00E+00 (100, 7.16E+00) 8.71E+03±1.06E+02 (0, 1.01E+01) 1.09E+04±7.01E+01 (0, 1.17E+01) AQDE AveFit± StdDev (SR,Runtime) 2.34E+01±2.88E+00 (4, 2.44E-01) 3.46E+04±1.37E+04 (16, 2.96E+02) -6.55E+00±3.68E-01 (0, 3.55E+02) -1.57E+01±3.79E+00 (0, 1.05E+03) -2.32E+01±4.37E+00 (0, 4.85E+02) -2.02E+03±4.17E+02 (0, 6.51E+02) -1.00E+01±6.43E-01 (0, 6.19E+02) 1.30E+05±2.89E+02 (20, 9.39E-01) 8.70E+03±1.47E+01 (4, 3.43E+01) 6.84E+03±7.11E+01 (2, 5.51E+00) 8.70E+03±9.21E+01 (0, 7.73E+00) 1.10E+04±8.22E+01 (0, 8.87E+00) BLDE AveFit± StdDev (SR,Runtime) 3.00E+01±0.00E+00 (100, 2.15E-01) 5.00E+04±6.09E+01 (96, 3.07E+02) -3.22E+00±8.74E-01 (0, 3.53E+02) -1.12E+00±1.10E-01 (0, 1.05E+03) -5.79E-02±2.24E-02 (0, 4.84E+02) -4.55E+01±9.68E+01 (0, 6.45E+02) -1.93E+00±3.84E-02 (0, 6.20E+02) 1.28E+05±2.66E+03 (10, 8.97E-01) 8.70E+03±1.62E+01 (4, 3.25E+01) 6.93E+03±3.66E+01 (58, 5.23E+00) 8.87E+03±5.43E+01 (4, 7.28E+00) 1.12E+04±1.86E+01 (6, 8.29E+00) 8 Table 4: Numerical results of AMPSO, AMDE,DisABC and BLDE on the 12 test problems. The best results for each problem are highlighted by boldface type. Table 5: Ranks on the performances of the compared algorithms for the selected benchmark problems. Problem. p1 p2 p3 p4 p5 p6 p7 p8−1 p8−2 p8−3 p8−4 p8−5 Average AMPSO 1 1 7 5 4 5 7 7 7 6 6 7 5.3 AMDE 1 3 3 2 3 2 3 6 6 7 7 6 4.1 DisABC 1 4 6 6 7 7 6 5 5 5 5 5 5.2 BPSO 1 6 2 7 1 3 1 3 4 3 2 2 2.9 binDE 6 5 4 4 6 6 5 1 1 1 3 4 3.8 AQDE 7 7 5 3 5 4 4 2 2 4 4 3 4.2 BLDE 1 2 1 1 2 1 2 4 3 2 1 1 1.8 Definition 2. Denote the population of an EA at the tth generation to be X(t) , which consists of µ n-bit individuals. Let HammDist(x, y) to be the Hamming distance between two binary vectors x and y. The renewal metric of an EA at the tth generation is defined as µ 1 X Ham(x(t) (i) − tx(t) (i)), (2) α(t) , µ · n i=1 where x(t) (i) is the ith individual in X(t) , and tx(t) (i) is the corresponding candidate solution. The refinement metric of an EA at the tth generation is defined as µ β(t) ,  1 X n − Ham(x(t) (i) − xgb (t)) , µ · n i=1 (3) where xgb (t) is the best explored solution before the tth generation. The Hamming distance between x(t) (i) and the corresponding trial vector tx(i) denotes the the overall changes that is performed on the bit-string by the variation strategies. Accordingly, the average value over the whole population can indicate the overal changes of the population. Then, α(t) properly reveals the exploration abilities of EAs at generation t. Meanwhile, an EA which harbors a big value of β(t) can intensely exploit the local region around the best explored solution xgb , and thus, it harbors powerful exploitation ability. For the comparison, we illustrate the changing curves of the renewal metric and the refinement metric for BLDE, BPSO, AQDE and binDE by Figure 1. Fig.1(a) and Fig.1(b) show that when BPSO is employed to solve P5 and P7, the renewal metric quickly descend to about zero, and the refinement metric ascend to a high level, which demonstrates that the population of PSO quickly converges. Meanwhile, the diversity of the population rapidly descend to a low level, and the population focuses on local search around the obtained best solution. Since the intensity of noise in P5 is small, the convergence of BPSO is not significantly influenced. For P7 , the massive local optimal solutions are regularly distributed in the feasible region, BPSO can also quickly locate the global optimal solution. However, BLDE tries to keep a balance between exploration and exploitation, and the bit-by-bit variation strategies make it more vulnerable to be frustrated by the noise of P5 as well as the multi-modal landscape of P7 . As a consequence, BPSO performs better than BLDE on P5 and P7 . However, the local optimal solutions of MKPs are not regularly distributed. Thus, to efficiently explore the feasible regions, it is vital to keep a balance between exploration and exploitation. Figs. 1(c), 1(d), 1(e) and 1(f) demonstrate binDE and AQDE can keep a balance between exploration and exploitation for the compared algorithms. Thus, AQDE performs better than BLDE on the test problem P8−1 , and binDE performs better than BLDE on P8−1 , P8−2 and P8−3 . 9 Algorithm AMPSO HBPD +:∅ ≈: P1 , P2 − : P3 , P4 , P5 , P6 , P7 , P8−1 , P8−2 , P8−3 , P8−4 , P8−5 DisABC binDE Algorithm AMDE HBPD +:∅ ≈: P1 , P2 , P4 , P5 − : P3 , P6 , P7 , P8−1 , P8−2 , P8−3 , P8−4 , P8−5 +:∅ ≈: P1 , P8−1 , − : P2 , P3 , P4 , P5 , P6 , P7 , P8−2 , P8−3 , P8−4 , P8−5 BPSO + : P5 , P7 ≈: P1 , P8−1 − : P2 , P3 , P4 , P6 , P8−2 , P8−3 , P8−4 , P8−5 + : P8−1 , P8−2 , P8−3 ≈: P1 − : P2 , P3 , P4 , P5 , P6 , P7 , P8−4 , P8−5 AQDE + : P8−1 ≈: P8−2 − : P1 , P2 , P3 , P4 , P5 , P6 , P7 , , P8−3 , P8−4 , P8−5 10 Table 6: Wilcoxon rank sum tests of the compared algorithms on the benchmark problems. The notation +(−) means the algorithm for comparison is significantly superior to (inferior to) BLDE with significance level 0.05; ≈ means the compared algorithm is not significantly different with BLDE. 1 0.9 0.8 0.8 Renewal/Refinement Metric Renewal/Refinement Metric 1 0.9 0.7 α : BLDE β : BLDE α : BPSO β : BPSO 0.6 0.5 0.4 0.3 0.2 0.1 0 0.7 α : BLDE β : BLDE α : BPSO β : BPSO 0.6 0.5 0.4 0.3 0.2 0.1 0 500 1000 0 1500 0 200 400 600 Generation 1 1 0.9 0.9 0.8 0.8 0.7 α : BLDE β : BLDE α : AQDE β : AQDE 0.6 0.5 0.4 0.3 0.2 0.1 0 1600 1800 α : BLDE β : BLDE α : binDE β : binDE 0.6 0.5 0.4 0.3 0.2 0.1 0 50 100 150 200 Generation 250 300 0 350 0 1 1 0.8 0.8 α : BLDE β : BLDE α : binDE β : binDE 0.6 0.4 0.2 0 2000 4000 6000 Generation 8000 50 100 150 200 Generation 250 300 350 (d) P8−1 : BLDE vs. binDE; Renewal/Refinement Metric Renewal/Refinement Metric 1400 0.7 (c) P8−1 : BLDE vs. AQDE; 0 1200 (b) P7 : BLDE vs. BPSO; Renewal/Refinement Metric Renewal/Refinement Metric (a) P5 : BLDE vs. BPSO; 800 1000 Generation 10000 0.4 0.2 0 12000 (e) P8−2 : BLDE vs. binDE; α : BLDE β : BLDE α : binDE β : binDE 0.6 0 500 1000 1500 Generation 2000 2500 (f) P8−3 : BLDE vs binDE. Figure 1: Comparisons of the renewal and refinement metrics for test problems P5 , P7 , P8−1 , P8−2 , P8−3 . 11 5. Performance of BLDE on the unit commitment problem In this section, we employ BLDE solving the unit commitment problem (UCP) in power systems. To minimize the production cost over a daily to weekly time horizon, UCP involves the optimum scheduling of power generating units as well as the determination of the optimum amounts of power to be generated by committed units2 [5]. Thus, UCP is a mixed integer optimization problem, the decision variables of which are the binary string representing the on/off statuses of units and the real variables indicating the generated power of units. 5.1. Objective function of UCP The objective of UCP is to minimize the total production cost F= T X N X   φi (Pit ) · uit + ψit · (1 − ui,t−1 ) · ui,t (4) t=1 i=1 where N is the number of units to be scheduled and T is the time horizon. When the tth unit is committed to generate power Pit at time t, the binary variable uit is set to be 1; otherwise, uit = 0. The function φi (Pit ) represents the fuel cost of unit i at time t, which is frequently approximated by φi (Pit ) = ai + bi pit + ci P2it (5) where ai , bi and ci are known coefficients of unit i. If the ith unit has been off prior to start-up, there is a start-off cost  down   ≤ τoit f f ≤ Γdown + fi  di , if Γi i (6) ψit =    ei , if τo f f > Γdown + fi i it are the hot start cost, cold start cost, cold start time and minimum down time of unit i, where di , ei , fi and Γdown i of f respectively. τit , the continuously off time of unit i, is determined by τoit f f   0,         1, =   1 − σi ,       1 + τo f f , i,t−1 if uit = 1 if uit = 0, t = 1 and σi > 0 if uit = 0, t = 1 and σi < 0 (7) if uit = 1 and t > 1 where σi is the initial status of unit i, which shows for how long the unit was on/off prior to the start of the time horizon. 5.2. Constraints in UCP The minimization of the total production cost is subject to the following constraints. Power balance constraints: The total generated at time t must meet the power demand at that time instant, i.e., N X uit Pit = Dt , t = 1, 2, . . . , T (8) i=1 where Dt is the power demand at time t. Practically, it is hardly possible to exactly meet the power demand, an error ǫ is allowed for the generated power, i.e., PN i=1 uit Pit − 1 ≤ ǫ, t = 1, 2, . . . , T. (9) Dt 2 To compare with the work reported in [5], we employ similar notations and descriptions in this section. 12 Spinning reserve constraints: Due to possible outages of equipments, it is necessary for power systems to satisfy the spinning reserve constraints. Thus, the sum of the maximum power generating capacities of all committed units should be greater than or equal to the power demand plus the minimum spinning reserve requirement, i.e., N X i=1 ≥ Dt + R t , uit Pmax i t = 1, 2, . . . , T (10) where Pmax is the maximum power generating capacity of unit i, and Rt is the minimum spinning reserve i requirement at time t. Minimum up time constraints: If unit i is on at time t and switched off at time t + 1, the continuous up time τon it should be greater than or equal to the minimum up time Γup i of unit i, i.e., up τon it ≥ Γi , if uit = 1, ui,t+1 = 0 and t < T, i = 1, . . . , N (11) where the continuously up time is τon it   0,         1, =   1 + σi ,       1 + τon , i,t−1 if uit = 0 if uit = 1, t = 1 and σi < 0 if uit = 1, t = 1 and σi > 0 if uit = 1 and t > 1. (12) Minimum down time constraints: If unit i is off at time t and switched on at time t + 1, the continuous up time τoit f f should be greater than or equal to the minimum off time Γdown of unit i, i.e., i , τoit f f ≥ Γdown i if uit = 0, ui,t+1 = 1 and t < T, i = 1, . . . , N (13) Range of generated power: The generated power of a unit is limited in an interval, i.e., , ≤ Pit ≤ Pmax Pmin i i i = 1, 2, . . . , N and t = 1, 2, . . . , T (14) where Pmin and Pmax is the minimum power output and the maximum power output of unit i, respectively. i i 5.3. Implement of BLDE for UCP The optimal commitment of power units in UCP is obtained by combining BLDE with real-coded DE operations. In BLDE, each binary individual represents an on/off scheduling plan of units, accompanied with a real-coded individual representing the specific power outputs of units. When the binary individuals are recombined during the iteration process, the real-coded individuals are recombined via the DE/rand/1 mutation and binary crossover strategies of the real-coded DE. Then, binary individuals and the corresponding real individuals are integrated together for evaluation. If the combined mixed-integer individuals violate the constraints in UCP, they are repaired via the repairing mechanisms proposed in [5]. The performance of BLDE is tested via a 10-unit power system, the parameters and forecasted power demands of which are respectively listed in Tab. 7 and Tab. 8. To fairly compare BLDE with the method proposed in [5], we also set the population size to be 100, and the results are compared after 30 independent runs of 2500 iterations, where the scalar factor F is set to be 0.8. The statistical results are listed in Tab. 9. The comparison results show that when the power balance error ǫ is small, performance of BLDE is a bit worse than that of the binary-real-coded differential evolution (BRCDE) algorithm proposed in [5]. However, when the power balance is relaxed to a relatively great extent, BLDE outperform BRDE for UCP of the 10-unit power system. The reason could be that crossover operation for real variables is not appropriately regulated for UCP, and accordingly, simultaneous variations on all real variables usually lead to violations of constraints. Thus, BLDE can only outperforms BRCDE when the constraints are relaxed greatly. 13 Unit(i) 1 2 3 4 5 6 7 8 9 10 Pmax (MW) i 455 455 130 130 162 80 85 55 55 55 Pmin i (MW) 150 150 20 20 25 20 25 10 10 10 ai ($/h) 1000 970 700 680 450 370 480 660 665 670 bi ($/MWh) 16.19 17.26 16.60 16.50 19.70 22.26 27.74 25.92 27.27 27.79 ci ($/MW 2 h) 0.00048 0.00031 0.00200 0.00211 0.00398 0.00712 0.00079 0.00413 0.00222 0.00173 di ($) 4500 5000 550 560 900 170 260 30 30 30 ei ($) 9000 10000 1100 1120 1800 340 520 60 60 60 fi (h) 5 5 4 4 4 2 2 0 0 0 ip Γi (h) 8 8 5 5 6 3 3 1 1 1 Γdown (h) i 8 8 5 5 6 3 3 1 1 1 σi (h) 8 8 -5 -5 -6 -3 -3 -1 -1 -1 14 Table 7: Unit parameters for the 10-unit power system. Table 8: Forecasted power demands for the 10-unit system over 14-h time horizon. Hour Demand (MW) 1 700 2 700 3 850 4 950 5 1000 6 1100 7 1150 8 1200 9 1300 10 1400 11 1450 12 1500 Hour Demand (MW) 13 1400 14 1300 15 1200 16 1050 17 1000 18 1100 19 1200 20 1400 21 1300 22 1100 23 900 24 800 Table 9: Results comparison between BLDE and BRCDE[5] for the 10-unit power system.“-” means that the corresponding item was not presented in the literature. Method BRCDE BLDE Power balance error ǫ 0.0% 0.1% 0.5% 1% 0.0% 0.1% 0.5% 1% Best cost 563938 563446 561876 559357 563977 563552 561677 559155 Average Cost 563514 564005 563636 561847 559207 Worst Cost 563563 564088 563745 559426 Standard deviation 30 24 49 50 48 6. Discussions In this paper, we propose a BLDE algorithm appropriately incorporating the mutation strategy of binary DE and the learning mechanism of binary PSO. For majority of the selected benchmark problems, BLDE can outperform the compared algorithms, which indicate that BLDE is competitive to the compared algorithms. However, statistical test results show that BPSO performs better than BLDE on P5 and P7 , AQDE is more efficient for P8−1 , and binDE obtains better results on P8−1 , P8−12 as well as P8−3 . When generating a candidate solution, BLDE first initiate it as the winner of two obtained solutions, and then, regulate it by learning from the best individual in the population. This strategy simultaneously incorporates the synchronously changing strategy and the bitwise mutation strategy of candidate generation. Thus, BLDE can performs well on most of the high-dimensional benchmark problems. However, when BLDE is employed to solve P5 and P7 , the global optimal solutions of which are easy to be locate, it performs worse than BPSO; meanwhile, when it is implemented to solve the low-dimensional problems P8−1 , P8−2 and P8−3 , the local optimal solutions of which are irregularly distributed in the feasible regions, it cannot perform better than binDE. 7. Conclusions Generally, the proposed BLDE is competitive to the existing binary evolutionary algorithms. However, its performance can been improved. Thus, future work will focus on designing an adaptive strategy appropriately managing the synchronously changing strategy and the bitwise mutation strategy employed in BLDE. Meanwhile, we will try to further improve its performances on mixed-integer optimization problems by efficiently incorporate it with real-coded recombination strategies. Acknowledgements This work was partially supported by the Natural Science Foundation of China under Grants 51039005, 61173060 and 61303028, as well as the Fundamental Research Funds for the Central Universities (WUT: 2013-Ia-001). 15 References [1] Banks A., Vincent J. and Anyakoha C., A review of particle swarm optimization, Part I: background and development. Natural Computing, 6(4): 467-484, 2007. [2] Banks A., Vincent J. and Anyakoha C., A review of particle swarm optimization, Part II: hybridisation, combinatorial, multicriterial and constrained optimization, and indicative applications. Natural Computing, 7(1): 109-124, 2008. [3] Das S., Konar A. and Chakraborty U. K., Improving particle swarm optimization with differentially perturbed velocity. In Proc. of 2005 Conference on Genetic and Evolutionary Computation (GECCO’05), ACM, 2005, pp. 177-184. [4] Das S. and Suganthan P. N., Differential evolution: a survey of the state-of-the-art. IEEE Transactions on Evolutionary Computation, 15(1):431, 2011. [5] Datta D. and Dutta S., A binary-real-coded differential evolution for unit commitment problem. Electrical Power and Energy Systems, 42(1): 517-524, 2012. [6] Eberhart R. C. and Shi Y., Particle swarm optimizaiton: developments, applications and resources. In Proc. of 2001 IEEE Conference on Evolutionary Computation (CEC 2001), IEEE, 2001, pp.81-86. [7] Engelbrecht A. P. and Pampará, Binary differential evolution strategies. In Proc. of 2007 IEEE Congress on Evolutionary Computation, IEEE, 2007, pp.1942-1947. [8] Gibbons, J. and Chakraborti, S., Nonparametric Statistical Inference (the Fifth Edition). Taylor and Francis, 2011. [9] Gong, T. and Tuson, A.L., Differential evolution for binary encoding. In Soft Computing in Industrial Applications, Springer, 2007, pp. 251-262. [10] He X. and Han L., A novel binary differential evolution algorithm based on artificial immune system. In Proc. of 2007 IEEE Congress on Evolutionary Computation, IEEE, 2007, pp. 2267-2272. [11] Horn J., Goldber D. E. and Deb K., Long path problems. In Proc. of 1994 International Conference on Parallel Problem Solving from Nature (PPSN III), Springer, 1994, pp. 149-158. [12] Hota A. R. and Pat, A., An adaptive quantum-inspired differential evolution algorithm for 0-1 knapsack problem. In Proc. of 2010 Second World Congress on Nature and Biologically Inspired Computing (NaBIC), IEEE, 2010, pp.703-708. [13] Kashan, M.H., Nahavandi, N., & Kashan, A.H. (2012). DisABC: A new artificial bee colony algorithm for binary optimization. Applied Soft Computing, 12(1): 342-352, 2012. [14] Kashan M. H., Kashan A. H. and Nahavandi N., A novel differential evolution algorithm for binary optimizatoin. Computational Optimization and Applications, 55(2): 481-513, 2013. [15] Kennedy, J., & Eberhart, R.C. (1995). Particle swarm optimization. In Proc. of 1995 IEEE International Conference on Neural Networks, IEEE, 1995, pp. 1942-1948. [16] Kennedy, J., & Eberhart, R.C. (1997). A discrete binary version of the particle swarm algorithm. In Proc. of IEEE International Conference on Systems, Man, and Cybernetics, IEEE, 1997, pp. 4104-4108. [17] Kennedy J., Particle swarm optimizaiton. In Encyclopedia of Machine Learning, Springer, 2010, pp.760-766. [18] Moore P. W. and Venayagamoorthy G. K., Evolving digital circuit using hybrid particle swarm optimizaiton and differential evolution. Interational Journal of Neural Systems, 16(3): 163-177, 2006. [19] Omran M. G. H., Engelbrecht A. P. and Salman A., Bare bones differential evolution. European Journal of Operational Research, 196(1): 128-139, 2009. [20] Pampara, G., Franken, N.,& Engelbrecht, A.P., Combining particle swarm optimisation with angle modulation to solve binary problems. In Proc. of 2005 IEEE Congress on Evolutionary Computation, IEEE, 2005, pp. 89-96. [21] Pampara G., Engelbrecht A. P. and Franken, N., Binary differential evolution. In Proc. of 2006 IEEE Congress on Evolutionary Computation, IEEE, 2006, pp. 1873-1879. [22] Ponsich A. and Coello Coello C. A., Differential evolution performances for the solution of mixed-integer constraned process engineering problems. Appliced Soft Computing, 11: 399-409, 2011. [23] Poli, R., Kennedy, J., and Blackwell, T., Particle swarm optimization: An Overview. Swarm Intelligence, 1: 33-57, 2007. [24] Price, K., Storn, R., and Lampinen, J., Differential Evolution: A Practical Approach to Global Optimization. Springer, 2005. [25] Rekanos I. T., Shape reconstruction of a perfectly conducting scatterer using differential evolution and particle swarm optimization. IEEE Transactions on Geoscience and Remote Sensing, 46(7): 1967-1974, 2008. [26] Storn, R. and Price, K. (1997). Differential evolution-a simple and efficient adaptive scheme for global optimization over continuous spaces. Journal of Global Optimization, 11: 341-359, 1997. [27] Uyar, Ş., & Eryiğit, G., Improvements to penalty-based evolutionary algorithms for the multi-dimensional knapsack problem using a genebased adaptive mutation approach. In Proc. of 2005 Conference on Genetic and evolutionary computation (GECCO ’05), ACM, 2005, pp. 1257-1264. [28] Vesterstrom J. and Thomsen R., A comparative study of differential evolution, particle swarm optimization and evolutionary algorithms on numerical benchmark problems. In Proc. of 2004 IEEE Conference on Evolutionary COmputation (CEC’04), IEEE, 2004, pp. 1980-1987. [29] Wang L., Fu X. P., Mao Y. F., Menhas M. I. and Fei M. R., A novel modified binary differential evolution algorithm and its applications. Neurocomputing, 98: 55-75, 2012. [30] Wu C-Y. and Tseng K-Y., Topology optimization of structures using binary differential evolution. Structural and Multidisciplinary Optimization, 42: 939-953, 2010. [31] http://www.zib.de/index.php?id=921&no_cache=1&L=0&cHash=fbd4ff9555f8714ac6238261e3963432&type=98 [32] Yang Q., A comparative study of discrete differential evolution on binary constraint satisfaction problems. In Proc. of 2008 IEEE Congress on Evolutionary Computation. IEEE, 2008, pp. 330-335. 16
9cs.NE
1 Techniques for Improving the Finite Length Performance of Sparse Superposition Codes arXiv:1705.02091v4 [cs.IT] 19 Nov 2017 Adam Greig, Student Member, IEEE, and Ramji Venkataramanan, Senior Member, IEEE Abstract—Sparse superposition codes are a recent class of codes introduced by Barron and Joseph for efficient communication over the AWGN channel. With an appropriate power allocation, these codes have been shown to be asymptotically capacityachieving with computationally feasible decoding. However, a direct implementation of the capacity-achieving construction does not give good finite length error performance. In this paper, we consider sparse superposition codes with approximate message passing (AMP) decoding, and describe a variety of techniques to improve their finite length performance. These include an iterative algorithm for SPARC power allocation, guidelines for choosing codebook parameters, and estimating a critical decoding parameter online instead of pre-computation. We also show how partial outer codes can be used in conjunction with AMP decoding to obtain a steep waterfall in the error performance curves. We compare the error performance of AMP-decoded sparse superposition codes with coded modulation using LDPC codes from the WiMAX standard. Index Terms—Sparse regression codes, Approximate Message Passing, Low-complexity decoding, Finite length performance, Coded modulation I. I NTRODUCTION W E consider communication over the memoryless additive white Gaussian noise (AWGN) channel given by y = x + w, where the channel output y is the sum of the channel input x and independent zero-mean Gaussian noise w of variance σ 2 . There is an average power constraint P on theP input, so a n length-n codeword (x1 , . . . , xn ) has to satisfy n1 i=1 x2i ≤ P . The goal is to build computationally efficient codes that have low probability of decoding error at rates close to the AWGN channel capacity C = 21 log(1+snr). Here snr denotes the signal-to-noise ratio P/σ 2 . Though it is well known that Shannon-style i.i.d. Gaussian codebooks can achieve very low probability of error at rates approaching the AWGN capacity [1], this approach has been largely avoided in practice due to the high decoding complexity of unstructured Gaussian codes. Current state of the art approaches for the AWGN channel such as coded modulation [2], [3] typically involve separate coding and modulation steps. In this approach, a binary error-correcting code such as an LDPC or turbo code is first used to generate a binary codeword from the information bits; the code bits are then modulated with a standard scheme such as quadrature amplitude modulation. A. Greig and R. Venkataramanan are with Department of Engineering, University of Cambridge, Cambridge CB2 1PZ, UK (e-mails: [email protected], [email protected]). This work was supported in part by EPSRC Grant EP/N013999/1, and by an EPSRC Doctoral Training Award. Though these schemes have good empirical performance, they have not been proven to be capacity-achieving for the AWGN channel. Sparse Superposition Codes or Sparse Regression Codes (SPARCs) were recently proposed by Barron and Joseph [4], [5] for efficient communication over the AWGN channel. In [5], they introduced an efficient decoding algorithm called “adaptive successive decoding” and showed that it achieved near-exponential decay of error probability (with growing block length), for any fixed rate R < C. Subsequently, an adaptive soft-decision successive decoder was proposed in [6], [7], and Approximate Message Passing (AMP) decoders were proposed in [8]–[11]. The adaptive soft-decision decoder in [7] as well as the AMP decoder in [11] were proven to be asymptotically capacity-achieving, and have superior finite length performance compared to the original adaptive successive decoder of [5]. The above results mainly focused on characterizing the error performance of SPARCs in the limit of large block length. In this work, we describe a number of code design techniques for improved finite length error performance. Throughout the paper, we focus on AMP decoding due to its ease of implementation. However, many of the code design ideas can also be applied to the adaptive soft-decision successive decoder in [6], [7]. A hardware implementation of the AMP decoder was recently reported in [12], [13]. We expect that the techniques proposed in this paper can be used to reduce the complexity and optimize the decoding performance in such implementations. In the remainder of this section, we briefly review the SPARC construction and the AMP decoder from [11], and then list the main contributions of this paper. A word about notation before we proceed. Throughout the paper, we use log to denote logarithms with base 2, and ln to denote natural logarithms. For a positive integer N , we use [N ] to denote the set {1, . . . , N }. The transpose of a matrix A is denoted by A∗ , and the indicator function of an event E by 1{E}. A. The sparse superposition code A SPARC is defined in terms of a design matrix A of dimension n × M L. Here n is the block length, and M, L are integers which are specified below in terms of n and the rate R. As shown in Fig. 1, the design matrix A has L sections with M columns each. In the original construction of [4], [5] and in the theoretical analysis in [6], [7], [11], [14], the entries of A are assumed to be i.i.d. Gaussian ∼ N (0, 1/n). For our empirical results, we use a random Hadamard-based construction for A that leads to significantly lower encoding and decoding complexity [9]–[11]. 2 Section 1 M columns Section 2 M columns decoder produces iteratively refined estimates of the message vector, denoted by β 1 , β 2 , . . . , β T , where T is the (prespecified) number of iterations. Starting with β 0 = 0, for t = 0, 1, . . . , T − 1 the AMP decoder generates   kβ t k2 z t−1 t t P− , (2) z = y − Aβ + 2 τt−1 n Section L M columns A: βit+1 = ηit (β t + A∗ z t ), β: 0, √ 0, nP1 , √ 0, nP2 , 0, √ nPL , 0, ,0 T where ηit (s) = Fig. 1. A is the n×LM design matrix, β is an M L×1 sparse vector with one non-zero in each of the L sections. The length-n codeword is Aβ. The message determines the locations of the non-zeros in β, while P1 , . . . , PL are fixed a priori. Codewords are constructed as sparse linear combinations of the columns of A. In particular, a codeword is of the form Aβ, where β = (β1 , . . . , βM L )∗ is a length M L column vector with the property that there is exactly one non-zero βj for the section 1 ≤ j ≤ M , one non-zero βj for the section M + 1 ≤ j ≤ 2M , and so √ forth. The non-zero value of β in each section ` is set to nP` , where P P1 , . . . , PL are preL specified positive constants that satisfy `=1 P` = P , the average symbol power allowed. Both A and the power allocation {P1 , . . . , PL } are known to both the encoder and decoder in advance. The choice of power allocation plays a crucial role in determining the error performance of the decoder. Without loss of generality, we will assume that the power allocation is non-increasing across sections. Two examples of power allocation are: P • Flat power allocation, where P` = L for all `. This choice was used in [4] to analyze the error performance with optimal (least-squares) decoding. • Exponentially decaying power allocation, where P` ∝ 2−2C`/L . This choice was used for the asymptotically capacity-achieving decoders proposed in [5], [7], [11]. At finite block lengths both these power allocations could be far from optimal and lead to poor decoding performance. One of the main contributions of this paper is an algorithm to determine a good power allocation for the finite-length AMP decoder based only on R, P , σ 2 . Rate: As each of the L sections contains M columns, the total number of codewords is M L . With the block length being n, the rate of the code is given by log(M L ) L log M = . (1) n n In other words, a SPARC codeword corresponding to L log M input bits is transmitted in n channel uses. Encoding: The input bitstream is split into chunks of log M bits. A chunk of log M input bits can be used to index the location of the non-zero entry in one section of β. Hence L successive chunks determine the message vector β, with the `th chunk of log M input bits determining the non-zero location in section `, for 1 ≤ ` ≤ L. Approximate Message Passing (AMP) decoder: The AMP R= (3) p  √  ` exp si τnP 2 t  √ , nP` P nP` j∈sec(i) exp sj τ 2 1 ≤ i ≤ M L. t (4) Here the notation j ∈ sec(i) refers to all indices j in the same section as i. (Note that there are√M indices in each section.) At the end of each step t, βit / nP` may be interpreted as the updated posterior probability of the ith entry being the non-zero one in its section. The constants τt2 are specified by the following scalar recursion called “state evolution” (SE): τ02 = σ 2 + P, τt2 = σ 2 + P (1 − x(τt−1 )), t ≥ 1, (5) where x(τ ) := L X P` `=1 P √  √ E e e nP` τ (U1` + nP` τ √ √ (U1` + nP` τ  ) √ nP` τ ) + PM j=2 e nP` τ Uj` . (6) {Uj` } In (6), are i.i.d. N (0, 1) random variables for j ∈ [M ], ` ∈ [L]. The significance of the SE parameters τt2 is discussed in Section II. In Section IV, we use an online approach to accurately compute the τt2 values rather than precomputing them via (6). At the end of T iterations, the decoded message vector βb is produced by setting the maximum value in section ` of β T √ to nP` and the remaining entries to zero, for 1 ≤ ` ≤ L. Error rate of the AMP decoder: We measure the section error rate Esec as Esec = L o 1 X nb 1 β` 6= β` L (7) `=1 Assuming a uniform mapping between the input bitstream and the non-zero locations in each section, each section error will cause approximately half of the bits it represents to be incorrect, leading to a bit error rate Eber ≈ 21 Esec . Another figure of merit is the codeword error rate Ecw , which estimates the probability P(βb 6= β). If the SPARC is used to transmit a large number of messages (each via a length n codeword), Ecw measures the fraction of codewords that are decoded with one or more section errors. The codeword error rate is insensitive to where and how many section errors occur within a codeword when it is decoded incorrectly. At finite code lengths, the choice of a good power allocation crucially depends on whether we want to minimize Esec or Ecw . As we will see in the next section, a power allocation that yields reliably low section error rates may result in a 3 high codeword error rate, and vice versa. In this paper, we will mostly focus on obtaining the best possible section error rate, since in practical applications a high-rate outer code could readily correct a small fraction of section errors to give excellent codeword error rates as well. Further, the bit error rate (which is approximately half the section error rate) is useful to compare with other channel coding approaches, where it is a common figure of merit. B. Organization of the paper and main contributions In the rest of the paper, we describe several techniques to improve the finite length error performance and reduce the complexity of AMP decoding. The sections are organized as follows. • In Section II, we introduce an iterative power allocation algorithm that gives improved error performance with fewer tuning parameters than other power allocation schemes. • In Section III, we analyze the effects of the code parameters L, M and the power allocation on error performance and its concentration around the value predicted by state evolution. • In Section IV, we describe how an online estimate of the key SE parameter τt2 improves error performance and allows a new early-stopping criterion. Furthermore, the online estimate enables us to accurately estimate the actual section error rate at the end of the decoding process. • In Section V, we derive simple expressions to estimate Esec and Ecw given the rate and power allocation. • In Section VI we compare the error performance of AMP-decoded SPARCs to LDPC-based coded modulation schemes used in the WiMAX standard. • In Section VII, we describe how partial outer codes can be used in conjunction with AMP decoding. We propose a three-stage decoder consisting of AMP decoding, followed by outer code decoding, and finally, AMP decoding once again. We show that by covering only a fraction of sections of the message β with an outer code, the threestage decoder can correct errors even in the sections not covered by the outer code. This results in bit-error curves with a steep waterfall behavior. The main technical contributions of the paper are the iterative power allocation algorithm (Section II) and the threestage decoder with an outer code (Section VII). The other sections describe how various choices of code parameters influence the finite length error performance, depending on whether the objective is to minimize the section error rate or the codeword error rate. We remark that the focus in this paper is on improving the finite length performance using the standard SPARC construction with power allocation. Optimizing the finite length performance of spatially-coupled SPARCs considered in [9], [10] is an interesting research direction, but one that is beyond the scope of this paper. II. P OWER A LLOCATION Before introducing the power allocation scheme, we briefly give some intuition about the AMP update rules (2)–(4), and the SE recursion in (5)–(6). The update step (3) to generate each estimate of β is underpinned by the following key property: after step t, the “effective observation” β t + A∗ z t is approximately distributed as β + τt Z, where Z is standard normal random vector independent of β. Thus τt2 is the effective noise variance at the end of step t. Assuming that the above distributional property holds, β t+1 is just the Bayesoptimal estimate of β based on the effective observation. The entry βit+1 is proportional to the posterior probability of the ith entry being the non-zero entry in its section. We see from (5) that the effective noise variance τt2 is the sum of two terms. The first is the channel noise variance σ 2 . The other term P (1 − x(τt−1 )) can be interpreted as the interference due to the undecoded sections in β t . Equivalently, x(τt−1 ) is the expected power-weighted fraction of sections which are correctly decodable at the end of step t. The starting point for our power allocation design is the following result from [11], which gives analytic upper and lower bounds for x(τ ) of (5). Lemma 1. [14, Lemma 1(b)] Let ν` := sufficiently large M , and for any δ ∈ (0, 1), x(τ ) ≤ L X P` h `=1 P LP` Rτ 2 ln 2 . For i 2 1 {ν` > 2 − δ} + M −κ1 δ 1 {ν` ≤ 2 − δ} , (8) 2 x(τ ) ≥ M −κ2 δ 1− √ δ ln M ! L X `=1 P` 1 {ν` > 2 + δ} . P (9) where κ1 , κ2 are universal positive constants. As the constants κ1 , κ2 in (8)–(9) are not precisely specified, for designing power allocation schemes, we use the following approximation for x(τ ): x(τ ) ≈ L X P` `=1 P  1 LP` > 2Rτ 2 ln 2 . (10) This approximate version, which is increasingly accurate as L, M grow large, is useful for gaining intuition about suitable power allocations. Indeed, if the effective noise variance after step t is τt2 , then (10) says that any section ` whose normalized power LP` is larger than the threshold 2Rτt2 ln 2 is likely to be decodable correctly in step (t+1), i.e., in β t+1 , the probability mass within the section will be concentrated on the correct non-zero entry. For a given power allocation, we can iteratively estimate the SE parameters (τt2 , x(τt2 )) for each t using the lower bound in (10). This provides a way to quickly check whether or not a given power allocation will lead to reliable decoding in the large system limit. For reliable decoding at a given rate R, the effective noise variance given by τt2 = σ 2 + P (1 − x(τt−1 )) should decrease with t until it reaches a value close to σ 2 in a finite number of iterations. Equivalently, x(τt ) in (6) should increase to a value very close to 1. For a rate R < C, there are infinitely many power allocations for which (10) predicts successful decoding in the large system limit. However, as illustrated below, their finite length error performance may differ significantly. Thus the key question 4 Fig. 2. The dashed lines show the minimum required power in section for successful decoding when R = C (above), and R = 0.7C (below), where C = 2 bits. The solid line shows the exponentially-decaying power allocation in (11). addressed in this section is: how do we choose a power allocation that gives the lowest section error rate? The exponentially-decaying power allocation given by P (22C/L − 1) −2C`/L 2 , ` ∈ [L], (11) 1 − 2−2C was proven in [11] to be capacity-achieving in the large system limit, i.e., it was shown that the section error rate Esec of the AMP decoder converges almost surely to 0 as n → ∞, for any R < C. However, it does not perform well at practical block lengths, which motivated the search for alternatives. We now evaluate it in the context of (10) to better explain the development of a new power allocation scheme. P` = Given a power allocation, using (10) one can compute the minimum required power for any section ` ∈ [L] to decode, assuming that the sections with higher power have decoded correctly. The dashed lines in Figure 2 shows the minimum power required for each section to decode (assuming the exponential allocation of (11) for the previous sections), for R = C and R = 0.7C. The figure shows that the power allocation in (11) matches (up to order L1 terms) with the minimum required power when R = C. However, for R = 0.7C, we see that the exponentially-decaying allocation allocates significantly more power to the earlier sections than the minimum required, compared to later sections. This leads to relatively high section error rates, as shown in Figure 6. Figure 2 shows that the total power allocated by the minimal power allocation at R = 0.7C is significantly less than the available power P . Therefore, the key question is: how do we balance the allocation of available power between the various sections to minimize the section error rate? Allocating excessive power to the earlier sections ensures they decode reliably early on, but then there will not be sufficient power left to ensure reliable decoding in the final sections. This is the reason for the poor finite length performance of the exponentially-decaying allocation. Conversely, if the power is spread too evenly then no section particularly stands out against the noise, so it is hard for the decoding to get started, and early errors can cause cascading failures as subsequent sections are also decoded in error. This trade-off motivated the following modified exponential Fig. 3. The modified power allocation with a = f = 0.7 results in slightly more than the minimum power required for the first 70% of sections; the remaining available power is allocated equally among the last 30% of sections. The original allocation with P` ∝ 2−2C`/L is also shown for comparison. power allocation proposed in [11]: ( κ · 2−2aC`/L 1 ≤ ` ≤ f L, P` = κ · 2−2aCf f L + 1 ≤ ` ≤ L, (12) where PL the normalizing constant κ is chosen to ensure that `=1 P` = P . In (12), the parameter a controls the steepness of the exponential allocation, while the parameter f flattens the allocation after the first fraction f of the sections. Smaller choices of a lead to less power allocated to the initial sections, making a larger amount available to the later sections. Similarly, smaller values of f lead to more power allocated to the final sections. See Figure 3 for an illustration. While this allocation improves the section error rate by a few orders of magnitude (see [11, Fig. 4]), it requires costly numerical optimization of a and f . A good starting point is to use a = f = R/C, but further optimization is generally necessary. This motivates the need for a fast power allocation algorithm with fewer tuning parameters. A. Iterative power allocation We now describe a simple parameter-free iterative algorithm to design a power allocation. The L sections of the SPARC are divided into B blocks of L/B sections each. Each section within a block is allocated the same power. For example, with L = 512 and B = 32, there are 32 blocks with 16 sections per block. The algorithm sequentially allocates power to each of the B blocks as follows. Allocate the minimum power to the first block of sections so that they can be decoded in the first iteration when τ02 = σ 2 +P . Using (10), we set the power in each section of the first block to 2Rτ02 ln 2 L , 1≤`≤ . L B Using (10) and (5), we then estimate τ12 = σ 2 + (P − BP1 ). Using this value, allocate the minimum required power for the second block of sections to decode, i.e., P` = 2 ln 2Rτ12 /L for L 2L B + 1 ≤ ` ≤ B . If we sequentially allocate power in this manner to each of the B blocks, then the total power allocated by this scheme will be strictly less than P whenever R < C. We therefore modify the scheme as follows. For 1 ≤ b ≤ B, to allocate power to the bth block of sections assuming that the first (b − 1) blocks have been P` = 5 Fig. 4. Example illustrating the iterative power allocation algorithm with B = 5. In each step, the height of the light gray region represents the allocation that distributes the remaining power equally over all the remaining sections. The dashed red line indicates the minimum power required for decoding the current block of sections. The dark gray bars represent the power that has been allocated at the beginning of the current step. Algorithm 1 Iterative power allocation routine Require: L, B, σ 2 , P , R such that B divides L. L Initialise k ← B for b = 0 to B − P 1 do bk Premain ← P − `=1 P` 2 2 τ ← σ + Premain Pblock ← 2 ln(2)Rτ 2 /L if Premain /(L − bk) > Pblock then Pbk+1 , . . . , PL ← Premain /(L − bk) break else Pbk+1 , . . . , P(b+1)k ← Pblock end if end for return P1 , . . . , PL allocated, we compare the two options and choose the one that allocates higher power to the block: i) allocating the minimum required power (computed as above) for the bth block of sections to decode; ii) allocating the remaining available power equally to sections in blocks b, . . . , B, and terminating the algorithm. This gives a flattening in the final blocks similar to the allocation in (12), but without requiring a specific parameter that determines where the flattening begins. The iterative power allocation routine is described in Algorithm 1. Figure 4 shows a toy example building up the power allocation for B = 5, where flattening is seen to occur in step 4. Figure 5 shows a more realistic example with L = 512 and R = 0.7C. Choosing B: By construction, the iterative power allocation scheme specifies the number of iterations of the AMP decoder in the large system limit. This is given by the number of blocks with distinct powers; in particular the number of iterations (in the large system limit) is of the order of B. For finite code lengths, we find that it is better to use a termination criterion for the decoder based on the estimates generated by the algorithm. This criterion is described in Sec. IV. This datadriven termination criterion allows us to choose the number of Fig. 5. Iterative allocation, with L = 512, and B = 16 blocks. Flattening occurs at the 11th block. AMP section error rate Esec vs R at snr = 7, 15, 31, corresponding to C = 1.5, 2, 2.5 bits (shown with dashed vertical lines). At each snr, the section error rate is reported for rates R/C = 0.70, 0.75, 0.80, 0.85, 0.90. The SPARC parameters are M = 512, L = 1024. The top black curve shows the Esec with P` ∝ 2−2C`/L . The lower green curve shows Esec for the iterative power allocation, with B = L and RPA numerically optimized. (See Sec. III-B for a discussion of RPA .) Fig. 6. blocks B to be as large as L. We found that choosing B = L, together with the termination criterion in Sec. IV, consistently gives a small improvement in error performance (compared to other choices of B), with no additional time or memory cost. Additionally, with B = L, it is possible to quickly determine a pair (a, f ) for the modified exponential allocation in (12) which gives a nearly identical allocation to the iterative algorithm. This is done by first setting f to obtain the same flattening point found in the iterative allocation, and then searching for an a which matches the first allocation coefficient P1 between the iterative and the modified exponential allocations. Consequently, any simulation results obtained for the iterative power allocation could also be obtained using a suitable (a, f ) with the modified exponential allocation, without having to first perform a costly numerical optimization over (a, f ). Figure 6 compares the error performance of the exponential and iterative power allocation schemes discussed above for different values of R at snr = 7, 15, 31. The iterative power allocation yields significantly improved Esec for rates away from capacity when compared to the original exponential allocation, and additionally outperforms the modified exponential allocation results reported in [11]. 6 For the experiments in Figure 6, the value for R used in constructing the iterative allocation (denoted by RP A ) was optimized numerically. Constructing an iterative allocation with R = RP A yields good results, but due to finite length concentration effects, the RP A yielding the smallest average error rate may be slightly different from the communication rate R. The effect of RP A on the concentration of error rates is discussed in Section III-B. We emphasize that this optimization over RP A is simpler than numerically optimizing the pair (a, f ) for the modified exponential allocation. Furthermore, guidelines for choosing RP A as a function of R are given in Section III-B. Fig. 7. AMP error performance with increasing M , for L = 1024, III. E RROR C ONCENTRATION T RADE - OFFS In this section, we discuss how the choice of SPARC design parameters can influence the trade-off between the ‘typical’ value of section error rate and concentration of actual error rates around the typical values. The typical section error rate refers to that predicted by state evolution (SE). Indeed, running the SE equations (5)–(6) until convergence gives the following prediction for the section error rate:     √ √ SE Esec L 1X  E := 1−  L `=1 √ e nP` τT e  U1` + nP` τT √ nP` τT U1` + nP` τT √  + PM j=2 e nP` τT Uj`  ,  (13) where τT2 denotes the value in the final iteration. The conSE centration refers to how close the SE prediction Esec is to the observed section error rate. As we describe below, the choice of SPARC parameters (L, M ) and the power allocation both determine a trade-off SE , and concentration of between obtaining a low value for Esec SE . This trade-off is of the actual section error rate around Esec particular interest when applying an outer code to the SPARC, as considered in Section VII, which may be able to reliably handle only a small number of section errors. A. Effect of L and M on concentration Recall from (1) that the code length n at a given rate R is determined by the choice of L and M according to the relationship nR = L log M . In general, L and M may be chosen freely to meet a desired rate and code length. To understand the effect of increasing M , consider Figure 7 which shows the error performance of a SPARC with R = 1.5, L = 1024, as we increase the value of M . From (1), the code length n increases logarithmically with M . We observe that the section error rate (averaged over 200 trials) decreases with M up to M = 29 , and then starts increasing. This is in sharp contrast to the SE prediction (13) (plotted using a dashed line in Figure 7) which keeps decreasing as M is increased. This divergence between the actual section error rate and the SE prediction for large M is due to large fluctuations in the number of section errors across trials. Recent work on the error exponent of SPARCs with AMP decoding shows that the concentration of error rates near the SE prediction is strongly Eb R = 1.5, and N = 5.7 dB (2 dB from Shannon limit). See Section V 0 for details of Ēsec . dependent on both L and M . For R < C, [14, Theorem 1] shows that for any  > 0, the section error rate Esec satisfies 2 −κT L  (  ln(1+snr) −f (M )) SE P Esec > Esec +  ≤ KT e (log M )2T −1 4(1+snr) , (14) where T is the number of iterations until state evolution convergence, κT , KT are constants depending on T , and −κ2 δ 2 √ f (M ) = M is a quantity that tends to zero with growing δ ln M M . For any power allocation, T increases as R approaches C. For example, T ∝ 1/ log(C/R) for the exponential power allocation. We observe that the deviation probability bound on the RHS of (14) depends on the ratio L/(log M )2T −1 . In our experiments, T is generally on the order of a few tens. Therefore, keeping L constant, the probability of large SE increases with M . This deviations from the SE prediction Esec leads to the situation shown in Figure 7, which shows that the SE continues to decrease with M , but beyond SE prediction Esec a certain value of M , the observed average section error rate becomes progressively worse due to loss of concentration. This is caused by a small number of trials with a very large number of section errors, even as the majority of trials experience lower and lower error rates as M is increased. This effect can be clearly seen in Figure 8, which compares the histogram of section error rates over 200 trials for M = 64 and M = 4096. The distribution of errors is clearly different, but both cases have the same average section error rate due to the poorer concentration for M = 4096. To summarize, given R, snr, and L, there is an optimal M that minimizes the empirical section error rate. Beyond this value of M , the benefit from any further increase is outweighed by the loss of concentration. For a given R, values of M close to L are a good starting point for optimizing the empirical section error rate, but obtaining closed-form estimates of the optimal M for a given L is still an open question. For fixed L, R, the optimal value of M increases with snr. This effect can be seen in the results of Figure 12, where there is an inversion in the order of best-performing M values as Eb /N0 increases. This is because as snr increases, the number of iterations T for SE to converge decreases. A smaller T 7 Fig. 8. Histogram of AMP section errors over 200 trials M = 64 (top) Eb and M = 4096 (bottom), with L = 1024, R = 1.5, N = 5.7dB. 0 The left panels highlight distribution of errors around low section error counts, while the right panels show the distribution around higherror-count events. As shown in Figure 7, both cases have an average section error rate of around 10−2 . Fig. 9. Histogram of AMP section errors over 1000 trials for RPA = 0.98R (top) and RPA = 1.06R (bottom). The SPARC parameters are L = 1024, M = 512, R = 1.6, snr = 15. The left panels highlight distribution of trials with low section error counts (up to 8); the right panels indicate the distribution of infrequent but higherror-count trials. At lower RPA , many more trials have no section errors, but those that do often have hundreds. At higher RPA , at most 7 section errors were seen, but many fewer trials had zero section errors. mitigates the effect of larger M in the large deviations bound of (14). In other words, a larger snr leads to better error rate concentration around the SE prediction, so larger values of M are permissible before the performance starts degrading. B. Effect of power allocation on concentration The non-asymptotic bounds on x(τ ) in Lemma 1 indicate that at finite lengths, the minimum power required for a section ` to decode in an iteration may be slightly different than that indicated by the approximation in (10). Recall that the iterative power allocation algorithm in Section II-A was designed based on (10). We can compensate for the difference between the approximation and the actual value of x(τ ) by running the iterative power allocation in Algorithm 1 using a modified rate RPA which may be slightly different from the communication rate R. The choice of RPA directly affects the error concentration. We now discuss the mechanism for this effect and give guidelines for choosing RPA as a function of R. If we run the power allocation algorithm with RPA > R, from (10) we see that additional power is allocated to the initial blocks, at the cost of less power for the final blocks (where the allocation is flat). Consequently, it is less likely that one of the initial sections will decode in error, but more likely that some number of the later sections will instead. Figure 9 (bottom) shows the effect of choosing a large RPA = 1.06R: out of a total of 1000 trials, there were no trials with more than 7 sections decoded in error (the number of sections L = 1024); however, relatively few trials (29%) have zero section errors. Conversely, choosing RPA < R allocates less power to the initial blocks, and increases the power in the final sections which have a flat allocation. This increases the likelihood of the initial section being decoded in error; in a trial when this happens, there will be a large number of section errors. However, if the initial sections are decoded correctly, the additional power in the final sections increases the probability of the trial being completely error-free. Thus choosing RP A < R makes completely error-free trials more likely, but also increases the likelihood of having trials with a large number of sections in error. In Figure 9 (top), the smaller RPA = 0.98R gives zero or one section errors in the majority (81%) of cases, but the remaining trials typically have a large number of sections in error. To summarize, the larger the RP A , the better the concentration of section error rates of individual trials around the overall average. However, increasing RP A beyond a point just increases the average section error rate because of too little power being allocated to the final sections. For different values of the communication rate R, we empirically determined an RPA that gives the lowest average section error rate, by starting at RPA = R and searching the neighborhood in steps of 0.02R. Exceptionally, at low rates (for R ≤ 1), the optimal RPA is found to be 0, leading to a completely flat power allocation with P` = PL for all `. We note from (10) that for 1 ≥ R > 2τ 2Pln 2 , the large system 0 limit theory does not predict that we can decode any of the L sections — this is because no section is above the threshold in the first iteration of decoding. However, in practice, we observe that some sections will decode initially (due to the correct column being aligned favorably with the noise vector), and this reduces the threshold enough to allow subsequent decoding to continue in most cases. For R ≤ 1, when RPA closer to R is used, the lower power in later sections hinders the finite length decoding performance. PA We found that the value of RR that minimizes the average section error rate increases with R. In particular, the optimal RP A PA was 0 for R ≤ 1; the optimal RR for R = 1.5 was R PA close to 1, and for R = 2, the optimal RR was between 1.05 and 1.1. Though this provides a useful design guideline, a deeper theoretical analysis of the role of RP A in optimizing the finite length performance is an open question. Finally, a word of caution when empirically optimizing RPA to minimize the average section error rate. Due to the loss of concentration as RP A is decreased below R, care must be taken to run sufficient trials to ensure that a rare unseen trial 8 with many section errors will not catastrophically impact the overall average section error rate. For example, in one scenario with L = 1024, M = 512, snr = 15, R = 1.4, RPA = 1.316, we observed 192 trials with errors out of 407756 trials, but only 4 of these trials had more than one error, with between 400 to 600 section errors in those 4 cases. The average section error rate was 5.6 × 10−6 . With fewer trials, it is possible that no trials with a large number of section errors would be observed, leading to an estimated error rate an order of magnitude better, at around 4.6 × 10−7 . IV. O NLINE C OMPUTATION OF τt2 AND E ARLY T ERMINATION Recall that the update step (4) of the AMP decoder requires the SE coefficients τt2 , for t ∈ [T ]. In the standard implementation [11], these coefficients are computed in advance using the SE equations (5)–(6). The total number of iterations T is also determined in advance by computing the number of iterations required the SE to converge to its fixed point (to within a specified tolerance). This technique produced effective results, but advance computation is slow as each of the L expectations in (6) needs to be computed numerically via Monte-Carlo simulation, for each t. A faster approach is to compute the τt2 coefficients using the asymptotic expression for x(τ ) given in (10). This gives error performance nearly identical to the earlier approach with significant time savings, but still requires advance computation. Both these methods are referred to as “offline” as the τt2 values are computed a priori. A simple way to estimate τt2 online during the decoding process is as follows. In each step t, after producing z t as in (2), we estimate n τbt2 = 1X 2 kz t k2 z . = n n i=1 i (15) The justification for this estimate comes from the analysis of the AMP decoder in [11], [14], which shows that for large n, τbt2 is close to τt2 in (5) with high probability. In particular, [14] provides a concentration inequality for τbt2 similar to (14). We note that such a similar online estimate has been used previously in various AMP and GAMP algorithms [8]–[10], [15]. Here, we show that in addition to being fast, the online estimator permits an interpretation as a measure of SPARC decoding progress and provides a flexible termination criterion for the decoder. Furthermore, the error performance with the online estimator was observed to be the same or slightly better than the offline methods. Recall from the discussion at the beginning of Section II that in each step, we have st := β t + A∗ z t ≈ β + τt Z, (16) where Z is a standard normal random vector independent of β. Starting from τ02 = σ 2 + P , a judicious choice of power allocation ensures that the SE parameter τt2 decreases with t, until it converges at τT2 = σ 2 in a finite number of iterations T. However, at finite lengths there are deviations from this trajectory of τt2 predicted by SE, i.e., the variance of the Fig. 10. Comparison between offline and online trajectories of the effective noise variance, at L = 1024, M = 512, P = 15, σ 2 = 1, R = 1.6. The dashed line represents the pre-computed SE trajectory of τt2 . The plot shows 15 successful runs, and one uncommon run with many section errors. The true value of Var[st − β] during decoding tracks τbt2 too precisely to distinguish on this plot. effective noise vector (st −β) may deviate from τt2 . The online estimator τbt2 is found to track Var(st −β) = kst −βk2 /n very accurately, even when this variance deviates significantly from τt2 . This effect can be seen in Figure 10, where 16 independent decoder runs are plotted and compared with the SE trajectory for τt2 (dashed line). For the 15 successful runs, the empirical variance Var(st − β) approaches σ 2 = 1 along different trajectories depending on how the decoding is progressing. In the unsuccessful run, Var(st − β) converges to a value much larger than σ 2 . In all the runs, τbt2 is indistinguishable from Var(st − β). This indicates that we can use the final value τbT2 to accurately estimate the power of the undecoded sections — and thus the number of sections decoded correctly — at runtime. Indeed, (b τT2 − σ 2 ) is an accurate estimate of the total power in the incorrectly decoded sections. This, combined with the fact that the power allocation is non-increasing, allows the decoder to estimate the number of incorrectly decoded sections. Furthermore, we can use the change in τbt2 between iterations to terminate the decoder early. If the value τbt2 has not changed between successive iterations, or the change is within some small threshold, then the decoder has stalled and no further iterations are worthwhile. Empirically we find that a stopping criterion with a small threshold (e.g., stop when 2 |b τt2 − τbt−1 | < PL ) leads to no additional errors compared to running the decoder for the full iteration count, while giving a significant speedup in most trials. Allowing a larger threshold for the stopping criterion gives even better running time improvements. This early termination criterion based on τbt2 gives us flexibility in choosing the number of blocks B in the iterative power allocation algorithm of Section II-A. This is because the number of AMP iterations is no longer tied to B, hence B can be chosen as large as desired. To summarize, the online estimator τbt2 provides an estimate of the noise variance in each AMP iteration that accurately reflects how the decoding is progressing in that trial. It thereby enables the decoder to effectively adapt to deviations from the τt2 values predicted by SE. This explains the improved 9 performance compared to the offline methods of computing τt2 . More importantly, it provides an early termination criterion for the AMP decoder as well as a way to track decoding progress and predict the number of section errors at runtime. V. P REDICTING ESEC , EBER AND ECW For a given power allocation {P` } and reasonably large SPARC parameters (n, M, L), it is desirable to have a quick way to estimate the section error rate and codeword error rate, without resorting to simulations. Without loss of generality, we assume that the power allocation is asymptotically good, i.e., the large system limit SE parameters (computed using (10)) predict reliable decoding, i.e., the SE converges to xT = 1 and τT2 = σ 2 in the large system limit. The goal is to estimate the finite length section error rate Esec . One way to estimate Esec is via the state evolution prediction (13), using τT = σ. However, computing (13) requires computing L expectations, each involving a function of M independent standard normal random variables. The following result provides estimates of Esec and Ecw that are as accurate as the SE-based estimates, but much simpler to compute. Proposition 1. Let the power allocation {P` } be such that the state evolution iteration using the asymptotic approximation (10) converges to τT2 = σ 2 . Then, under the idealized assumption that β T +A∗ z T = β+τT Z (where Z is a standard normal random vector independent of β), we have the following. The probability of a section (chosen uniformly at random) being incorrectly decoded is M −1  √ L nP` 1X EU Φ +U . (17) Ēsec = 1 − L σ `=1 The probability of the codeword being incorrectly decoded is M −1  √ L Y nP` Ēcw = 1 − EU Φ +U . (18) σ Fig. 11. Comparison of codeword error rate between simulation results and Perr -based analysis, for Ecw with varying M . L = 1024, R = 1.5, Eb /N0 = 5.7dB. Results are well matched even when concentration is poor. error can be computed as  p nP` + σZ`,1 > σZ`,j , 2 ≤ j ≤ M Perr,` = 1 − P √   Z Y M nP` P Z`,j < =1− + u Z`,1 = u φ(u)du σ R j=2 M −1  √ nP` +U , = 1 − EU Φ σ (19) where φ and Φ denote the density and the cumulative distribution function of the standard normal distribution, respectively. In the second line of (19), we condition on Z`,1 and then use the fact that Z`,1 , . . . , Z`,M are i.i.d. ∼ N (0, 1). The probability of a section chosen uniformly at random PL being incorrectly decoded is L1 `=1 Perr,` . The probability of codeword error is one minus the QLprobability that no section is in error, which is given by 1− `=1 (1−Perr,` ). Substituting for Perr,` from (19) yields the expressions in (17) and (18). `=1 In both expressions above, U is a standard normal random variable, and Φ(.) is the standard normal cumulative distribution function. Proof: As τT2 = σ 2 , the effective observation in the final iteration has the representation β + σZ. The denoising function η T generates a final estimate based on this effective observation, and the index of the largest entry in each section b Consider is chosen to form the decoded message vector β. the decoding of section ` of β. Without loss of generality, we can assume that the first entry of the section is the non-zero one. Using the notation β`,j to denote √ the jth entry of the section β` , we therefore have β`,1 = nP` , and β`,j = 0 for 2 ≤ j ≤ M . As the effective observation for section ` has the representation (β T + A∗ z T )` = β` + σZ` , the section will be incorrectly decoded if and only if the following event occurs: np o np o nP` + σZ`,1 ≤ σZ`,2 ∪. . .∪ nP` + σZ`,1 ≤ σZ`,M . Therefore, the probability that the `th section is decoded in The section error rate and codeword error rate can be estimated using the idealized expressions in (17) and (18). This still requires computing L expectations, but each expectation is now a function of a single Gaussian random variable, rather than the M independent ones in the SE estimate. Thus we reduce the complexity by a factor of M over the SE approach; evaluations of Ēsec and Ēcw typically complete within a second. SE Figure 7 shows Ēsec alongside the SE estimate Esec for L = 1024, and various values of M . We see that both these estimates match the simulation results closely up to a certain value of M . Beyond this point, the simulation results diverge from theoretical estimates due to lack of concentration in section error rates across trials, as described in Sec. III-A. Figure 11 compares the idealized codeword error probability in (18) with that obtained from simulations. Here, there is a good match between the estimate and the simulation results as the concentration of section error rates across trials plays no role — any trial with one or more section errors corresponds to one codeword error. 10 Figure 12 shows that for L = 1024, the best value of M among those considered increases from M = 29 at lower snr values to M = 213 at higher snr values. This is due to the effect discussed in Section III-A, where larger snr values can support larger values of M , before performance starts degrading due to loss of concentration. At both R = 1 and R = 1.5, the SPARCs outperform the LDPC coded modulation at Eb /N0 values close to the Shannon limit, but the error rate does not drop off as quickly at higher values of Eb /N0 . One way to enhance SPARC performance at higher snr is by treating it as a high-dimensional modulation scheme and adding an outer code. This is the focus of the next section. Fig. 12. Comparison with LDPC coded modulation at R = 1 Fig. 13. Comparison with LDPC coded modulation at R = 1.5 VI. C OMPARISON WITH C ODED M ODULATION In this section, we compare the performance of AMPdecoded SPARCs against coded modulation with LDPC codes. Specifically, we compare with two instances of coded modulation with LDPC codes from the WiMax standard IEEE 802.16e: 1) A 16-QAM constellation with a rate 12 LDPC code for an overall rate R = 1 bit/channel use/real dimension, and 2) A 64-QAM constellation with a rate 21 LDPC code for an overall rate R = 1.5 bits/channel use/real dimension. (The spectral efficiency is 2R bits/s/Hz.) The coded modulation results, shown in dashed lines in Figures 12 and 13, are obtained using the CML toolkit [16] with LDPC code lengths n = 576 and n = 2304. Each figure compares the bit error rates (BER) of the coded modulation schemes with various SPARCs of the same rate, including a SPARC with a matching code length of n = 2304. Using P = Eb R and σ 2 = N20 , the signal-to-noise ratio of the b SPARC can be expressed as σP2 = 2RE N0 . The SPARCs are implemented using Hadamard-based design matrices, power allocation designed using the iterative algorithm in Sec. II-A with B = L, and online τbt2 parameters with the early termination criterion (Sec. IV). An IPython notebook detailing the SPARC implementation is available at [17]. VII. AMP WITH PARTIAL O UTER C ODES Figures 12 and 13 show that for block lengths of the order of a few thousands, AMP-decoded SPARCs do not exhibit a steep waterfall in section error rate. Even at high Eb /N0 values, it is still common to observe a small number of section errors. If these could be corrected, we could hope to obtain a sharp waterfall behavior similar to the LDPC codes. In the simulations of the AMP decoder described above, when M and RPA are chosen such that the average error rates are well-concentrated around the state evolution prediction, the number of section errors observed is similar across trials. Furthermore, we observe that the majority of sections decoded incorrectly are those in the flat region of the power allocation, i.e., those with the lowest allocated power. This suggests we could use a high-rate outer code to protect just these sections, sacrificing some rate, but less than if we naı̈vely protected all sections. We call the sections covered by the outer code protected sections, and conversely the earlier sections which are not covered by the outer code are unprotected. In [4], it was shown that a Reed-Solomon outer code (that covered all the sections) could be used to obtain a bound the probability of codeword error from a bound on the probability of excess section error rate. Encoding with an outer code (e.g., LDPC or Reed-Solomon code) is straightforward: just replace the message bits corresponding to the protected sections with coded bits generated using the usual encoder for the chosen outer code. To decode, we would like to obtain bit-wise posterior probabilities for each codeword bit of the outer code, and use them as inputs to a soft-information decoder, such as a sum-product or min-sum decoder for LDPC codes. The output of the AMP decoding algorithm permits this: it yields β T , which contains weighted section-wise posterior probabilities; we can directly transform these into bit-wise posterior probabilities. See Algorithm 2 for details. Moreover, in addition to correcting AMP decoding errors in the protected sections, successfully decoding the outer code also provides a way to correct remaining errors in the unprotected sections of the SPARC codeword. Indeed, after decoding the outer code we can subtract the contribution of the protected sections from the channel output sequence y, and re-run the AMP decoder on just the unprotected sections. The key point is that subtracting the contribution of the later 11 T β: ··· ··· ··· L sections Luser Lparity Lunprotected Lprotected LLDP C Fig. 14. Division of the L sections of β for an outer LDPC code (protected) sections eliminates the interference due to these sections; then running the AMP decoder on the unprotected sections is akin to operating at a much lower rate. Thus the decoding procedure has three stages: i) first round of AMP decoding, ii) decoding the outer code using soft outputs from the AMP, and iii) subtracting the contribution of the sections protected by the outer code, and running the AMP decoder again for the unprotected sections. We find that the final stage, i.e., running the AMP decoder again after the outer code recovers errors in the protected sections of the SPARC, provides a significant advantage over a standard application of an outer code, i.e., decoding the final codeword after the second stage. We describe this combination of SPARCs with outer codes below, using an LDPC outer code. The resulting error rate curves exhibit sharp waterfalls in final error rates, even when the LDPC code only covers a minority of the SPARC sections. We use a binary LDPC outer code with rate RLDP C , block length nLDP C and code dimension kLDP C , so that kLDP C /nLDP C = RLDP C . For clarity of exposition we assume that both nLDP C and kLDP C are multiples of log M (and consequently that M is a power of two). As each section of the SPARC corresponds to log M bits, if log M is an integer, then nLDP C and kLDP C bits represent an integer number of SPARC sections, denoted by LLDP C = nLDP C log M and Lprotected = kLDP C , log M respectively. The assumption that kLDP C and nLDP C are multiples of log M is not necessary in practice; the general case is discussed at the end of the next subsection. We partition the L sections of the SPARC codeword as shown in Fig 14. There are Luser sections corresponding to the user (information) bits; these sections are divided into unprotected and protected sections, with only the latter being covered by the outer LDPC code. The parity bits of the LDPC codeword index the last Lparity sections of the SPARC. For convenience, the protected sections and the parity sections together are referred to as the LDPC sections. For a numerical example, consider the case where L = 1024, M = 256. There are log M = 8 bits per SPARC section. For a (5120, 4096) LDPC code (RLDP C = 4/5) we obtain the following relationships between the number of the sections of each kind: (5120 − 4096) nLDP C − kLDP C = = 128, Lparity = log M 8 Luser = L − Lparity = 1024 − 128 = 896, Algorithm 2 Weighted position posteriors β` to bit posteriors p0 , . . . , plog M −1 for section ` ∈ [L] Require: β` = [β`,1 , . . . , β`,M ], for M a power of 2 Initialise bit posteriors p0 , . . . , plog M −1 ← 0 PM Initialise normalization constant c ← i=1 β`,i for log i = 0, 1, . . . , log M − 1 do b ← log M − log i − 1 k←i while k < M do for j = k + 1, k + 2, . . . , k + i do pb ← pb + β`,j /c end for k ← k + 2i end while end for return p0 , . . . , plog M −1 kLDP C 4096 = = 512, log M 8 = Lprotected + Lparity = 512 + 128 = 640, Lprotected = LLDP C Lunprotected = Luser − Lprotected = L − LLDP C = 384. There are Luser log M = 7168 user bits, of which the final kLDP C = 4096 are encoded to a systematic nLDP C = 5120bit LDPC codeword. The resulting L log M = 8192 bits (including both the user bits and the LDPC parity bits) are encoded to a SPARC codeword using the SPARC encoder and power allocation described in previous sections. We continue to use R to denote the overall user rate, and n to denote the SPARC code length so that nR = Luser log M . The underlying SPARC rate (including the overhead due to the outer code) is denoted by RSP ARC . We note that nRSP ARC = L log M , hence RSP ARC > R. For example, with R = 1 and L, M and the outer code parameters as chosen above, n = Luser (log M )/R = 7168, so RSP ARC = 1.143. A. Decoding SPARCs with LDPC outer codes At the receiver, we decode as follows: 1) Run the AMP decoder to obtain β T . Recall that entry j within section ` of β T is proportional to the posterior probability of the column j being the transmitted one for section `. Thus the AMP decoder gives section-wise posterior probabilities for each section ` ∈ [L]. 2) Convert the section-wise posterior probabilities to bitwise posterior probabilities using Algorithm 2, for each of the LLDP C sections. This requires O(LLDP C M log M ) time complexity, of the same order as one iteration of AMP. 3) Run the LDPC decoder using the bit-wise posterior probabilities obtained in Step 2 as inputs. 4) If the LDPC decoder fails to produce a valid LDPC codeword, terminate decoding here, using β T to produce β̂ by selecting the maximum value in each section (as per usual AMP decoding). 5) If the LDPC decoder succeeds in finding a valid codeword, we use it to re-run AMP decoding on the unprotected sections. For this, first convert the LDPC codeword 12 bits to a partial β̂LDP C as follows, using a method similar to the original SPARC encoding: a) Set the first Lunprotected M entries of β̂LDP C to zero, b) The remaining LLDP C sections (with M entries per section) of β̂LDP C will have exactly one-non zero entry per section, with the LDPC codeword determining the location of the non-zero in each section. Indeed, noting that nLDP C = LLDP C log M , we consider the LDPC codeword as a concatenation of LLDP C blocks of log M bits each, so that each block of bits indexes the location of the non-zero entry in one section of β̂LDP √ C . The value of the non-zero in section ` is set to nP` , as per the power allocation. Now subtract the codeword corresponding to β̂LDP C from the original channel output y, to obtain y 0 = y − Aβ̂LDP C . 6) Run the AMP decoder again, with input y 0 , and operating only over the first Lunprotected sections. As this operation is effectively at a much lower rate than the first decoder (since the interference contribution from all the protected sections is removed), it is more likely that the unprotected bits are decoded correctly than in the first AMP decoder. We note that instead of generating y 0 , one could run the AMP decoder directly on y, but enforcing that in each AMP iteration, each of the LLDP C sections has all its non-zero mass on the entry determined by β̂LDP C , i.e., consistent with Step 5.b). 7) Finish decoding, using the output of the final AMP decoder to find the first Lunprotected M elements of β̂, and using β̂LDP C for the remaining LLDP C M elements. In the case where nLDP C and kLDP C are not multiples of log M , the values LLDP C = nLDP C / log M and Lprotected = kLDP C / log M will not be integers. Therefore one section at the boundary of Lunprotected and Lprotected will consist of some unprotected bits and some protected bits. Encoding is not affected in this situation, as the LDPC encoding happens prior to SPARC codeword encoding. When decoding, conversion to bit-wise posterior probabilities is performed for all sections containing LDPC bits (including the intermediate section at the boundary) and only the nLDP C bit posteriors corresponding to the LDPC codeword are given to the LDPC decoder. When forming β̂LDP C , the simplest option is to treat the intermediate section as though it were unprotected and set it to zero. It is also possible to compute column posterior probabilities which correspond to the fixed LDPC bits and probabilities arising from y, though doing so is not covered in this paper. B. Simulation results The combined AMP and outer LDPC setup described above was simulated using the (5120, 4096) LDPC code (RLDP C = 4/5) specified in [18] with a min-sum decoder. Bit error rates were measured only over the user bits, ignoring any bit errors in the LDPC parity bits. Figure 15 plots results at overall rate R = 45 , where the underlying LDPC code (modulated with BPSK) can be compared to the SPARC with LDPC outer code, and to a plain SPARC with rate 45 . In this case RP A = 0, giving a flat power Fig. 15. Comparison to plain AMP and to BPSK-modulated LDPC at overall rate R = 0.8. The SPARCs are both L = 768, M = 512. The underlying SPARC rate when the outer code is included is RSP ARC = 0.94. The BPSK-modulated LDPC is the same CCSDS LDPC code [18] used for the outer code. For this configuration, Luser = 654.2, Lparity = 113.8, Lunprotected = 199.1, Lprotected = 455.1, and LLDP C = 568.9. Fig. 16. Comparison to plain AMP and to the QAM-64 WiMAX LDPC of Section VI at overall rate R = 1.5 The SPARCs are both L = 1024, M = 512. The underlying SPARC rate including the outer code is RSP ARC = 1.69. For this configuration, Luser = 910.2, Lparity = 113.8, Lunprotected = 455.1, Lprotected = 455.1, and LLDP C = 455.1. allocation. Figure 16 plots results at overall rate R = 1.5, where we can compare to the QAM-64 WiMAX LDPC code, and to the plain SPARC with rate 1.5 of Figure 13. The plots show that protecting a fraction of sections with an outer code does provide a steep waterfall above a threshold Eb value of N . Below this threshold, the combined SPARC 0 + outer code has worse performance than the plain rate R SPARC without the outer code. This can be explained as follows. The combined code has a higher SPARC rate RSP ARC > R, which leads to a larger section error rate for the first AMP decoder, and consequently, to worse bit-wise Eb below the posteriors at the input of the LDPC decoder. For N 0 threshold, the noise level at the input of the LDPC decoder is beyond than the error-correcting capability of the LDPC code, so the LDPC code effectively does not correct any section 13 errors. Therefore the overall performance is worse than the performance without the outer code. Above the threshold, we observe that the second AMP decoder (after subtracting the contribution of the LDPC-protected sections) is successful at decoding the unprotected sections that were initially decoded incorrectly. This is especially apparent in the R = 45 case (Figure 15), where the section errors are uniformly distributed over all sections due to the flat power allocation; errors are just as likely in the unprotected sections as in the protected sections. experimentation is necessary to determine the best tradeoff. An interesting direction for future work would be to develop an EXIT chart analysis to jointly optimize the design of the SPARC and the outer LDPC code. ACKNOWLEDGEMENT The authors thank the Editor and the anonymous referees for several helpful comments which improved the paper. R EFERENCES C. Outer code design choices In addition to the various SPARC parameters discussed in previous sections, performance with an outer code is sensitive to what fraction of sections are protected by the outer code. When more sections are protected by the outer code, the overhead of using the outer code is also higher, driving RSP ARC higher for the same overall user rate R. This leads to worse performance in the initial AMP decoder, which has to operate at the higher rate RSP ARC . As discussed above, if RSP ARC is increased too much, the bit-wise posteriors input to the LDPC decoder are degraded beyond its ability to successfully decode, giving poor overall performance. Since the number of sections covered by the outer code depends on both log M and nLDP C , various trade-offs are possible. For example, given nLDP C , choosing a larger value of log M corresponds to fewer sections being covered by the outer code. This results in smaller rate overhead, but increasing log M may also affect concentration of the error rates around the SE predictions, as discussed in Section III-A. We conclude with two remarks about the choice of parameters for the SPARC and the outer code. 1) When using an outer code, it is highly beneficial to have good concentration of the section error rates for the initial AMP decoder. This is because a small number of errors in a single trial can usually be fully corrected by the outer code, while occasional trials with a very large number of errors cannot. 2) Due to the second AMP decoder operation, it is not necessary for all sections with low power to be protected by the outer code. For example, in Figure 15, all sections have equal power, and around 30% are not protected by the outer code. Consequently, these sections are often not decoded correctly by the first decoder. Only once the protected sections are removed is the second decoder able to correctly decode these unprotected sections. In general the aim should be to cover all or most of the sections in the flat region of the power allocation, but [1] R. G. Gallager, Information theory and reliable communication. Springer, 1968. [2] A. Guillén i Fàbregas, A. Martinez, and G. Caire, Bit-interleaved coded modulation. Now Publishers Inc, 2008. [3] G. Böcherer, F. Steiner, and P. Schulte, “Bandwidth efficient and rate-matched low-density parity-check coded modulation,” IEEE Trans. Commun., vol. 63, no. 12, pp. 4651–4665, 2015. [4] A. Barron and A. Joseph, “Least squares superposition codes of moderate dictionary size are reliable at rates up to capacity,” IEEE Trans. Inf. Theory, vol. 58, no. 5, pp. 2541–2557, Feb 2012. [5] A. Joseph and A. R. Barron, “Fast sparse superposition codes have near exponential error probability for R < C,” IEEE Trans. Inf. Theory, vol. 60, no. 2, pp. 919–942, Feb. 2014. [6] A. R. Barron and S. Cho, “High-rate sparse superposition codes with iteratively optimal estimates,” in Proc. IEEE Int. Symp. Inf. Theory, 2012. [7] S. Cho and A. Barron, “Approximate iterative Bayes optimal estimates for high-rate sparse superposition codes,” in Sixth Workshop on Information-Theoretic Methods in Science and Engineering, 2013. [8] J. Barbier and F. Krzakala, “Replica analysis and approximate message passing decoder for superposition codes,” in Proc. IEEE Int. Symp. Inf. Theory, 2014, pp. 1494–1498. [9] J. Barbier, C. Schülke, and F. Krzakala, “Approximate message-passing with spatially coupled structured operators, with applications to compressed sensing and sparse superposition codes,” Journal of Statistical Mechanics: Theory and Experiment, no. 5, 2015. [10] J. Barbier and F. Krzakala, “Approximate message-passing decoder and capacity-achieving sparse superposition codes,” IEEE Trans. Inf. Theory, vol. 63, no. 8, pp. 4894 – 4927, 2017. [11] C. Rush, A. Greig, and R. Venkataramanan, “Capacity-achieving sparse superposition codes via approximate message passing decoding,” IEEE Trans. Inf. Theory, vol. 63, no. 3, pp. 1476–1500, March 2017. [12] C. Condo and W. J. Gross, “Sparse superposition codes: A practical approach,” in Proc. IEEE Workshop on Signal Processing Systems (SiPS), 2015. [13] ——, “Implementation of sparse superposition codes,” IEEE Trans. Signal Process., vol. 65, no. 9, pp. 2421–2427, 2017. [14] C. Rush and R. Venkataramanan, “The error exponent of sparse regression codes with AMP decoding,” in Proc. IEEE Int. Symp. Inf. Theory, 2017. [15] S. Rangan, “Generalized approximate message passing for estimation with random linear mixing,” in Proc. IEEE Int. Symp. Inf. Theory, 2011. [16] (2008) The coded modulation library. [Online]. Available: http://www. iterativesolutions.com/Matlab.htm [17] Python script for SPARC with AMP decoding. [Online]. Available: https: //github.com/sigproc/sparc-amp/blob/master/sparc amp.ipynb [18] 131.0-B-2 TM Synchonization and Channel Coding, CCSDS, August 2011. [Online]. Available: https://public.ccsds.org/Pubs/131x0b2ec1.pdf
7cs.IT
arXiv:1603.08314v1 [cs.CR] 28 Mar 2016 Active Cyber Defense Dynamics Exhibiting Rich Phenomena Ren Zheng Wenlian Lu Shouhuai Xu Fudan University Fudan University UT San Antonio [email protected] [email protected] ABSTRACT The Internet is a man-made complex system under constant attacks (e.g., Advanced Persistent Threats and malwares). It is therefore important to understand the phenomena that can be induced by the interaction between cyber attacks and cyber defenses. In this paper, we explore the rich phenomena that can be exhibited when the defender employs active defense to combat cyber attacks. To the best of our knowledge, this is the first study that shows that active cyber defense dynamics (or more generally, cybersecurity dynamics) can exhibit the bifurcation and chaos phenomena. This has profound implications for cyber security measurement and prediction: (i) it is infeasible (or even impossible) to accurately measure and predict cyber security under certain circumstances; (ii) the defender must manipulate the dynamics to avoid such unmanageable situations in real-life defense operations. Categories and Subject Descriptors D.4.6 [Security and Protection] General Terms Security, Theory Keywords Active cyber defense, active cyber defense dynamics, cyber attackdefense dynamics, cybersecurity dynamics, cyber security models 1. INTRODUCTION Malicious attacks in cyberspace will remain to be a big problem for the many years to come. This is fundamentally caused by the complexity of the Internet and computer systems (e.g., we cannot assure that a large software system has no security vulnerabilities). It is therefore important to understand and characterize the phenomena that can be exhibited at the global level of a cyber system, ranging from an enterprise network to the entire cyberspace. The emerging framework of Cybersecurity Dynamics [34, 35, 7, 4] offers a systematic approach for understanding, characterizing, and quantifying the phenomena as well as cyber security in general. Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]. HotSoS ’15, April 21 - 22, 2015, Urbana, IL, USA Copyright 2015 ACM 978-1-4503-3376-4/15/04...$15.00 http://dx.doi.org/10.1145/2746194.2746196. [email protected] The current generation of cyber defenses is often based on reactive tools that are known to have limited success. For example, infected/compromised computers cannot be cleaned up even by using multiple anti-malware tools together [21]. Moreover, reactive defense has a fundamental limitation, namely that the effect of attacks is automatically amplified by network connectivity, but the effect of reactive defenses is not. This attack-defense asymmetry had been implied by studies such as [29, 6, 3, 28, 39], but was not explicitly pointed out until [36]. One approach to overcoming the aforementioned attack-defense asymmetry is to adopt active cyber defense, which is to use the same mechanism that is exploited by attackers. More specifically, active defense aims to spread some “white” worms (called defenseware in this paper) to automatically identify and “kill” the malicious malwares in compromised/infected computers [2, 1, 30, 26, 16, 18, 14, 31]. In some sense, active cyber defense already takes place in cyberspace because (for example) the malware called Welchia attempts to “kill" the malware called Blaster in compromised computers [26, 22], but it may take some years for full-scale active cyber defenses to arise [18, 27, 32]. The first mathematical model for studying the global effectiveness of active cyber defense has been proposed recently [36]. In this paper, we further the study of active cyber defense dynamics from a new perspective. Our contributions. We substantially extend some aspects of the first mathematical model of active cyber defense dynamics [36] (to be fair, we should note that [36] offers some perspectives that are not considered in our model as well). The extensions can be characterized as follows. First, we accommodate more general attackpower and defense-power functions, meaning that our results are applicable to a broader setting than what is investigated in [36]. Second, we allow the attack network structure to be different from the defense network structure, which are assumed to be identical in [36]. This is important and realistic because the attack-defense interaction structures are often “overlay” networks on top of some physical networks, and as such, the defender and the attacker can use different structures based on their own defense/attack strategies. The extended model allows us to explore the rich phenomena that can be exhibited by active cyber defense dynamics. Specifically, we show that active cyber defense dynamics can exhibit the bifurcation and chaos phenomena (we call them unmanageable situations in cyber security). To the best of our knowledge, this is the first study that shows that bifurcation and chaos are relevant in the cyber security domain. These phenomena indicate limitations on the measurement and prediction of cyber security, and highlight that cyber defenders must manipulate the (active) cyber defense dynamics to avoid such unmanageable situations in real-life cyber defense operations. Disclaimer. The active cyber defense strategy explored in the present paper does not advocate that defenders should retaliate from attackers, because it is well known that the attackers, or more precisely the IP addresses that are launching attacks against the victims, could well be victims that are abused by the real attackers as stepping stones. Moreover, defensewares (i.e., “white” worms) are meant to clean up the compromised computers, not to compromise the secure computers. Most important of all, the active defense operations should be contained within the networks under the defender’s jurisdiction (e.g., an enterprise network defender may use active defense to clean up the enterprise network but not going beyond the enterprise’s perimeter). This can be assured, for example, by making the enterprise’s computers and firewalls recognize defensewares via digital signatures. This means that the enterprise computers will only run defensewares that are accompanied with digital signatures that can be verified by the computers’ hardware via an embedded signature verification key, and that the firewall recognizes and blocks out-bound defensewares. The rest of the paper is organized as follows. In Section 2, we present our active cyber defense dynamics model. In Section 3, we analyze equilibria (or attractors) of active cyber defense dynamics. In Section 4, we explore the transition between attractors. In Section 5, we investigate the emergence of bifurcation. In Section 6, we explore the chaos phenomenon. We discuss related prior work in Section 7 and conclude the paper in Section 8. The main notations we use are summarized as follows. R, R+ , C ℜ(ω), ℑ(ω) In GB , AB GR , AR Nv,G′ deg(v, G′ ) DA′ λ(M ) λ1 (M ) Bv (t), Rv (t) hBv (t)i B(t), R(t) B∗ f (·), g(·) θv,BR (t) θv,RB (t) the sets of real numbers, positive real numbers and complex numbers, respectively the real and imaginary parts of complex number ω ∈ C, respectively the n × n identity matrix GB = (V, EB ) is the defense network structure, AB is the adjacency matrix of GB GR = (V, ER ) is the attack network structure, AR is the adjacency matrix of GR Nv,G′ = {u ∈ V ′ : (u, v) ∈ E ′ } is the neighbors of v in graph/network G′ = (V ′ , E ′ ) deg(v) = |Nv | is node v’s in-degree in graph/network G′ = (V ′ , E ′ ) DA′ = [dvv ]n×n is a diagonal matrix corre′ ′ sponding to adjacency Pn matrix A = [avu ]n×n , where dvv = a is the in-degree of vu u=1 node v in graph G′ corresponding to A′ the set of eigenvalues of matrix M the eigenvalue of M with the largest real part (or λ1 when M is clear from the context) the probability that node v ∈ V is in sate blue (i.e., secure) and state red (i.e., compromised) at time t, respectively the average portion of blue Pnodes at time t ≥ 0, namely hBv (t)i = |V1 | v∈V Bv (t) B(t) = [B1 (t), . . . , Bn (t)], R(t) = [R1 (t), . . . , Rn (t)], where n = |V | the homogeneous equilibrium of B(t) as t → ∞, namely Bv (t) = σ ∀v ∈ V as t → ∞ f (·) : [0, 1] → {0} ∪ R+ is the defense-power function, g(·) : [0, 1] → {0} ∪ R+ is the attack-power function the probability that the state of node v changes from blue to red at time t the probability that the state of node v changes from red to blue at time t 2. EXTENDED ACTIVE CYBER DEFENSE DYNAMICS MODEL Review of the model in [36]. Suppose attacker and defender interact in a cyber system that consists of a finite node population V = {1, 2, · · · , n}, where each node can abstract/represent a computer. At any time t ≥ 0, a node v ∈ V is in one of two states: blue, meaning that the node is secure but vulnerable to attacks; red, meaning that the node is compromised. For a given cyber system, the attacker spreads computer malwares (e.g., Advanced Persistent Threats) to compromise computers, while the defender spreads defensewares (e.g., “white” worms) to detect and clean up (or “cure") the compromised computers. Suppose both the malwares and the defensewares spread over the same attack-defense network structure, namely a finite simple graph G = (V, E), where V = {1, 2, · · · , n} is the vertex set mentioned above, and E is the edge set such that (u, v) ∈ E means (i) a compromised node u can attack a secure node v and (ii) a secure node u can use active defense to detect and clean up a compromised node v. Our extension to the model in [36]. Rather than assuming the attacker and defender use the same attack-defense network structure, we consider two network structures: the defense network structure GB = (V, EB ) over which defensewares spread, and the attack network structure GR = (V, ER ) over which malwares spread. Both network structures are directed or undirected graphs. Specifically, (u, v) ∈ EB means a secure node u can use active defense to “cure” a compromised node v, and (u, v) ∈ ER means a compromised node u can attack a secure node v. We do not make any restrictions on the attack/defense network structures, except that we assume GB and GR are simple graphs with no self-edges.1 (For the purpose of illustrating results, we will use random graphs as concrete examples though.) Denote by AB = [aB vu ]n×n the adjacency matrix of GB where R aB vu = 1 if and only if (u, v) ∈ EB . Denote by AR = [avu ]n×n R the adjacency matrix of GR where avu = 1 if and only if (u, v) ∈ ER . Note that the representation accommodates both directed and undirected graphs. Denote by Bv (t) and Rv (t) the probability that node v ∈ V is in state blue (i.e., secure) and state red (i.e., compromised) at time t, respectively. Tv, BR(t) B (Blue) Tv, RB(t) R (Red) Figure 1: The state transition diagram for a node v ∈ V . Figure 1 depicts the state transition diagram for individual node v ∈ V , where θv,RB (t) is the probability that node v’s state changes from red to blue at time t, and θv,BR (t) is the probability that node v’s state changes from blue to red at time t. This leads to the following master equation of active cyber defense dynamics:    dBv (t) = θv,RB (t) · Rv (t) − θv,BR (t) · Bv (t) dt (1)   dRv (t) = θv,BR (t) · Bv (t) − θv,RB (t) · Rv (t) dt In order to specify θv,RB (t), we use the concept of defensepower function f (·) : [0, 1] → {0} ∪ R+ , which abstracts the 1 It is possible to accommodate privilege escalation in the present model, by treating a computer as a set of nodes that correspond to different privileges. We leave the details to future investigation. power of the defenseware in detecting and cleaning up compromised (red) nodes. In order to specify θv,BR (t), we use the concept of attack-power function g(·) : [0, 1] → {0} ∪ R+ , which abstracts the power of the malware in compromising secure (blue) nodes. It is intuitive that both defense-power and attack-power functions should be dependent on the defense and attack network structures, respectively. Therefore, we have the following general form:   X 1 θv,RB (t) = f  Bu (t) , deg(v, GB ) u∈N v,GB   X 1 Bu (t) θv,BR (t) = g  deg(v, GR ) u∈N v,GR where Nv,GB = {u : (u, v) ∈ EB } is the set of node v’s neighbors in graph GB and Nv,GR = {u : (u, v) ∈ ER } is the set of node v’s neighbors in graph GR . For the present characterization study, it is sufficient to require that the defense-power and attack-power functions possess some basic properties. First, we have f (0) = 0 because active defense must be launched from some blue node, and g(1) = 0 because attack must be launched from some red node. Second, we have f (x) > 0 for x ∈ (0, 1] because any active defense may succeed, and g(x) > 0 for x ∈ [0, 1) because any attack may succeed. Third, the two functions do not have to abide by any specific relation, except that they are differentiable (for the sake of analytic treatment). As a result, the master equation of active cyber defense dynamics, namely Eq. (1), becomes:   X dBv (t) 1 = f Bu (t) Rv (t) − dt deg(v, GB ) u∈N v,GB   X 1 Bu (t) Bv (t) g deg(v, GR ) u∈N v,GR   X dRv (t) 1 = g Bu (t) Bv (t) − dt deg(v, GR ) u∈N v,GR   X 1 f Bu (t) Rv (t) deg(v, GB ) u∈N v,GB dBv (t) v (t) + dRdt = 0 holds for dt + Rv (t) = 1 for all t and all v all t ≥ 0 and all v ∈ V , Since Bv (t) ∈ V . Therefore, we only need to consider the following master equation for v ∈ V :   h i X dBv (t) 1 = f Bu (t) 1 − Bv (t) − dt deg(v, GB ) u∈N v,GB   X 1 Bu (t) Bv (t). (2) g deg(v, GR ) u∈N v,GR The main research task is to analyze system (2) for all v ∈ V . Remark. When we investigate specific attacks and defenses, we need to obtain their concrete attack-power and defense-power functions. Similarly, when we investigate specific cyber systems, we need to obtain the concrete attack and defense network structures. These are important research problems that are orthogonal to the focus of the present paper because our characterization study deals with all possible attack-power and defense-power functions as well as all possible attack and defense network structures. In principle, these functions and structures do exist, although how to obtain them is an excellent problem for future investigation. 3. EQUILIBRIA AND THEIR STABILITY Equilibrium is an important concept for quantifying cyber security. Suppose σ is the equilibrium under certain active defense. We can quantify the effectiveness of active defense via the notion of σ-effectiveness because the dynamics converge to σ. Moreover, the stability of an equilibrium reflects the consequence/effect of perturbations, which can be caused (for example) by manipulations to the initial global state (e.g., the defender manually cleans up some compromised computers before launching active defense for more effectiveness — this may sound counterintuitive, but it actually shows the value of rigorous characterization study because the defender would not know this tactics otherwise). We consider a class of equilibria of Eq. (2), namely homogeneous equilibria [B1∗ , · · · , Bn∗ ] with B1∗ = . . . = Bn∗ = σ ∈ [0, 1]. This class contains the following: • All-blue equilibrium, denoted by B ∗ = 1; Bv∗ = 1 for all v ∈ V (i.e., active defense is 1-effective). • All-red equilibrium, denoted by B ∗ = 0; Bv∗ = 0 for all v ∈ V (i.e., active defense is 0-effective). • σ-equilibrium, denoted by B ∗ = σ ∈ (0, 1); Bv∗ = σ for all v ∈ V (i.e., active cyber defense is σ-effective). The Jacobian matrix of (2) near an equilibrium is denoted by h i −1 −1 M = (1 − σ)f ′ (σ)DA AB − σg ′ (σ)DA AR − B R h i f (σ) + g(σ) In . (3) 3.1 Existence and Stability of Equilibria We show that homogeneous equilibria exist under the following hypothesis (or condition): H0 : there exists some σ ∈ [0, 1] such that (1 − σ) · f (σ) = σ · g(σ) holds. P ROPOSITION 1. Under hypothesis H0 , B ∗ = σ ∈ [0, 1] is an equilibrium of (2). Moreover, B ∗ is stable if ℜ(µ) < 0 for all µ ∈ λ(M ), and unstable if ℜ(µ) > 0 for some µ ∈ λ(M ). P ROOF. Under hypothesis H0 , namely (1−σ)·f (σ) = σ·g(σ), we see that Bv∗ = σ satisfies dBv (t) = (1 − σ) · f (σ) − σ · g(σ) = 0, dt ∀ v ∈ V. Thus B ∗ = σ is an equilibrium. To see the stability of equilibrium B ∗ = σ ∈ [0, 1], we consider a small perturbation to B ∗ , namely δB = [B1 − B1∗ , · · · , Bn − Bn∗ ]. The linearization system of Eq. (2) near B ∗ leads to h i dδB −1 ′ −1 = (1 − σ)f ′ (σ)DA A − σg (σ)D A − B R A B R dt  h i (4) f (σ) + g(σ) In δB, where In is the identity matrix of size n. Note that M as defined in Eq. (3) is the coefficient matrix of linear system (4). The stability of equilibrium B ∗ = σ is determined by the eigenvalues of matrix M . For the general case GB = (V, EB ) 6= GR = (V, ER ), it can be shown that  −1 λ(M ) = λ (1 − σ)f ′ (σ)DA AB − B  h i −1 (5) σg ′ (σ)DA AR − f (σ) + g(σ) . R ∗ If ℜ(µ) < 0 for all µ ∈ λ(Mσ ), B = σ is locally stable; if ℜ(µ) > 0 for some µ ∈ λ(M ), B ∗ = σ is locally unstable. Proposition 1 can be simplified when σ = 0 and σ = 1. C OROLLARY 1. If g(1) = 0, then B ∗ = 1 is an equilibrium. It is locally stable if −g ′ (1) < f (1) and locally unstable if −g ′ (1) > f (1). If f (0) = 0, then B ∗ = 0 is an equilibrium. It is locally stable if f ′ (0) < g(0) and locally unstable if f ′ (0) > g(0). P ROOF. To prove the first part, we observe that g(1) = 0 implies H0 holds for σ = 1, namely that B ∗ = 1 is an equilibrium of system (2). For σ = 1, it can be shown that Eq. (4) becomes h i dδB −1 = = − g ′ (1)DA A − f (1)I δB. R n R dt Proposition 1 says that a sufficient condition under which equilibrium B ∗ = 1 is locally stable is   −1 −g ′ (1)ℜ(µ) < f (1), ∀ µ ∈ λ DA A . (6) R R Since g(1) = 0 and g(x) ≥ 0 for x ∈ [0, 1], g(x) is locally non-increasing at x = 1 and thus −g ′ (1) ≥ 0. Since the sum −1 for every row in matrix DA AR equals 1, the Perron-Frobenius R theorem [10] says that its largest eigenvalue is 1. From Eq. (6), we have   −1 −g ′ (1)ℜ(µ) < −g ′ (1) < f (1), ∀ µ ∈ λ DA AR . R That is, if −g ′ (1) < f (1), then B ∗ = 1 is locally stable; if   −1 −g ′ (1) > f (1), there exists at least one eigenvalue µ0 ∈ λ DA AR , R say µ0 = 1, such that −g ′ (1)ℜ(µ0 ) − f (1) > 0, meaning that B ∗ = 1 is locally unstable. To prove the second part, we observe that f (0) = 0 implies H0 with σ = 0, namely that B ∗ = 0 is an equilibrium of (2). For σ = 0, Eq. (4) becomes h i dδB −1 ′ −1 = (1 − 0) · f ′ (0)DA A − 0 · g (0)D A − B R A B R dt  h i f (0) + g(0) In δB h i −1 = f ′ (0)DA A − g(0)I δB. B n B Proposition 1 says that the sufficient condition for equilibrium B ∗ = 0 to be locally stable is   −1 f ′ (0)ℜ(µ) < g(0), ∀ µ ∈ λ DA A . (7) B B Since f (0) = 0 and f (x) ≥ 0 for x ∈ [0, 1], f (x) is locally non-decreasing at x = 0 and thus f ′ (0) ≥ 0. Since the largest −1 eigenvalue of DA AB is 1, from Eq. (7) we have B   −1 f ′ (0)ℜ(µ) < f ′ (0) < g(0), ∀ µ ∈ λ DA AB . B That is, if f ′ (0) < g(0), then B ∗ = 0 is locally stable; if f ′ (0) >  −1 g(0), there exists at least one eigenvalue µ0 ∈ λ DA AB , say B µ0 = 1, such that f ′ (0)ℜ(µ0 ) − g(0) > 0, meaning that B ∗ = 0 is locally unstable. In the special case GB = GR , namely AB = AR , we immediately obtain the following corollary of Proposition 1: C OROLLARY 2. Suppose hypothesis H0 holds and GB = GR = −1 G (i.e., AB = AR = A). Let µ1 be the eigenvalue of DA A that has the smallest real part. If the attack-power and defense-power functions satisfy one of the following two conditions: f (σ) + g(σ) > 1, (i). (1 − σ)f ′ (σ) − σg ′ (σ) > 0 and (1 − σ)f ′ (σ) − σg ′ (σ) f (σ) + g(σ) (ii). (1 − σ)f ′ (σ) − σg ′ (σ) < 0 and < (1 − σ)f ′ (σ) − σg ′ (σ) ∗ ℜ(µ1 ), then equilibrium B = σ ∈ [0, 1] is locally stable. If the attack-power and defense-power functions satisfy one of the two following conditions: f (σ) + g(σ) (i). (1 − σ)f ′ (σ) − σg ′ (σ) > 0 and < 1, (1 − σ)f ′ (σ) − σg ′ (σ) f (σ) + g(σ) > (ii). (1 − σ)f ′ (σ) − σg ′ (σ) < 0 and (1 − σ)f ′ (σ) − σg ′ (σ) ∗ ℜ(µ1 ), then equilibrium B = σ ∈ [0, 1] is locally unstable. 3.2 Examples Example 1: Stability effect of different defense-power functions vs. a fixed attack-power function. Suppose GB = GR is an Erdös-Rényi (ER) random graph instance G = (V, E) with |V | = 2, 000 and edge probability p = 0.005 (i.e., every pair of nodes is connected with probability 0.005, independent of each other). We consider attack-power function g(x) = 1 − x against the following four scenarios of defense-power function f (x): • Scenario I: f (x) = x2 , meaning that B ∗ = 0 is stable and B ∗ = 1 is unstable. • Scenario II: f (x) = x2 +x, meaning that B ∗ = 0 is unstable and B ∗ = 1 is stable. • Scenario III: f (x) = x2 + 21 x, meaning that B ∗ = 0 and B ∗ = 1 are stable, but B ∗ = 21 is unstable. • Scenario IV: f (x) = −2x2 + 2x, meaning that B ∗ = 21 is stable, but B ∗ = 0 and B ∗ = 1 are unstable. P Figure 2 plots the phase portraits of hBv (t)i = |V1 | v∈V Bv (t), the portion of secure nodes. We observe that the simulation results confirm the analytic results. Specifically, Figure 2(a) shows that hBv (t)i converges to B ∗ = 0 when Bv (0) < 1 for all v ∈ V ; Figure 2(b) shows that hBv (t)i converges to B ∗ = 1 when Bv (0) > 0 for all v ∈ V ; Figure 2(c) shows that hBv (t)i converges to B ∗ = 1 when Bv (0) > 0.5 for all v ∈ V and converges to B ∗ = 0 when Bv (0) < 0.5 for all v ∈ V ; Figure 2(d) shows that hBv (t)i converges to B ∗ = 0.5 when 0 < Bv (0) < 1 for all v ∈ V . time t [0, 150] [150, 300] [300, 400] [400, 500] f (x) f (x) = x2 + x f (x) = x2 f (x) = −2x2 + 2x f (x) = x2 + 21 x g(x) g(x) = 1 − x g(x) = 1 − x g(x) = 1 − x g(x) = 1 − x B∗ B∗ B∗ B∗ B∗ =1 =0 = 0.5 =1 Table 1: The dynamics go to the respective equilibrium B ∗ under some combinations of defense-power function f (x) and attack-power function g(x). 0.6 0.6 perturbations, the overall cyber security dynamics never enter any persistent equilibrium. This offers one possible explanation why real-life cyber security is perhaps never in any equilibrium. v 0.4 4 6 8 10 12 14 16 18 0 0 20 2 4 6 8 t 10 12 14 16 18 20 t 1 0.8 0.6 0.6 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 2 4 6 8 10 12 14 16 18 20 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 10 20 30 40 t 50 60 70 80 90 100 35 40 45 50 14 16 18 20 t (a) ν = 0.5 (b) ν = 0.8 6 8 10 12 14 16 18 0 0 20 2 4 6 8 t 10 12 14 16 18 20 t ∗ v 4 〈B (t)〉 2 ∗ (c) Scenario III: B = 0 and (d) Scenario IV: B = 0 and B ∗ = 1 are stable, B ∗ = 12 is B ∗ = 1 are unstable, B ∗ = 12 unstable. is stable. Now we study the stability of the equilibria. For the GB = GR mentioned above, we consider the above four scenarios as highlighted in Table 1. More specifically, for time t ∈ [0, 150], the defense-power function is f (x) = x2 + x and the attack-power function is g(x) = 1 − x (i.e, the above Scenario I); for time t ∈ [150, 300], the defense-power function is f (x) = x2 and the attack-power function is g(x) = 1 − x (i.e., the above Scenario II); for time t ∈ [300, 400], the defense-power function is f (x) = −2x2 + 2x and the attack-power function is g(x) = 1 − x (i.e., the above Scenario IV); for time t ∈ [400, 500], the defensepower function is f (x) = x2 + 12 x and the attack-power function is g(x) = 1 − x (i.e., the above Scenario III). 1 0.6 v 〈B (t)〉 10 15 20 25 30 35 40 45 50 5 10 15 20 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 2 4 6 8 10 25 30 t (d) ν = 1 12 t (e) ν = 1.5 14 16 18 20 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 2 4 6 8 10 12 t (f) ν = 2 Figure 4: Phase portraits of the portion of secure nodes hBv (t)i: f (x, ν) = νx − 2x2 and g(x) = (1 − 2x)2 . Example 2: Stability effect of parameterized defense-power functions vs. a fixed attack-power function. Suppose GB = GR is an ER graph G = (V, E) with |V | = 2, 000, but with edge probability p = 0.5. We consider the following parameterized defense-power function f (x, ν) with parameter ν ∈ (0, +∞) and fixed attackpower function g(x): f (x, ν) = νx − 2x2 , g(x) = (1 − 2x)2 . 0.8 0.4 0.2 0 0 5 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 (c) ν = 0.85 v Figure 2: Phase portraits of the four scenarios confirming the stabilities of the equilibria, where x-axis represents time, and y-axis represents the portion of secure nodes hBv (t)i. 1 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 0 0 t 〈B (t)〉 0 0 0.4 0.2 0.2 〈Bv(t)〉 0.4 〈Bv(t)〉 v 〈B (t)〉 1 0.8 v 〈B (t)〉 (a) Scenario I: B ∗ = 0 is stable, (b) Scenario II: B ∗ = 0 is unstaB ∗ = 1 is unstable. ble, B ∗ = 1 is stable. v 2 〈B (t)〉 0 0 0.4 0.2 0.2 〈Bv(t)〉 〈B (t)〉 1 0.8 v 〈B (t)〉 1 0.8 50 100 150 200 250 300 350 400 450 500 t Figure 3: Active cyber defense dynamics lack persistent equilibrium due to frequent perturbations. Figure 3 plots a very probable scenario that can happen to the portion of secure nodes, where three small perturbations are imposed at t = 150, 300, 400. This scenario is very probable because it can explain why the cyber security state may rarely enter some persistent equilibrium. Specifically, the initial value Bv (0), v ∈ V , is randomly chosen from interval (0, 0.01] by the uniform distribution. At t = 150, we find that hBv (150)i = 1. We then impose a small perturbation on each Bv (150), by replacing Bv (150) with Bv (150) − εv where εv is an independent random variable of a uniform distribution in the interval [0, 0.01] for all v ∈ V . Similarly, we replace Bv (300) with Bv (300) + εv and Bv (400) with Bv (400) − εv for all v ∈ V . Figure 3 illustrates that under small Figure 4 plots the phase portraits of hBv (t)i with ν = 0.5, 0.8, 0.85, 1, 1.5, 2, respectively. The portraits can be classified into three classes. Figures 4(a)-4(b) show that there is one stable equilibrium B ∗ = 0. Figure 4(c) shows that there are three equilibria B ∗ = 0, 0.38, 0.2, where the first two are stable but the last one is unstable. Figures 4(d)-4(f) show that there exist two equilibria B ∗ = 0, σ with σ > 0, where B ∗ = 0 is unstable and B ∗ = σ is stable. We observe that active cyber defense dynamics exhibit different phenomena with respect to different parameters. Moreover, we observe a sort of phase transition in parameter ν: when ν ≤ 0.8, the global cyber security state converges to B ∗ = 0 almost regardless of the initial value; when ν ≥ 1, the global cyber security state converges to some B ∗ = σ > 0 almost regardless of the initial value; when 0.8 < ν = 0.85 < 1, the global cyber security state converges to some equilibrium dependent upon the initial value. We summarize the discussion in this section into: I NSIGHT 1. Active cyber defense dynamics may rarely enter into any equilibrium because of perturbations to the global security state as caused by the manual cleaning of some compromised computers (Figure 2), and/or because of perturbations to the attack/defense power function as caused by the introduction of a new attack/defense method (Figures 3-4 ) 4. TRANSITION BETWEEN MULTIPLE ATTRACTORS We are now ready to precisely characterize the transition between the equilibria, which reflects the consequence/effect of the defender manipulating the initial global security state (e.g., manually cleaning up some compromised computers before launching active defense) and/or manipulating the attack/defense network structure (e.g., by changing the network access control policy to block/allow certain computers to communicate with certain other computers). 4.1 Transition Between the All-blue and All-red Equilibria Under the conditions mentioned in Corollary 1, namely, f (0) = g(1) = 0, system (2) B ∗ = 1 and  has two locallystable equilibria n ∗ B = 0. Let B = B 1 , B2 , · · · , Bn ∈ [0, 1] and R = 1 − B =   1 − B1 , 1 − B2 , · · · , 1 − Bn ∈ [0, 1]n , where n = |V |. For τ1∗ , τ2∗ ∈ (0, 1), we define two sets ΞGB ,τ1∗ and ΞGR ,τ2∗ as follows: ( 1 deg(v, GB ) ( 1 deg(v, GR ) B ∈ [0, 1]n R ∈ [0, 1]n X ΞGB ,τ1∗ = ) Bu ≥ τ1∗ , ∀v ∈ V u∈Nv,G B X , ΞGR ,τ2∗ = ) Ru ≥ τ2∗ , ∀v ∈ V u∈Nv,G R (8) . (9) The following Theorem 1, whose proof is deferred to the Appendix, gives the transition between the all-blue and all-red equilibria by manipulating the initial state B(0). T HEOREM 1. Let GB = (V, EB ) and GR = (V, ER ) be two arbitrary graphs. Suppose that f (·) and g(·) are continuous with f (0) = g(1) = 0. Case 1: Suppose the attack-power and defense-power functions satisfy, ∀ z ∈ [τ1∗ , 1) and ∀ B ∈ ΞGB ,τ1∗ and some α > 0, f (z) > α · z, 1 deg(v, GB ) f g Bu + B X Bu u∈Nv,G GB ,τ1∗ R ! For the following two corollaries, we define   B ∈ [0, 1]n    B ∈ [0, 1]n  τ2∗ 1 deg(v, GB ) 1 deg(v, GR ) X u∈Nv,G B X u∈Nv,G R ΞGB ,τ ∗ =   ∗ Bu > τ , ∀ v ∈ V ,  ΘGR ,τ ∗ =   ∗ Bu < τ , ∀ v ∈ V .  On one hand, the following Corollary 3 says that when τ1∗ = = τ ∗ , we obtain the same threshold for the transitions. C OROLLARY 3. Suppose f (·) and g(·) are continuous with f (0) = g(1) = 0. There exist constants τ ∈ (0, 1) and α > 0 such that the following two conditions hold: (i) The attack-power and the defense-power functions satisfy f (z) > α · z for any z ∈ (τ ∗ , 1), and for any B ∈ ΞGB ,τ ∗  f 1 deg(v, GB ) u∈N X v,GB   Bu  + g  1 deg(v, GR ) X u∈Nv,G R  Bu  ≤ α. (ii) The attack-power and the defense-power functions satisfy g (z) > α(1 − z) for any z ∈ (0, τ ∗ ), and for any B ∈ ΘGR ,τ ∗     X X 1 1 Bu  + g  Bu  f deg(v, GB ) u∈N deg(v, GR ) u∈N v,GB v,GR ≤ α. ! u∈Nv,G 1 deg(v, GR ) If initial value B(0) ∈ Ξ X (10) security state B(0) to belong to ΞGB ,τ1∗ to make active defense 1-effective; this says what the defender should strive to do. Under certain other circumstances (case 2), the defender should make sure that the initial global security state B(0) does not cause R(0) = 1 − B(0) ∈ ΞGR ,τ2∗ , because in this regime active defense is 0effective; this says what the defender should strive to avoid. If initial value B(0) ∈ ΞGB ,τ ∗ , then lim Bv (t) = 1 ∀ v ∈ V ; if t→∞ initial value B(0) ∈ ΘGR ,τ ∗ , then lim Bv (t) = 0 ∀ v ∈ V . t→∞ ≤ α (11) , then lim Bv (t) = 1 ∀v ∈ V . t→∞ Case 2: Suppose the attack-power and defense-power functions satisfy, ∀ z ∈ [τ2∗ , 1) and ∀ R ∈ ΞGR ,τ2∗ and some β > 0, g (1 − z) > β · z and ! X 1 f 1− Ru + deg(v, GB ) u∈N v,GB ! X 1 g 1− Ru ≤ β (12) deg(v, GR ) u∈N v,GR If initial value R(0) ∈ ΞGR ,τ2∗ , then lim Rv (t) = 1 ∀v ∈ V . t→∞ On the other hand, the following Corollary 4 makes a connection to [36], by accommodating Theorems 1, 5, 8 and 9 in [36] as a special case with GB = GR and α = 1. C OROLLARY 4. Suppose GB = GR = G = (V, E) and f (·), and g(·) are continuous with f (0) = g(1) = 1. There exist τ ∗ ∈ (0, 1) and α > 0 such that the attack-power and defense-power functions satisfy f (z) + g (z) ≤ α ∀z ∈ [0, 1] and the defense-power function satisfy f (z) > α · z ∀z ∈ (τ ∗ , 1) and f (z) < α · z ∀z ∈ (0, τ ∗ ). If initial value B(0) ∈ ΞG,τ ∗ , then lim Bv (t) = 1 for all v ∈ V ; The cyber security meaning of Theorem 1 is: Under a certain condition (case 1), the defender needs to manipulate the initial global t→∞ if initial value B(0) ∈ ΘG,τ ∗ , then lim Bv (t) = 0 for all v ∈ V . t→∞ 2 2 g(x)=2(1−x) 1.8 −10x+5 f(x)=(e f (x) and g (x) 1.6 −1 +1) 1.4 1.2 1 initial value 0.8 0.6 paper, we may simplify the notation λ1 (M ) as λ1 unless there is potential ambiguity. Consider differentiable defense-power and attack-power functions f (x, ν) and g(x, ν) with parameter ν. Suppose ∂f , ∂g and ∂ν ∂ν ∂M all depend on ν. Consider the following critical condition for ∂ν Hopf bifurcation: ℜ(λ1 ) = 0 and ℑ(λ1 ) 6= 0. τ *= 0.5 0.4 0.2 0 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 x (a) f (x), g(x) and threshold τ ∗ = 0.5 satisfy the condition of transition between B ∗ = 0 and B ∗ = 1 1 Transition induced by initial values v 〈B (t)〉 0.9 It is known that if (13) holds for some ν = ν , λ1 (ν) is differen1 6= 0 at ν = ν ∗ , then system (2) exhibits Hopf tiable in ν, and dλ dν bifurcation [24]. Therefore, we need to find the critical value ν ∗ . For this purpose, we adopt the approach described in [20] to investigate how λ1 depends on the permutation to M , namely to conduct a perturbation spectral analysis to compute the perturbation to λ1 , denoted by δλ1 , as caused by perturbation to M , denoted by δM . 0.8 5.1 How to Estimate δλ1 0.7 Let x1 be the eigenvector of M associated to eigenvalue λ1 , namely, M x1 = λ1 x1 . For perturbation δM to M , M + δM can be described as M (ν) + M ′ (ν)δν. The perturbation to M causes perturbation δλ1 to λ1 and perturbation δx1 to x1 . That is,     M + δM x1 + δx1 = λ1 + δλ1 x1 + δx1 . 0.6 0.5 0.4 0.3 0.2 0.1 0 0 5 10 15 20 t (b) Transition induced by varying initial value hBv (0)i Figure 5: Transition between equilibria B ∗ = 0 and B ∗ = 1 as induced by varying the initial value. 4.2 Example We consider the transition between equilibria B ∗ = 0 and B ∗ = 1 as caused by varying the initial value B(0). We use two concrete defense-power and attack-power functions: f (x) = 1 , g(x) = 2(1 − x)2 , e−10x+5 + 1 which are plotted in Figure 5(a). The graphs GB and GR are two ER graph instances with |V | = 2, 000 and p = 0.5. We consider the transition induced by varying the initial value hBv (0)i between 0 and 1. Figure 5(b) shows that when hBv (0)i > 0.5, the dynamics converge to B ∗ = 1; when hBv (0)i < 0.5, the dynamics converge to B ∗ = 0. The exploration in this section can be summarized as: I NSIGHT 2. A small change in the initial global security state, in the model parameters, in the attack network structure, or in the defense network structure can lead to substantial change in active cyber defense dynamics. A rigorous characterization, such as Theorem 1, can offer precise guidance on “what the defender should strive to do” and “what the defender should strive to avoid” (e.g., how to manipulate the dynamics to benefit the defender rather than the attacker). 5. (13) ∗ HOPF BIFURCATION We consider Hopf bifurcation near equilibrium B ∗ = σ ∈ (0, 1) under condition (1 − σ) · f (σ) = σ · g(σ). Recall that the stability of B ∗ = σ ∈ (0, 1) depends on λ1 (M ), where M , as defined in Eq. (3), is the Jacobian matrix of system (2). In the rest of the By ignoring the second-order term, we obtain M δx1 + δM x1 = λ1 δx1 + δλ1 x1 . (14) By multiplying both sides of Eq. (14) with the left eigenvector y1 corresponding to λ1 , we obtain y1⊤ M δx1 + y1⊤ δM x1 = y1⊤ λ1 δx1 + y1⊤ δλ1 x1 , y1⊤ λ1 δx1 + y1⊤ δM x1 = y1⊤ λ1 δx1 + y1⊤ δλ1 x1 , y1⊤ δM x1 = y1⊤ δλ1 x1 . As a result, we can estimate δλ1 as δλ1 = y1⊤ δM x1 , y1⊤ x1 (15) where δM can be estimated depending on whether the perturbation is to the attack and/or defense power (Case A below) or to the attack/defense network structure (Case B below). Case A: δM is caused by perturbation to attack- and/or defense power. Suppose the perturbation is imposed on parameter ν in the attack-power and defense-power functions f (x, ν) and g(x, ν), ∂g where ∂f and ∂ν depend on ν as mentioned above. The cyber ∂ν security meanings of such perturbations is (for example) that new attack and/or defense techniques are introduced. Note that δM (ν) (  ∂g ′ (σ, ν) −1 ∂f ′ (σ, ν) −1 DAB AB − σ DAR AR − = (1 − σ) ∂ν ∂ν   ) ∂f (σ, ν) ∂g(σ, ν) + In δν. ∂ν ∂ν In the special case GB = GR = G (i.e., the adjacency matrix AB = AR = A), we have   −1   M = (1 − σ)f ′ (σ) − σg ′ (σ) DA A − f (σ) + g(σ) In ,    the eigenvalues of M are (1 − σ)f ′ (σ) − σg ′ (σ) µ − f (σ) +  −1 g(σ) In for all µ ∈ λ(DA A), and the perturbation can be rewritten as (  ∂f ′ (σ, ν) ∂g ′ (σ, ν) −1 (1 − σ) −σ δM (ν) = DA A− ∂ν ∂ν   ) ∂f (σ, ν) ∂g(σ, ν) + In δν. ∂ν ∂ν Hence, (15) becomes h ∂f ′ (σ, ν) ∂g ′ (σ, ν) i −1 δλ1 = y1⊤ (1 − σ) DA A − −σ ∂ν ∂ν ,  h ∂f (σ, ν) ∂g(σ, ν) i In δν · x1 y1⊤ x1 . (16) + ∂ν ∂ν Case B: δM is caused by perturbation to attack and/or defense network structure. Suppose the perturbation is imposed on GB = (V, EB ) and/or GR = (V, ER ) by adding/deleting edges. The cyber security meaning of such perturbations is that the network is disrupted (e.g., edges are deleted by the attacker, or security policies have changed) and then edges are added by the defender. We assume that the number of added/deleted edges is small (compared with |EB | and |ER |, respectively) so that we can approxi−1 mately treat δM as a small perturbation. Let CB = DA AB and B −1 CR = DAR AR . Perturbations to AB and AR lead to AB + δAB and AR + δAR , respectively. Correspondingly, we obtain the perturbations to CB and CR : δCB −1 −1 = DA (AB + δAB ) − DA AB , B B +δAB δCR −1 −1 = DA (AR + δAR ) − DA AR . R R +δAR Then, the perturbation to Jacobian matrix M is δM = (1 − σ)f ′ (σ)δCB − σg ′ (σ)δCR . From (15), we have h i y1⊤ (1 − σ)f ′ (σ)δCB − σg ′ (σ)δCR x1 δλ1 = . y1⊤ x1 Note that in the special case GB = GR = G (i.e., AB = AR = A) with perturbations δCB = δCR , we have h i δM = (1 − σ)f ′ (σ) − σg ′ (σ) δC, h i y1⊤ (1 − σ)f ′ (σ) − σg ′ (σ) δCx1 δλ1 = . y1⊤ x1 5.2 Example: Hopf Bifurcation Induced by Perturbation to Parameter In order to show that Hopf bifurcation can happen, we consider an ER graph GB = GR = G = (V, E) with |V | = 2, 000 and edge probability p = 0.005. Let µ1 denote the eigenvalue of −1 DA A with the smallest real part, where A is the adjacency matrix of G. For the ER graph, we have ℜ(µ1 ) = −0.3448. We consider the following defense-power and attack-power functions:  ν 2 f (x) = −4x2 + 4x, g(x, ν) = νx − , 2 where f (x) does not depend on ν. Recall that under condition (1 − σ)f (σ) = σg(σ), there exists equilibrium B ∗ = σ ∈ (0, 1). When ν = 3, we have homogeneous equilibrium B ∗ = 0.7, which is locally stable according to the second condition in the first part of Corollary 2: (1 − σ)f ′ (σ) − σg ′ (σ, 3) f (σ) + g(σ, 3) (1 − σ)f ′ (σ) − σg ′ (σ, 3) = −3 < 0, = −0.4 < ℜ(µ1 ) = −0.3448. When ν = 4, we have homogeneous equilibrium B ∗ = 0.6667, which is locally unstable according to the second condition in the second part of Corollary 2: (1 − σ)f ′ (σ) − σg ′ (σ, 4) f (σ) + g(σ, 4) (1 − σ)f ′ (σ) − σg ′ (σ, 4) = −4 < 0 = −0.3333 > ℜ(µ1 ) = −0.3448. Therefore, there is a critical value between ν = 3 and ν = 4, at which ℜ(λ1 (M )) = 0. By conducting 100 independent simulation runs of ν ∈ [3, 4) with step-length 0.01, we find the critical value ν = 3.8 and the corresponding equilibrium B ∗ = 0.6724, where (1 − σ)f ′ (σ) − σg ′ (σ, 3.8) f (σ) + g(σ, 3.8) (1 − σ)f ′ (σ) − σg ′ (σ, 3.8) = 7 − 3.81 < 0, = −0.3448 = ℜ(µ1 ). Figure 6(a) plots the periodic trajectory of hBv (t)i when ν = 4 > 3.8, which surrounds equilibrium B ∗ = 0.6724. Figure 6(b) plots the periodic trajectory of hBv (t)i when ν = 5.05 > 3.8. Figure 6(c) plots the bifurcation diagram with respect to ν ∈ (3, 6). Figure 6(d) plots the bifurcation diagram with respect to ν ∈ (4.75, 5.5). We observe that when ν ∈ (5, 5.5), there are not only two-periodic trajectories, but also k-periodic trajectories (k > 2). In summary, the periodic trajectories exhibit the perioddoubling cascade phenomenon. 5.3 Example: Hopf Bifurcation Induced by Perturbation to Attack/Defense Network Structures For the purpose of demonstrating the bifurcation phenomenon caused by perturbation to network structures, we use two randomly generated ER graph examples GB = (V, EB ) and GR = (V, ER ), both with |V | = 2, 000 and p = 0.005. The average degree is 10.0565 for GB and 11.1865 for GR . We use the following defense-power and attack-power functions:  ν 2 f (x) = −4x2 + 4x, g(x, ν) = νx − with ν = 6 2 We perform 100 iterations of operations to GR as follows: during each of the first 50 iterations, we delete 226 edges (or 1% of the edges in the original ER ) chosen independently and uniformly at random; during each of the following 50 iterations, we add 226 edges chosen independently and uniformly random among all the unconnected edges. That is, we delete and then add 50% edges of the original |ER |. Figure 7 demonstrates that the period-doubling cascade phenomenon appears and finally leads to chaos after deleting more than 36% edges and before adding 14% edges. We observe that eventually the diagram becomes stable after adding the same number of edges as those deleted. (Note that Figure 7 is not symmetric because the added edges are random and in general are different from the edges that are deleted.) The following insight summarizes the exploration of this section. I NSIGHT 3. Active cyber defense dynamics can exhibit Hopf bifurcation, when the attack/defense power varies in certain parameter regimes and/or when the attack/defense network structure varies 0.67 0.633 Limit cycle Multi period 0.647 0.669 0.645 〈Bv(t)〉 〈Bv(t)〉 0.668 0.667 0.643 0.641 0.639 0.666 0.637 0.665 0.635 0.664 0 50 100 150 200 250 300 350 400 450 0.633 0 500 50 100 150 t 200 250 300 350 400 450 500 t (a) Periodic trajectory of hBv (t)i with ν = 4 (b) Periodic trajectory of hBv (t)i w/ ν = 5.05 0.65 0.685 Hopf bifurcation Diagram Hopf bifurcation Diagram 0.675 0.645 0.655 〈Bv 〉 〈Bv 〉 0.665 0.645 0.635 0.64 0.635 0.625 0.615 3.5 4 4.5 5 5.5 6 0.63 4.75 4.875 ν 5 5.125 5.25 5.375 5.5 ν (c) Bifurcation diagram w/ ν ∈ (3, 6) (d) Bifurcation diagram w/ ν ∈ (4.75, 5.5) Figure 6: Limit cycle and Hopf bifurcation diagram, where hBv i are the extremum points of hBv (t)i in time period t ∈ (1000, 2000). 0.632 Diagram chaos region 0.63 0.626 v 〈B 〉 0.628 0.624 0.622 v,G 0.62 0.618 0 −10 −20 −30 −40 −50 +10 +20 +30 +40 +50 Percentage of deleting (−) or adding (+) edges (%) Figure 7: Hops bifurcation induced by perturbation to the network structure. in certain patterns. These situations are “unmanageable” because it would be infeasible, if not impossible, to estimate the global security state in real-time. Therefore, the defender must strive to avoid such unmanageable situations by manipulating the dynamics carefully (e.g., by disrupting the bifurcation condition or containing the attack-power of the adversary). 6. case, system (2) becomes   h i X dBv (t) 1 = f Bu (t) 1 − Bv (t) − dt deg(v, G) u∈N v,G   X 1 g Bu (t) Bv (t). deg(v, G) u∈N CHAOS Figure 6(c) shows that the number of periodic points increase with parameter ν, which hints that system (2) can exhibit the chaos phenomenon. To see this, we consider the case GB = GR . In this  Let F Bv (0), t denote the right-hand part. Consider Bv (0) and Bv (0) + εv (0) for all v ∈ V , where εv (0) ∈ Rn is a small perturbation to the initial point Bv (0). Then, we have ∀v ∈ V ,   εv (t) = F Bv (0) + εv (0), t − F Bv (0), t  = DF Bv (0), t · εv (0),  where DF Bv (0), t is the Jacobian matrix of the map F at time t. By the QR decomposition of matrix ε(t) = [ε1 (t), ε2 (t), · · · , εn (t)] where n = |V |, we obtain matrix ε(t) = q(t) · r(t), where q(t) is an orthogonal matrix and r(t) is an upper triangular matrix. Note that ε(t) = q(t) and the diagonal element λii (t) of rt at time t is the exponential magnification, where i ∈ {1, 2, · · · , n}. Thus, theaverage rate of divergence or convergence of the two trajectories F Bv (0), t t ≥ 0 and {F Bv (0) + εv (0), t t ≥ 0 for all v ∈ V is defined by Li = lim t→∞ 1 ln λii (t), t where Li for i = 1, 2, · · · , n are the Lyapunov characteristic exponents. It is known [24] that under some mild conditions, the above limit exists and is finite for almost all initial values B(0) = [B1 (0), B2 (0), · · · , Bn (0)] and for almost all matrices ε(0). Note that MLE = max1≤i≤n Li indicates whether the dynamical system is chaotic or not. More specifically, when MLE > 0, a small perturbation to the initial value will lead to an exponential separation and therefore leads to the chaos phenomenon. Example. Consider an ER graph instance GB = GR with |V | = 2, 000 and p = 0.005, and the following defense-power and attackpower functions:  ν 2 . f (x) = −4x2 + 4x, gν (x) = νx − 2 Maximal Lyapunov exponent (MLE) 0.06 0.04 0.02 0 −0.02 −0.04 1 2 3 4 5 6 7 8 9 10 [7, 4, 33, 37, 38, 17, 39, 29, 6, 3, 28, 23, 11, 12] and the references therein), which can be further traced back to the century-old studies on biological epidemic models [19, 13, 8]. As a specific kind of cybersecurity dynamics, active cyber defense dynamics were first rigorously modeled and studied in [36], despite that the idea of active defense has been discussed and debated for many years [14, 31, 18, 16, 26, 30, 1, 2]. We move a significant step beyond [36], by separating the attack network structure from the defense network structure, and by considering more general attack and defense power functions. To the best of our knowledge, we are the first to show that bifurcation and chaos are relevant in the cyber security domain, and to discuss the cyber security implications of these phenomena. Following [36], Lu et al. [17] investigate optimal active defense strategies in the ControlTheoretic and Game-Theoretic frameworks. Our study is complementary to [17] as we leave it to future work to investigate optimal strategies in our setting. It is worth mentioning that models of Lotka-Volterra type [9] capture the predator-prey dynamics, which are however different from the active cyber defense dynamics. Active cyber defense dynamics may be seen as the non-linear generalization of the socalled Voter model in complex networks [25, 15]. Somewhat related to our work is [5], which considers chaotic dynamics in discretetime limited imitation contagion model on random networks. ν (a) MLE with ν: MLE > 0 indicates chaos. 8. CONCLUSION 0.604 0.602 〈Bv(t)〉 0.6 0.598 0.596 0.594 0.592 0.59 0.588 0 100 200 300 400 500 t (b) hBv (t)i for ν = 8 exhibits chaos. Figure 8: Active cyber defense dynamics exhibit the chaos phenomenon: GB = GR with |V | = 2, 000 and p = 0.005. Figure 8(a) plots the MLE with respect to ν. We observe that MLE > 0 when ν > 5, meaning that system (17) exhibit chaos for ν > 5. Figure 8(b) plots the phase portrait of hBv (t)i (i.e., the average of the Bv (t)’s for all v ∈ V ) when ν = 8, which hints the emergence of chaos. This means that the defender should strive to avoid the parameter regime ν > 5. This leads to the following: I NSIGHT 4. Active cyber defense dynamics can be chaotic, meaning that it is impossible to predict the global cyber security state because it is too sensitive to the accuracy of the estimated initial global security state. Therefore, the defender must strive to avoid such unmanageable situations (e.g., by disrupting the attacks to assure ν ≤ 5 in the above example). 7. RELATED WORK Cybersecurity Dynamics is a framework for modeling and quantifying cyber security from a holistic perspective (rather than modeling and analyzing security of components or building-blocks) [34, 35, 36, 17]. This framework builds on a large body of literature across Computer Science, Mathematics and Statistical Physics (cf. We have explored the rich phenomena that can be exhibited by active cyber defense dynamics. To the best of our knowledge, our study is the first to show that bifurcation and chaos are relevant in the cyber security domain. The implication is of high practical value: In order to make cyber security measurement and prediction feasible, the defender must manipulate the cyber security dynamics to avoid these unmanageable situations. Interesting problems for future research include: First, we need to characterize non-homogeneous equilibria as we only focused on homogeneous equilibria. Second, we need to characterize which graph structure is more advantageous to the other (e.g., GB is ER graph but GR is power-law graph). Third, we need to explore the chaos phenomenon further (e.g., multi-direction chaos). Fourth, we need to systematically validate the models. Acknowledgement. We thank the reviewers for their useful comments and Marcus Pendleton for proofreading the paper. Wenlian Lu was supported in part by the National Natural Sciences Foundation of China under Grant No. 61273309, the Program for New Century Excellent Talents in University (NCET-13-0139), the Programme of Introducing Talents of Discipline to Universities (B08018), and the Laboratory of Mathematics for Nonlinear Science, Fudan University. Shouhuai Xu was supported in part by ARO Grant #W911NF-12-1-0286 and NSF Grant #1111925. 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 any of the funding agencies. 9. REFERENCES [1] D. Aitel. Nematodes – beneficial worms. http://www. immunityinc.com/downloads/nematodes.pdf, Sept. 2005. [2] F. Castaneda, E. Sezer, and J. Xu. Worm vs. worm: preliminary study of an active counter-attack mechanism. In Proceedings of ACM WORM’04, pages 83–93, 2004. [3] D. Chakrabarti, Y. Wang, C. Wang, J. Leskovec, and C. Faloutsos. Epidemic thresholds in real networks. ACM Trans. Inf. Syst. Secur., 10(4):1–26, 2008. [4] G. Da, M. Xu, and S. Xu. A new approach to modeling and analyzing security of networked systems. In Proceedings of HotSoS’14, pages 6:1–6:12. [5] P. S. Dodds, K. D. Harris, and C. M. Danforth. Limited imitation contagion on random networks: Chaos, universality, and unpredictability. Phys. Rev. Lett., 110:158701, Apr 2013. [6] A. Ganesh, L. Massoulie, and D. Towsley. The effect of network topology on the spread of epidemics. In Proceedings of IEEE Infocom 2005, 2005. [7] Y. Han, W. Lu, and S. Xu. Characterizing the power of moving target defense via cyber epidemic dynamics. In Proceedings of HotSoS’14, pages 10:1–10:12. [8] H. Hethcote. The mathematics of infectious diseases. SIAM Rev., 42(4):599–653, 2000. [9] J. Hofbauer and K. Sigmund. The theory of evolution and dynamical systems. Cambridge University Press, 1998. [10] R. Horn and C. Johnson. Matrix Analysis. Cambridge University Press, 1985. [11] J. Kephart and S. White. Directed-graph epidemiological models of computer viruses. In IEEE Symposium on Security and Privacy, pages 343–361, 1991. [12] J. Kephart and S. White. Measuring and modeling computer virus prevalence. In IEEE Symposium on Security and Privacy, pages 2–15, 1993. [13] W. Kermack and A. McKendrick. A contribution to the mathematical theory of epidemics. Proc. of Roy. Soc. Lond. A, 115:700–721, 1927. [14] J. Kesan and C. Hayes. Mitigative counterstriking: Self-defense and deterrence in cyberspace. Harvard Journal of Law and Technology (forthcoming, available at SSRN: http://ssrn.com/abstract=1805163). [15] P. L. Krapivsky. Kinetics of monomer-monomer surface catalytic reactions. Phys. Rev. A, 45:1067–1072, Jan 1992. [16] H. Lin. Lifting the veil on cyber offense. IEEE Security & Privacy, 7(4):15–21, 2009. [17] W. Lu, S. Xu, and X. Yi. Optimizing active cyber defense dynamics. In Proceedings of GameSec’13, pages 206–225. [18] W. Matthews. U.s. said to need stronger, active cyber defenses. http://www.defensenews.com/story. php?i=4824730, 1 Oct 2010. [19] A. McKendrick. Applications of mathematics to medical problems. Proc. of Edin. Math. Soceity, 14:98–130, 1926. [20] A. Milanese, J. Sun, and T. Nishikawa. Approximating spectral impact of structural perturbations in large networks. Phys. Rev. E, 81:046112, Apr 2010. [21] J. Morales, S. Xu, and R. Sandhu. Analyzing malware detection efficiency with multiple anti-malware programs. In Proceedings of 2012 ASE CyberSecurity’12. [22] R. Naraine. ’friendly’ welchia worm wreaking havoc. http://www.internetnews.com/ent-news/ article.php/3065761/Friendly-Welchia -Worm-Wreaking-Havoc.htm, August 19, 2003. [23] R. Pastor-Satorras and A. Vespignani. Epidemic spreading in scale-free networks. PRL, 86(14):3200–3203, 2001. [24] R. Robinson. Dynamical Systems: Stability, Symbolic Dynamics, and Chaos (2dn Edition). CRC Press, 1999. [25] C. Schneider-Mizell and L. Sander. A generalized voter model on complex networks. Journal of Statistical Physics, 136(1):11, 2008. [26] B. Schneier. Benevolent worms. http://www. schneier.com/blog/archives/2008/02/ benevolent_worm_1.html, February 19, 2008. [27] L. Shaughnessy. The internet: Frontline of the next war? http://www.cnn.com/2011/11/07/us/darpa/, November 7, 2011. [28] P. Van Mieghem, J. Omic, and R. Kooij. Virus spread in networks. IEEE/ACM Trans. Netw., 17(1):1–14, Feb. 2009. [29] Y. Wang, D. Chakrabarti, C. Wang, and C. Faloutsos. Epidemic spreading in real networks: An eigenvalue viewpoint. In Proceedings of SRDS’03, pages 25–34. [30] N. Weaver and D. Ellis. White worms don’t work. ;login: The USENIX Magazine, 31(6):33–38, 2006. [31] H. S. N. Wire. Active cyber-defense strategy best deterrent against cyber-attacks. http://www. homelandsecuritynewswire.com/active -cyber-defense-strategy-best-deterrent -against-cyber-attacks, 28 June 2011. [32] J. Wolf. Update 2-u.s. says will boost its cyber arsenal. http://www.reuters.com/article/2011/11/ 07/cyber-usa-offensiveidUSN1E7A61YQ20111107, November 7, 2011. [33] M. Xu and S. Xu. An extended stochastic model for quantitative security analysis of networked systems. Internet Mathematics, 8(3):288–320, 2012. [34] S. Xu. Cybersecurity dynamics. In Proceedings of HotSoS’14, pages 14:1–14:2. [35] S. Xu. Emergent behavior in cybersecurity. In Proceedings of HotSoS’14, pages 13:1–13:2. [36] S. Xu, W. Lu, and H. Li. A stochastic model of active cyber defense dynamics. Internet Mathematics, 11(1):23–61, 2015. [37] S. Xu, W. Lu, and L. Xu. Push- and pull-based epidemic spreading in arbitrary networks: Thresholds and deeper insights. ACM TAAS, 7(3):32:1–32:26, 2012. [38] S. Xu, W. Lu, L. Xu, and Z. Zhan. Adaptive epidemic dynamics in networks: Thresholds and control. ACM TAAS, 8(4):19, 2014. [39] S. Xu, W. Lu, and Z. Zhan. A stochastic model of multivirus dynamics. IEEE TDSC, 9(1):30–45, 2012. APPENDIX Now we prove Theorem 1. P ROOF. We prove the theorem in the first statement with B(0) ∈ ΞGB ,τ1∗ , and the second statement with R(0) ∈ ΞGR ,τ2∗ can be proved similarly. First, we see that g(1) = 0 implies that B ∗ = 1 is an equilibrium of (2) according to Proposition 1. Define n o Vt = argmin Bv (t) = u Bu (t) = min Bv (t) v∈V v∈V for t ≥ 0. Since the case minv Bv (0) = 1, namely Bv (t) = 1 for all v ∈ V and t ≥ 0, is trivial, we assume minv Bv (0) < 1 without loss of any generality.PFor any v(0) ∈ V0 , the given condition (10) ∗ 1 implies deg(v(0),G u∈Nv(0),G Bu (0) ≥ τ1 , and thus we have B) B  ≥ 1 f deg(v(0), GB ) X u∈Nv(0),G X 1 α· deg(v(0), GB ) u∈N B v(0),GB  Bu (0) Bu (0), where “=” holds only when 1 deg(v(0),GB ) P u∈Nv(0),G Bu (0) = 1. Let t = 0 and v = v(0). Using Eq. (2) and condition (11), we have dBv(0) (t) dt  t=0  h i X 1 = f Bu (0) 1 − Bv(0) (0) − deg(v(0), GB ) u∈N v(0),GB   X 1 g Bu (0) Bv(0) (0) deg(v(0), GB ) u∈N v(0),GB   X 1 Bu (0) − αBv(0) (0) ≥ f deg(v(0), GB ) u∈N v(0),GB   ≥ α Bv(0) (0) − Bv(0) (0) (17) = 0. Since the equality signs hold in the two inequalities in Eq. (17) only when minv Bv (0) = 1, which corresponds to the trivial case mentioned above, we conclude that minv∈V Bv (t) strictly increases in a small time interval starting at t = 0 except P for the trivial case. 1 Let τ1∗∗ > τ1∗ such that deg(v(0),G u∈Nv(0),G Bu (0) > ) B B P 1 τ1∗∗ for all v ∈ V . We now show that deg(v,G u∈Nv,G Bu (t) > B) B τ1∗∗ for all P t > 0 and for all v ∈ V . Let t0 be the first time that ∗∗ 1 u∈Nv,G Bu (t) = τ1 for some v ∈ V , i.e. deg(v,GB ) B inf   τ  1 deg(v, GB ) X t0 =   ∗∗ Bu (t) > τ1 ∀t ∈ [0, τ ), ∀v ∈ V .  u∈Nv,G B ∗ We show t0 = +∞. Suppose t0 < +∞. P Let V be the node set ∗ 1 such that for each v ∈ V , deg(v,GB ) u∈Nv,G Bu (t) reaches B τ1∗∗ for the P first time. Then, for some v ∗ ∈ V ∗ , we know that 1 u∈Nv∗ ,G Bu (t) is not increasing at t = t0 . Howdeg(v ∗ ,GB ) B ever, it can be shown that   X d  1 Bu (t) dt deg(v ∗ , GB ) u∈N v∗ ,GB = ≥ 1 deg(v ∗ , GB ) u∈Nv∗ ,G 0,   t1 = sup t min Bv (t) is strictly increasing in [0, t) . v We show that t1 = +∞. Suppose that t1 is finite, meaning that minv∈V Bv (t) is not increasing at time t = t1 . Since it holds that minv∈V Bv (t1 ) > minv∈V Bv (0) > τ1∗ , by replacing B(0) with B(t1 ), we have   X 1 f Bu (t1 ) deg(v(t1 ), GB ) u∈N v(t1 ),GB > dBu (t) dt B t=t0 u,GB  Bw (t) − Bu (t0 ) where the equality signs hold only for the trivial case as in the case of Eq. (17) mentioned above (i.e., in all other cases the inequalities are strict). So we reach a contradiction, which means t0 = +∞. P ∗ 1 Owing to τ1∗∗ > τ1∗ , we have deg(v,G u∈Nv,G Bu (t) > τ1 B) B for all t > 0. That is, B(t) ∈ ΞGB ,τ1∗ for all t. Let t1 be the maximum time that minv∈V Bv (t) is strictly in- α deg(v(t1 ), GB ) X Bu (t1 ) u∈Nv(t ),G 1 B and therefore we can show dBv(t1 ) (t) dt  t=t1  X 1 ≥ f Bu (t1 ) − αBv(t1 ) (t1 ) deg(v(t1 ), GB ) u∈N v(t1 ),GB   X 1 ≥ α Bu (t1 ) − Bv(t1 ) (t1 ) deg(v(t1 ), GB ) u∈N v(t1 ),GB ≥ 0, where are inequalities are strict except for the trivial case — as discussed in the case of Eq. (17). That is, minv∈V Bv (t) strictly increases at t = t1 , which contradicts with the definition of t1 . Therefore, we have t1 = +∞ and minv∈V Bv (t) is strictly increasing in t ∈ [0, +∞). In order to show limt→∞ Bv (t) = 1 for all v ∈ V , we will prove that limt→∞ minv∈V Bv (t) = 1 for limt→∞ minv∈V Bv (t) ≤ limt→∞ Bv (t). Since Bv (t) is the probability that node v ∈ V is blue at time t, we have 0 ≤ Bv (t) ≤ 1 for all v ∈ V . Hence limt→∞ minv∈V Bv (t) exists. Suppose for the sake of contradiction that limt→∞ minv∈V Bv (t) < 1, meaning minv∈V Bv (t) < 1 for all t due to its strict increasing monotonicity. For any v(t) ∈ Vt , under the condition that Eq. (10) holds, there exists ε > 0 such that f (Bv(t) (t)) − αBv(t) (t) > ε for all t. Since minv∈V Bv (t) is strictly increasing for t ∈ [0, +∞), there exists T > 0 such that dBv(t) (t) dt t=t0 α · deg(v ∗ , GB )  X X 1  deg(u, G ) B w∈N u∈N v∗ ,GB ≥ X creasing, i.e B  h i X 1 Bu (t) 1 − Bv(t) (t) − = f deg(v(t), GB ) u∈N v(t),GB   X 1 Bu (t) Bv(t) (t) g deg(v(t), GB ) u∈N v(t),GB   ≥ f Bv(t) (t) − αBv(t) (t) > ε, for all t > T . This leads to Bv(t) (t) > Bv(T ) (T ) + ε(t − T ). Since minv∈V Bv (t) = Bv(t) (t) → ∞ as t → ∞, it contradicts with Bv (t) ≤ 1. Therefore, we conclude lim min Bv (t) = 1 and t→∞ v∈V lim Bv (t) = 1. t→∞
3cs.SY
CONDITIONAL QUANTILE SEQUENTIAL ESTIMATION FOR STOCHASTIC CODES arXiv:1508.06505v5 [math.ST] 20 May 2016 T. LABOPIN-RICHARD, F. GAMBOA, AND A. GARIVIER Abstract. This paper is devoted to the sequential estimation of a conditional quantile in the context of real stochastic codes with vector-valued inputs. Our algorithm is a combination of k-nearest neighbours and of a Robbins-Monro estimator. We discuss the convergence of the algorithm under some conditions on the stochastic code. We provide non-asymptotic rates of convergence of the mean square error and we discuss the tuning of the algorithm’s parameters. 1. Introduction Computer code experiments have encountered, in the last decades, a growing interest among statisticians in several fields (see [27] and references therein and also [19, 26, 22, 18, 5]...). In the absence of noise, a numerical black box g : Rd → R maps an input vector X to Y = g(X) ∈ R. When the black box does include some randomness, the code is called stochastic and the model is as follows: a random vector  ∈ Rm , called random seed, models the stochasticity of the function, while X is a random vector. The random seed and the input are assumed to be stochastically independent. The map g (which satisfies some regularity assumption specified below) is defined on Rd × Rm and outputs (1) Y = g(X, ) , hence yielding possibly different values for the same input X. One observes a sample of (X, Y ), without having access to the details of g. However, those observations are often expensive (for example when g has a high computational complexity) and one aims at learning rapidly some properties of interest on g. We focus in this work on the estimation of the conditional quantile of the output Y given the input X. For a given level α ∈ [1/2, 1) and for every possible input x ∈ Rd , the target is  θ∗ (x) := qα g(x, ) , x ∈ Rd , where qα (Z) := FZ−1 (α) is the quantile of level α of the random variable Z and FZ−1 (u) := inf{x : FZ (x) ≥ u} is the generalized inverse of the cumulative distribution function of Z. Moreover, we would like to estimate such a quantile for different values of x. Date: April 2, 2018. 1 2 T. LABOPIN-RICHARD, F. GAMBOA, AND A. GARIVIER 1.1. The algorithm. For a fixed value of x, there are several well-known procedures to estimate the quantile θ∗ (x). Given a sample (Yix )i=1...n of Y x := g(x, ), the empirical quantile is a solution. For a sequential estimation, one may use a Robbins Monro [23] estimator. This method permits to iteratively approximate the zero of a function h : R → R by a sequence of estimators defined by induction: θ0 ∈ Rd and for all n ≥ 0, θn+1 = θn − γn+1 H(θn , Zn+1 ) . Here, (γn ) is the learning rate (a deterministic step-size sequence), (Zn ) is an i.i.d sample of observations, and H is a noisy version of h. Denoting Fn := σ(Z1 , . . . Zn ), H is such that E(H(θn , Zn+1 )|Fn ) = h(θn ) . Classical conditions for the the choice of the step sizes (γn ) are X X γn2 < ∞, and γn = ∞. n n These conditions ensure the convergence of the estimates under weak assumptions. For example, convergence in mean square is studied in [23], almost sure consistency is considered in [7, 28], asymptotic rate of convergence are given in [13, 24, 25], while large deviations principles are investigated in [31]. There has been a recent interest on nonasymptotic results. Risk bounds under Gaussian concentration assumption (see [14]) and finite time bounds on the mean square error under strong convexity assumptions (see [21, 28] and references therein), have been given. Quantile estimation corresponds to the choice h : t 7→ F (t) − α, where F is the cumulative distribution function of the target distribution. One can show that the estimator ( θ0 ∈ R  (2) θn+1 = θn − γn+1 1Zn+1 ≤θn+1 − α . is consistent and asymptotically Gaussian (see [12] chapters 1 and 2 for proofs and details). It is important to remind, however, that the lack of strong convexity prevents most non-asymptotic results to be applied directly, except when the density is lowerbounded. We nevertheless mention that Godichon et al. prove in [8, 16] such nonasymptotic results for the adaptation of algorithm (2) to the case where Z is a random variable on an Hilbert space of dimension higher than 2. Of course, unless x can take a finite but small number of different values, it is not possible to use this algorithm with a sample of Y x for each x. Even more, when the code has a high computational complexity, the overall number of observations (all values of x included) must remain small, and we need an algorithm using only one limited sample (Xi , Yi )i=1...n of (X, Y ). Then, the problem is more difficult. For each value of x, we need to estimate quantile of the conditional distribution given x using a biased sample. To address this issue, we propose to embed Algorithm (2) into a non-parametric estimation procedure. For a fixed input x, the new algorithm only takes into account the pairs (Xi , Yi ) for which the input Xi is close to x, and thus (presumably) the law of Yi close to that of Y x . To set up this idea, we use the k-nearest neighbours method, introducing the sequential estimator: CONDITIONAL QUANTILE SEQUENTIAL ESTIMATION FOR STOCHASTIC CODES ( (3) 3 θ0 (x) ∈ R  θn+1 (x) = θn (x) − γn+1 1Yn+1 ≤θn (x) − α 1Xn+1 ∈kN Nn+1 (x) , where • kN Nn (x) is the set of the kn nearest neighbours of x for the euclidean norm on Rd . Denoting by ||X − x||(i,n) the ith statistic order of a sample (||Xi − x||)i=1...n of size n, we have {Xn+1 ∈ kN Nn+1 (x)} = {||Xn+1 − x|| ≤ ||X − x||(kn+1 ,n) } . In this work, we discuss choices of the form kn = bnβ c for 0 < β < 1, n ∈ N∗ . • (γn ) is the deterministic steps sequence. We also study the case γn = n−γ for 0 < γ ≤ 1, n ∈ N∗ . The k-nearest neighbours method of localization first appears in [29, 30] for the estimation of conditional expectations. In [6], Bhattacharya et al. apply it to the (nonrecursive) estimation of the conditional quantile function for real-valued inputs. If the the number of neighbours kn is small, then few observations are used and the estimation is highly noisy; on the other hand, if kn is large, then values of Yi may be used that have a distribution significantly different from the target. The challenge is thus to tune kn so as to reach an optimal balance between bias and variance. In this work, this tuning is combined with the choice of the learning rate. The main objective of this work is thus to optimize the two parameters of Algorithm (3), i.e. the step size γn and the number of neighbours kn . The paper is organized as follows: Section 2 deals with the almost sure convergence of the algorithm. Further, it contains the main result of our paper that is a non-asymptotic inequality on the mean square error from which an optimal choice of parameters is derived. In Section 3, we present some numerical simulations to illustrate our results. The technical points of the proofs are differed to Section 5. 2. Main results We explain here how to tune the parameters of the algorithm. We also provide conditions allowing theoretical guarantees of convergence. Before that, we start by some notation and technical assumptions. 2.1. Notation and assumptions. The constants appearing in the sequel are of three different types: 1) (L, U ) denote lower- and upper bounds for the support of random variables. They are indexed by the names of those variables; 2) (Ni )i∈N∗ are integers denoting the first ranks after which some properties hold; 3) (Ci )i∈N∗ are positive real numbers used for other purposes. Without further precision, constants of type 2) and 3) only depend on the model, that is, on g and on the distribution of (, X). Further, we will denote Ci (u) or Ni (u) for u ∈ P({α, x, d}) (the power set of a {α, x, d}) constant depending on the model, on 4 T. LABOPIN-RICHARD, F. GAMBOA, AND A. GARIVIER the probability level α, on the point x and on the dimension d. The values of all the constants are summarized in the Appendix. For any random variable Z, we denote by FZ its cumulative distribution function. We denote by Bx the set of the balls of Rd centred at x. For B ∈ Bx , we denote by rB its radius and for rB > 0, we call Y B a random variable with distribution L(Y |X ∈ B). Remark 2.1. If the pair (X, Y ) has a density f(X,Y ) and if the marginal density fX (x) is positive, then we can compute the density of L(Y |X = x) by fY |X=x = f(X,Y ) (x, .) , fX (x) and when B = {x}, L Y B = Y x = g(x, ) ∼ L(Y |X = x) . We will make four assumptions. The first one is hardly avoidable, since we deal with k-nearest neighbours. The three others are more technical. Assumption A1 For all x in the support of X (that we will denote Supp(X) in the sequel), there exists a constant M (x) such that the following inequality holds : ∀B ∈ Bx , ∀t ∈ R, |FY B (t) − FY x (t)| ≤ M (x)rB . In words, we assume that the stochastic code is sufficiently smooth. The law of two responses corresponding to two different but close inputs are not completely different. The assumption is clearly required, since we want to approximate the law L (Y x ) by the law L(Y |X ∈ kN Nn (x)). Remark 2.2. If we consider random vector supported by Rd × R, we can show that Assumption A1 holds, for example, as soon as (X, Y ) had a regular density. In all cases, it is easier to prove this assumption when the couple (X, Y ) has a density. See Subsection 3.1 for an example. Assumption A2 The law of X has a density and this density is lower-bounded by a constant Cinput > 0 on Supp(X). This hypothesis implies in particular that the law of X has a compact support. Notice that this kind of assumptions is usual in k-nearest neighbours context (see for example [15]). Assumption A3 The code function g takes its values in a compact [LY , UY ]. Under Assumption A3 and if β ≥ γ, then p C1 := max (UY − LY + (1 − α), UY + α − LY ) = UY − LY + α , is a bound of |θn (x) − θ∗ (x)| (see Lemma 5.8 in Appendix). Assumption A4 For all x, the law g(x, ) has a density which is lower-bounded by a constant Cg (x) > 0 on its support. CONDITIONAL QUANTILE SEQUENTIAL ESTIMATION FOR STOCHASTIC CODES 5   1−α Lemma 2.1. Denoting C2 (x, α) := min Cg (x), UY +α−L , , we have thanks to assumpY tion A4, (4) ∀n ∈ N∗ , [FY x (θn (x)) − FY x (θ∗ (x))] [θn (x) − θ∗ (x)] ≥ C2 (x, α) [θn (x) − θ∗ (x)]2 . Proof. When θn (x) ∈ [LY , UY ], it is obvious that the inequality (4) holds for C2 := Cg (x). When θn (x) ∈ [Lθn , LY ], we have Lθn ≤ θn (x) ≤ LY ≤ θ∗ (x) , and then FY x (θn (x)) = 0. Thus, (0 − α) θn (x) − θ∗ −α ≥ (θn (x) − θ∗ (x))2 LY − (1 − α) − UY (θn (x) − θ∗ (x))(FY x (θn (x)) − FY x (θ∗ (x))) = (θn (x) − θ∗ (x))2 ≥ C2 (x, α)(θn (x) − θ∗ (x))2 . The proof of the last case follows similarly using that C2 (x, α, d) ≥ 1−α UY +α−LY .  This assumption is useful to deal with non-asymptotic inequality for the mean square error. It is the substitute of the strong convexity assumption made in [21] which is not true in the case of the quantile. 2.2. Almost sure convergence. The following theorem studies the almost sure convergence of our algorithm. Theorem 2.1. Let x be a fixed input. Under Assumptions A1 and A2, Algorithm (3) is almost surely convergent whenever 12 < γ ≤ β < 1. Sketch of proof : In the sequel, we still denote Fn := σ (X1 , . . . , Xn , Y1 , . . . , Yn ) and En and Pn the conditional expectation and probability given Fn . For sake of simplicity, we denote  H(θn (x), Xn+1 , Yn+1 ) := 1Yn+1 ≤θn (x) − α 1Xn+1 ∈kN Nn+1 (x) . The proof is organized in three steps. 1) We decompose H(θn (x), Xn+1 , Yn+1 ) as a sum of a drift and a martingale increment : hn (θn ) := E(H(θn , Xn+1 , Yn+1 )|Fn ) and H(θn , Xn+1 , Yn+1 ) := hn (θn ) + ξn+1 . Then, Tn := θn (x) + n X γj hj−1 (θj−1 (x)) , j=1 is a martingale which is bounded in L2 . So it converges almost surely. 2) We show the almost sure convergence of (θn )n : 6 T. LABOPIN-RICHARD, F. GAMBOA, AND A. GARIVIER a) First, we check that (θn ) does not diverge to +∞ or −∞. b) Then, we prove that (θn ) converges almost surely to a finite limit. 3) We conclude by identifying the limit : θ∗ (x), the conditional quantile. Steps 2a), 2b) et 3) are shown by contradiction. The key point is that almost surely, after a certain rank, hn (θn ) > 0. This property is ensured by Assumptions A1 and A2. The entire proof is available in Section 5. Comments on parameters. In the Theorem 2.1, we assume that 0 < β < 1. β > 0 means that the number of neighbours goes to +∞ and then, ||X − x||(kn ,n) → 0. The condition β < 1 allows to apply the Lemma 5.4. It is a technical condition. The condition β ≥ γ can be understood in this way. When considering Algorithm (2), we deal with the global learning rate γn = n−γ . In Algorithm (3), since for a fixed input x, there is not an update at each step n, we introduce the effective learning rate γkn in the following way. At step k, θk (x) has a probability of k β /k to be updated. Then, until time n, the algorithm is updated a number of times equal to X N= k β−1 ∼ nβ . k≤n 1 Thus, there were N = n updates at time n β . Then, in mean, it is as if the algorithm was defined by   θkn (x) = θkn −1 (x) + γkn 1Ykn ≥θkn (x) − α , with the learning rate γk n =  1 n 1 β 1 γ = γ . nβ This is a well-known fact that this algorithm has a good behaviour if, and only if, the sum X X 1 γk n = γ , β n n n is divergent. That is if, and only if β > γ. At last, the condition 12 < γ < 1 is a classical assumption on the Robbins Monro algorithm to be consistent (see for example in [23]). Here, we restrict the condition to γ < 1 because we need 1 > β ≥ γ. 2.3. Rate of convergence of the mean square error.  Here, we studythe rate of converge of the mean square error denoted by an (x) := E (θn (x) − θ∗ (x))2 . Theorem 2.2. Under hypothesis A1, A2, A3 and A4, the mean square error an (x) of the algorithm (3) satisfies the following inequality : ∀(γ, β, ) such that 0 < γ ≤ β < 1 1 and 1 >  > 1 − β, ∀n ≥ N0 + 1 where N0 = 2 −(1−β) , an (x) ≤ exp (−2C2 (x, α)(κn − κN0 )) C1 + n X k=N0 +1  + C1 exp − 3n1− 8  , exp (−2C2 (x, α) (κn − κk )) dk CONDITIONAL QUANTILE SEQUENTIAL ESTIMATION FOR STOCHASTIC CODES where for j ∈ N∗ , κj = j X 7 i−−γ and i=1   1 +1   p kn kn d 3n1− + 2 C1 M (x)C3 (d)γn dn = C1 exp − + γn2 . 8 n n Sketch of proof : The idea of the proof is to establish the recursive inequality on an (x) (following [21]), that is for n ≥ N0 , an+1 (x) ≤ an (x)(1 − cn+1 ) + dn+1 N∗ , where for all n ∈ 0 < cn < 1 and dn > 0. We conclude by using Lemma 5.7. In this purpose we begin by expanding the square   2 (θn+1 (x) − θ∗ (x))2 = (θn (x) − θ∗ (x))2 + γn+1 (1 − 2α)1Yn+1 ≤θn (x) + α2 1Xn+1 ∈kN Nn+1 (x)  − 2γn+1 (θn (x) − θ∗ (x)) 1Yn+1 ≤θn (x) − α 1Xn+1 ∈kN Nn+1 (x) . Taking the expectation conditionally to Fn , and using the Bayes formula, we get (5)     2 2 2 En (θn+1 (x) − θ∗ (x)) ≤ En (θn (x) − θ∗ (x)) + γn+1 Pn h i − 2γn+1 (θn (x) − θ∗ (x)) Pn F Bkn+1 (x) (θn (x)) − FY x (θ∗ (x)) , Y n k where Pn = Pn (Xn+1 ∈ kN Nn+1 (x)) as in Lemma 5.1 and Bnn+1 (x) is the ball of Rd centred in x and of radius ||X − x||(kn+1 ,n) . We rewrite this inequality to make appear two different errors : 1) First, the quantity F Bkn+1 (x) (θn (x)) − FY x (θn (x)) represents the bias error Y n (made because the sample is biased). Using A1, we get |F (θn (x)) − FY x (θn (x))| ≤ M (x)||X − x||(kn+1 ,n) . √ and by A3, |θn (x) − θ∗ (x)| ≤ C1 . Thus, h i − 2γn+1 (θn (x) − θ∗ (x))Pn F Bkn+1 (x) (θn (x)) − FY x (θn (x)) Y n p ≤ 2γn+1 C1 M (x)Pn ||X − x||(kn+1 ,n) . kn+1 (x) Y Bn 2) The second quantity, FY x (θn (x)) − FY x (θ∗ (x)) represents the on-line learning error (made by using a stochastic algorithm). Thanks to Assumption A4 we get (θn − θ∗ ) [FY x (θn (x)) − FY x (θ∗ (x))] ≥ C2 (x, α) [θn (x) − θ∗ (x)]2 . Taking now the expectation of the inequality (5),we get   2 an+1 (x) ≤ an (x) − 2γn+1 C2 (x, α)E (θn (x) − θ∗ (x))2 Pn + γn+1 E(Pn+1 ) p + 2γn+1 M (x) C1 E(||X − x||(kn+1 ,n) Pn ) . This inequality reveals a problem : thanks to Lemmas 5.1 and 5.6 (and so thanks to assumption A2) we can deal with the two last terms, but we are not able to compute 8 T. LABOPIN-RICHARD, F. GAMBOA, AND A. GARIVIER   E (θn (x) − θ∗ (x))2 Pn . To solve this problem, we use a truncated parameter n . Instead of writing ah recursive inequality onian (x) we write such inequality with the quantity bn (x) := E (θn (x) − θ∗ (x))2 1Pn >n . Choosing n = (n + 1)− , we have to tune an other parameter but thanks to A3 and concentration inequalities (see lemma 5.4), it is easy to deduce a recursive inequality on an (x) from the one on bn (x), for n ≥ N0 . Comments on the parameters. We choose 0 < β < 1 for the same reasons as in Theorem 2.1. About γ, the inequality is true on the entire area 0 < γ < 1 as soon as γ ≤ β (which is unusual, as you can see in [16] for example). We will nevertheless see in the sequel that this is not because the inequality is true that an (x) converges to 0. We will discuss later good choices for (γ, β). Compromise between the two errors. We can easily see the compromise we have to do on β to deal with the two previous errors. Indeed, • The bias error gives the term   n X 1  , exp −2C2 (x, α)(x) k +γ k=N0 +1 of the inequality. This term decreases to 0 if and only if γ +  < 1 which implies β > γ. Then β has to be chosen not too small. • The on-line learning error gives the term (kn /n)1/d+1 = n(1−β)(1+1/d) in the remainder. For the remainder to decrease to 0 with the faster rate, we then need that β is as small as possible compared to 1. Then β has to be chosen not too big. From this theorem, we can get the rate of convergence of the mean square error. In that purpose, we have to study the order of the remainder dn in n to exhibit dominating terms. dn is the sum of three terms. The exponential one is always negligence as soon as n is big enough because 1 > . The two other are powers of n. Comparing their exponent, we can find the dominating term in function of γ and β. Actually, there exists a rank N1 (x, d) and some constants C5 and C6 (x, d) such that, for n ≥ N0 + 1, if β ≤ 1 − dγ, we get dn ≤ C5 n−2γ+β−1 . if β > 1 − dγ, we get 1 dn ≤ C6 (x, d)n−γ+(1+ d )(β−1) . Copying that in the Theorem 2.2, we deduce the following result. Corollary 2.1. Under assumptions of Theorem 2.2, there exists ranks N4 (x, α, d) and constants C7 (x, α, d) and C8 (x, α) such that ∀n ≥ N4 (x, α, d),   when β > 1 − dγ and 1 − β <  < min 1 − γ, 1 + d1 (1 − β) , an (x) ≤ C7 (d, x, α, , γ) . 1 n−+(1+ d )(1−β) CONDITIONAL QUANTILE SEQUENTIAL ESTIMATION FOR STOCHASTIC CODES 9 When β ≤ 1 − dγ, and 1 −  < min(1 − β + γ, 1 − γ), C8 (x, α) . nγ−β+1− Remark 2.3. For other values of γ and β, the derived inequalities do not imply the convergence to 0 of an (x) this is why we do not present them. an (x) ≤ From this corollary we can derive optimal choices for (β, γ), that is parameters for which our upper-bound on the mean square error decreases with the fastest rate. Corollary 2.2. Under the same assumptions than in Theorem 2.2, the optimal param1 and β = γ + ηβ where ηβ > 0 is as small as possible. With these eters are γ = 1+d parameters, there exists a constant C9 (x, α, d) such that ∀n ≥ N4 (x, α, d), an (x) ≤ where η = η 2 C9 (x, α, d) 1 n 1+d −η + ηβ and η = 1 − β − . Comments on the constant C9 (x, α, d). Like all the other constants of this paper, we know the explicit expression of C9 (x, α, d). An example of values of this constant is given in Subsection 3.1. We can notice that the constant C9 (x, α, d) depends on x only through Cg (x) and M (x). Nevertheless, often in practice, Cg (x) and M (x) do not really depend on x (see for example Subsection 3.1). In these cases (or when we can easily find a bound of Cg (x) and M (x) which do not depend on x), our result is uniform in x. Then, it is easy to deal with the integrated mean square error and conclude that Z C9 (α, d) . an (x)fX (x)dx ≤ 1 X n 1+d −η When α increases to 1, we try to estimate extremal quantile. C2 (x, α) becomes smaller and then C9 (x, α, d) increases. The bound gets worst. We can easily understand this phenomenon because when α is big, we have a small probability to sample on the right of the quantile, and the algorithm is then less powerful. Let us now comment the dependency on the dimension d. The constant C9 (x, d, alpha) decreases when the dimension d increases. Nevertheless, this decreasing is too small to −1 balance the behaviour of the rate of convergence which is in n 1+d . This is an example of the curse of dimensionality. Comment on the rank N4 (x, α, d). This rank is the maximum of four ranks. There are two kinds of ranks. The ranks (Ni )i6=0 depend on constants of the problem but are reasonably small, because the largest of them is the rank after which exponential terms are smaller than power of n terms, or smaller power of n terms are smaller than bigger power of n terms. They are then often inferior to N0 in practice. We only need this rank to find optimal parameters (and at this stage our reasoning is no more non-asymptotic). The rank N0 is completely different. It was introduced in the first theorem because we could not deal with an (x) directly. In fact it is the rank after which the deviation 10 T. LABOPIN-RICHARD, F. GAMBOA, AND A. GARIVIER inequality, allowing us to use bn (x), is true. It depends on the gap between  and 1 − β. The optimal  to obtain the rate of convergence of the previous corollary is  = 1 − β + η with η as small as possible. The constant η appears on the rank N0 and also on the rate of convergence (let us suppose that N4 = N0 which is the case most of time)   −1 η  ∀n ≥ N0 = exp 2η−1 , an (x) = O n 1+d + 2 +ηβ . Then the smaller is η , the faster is the rate of convergence, but also the larger is the rank after which inequalities are true. Let us give an example. For a budget of N = 1000 calls to the code, one may choose η = 0.3 for the inequality to be theoretically true for n = N . The Table 1 gives the theoretical precision for different values of d and compares it with the ideal case where η = 0. d 1 2 3 η =0.3 0.088 0.28 0.5 η =0 0.031 0.1 0.17 Table 1. Expected precision for the MSE when N = 1000 We can observe that, when η > 0, the precision increases with the dimension faster 1 < η /2 (d = 6 for our previous example), the than when η . Moreover, as soon as 1+d result does not allow to conclude that an decreases to 0 with this choice of η . Nonetheless, simulations (see next part) seem to show that this difficulty is only an artifice of our proof (we needed to introduce n because we do not know how to compute E((θn − θ∗ )Pn ), but it does not really exist when we implement the algorithm). In practice, the optimal rate of convergence for optimal parameters is reached early (see Section 3). 3. Numerical simulations In this part we present some numerical simulations to illustrate our results. We consider simplistic examples so as to be able to evaluate clearly the strengths ans the weaknesses of our algorithm. To begin with, we deal with dimension 1. We study two stochastic codes. 3.1. Dimension 1- square function. The first example is the very regular code g(X, ) = X 2 +  where X ∼ U([0, 1]) and  ∼ U([−0.5, 0.5]). We try to estimate the quantile of level α = 0.95 for x = 0.5 and initialize our algorithm to θ1 = 0.3. Let us check that our assumptions are fulfilled in this case. We have L(g(x, )) = U([− 21 + x2 ; 12 + x2 ]). Then f(X,Y ) (u, v) = 1[− 1 +u2 , 1 +u2 ] (v) . 2 2 Moreover, the code function g takes its values in the compact set [LY , UY ] = [− 12 ; 32 ]. Let us study assumption A1. Let B be an interval containing x, denoted B = [x − a, x + b] CONDITIONAL QUANTILE SEQUENTIAL ESTIMATION FOR STOCHASTIC CODES 11 (a > 0, b > 0), then Rt R f(X,Y ) (z, y)dydz −∞ B R |FY B (t) − FY x (t)| ≤ B R t R x+b ≤ − 12 x−a fX (z)dz Z t − f(X,Y ) (x, y)dy −∞ 1[− 1 +z 2 ; 1 +z 2 ] − 1[− 1 +z 2 ; 1 +z 2 ] (y)dzdy 2 2 2 2 µ(B) . Now, we have to distinguish the cases in function of the localization of t. There are lots of cases, but computations are nearly the same. That is why we will develop only one case here. When t ∈ [− 12 ; x2 − 21 ], we have R x+b R t |FY B (t) − FY x (t)| ≤ − 12 x−a 1[− 1 +z 2 ; 1 +z 2 ] − 1[− 1 +z 2 ; 1 +z 2 ] (y) 2 2 2 R x+b x−a  1z≥x (0) + 1z≤x (t − z 2 + 12 )1 q z≥ t+ 12 =  dz a+b Rx = 2 a+b x−a (t + 1 2 − z 2 )dz b+a . 1 There are again two different cases. Since t ∈ [− 12 ; x2 − 12 ], we always have (t + 12 ) 2 ≤ x. But the position of (t + 1/2)1/2 relative to (x − a) is not always the same. Then, if t ∈ [− 21 ; − 21 (x − a)2 ], we get R x+b |FY B (t) − FY x (t)| ≤ x−a (t − z 2 + 12 )dz b+a 1 x3 (x − a)3 ≤ (t + )a − + 2 3 3 ≤ (x − a)2 a − x2 a + a2 x − ≤ −a2 x + a3 3 2a3 3 2 , 3 as 0 < a < 1. Finally, in this case, A1 is true with M (x) = 2/3. We can compute exactly in the same way for the other cases and we always find an M (x) ≤ 2/3. The assumption A2 is also satisfied, taking Cinput = 1. We have already explained that assumption A3 is true for [LY , UY ] = [−1/2, 3/2]. Finally assumption A4 is also satisfied with Cg (x) = 1 and C2 (x, α) = 0.02. ≤ 0 + rB × 12 × 3.1.1. Almost sure convergence. Let us first deal with the almost sure convergence. We plot in Figure 1, for (β, γ) ∈ [0, 1]2 , the relative error of the algorithm. Best parameters are clearly in the area β > γ ≥ 1/2. We can even observe that for β ≈ 1, β ≤ γ or γ < 1/2, the algorithm does not converge almost surely (or very slowly). This is in accordance with our theoretical results. Nevertheless, we can observe a kind of 12 T. LABOPIN-RICHARD, F. GAMBOA, AND A. GARIVIER continuity for γ around 1/2 : in practice, the convergence becomes really slow only when γ is significantly far away from 1/2. Figure 1. Relative error for n = 5000 in fonction of β and γ 3.1.2. Mean Square Error (MSE). Let us study the best choice of β et γ in terms of L2 -convergence. We plot in Figures 2, the mean square error in function of γ and β (we estimate the MSE by a Monte Carlo method of 100 iterations). Figure 2. Mean square error in function of β and γ for the square function Simulations confirm that the theoretical optimal area γ = 0.5 and β = γ + ηβ gives the smallest MSE. Nevertheless, it seems that in practice we can relax the condition that the gap ηβ between β and γ is as small as possible. Indeed, when ηβ is reasonably big, simulations show that we are still in the optimal area. CONDITIONAL QUANTILE SEQUENTIAL ESTIMATION FOR STOCHASTIC CODES 13 3.1.3. Theoretical bound. In this case, we have at hand all the parameters to compute the theoretical bound of our theorems. In particular, in corollary 2.2, we get an (x) ≤ C9 (x, d, α) . 1 n 1+d −η Table 2 summarizes the value of the constants needed to compute the theoretical bound in this case. Constant Value Constant Value α M (x) Cinput Cg (x) C2 (x, α) UY − LY 2 0.95 1 1 0.02 2 3 √ C1 C3 (d) C4 (d) C5 (x, d) C6 (x, d) C9 (x, d, α) 2.95 7.39 2 1.95 12 180 Table 2. Constant values For N = 1000, we obtain the bound aN (x) ≤ 5.8 which is over-pessimistic compared to the practical results. We can then think to a way to improve this bound. First of all, the constant C2 (x, α) is in fact not so small. Indeed, we have to take a margin in the proof, for the case where θn goes out of [LY , UY ]. This happens only with a very small probability. If we do not take this case into account, we have C2 (x, α) = 1. Then C9 (x, α, d) ≈ 3.7 and then, for N = 1000, the bound is 0.11. Practical results are still better (we can observe that for n = 50 only, we have a MSE inferior to 0.05 !), but the gap is less important. 3.2. Dimension 1 - absolute value function. Let us see what happens when the function g is less smooth with respect to the first variable. We study the code g(X, ) = |X| +  , where X ∼ U ([−1, 1]) and  ∼ U ([−0.5, 0.5]). We want to study the conditional quantile in x = 0 (the point for which the differentiability fails). Assumptions can be checked as above. Since the almost surely convergence is true and gives really same kind of plots than the previous case, we only study the convergence of the MSE. In that purpose, we plot in Figure 3 the MSE (estimated by 100 iterations of Monte Carlo simulations) in function of γ and β, for n=300 (the discontinuity constraints us to make more iterations to have a sufficient precision) and θ1 = 0.3. Conclusions are the same than in the previous example concerning the best parameters. Nevertheless, we can observe that the lack of smoothness implies some strange behaviour around γ = 1. 3.3. Dimensions 2 and 3. In dimension d, we showed that theoretical optimal param1 and β = γ + η. To see what happens in practice, we still plot Monte eters are γ = 1+d Carlo estimations (200 iterations) of the MSE in function of γ and β. 3.3.1. Dimension 2. In dimension 2, we study two codes : g1 (X, ) = ||X||2 +  and g2 (X, ) = X12 + X2 +  ,  where X = (X1 , X2 ) ∼ U [−1, 1]2 and  ∼ U ([−0.5, 0.5]). In each case, we choose n = 400 and want to study the quantile in the input point x = (0, 0) and initialize our algorithm in θ1 = 0.3. In Figure 4, we can see that β = 1 and γ = 1 are still really 14 T. LABOPIN-RICHARD, F. GAMBOA, AND A. GARIVIER Figure 3. MSE in function of β and γ for absolut value function 1 bad parameters. As in our theoretical results, γ = 1+d = 31 seems to be the best choice. Nevertheless, even if it is clear that β < γ is a bad choice, the experiments seems to show that best parameter β is strictly superior to γ, more superior than in theoretical case, where we take β as close as possible of γ. As we said before, in practice, N0 seems not to be the true limit rank. Indeed, with only n = 400 iterations, in this case, the MSE, in the optimal parameters case reaches 0.06. Figure 4. Mean square error in function of β and γ 3.3.2. Dimension 3. In dimension 3, we study the two codes X3 g1 (X, ) = ||X||2 +  and g2 (X, ) = X12 + X2 + 3 +  , 2  3 where X = (X1 , X2 , X3 ) ∼ U [−1, 1] and  ∼ U ([−0.5, 0.5]). In each case, we choose n = 500 and want to study the quantile in the input point (0, 0, 0). The interpretation CONDITIONAL QUANTILE SEQUENTIAL ESTIMATION FOR STOCHASTIC CODES 15 of Figure 5 are the same than in dimension 2. The scale is not the same, the convergence is slower again but with n = 500 we nevertheless obtain a MSE of 0.10. Figure 5. Mean square error in function of β and γ 4. Conclusion and perspectives In this paper, we proposed a sequential method for the estimation of a conditional quantile of the output of a stochastic code where inputs lie in Rd . We introduced a combination of k-nearest neighbours and Robins-Monro estimator. The algorithm thus elaborated had then two parameters to tune : the number of neighbours kn = bnβ and the learning rate γn = n−γ . Obtaining a bias-variance decomposition of the risk, we showed that our algorithm is convergent for 21 < γ < β < 1 and we studied its mean square error non-asymptotic rate of convergence. Moreover, we proved that we have to 1 choose γ = 1+d and β = γ + ηβ (ηβ > 0) to get the best rate of convergence. Numerical simulations have showed that our algorithm with theoretical optimal parameters is really powerful to estimate a conditional quantile, even in dimension d > 1. The theoretical guarantees are shown under strong technical assumptions, but our algorithm is a general methodology to solve the problem. Relaxing the conditions will be the object of a future work. Moreover, the proof that we propose constrained us to use an artefact parameter  which implies that the non-asymptotic inequality is theoretically true for big n, even if simulations confirm that this problem does not exist in practice. A second perspective is then to find a better way to prove this inequality for smaller n. Finally, it is a very interesting future work to write non-asymptotic lower-bound for the mean square error of our algorithms. 5. Appendix 1 : Technical lemmas and proofs 5.1. Technical lemmas and notation. For sake of completeness, we start by recall and prove some well-known facts on order statistics. Lemma 5.1. When X has a density, denoting Pn = P(X ∈ kN Nn+1 (x)|X1 , . . . Xn ), we have the following properties 16 T. LABOPIN-RICHARD, F. GAMBOA, AND A. GARIVIER 1) Pn = F||X−x|| ||X − x||(kn+1 ,n) 2) Pn ∼ β(kn+1 , n − kn+1 + 1) n+1 . 3) E(Pn ) = kn+1 4) E(Pn2 ) =  2 2kn+1 n−kn+1 +3kn+1 +kn+1 n2 (n+1)2 (n+2) where we denote F||X−x|| the cumulative distribution function of the random vector ||X −x||, ||X −x||(kn+1 ,n) the kn+1 order statistic of the sample (||X1 −x||, . . . , ||Xn −x||) and β(kn+1 , n − kn+1 + 1) the beta distribution of parameters kn and n − kn+1 + 1. Proof. Conditionally to X1 , . . . , Xn , the event {X ∈ kN Nn+1 (x)} is equivalent to the event {||X − x|| ≤ ||X − x||(kn+1 ,n) }. Then, Pn = P(X ∈ kN Nn+1 (x)|X1 . . . Xn )  = PX ||X − x|| ≤ ||X − x||(kn+1 ,n) |X1 . . . Xn  = F||X−x|| ||X − x||(kn+1 ,n) . Since X has a density, the cumulative distribution function F||X−x|| is continuous. Indeed, using the sequential characterization we get for a sequence (tn ) converging to t F||X−x|| (tn ) = P(X ∈ Bd (x, tn )) Z = f (z)1Bd (x,tn ) (z) . Rd Since f is integrable, the Lebesgue theorem allows us to conclude that Z Z lim f (z)1Bd (x,tn ) (z) = lim f (z)1Bd (x,tn ) (z) = P(X ∈ Bd (x, t)) , n Rd Rd n so the cumulative distribution function is continuous. Then thanks to classical result on statistics order and quantile transform (see [9]), we get  Pn = F||X−x|| ||X − x||(kn+1 ,n) ∼ U(kn+1 ,n) ∼ β(kn+1 , n − kn+1 + 1) , where we denoted U(kn+1 ,n) the kn+1 statistic order of a independent sample of size n distributed like a uniform law on [0, 1].  Let us know recall some deviation results. Lemma 5.2. We denote B(n, p) the binomial distribution of parameters n and p, for n ≥ 1 and p ∈ [0, 1]. Then, if Z ∼ B(n, p), we get     Z p 3np P < ≤ exp − , n 2 32     Z 3np P > 2p ≤ exp − . n 8 Proof. Let (Zi ) be an independent sample of Bernoulli of parameter p and let n Z= 1X Zi . n k=1 CONDITIONAL QUANTILE SEQUENTIAL ESTIMATION FOR STOCHASTIC CODES 17 We apply the Bernstein’s inequality (see Theorem 8.2 of [11]) to conclude that   3np2 , P(Z − p < −p) ≤ exp − 8   3np2 P(Z − p > p) ≤ exp − . 8 The results follow by taking  = 1 2 in the first case and  = 1 in the second case.  We now give some technical lemma useful to prove our main results. Lemma 5.3. Suppose β ≥ γ. Then, for C ≥ 3, we get ! P X γn 1Xn ∈kN Nn (x) ≤ C =0. n L Proof. First, it is a well known result (see [9]) that if U ∼ U([0, 1]), then X = F −1 (U ). Since F is non-decreasing, we get 1Un ∈kN Nn (x) = 1F −1 (Un )∈kN Nn (F (x)) a.s. So that, it is enough to show the result for X ∼ U ([0, 1]). Let x be a real number in [0, 1]. Let  be a positive real number. Let n0 be an integer such that   X 3kn ≤. exp − (6) 16 n≥n0 Let nx1 be the integer such that if x ∈ {0, 1}, nx1 = 1 and if x ∈]0, 1[, for n ≥ nx1 ,  kn   +x≤1, 2n   x − kn ≥ 0 . 2n We denote N := max(n0 , nx1 ). We set   n   X Ω := ∀n ≥ N, 1|Xj −x|≤ kn ≤ kn . 4n   j=1 On this event, for every n ≥ N , there are at most kn elements Xi such that |Xi − x| is inferior to k4nn . Thus, if an element satisfies |Xj − x| ≤ k4nn , it belongs to the kn -nearest neighbours of x. Then, 18 T. LABOPIN-RICHARD, F. GAMBOA, AND A. GARIVIER  X  P Ω ≤ P =:  1|Xj −x|≤ kn > kn  4n j=1 n≥N (7) n X X P (Zn > kn ) n≥N = X n≥N  P B(n, p) kn > n n  . where, since n ≥ nx1 ,   kn p = P |X − x| ≤ 4n    kn kn   + x if x ∈]0, 1[ P − +x≤X ≤   n 4n       kn = P X≤ if x = 0  4n       kn   P X ≤ 1 − if x = 1 4n  kn   if x ∈]0, 1[ = 2n   kn otherwise 4n kn ≤ . 2n Then, Equation (7) gives   P Ω ≤ X n≥N (8) P n X j=1  1|Xj −x|≤ kn > kn  4n !  B n, k2nn kn ≤P > n n   3kn ≤ exp − ≤. 16 where we used the second inequality of Lemma 5.2 and the Equation (6). But, as we noticed above, on the event Ω, we have 1Xn ∈kN Nn (x) ≥ 1|Xn −x|≤ kn . 4n Finally, CONDITIONAL QUANTILE SEQUENTIAL ESTIMATION FOR STOCHASTIC CODES  (9)  P Ω ∩ X   γn 1Xn ∈kN Nn (x) ≤ C  ≤ P  n≥N 19 X γn 1|Xn −x|≤ kn ≤ C  . 4n n≥N Let now (Ik )k be a partition of [|N, +∞|] such that ∀k ≥ 1, X n∈Ik γn kn ∈ [2C, 2C + 1] . 4n Such a partition exists since, as β ≥ γ, the sum X n  Var   X  γn 1|Xk −x|≤ kn  ≤ E  4n n∈Ik X γn kn is divergent. Then, n  γn 1|Xk −x|≤ kn  ≤ 2C + 1 . 4n n∈Ik The Chebyshev’s inequality gives   X 2C + 1 7 ≤ <1, P γn 1|Xk −x|≤ kn ≤ C  ≤ 2 4n C 9 n∈Ik since C ≥ 3.      \X P γn 1|Xn −x|≤ kn ≤ C  = 0 . 4n   k n∈Ik  (10) P  X γn 1|Xn −x|≤ kn ≤ C  = 0 . n≥N 4n Thanks to (7), (9) and (10), we get   X P γn 1Xn ∈kN Nn (x) ≤ C  ≤ P(Ω) + 0 ≤  , n≥N which holds for all  > 0.  Lemma 5.4. Denoting An the event {X1 , . . . Xn | Pn > n } where n = parameter  satisfies 1 >  > 1 − β, we have for n ≥ 1,   3(n + 1)1− P(AC ) ≤ exp − . n 8 Proof. Thanks to the Lemma 5.1, we obtain P(AC n ) = P(β(kn+1 , n − kn+1 ) ≥ n ) = In (kn+1 , n − kn+1 ) , 1 (n+1) and the 20 T. LABOPIN-RICHARD, F. GAMBOA, AND A. GARIVIER where we denote I the incomplete β function. A classical result (see [1]) allows us to write this quantity in terms of the binomial distribution P(AC n ) = P(B(n, n ) ≥ kn+1 ) . Thanks to Lemma 5.2, we know that     3(n + 1)1− 3(n + 1)n+1 ≤ exp − , P(B(n + 1, n ) ≥ kn+1 ) ≤ exp − 8 8 as soon as kn+1 /(n+1) ≥ 2n , which is true as soon as n ≥ 21/(−(1−β)) because  > 1−β.  Lemma 5.5. Under hypothesis of Theorem 2.1, ||X − x||(kn+1 ,n) converges almost surely to 0. Proof. Let u be a positive number. Z pu : = P(X ∈ B(x, u)) = f (t)dt B(x,u) (11) d π2 ≥ µX (B(x, u)) = C1 d Γ( 2 + 1) = Cinput C4 (d)ud =: qu . Let Z be a random variable of law B(n, pu ). Since ||X − x||(kn+1 ,n) > u implies that there are at the most kn+1 elements of the sample which satisfy X ∈ B(x, qu ), we get : P(||X − x||(kn+1 ) > u) = P(Z < kn+1 ) . Thanks to equation (11), and denoting Z̃ a random variable of law B(n, qu ), we have P(||X − x||(kn+1 ) > u) ≤ P(Z̃ < kn+1 ) . Lemma 5.2 implies that P(||X − x||(kn+1 ) > u) is the general term of a convergent sum. Indeed, when n is large enough, then kn+1 /n < qu /2 because kn+1 /n converges to 0 (β < 1). The Borel-Cantelli Lemma then implies that ||X − x||(kn+1 ,n) converges almost surely to 0.  Lemma 5.6. With the same notation as above,  E(Pn ||X − x||(kn+1 ,n) ) ≤ C3 (d) kn+1 n+1 1+ 1 d . Proof. Let us denote F̃ and f˜ the cumulative and density distribution function of the law of ||X − x||.   E(||X − x||(kn+1 ,n) Pn ) = E ||X − x||(kn+1 ,n) F̃ ||X − x||(kn+1 ,n) Z = y F̃ (y)f||X−x||(k ,n) (y)dy , n+1 with CONDITIONAL QUANTILE SEQUENTIAL ESTIMATION FOR STOCHASTIC CODES f|X−x|(k n+1 (y) = ,n) 21  n−kn+1 n! f˜(y) . F̃ (y)kn+1 −1 1 − F̃ (y) (kn+1 − 1)!(n − kn+1 )! Then we get Z E(||X − x||(kn+1 ,n) Pn ) = = y F̃ (y)kn+1 (1 − F̃ (y))n−kn+1 f˜(y) n! (kn+1 − 1)!(n − kn+1 )!  kn+1 E ||X − x||(kn+1 +1,n+1) . n+1 We denote U|.| the upper bound of the support of ||X − x||, and write U|.| Z E(||X − x||(kn+1 +1,n+1) ) = P(||X − x||(kn+1 +1,n+1) > u)du . 0 Using same arguments that in Lemma 2.1, denoting C10 (d) = Z U|.| Z 0 d 2(kn+1 +1) (n+1)Cinput C4 (d) ,we get C10 (d) P(||X − x||(kn+1 +1,n+1) > u)du = I := q P(B(n + 1, qu ) < kn+1 + 1)du 0 Z U|.| + P(B(n + 1, qu ) < kn+1 + 1)du C10 (d) Z ≤ C10 (d) 0 U|.|   3(n + 1)Cinput C4 (d)ud du , exp − 32 C10 (d) Z 1du + where we use Lemma 5.2 in the second integral because u > C10 (d) implies Then, we obtain kn+1 +1 n+1 < qu 2 . 22 T. LABOPIN-RICHARD, F. GAMBOA, AND A. GARIVIER +∞  3(n + 1)Cinput C4 (d)ud I ≤ C10 (d) + exp − du 32 C11 (d)   Z +∞ 3(n + 1)Cinput C4 (d)ud ud−1 exp − du ≤ C10 (d) + d−1 32 C10 (d) 0   +∞ C11 (d) 32 3(n + 1)Cinput C4 (d)ud = C10 (d) + − exp − d 32 C10 (d) 3(n + 1)dCinput C4 (d) 0   3(n + 1)dCinput C4 (d) = C10 (d) 1 + 32C10 (d)d s   2(kn+1 + 1) 16 d = 1+ (n + 1)Cinput C4 (d) 3d(kn+1 + 1) s "s r  # 2 kn+1 + 1 16 d kn+1 d d 1+ = n+1 Cinput C4 (d) kn+1 3d(kn+1 + 1) s r   4 8 d kn+1 d ≤ 1+ n Cinput C4 (d) 3d r kn+1 , =: C3 (d) d n+1 Z  because for n ≥ 1, we get kn ≥ 1.  Lemma 5.7. Let (bn ) be a a real sequence. If there exist sequences (cn )n≥1 ∈ [0, 1]N and (dn )n≥1 ∈]0, +∞[N such that ∀n ≥ N0 , bn+1 ≤ bn (1 − cn+1 ) + dn+1 , then for all n ≥ N0 + 1, ∀n, bn ≤ exp − n X k=1 ! N0 + 1ck bN0 + n X k=N0 +1   exp −  n X cj − j=1 k X  cj  dk . j=1 Proof. This inequality appears in [21] and references therein. It can be proved by induction using that ∀x ∈]0, +∞[, exp(x) ≥ 1 + x.  Let us first prove the following consequence of Assumption A3. Lemma 5.8. Under assumption A3, if β ≥ γ, then for all x and for all n ≥ 1, θn (x) ∈ [LY − (1 − α), UY + α], a.s. Proof. Suppose that θn (x) leaves the compact set [LY , UY ] by the right at step N0 . By definition, θN0 −1 ≤ UY and consequently θN0 ≤ UY + αγN0 . At next step, since θN0 > UY , we have YN0 +1 ≤ θN0 and then θN0 +1 ≤ UY + αγN0 − (1 − α)γN0 +1 1XN0 +1 ∈kN NN0 +1 (x) . CONDITIONAL QUANTILE SEQUENTIAL ESTIMATION FOR STOCHASTIC CODES 23 Then, the algorithm either does not move (if XN0 +1 ∈ / kN NN0 +1 (x)) or comes back in direction of [LY , UY ] with a step of (1 − α)γN0 +1 . Then, if X γn 1Xn ∈kN Nn (x) = +∞ a.s , n≥0 the algorithm almost surely comes back to the compact set [LY , UY ]. Thanks to Lemma 5.3, we know that, since β ≥ γ, the previous sum diverges almost surely. A similar result holds when the algorithm leaves the compact set by the left and finally we have shown that almost surely, θn (x) ∈ [LY − (1 − α), UY + α] =: [Lθn , Uθn ] .  5.2. Proof of Theorem 2.1 : almost sure convergence. To prove this theorem, we adapt the classical analysis of the Robbins-Monro algorithm (see [7]). In the sequel we do not write θn (x) but θn to make the notation less cluttered. 5.2.1. Martingale decomposition. In this sequel, we still denote H(θn , Xn+1 , Yn+1 ) :=  1Yn+1 ≤θn −α 1Xn+1 ∈kN Nn+1 (x) , Fn = σ(X1 , . . . , Xn , Y1 , . . . , Yn ) and Pn and En the probability and expectation conditionally to Fn . We introduce hn (θn ) : = E(H(θn , Xn+1 , Yn+1 )|Fn ) = Pn (Yn+1 ≤ θn ∩ Xn+1 ∈ kN Nn (x)) − αPn (Xn+1 ∈ kN Nn (x))    = Pn FY kN Nn+1 (x) (θn − FY x (θ∗ ) . Then, Tn = θn + n X γj hj−1 (θj−1 ) = θ0 (x) − j=1 n X γj ξj , j=1 with ξj = H(θj−1 , Xj , Yj ) − hj−1 (θj−1 ) is a martingale. It is bounded in L2 (R). Since sup|ξn | ≤ α + (1 + α) = 1 + 2α, n the Burkholder inequality gives the existence of a constant C such that  2   2 n n n X X X E(|Tn |2 ) ≤ E  γj ξj   ≤ CE  (γj ξj )2  ≤ C(1 + 2α) γj2 < ∞ . j=1 j=1 j=1 5.2.2. The sequence (θn ) converges almost surely. First, let us prove that (12) P(θn → ∞) + P(θn → −∞) = 0. Let us suppose that this probability is positive (we name Ω1 the non-negligeable set where θn (ω) diverges to +∞ and the same arguments would show the result when the limit is −∞). Let ω be in Ω1 . We have θn (ω) ≤ θ∗ for only a finite number of n. 24 T. LABOPIN-RICHARD, F. GAMBOA, AND A. GARIVIER Let us show that on an event Ω ⊂ Ω1 with positive measure, for n large enough, hn (θn (ω)) > 0. First, we know that Pn follows a Beta distribution. This is why ∀n, P(Pn = 0) = 0. Then, the Borel-Cantelli Lemma gives that P(∃N ∀n ≥ N Pn > 0) = 1 . As Ω1 has a positive measure, we know that there exists Ω2 ⊂ Ω1 with positive measure such that ∀ω ∈ Ω2 , θn (ω) → +∞ and for all n large enough, Pn (ω) > 0. Since   hn (θn (ω)) = Pn F Bkn+1 (x) (θn (ω)) − α , Y n we have now to show that on Ω ⊂ Ω2 of positive measure, F kn+1 (x) Y Bn (θn (ω)) − α > 0 . As θn (ω) diverges to +∞, we can find D such that for n large enough, θn (ω) > D > θ∗ . Then, F kn+1 Y Bn (x) (θn (ω)) − α = F kn+1 (x) Y Bn =F kn+1 (x) Y Bn (θn (ω)) − FY x (θ∗ ) (θn (ω)) − F kn+1 Y Bn (x) (D) + F kn+1 (x) Y Bn (D) − FY x (D) + FY x (D) − FY x (θ∗ ) . First, F kn+1 (x) Y Bn (θn (ω)) − F kn+1 Y Bn (x) (D) ≥ 0 because a cumulative distribution function is non-decreasing. Then, we set η = FY x (D) − FY x (θ∗ ) which is a finite value. To deal with the last term, we use our assumption A1. F kn+1 (x) Y Bn (D) − FY x (D) ≥ −M (x)||X − x||(kn+1 ,n) . We know, thanks to Lemma 5.5, that ||X − x||(kn+1 ,n) converges almost surely to 0. Then, there exists a set Ω3 ⊂ Ω1 of probability strictly non-negative such that forall ω in Ω3 , the previous reasoning is true. And for  < Lη , there exists rank N (ω) such that if n ≥ N , (13) F kn+1 Y Bn (x) (D) − FY x (D) ≥ 0 − L + η > 0 . Finally, for ω ∈ Ω3 (set of strictly non-negative measure), we have shown that after a certain rank, hn (θn (ω)) > 0. This implies that on Ω3 of positive measure,   n X lim θn (ω) + γj−1 hj−1 (θj−1 (ω)) = +∞ , n j=1 which is absurd because in the previous part we proved that Tn is almost surely convergent. Then θn does not diverge to +∞ or −∞. Now, we will show that (θn ) converges almost surely. In all the sequel of the proof, we reason ω by ω like in the previous part. To make the reading more easy, we do not write ω and Ω any more. Thanks to Equation (12) and to the previous subsection, we know that, with probability positive, there exists a sequence (θn ) such that CONDITIONAL QUANTILE SEQUENTIAL ESTIMATION FOR STOCHASTIC CODES 25  n X   (a) θn + γj−1 h(θj−1 ) converges to a finite limit j=1   (b) lim inf θn < lim sup θn . Let us suppose that lim sup θn > θ∗ (we will find a contradiction, the same argument would allow us to conclude in the other case). Let us choose c and d satisfying c > θ∗ and lim inf θn < c < d < lim sup θn . Since the sequence (γn ) converges to 0, and since (Tn ) is a Cauchy sequence, we can find a deterministic rank N and two integers n and m such that N ≤ n < m implies  (d − c)   (a) γn ≤   3(1 − α)  m−1 X  d−c   . (b) θ − θ − γ h(θ ) ≤ m n j j−1   3 j=n We choose m and n so that    (a) N ≤ n < m (b) θn < c, θm > d   (c) n < j < m ⇒ c ≤ θj ≤ d . (14) This is possible since beyond N , the distance between two iterations will be either αγn ≤ because α < 3 5 α(d − c) < (d − c) , 3(1 − α) or 1 (1 − α)γn ≤ (d − c) < (d − c) . 3 Moreover, since c and d are chosen to have an iteration inferior to c and an iteration superior to b, the algorithm will necessarily go through the segment [c, d]. We then take n and m the times of enter and exit of the segment. Now, m−1 d−c X + γj+1 hj (θj ) θm − θn ≤ 3 j=n d−c + γn+1 hn (θn ) , ≤ 3 because n < j < m, we get θ∗ < c < θj and we have already shown that in this case, hj (θj ) > 0. We then only have to deal with θn . If θn > θ∗ , we can apply the same result and then d−c , 3 which is in contradiction with (b) of equation (14). When θ < θ∗ , θn − θ n ≤ 26 T. LABOPIN-RICHARD, F. GAMBOA, AND A. GARIVIER d−c + γn h(θn−1 ) 3 d−c ≤ + γn (1 − α) 3 d−c d−c ≤ + < (d − c) , 3 3 which is still a contradiction with (b) of (14). We have shown that the algorithm converges almost surely. θm − θn ≤ 5.2.3. The algorithm converges almost surely to θ∗ . Again we reason by contradiction. Let us name θ the limit such that P(θ 6= θ∗ ) > 0. With positive probability, we can find a sequel (θn ) which converges to θ such that ( (a) θ∗ < 1 < 2 < ∞ (b) 1 < θ < 2 , (or −∞ < 1 < 2 < θ∗ but arguments are the same in this case). Then, for n large enough, we get 1 < θn < 2 . Finally, P on the one hand, (Tn ) and (θn ) are convergent, and we also know that the sum γj+1 h(θj ) converges almost surely. Let us then show that on the other hand, hn (θn ) = Pn (F Bkn+1 (x) (θn ) − α) is lower bounded. First we know thanks to Lemma 5.4, Y n that for 1 <  < 1 − β and n = 1 (n+1) ,   3(n + 1)1− P(Pn ≤ n ) ≤ exp − . 8 This is the general term of a convergent sum. Therefore, the Borel-Cantelli Lemma gives P(∃N ∀n ≥ N Pn > n ) = 1 . Moreover, as we have already seen in Equation (13), since θn > 1 > θ∗ , F kn+1 (x) Y Bn (θn ) − α ≥ 0 − M (x)||X − x||(kn+1 ,n) + FY x (1 ) − FY x (θ∗ ) . Then, when n is large enough so that ||X − x||(kn+1 ,n) ≤ FY x (1 ) − FY x (θ∗ ) 2M (x) holds, we have FY x (1 ) − FY x (θ∗ ) . 2 Y Finally there exists a set Ω of positive probability such that, ∀ω ∈ Ω F n X k=1 k Bnn+1 (x) γk+1 hk (θk ) ≥ (θn ) − α ≥ n n k=1 k=1 X FY x (1 ) − FY x (θ∗ ) X 1 γk+1 Pk ≥ , 2 (n + 1)γ+ CONDITIONAL QUANTILE SEQUENTIAL ESTIMATION FOR STOCHASTIC CODES 27 which is a contradiction (with the one hand point) because the sum is divergent (γ +  < 1). 5.3. Proof of Theorem 2.2 : Non-asymptotic inequality on the mean square error. Let x be fixed in [0, 1]. We want to find an upper-bound for the mean square error an (x) using Lemma 5.7. In the sequel, we will need to study θn (x) on the event An of the Lemma 5.4. Then, we begin to find a link between an (x) and the mean square error on this event. (15) h i h i an (x) = E (θn (x) − θ∗ (x))2 1An + E (θn (x) − θ∗ (x))2 1ACn h i ≤ E (θn − θ∗ )2 1An + C1 P(AC n)   h i 3(n + 1)1− 2 ∗ , ≤ E (θn (x) − θ (x)) 1An + C1 exp − 8   h i 3n1− ≤ E (θn (x) − θ∗ (x))2 1An + C1 exp − , 8 thanks to Lemma 5.4 and for n ≥ N0 . h i Let us now study the sequence bn (x) := E (θn (x) − θ∗ )2 1An . First, for n ≥ 0,   bn+1 (x) ≤ E (θn+1 (x) − θ∗ (x))2 . But,   2 (θn+1 (x) − θ∗ (x))2 = (θn (x) − θ∗ (x))2 + γn+1 (1 − 2α)1Yn+1 ≤θn (x) + α2 1Xn+1 ∈kN Nn+1 (x)  − 2γn+1 (θn (x) − θ∗ (x)) 1Yn+1 ≤θn (x) − α 1Xn+1 ∈kN Nn+1 (x) . Taking the expectation conditional to Fn , we get    2 2 En (θn+1 (x) − θ∗ (x))2 ≤ En (θn (x) − θ∗ (x)) + γn+1 Pn (Xn+1 ∈ kN Nn+1 (x)) − 2γn+1 (θn (x) − θ∗ (x)) [Pn (Yn+1 ≤ θn (x) ∩ Xn+1 ∈ kN Nn+1 (x)) × Pn (Xn+1 ∈ kN Nn+1 (x)) FY x (θ∗ )] . Using the Bayes formula, we get    2 2 En θn+1 (x) − θ∗ (x))2 ≤ En (θn (x) − θ∗ (x)) + γn+1 Pn h i − 2γn+1 (θn (x) − θ∗ (x)) Pn F Bkn+1 (x) (θn (x)) − FY x (θ∗ (x)) , Y n Let us split the double product into two terms representing the two errors we made by iterating our algorithm. (16)  2 2 En θn+1 (x) − θ∗ (x))2 ≤ (θn (x) − θ∗ (x)) + γn+1 Pn+1 h − 2γn+1 (θn (x) − θ∗ (x)) Pn+1 F Y kn+1 Bn (x) i (θn (x)) − FY x (θn (x)) − 2γn+1 (θn (x) − θ∗ (x)) Pn [FY x (θn (x)) − FY x (θ∗ (x))] . We now use our hypothesis. By A1, 28 T. LABOPIN-RICHARD, F. GAMBOA, AND A. GARIVIER |F kn+1 Y Bn (x) (θn (x)) − FY x (θn (x))| ≥ M (x)||X − x||(kn+1 ,n) , and by A3, |θn (x) − θ∗ (x)| ≤ p C1 . Thus, h −2γn+1 (θn (x) − θ∗ (x))Pn F Y kn+1 Bn (x) i p (θn (x)) − FY x (θn (x)) ≤ 2γn+1 C1 M (x)Pn ||X − x||(kn+1 ,n) . On the other hand, thanks to A4 we know that, (θn − θ∗ ) [FY x (θn (x)) − FY x (θ∗ (x))] ≥ C2 (x, α) [θn (x) − θ∗ (x)]2 . Coming back to Equation (16), we get  2 2 En θn+1 (x) − θ∗ (x))2 ≤ (θn (x) − θ∗ (x)) (1An + 1An ¯ ) + γn+1 Pn 2 − 2γn+1 (θn (x) − θ∗ (x)) C2 (x, α)Pn + 2γn+1 M (x) p C1 ||X − x||(kn+1 ,n) Pn . To conclude, we take the expectation h i ∗ 2 bn+1 (x) ≤ C1 P(AC ) + b (x) − 2γ C (x, α)E P (θ (x) − θ ) n n+1 2 n n n p   2 + γn+1 E(Pn ) + 2γn+1 C1 M (x)E Pn ||X − x||(kn+1 ,n) . But, by definition of An ,we get h i h i −2γn+1 C2 (x, α)E Pn+1 (θn (x) − θ∗ )2 ≤ −γn+1 n C2 (x, α)E (θn (x) − θ∗ (x))2 1An = −2γn+1 n C2 (x, α)bn (x); . Finally, bn+1 (x) ≤ bn (x) (1 − 2C2 (x, α)γn+1 n ) + en+1 , with 2 en+1 := C1 P(AC n ) + γn+1 E(Pn ) + 2γn+1 p   C1 M (x)E Pn ||X − x||(kn+1 ,n) . Now using Lemmas 5.6, 5.4 and 5.1 we get for n ≥ N0 with    1 +1  p kn kn d 3n1− en ≤ dn := C1 exp − + 2 C1 M (x)C3 (d)γn + γn2 . 8 n n The conclusion holds thanks to Lemma 5.7, for n ≥ N0 + 1, (17) bn (x) ≤ exp (−2C2 (x, α)(κn − κN0 )) bN0 (x) + n X k=N0 +1 exp (−2C2 (x, α) (κn − κk )) dk . CONDITIONAL QUANTILE SEQUENTIAL ESTIMATION FOR STOCHASTIC CODES 29 But thanks to Assumption A3, we have already shown that bN0 (x) ≤ aN0 (x) ≤ C1 . To conclude, we re-inject Equation (17) in Equation (15) and obtain for n ≥ N0 + 1, an (x) ≤ exp (−2C2 (x, α)(κn − κN0 )) C1 + n X exp (−2C2 (x, α) (κn − κk )) dk k=N0 +1   3n1− + C1 exp − . 8 5.4. Proof of Corollary 2.1 : Rate of convergence. In this part, we will denote   −3n1− 0 Tn := C1 exp , Tn1 := exp (−2C2 (x, α)(κn − κN0 )) 8 and Tn2 := n X exp (−2C2 (x, α) (κn − κk )) dk . k=N0 +1 We want to find a simpler expression for those terms to better see their order in n. First, considering Tn1 we see that an (x) can converge to 0 only when the sum X 1 = +∞. k γ+ k≥1 This is why we must first consider  ≤ 1 − γ. As  < 1 − β, we have to take β > γ. Remark 5.1. The frontier case  = 1 − γ is possible but the analysis shows that it is a less interesting choice than  < 1 − γ (there is a dependency in the value of C2 (x, α) but the optimal rate is the same as the one in the case we study). In the sequel, we only consider  < 1 − γ. Let us upper-bound Tn1 . As x 7→ 1/x+γ is decreasing, we get   n X 1  Tn1 = exp −2C2 (x, α) +γ k k=N0 +1   Z n+1 1 dt ≤ exp −2C2 (x, α) +γ N0 +1 t   (n + 1)1−−γ − (N0 + 1)1−−γ ≤ exp −2C2 (x, α) . (1 −  − γ) Then, Tn1 (just like Tn0 ) is exponentially small when n grows up. To deal with the second term Tn2 we first study the order in n of dn . dn is composed of three terms :   p 1 3n1− dn ≤ C1 exp − + 2 C1 M (x)C3 (d)n−γ+(β−1)(1+ d ) + n−2γ+β−1 . 8 The first one is negligeable (exponentially decreasing). Let us compare the two others which are powers of n. Comparing their exponents, we get that there exists constants C5 and C6 (d) (their explicit form is given in the Appendix) such that 30 T. LABOPIN-RICHARD, F. GAMBOA, AND A. GARIVIER if β ≤ 1 − dγ, then for n ≥ N0 + 1, dn ≤ C5 (x, d)n−2γ+β−1 , if β > 1 − dγ, then for n ≥ N0 + 1, 1 dn ≤ C6 (x, d)n−γ+(1+ d )(β−1) . Remark 5.2. Let us detail how one can find C5 (it is the same reasoning for C6 ). If β ≤ 1−dγ, we know that when n will be big enough, the dominating term of dn will be the one in n−2γ+β−1 . Then, it is logical to search a constant C5 (x, d) such that ∀n ≥ N0 + 1, C5 (x, d) . n2γ−β+1 Such a constant has to satisfy, for all n ≥ N0 + 1, √   2 C1 M (x)C3 (d) 3 1− 2γ−β+1 n + C5 (x, d) ≥ C1 exp − n +1. 8 n−γ+(1−β)/d dn ≤ √ 1 M (x)C3 (d) Since β ≤ 1 − dγ, the map x 7→ 2 nC−γ+(1−β)/d is positive and decreasing. Then its  maximum is reached for n = N0 + 1. Moreover, the map x 7→ C1 exp − 83 n1− n2γ−β+1 is also positive and is decreasing on an [A, +∞[. It also has a maximum. The previous inequality is then true for √   2 C1 M (x)C3 (d) 3 1− 2γ−β+1 n + +1. C5 (x, d) := max C1 exp − n n≥N0 +1 8 (N0 + 1)−γ+(1−β)/d Let us study the two previous cases. Study of Tn2 when β > 1 − dγ : To upper-bound these sums, we use arguments from [8], which studies the stochastic algorithm to estimate the median on an Hilbert space. The main arguments are comparisons between sums and integrals. Indeed, for n ≥ N0 + 2 and n ≥ N3 where N3 is such that n ∀n ≥ N3 , b c ≥ N0 + 1 , 2 Tn2 = C6 (x, d) n−1 X  exp −2C2 (x, α) k=N0 +1 j=k+1  n = C6 (x, d) b2c X n X exp −2C2 (x, α) k=N0 +1 + C6 (x, d) n X n−1 X k=b n 2 c+1 j=k+1  exp −2C2 (x, α) n X j=k+1  a  j +γ 1 k 1 γ+(1+ d )(1−β) + C6 (x, d) 1 γ+(1+ d )(1−β) n + C6 (x, d) 1 γ+(1+ d )(1−β) n  a  j +γ 1 k 1 γ+(1+ d )(1−β)  a  j +γ 1 k 1 γ+(1+ d )(1−β) =: S1 + S2 + S3 . First, the function x 7→ x−−γ is decreasing on ]0, +∞[ then CONDITIONAL QUANTILE SEQUENTIAL ESTIMATION FOR STOCHASTIC CODES S2 ≤ C6 (x, d) n−1 X  Z exp −2C2 (x, α) n+1 1 x+γ  dx 31 1 γ+(1+ d1 )(1−β) k   (n + 1)1−γ− = C6 (x, d) exp −2C2 (x, α) 1−γ−   n−1 X (k + 1)1−γ− 1 exp −2C2 (x, α) . 1 1−γ− k γ+(1+ d )(1−β) n k+1 c+1 k=b n 2 k=b 2 c+1 Then, taking, 1 − β <  < min((1 − dγ), 1 + 1 d  (1 − β)), we have since k ≥ b n2 c + 1   (1+ 1 )(1−β)−  d 2 (n + 1)1−γ− S2 ≤ C6 (x, d) exp −2C2 (x, α) 1−γ− n   n−1 X 1 (k + 1)1−γ− . exp −2C2 (x, α) γ+ 1−γ− k n k=b 2 c+1 Now, since for k ≥ 1,  +γ  +γ 1 2 ≤ , k k+1 we get    (1+ d1 )(1−β)− (n + 1)1−γ− 2 S2 ≤ C6 (x, d) exp −2C2 (x, α) 2+γ 1−γ− n   n−1 X (k + 1)1−γ− 1 exp −2C2 (x, α) . 1 − γ −  (k + 1)γ+) n k=b 2 c+1   h h 1−−γ 2 (x,α) Since the function x 7→ exp 2C2 (x, α) n1−−γ is decreasing on 2Cγ+ , +∞ , we also define the integer N1 (x, α) the rank such that n 2C2 (x, α) ∀n ≥ N1 (x, α), b c + 1 ≥ . 2 +γ For n ≥ N1 (x, α) we get 32 T. LABOPIN-RICHARD, F. GAMBOA, AND A. GARIVIER   1 (n + 1)1−γ− 2(1+ d )(1−β)+γ S2 ≤ C6 (x, d) exp −2C2 (x, α) 1 1−γ− n(1+ d )(1−β)−   n−1 X Z n 1 x1−γ− dx × exp −2C2 (x, α) γ+ n 1−γ− x b 2 c+2 n k=b 2 c+1   1 C6 (x, d) (n + 1)1−γ− 2(1+ d )(1−β)+γ ≤ exp −2C2 (x, α) 1 2C2 (x, α) 1−γ− n(1+ d )(1−β)−      (b n c + 2)1−−γ n1−−γ − exp 2C2 (x, α) 2 × exp 2C2 (x, α) 1−−γ 1−−γ 1 C6 (x, d) 2(1+ d )(1−β)+γ C7 (x, d, α) 1 ≤ =: . 1 −+(1+ 2C2 (x, α) n(1+ d1 )(1−β)− 2 d )(1−β) n Let us now deal with the term S1 . As k ≤ b n2 c, we have n X j=k+1 1 j +γ ≥ n 1 . 2 n+γ Then,  n S1 = C6 (x, d) b2c X n X exp −2C2 (x, α) k=N0 +1 j=k+1  a  1 j +γ k γ+(1−β)(1+ d1 ) bn 2c ≤ C6 (x, d) X exp −C2 (x, α)n1−−γ 1  k k=1 1 γ+(1−β)(1+ d ) bn 2c ≤ C6 (x, d) exp −C2 (x, α)n1−−γ 1 X k=1 k 1 γ+(1−β)(1+ d ) . Thanks to the exponential X term, S1 is1 insignificant compared to S2 whatever is the behaviour of the sum k −γ−(1−β)(1+ d ) , and so is T1n . Then, denoting N2 (d, x) the k rank after which we have S3 + S1 + Tn1 + Tn0 ≤ C7 (x, α, d) , 1 2n(1+ d )(1−β)−  we get, in the case where β > 1 − γ and 1 − β <  < min((1 − γ), 1 + d1 (1 − β)), for n ≥ max (N0 , N1 (x, α), N2 (d, x)) C7 (x, α, d) an (x) ≤ n −+(1+ d1 )(1−β) . Study of Tn2 when β ≤ 1 − dγ : Using the same arguments, we conclude that for 1 − β <  < min(1 − β + γ, 1 − γ) and n ≥ max(N0 , N1 (x, α), N2 (d, x)) (see Appendix for precise definitions of these ranks), there exists a constant C8 (x, α, d) such that the mean square error satisfies CONDITIONAL QUANTILE SEQUENTIAL ESTIMATION FOR STOCHASTIC CODES 33 C8 (x, α, d) . nγ−β+1− 5.5. Proof of Corollary 2.2 : choice of best parameters β and γ. Let us now optimize the rate of convergence obtained in previous theorem. When β ≥ γ and β ≤ 1 − dγ, the rate of convergence is of order n−γ+β−1+ . To optimize it, we have to choose  as small as possible. Then, we take  = 1 − β + η . The rate becomes n−γ+η . Then, we have also to choose γ as small as possible. In this area, there is only one point in which 1 1 , 1+d ). Since we have to take β > γ, the γ is the smallest, this is the point (γ, β) = ( 1+d 1 1 best couple of parameters, in this area, is ( 1+d , 1+d + ηβ ). These parameters follow a an (x) ≤ −1 rate of convergence of n 1+d +η . When we are in the second area, the same kind of arguments allows us to conclude to the same optimal point with the same rate of convergence. In Figure 6, we use the numerical simulations of Section 3 to illustrate the previous discussion. Figure 6. Theoretical behaviour of the MSE in function of β and γ We have finally shown that an (x) ≤ C9 (x, α, d) , 1 n 1+d −η where the constant is the minimal constant between C7 (x, α, d) and C8 (x, α, d) computed with optimal parameters (γ, β, ). 34 T. LABOPIN-RICHARD, F. GAMBOA, AND A. GARIVIER 6. Appendix 2 : Recap of the constants Let us sum up all the constants we need in this paper. 6.1. Constants of the model. We denote : • M (x) the constant of continuity of the model, that is ∀B ∈ Bx , ∀t ∈ R, |FY B (t) − FY x t)| ≤ M (x)rB . • Cinput is the positive lower bound of the density of the inputs law fX . • Cg (x) is the positive lower bound of the density of the law of g(x, ). 6.2. Compact support. We denote : • [LY , UY ] the compact in which are included the values of g. • [LX , UX ] the compact in which is included the support of the distribution of X. • [Lθn , Uθn ] := [LY − (1 − α), UY + α] the segment in which θn can take its values (∀x). • U|.| the upper bound of the compact support of the distribution of ||X − x|| (∀x). 6.3. Real constants. We denote : √ • C1 := UY + α  − LY . C1 is the uniform in ω and x bound of (θn (x) − θ∗ (x))2 .  1−α is the constant such that • C2 (x, α) := min Cg (x), UY +α−L Y [FY x (θn (x)) − FY x (θ∗ (x))] [θn (x) − θ∗ (x)] ≥ C2 (x, α) (θn (x) − θ∗ (x))2 .   √ d 8 1 √ • C3 (d) := 2 1 + 3d + d . Cinput C4 (d) • C4 (d) := d π2 d +1 2 Γ( ) . √   3 1− 2 C1 M (x)C3 (d) 2γ−β+1 • C5 (x, d) := max C1 exp − n n + + 1. n≥N0 +1 (N0 + 1)−γ+(1−β)/d  8  p 1 3 1 . • C6 (x, d) := max C1 exp − n1− nγ+(1+ d )(1−β) +2 C1 M (x)C3 (d)+ 1 n≥N0 +1 8 (N0 + 1)γ− d (1−β)   1 1 3 ( 1+d 1 +ηβ )−η • := max C1 exp − n . (N0 +1) 1+d −ηβ +1 +1+ 1 1 1 − 1+d +d (1− 1+d −ηβ ) n≥N0 +1 8 (N0 + 1)   p 1 1 1 1 3 • C6optim (x, d) := max C1 exp − n( 1+d +ηβ )−η n(1+ d )− d(1+d) −ηβ (1+ d ) +2 C1 M (x)C3 (d)+ n≥N0 +1 8 1 ηβ . 1 1 1 (N0 + 1)− d + d(1+d) + 1+d + d C5optim 1 2(1+ d )(1−β)+γ C6 (x,d) . C2 (x,α) 2γ−β+1 2 C5 (x,d) . C2 (x,α) • C7 (x, α, d) := • C8 (x, α) := 1 1+ 1 − −ηβ (1+ 1 ) optim d d(1+d) d C (x,d) 5 C2 (x,α) 2 • C9 (x, α, d) := min q 2(kn +1) • C10 (d) := d (n+1)C . input C4 (d) , 1 −η +1 β 2 1+d C6optim (x,d) C2 (x,α) ! . CONDITIONAL QUANTILE SEQUENTIAL ESTIMATION FOR STOCHASTIC CODES 35 6.4. Integer constants. We denote : 1 • N0 := 2 −(1−β) . • N1 (x, α) is the rank such that n ≥ N1 (x, α) implies n 2C2 (x, α) b c+1≥ . 2 +γ • N2 (x, α, d) is the integer such that ∀n ≥ N2 (x, α, d), a) If β ≤ 1 − dγ, C7 (x, α, d) S3 + S1 + Tn1 + Tn0 ≤ , (1+ d1 )(1−β)− 2n   n   X 1− where Tn1 := exp −2C2 (x, α) , k −γ− , Tn0 := C1 exp −3n8 k=N0 +1 n S3 := C6 (x,d) 1 nγ+(1+ d )(1−β) and S1 := C6 (x, d) exp(−2C2 (x, α)n1−−γ ) b2c X k −γ−(1−β)(1+1/d) . k=1 b) If β > 1 − dγ, C8 (x, α, d) S3 + S1 + Tn1 + Tn0 ≤ γ−β+1− , 2n   n   X 1− k −γ− , Tn0 := C1 exp −3n8 , where Tn1 := exp −2C2 (x, α) k=N0 +1 n S3 := C5 n2γ−β+1) and S1 := C5 exp(−2C2 (x, α)n1−−γ ) • N3 is the rank such that ∀n ≥ N3 , b n2 c ≥ N0 + 1. • N4 (x, α, d) := max (N0 + 2, N1 (x, α), N2 (x, α, d), N3 ). b2c X k=1 k −γ−(1−β)(1+1/d) . 36 T. LABOPIN-RICHARD, F. GAMBOA, AND A. GARIVIER References [1] Milton Abramowitz and Irene A. Stegun. Handbook of Mathematical Functions. Dover Publications, 1965. [2] Christophe Andrieu, Eric Moulines, and Pierre Priouret. Stability of stochastic approximation under verifiable conditions. The Annals of Applied Probability, 16(3):1462–1505, 2006. [3] Aurélie Arnaud, Julien Bect, Mathieu Couplet, Alberto Pasanisi, and Emmanuel Vazquez. Évaluation d’un risque d’inondation fluviale par planification séquentielle d’expériences. In 42èmes Journées de Statistique, Marseille, France, France, 2010. [4] Philippe Barbe and Michel Ledoux. Probabilit. Collection Enseignement sup. EDP Sciences, Les Ulis, 2007. dition corrige de l’ouvrage paru en 1998 chez Belin. [5] Julien Bect, David Ginsbourger, Ling Li, Victor Picheny, and Emmanuel Vazquez. Sequential design of computer experiments for the estimation of a probability of failure. Statistics and Computing, 22(3):773–793, 2012. [6] Pallab K. Bhattacharya and Ashis K. Gangopadhyay. Kernel and nearest-neighbor estimation of a conditional quantile. The Annals of Statistics, pages 1400–1415, 1990. [7] Julius R. Blum. Approximation methods which converge with probability one. The Annals of Mathematical Statistics, pages 382–386, 1954. [8] Hervé Cardot, Peggy Cénac, and Antoine Godichon. Online estimation of the geometric median in hilbert spaces: non asymptotic confidence balls. arXiv preprint arXiv:1501.06930, 2015. [9] Herbert A. David and Haikady N. Nagaraja. Order Statistics. Wiley, 2003. [10] Amir Dembo and Ofer Zeitouni. Large deviations techniques and applications. Applications of mathematics. Springer, New York, Berlin, Heidelberg, 1998. [11] Luc Devroye, László Györfi, and Gábor Lugosi. A probabilistic theory of pattern recognition, volume 31. Springer Science & Business Media, 2013. [12] Marie Duflo and Stephen S. Wilson. Random iterative models, volume 22. Springer Berlin, 1997. [13] Vaclav Fabian. On asymptotic normality in stochastic approximation. The Annals of Mathematical Statistics, pages 1327–1332, 1968. [14] Noufel Frikha and Stéphane Menozzi. Concentration bounds for stochastic approximations. Electron. Commun. Probab, 17(47):1–15, 2012. [15] Sébastien Gadat, Thierry Klein, and Clément Marteau. Classification with the nearest neighbor rule in general finite dimensional spaces: necessary and sufficient conditions. arXiv preprint arXiv:1411.0894, 2014. [16] Antoine Godichon. Estimating the geometric median in hilbert spaces with stochastic gradient algorithms. arXiv preprint arXiv:1504.02267, 2015. [17] Marjorie Jala, Céline Lévy-Leduc, Eric Moulines, Emmanuelle Conil, and Joe Wiart. Sequential design of computer experiments for parameter estimation with application to numerical dosimetry. In Signal Processing Conference (EUSIPCO), 2012 Proceedings of the 20th European, pages 909–913. IEEE, 2012. [18] Marjorie Jala, Céline Lévy-Leduc, Éric Moulines, Emmanuelle Conil, and Joe Wiart. Sequential design of computer experiments for the assessment of fetus exposure to electromagnetic fields. Technometrics, (just-accepted):00–00, 2014. [19] Marc C. Kennedy and Anthony O’Hagan. Predicting the output from a complex computer code when fast approximations are available. Biometrika, 87(1):1–13, 2000. [20] Don O. Loftsgaarden and Charles P. Quesenberry. A nonparametric estimate of a multivariate density function. The Annals of Mathematical Statistics, 36(3):1049–1051, 1965. [21] Eric Moulines and Francis R Bach. Non-asymptotic analysis of stochastic approximation algorithms for machine learning. [22] Jeremy Oakley. Estimating percentiles of uncertain computer code outputs. Journal of the Royal Statistical Society: Series C (Applied Statistics), 53(1):83–93, 2004. [23] Herbert Robbins and Sutton Monro. A stochastic approximation method. The annals of mathematical statistics, pages 400–407, 1951. [24] David Ruppert. Handbook of sequential analysis. CRC Press, 1991. CONDITIONAL QUANTILE SEQUENTIAL ESTIMATION FOR STOCHASTIC CODES 37 [25] Jerome Sacks. Asymptotic distribution of stochastic approximation procedures. The Annals of Mathematical Statistics, pages 373–405, 1958. [26] Jerome Sacks, William J. Welch, Toby J. Mitchell, and Henry P. Wynn. Design and analysis of computer experiments. Statistical science, pages 409–423, 1989. [27] Thomas J. Santner, Brian J. Williams, and William I. Notz. The design and analysis of computer experiments. Springer Science & Business Media, 2013. [28] Amandine Schreck, Gersende Fort, Eric Moulines, and Matti Vihola. Convergence of Markovian Stochastic Approximation with discontinuous dynamics. March 2014. [29] Charles J Stone. Nearest neighbour estimators of a nonlinear regression function. Proc. Comp. Sci. Statis. 8th Annual Symposium on the Interface, pages 413–418, 1976. [30] Charles J Stone. Consistent nonparametric regression. The annals of statistics, pages 595–620, 1977. [31] Micheal Woodroofe. Normal approximation and large deviations for the robbins-monro process. Probability Theory and Related Fields, 21(4):329–338, 1972. FG AG and TLR are with the Institut de Mathématiques de Toulouse (CNRS UMR 5219). Université Paul Sabatier, 118 route de Narbonne, 31062 Toulouse, France.
10math.ST
A Policy Search Method For Temporal Logic Specified Reinforcement Learning Tasks arXiv:1709.09611v1 [cs.AI] 27 Sep 2017 Xiao Li, Yao Ma and Calin Belta Abstract— Reward engineering is an important aspect of reinforcement learning. Whether or not the users’ intentions can be correctly encapsulated in the reward function can significantly impact the learning outcome. Current methods rely on manually crafted reward functions that often requires parameter tuning to obtain the desired behavior. This operation can be expensive when exploration requires systems to interact with the physical world. In this paper, we explore the use of temporal logic (TL) to specify tasks in reinforcement learning. TL formula can be translated to a real-valued function that measures its level of satisfaction against a trajectory. We take advantage of this function and propose temporal logic policy search (TLPS), a model-free learning technique that finds a policy that satisfies the TL specification. A set of simulated experiments are conducted to evaluate the proposed approach. I. I NTRODUCTION Reinforcement learning (RL) has enjoyed groundbreaking success in recent years ranging from playing Atari games at super-human level [1], playing competitively with world champions in the game of Go [2] to generating visuomotor control policies for robots [3], [4]. Despite much effort being put into developing sample efficient algorithms, an important aspect of RL remains less explored. The reward function is the window for designers to specify the desired behavior and impose important constraints for the system. While most reward functions used in the current RL literature have been based on heuristics for relatively simple tasks, real world applications typically involve tasks that are logically more complex. Commonly adopted reward functions take the form of a linear combination of basis functions (often quadratic) [5]. This type of reward function has limited expressibility and is semantically ambiguous because of its dependence on a set of weights. Reward functions of this form have been used to successfully learn high dimensional control tasks such as humanoid walking [6] and multiple household tasks (e.g. placing coat-hangers, twisting bottle caps, etc) [3]. However, parameter tuning of the reward function is required and this iteration is expensive for robotic tasks. Moreover, these tasks are logically straightforward in that there is little logical interactions between sub-tasks (such as sequencing, conjunction/disjunction, implication, etc). Consider the harder task of learning to use an oven. The agent is required to perform a series of sub-tasks in the correct sequence (set temperature and timer → preheat → open oven door → place item in oven → close oven door). In addition, the agent has to make the simple decision of when to open the oven door and place the item (i.e. preheat finished implies open oven door). Tasks like this are commonly found in household environments (using the microwave, refrigerator or even a drawer) and a function that correctly maps the desired behavior to a real-valued reward can be difficult to design. If the semantics of the reward function can not be guaranteed, then an increase in the expected return will not necessarily represent better satisfaction of the task specification. This is referred to as reward hacking by [7]. Reward engineering has been briefly explored in the reinforcement learning literature. Authors of [8] and [9] provide general formalisms for reward engineering and discuss its significance. Authors of [10] proposed potential-based reward shaping and proved policy invariance under this type of reward transformation. Another line of work aims to infer a reward function from demonstration. This idea is called inverse reinforcement learning and is explored by [11] and [12]. In this paper, we adopt the expressive power of temporal logic and use it as a task specification language for reinforcement learning in continuous state and action spaces. Its quantitative semantics (also referred to as robustness degree or simply robustness) translate a TL formula to a real-valued function that can be used as the reward. By definition of the quantitative semantics, a robustness value of greater than zero guarantees satisfaction of the temporal logic specification. Temporal logic (TL) has been adopted as the specification language for a wide variety of control tasks. Authors of [13] use linear temporal logic (LTL) to specify a persistent surveillance task carried out by aerial robots. Similarly, [14] and [15] applied LTL in traffic network control. Application of TL in reinforcement learning has been less investigated. [16] combined signal temporal logic (STL) with Q-learning while also adopting the log-sum-exp approximation of robustness. However, their focus is in the discrete state and action spaces, and ensured satisfiability by expanding the state space to a history dependent state space. This does not scale well for large or continuous state-action spaces which is often the case for control tasks. Our main contributions in this paper are as follows: • we present a model-free policy search algorithm, which we call temporal logic policy search (TLPS), that takes advantage of the robustness function to facilitate learning. We show that an optimal parameterized policy that maximizes the robustness could be obtained by solving a constrained optimization, • a smoothing approximation of the robustness degree is proposed which is necessary for obtaining the gradients of the objective and constraints. We prove that using the smoothed robustness as reward provides similar semantic guarantees to the original robustness definition while providing significant speedup in learning, finally, we demonstrate the performance of the proposed approach using simulated navigation tasks. specification φ. We define the task satisfaction measurement ρ(τ, φ) , which is recursively expressed as: ρ(st:t+k , >) = ρmax , ρ(st:t+k , f (st ) < c) = c − f (st ), ρ(st:t+k , ¬φ) = − ρ(st:t+k , φ), ρ(st:t+k , φ ⇒ ψ) = max(−ρ(st:t+k , φ), ρ(st:t+k , ψ)) A. Truncated Linear Temporal Logic (TLTL) ρ(st:t+k , φ1 ∧ φ2 ) = min(ρ(st:t+k , φ1 ), ρ(st:t+k , φ2 )), In this section, we provide definitions for TLTL (refer to our previous work [17] for a more elaborate discussion of TLTL). A TLTL formula is defined over predicates of form f (s) < c, where f : IRn → IR is a function of state and c is a constant. We express the task as a TLTL formula with the following syntax: ρ(st:t+k , φ1 ∨ φ2 ) = max(ρ(st:t+k , φ1 ), ρ(st:t+k , φ2 )), ρ(st:t+k , = ρ(st+1:t+k , φ) (k > 0), • II. P RELIMINARIES φ := > | f (s) < c | ¬φ | φ ∧ ψ | φ ∨ ψ | ♦φ | 2φ | φ U ψ | φ T ψ | φ | φ ⇒ ψ, ⇔ f (st ) < c, st:t+k |= ¬φ ⇔ st:t+k |= φ ⇒ ψ ⇔ (st:t+k |= φ) ⇒ (st:t+k |= ψ), st:t+k |= φ ∧ ψ ⇔ (st:t+k |= φ) ∧ (st:t+k |= ψ), st:t+k |= φ ∨ ψ ⇔ (st:t+k |= φ) ∨ (st:t+k |= ψ), st:t+k |= ⇔ (st+1:t+k |= φ) ∧ (k > 0), φ ¬(st:t+k |= φ), st:t+k |= 2φ ⇔ ∀t0 ∈ [t, t + k) st0 :t+k |= φ, st:t+k |= ♦φ ⇔ ∃t0 ∈ [t, t + k) st0 :t+k |= φ, st:t+k |= φ U ψ ⇔ ∃t0 ∈ [t, t + k) s.t. st0 :t+k |= ψ ∧ (∀t00 ∈ [t, t0 ) st00 :t0 |= φ), st:t+k |= φ T ψ ⇔ ρ(st:t+k , 2φ) = ρ(st:t+k , ♦φ) = ρ(st:t+k , φ U ψ) = (1) where > is the boolean constant true, f (s) < c is a predicate, ¬ (negation/not), ∧ (conjunction/and), and ∨ (disjunction/or) are Boolean connectives, and ♦ (eventually), 2 (always), U (until), T (then), (next), are temporal operators. Implication is denoted by ⇒ (implication). TLTL formulas are evaluated against finite time sequences of states {s0 , s1 , . . . , sT }. We denote st ∈ S to be the state at time t, and st:t+k to be a sequence of states (state trajectory) from time t to t + k, i.e., st:t+k = (st , st+1 , ..., st+k ). The Boolean semantics of TLTL is defined as: st:t+k |= f (s) < c φ) ∃t0 ∈ [t, t + k) s.t. st0 :t+k |= ψ ∧ (∃t00 ∈ [t, t0 ) st00 :t0 |= φ). Intuitively, state trajectory st:t+k |= 2φ (reads st:t+k satisfies 2φ) if the specification defined by φ is satisfied for every subtrajectory st0 :t+k , t0 ∈ [t, t + k). Similarly, st:t+k |= ♦φ if φ is satisfied for at least one subtrajectory st0 :t+k , t0 ∈ [t, t + k). st:t+k |= φ U ψ if φ is satisfied at every time step before ψ is satisfied, and ψ is satisfied at a time between t and t + k. st:t+k |= φ T ψ if φ is satisfied at least once before ψ is satisfied between t and t + k. A trajectory s of duration k is said to satisfy formula φ if s0:k |= φ. TLTL is equipped with quantitative semantics (robustness degree) , i.e., a real-valued function ρ(st:t+k , φ) that indicates how far st:t+k is from satisfying or violating the min (ρ(st0 :t+k , φ)), t0 ∈[t,t+k) max (ρ(st0 :t+k , φ)), t0 ∈[t,t+k) max (min(ρ(st0 :t+k , ψ), t0 ∈[t,t+k) min ρ(st00:t0 , φ))), t00 ∈[t,t0 ) ρ(st:t+k , φ T ψ) = max (min(ρ(st0 :t+k , ψ), t0 ∈[t,t+k) max ρ(st00:t0 , φ))), t00 ∈[t,t0 ) where ρmax represents the maximum robustness value. Moreover, ρ(st:t+k , φ) > 0 ⇒ st:t+k |= φ and ρ(st:t+k , φ) < 0 ⇒ st:t+k 6|= φ, which implies that the robustness degree can substitute Boolean semantics in order to enforce the specification φ. Example 1: Consider specification φ = ♦(s > 5 ∧ s < 10), where s is a one dimensional state. Intuitively, this formula specifies that s eventually reaches region (5, 10) for at least one time step. Suppose we have a state trajectory s0:3 = s0 s1 s2 = [11,  6, 7] of horizon 3. The robustness is ρ(s0:3 , φ) = max min(10 − st , st − 5) = t∈[0,3) max(−1, 1, 2) = 2. Since ρ(st , φ) > 0, s0:1 |= φ and the value ρ(st , φ) = 2 is a measure of the satisfaction margin. Note that both states s1 and s2 stayed within the specified region, but s2 ”more” satisfies the predicate (s > 5∧s < 10) by being closer to the center of the region and thereby achieving a higher robustness value than s1 . B. Markov Decision Process In this section, we introduce the finite horizon infinite Markov decision process (MDP) and the semantics of a TLTL formula over an MDP. We start with the following definition: Definition 1: A finite horizon infinite MDP is defined as a tuple hS, A, p(·|·, ·)i, where S ⊆ IRn is the continuous state space; A ⊆ IRm is the continuous action space; p(s0 |s, a) is the conditional probability density of taking action a ∈ A at state s ∈ S and ending up in state s0 ∈ S. We denote T as the horizon of MDP. Given an MDP in Definition 1, a state trajectory of length T (denoted τ = s0:T −1 = (s0 , ..., sT −1 )) can be produced. The semantics of a TLTL formula φ over τ can be evaluated with the robustness degree ρ(τ, φ) defined in the previous section. ρ(τ, φ) > 0 implies that τ satisfies φ, i.e. τ |= φ and vice versa. In the next section, we will take advantage of this property and propose a policy search method that aims to maximize the expected robustness degree. IV. T EMPORAL L OGIC P OLICY S EARCH (TLPS) Given a TLTL formula φ over predicates of S, TLPS finds the parameters θ of a parametrized stochastic policy πθ (a|s) that maximizes the following objective function. III. P ROBLEM F ORMULATION A ND A PPROACH J πθ = Epπθ [ρ(τ, φ)], (T < ∞), We first formulate the problem of policy search with TLTL specification as follows: Problem 1: Given an MDP in Definition 1 and a TLTL formula φ, find a stochastic policy π(a|s) (π determines a probability of taking action a at state s) that maximizes the expected robustness degree π ? = arg max Epπ (τ ) [ρ(τ, φ)] , (2) π where the expectation is taken over the trajectory distribution pπ (τ ) following policy π, i.e. pπ (τ ) = p(s0 ) TY −1 p(st+1 |st , at )π(at |st ). where pπθ = pπθ (τ ) is defined in Equation (3). In TLPS, we model the policy as a time-varying linear Gaussian, i.e. π(at |st ) = N (Kt st +kt , Ct ) where Kt , kt , Ct are the feedback gain, feed-forward gain and covariance of the policy at time t. (similar approach has been adopted in [19], [20]). And the trajectory distribution in Equation (3) is modeled as a Gaussian pπθ (τ ) = N (τ |µτ , Στ ) where µτ = (µs0 , ..., µsT ) and Στ = diag(Σs0 , ..., ΣsT ). At each iteration, N sample trajectories are collected (denoted τ i , i ∈ [1, N ]). For each sample trajectory τ i , we find an updated trajectory τ̄ i by solving (3) max ρ̂(τ̄ i , φ), s.t. (τ̄ i − τ i )T (τ̄ i − τ i ) < . i t=0 τ̄ In reinforcement learning, the transition function p(s0 |s, a) is unknown to the agent. The solution to Problem 1 learns a stochastic time-varying policy π(at |st ) [18] which is a conditional probability density function of action a given current state s at time step t. In this paper, policy π is a parameterized policy π(at |st ; θt ), ∀t = 1, . . . , T (also written as πθ in short, where θ = {θ0 , θ1 , . . . , θT −1 }) is used to represent the policy parameter. The objective defined in Equation (2) then becomes finding the optimal policy parameter θ∗ such that θ? = arg max Epπθ (τ ) [ρ(τ, φ)] . (4) θ To solve Problem 1, we introduce temporal logic policy search (TLPS) - a model free RL algorithm. At each iteration, a set of sample trajectories are collected under the current policy. Each sample trajectory is updated to a new one with higher robustness degree by following the gradient of ρ while also keeping close to the sample so that dynamics is not violated. A new trajectory distribution is fitted to the set of updated trajectories. Each sample trajectory is then assigned a weight according to its probability under the updated distribution. Finally, the policy is updated with weight maximum likelihood. This process ensures that each policy update results in a trajectory distribution with higher expected robustness than the current one. Details of TLPS will be discussed in the next section. As introduced in Section II-A, the robustness degree ρ consists of embedded max / min functions and calculating the gradient is not possible. In Section V, we discuss the use of log-sum-exp to approximate the robustness function and provide proofs of some properties of the approximated robustness. (5) (6) In the above equation, ρ̂ is the log-sum-exp approximation of ρ. This is to take advantage of the many off-the-shelf nonlinear programming methods that require gradient information of the Lagrangian (sequential quadratic programming is used in our experiments). Using the log-sum-exp approximation we can show that its approximation error is bounded. In additional, the local ascending directions on the approximated surface coincide with the actual surface given mild constraints (these will be discussed in more detail in the next section). Equation (6) aims to find a new trajectory that achieves higher robustness. The constraint is to limit the deviation of the updated trajectory from the sample trajectory so the system dynamics is not violated. After we obtain a set of updated trajectories, an updated trajectory distribution p̄(τ ) = N (τ |µ̄τ , Σ̄τ ) is fitted using µ̄τ = N N 1 X i 1 X i τ̄ , Σ̄τ = (τ̄ − µ̄τ )(τ̄ i − µ̄τ )T , N i=1 N i=1 (7) The last step is to update the policy. We will only be updating the feed-forward terms kt and the covariance Ct . The feedback terms Kt is kept constant (the policy parameters are θt = (kt , Ct ), t ∈ [0, T )). This significantly reduces the number of parameters to be updated and increases the learning speed. For each sample trajectory, we obtain its probability under p̄(τ ) p(τ i ) = N (τ i |µ̄τ , Σ̄τ ) (8) ( p(τ i ) is also written in short as pi ) where i ∈ [1, N ] is the sample index. Using these probabilities, a normalized weighting for each sample trajectory using PN is calculated i i the softmax function wi = eαp / i=1 eαp (α > 0 is a parameter to be tuned). Finally, similar to [19], the policy is updated using weighted maximum likelihood by where β > 0 is a smoothness parameter. We denote an iterative max-min function as M (x) = mamii fi (x), kt0 = Ct0 = N X wi kti i=1 N X (9) wi (kti − kt0 )(kti − kt0 )T . i=1 According to [21], such update strategy will result in convergence. The complete algorithm is described in Algorithm 1. Algorithm 1 Temporal Logic Policy Search 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: Inputs: Episode horizon T , batch size N , KL constraint parameter , smoothed robustness function ρ̂(s0:T , φ), softmax parameter α > 0 Initialize policy π ← (Kt , kt , Ct ) Initialize trajectory buffer B ← ∅ for m = 1 to number of training episodes do τm = SampleTrajectories(π, T ) Store τm in B if Size(B) ≥ N then τ̄ i ← GetUpdatedTrajectories(τ i ) for i = 1 to N end for . Using Equation (6) µ̄τ , Σ̄τ ← FitTrajectoryDistribution({τ1 , ..., τN }) . Using Equation (7) for i=1 to N do pi ← N (τ i |µ̄τ , Σ̄τ ) αpi wi = PNe eαpi i=1 end for for t = 0 P to T-1 do N kt0 ← i wi kti PN i i 0 Ct ← i w (kt − kt0 )(kti − kt0 )T end for Clear buffer B ← ∅ end if end for V. ROBUSTNESS S MOOTHING In the TLPS algorithm introduced in the previous section, one of the steps requires solving a constrained optimization problem that maximizes the robustness (Equation (6)). The original robustness definition in Section II-A is nondifferentiable and thus rules out many efficient gradientbased methods. In this section we adopt a smooth approximation of the robustness function using log-sum-exp. Specifically n max(x1 , ..., xn ) ≈ X 1 log exp(βxi ) β i min(x1 , ..., xn ) ≈ − 1 log β n X i exp(−βxi ), where fi (x) = mamij fj (x). mami denotes a function as mami ∈ {max, min, I} where I is a operator such that Ifj (x) = fj (x). i and j are index of the functions in mami and can be any positive integer. As we showed in Section IIA, any robustness function could be expressed as an iterative max-min function. Following the log-sum-exp approximation, any iterative max-min function (i.e., the robustness of any TL formula) can be approximated as follows ! X 1 exp (βfi (x)) , M̂ (x) = log β i where βi > 0 if mamii = maxi and βi < 0 if mamii = mini . In the reminder of this section, we provide three lemmas that show the following: • the approximation error between M (x) and M̂ (x) approaches zero as βi → ∞. This error is always bounded by the log of the number of f (x) which is determined by the number of predicates in the TL formulae and the horizon of the problem. Tuning βi trades off between differentiability of the robustness function and approximation error. • despite the error introduced by the approximation, the optimal points remain invariant (i.e. argmaxx M (x) = argmaxx M̂ (x)). This result provides guarantee that the optimal policy is unchanged when using the approximated TL reward, • even though the log-sum-exp approximation smooths the robustness function. Locally the ascending directions of M (x) and M̂ (x) can be tuned to coincide with small error and the deviation is controlled by the parameter β. As many policy search methods are local methods that improve the policy near samples, it is important to ensure that the ascending direction of the approximated TL reward does not oppose that of the real one. Due to space constraints, we will only provide sketches of the proofs for the lemmas. Lemma 1: Let Ni be the number of terms of mamii , M and M̂ satisfy X 1 X 1 M− log Ni ≤ M̂ ≤ M + log Ni |βi | βi i∈Smin i∈Smax where Smin = {i : mamii = mini } and Smax = {i : mamii = maxi }. Proof: For simplicity and without loss of generality, we illustrate the proof of Lemma 1 by constructing an approximation for a finite max-min-max problem Φ(x) = max min max fi,j,k (x). (10) i∈I j∈J k∈K Let MI = |I|, MJ = |J|, MK = |K|, and βI > 0, βJ < 0, βK > 0. Firstly, we define Φj (x) = maxk∈K fi,j,k (x). Straightforward algebraic manipulation reveals that   X βJ log  exp(βJ Φj ) + log(MK ) βK j∈J  " # ββJ  K X X  ≤ log  exp(βK fi,j,k (x)) j∈J ≤ exp (βfImax (x∗ )) − exp (βfImax (x)). There always exists a positive constant B, such that for all β > B the above statement holds. Lemma 2 can be obtained by using the above proof for the mami function in general.  X exp(βJ Φj ) . j∈J Furthermore, let us define Φi = minj∈J Φj , we have   X βJ Φi ≤ log  exp(βJ Φj ) ≤ log(MJ ) + βJ Φi . j∈J Lemma 3: Let us denote the sub-gradient of M as M̂ the gradient of M̂ as ∂∂x = ∂M ∂M ∂M ∂x = { ∂x1 , . . . , ∂xN } and ∂ M̂ ∂ M̂ { ∂x1 , . . . , ∂xN }. There exists ∂ M̂ for all |β| ≥ B, ∂M ∂x and ∂x By substituting into Equation (11), we obtain   X βJ Φi + log(MJ ) ≥ log  exp(βJ Φj ) h j∈J ≥ β J Φi + Multiplying 1 βJ βJ log(MK ). βK on both side, then X βI log( exp(βI Φi )) + log(MJ ) βJ i∈I  βI   ! ββJ  βJ K  X X X    exp(β f (x)) ≤ log  K i,j,k   i∈I i6=Imax i6=Imax k∈K  ≤ log  (11) Proof: We start by considering M as a maximum function, i.e. M (x) = maxi fi (x).let us denote Imax = argmaxi fi (x∗ ), then x∗ ∈ argmaxx M̂ (x) when X X exp (βfi (x)) exp (βfi (x∗ )) − j∈J k∈K X βI ≤ log( log(MK ). exp(βI Φi )) + βK a positive constant B such that satisfy ∂M ∂ M̂ , i ≥ 0, ∂x ∂x where h·, ·i denotes the inner product. Proof: Here we will only provide the proof when M is a point-wise maximum of convex functions. One can generalize it to any iterative max-min function using the chain rule. Supposing M (x) = maxi fi (x), the sub-gradient of M (x) is ∂M = ∂fi (x), i ∈ I(x), ∂x where I(x) = {i|fi (x) = f (x)} is the set of ”active” functions. The corresponding M̂ is defined as ! X 1 M̂ = log exp (βfi (x)) , β i i∈I where its first order derivative is Finally, let Φ = maxi∈I Φi , then we have X exp(βI Φ) ≤ exp(βI Φi ) ≤ MI exp(βI Φ) X exp(βfi (x))∂fi (x) ∂ M̂ P = . ∂x k exp (βfk (x)) i i∈I X βI Φ ≤ log( exp(βI Φi )) ≤ log(MI ) + βI Φ (12) i∈I Substitute into Equation (12) βI log(MJ ) βJ  βI   ! ββJ  βJ K  X X X    ≤ log  exp(βK fi,j,k (x))   βI Φ + i∈I j∈J k∈K ≤ βI Φ + log(MI ) + βI log(MK ). βK Then we conclude the proof. Lemma 2: Suppose X ∗ = {x∗ : x∗ ∈ argmaxx M (x)}, there exist a positive constant B such that for all |β| ≥ B x∗ is also one of the maximum point of M̂ (x) for any x∗ , i.e. x∗ ∈ argmaxx M̂ (x). ∂ M̂ h ∂M ∂x , ∂x i > 0 if exp (βfi (x)) P fi (x) k exp (βfk (x)) X exp (βfj (x)) P ≥ fj (x), ∀i ∈ I(x). k exp (βfk (x)) j ∈I(x) / Therefore, there always exists a positive constant B, such ∂ M̂ that h ∂M ∂x , ∂x i > 0 holds for all β > B. VI. C ASE S TUDIES In this section, we apply TLPS on a vehicle navigation example. As shown in Figure 1, the vehicle navigates in a 2D environment. It has a 6 dimensional continuous state feature space s = [x, y, θ, ẋ, ẏ, θ̇] where (x, y) is the position of its center and θ is the angle its heading makes with the x-axis. Its 2 dimensional action space a = [av , aΦ ] consists of the forward driving speed and the steering angle of its front wheels. The car moves according to dynamics ẋ = av cos θ ẏ = av sin θ av tan aΦ θ̇ = L (13) with added Gaussian noise (L is the distance between the front and rear axles). However the learning agent is not provided with this model and needs to learn the desired control policy through trial-and-error. to obstacle center at time t. Using the log-sum-exp, approximation for ρ1 (φ1 , (x, y)0:T ) can be obtained as ρ̂1 (φ1 , (x, y)0:T ) = T  X 1 − log exp[−β(xt − xlg )] + exp[−β(xug − xt )]+ β t=0  exp[−β(yt − ygl )] + exp[−β(ygu − yt )] + exp[−β(dto − ro )] . (16) Because we used the same β throughout the approximation, intermediate log and exp cancel and we end up with Equation (16). ρ̂1 (φ1 , (x, y)0:T ) is used in the optimization problem defined in Equation (6). In task 2, the vehicle is required to visit goals 1, 2, 3 in this specific order while avoiding the obstacle. Expressed in TLTL results in the specification φ2 =(ψg1 T ψg2 T ψg3 ) ∧ (¬(ψg2 ∨ ψg3 ) U ψg1 )∧ ^ (¬(ψg3 ) U ψg2 ) ∧ ( 2(ψgi ⇒ 2¬ψgi ))∧ i=1,2,3 2(do > ro ), (17) Fig. 1 : Vehicle navigation task using TLTL specifications. The vehicle is shown in brown, the obstacle is shown as the green circle and the goals are shown as the green squares. left: Task 1 is to reach the goal while avoiding the obstacle. right: Task 2 is to visit goals 1,2,3 in this order while avoiding the obstacle We test TLPS on two tasks with increasing difficulty. In the first task, the vehicle is required to reach the goal g while avoiding the obstacle o. We express this task as a TLTL specification φ1 =♦(x > xlg ∧ x < xug ∧ y > ygl ∧ y < ygu )∧ 2(do > ro ). (14) In Equation (14), (xlg , xug , ygl , ygu ) defines the square shaped goal region, do is the Euclidean distance between the vehicle’s center and the center of the obstacle, ro is the radius of the obstacle. In English, φ1 describes the task of ”eventually reach goal g and always stay away from the obstacle”. Using the quantitative semantics described in Section II-A , the robustness of φi is ρ1 (φ1 , (x, y)0:T ) =    min max min xt − xlg , xug − xt , yt − ygl , ygu − yt , t∈[0,T ) min  t∈[0,T ) dto − ro  ! , (15) where (xt , yt ) and dto are the vehicle position and distance V where is a shorthand for a sequence of conjunction, ψgi : x > xlgi ∧x < xugi ∧y > ygl i ∧y < ygui are the predicates for goal gi . In English, φ2 states ”visit g1 then g2 then g3 , and don’t visit g2 or g3 until visiting g1 , and don’t visit g3 until visiting g2 , and always if visited gi implies next always don’t visit gi (don’t revisit goals), and always avoid the obstacle” . Due to space constraints the robustness of φ2 and its approximation will not be explicitly presented, but it will take a similar form of nested min()/ max() functions that can be generated from the quantitative semantics of TLTL. During training time, the obstacle is considered ”penetrable” in that the car can surpass its boundary with a negative reward granted according to the penetrated depth. In practice we find that this facilitates learning compared to a single negative reward given at contact with the obstacle and restarting the episode. Each episode has a horizon T = 200 time-steps. 40 episodes of sample trajectories are collected and used for each update iteration. The policy parameters are initialized randomly in a given region (the policy covariances should be initialized to relatively high values to encourage exploration). Each task is trained for 50 iterations and the results are presented in Figures 2 and 3. Figure 2 shows sample trajectory distributions for selected iterations. Trajectory distributions are illustrated as shaded regions with width equal to 2 standard deviations. Lighter shade indicates earlier time in the training process. We used β = 9 for this set of results. We can see from Figure 2 that the trajectory distribution is able to converge and satisfy the specification. Satisfaction occurs much sooner for task 1 (around 30 iterations) compared with task 2 (around 50 iterations). Figure 3 compares the average robustness (of 40 sample trajectories) per iteration for TLPS with different values Fig. 2 : Sample trajectory distributions for selected iterations for left: task 1, right: task 2. Each iteration consists of 40 sample trajectories each having a horizon of 200 time-steps. The width of each distribution is 2 standard deviations and color represent recency in the training process (lighter color indicates earlier time in training). Fig. 3 : Average return vs training iteration for left: task 1, right: task2. The average return is represented as the original robustness value calculated from sample trajectories. TLPS is compared with varying β. REPS with the original robustness as terminal reward is used as a baseline. of the approximation parameters β in (10). As a baseline, we also compare TLPS with episode-based relative entropy policy search (REPS) [18]. The original robustness function is used as the terminal reward for REPS and our previous work [17] has shown that this combination outperforms heuristic reward designed for the same robotic control task. The magnitude of robustness value changes with varying β. Therefore, in order for the comparison to be meaningful (putting average returns on the same scale), sample trajectories collected for each comparison case are used to calculate their original robustness values against the TLTL formula and plotted in Figure 3 (a similar approach taken in [17]). The original robustness is chosen as the comparison measure for its semantic integrity (value greater than zero indicates satisfaction). Results in Figure 3 shows that larger β results in faster convergence and higher average return. This is consistent with the results of Section V since larger β indicates lower approximation error. However, this advantage diminishes as β increases due to the approximated robustness function losing differentiability. For the relatively easy task 1, TLPS performed comparatively with REPS. However, for the harder task 2, TLPS exhibits a clear advantage both in terms of rate of convergence and quality of the learned policy. TLPS is a local policy search method that offers gradual policy improvement, controllable policy space exploration and smooth trajectories. These characteristics are desirable for learning control policies for systems that involve physical interactions with the environment. S (likewise for other local RL methods). Results in Figure 3 show a rapid exploration decay in the first 10 iterations and little improvement is seen after the 40th iteration. During experiments, the authors find that adding a policy covariance damping schedule can help with initial exploration and final convergence. A principled exploration strategy is possible future work. Similar to many policy search methods, TLPS is a local method. Therefore, policy initialization is a critical aspect of the algorithm (compared with value-based methods such as Q-learning). In addition, because the trajectory update step in Equation (6) does not consider the system dynamics and relies on being close to sample trajectories, divergence can occur with a small β or a large learning rate. Making the algorithm more robust to hyperparameter changes is also an important future direction. VII. C ONCLUSION As reinforcement learning research advance and more general RL agents are developed, it becomes increasingly important that we are able to correctly communicate our intentions to the learning agent. A well designed RL agent will be proficient at finding a policy that maximizes its returns, which means it will exploit any flaws in the reward function that can help it achieve this goal. Human intervention can sometimes help alleviate this problem by providing additional feedback. However, as discussed in [8], if the communication link between human and the agent is unstable (space exploration missions) or the agent operates on a timescale difficult for human to respond to (financial trading agent), it is critical that we are confident about what the agent will learn. In this paper, we applied temporal logic as the task specification language for reinforcement learning. The quantitative semantics of TL is adopted for accurate expression of logical relationships in an RL task. We explored robustness smoothing as a means to transform the TL robustness to a differentiable function and provided theoretical results on the properties of the smoothed robustness. We proposed temporal logic policy search (TLPS), a model-free method that utilizes the smoothed robustness and operates in continuous state and action spaces. Simulation experiments are conducted to show that TLPS is able to effectively find control policies that satisfy given TL specifications. R EFERENCES [1] V. Mnih, K. Kavukcuoglu, D. Silver, A. a. Rusu, J. Veness, M. G. Bellemare, A. Graves, M. Riedmiller, A. K. Fidjeland, G. Ostrovski, S. Petersen, C. Beattie, A. Sadik, I. Antonoglou, H. King, D. Kumaran, D. Wierstra, S. Legg, and D. Hassabis, “Human-level control through deep reinforcement learning,” Nature, vol. 518, no. 7540, pp. 529–533, 2015. [2] D. Silver, A. Huang, C. J. Maddison, A. Guez, L. Sifre, G. V. D. Driessche, J. Schrittwieser, I. Antonoglou, V. Panneershelvam, M. Lanctot, S. Dieleman, D. Grewe, J. Nham, N. Kalchbrenner, I. Sutskever, T. Lillicrap, M. Leach, and K. Kavukcuoglu, “Mastering the game of Go with deep neural networks and tree search,” Nature, vol. 529, no. 7585, pp. 484–489, 2016. [Online]. Available: http://dx.doi.org/10.1038/nature16961 [3] S. Levine, C. Finn, T. Darrell, and P. Abbeel, “End-to-End Training of Deep Visuomotor Policies,” Arxiv, p. 6922, 2015. [Online]. Available: http://arxiv.org/abs/1504.00702 [4] S. Levine, P. Pastor, A. Krizhevsky, and D. Quillen, “Learning Hand-Eye Coordination for Robotic Grasping with Deep Learning and Large-Scale Data Collection,” arXiv, 2016. [Online]. Available: http://arxiv.org/abs/1603.02199v1 [5] S. Gu, E. Holly, T. Lillicrap, and S. Levine, “Deep reinforcement learning for robotic manipulation with asynchronous off-policy updates,” arXiv preprint arXiv:1610.00633, 2016. [6] J. Peters, S. Vijayakumar, and S. Schaal, “Reinforcement learning for humanoid robotics,” in Proceedings of the third IEEE-RAS international conference on humanoid robots, 2003, pp. 1–20. [7] D. Amodei, C. Olah, J. Steinhardt, P. Christiano, J. Schulman, and D. Mané, “Concrete Problems in AI Safety,” pp. 1–29, 2016. [Online]. Available: http://arxiv.org/abs/1606.06565 [8] D. Dewey, “Reinforcement learning and the reward engineering principle,” in 2014 AAAI Spring Symposium Series, 2014. [9] I. Arel, “The threat of a reward-driven adversarial artificial general intelligence,” in Singularity Hypotheses. Springer, 2012, pp. 43–60. [10] “Policy invariance under reward transformations : Theory and application to reward shaping,” Sixteenth International Conference on Machine Learning, vol. 3, pp. 278–287, 1999. [11] A. Ng and S. Russell, “Algorithms for inverse reinforcement learning,” Proceedings of the Seventeenth International Conference on Machine Learning, vol. 0, pp. 663–670, 2000. [Online]. Available: http://www-cs.stanford.edu/people/ang/papers/icml00-irl.pdf [12] P. Sermanet, K. Xu, and S. Levine, “Unsupervised perceptual rewards for imitation learning,” arXiv preprint arXiv:1612.06699, 2016. [13] K. Leahy, D. Zhou, C.-I. Vasile, K. Oikonomopoulos, M. Schwager, and C. Belta, “Persistent surveillance for unmanned aerial vehicles subject to charging and temporal logic constraints,” Autonomous Robots, vol. 40, no. 8, pp. 1363–1378, 2016. [14] S. Sadraddini and C. Belta, “A provably correct mpc approach to safety control of urban traffic networks,” in American Control Conference (ACC), 2016. IEEE, 2016, pp. 1679–1684. [15] S. Coogan, E. A. Gol, M. Arcak, and C. Belta, “Traffic network control from temporal logic specifications,” IEEE Transactions on Control of Network Systems, vol. 3, no. 2, pp. 162–172, 2016. [16] D. Aksaray, A. Jones, Z. Kong, M. Schwager, and C. Belta, “Qlearning for robust satisfaction of signal temporal logic specifications,” in Decision and Control (CDC), 2016 IEEE 55th Conference on. IEEE, 2016, pp. 6565–6570. [17] X. Li, C.-I. Vasile, and C. Belta, “Reinforcement learning with temporal logic rewards,” IEEE International Conference on Intelligent Robots and Systems, 2017. [18] M. P. Deisenroth, “A Survey on Policy Search for Robotics,” Foundations and Trends in Robotics, vol. 2, no. 1, pp. 1–142, 2011. [Online]. Available: http://www.nowpublishers.com/articles/ foundations-and-trends-in-robotics/ROB-021 [19] Y. Chebotar, M. Kalakrishnan, A. Yahya, A. Li, S. Schaal, and S. Levine, “Path integral guided policy search,” arXiv preprint arXiv:1610.00529, 2016. [20] W. H. Montgomery and S. Levine, “Guided policy search via approximate mirror descent,” in Advances in Neural Information Processing Systems, 2016, pp. 4008–4016. [21] F. Stulp and O. Sigaud, “Path integral policy improvement with covariance matrix adaptation,” ICML, 2012.
2cs.AI
arXiv:1701.08350v1 [math.DS] 29 Jan 2017 FURSTENBERG ENTROPY OF INTERSECTIONAL INVARIANT RANDOM SUBGROUPS YAIR HARTMAN AND ARIEL YADIN Abstract. We study the Furstenberg-entropy realization problem for stationary actions. It is shown that for finitely supported probability measures on free groups, any a-priori possible entropy value can be realized as the entropy of an ergodic stationary action. This generalizes results of Bowen. The stationary actions we construct arise via invariant random subgroups (IRSs), based on ideas of Bowen and Kaimanovich. We provide a general framework for constructing a continuum of ergodic IRSs for a discrete group under some algebraic conditions, which gives a continuum of entropy values. Our tools apply for example, for certain extensions of the group of finitely supported permutations and lamplighter groups, hence establishing full realization results for these groups. For the free group, we construct the IRSs via a geometric construction of subgroups, by describing their Schreier graphs. The analysis of the entropy of these spaces is obtained by studying the random walk on the appropriate Schreier graphs. 1. Introduction In this paper we study the Furstenberg-entropy realization problem, which we will describe below. We propose a new generic construction of invariant random subgroups and we are able to analyse the Furstenberg-entropy via the random walk and its properties. We apply this construction to free groups and lamplighter groups, generalizing results of Bowen [4] and of the first named author with Tamuz [16]. In addition, we apply it to the group of finitely supported infinite permutations and to certain extensions of this group, establishing a full realization result for this class of groups. Let us introduce the notions and results precisely. Let G be a countable discrete group and let µ be a probability measure on G. We will always assume that µ is generating and of finite entropy; that is, the support of P µ generates G as a semigroup and the Shannon entropy of µ is finite, H(µ) := − g µ(g) log µ(g) < ∞. 2010 Mathematics Subject Classification. Primary . Y. Hartman is supported by the Fulbright Post-Doctoral Scholar Program. A. Yadin is supported by the Israel Science Foundation (grant no. 1346/15). We would like to thank Lewis Bowen and Yair Glasner for helpful discussions. 1 2 YAIR HARTMAN AND ARIEL YADIN Suppose that G acts measurably on a standard probability space (X, ν). This −1 induces an action on the probability measure ν given P by gν(·) = ν(g ·). The action G y (X, ν) is called (G, µ)-stationary if g∈G µ(g)gν = ν. Thus, the measure ν is not necessarily invariant, but only “invariant on average”. An important quantity associated to a stationary space is the Furstenberg-entropy, given by Z X dg −1 ν hµ (X, ν) := − µ(g) log dν(x) dν X g∈G It is easy to see that hµ (X, ν) ≥ 0 and that equality holds if and only if the measure ν is invariant (invariant means gν = ν for all g ∈ G). A classical result of Kaimanovich-Vershik [20] asserts that the Furstenberg-entropy of any (G, µ)stationary space is bounded above by the random walk entropy 1 H(µn ), n→∞ n where µn denotes the n-th convolution power of µ. As a first step of classification of the possible (G, µ)-stationary actions for a given µ, one may consider the following definitions. hRW (G, µ) := lim Definition 1.1. We say that (G, µ) has an entropy gap if there exists some c > 0 such that whenever hµ (X, ν) < c for an ergodic (G, µ)-stationary action (X, ν) then hµ (X, ν) = 0. Otherwise we say that (G, µ) has no-gap. We say that (G, µ) admits a full realization if any number in [0, hRW (G, µ)] can be realized as the Furstenberg-entropy of some ergodic (G, µ)-stationary space. Let us remark that choosing only ergodic actions G y (X, ν) is important. Otherwise the definitions are non-interesting, since by taking convex combinations one can always realize any value. The motivation for the gap definition comes from Nevo’s result in [24] showing that any discrete group with property (T) admits an entropy gap, for any µ. The converse however is not true (see e.g. Section 7.2 in [7]) and it is interesting to describe the class of groups (and measures) with no-gap. Our main result is the following. Theorem 1.2. Let µ be a finitely supported, generating probability measure on the free group Fr on 2 ≤ r < ∞ generators. Then (Fr , µ) admits a full realization. As will be explained below (see Remark 4.9), the restriction to finitely supported measures µ is technical and it seems that the result should hold in a wider generality. The case where µ is the simple random walk (uniform measure on the generators and their inverses) was done by Bowen [4]. We elaborate on the similarity and differences with Bowen’s result below. Our next result provides a solution for lamplighter groups. ENTROPY OF INTERSECTIONAL IRSS 3 Theorem 1.3. Let G = ⊕B L o B be a lamplighter group where L and B are some non trivial countable discrete groups. Let µ be a generating probability measure with finite entropy on G and denote by µ̄ the projection of µ onto the quotient B∼ = G/(⊕B L o {e}). Then, whenever (B, µ̄) is Liouville, (G, µ) admits a full realization. Here, Liouville is just the property that the random walk entropy is zero. For example, if the base group B is virtually nilpotent (equivalently, of polynomial growth in the finitely generated context), then B is Liouville for any measure µ (see Theorem 2.4 below). In [16], the first named author and Tamuz prove that a dense set of values can be realized, under an additional technical condition on the random walk. In addition, our tools apply also to nilpotent extensions of Sym∗ (X), the group of finitely supported permutations of an infinite countable set X. For simplicity, we state here the result for Sym∗ (X) itself, and refer the reader to Section 3.4 for the precise statement and proof of the general result. Theorem 1.4. Let µ be a generating probability measure with finite entropy on Sym∗ (X). Then (Sym∗ (X), µ) admits a full realization. Following the basic approach of Bowen in [4], our realization results use only a specific type of stationary actions known as Poisson bundles that are constructed out of invariant random subgroups. An invariant random subgroup, or IRS, of G, is random subgroup whose law is invariant to the natural G-action by conjugation. IRSs serve as a stochastic generalization of a normal subgroup and arise naturally as the stabilizers of probability measure preserving actions. In fact, any IRS is obtained in that way (see Proposition 14 in [3] for the discrete case, and [1] for the general case). Since the term IRS was coined in [2], they have featured in many works and inspired much research. In this paper we construct explicit families of IRSs for the free group, the lamplighter group and Sym∗ (X). For further discussion about the structure of IRSs on these groups the reader is referred to the works of Bowen [5] for the free group, Bowen, Grigorchuk and Kravchenko [6] for lamplighter groups and Vershik [28] for the Sym∗ (X) case. Given an ergodic IRS of a group G, one can construct an ergodic stationary space which is called a Poisson bundle. These were introduced by Kaimanovich in [19] and were further studied by Bowen in [4]. In particular, it was shown in [4] that the Furstenberg-entropy of a Poisson bundle constructed using an IRS, equals the random walk entropy of the random walk on the associated coset space (this will be made precise below). Hence our main results can be interpreted as realization results for the random walk entropies of coset spaces associated with ergodic IRSs. Given a subgroup with an infinite conjugacy class, we develop a general tool to construct a family of ergodic IRSs, that we call intersectional IRSs. This 4 YAIR HARTMAN AND ARIEL YADIN family of IRSs is obtained by randomly intersecting subgroups from the conjugacy class (see Section 3). Furthermore, we prove that under a certain condition related to the measure µ and the conjugacy class, the random walk entropy varies continuously along this family of IRSs (see Section 3.2). In fact, in some cases we may find a specific conjugacy class that satisfies the above mentioned condition for any measure µ. An example of such, is a conjugacy class that we call “locally co-nilpotent”. These are conjugacy classes such that that their associated Schreier graphs satisfy some geometric condition which we describe in Section 4.5. Using such families of IRSs we get our main tool for constructing a continuum of entropy values. Proposition 1.5. Let G be a countable discrete group. Assume that there exists a conjugacy class of subgroups which is locally co-nilpotent. (See just before Corollary 3.6 and Section 4.5 for the precise definition of locally co-nilpotent.) Denote its normal core by N C G. Then, for any finite entropy, generating, probability measure µ on G, if G/N has positive µ-random walk entropy, then (G, µ) has no-gap. Furthermore, if the normal core N is trivial, then (G, µ) admits a full realization. Note that this proposition reveals a structural condition on G and its subgroups that allows to conclude realization results for many different measures µ at the same time. Furthermore, these realization results do not depend on the description of the Furstenberg-Poisson boundary. By constructing conjugacy classes in lamplighter groups and in Sym∗ (X) with the relevant properties, we obtain Theorems 1.3 and 1.4. However, the case of the free group is more complicated. In Section 4.3 we show how to construct many subgroups of the free group with a conjugacy class which is locally co-nilpotent, and such that G/N has positive random walk entropy where N is the normal core of the conjugacy class. This is enough to realize an interval of entropy values around 0, showing in particular, that the free group admits no-gap for any µ with finite entropy. The fact that the free group admits no-gap for any finite first moment µ was proved in [16]. Theorem 1.6. Let µ be a finite entropy generating probability measure on the free group Fr on 2 ≤ r < ∞ generators. Then (Fr , µ) has an interval of the form [0, c] of realizable values. However, there is no single (self-normalizing) subgroup of the free group which has a locally co-nilpotent conjugacy class and a trivial normal core (see Lemma 3.7). The importance of the requirement that the normal core N is trivial, is to ensure that the random walk entropy on G/N is equal to the full random walk entropy. Hence, to prove a full realization for the free group, we approximate this property. That is, we find a sequence of conjugacy classes which are all locally co-nilpotent, ENTROPY OF INTERSECTIONAL IRSS 5 and such that their normal cores satisfy that the random walk entropy on the quotients tends to hRW (G, µ). Finding such a sequence is quite delicate, and proving it is a bit technical. The difficulty comes from the fact that entropy is semi-continuous, but in the “wrong direction” (see Theorem 2.2 and the discussion after). It is for this analysis that we need to assume that µ is finitely supported, although it is plausible that this condition can be relaxed. By that we mean that the very same conjugacy classes we construct in this paper might satisfy that random walk entropy on the quotients by their normal cores tends to hRW (G, µ), even for infinitely supported µ as well (perhaps under some further regularity conditions, such as some moment conditions). 1.1. Intersectional IRSs. We now explain how to construct intersectional IRSs. Let K ≤ G be a subgroup with an infinite conjugacy class |K G | = ∞ (we use the notation K g = g −1 Kg for conjugation). We may index this conjugacy class by the integers: K G = (Kz )z∈Z . It is readily checked that the G-action (by conjugation) on the conjugacy class K G is translated to an action by permutations on Z. Namely, for g ∈ G, z ∈ Z, we define g.z to be the unique integer such that (Kz )g = Kg.z . Thus, G also acts on subsets S ⊂ Z element-wise. T Given a non-empty subset S ⊂ Z, we may associate to S a subgroup CoreS (K) = s∈S Ks . If S is chosen to be random, with a law invariant to the G-action, then the random subgroup CoreS (K) is an IRS. Moreover, it is quite simple to get such a law: for a parameter p ∈ (0, 1] let S be p-percolation on Z; that is, every element z ∈ Z belongs to S with probability p independently. There are few issues with this construction. • It is not immediately clear what should be associated to the “empty intersection” when S = ∅. In Section 3.1 we give an apropriate definition, which follows from a construction of an associated “semi-norm” on the group G. This will turn out to be a normal subgroup of G that we denote by Core∅ (K). • Note that p = 1 corresponds to the non-random subgroup CoreG (K), which is just the normal core of the conjugacy class K G . This is also a normal subgroup, and CoreG (K) C Core∅ (K). • It seems very reasonable that as p varies, certain quantities related to the IRS should vary continuously. In Section 3.2 we provide a condition on the conjugacy class K G that guarantees that the Furstenberg-entropy is indeed continuous in p. After establishing continuity of the Furstenberg-entropy in p, one wishes to show that the full interval [0, hRW (G, µ)] of possible entropy values is realized. As mentioned above, in the free group we must use a sequence of subgroups Kn (or conjugacy classes), such that the random walk entropy of the quotient 6 YAIR HARTMAN AND ARIEL YADIN G/CoreG (Kn ) is large, and push this quotient entropy all the way up to the full random walk entropy hRW (G, µ). This leads to a study of CoreG (Kn ), the normal cores of a sequence of subgroups (Kn )n , with the objective of showing that CoreG (Kn ) are becoming “smaller” in some sense. As will be discussed below, a naive condition such as having CoreG (Kn ) converge to the trivial group does not suffice. What is required, is to approximate the Furstenberg-Poisson boundary of the random walk on the full group by the boundaries of the quotients. By that we mean that we need to find a sequence such that one can recover the point in the boundary of the random walk on the free group, by observing the projections in the boundaries of the quotients G/CoreG (Kn ). However, we construct the subgroups Kn geometrically, by specifying their associated Schreier graphs (and not by specifying the algebraic properties of the subgroup). Hence the structure of CoreG (Kn ) and in particular the FurstenbergPoisson boundary of G/CoreG (Kn ) is somewhat mysterious. A further geometric argument using the random walk on the aforementioned Schreier graph (specifically transience of this random walk) allows us to “sandwich” the entropy of the G/CoreG (Kn ) and thus show that these entropies tend to the correct limiting value. This is done in Section 4. It may be interesting for some readers to note that in the simple random walk case considered by Bowen [4], he also shows a full realization by growing intervals of possible entropy values. However, Bowen obtains the intervals of realization differently than us. In fact, he proves that the entropy is continuous when restricting to a specific family of subgroups which are “tree-like”. This is a global property of the Schreier graph that enables him to analyze the random walk entropy of the simple random walk and to prove a continuity result. Next, within this class of tree-like subgroups he finds paths of IRSs obtaining realization of intervals of the form [εn , hRW (G, µ)] for εn → 0 (“top down”). While it is enough for a full realization for the simple random walk, the condition of being tree-like is quite restrictive, and difficult to apply to other measures µ on the free group. In contrast, based on Proposition 1.5, our results provide realization on intervals of the form [0, hRW (G, µ) − εn ] for εn → 0 (“bottom up”). In order to “push” the entropy to the top we also use a geometric condition, related to trees. However, this condition is more “local” in nature, and considers only finite balls in the Scherier graph. In particular, we show in Section 4.6 that it is easy to construct many subgroups that satisfy our conditions. Also, it enables us to work with any finitely supported measure. 1.2. Related results. The first realization result is due to Nevo-Zimmer [25], where they prove that connected semi-simple Lie groups with finite center and R-rank at least 2 admit only finitely many entropy values under some mixing condition on the action. They also show that this fails for lower rank groups, ENTROPY OF INTERSECTIONAL IRSS 7 such as P SL2 (R), by finding infinitely many entropy values. However, no other guarantees are given regarding these values. The breakthrough of the realization results is the mentioned result of Bowen [4], where he makes a use of IRSs for realization purposes. He proves a full realization for simple random walks on free groups Fr where 2 ≤ r < ∞. In [16], the first named author and Tamuz prove a dense realization for lamplighter groups with Liouville base. Furthermore, it is shown that virtually free groups, such as SL2 (Z), admit no-gap. In a recent paper [8], Burton, Lupini and Tamuz prove that the Furstenbergentropy is an invariant of weak equivalence of stationary actions. 2. Preliminaries 2.1. Stationary spaces. Throughout the paper we assume that G is a discrete countable group and that µ is a generating probability measure on G. A measurable action G y (X,Pν) where (X, ν) is a standard probability spaces is called (G, µ)-stationary if g∈G µ(g)gν = ν. The basic example of noninvariant (G, µ)-stationary action is the action on the Furstenberg-Poisson boundary, Π(G, µ) (see e.g. [12–15] and references therein for more on this topic, which has an extreme body of literature associated to it). The Kakutani fixed point theorem implies that whenever G acts continuously on a compact space X, there is always some µ-stationary measure on X. However, there are not many explicit descriptions of stationary measures. One way to construct stationary actions is via the Poisson bundle constructed from an IRS: Denote by SubG the space of all subgroups of G (recall that G is discrete). This space admits a topology, induced by the product topology on subsets of G, known as the Chabauty topology. Under this topology, SubG is a compact space, with a natural right action by conjugation (K g = g −1 Kg where K ∈ SubG ), which is continuous. An Invariant Random Subgroup (IRS) is a Borel probability measure λ on SubG which is invariant under this conjugation action. It is useful to think of an IRS also as a random subgroup with a conjugation invariant law λ. For more background regarding IRSs we refer the interested reader to [2, 3]. Fix a probability measure µ on G. Given an IRS λ of G, one can consider the Poisson bundle over λ, denoted by Bµ (λ). This is a probability space with a (G, µ) stationary action, and when λ is an ergodic IRS, the action on Bµ (λ) is ergodic. Poisson bundles were introduced in a greater generality by Kaimanovich in [19]. In [4] Bowen relates Poisson bundles to IRSs. Although the stationary spaces that we construct in this paper are all Poisson bundles, we do not elaborate regarding this correspondence, as this will not be important for understanding our results. Rather, we refer the interested reader to [4, 16, 17, 19], and mention here the important features of Poisson bundles that are relevant to our context. To describe these features, we now turn to describe Schreier graphs. 8 YAIR HARTMAN AND ARIEL YADIN 2.2. Schreier graphs. Since we will use Schreier graphs only in the context of the free group, we assume in this section that G is a free group. To keep the presentation simple, we consider G = F2 the free group on two generators, generated by a and b. The generalization to higher rank is straightforward. Let K ∈ SubG . The Schreier graph associated with K is a rooted oriented graph, with edges labeled by a and b, which is defined as follows. The set of vertices is the coset space K\G and the set of edges is {(Kg, Kga), (Kg, Kgb) : Kg ∈ K\G}. Edges of the type (Kg, Kga) are labeled by a and of the type (Kg, Kgb) are labeled by b. It may be the case that there are multiple edges between vertices, as well as self loops. The root of the graph is defined to be the trivial coset K. From this point on, it is important that we are working with the free group, and not a general group which is generated by two elements. Consider an abstract (connected) rooted graph with oriented edges. Suppose that every vertex has exactly two incoming edges labeled by a and b, and two outgoing edges labeled by a and b. We may then consider this graph as a Schreier graph of the free group. Indeed, given such a graph Γ one can recover the subgroup K: Given any element g = w1 · · · wn , of the free group (where w1 · · · wn is a reduced word in {a, a−1 , b, b−1 }) and a vertex v in the graph, one can “apply the element g to the vertex v” to get another vertex denoted v.g, as follows: • Given wi ∈ {a, b} move from v to the adjacent vertex u = v.wi such that the oriented edge (v, u) is labeled by wi . • Given wi ∈ {a−1 , b−1 } move from v to the adjacent vertex u = v.wi such that the oriented edge (u, v) is labeled wi−1 (that is, follow the label wi using the reverse orientation). • Given g = w1 · · · wn written as a reduced word in the generators, apply the generators one at a time, to get v.g = (· · · ((v.w1 ).w2 ) . . .).wn . Thus, we arrive at a right action of G on the vertex set. Note that this action is not by graph automorphisms, rather only by permutations of the vertex set. We say that g preserves v if v.g = v. To recover the subgroup K ≤ F2 from a graph Γ as above, let K be the set of all elements of the free group that preserve the root vertex. Moreover, changing the root - that is, recovering the graph which is obtained be taking the same labeled graph but when considering a different vertex as the root - yields a conjugation of K as the corresponding subgroup. Namely, if the original root was v with a corresponding subgroup K, and if the new root is v.g for some g, then one gets the corresponding subgroup K g . Hence when ignoring the root, one can think of the Schreier graph as representing the conjugacy class K G . In particular, if K is the subgroup associated with a vertex v, and g is such that when rooting the Schreier graph in v and in v.g we get two isomorphic labeled graphs, then g belongs to the normalizer NG (K) = {g ∈ G : K g = K}. ENTROPY OF INTERSECTIONAL IRSS 9 The subgroups of the free group that we will construct will be described by their Schreier graph. In the following section we explain the connection between Schreier graphs and Poisson bundles, which is why using Shcreier graphs to construct subgroups is more adapted to our purpose. 2.3. Random walks on Schreier graphs. Fix a generating probability measure µ on a group G. Let (Xt )∞ t=1 be i.i.d. random variables taking values in G with law µ, and let Zt = X1 · · · Xt be the position of the µ-random walk at time t. Let K be a subgroup. Although this discussion holds for any group, since we defined Schreier graphs in the context of the free group, assume that G = F2 . The Markov chain (KZt )t has a natural representation on the Schreier graph associated with K, by just considering the position on the graph at time t to be v.Zt where v is a root associated with K. (This is the importance of considering left-Schreier graphs and right-random walks.) This is a general correspondence, not special to the free group. The boundary of the Markov chain KZt where K is fixed, is the boundary of the random walk on the graph that starts in v, namely, the collection of tail events of this Markov chain. The Poisson bundle is a bundle of such boundaries, or alternatively, it is the boundary of the Markov chain KZt where K is a random subgroup distributed according to λ. This perspective was our intuition behind the construction in Section 4. 2.4. Random walk entropy. Recall that we assume throughout that all random P walk measures µ have finite entropy, that is H(Z1 ) = − g P[Z1 = g] log(P[Z1 = g]) < ∞ where Zt as usual is the position of the µ-random walk at time t. The sequence of numbers H(Zt ) is a sub-additive sequence so the following limit exists and finite. Definition 2.1. The random walk entropy of (G, µ) is given by 1 hRW (G, µ) = lim H(Zt ). t→∞ t The Furstenberg-entropy of a (G, µ)-stationary space, (X, ν) is given by Z X dg −1 ν hµ (X, ν) = − µ(g) log dν(x) dν X g∈G By Jensen’s inequality, hµ (X, ν) ≥ 0 and equality holds if and only if the action is a measure preserving action. Furthermore, Kaimanovich and Vershik proved in [20] that hµ (X, ν) ≤ hRW (G, µ) for any stationary action (X, ν), and equality holds for the Furstenberg-Poisson boundary, namely (2.1) hµ (Π(G, µ)) = hRW (G, µ) , where Π(G, µ) denotes the Furstenberg-Poisson boundary of (G, µ). 10 YAIR HARTMAN AND ARIEL YADIN If hRW (G, µ) = 0 the pair (G, µ) is called Liouville, which is equivalent to triviality of the Furstenberg-Poisson boundary. The Furstenberg-entropy realization problem is to find the exact values in the interval [0, hRW (G, µ)] which are realized as the Furstenberg entropy of ergodic stationary actions. In a similar way to the Kaimanovich-Vershik formula (2.1), Bowen proves the following: Theorem 2.2 (Bowen, [4]). Let λ be an IRS of G. Then Z Z 1 1 hµ (Bµ (λ)) = lim (2.2) H(KZt )dλ(K) = inf H(KZt )dλ(K) t→∞ t Sub t t Sub G G Moreover, the (G, µ)-stationary space is ergodic if (and only if ) the IRS λ is ergodic. This reduces the problem of finding (G, µ)-stationary actions with many Furstenberg entropy values in [0, hRW (G, µ)], to finding IRSs λ with many different random walk entropy values. Regarding continuity, recall that the space SubG is equipped with the Chabauty topology. For finitely generated groups this topology is induced by the natural metric for which two subgroups are close if they share the exact same elements from a large ball in G. One concludes that the Shannon entropy, H, as a function on SubG is a continuous function. The topology on SubG induces a weak* topology on, P rob (SubG ), the space of IRSs of G. By the continuity of H and the second equality in (2.2) we get that the Furstenberg-entropy of Poisson bundles of the form Bµ (λ) is an upper semi-continuous function of the IRS. Since the entropy is non-negative we conclude: Corollary 2.3 (Bowen, [4]). If λn → λ in the weak* topology on P rob (SubG ), such that hµ (Bµ (λ)) = 0 then hµ (Bµ (λn )) → 0. However, it is important to notice that the Furstenberg-entropy is far from being a continuous function of the IRS. Indeed, consider the free group, which is residually finite. There exists a sequence of normal subgroups Nn , such that Nn \F2 is finite for any n, which can be chosen so that, when considered as IRSs λn = δNn , we have λn → δ{e} . In that case hµ (Bµ (λn )) = 0 for all n (because H(Nn Zt ) is bounded in t), but Bµ (δ{e} ) is the Furstenberg-Poisson boundary of the free group, and its Furstenberg entropy is positive for any µ (follows for example from the non-amenability of the free group). We want to point out that this lack of continuity makes it delicate to find conditions on quotients of the free group to have large entropy. In Section 4 we will deal with this problem by introducing a tool to prove that the entropy does convergence along a sequence of subgroups which satisfy some geometric conditions. ENTROPY OF INTERSECTIONAL IRSS 11 The free group is also residually nilpotent, so one can replace the finite quotient from the discussion above by infinite nilpotent quotients. We arrive at a similar discontinuity of the entropy function, due to the following classical result. As we will use it in the sequel, we quote it here for future reference. The original case of Abelian groups is due to Choquet-Deny [9] and the nilpotent case appears in [27]. Theorem 2.4 (Choquet-Deny-Raugi). Let G be a nilpotent group. For any probability measure µ on G with finite entropy, the pair (G, µ) is Liouville (i.e. hRW (G, µ) = 0). We mention that the triviality of the Furstenberg-Poisson boundary holds for general µ without any entropy assumption, although in this paper we consider only µ with finite entropy. The proof of the Choquet-Deny Theorem follows from the fact that the center of the group always acts trivially on the Furstenberg-Poisson boundary and hence Abelian groups are always Liouville. An induction argument extends this to nilpotent groups as well. 3. Intersectional IRSs In this section we show how to construct a family of IRSs, given an infinite conjugacy class. Let G be a countable discrete group, and let K ≤ G be a subgroup with infinitely many different conjugates |K G | = ∞. Equivalently, the normalizer NG (K) := {g ∈ G : K g = K} is of infinite index in G. Recall that the G action on K G is the right action K g = g −1 Kg. Since K ng = −1 −1 g n Kng = g −1 Kg = K g for any n ∈ NG (K), the K-conjugation depends only on the coset NG (K)g. That is, conjugation K θ for a right coset θ ∈ NG (K)\G is well defined. We use 2NG (K)\G to denote the family of all subsets of NG (K)\G. This is identified canonically with {0, 1}NG (K)\G . Note that G acts from the right on subsets in 2NG (K)\G , via Θ.g = {θg : θ ∈ Θ}. Given a non-empty subset Θ ⊂ NG (K)\G we define the subgroup \ CoreΘ (K) = Kθ. θ∈Θ Claim 3.1. The map ϕ : 2NG (K)\G → SubG defined by ϕ(Θ) = CoreΘ (K) is G-equivariant. In particular, if we denote by λp,K the ϕ-push-forward of the Bernoulli-p product measure on 2NG (K)\G , then λp,K is an ergodic IRS for any p ∈ (0, 1). Proof. Note that g (CoreΘ (K)) = \ θ∈Θ K θ g = \ θ∈Θ (K θ )g = \ θ0 ∈Θ.g 0 K θ = CoreΘ.g (K) 12 YAIR HARTMAN AND ARIEL YADIN It follows that we can push forward any G-invariant measure on 2NG (K)\G to get IRSs. For any p ∈ (0, 1) consider the Bernoulli-p product measure on 2NG (K)\G ∼ = {0, 1}NG (K)\G , namely, each element in NG (K)\G is chosen to be in Θ independently with probability p. These measures are clearly ergodic invariant measures. It follows that the push-forward measures λp,K are ergodic invariant measures on SubG .  We continue to determine the limits of λp,K as p → 0 and p → 1. When the subgroup K is clear from the context, we write λp = λp,K . Lemma 3.2. Given K ≤ G with |K G | = ∞, there exist two normal subgroups, p→0 p→1 Core∅ (K), CoreG (K) / G such that λp,K −−→ δCore∅ (K) and λp,K −−→ δCoreG (K) , where the convergence is in the weak* topology on P rob (SubG ). While the definition of CoreG (K) is apparent, it is less obvious how to define Core∅ (K). We now give an intrinsic description of the normal subgroup Core∅ (K). 3.1. The subgroup Core∅ (K). For any element g ∈ G, let Ωg ⊂ NG (K)\G be the set of all cosets, such that g belongs to the corresponding conjugation: Ωg = {θ ∈ NG (K)\G | g ∈ K θ }. For example, for g ∈ K we have that NG (K) ∈ Ωg . We observe that: (1) Ωg ∩ Ωh ⊂ Ωgh (2) Ωg−1 = Ωg (3) Ωgγ = Ωg γ −1 The first two follow from the fact that K θ is a group and the third since γK θ γ −1 = −1 K θγ . Let fg be the complement of Ωg in NG (K)\G. That is, fg = {θ ∈ NG (K)\G : θ 6∈ Ωg }. Define kgkK = |fg |. The properties above show that (1) kghkK ≤ kgkK + khkK (2) kg −1 kK = kgkK (3) kg γ kK = kgkK Two normal subgroups of G naturally arise: the subgroup of all elements with zero norm and the subgroup of all elements with finite norm. By (1) and (2) above, these are indeed subgroups and normality follows from (3). The first subgroup is, by definition, the normal core CoreG (K) = {g | kgkK = 0}. We claim that the second subgroup is the appropriate definition for Core∅ (K). That is, we define Core∅ (K) = {g | kgkK < ∞} and prove that λp,K → δCore∅ (K) as p → 0. p→0 Proof of Lemma 3.2. By definition, to show that λp −−→ δCore∅ (K) we need to show p→0 that for any g ∈ Core∅ (K), we have λp ({F ∈ SubG | g ∈ F }) −−→ 1 and for any p→0 g∈ / Core∅ (K), we have λp ({F ∈ SubG | g ∈ F }) −−→ 0. ENTROPY OF INTERSECTIONAL IRSS 13 Note that for any Θ 6= ∅, by the definition of CoreΘ (K), we have that g ∈ CoreΘ (K) if and only if Θ ∩ fg = ∅. Now consider Θ to be a random subset according to the Bernoulli-p product measure on 2NG (K)\G . By the above, we have equality of the events {g ∈ CoreΘ (K)} = {fg ∩ Θ = ∅}. The latter (and hence also the former) has probability (1 − p)|fg | = (1 − p)kgkK . This includes the case where |fg | = kgkK = ∞ (whence we have 0 probability for {fg ∩Θ = ∅}). We conclude that for any g ∈ G, ( 0 if kgkK = ∞, kgkK λp ({F ∈ SubG | g ∈ F }) = (1 − p) = → 1 as p → 0 if kgkK < ∞. It follows that λp → δCore∅ (K) as p → 0. we show that λp → δCoreG (K) as p → 1, where we define CoreG (K) = T Finally, g g K = CoreNG (K)\G (K). Clearly, for any p ∈ (0, 1), we have that CoreG (K) ⊂ F for λp -almost every F , since CoreG (K) ≤ CoreΘ (K) for any non-empty subset Θ. On the other hand, fix some g 6∈ CoreG (K). By definition, there exists some θ ∈ NG (K)\G such that g 6∈ K θ . Whenever Θ is such that θ ∈ Θ, we have that g 6∈ CoreΘ (K). The probability that θ 6∈ Θ is (1 − p). Hence, for any g with kgkK > 0, p→1 λp ({F ∈ SubG | g ∈ F }) ≤ (1 − p) −−→ 0. We conclude that λp → δCoreG (K) as p → 1.  3.2. Continuity of the entropy along intersectional IRSs. Lemma 3.2 above shows that the IRSs λp,K interpolate between the two Dirac measures concentrated on the normal subgroups Core∅ (K) and CoreG (K). In this section we provide a condition under which this interpolation holds for the random walk entropy as well. Fix a random walk µ on G with finite entropy. Let h : [0, 1] → R+ be the entropy map defined by h(p) = hµ (Bµ (λp )) when p ∈ (0, 1) and h(0), h(1) defined as the µ-random walk entropies on the quotient groups G/Core∅ (K) and G/CoreG (K) respectively. In particular, the condition that h(0) = 0 is equivalent to the Liouville property holding for the projected µ-random walk on G/Core∅ (K). Proposition 3.3. If h(0) = 0 then h is continuous. Proof. Let Z Hn (p) = H(F Zn )dλp (F ). SubG So h(p) = limn→∞ n1 Hn (p). First, we use a standard coupling argument to prove the for q = p + ε, (3.1) 0 ≤ Hn (q) − Hn (p) ≤ Hn (ε) 14 YAIR HARTMAN AND ARIEL YADIN Indeed, let (Uθ )θ∈NG (K)\G be i.i.d. uniform-[0, 1] random variables, one for each coset of NG (K). We use P, E to denote the probability measure and expectation with respect to these random variables. Define three subsets Θp := {θ : Uθ ≤ p} Θε := {θ : p < Uθ ≤ q} and Θq := Θp ∪ Θε . We shorthand Cx := CoreΘx (K) for x ∈ {p, ε, q}. Note that for x ∈ {p, ε, q} the law of Cx is λx . Thus, Hn (x) = E[H(Cx Zn )] (to be clear, the entropy is with respect to the random walk Zn , and expectation is with respect to the random subgroup Cx ). Now, by definition \ \ \ Cq = Kθ = Kθ ∩ K θ = Cp ∩ Cε . θ∈Θq θ∈Θp θ∈Θε Since the map (F1 g, F2 g) 7→ (F1 ∩ F2 )g is well defined, we have that Cq Zn is determined by the pair (Cp Zn , Cε Zn ). Also, since Cq ≤ Cp , we have that Cp Zn is determined by Cq Zn . Thus, P-a.s., H(Cp Zn ) ≤ H(Cq Zn ) ≤ H(Cp Zn ) + H(Cε Zn ). Taking expectation (under E) we obtain (3.1), which then immediately leads to 0 ≤ h(q) − h(p) ≤ h(ε). Corollary 2.3 asserts that the entropy function is upper-semi continuous. Thus, lim supε→0 h(ε) ≤ h(0). Thus, if h(0) = 0 we have that limε→0 h(ε) = 0, and that the entropy function is continuous.  3.3. Applications to entropy realizations. Let µ be a probability measure on a group G and N / G a normal subgroup. We use µ̄ to denote the projected measure on the quotient group G/N . Corollary 3.4. Let µ be a generating finite entropy probability measure on a discrete group G. Assume that there exists some K ≤ G such that • hRW (G/Core∅ (K), µ̄) = 0 • hRW (G/CoreG (K), µ̄) = hRW (G, µ) Then (G, µ) has a full realization. More generally, if only the first condition is satisfied, we get a realization of the interval [0, hRW (G/CoreG (K), µ̄)]. Proof. Consider the path of IRSs λp,K defined in Claim 3.1. Let h(p) be defined as above, before Proposition 3.3. Since h(0) = hRW (G/Core∅ (K), µ̄) = 0, by Proposition 3.3 we have that h is continuous, and thus we have a realization of the interval [h(0), h(1)] = [0, hRW (G/CoreG (K), µ̄)].  In the above corollary, the subgroup K may depend on the measure µ. However, it is possible in some cases to find a subgroup K that provides realization for any measure µ, and we now discuss alternative conditions for the corollary. ENTROPY OF INTERSECTIONAL IRSS 15 The conditions in Corollary 3.4 implies that Core∅ (K) is a “large” subgroup and CoreG (K) is “small” - at least in the sense of the random walk entropy. The best scenario hence is when Core∅ (K) = G and CoreG (K) = {1}. The prototypical example is the following: Example 3.5. Let Sym∗ (X) denote the group of all finitely supported permutations of some infinite countable set X. Fix some x0 ∈ X and define K to be the subgroup of all the finitely supported permutations of X that stabilize x0 ; i.e. K = stab(x0 ) = {π ∈ Sym∗ (X) : π(x0 ) = x0 }. Conjugations of K are of the form stab(x) for x ∈ X. It follows that CoreG (K) = {e}, because Sym∗ (X) acts transitively on X and only the trivial permutation stabilizes all points x ∈ X. Since each element of Sym∗ (X) is a finitely supported permutation, it stabilizes all but finitely many points in X. Thus, Core∅ (K) = Sym∗ (X). This is actually a proof of Theorem 1.4: (Sym∗ (X), µ) admits full realization for any generating, finite entropy, probability measure µ. Note that Sym∗ (X) is a countable group which is not finitely generated. However, by adding some elements to it, we can get a finitely generated group with a similar result, as we explain below in Section 3.4. To continue our discussion, we want to weaken the condition Core∅ (K) = G to some algebraic condition that will still guarantee that hRW (G/Core∅ (K), µ̄) = 0 for any µ. Given a subgroup K (or a conjugacy class K G ) we say that K is locally conilpotent in G if G/Core∅ (K) is nilpotent. (The reason for this name will become more apparent in Section 4.5.) With this definition, Proposition 1.5 follows immediately, as may be seen by the following. Corollary 3.6. Assume that G admits a subgroup K ≤ G such that G/Core∅ (K) is a nilpotent group. Then, for any generating finite entropy probability measure µ, the pair (G, µ) admits a realization of the interval [0, hRW (G/CoreG (K), µ̄)]. If, in addition hRW (G/CoreG (K), µ̄) = hRW (G, µ) (e.g. if CoreG (K) = {e}) then (G, µ) admits full realization. Proof. When G/Core∅ (K) is nilpotent, the Choquet-Deny Theorem (Theorem 2.4) tells us that the first condition of Corollary 3.4 is satisfied.  In Section 3.4 we apply this to obtain full realizations for a class of lamplighter groups as well as to some extensions of the group of finitely supported permutations. However, one should not expect to find a subgroup satisfying the conditions of Corollary 3.6 in every group. These conditions are quite restrictive, for example we the following: Lemma 3.7. If G is a group with a self-normalizing subgroup K that satisfies the two conditions of Corollaries 3.4 (or 3.6) then G is amenable. 16 YAIR HARTMAN AND ARIEL YADIN Proof. First, observe that hRW (G/Core∅ (K), µ̄) = 0 implies that Core∅ (K) is a co-amenable (normal) subgroup in G. Indeed, it is well know that a group, G/Core∅ (K) in this case, admits a random walk which is Liouville is amenable. Next, the condition hRW (G/CoreG (K), µ̄) = hRW (G, µ) implies that CoreG (K) is an amenable group. This follows from Kaimanovich’s amenable extension theorem [18]: Let µ be a random walk on G. The Furstenberg-Poisson boundary of G/CoreG (K) with the µ-projected random walk is a (G, µ)-boundary, or, in other words a G-factor of the Furstenberg-Poisson boundary Π(G, µ). Since it has the same entropy as the random walk entropy, this factor is actually isomorphic to Π(G, µ). Now Kaimanovich’s theorem asserts that CoreG (K) is an amenable group. To conclude that G is amenable we show that Core∅ (K)/CoreG (K) is amenable, showing that the normal subgroup CoreG (K) is both amenable and co-amenable in G. In general, we claim that Core∅ (K)/CoreG (NG (K)) is always an amenable group. This will complete the proof, because we assumed that NG (K) = K. Indeed, G acts by permutations on the conjugacy class K G . Note that any element in Core∅ (K) has finite support as a permutation on K G . Also, it may be checked that the elements of Core∅ (K) that stabilize every K γ are precisely the elements of CoreG (NG (K)). Thus, Core∅ (K)/CoreG (NG (K)) is isomorphic to a subgroup of the amenable group Sym∗ (X).  The subgroups of the free group that we will consider in Section 4 (to prove Theorem 1.2) are all self-normalizing. Since the free group is non-amenable, we cannot obtain the conditions of Corollary 3.4 simultaneously in this fashion. For this reason, we approximate the second condition using a sequence of subgroups. Corollary 3.8. Let µ be a generating finite entropy probability measure on a discrete group G. Assume that there exists a sequence of subgroups Kn ≤ G such that: (1) hRW (G/Core∅ (Kn ), µ̄) = 0 (e.g. whenever G/Core∅ (Kn ) are nilpotent), (2) hRW (G/CoreG (Kn ), µ̄) → hRW (G, µ) Then (G, µ) admits a full realization. Proof. By the first condition, for any fixed n, the entropy along the path λp,Kn gives a realization of the interval [0, hRW (G/CoreG (Kn ), µ̄)]. By the second condition, we conclude that any number in [0, hRW (G, µ)] is realized as the entropy some IRS of the form λp,Kn .  3.4. Examples: lamplighter groups and permutation groups. We are now ready to apply our tools to get Theorem 1.3, that is, full realization for lamplighter groups with Liouville base. ENTROPY OF INTERSECTIONAL IRSS 17 Proof of Theorem 1.3. Choose the subgroup K = ⊕B\{e} L o {e} where e is the trivial element in the base group B. It may be simply verified that CoreG (K) = {e} and ⊕B L o {e} C Core∅ (K). Whenever (B, µ̄) is Liouville, also (G/Core∅ (K), µ̄) is. This is because B ∼ = G/(⊕B L o {e}), so G/Core∅ (K) is a quotient group of B. Thus, we have that hRW (G/Core∅ (K), µ̄) = 0, and we obtain a realization of the full interval [0, hRW (G/CoreG (K), µ̄)] = [0, hRW (G, µ)].  We now turn to discuss extensions of the group of finitely supported permutations. Let X be a countable set, and denote by Sym(X) the group of all permutations of X. Recall that Sym∗ (X) is its subgroup of all finitely supported permutations. While Sym∗ (X) is not finitely generated, one can add elements from Sym(X) to get a finitely generated group. A standard example is when adding a “shift” element σ ∈ Sym(X), that is, σ acts as a free transitive permutation of X. Let Σ = hσi be the subgroup generated by σ. Formally the element σ acts on Sym∗ (X) by conjugation (recall that both groups are subgroups of Sym(X)) and we get a finitely generated group Sym∗ (X) o Σ. One can replace Σ by any other subgroup of Sym(X). The reason that we want to change Σ by a “larger” group is to have a non-Liouville group Sym∗ (X) o Σ. Theorem 3.9. Let Σ ≤ Sym(X) and consider G = Sym∗ (X) o Σ. Let µ be a generating finite entropy probability measure on G, such that the the projected measure µ̄ on Σ ∼ = G/Sym∗ (X) o {e} is Liouville. Then (G, µ) has full realization. In particular, if Σ is a nilpotent group, (G, µ) admits full realization for any µ. Proof. Fix some point x0 ∈ X and let K = stab(x0 ) o {e} where stab(x0 ) ≤ Sym∗ (X) is the stabilizer of x0 . It is easy to verify that CoreG (K) = {e} and that Core∅ (K) = Sym∗ (X) o {e}, hence by the assumption hRW (G/Core∅ (K), µ̄) = 0 and by Corollary 3.4 we get a full realization.  Remark 3.10. Depending of Σ and µ, it might be that (G, µ) is Liouville where G = Sym∗ (X) o Σ. In that case, this result of full realization is trivial as the only realizable value is 0. However, it is easy to find nilpotent Σ such that G is finitely generated and that (G, µ) is not Liouville (say, for any generating, symmetric, finitely supported µ). 4. Full realization for the free group We now turn to discuss our realization results for G = Fr the free group of rank r for any r ≥ 2. It suffices to prove that the free group satisfies the conditions of Corollary 3.8. We construct the subgroups Kn by describing their Schreier graphs. For simplicity of the presentation we describe the result only for the free group on two generators, F2 = ha, bi. The generalization to higher rank is straightforward. 18 YAIR HARTMAN AND ARIEL YADIN 4.1. Schreier graphs. Recall our notations for Schreier graphs from Section 2.2. It will be convenient to use |v| to denote the graph distance of a vertex v to the root vertex in a fixed Schreier graph. 4.2. Fixing. In this section we describe a condition on Schreier graphs that we call fixing. For the normal core of the associated subgroup, this condition will ensure that the random walk entropy of the quotient approximates the full random walk entropy as required by Condition 2 in Corollary 3.8 (see Proposition 4.7 below). Let Λ be a Schreier graph with root o. For a vertex v in Λ, the shadow of v, denoted shd(v) is the set of vertices u in Λ such that any path from u to the root o must pass through v. For an integer n define the finite subtree (F2 )≤n to be the induced (labeled) subgraph on {g ∈ F2 : |g| ≤ n}. We say that Λ is n-tree-like if the ball of radius n about o in Λ is isomorphic to (F2 )≤n , and if every vertex at distance n from o has a non-empty shadow. Informally, an n-tree-like graph is one that is made up by gluing disjoint graphs to the leaves of a depth-n regular tree. Lemma 4.1. Let C ≤ K ≤ F2 be subgroups. Let ΛC , ΛK be the Schreier graphs of C, K respectively. If ΛK is n-tree-like, then ΛC is also n-tree-like. Proof. This follows from the fact that C ≤ K implies that ΛC is a cover of ΛK (see e.g. [21, Lemma 20]).  For an n-tree-like Λ, since any vertex is connected to the root, every vertex at distance greater than n from the root o is in the shadow of some vertex at distance precisely n. For a vertex v in Λ with |v| > n, and k ≤ n we define the k-prefix of v in Λ to be pref k (v) = pref k,Λ (v) = u for the unique u such that both |u| = k and v ∈ shd(u). If |v| ≤ k then for concreteness we define pref k (v) = v. Since n-tree-like graphs look like F2 up to distance n, the behavior of pref k on n-tree-like graphs where n ≥ k is the same as on F2 . This is the content of the next elementary lemma, whose proof is left as an exercise. Lemma 4.2. Let Λ be a n-tree-like Schreier graph. Let ϕ : Λ → F2 be a function mapping the ball of radius n in Λ isomorphically to (F2 )≤n . Then, for any vertex |v| ≤ n in Λ we have that pref k,Λ (v) = ϕ−1 pref k,F2 (ϕ(v)). We use (Zt )t to denote the µ-random walk on F2 and (Z̃t )t the projected walk on a Schreier graph Λ with root o. (So Z̃t = KZt where K is the associated subgroup to the root o in the Schreier graph Λ.) Another notion we require is the k-prefix at infinity. Define the random variable pref k (Z̃∞ ) = pref k,Λ (Z̃∞ ), taking values in the set of vertices of distance k from o in Λ, as follows: If the sequence pref k (Z̃t )t stabilizes at u, that is, if there ENTROPY OF INTERSECTIONAL IRSS 19 exists t0 such that for all t > t0 we have pref k (Z̃t ) = pref k (Z̃t−1 ) = u, then define pref k (Z̃∞ ) := u. Otherwise, define pref k (Z̃∞ ) = o. Note that for an n-tree-like graph with n > 0 we have that pref k (Z̃∞ ) = o (almost surely) if and only if the walk (Z̃t )t returns to the ball of radius k infinitely many times. Definition 4.3. Let 0 < k < n be natural numbers and α ∈ (0, 1). We say that Λ is (k, n, α)-fixing if Λ is n-tree-like and for any |v| ≥ n, P[∀ t , pref k (Z̃t ) = pref k (Z̃0 ) | Z̃0 = v] ≥ α. That is, with probability at least α, for any |v| ≥ n, the projected random walk started at v never leaves shd(pref k (v)). Hence, the random walk started at depth n in the graph fixes the k-prefix with probability at least α. Note that this definition depends on the random walk µ. A good example of a fixing graph is the Cayley graph of the free group itself. Lemma 4.4. Let µ be a finitely supported generating probability measure on F2 . Then, there exists α = α(µ) > 0 such that the Cayley graph of F2 is (k, k + 1, α)fixing for any k > 0. Proof. It is well known that a µ-random walk (Zt )t on F2 is transient (for example, this follows from non-amenability of F2 ). Set r = max{|g| : µ(g) > 0} be the maximal jump possible by the µ-random walk. In order to change the k-prefix, the walk must return to distance at most k + r from the origin. That is, if |Zt | > k + r for all t > t0 , we have that pref k (Zt ) = pref k (Zt0 ) for all t > t0 . By forcing finitely many initial steps (depending on r, µ), there exists t0 and α > 0 such that P[A | |Z0 | = k + 1] ≥ α where A = {∀0 < t ≤ t0 , pref k (Zt ) = pref k (Z0 ) and |Zt0 | > k + r}. By perhaps making α smaller, using transience, we also have that P[∀ t > 0 , |Zt | ≥ |Z0 |] ≥ α. Combining these two estimates, with the Markov property at time t0 , P[∀t, pref k (Zt ) = pref k (Z0 ) | |Z0 | = k + 1] ≥ P[A and {∀ t > t0 , |Zt | ≥ |Zt0 |}] ≥ P[A] · P[∀ t > 0 , |Zt | ≥ |Z0 |] ≥ α2 . This is the definition of F2 being (k, k + 1, α)-fixing.  A very useful property of fixing graphs is that when α is close enough to 1, there exists a finite random time - the first time the random walk leaves the tree area on which we can already guess with a high accuracy the k-prefix at infinity of the random walk. A precise formulation is the following. 20 YAIR HARTMAN AND ARIEL YADIN Lemma 4.5. Let Λ be a (k, n, α)-fixing Schreier graph. Let (Zt )t be a µ-random walk on F2 and (Z̃t )t the projected walk on Λ. Define the stopping time T = inf{t : |Z̃t | ≥ n}. Then, H(Z1 | pref k (Z̃T )) − H(Z1 | pref k (Z̃∞ )) ≤ ε(α) + 2(log 4)(1 − α)k, where 0 < ε(α) → 0 as α → 1. Proof. First note that a general entropy inequality is H(X | A) − H(X | B) ≤ H(A | B) + H(B | A), which for us provides the inequality H(Z1 | pref k (Z̃T )) − H(Z1 | pref k (Z̃∞ )) ≤ H(pref k (Z̃T ) | pref k (Z̃∞ )) + H(pref k (Z̃∞ ) | pref k (Z̃T )). We now bound this last quantity using Fano’s inequality (see e.g. [11, Section 2.10]). Taking α̃ = P[pref k (Z̃T ) = pref k (Z̃∞ )], since the support of both pref k (Z̃∞ ), pref k (Z̃T ) is of size 4 · 3k−1 < 4k , H(pref k (Z̃∞ ) | pref k (Z̃T )) ≤ H(α̃, 1 − α̃) + (1 − α̃) log 4k , H(pref k (Z̃T ) | pref k (Z̃∞ )) ≤ H(α̃, 1 − α̃) + (1 − α̃) log 4k . where here we use the usual notation H(α̃, 1 − α̃) to denote the Shannon entropy of the probability vector (α̃, 1 − α̃). Since p 7→ H(p, 1 − p) decreases for p ≥ 12 , it suffices to prove that α̃ = P[pref k (Z̃T ) = pref k (Z̃∞ )] ≥ α. But now, the very definition of (k, n, α)-fixing implies that for any relevant u, P[pref k (Z̃∞ ) = u | pref k (ZT ) = u] ≥ P[∀ t > 0 , pref k (Z̃T +t ) ∈ shd(pref k (u)) | pref k (ZT ) = u] ≥ α, where we have used the strong Markov property at the stopping time T . Averaging over the relevant u implies that α̃ ≥ α.  The following is the main technical estimate of this subsection. Lemma 4.6. Fix a generating probability measure µ on F2 with finite support. Let (Γj )j be a sequence of Schreier graphs such that Γj is (kj , nj , αj )-fixing. Let Kj be the subgroup corresponding to Γj . Suppose that kj → ∞, nj − kj → ∞ and (1 − αj )kj → 0 as j → ∞. Then, lim sup hRW (F2 /CoreF2 (Kj ), µ̄) = hRW (F2 , µ). j→∞ ENTROPY OF INTERSECTIONAL IRSS 21 Proof. Let (Zt )t be a µ-random walk on F2 . Take j large enough so that nj −kj is much larger that r = max{|g| : µ(g) > 0}. To simplify the presentation we use Γj = Γ, K = Kj , C = Cj = CoreF2 (Kj ) and k = kj , n = nj , α = αj , omitting the subscript j when it is clear from the context. Let Λ = Λj beTthe Schreier graph corresponding T to C = Cj . Let TC = t σ(CZt , CZt+1 , . . .) and T = t σ(Zt , Zt+1 , . . .) denote that tail σ-algebras of the random walk on Λ and on F2 respectively. Kaimanovich and Vershik (eq. 13 on p. 465 in [20]) show that hRW (F2 /C, µ̄) = H(CZ1 ) − H(CZ1 | TC ) and hRW (G, µ) = H(Z1 ) − H(Z1 | T ). Now, since C ≤ K, and since Γ is n-tree-like, also Λ is (Lemma 4.1). Since Λ is n-tree-like, CZ1 and Z1 determine one another (Lemma 4.2), implying H(CZ1 ) = H(Z1 ) and H(CZ1 | TC ) = H(Z1 | TC ). Since TC ⊂ T , the inequality H(Z1 | TC ) ≥ H(Z1 | T ) is immediate. Hence, we only need to show that lim inf j H(Z1 | TCj ) ≤ H(Z1 | T ). Set T = inf{t : |CZt | ≥ n} as in Lemma 4.5. Since Λ is n-tree-like, pref k (CZT −1 ) and pref k (ZT −1 ) determine one another (Lemma 4.2). Also, since n − k is much larger than r, and specifically much larger than any jump the walk can make in one step, we know that pref k (CZT ) = pref k (CZT −1 ) and pref k (ZT ) = pref k (ZT −1 ). All in all, H(Z1 | pref k (CZT )) = H(Z1 | pref k (ZT )). Now, set ε = ε(α, k) = 2H(α, 1 − α) + 2(log 4)(1 − α)k. Since pref k (CZ∞ ) is measurable with respect to TC , by using Lemma 4.5 twice, once for Λ and once for the tree, we get the bound H(Z1 | TC ) ≤ H(Z1 | pref k (CZ∞ )) ≤ H(Z1 | pref k (CZT )) + ε = H(Z1 | pref k (ZT )) + ε ≤ H(Z1 | pref k (Z∞ )) + 2ε. Now, under the assumptions of the lemma, ε → 0 as j → ∞. Also, since kj → ∞ we have that H(Z1 | pref kj (Z∞ )) → H(Z1 | T ). Thus, taking a limit on the above provides us with lim sup H(Z1 | TCj ) ≤ lim sup H(Z1 | pref kj (Z∞ )) = H(Z1 | T ). j→∞ j→∞ Hence, as mentioned, we conclude that lim supj H(Z1 | TCj ) = H(Z1 | T ), and since H(Z1 ) = H(CZ1 ) we get that lim sup hRW (F2 /CoreF2 (Kj ), µ̄) = hRW (F2 , µ). j→∞  22 YAIR HARTMAN AND ARIEL YADIN To complete the relevance of fixing to convergence of the random walk entropies, we conclude with the following. Proposition 4.7. Fix a generating probability measure µ on F2 with finite support. Let (Γj )j be a sequence of Schreier graphs such that Γj is (kj , nj , αj )-fixing. Let Kj be the subgroup corresponding to Γj . Suppose that kj → ∞ and αj → 1 as j → ∞. Then, lim sup hRW (F2 /CoreF2 (Kj ), µ̄) = hRW (F2 , µ). j→∞ Proof. Since we are only interested in lim sup we may pass to a subsequence and show that the parameters along this subsequence satisfy the assumptions of Lemma 4.6. Notice that the assumption kj → ∞ implies in particular that nj → ∞. Note that by definition, if Λ is (k, n, α)-fixing, then it is also (k 0 , n0 , α0 )-fixing for any k 0 ≤ k, n0 ≥ n, α0 ≤ α. For any m choose jm large enough so that for all i ≥ jm we have both αi > 1 − m−2 and ki > 2m. The subsequence of graphs (Γjm )m satisfies that Γjm is (m, njm , 1− m12 )-fixing. Since njm −m ≥ kjm −m > m, Lemma 4.6 is applicable.  4.3. Gluing graphs. Let Λ be a Schreier graph of the free group F2 = ha, bi and let S = {a, a−1 , b, b−1 }. We say that the pair (Λ, ) is s-marked if  is a (oriented) edge in Λ labeled by s ∈ S. For s ∈ S we define Ns to be the following graph: the vertices are non-negative the integers N. The edges are given by (x + 1, x), each labeled by s, and self-loops labeled by ξ ∈ {a, b} \ {s, s−1 } at each vertex. In order to be a Schreier graph, this graph is missing one outgoing edge from 0 labeled by s. b b a 0 b a 1 b a 2 b a 3 4 Figure 1. Part of the labeled graph Na . Given a s-marked pair (Λ, ) and an integer n > 0, we construct a Schreier graph Γn (Λ, ): The Cayley graph of F2 is the 4-regular tree. For an integer n and a label (generator) s recall the finite subtree (F2 )≤n which is the induced subgraph on {g ∈ F2 : |g| ≤ n}, and let (F2 )n be the set of vertices {g : |g| = n}. For g ∈ (F2 )n there is exactly one outgoing edge incident to g in (F2 )≤n . If this edge is labeled by ξ ∈ S we say that g is a ξ-leaf. ENTROPY OF INTERSECTIONAL IRSS 23 w x y z Figure 2. The subgraph (F2 )≤3 . Edges labeled a are dotted and labeled b are solid. The vertices x, y, z, w are a, a−1 , b, b−1 -leaves respectively. For a ξ-leaf g, in order to complete (F2 )≤n into a Schreier graph, we need to specify 3 more outgoing edges, with the labels ξ −1 and the two labels from S \ {ξ, ξ −1 }. Now, recall our s-marked pair (Λ, ). Let g be a ξ-leaf for ξ 6∈ {s, s−1 }. Let (Λg , g ) be a copy of (Λ, ), and suppose that g = (xg , yg ). Connect Λg to g by deleting the edge g from Λg and adding the directed edges (xg , g), (g, yg ) labeling them both s. Also, let Ng be a copy of Nξ above, and connect this copy to g by a directed edge (0g , g) labeled by ξ (here 0g is the copy of 0 in Ng ). This takes care of ξ-leaves for ξ 6∈ {s, s−1 }. If ξ ∈ {s, s−1 }, the construction is simpler: For any ξ-leaf γ (where ξ ∈ {s, s−1 }), let Nγ be a copy of Nξ (with 0γ the copy of 0 as before), and connect Nγ by an edge (0γ , γ) labeled by ξ. Finally add an additional self-loop with the missing labels at γ (i.e. the labels in S \ {s, s−1 } each in one direction along the loop). By adding all the above copies to all the leaves in (F2 )≤n , we obtain a Schreier graph, which we denote Γn (Λ, ). See Figure 3 for a visualization (which in this case is probably more revealing than the written description). It is immediate from the construction that Γn (Λ, ) is n-tree-like. 4.4. Marked pairs and transience. Recall the definition of a transient random walk (see e.g. [22, 26]): We say that a graph Λ is µ-transient if for any vertex v in Λ there is some positive probability that the µ-random walk started at v will never return to v. 24 YAIR HARTMAN AND ARIEL YADIN Ng 0g g γ yg xg 0γ  Nγ Λg Figure 3. A visiulization of gluing (Λ, ) to (F2 )≤3 . The dotted edges correspond to the label a, and the full edges to b. The vertex g is a a-leaf. Thus, a copy of Λ, denoted Λg is connected by removing the edge  (dashed) and adding to edges (xg , g), (g, yg ) labeled b (solid). A copy of Na , denoted Ng , is connected via an edge (0g , g) labeled a (dotted). Also, to the b-leaf γ, a copy of Nb , denoted Nγ is added via an edge (0γ , γ) labeled b (full), and an additional self-loop labeled a (dotted) is added at γ. We now connect the transience of Λ above to that of fixing from the previous subsection. Proposition 4.8. Let µ be a finitely supported generating probability measure on F2 . Let (Λ, ) be a µ-transient s-marked pair. Then, for any ε > 0 and k, there exist n > k such that the graph Γn (Λ, ) is (k, n, 1 − ε)-fixing. The proof of this proposition is quite technical. For the benefit of the reader, before proving the proposition we first provide a rough sketch, outlining the main idea of the proof. ENTROPY OF INTERSECTIONAL IRSS 25 Proof Sketch. Consider the graph Γn (Λ, ). This is essentially a finite tree with copies of Λ and copies of N glued to the (appropriate) leaves. At any vertex v with |v| > k, there is a fixed positive probability α of escaping to the leaves without changing the k-prefix (because F2 is (k, k + 1, α)-fixing). Once near the leaves, with some fixed probability δ the walk reaches a copy of Λ without going back and changing the k-prefix. Note that although there are copies of the recurrent Nγ (e.g. for symmetric random walks) glued to some leaves, nonetheless, since k is much smaller than n, there is at least one copy of the transient Λ in the shadow of v. Finally, once in the copy of Λ, because of transience, the walk has some positive probability β to escape to infinity without ever leaving Λ, and thus without ever changing the k-prefix. All together, with probability at least αδβ the walk will never change the kprefix. If this event fails, the walk may jump back some distance, but not too much since we assume that µ has finite support. So there is some r for which the walk (deterministically) cannot retreat more than distance r, even conditioned on the above event failing. Thus, starting at |v| > k + `r for large enough `, there are at least ` attempts to escape to infinity without changing the k-prefix, each with a conditional probability of success at least αδβ. By taking ` large enough, we can make the probability of changing the k-prefix as small as desired. We now proceed with the actual proof. Proof of Proposition 4.8. Step I. Let (Z̃t )t denote the projected µ-random walk on the Schreier graph Λ. Assume that  = (x, y), and note that since Λ is µtransient, then P[∀ t , Z̃t 6= x | Z̃0 = y] + P[∀ t , Z̃t 6= y | Z̃0 = x] > 0. By possibly changing  to (y, x), without loss of generality we may assume that β := P[∀ t , Z̃t 6= x | Z̃0 = y] > 0. Let ` > 0 be large enough, to be chosen below. Set n = k + (` + 2)r + 1. We now change notation and use (Z̃t )t to denote the projected walk on the Schreier graph Γn (Λ, ). Denote r = max{|g| : µ(g) > 0}, the maximal possible jump of the µ-random walk. A key fact we will use throughout is that: in order to change the k-prefix, the walk must at some point reach a vertex u with |u| ≤ k + r. Let τ = inf{t : n − r ≤ |Z̃t | ≤ n}. If we start from |Z̃0 | ≤ n this is a.s. finite, since the jumps cannot be larger than r. Now, by Lemma 4.4, F2 is (k, k + 1, η)fixing for all k and some η = η(µ) > 0. Since Γn (Λ, ) is n-tree-like, if v is a vertex in Γn (Λ, ) with k < |v| < n, then (4.1) P[pref k (Z̃τ ) = pref k (v) | Z̃0 = v] ≥ η 26 YAIR HARTMAN AND ARIEL YADIN For s ∈ S let ts be the smallest number such that µts (s) > 0. Let tS = max{ts : s ∈ S}. Let δ = min{µts (s) : s ∈ S}. Let v, u be two adjacent vertices in Γn (Λ, ), and assume that the label of (v, u) is s ∈ S. Note that the definitions above ensure that P[Z̃ts = u | Z̃0 = v] ≥ δ. Thus, when |v| > k + tS r, with probability at least δ we can move from v to u in at most tS steps without changing the k-prefix. This holds specifically for |v| ≥ n − r > k + tS r by our choice of n (as long as ` ≥ tS ). Consider the graph Γn (Λ, ). Recall that it contains many copies of Λ (glued to the appropriate leaves). Let Λ1 , . . . , Λm be the list of these copies, and denote by j = (xj , yj ) the corresponding copies of  in each. Define Y = {y1 , . . . , ym }. Now, define stopping times Um = inf{t : |Z̃t | < m} T = inf{t : Z̃t ∈ Y } and (where inf ∅ = ∞). Any vertex v in Γn (Λ, ) of depth |v| < n must have some copy of (Λ, ) in its shadow shd(v). So there exists some path of length at most n−|v|+1 from v into some copy of (Λ, ), ending in some vertex in Y . If |v| ≥ n−r then we can use the strong Markov property at the first time the walk gets to some vertex u with |u| < n. Since this u must have |u| ≥ n − r, we obtain that for any |v| ≥ n − r, P[T < Un−r | Z̃0 = v] ≥ δ r+1 . By µ-transience of Λ, we have that starting from any yj ∈ Y , with probability at least β the walk never crosses (yj , xj ), and so never leaves Λj (and thus always stays at distance at least n from the root). We conclude that for any |v| ≥ n − r, P[pref k (Z̃∞ ) = pref k (Z̃0 ) | Z̃0 = v] ≥ P[Un−r = ∞ | Z̃0 = v] ≥ P[T < Un−r | Z̃0 = v] · inf P[∀t , Z̃t ∈ Λj | Z̃0 = yj ] yj ∈Y ≥ δ r+1 β. (where we have used that k + r < n − r). Combining this with (4.1), using the strong Markov property at time τ , we obtain that for any |v| > k, (4.2) P[pref k (Z̃∞ ) = pref k (v) | Z̃0 = v] ≥ ηδ r+1 β. Step II. Now, define the events Aj = {pref k (Z̃∞ ) 6= pref k (Z̃Un−jr )}. When Z̃0 = v for |v| ≥ n = k + (` + 2)r + 1 the event {pref k (Z̃∞ ) 6= pref k (Z̃0 )} implies that U|v|−r < U|v|−2r < · · · < U|v|−`r < Uk+r < ∞. ENTROPY OF INTERSECTIONAL IRSS 27 But, at time U|v|−jr we have that |Z̃U|v|−jr | ≥ |Z̃U|v|−jr −1 | − r ≥ |v| − (j + 1)r > k + r. Thus, we have by (4.2), using the strong Markov property at time U|v|−jr , implying that P[Aj+1 | Z̃0 , . . . , Z̃U|v|−jr ] ≤ 1 − ηδ r+1 β, P[Aj+1 | (A1 )c ∩ · · · ∩ (Aj )c ] ≤ 1 − ηδ r+1 β. Thus, as long as |v| ≥ n we have that P[pref k (Z̃∞ ) 6= pref k (v) | Z̃0 = v] ≤ P[A1 ∪ · · · ∪ A` | Z̃0 = v] ≤ (1 − ηδ r+1 β)` . Choosing ` such that (1 − ηδ r β)` < ε, we obtain that for any |v| ≥ n P[pref k (Z̃∞ ) 6= pref k (v) | Z̃0 = v] < ε. That is, the graph Γn (Λ, ) is (k, n, 1 − ε)-fixing.  Remark 4.9. Proposition 4.8 is the only place we require the measure µ to have finite support. Indeed, we believe that the proposition should hold with weaker assumptions on µ, perhaps even only assuming that µ is generating and has finite entropy. If this is the case, we could obtain full realization results for the free group for such measures. 4.5. Local properties. Recall from Section 3.1 that given a subgroup K ≤ F2 we define kgkK as the number of cosets of the normalizer b ∈ NG (K)\G for which g 6∈ K b . Recall also that Core∅ (K) = {g : kgkK < ∞}. In this subsection we will provide conditions on K under which Core∅ (K) contains a given subgroup of F2 . This will be useful in determining properties of F2 /Core∅ (K) (specifically, whether F2 /Core∅ (K) is nilpotent). First, some notation: Let g ∈ F2 . Let g = w1 · · · w|g| be a reduced word with wi ∈ S for all i. Let Λ be a Schreier graph with corresponding subgroup K ≤ F2 . Fix a vertex v in Λ. Let v0 (g) = v and inductively define vn+1 (g) to be the unique vertex of Λ such that (vn (g), vn+1 (g)) is labeled by wn+1 . In other words, if v = Kγ then vi (g) = Kγw1 · · · wi . Recall that g ∈ K if and only if for v = o the root of Λ. Hence, for any g ∈ K, we have v|g| (g) = v0 (g). From this we can deduce that when v = Kγ, then v|g| (g) = v0 (g) ⇐⇒ γgγ −1 ∈ K ⇐⇒ g ∈ K γ . Definition 4.10. Let Γ1 , . . . , Γn be some Schreier graphs with roots ρ1 , . . . , ρn . Let BΛ (v, r) be the ball of radius r around v in the graph Λ (and similarly for Γj ). We say that Λ (or sometimes K) is locally-(Γ1 , . . . , Γn ) if for any r > 0 there exists R > 0 such that for all vertices v in Λ with |v| > R we have that the ball BΛ (v, r) is isomorphic (as a labeled graph) to at least one of the balls BΓ1 (ρ1 , r), . . . , BΓn (ρn , r). 28 YAIR HARTMAN AND ARIEL YADIN That is, a subgroup K is locally-(Γ1 , . . . , Γn ) if, after ignoring some finite area, locally we see one of the graphs Γ1 , . . . , Γn . The main purpose of this subsection is to prove: Proposition 4.11. Let K ≤ F2 . Let G1 , . . . , Gn ≤ F2 be subgroups with corresponding Schreier graphs Γ1 , . . . , Γn . If K is locally-(Γ1 , . . . , Γn ) then G1 ∩ · · · ∩ Gn ≤ Core∅ (K). Proof. Let g ∈ G1 ∩ · · · ∩ Gn . We need to prove that ||g||K < ∞. Let Λ be the Schreier graph of K. Let r = |g|. Let R be large enough so that for |v| > R in Λ the ball BΛ (v, r) is isomorphic to one of BΓj (ρj , r) (where as before, ρj is the root vertex of Γj ). Let |v| > R and let j be such that BΛ (v, r) is isomorphic to BΓj (ρj , r). Set Γ = Γj , ρ = ρj . Consider the paths ρ = ρ0 (g), . . . , ρr (g) in Γ and v = v0 (g), . . . , vr (g) in Λ. Since these each sit in BΓ (ρ, r) and BΛ (v, r) respectively, we have that ρr (g) = ρ0 (g) if and only if vr (g) = v0 (g). Thus, g ∈ Gj implies that g ∈ K γ where v = Kγ. In conclusion, we have shown that if γ is such that |Kγ| > R then g ∈ K γ . Hence, there are only finitely many γ ∈ F2 such that g 6∈ K γ , which implies that ||g||K < ∞.  4.6. Full realization. In this subsection we prove Theorem 1.2. In light of Corollary 3.8 and Proposition 4.7, in order to prove full realization for F2 , we need to find a sequence of subgroups Kn with Schreier graphs Γn such that the following properties hold: • Γn is (kn , kn0 , αn )-fixing, with kn → ∞ and αn → 1. • The subgroups Core∅ (Kn ) are co-nilpotent in F2 . To show the first property, we will use the gluing construction from Proposition 4.8, by finding a suitable marked pair (Λ, ) that is µ-transient. Lemma 4.12. Let N be a normal co-nilpotent subgroup in F2 , and let Λ be its associated Schreier graph. Choose some edge  in Λ labeled with s ∈ S and consider (Λ, ) as a marked pair. For any n > 0 let Kn ≤ F2 be the subgroup corresponding to the root of the Shcreier graph Γn (Λ, ). Then, for any n > 0, the normal subgroup Core∅ (Kn ) is co-nilpotent in F2 . Proof. Let G0 = F2 , Gj+1 = [Gj , F2 ] be the descending central series of F2 . Since N is co-nilpotent, there exists m such that Gm C N . By definition of Γn (Λ, ), outside a ball of radius n in Γn (Λ, ), we only have glued copies of Λ or of Ns for s ∈ S = {a, a−1 , b, b−1 } (recall Subsection 4.3). Let Zs denote the Schreier graph with vertices in Z, edges (x + 1, x) labeled by s and a self loop with label ξ 6∈ {s, s−1 } at each vertex. Let ϕs : F2 → Z be the homomorphism defined via s 7→ −1, s−1 7→ 1 and ξ 7→ 0 for ξ 6∈ {s, s−1 }. Then, ENTROPY OF INTERSECTIONAL IRSS 29 the subgroup corresponding to Zs is ker ϕs . Since F2 / ker ϕs is abelian, we have that Gm C [F2 , F2 ] C ker ϕs . It is now immediate that Kn is locally-(Λ, Za , Za−1 , Zb , Zb−1 ). By Proposition 4.11, this implies that \ Gm ≤ N ∩ ker ϕs ≤ Core∅ (Kn ). s∈S Thus, Core∅ (Kn ) is co-nilpotent.  We are now ready to prove our main result, Theorem 1.2. Proof of Theorem 1.2. By Corollary 3.8, Proposition 4.7 and Lemma 4.12 it suffices to find N C F2 such that F2 /N is nilpotent and transient. Since any 2generated nilpotent group is a quotient of F2 , it suffices to find a 2-generated nilpotent group, whose Cayley graph is transient, and then take N to be the corresponding kernel of the canonical projection from F2 onto our nilpotent group. It is well known that recurrent subgroups must have at most quadratic volume growth (this follows for instance from combining the Coulhon-Sallof-Coste inequality [10] and the method of evolving sets [23], see e.g. [26, Chapters 5 & 8]). Thus, it suffices to find a 2-generated nilpotent group that has volume growth larger than quadratic. This is not difficult, and there are many possibilities. For a concrete example, we may consider take H3 (Z), the Heisenberghgroupi (over 1 a c Z). This is the group whose elements are 3 × 3 matrices of the form 0 1 b with 0 0 1 a, b, c ∈ Z. It is well known that H3 (Z) is two-step nilpotent, with the commutator h i 1 0 c subgroup [H3 (Z), H3 (Z)] containing matrices of the form 0 1 0 . It follows that 0 0 1 [[H3 (Z), H3 (Z)], H3 (Z)] = {1} and H3 (Z)/[H3 (Z), H3 (Z)] ∼ = Z2 . This structure shows that H3 (Z) has volume growth at least like a degree 3 polynomial (in fact the volume growth is like r4 ), and thus must be transient. h i h i 1 1 0 1 0 0 Finally, H3 (Z) is generated as a group by two elements 0 1 0 and 0 1 1 , so 0 0 1 0 0 1 can be seen as a quotient of F2 , i.e. H3 (Z) ∼ = F2 /N for some N . This N will satisfy our requirements, and this finishes the proof for F2 . Let us note that for Fr with r > 2 the construction is even simpler: Since Zr is abelian and transient for any r > 2, we can just take N to be the commutator subgroup of Fr .  4.7. Proof of Theorem 1.6. Proof of Theorem 1.6. Let N be a normal co-nilpotent subgroup in F2 , and let Λ be its associated Schreier graph. Choose some edge  in Λ labeled with s ∈ S and consider (Λ, ) as a marked pair. For any n > 0 let Kn ≤ F2 be the subgroup corresponding to the root of the Shcreier graph Γn (Λ, ), where Γn (Λ, ) is defined in Section 4.3. 30 YAIR HARTMAN AND ARIEL YADIN We have already seen in the proof of Lemma 4.12 that Core∅ (Kn ) is co-nilpotent in F2 , so the entropy function is continuous and the interval of values [0, c] is realizable for c = hRW (G/CoreG (Kn ), µ̄)], by Corollary 3.6. So we only need to prove that hRW (G/CoreG (Kn ), µ̄) > 0 for some n. (Of course we proved that when µ has finite support this converges to the random walk entropy, but here we are dealing with any finite entropy generating probability measure µ, not necessarily with finite support.) By the well known Kaimanovich-Vershik entropy criterion [20], if there exists a non-constant bounded harmonic function on the Schreier graph Γn (Λ, ), then the entropy hRW (G/CoreG (Kn ), µ̄) is positive. If the graph (Λ, ) is transient, then considering the random walk on Γn (Λ, ), for each glued copy of (Λ, ) the random walk has positive probability to eventually end up in that copy. In other words, there exists 0 < α < 1 such that for any |v| = n we have P[∃ t0 : ∀ t > t0 Z̃t ∈ shd(v)] ≥ α. Thus, for a fixed |v| = n, the function h(g) = hv (g) := Pg [∃ t0 : ∀ t > t0 Z̃t ∈ shd(v) | Z̃0 = g] is a non-constant bounded harmonic function on G. Finding a transient Schreier graph (Λ, ) with corresponding subgroup N C F2 which is co-nilpotent, can be done exactly as in the proof of Theorem 1.2.  References [1] Miklos Abert, Nicolas Bergeron, Ian Biringer, Tsachik Gelander, Nikolay Nikolov, Jean Raimbault, and Iddo Samet, On the growth of L2 -invariants for sequences of lattices in Lie groups, arXiv:1210.2961 (2012). [2] Miklos Abert, Yair Glasner, and Balint Virag, The measurable Kesten theorem, arXiv:1111.2080 (2011). [3] Miklós Abért, Yair Glasner, and Bálint Virág, Kestenś theorem for invariant random subgroups, Duke Mathematical Journal 163 (2014), no. 3, 465–488. [4] Lewis Bowen, Random walks on random coset spaces with applications to Furstenberg entropy., Inventiones mathematicae 196 (2014), no. 2. [5] , Invariant random subgroups of the free group, Groups, Geometry, and Dynamics 9 (2015), no. 3, 891–916. [6] Lewis Bowen, Rostislav Grigorchuk, and Rostyslav Kravchenko, Invariant random subgroups of lamplighter groups, Israel Journal of Mathematics 207 (2015), no. 2, 763–782. [7] Lewis Bowen, Yair Hartman, and Omer Tamuz, Generic stationary measures and actions, Transactions of the American Mathematical Society (2017). [8] Peter Burton, Martino Lupini, and Omer Tamuz, Weak equivalence of stationary actions and the entropy realization problem, arXiv preprint arXiv:1603.05013 (2016). [9] Gustave Choquet and Jacques Deny, Sur lequation de convolution mu= mu-star-sigma, Comptes rendus hebdomadaires des seances de l’academie des sciences 250 (1960), no. 5, 799–801. ENTROPY OF INTERSECTIONAL IRSS 31 [10] Thierry Coulhon and Laurent Saloff-Coste, Isopérimétrie pour les groupes et les variétés, Rev. Mat. Iberoamericana 9 (1993), no. 2, 293–314. [11] Thomas M Cover and Joy A Thomas, Elements of information theory, John Wiley & Sons, 2012. [12] Alex Furman, Random walks on groups and random transformations, Handbook of dynamical systems 1 (2002), 931–1014. [13] H. Furstenberg, Random walks and discrete subgroups of Lie groups, Advances in Probability and Related Topics 1 (1971), 1–63. [14] H Furstenberg, Boundary theory and stochastic processes on homogeneous spaces, Harmonic analysis on homogeneous spaces 26 (1973), 193–229. [15] H. Furstenberg and E. Glasner, Stationary dynamical systems, Dynamical numbers— interplay between dynamical systems and number theory, 2010, pp. 1–28. MR2762131 [16] Yair Hartman and Omer Tamuz, Furstenberg entropy realizations for virtually free groups and lamplighter groups, Journal d’Analyse Mathématique 126 (2015), no. 1, 227–257. , Stabilizer rigidity in irreducible group actions, Israel Journal of Mathematics 216 [17] (2016), no. 2, 679–705. [18] Vadim A Kaimanovich, The poisson boundary of amenable extensions, Monatshefte für Mathematik 136 (2002), no. 1, 9–15. , Amenability and the liouville property, Israel Journal of Mathematics 149 (2005), [19] no. 1, 45–85. [20] Vadim A Kaimanovich and Anatoly M Vershik, Random walks on discrete groups: boundary and entropy, The annals of probability (1983), 457–490. [21] Paul-Henry Leemann, Schreir graphs: Transitivity and coverings, International Journal of Algebra and Computation 26 (2016), no. 01, 69–93. [22] Russell Lyons and Yuval Peres, Probability on trees and networks, Vol. 42, Cambridge University Press, 2016. [23] Ben Morris and Yuval Peres, Evolving sets, mixing and heat kernel bounds, Probability Theory and Related Fields 133 (2005), no. 2, 245–266. [24] Amos Nevo, The spectral theory of amenable actions and invariants of discrete groups, Geometriae Dedicata 100 (2003), no. 1, 187–218. [25] Amos Nevo and Robert J Zimmer, Rigidity of Furstenberg entropy for semisimple Lie group actions, Annales scientifiques de l’ecole normale supérieure, 2000, pp. 321–343. [26] Gabor Pete, Probability and geometry on groups. available at: http://math.bme.hu/ ~gabor/PGG.pdf. [27] Albert Raugi, A general Choquet–Deny theorem for nilpotent groups, Annales de l’IHP probabilités et statistiques 40 (2004), no. 6, 677–683. [28] Anatolii Moiseevich Vershik, Totally nonfree actions and the infinite symmetric group, Mosc. Math. J 12 (2012), no. 1, 193–212. YH: Northwestern University, Evanston, IL E-mail address: [email protected] AY: Ben-Gurion University of the Negev, Be’er Sheva ISRAEL E-mail address: [email protected]
4math.GR
A POLYNOMIAL KERNEL FOR DISTANCE-HEREDITARY VERTEX DELETION arXiv:1610.07229v3 [cs.DS] 20 Feb 2017 EUN JUNG KIM AND O-JOUNG KWON Abstract. A graph is distance-hereditary if for any pair of vertices, their distance in every connected induced subgraph containing both vertices is the same as their distance in the original graph. The Distance-Hereditary Vertex Deletion problem asks, given a graph G on n vertices and an integer k, whether there is a set S of at most k vertices in G such that G − S is distance-hereditary. This problem is important due to its connection to the graph parameter rank-width that distance-hereditary graphs are exactly graphs of rank-width at most 1. Eiben, Ganian, and Kwon (MFCS’ 16) proved that Distance-Hereditary Vertex Deletion can be solved in time 2O(k) nO(1) , and asked whether it admits a polynomial kernelization. We show that this problem admits a polynomial kernel, answering this question positively. For this, we use a similar idea for obtaining an approximate solution for Chordal Vertex Deletion due to Jansen and Pilipczuk (SODA’ 17) to obtain an approximate solution with O(k3 log n) vertices when the problem is a Yes-instance, and we exploit the structure of split decompositions of distance-hereditary graphs to reduce the total size. 1. Introduction The graph modification problems, in which we want to transform a graph to satisfy a certain property with as few graph modifications as possible, have been extensively studied. For instance, the Vertex Cover and Feedback Vertex Set problems are graph modification problems where the target graphs are edgeless graphs and forests, respectively. By the classic result of Lewis and Yannakakis [23], it is known that for all non-trivial hereditary properties that can be tested in polynomial time, the corresponding vertex deletion problems are NP-hard. Hence, the research effort has been directed toward designing algorithms such as approximation and parameterized algorithms. When the target graph class C admits efficient algorithms for some NP-hard problems, the graph modification problem related to such a class attracts more attention. In this context, vertex deletion problems to classes of graphs of constant tree-width or constant tree-depth have been studied. Tree-width w Vertex Deletion 1 is proved to admit an FPT algorithm running in time 2O(k) nO(1) and a kernel with O(k g(w) ) vertices for some function g [15, 22]. Also, it was shown that Tree-depth w Vertex Deletion admits uniformly polynomial kernels with O(k 6 ) vertices, for every fixed w [16]. All these problems are categorized as vertex deletion problems for F-minor free graphs in a general Date: February 22, 2017. Key words and phrases. rank-width, kernelization, distance-hereditary. The second author was supported by ERC Starting Grant PARAMTIGHT (No. 280152) and also supported by the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (ERC consolidator grant DISTRUCT, agreement No. 648527). 1Tree-width (or Tree-depth) w Vertex Deletion asks, given a graph G and an integer k, whether G contains a vertex set S of at most k vertices such that G − S has tree-width (or tree-depth) at most w. 1 2 EUN JUNG KIM AND O-JOUNG KWON setting, when the set F contains at least one planar graph. However, F-minor free graphs capture only sparse graphs in a sense that the number of edges of such a graph is bounded by a linear function on the number of its vertices. Thus these problems are not very useful when dealing with very dense graphs. Rank-width [26] and clique-width [7] are graph width parameters introduced for extending graph classes of bounded tree-width. Graphs of bounded rank-width represent graphs that can be recursively decomposed along vertex partitions (X, Y ) where the number of neighborhood types between X and Y are small. Thus, graphs of constant rank-width may contain dense graphs; for instance, all complete graphs have rank-width at most 1. Courcelle, Makowski, and Rotics [6] proved that every M SO1 -expressible problem can be solved in polynomial time on graphs of bounded rank-width. Motivated from Tree-width w Vertex Deletion, Eiben, Ganian, and the second author [10] initiated study on vertex deletion problems to graphs of constant rank-width. The class of graphs of rank-width at most 1 is exactly same as the class of distancehereditary graphs [26]. A graph G is called distance-hereditary if for every connected induced subgraph H of G and every two vertices u and v in H, the distance between u and v in H is the same as the distance in G. A vertex subset X of a graph G is a distancehereditary modulator, or a DH-modulator in short, if G − X is a distance-hereditary graph. We formulate our central problem. Distance-hereditary Vertex Deletion (DH Vertex Deletion) Input : A graph G, an integer k Parameter : k Question : Does G contain a DH-modulator of size at most k? Eiben, Ganian, and the second author [10] proved that DH Vertex Deletion can be solved in time 2O(k) nO(1) . It was known before that vertex deletion problems for graphs of rank-width w can be solved in FPT time [21] using the fact that graphs of rank-width at most w can be characterized by a finite list of forbidden vertex-minors [26], and Eiben et al. devised a first elementary algorithm for this problem when w = 1. Furthermore, they discussed that the size k of a DH-modulator can be used to obtain a 2O(k) nO(1) -time algorithm for problems such as Independent Set, Vertex Cover, and 3-Coloring. However, until now, it was not known whether the DH Vertex Deletion problem admits a polynomial kernel or not. A kernelization of a parameterized graph problem Π is a polynomial-time algorithm which, given an instance (G, k) of Π, outputs an equivalent instance (G0 , k 0 ) of Π with |V (G0 )| + k 0 ≤ h(k) for some computable function h. The resulting instance (G0 , k 0 ) of a kernelization is called a kernel, and in particular, when h is a polynomial function, Π is said to admit a polynomial kernel. Our Contribution. In this paper, we show that DH Vertex Deletion admits a polynomial kernel. Theorem 1.1. DH Vertex Deletion admits a polynomial kernel. We find in Section 3 an approximate DH-modulator with O(k 3 log n) vertices if the given instance is a Yes-instance. An important observation here is that in a distancehereditary graph, there is a balanced separator, which is a complete bipartite subgraph (possibly containing edges in each part). By recursively finding such separators, we will A POLYNOMIAL KERNEL FOR DISTANCE-HEREDITARY VERTEX DELETION 3 decompose the given graph into D ] K1 ] · · · ] K` ] X, where ` = O(k √ log n), D is distance3 hereditary, each Ki is a complete bipartite subgraph, |X| = O(k log k log n). We argue that if a graph H is the disjoint union of a distance-hereditary graph and a complete bipartite graph, then in polynomial time, one can construct a DH-modulator of size O(k 2 ) in H if (H, k) is a Yes-instance. Using this sub-algorithm ` times, we will construct an approximate DH-modulator with O(k 3 log n) vertices. This part follows a vein similar to the approach of Jansen and Pilipczuk [20] for Chordal Vertex Deletion. Given a DH-modulator S by adding O(k 2 ) per each vertex in S, we will obtain in Section 4 a new DH-modulator S 0 of size O(k 5 log n) such that for every v ∈ S 0 , G[(V (G) \ S) ∪ {v}] is also distance-hereditary. We will call such a DH-modulator a good DH-modulator. The remaining part is contributed to reduce the number of vertices in G − S 0 . Note that distance-hereditary graphs may contain a large set of pairwise twins. In Section 5, we present a reduction rule that results in bounding the size of each set of pairwise twins in G − S 0 . We give in Section 6 a reduction rule that results in bounding the number of connected components of G − S 0 . The last step is to reduce the size of each connected component of G − S 0 having at least 2 vertices. For this, we use split decompositions of distance-hereditary graphs. Briefly, split decompositions present tree-like structure of distance-hereditary graphs, with a decomposition tree with bags for each nodes, such that each bag consists of a maximal set of pairwise twins in G−S 0 . Since the result of Section 5 provides a bound of each maximal set of pairwise twins in G − S 0 , it is sufficient to bound the number of bags in the decomposition tree. We summarize our algorithm in Section 8, and conclude with some further discussions in Section 9. 2. Preliminaries In this paper, all graphs are simple and finite. Given a graph G, we write the vertex set and edge set of G as V (G) and E(G) respectively. Unless otherwise stated, we reserve n to denote |V (G)|. For a vertex v of G, we denote by G − v the graph obtained from G by removing v and all edges incident with it. For a vertex subset S of G, we denote by G − S the graph obtained by removing all vertices in S. For a vertex subset S of G, let G[S] be the subgraph of G induced by S. For a vertex v in G, we denote by NG (v) the set of all neighbors of v in G. For a vertex subset S of G, we denote by NG (S) the set of all vertices in V (G) \ S that have a neighbor in S, and let NG [S] := NG (S) ∪ S. If the graph G is clear from the context, then we may remove G from the notation. We say that a graph is trivial if it consists of a single vertex, and non-trivial otherwise. For two vertex sets A and B in G, we say A is complete to B if for every v ∈ A and w ∈ B, v is adjacent to w, and A is anti-complete to B if for every v ∈ A and w ∈ B, v is not adjacent to w. A star is a tree with a distinguished vertex, called the center, adjacent to all other vertices. A complete graph is a graph with all possible edges. Two vertices v and w of a graph G are twins if they have the same neighbors in G − {v, w}. We say a vertex subset S of G is a twin set of G if the vertices in S are pairwise twins in G. A graph H is a biclique if there is a bipartition of V (H) into non-empty sets A ] B such that any two vertices a ∈ A and b ∈ B is adjacent. Notice that there may be edges among the vertices of A or B. For a vertex subset K ⊆ V (G), we say that K is a biclique of G if G[K] is a biclique. For a connected graph G, a vertex subset S ⊆ V (G) is called a balanced vertex separator of G if every component of G − S has at most 23 |V (G)| vertices. We allow V (G) to be 4 EUN JUNG KIM AND O-JOUNG KWON house gem domino cycle ≥ 5 Figure 1. The induced subgraph obstructions for distance-hereditary graphs. a trivial balanced vertex separator of G. For a vertex subset S of G, a path is called an S-path if its end vertices are in S and all other internal vertices are in V (G) \ S. 2.1. Distance-hereditary graphs. A graph G is distance-hereditary if for every connected induced subgraph H of G, the distance between u and v in H is the same as the distance between u and v in G. The class of distance-hereditary graphs was introduced by Howorka [19], and attracted much attention after the work of Bandelt and Murder [3] in 1982. This graph class was characterized in a various way; for instance, distancehereditary graphs are exactly the graphs that can be constructed from a vertex by a sequence of adding twins or leaves [3], or these graphs are (5, 2)-crossing chordal graphs meaning that every induced cycle of length at least 5 contains two crossing chords [19]. A graph is called a DH obstruction if it is isomorphic to a gem, a house, a domino or an induced cycle of length at least 5, that are depicted in Figure 1. A DH obstruction is small if it has at most 6 vertices. Theorem 2.1 (Bandelt and Mulder [3]). A graph is distance-hereditary if and only if it has no induced subgraph isomorphic to one of DH obstructions. The following lemma from [21] is useful to find a DH obstruction. Lemma 2.2. Given a graph G, if P is an induced path in G of length at least 3 and v ∈ V (G) \ V (P ) is adjacent with the end vertices of P , then G[V (P ) ∪ {v}] contains a DH obstruction including v. For a subset S of a graph G, we say that S is a DH-modulator if G − S is distancehereditary. A DH-modulator S is good if every DH obstruction of G contains at least two vertices of S, or equivalently, G[(V (G) \ S) ∪ {v}] is distance-hereditary for every v ∈ S. 2.2. Split decompositions. We follow the notations in [4]. A split of a graph G is a vertex partition (A, B) of G such that |A| ≥ 2, |B| ≥ 2, and NG (B) is complete to NG (A). A connected graph G is called a prime graph if |V (G)| ≥ 5 and it has no split. A connected graph D with a distinguished set of cut edges M (D) of D is called a marked graph if M (D) forms a matching. An edge in M (D) is called a marked edge, and every other edge is called an unmarked edge. A vertex incident with a marked edge is called a marked vertex, and every other vertex is called an unmarked vertex. Each connected component of D − M (D) is called a bag of D. See Figure 2 for an example. When G admits a split (A, B), we construct a marked graph D on the vertex set V (G) ∪ {a0 , b0 } such that • a0 b0 is a new marked edge, • A is anti-complete to B, • {a0 } is complete to NG (B), {b0 } is complete to NG (A), and • for vertices a, b with {a, b} ⊆ A or {a, b} ⊆ B, ab ∈ E(G) if and only if ab ∈ E(D). A POLYNOMIAL KERNEL FOR DISTANCE-HEREDITARY VERTEX DELETION 5 B5 B4 B1 B2 B3 G Figure 2. An example of a split decomposition of a distance-hereditary graph. Dashed edges denote marked edges and each Bi denotes a bag. The marked graph D is called a simple decomposition of G. A split decomposition of a connected graph G is a marked graph D defined inductively to be either G or a marked graph defined from a split decomposition D0 of G by replacing a bag B with its simple decomposition. It is known that for two vertices u, v in G, uv ∈ E(G) if and only if there is a path from u to v in D where its first and last edges are unmarked, and an unmarked edge and a marked edge alternatively appear in the path [1, Lemma 2.10]. For convenience, we call a bag a star bag or a complete bag if it is a star or a complete graph, respectively. Naturally, we can define a reverse operation of decomposing into a simple decomposition; for a marked edge xy of a split decomposition D, recomposing xy is the operation of removing two vertices x and y and making ND (x) \ {y} complete to ND (y) \ {x} with unmarked edges. It is not hard to observe that if D is a split decomposition of G, then G can be obtained from D by recomposing all marked edges. Note that there are many ways of decomposing a complete graph or a star, because every its vertex partition (A, B) with |A| ≥ 2 and |B| ≥ 2 is a split. Cunningham and Edmonds [8] developed a canonical way to decompose a graph into a split decomposition by not allowing to decompose a star bag or a complete bag. A split decomposition D of G is called a canonical split decomposition if each bag of D is either a prime graph, a star, or a complete graph, and recomposing any marked edge of D violates this property. Bouchet [4, (4.3)] observed that every canonical split decomposition has no marked edge linking two complete bags, and no marked edge linking a leaf of a star bag and the center of another star bag. Furthermore, for each pair of twins a, b in G, it holds that a, b must both be located in the same bag of the canonical split decomposition. Theorem 2.3 (Cunningham and Edmonds [8]). Every connected graph has a unique canonical split decomposition, up to isomorphism. Theorem 2.4 (Dahlhaus [9]). The canonical split decomposition of a graph G can be computed in time O(|V (G)| + |E(G)|). We now give the second characterization of distance-hereditary graphs that is crucial for our results. Theorem 2.5 (Bouchet [4]). A graph is distance-hereditary if and only if every bag in its canonical split decomposition is either a star bag or a complete bag. 2.3. Extending a canonical split decomposition. Let G and H be connected graphs such that G is distance-hereditary and H is obtained from G by adding a vertex v. Gioan and Paul [17] characterized when H is again distance-hereditary or not, and described the way to extend the canonical split decomposition of G to the canonical split decomposition of H when H is distance-hereditary. We need this characterization in Section 7. 6 EUN JUNG KIM AND O-JOUNG KWON B5 B5 B4 B4 position v B1 B2 B3 B1 B2 B v B3 G0 Figure 3. The way of extending the given split decomposition by adding a new vertex v. The pointed position is the marked edge described in (2) of Theorem 2.6, and it can be computed in polynomial time. The second split decomposition is the modified split decomposition. Let D be the canonical split decomposition of a connected distance-hereditary graph G. For S ⊆ V (G) and a vertex v in D with a bag B containing v, v is accessible with respect to S if either v ∈ S, or the component of D − V (B) having a neighbor of v contains a vertex in S. For S ⊆ V (G) and a bag B of D, (1) B is fully accessible with respect to S if all vertices in B are accessible with respect to S, (2) B is singly accessible with respect to S if B is a star bag of D, and exactly two vertices of B including the center of B are accessible with respect to S, and (3) B is partially accessible with respect to S if otherwise. A star bag B of D is oriented towards a bag B 0 (or a marked edge e) in D if the center of B is marked, and the path from the center of B to a vertex of B 0 (or to end vertices of e) contain the marked edge incident with the center of B. For S ⊆ V (G), we define D(S) as the minimal connected subdecomposition of D such that (1) D(S) is induced by the union of a set of bags of D, and (2) D(S) contains all vertices of S. Theorem 2.6 (Gioan and Paul, Theorem 3.4 of [17]). Let G and H be connected graphs such that G is distance-hereditary and H is obtained from G by adding a vertex v. Let NH (v) = S. Then H is distance-hereditary if and only if at most one bag of D(S) is partially accessible in D, and (1) if there is a partially accessible bag B in D(S), then each star bag B 0 6= B in D(S) is oriented towards B if and only if it is fully accessible, (2) otherwise, there exists a marked edge e of D(S) such that each star bag B in D(S) is oriented towards e if and only if it is fully accessible. Furthermore, we can find the partially accessible bag B in (1) or the marked edge e in (2) in time O(|V (G)|). 2 In Section 4.1 of [17], Gioan and Paul explained how to obtain a canonical split decomposition of H from D using such a partially accessible bag or a marked edge. Since it is sufficient to find such a bag or a marked edge for our purpose, we will not describe how to update it, but we give an example in Figure 3. One important property is that for every 2Theorem 3.4 of [17] presented one more condition that every complete bag is either fully or partially accessible, which is redundant by definition. A POLYNOMIAL KERNEL FOR DISTANCE-HEREDITARY VERTEX DELETION 7 two vertices in a bag of D that is not the partially accessible bag, they are still twins in H. 3. Approximation algorithm We present a polynomial-time algorithm which constructs an approximate DH-modulator of G whenever (G, k) is a Yes-instance for DH Vertex Deletion. The main result is as follows. Theorem 3.1. There is a polynomial-time algorithm which, given a graph G and a positive integer k, either correctly reports that (G, k) is a No-instance to DH Vertex Deletion, or returns a DH-modulator S ⊆ V (G) of size O(k 3 · log n). Recall that a DH obstruction is said to be small if it contains at most 6 vertices. If G contains k + 1 vertex-disjoint copies of small DH obstructions, then (G, k) is clearly a Noinstance. Therefore, we may assume that a maximal packing of small DH obstructions in G has cardinality at most k. Notice that after removing all the vertices in a maximal packing, the resulting graph has no small DH obstruction. The following is the key statement for proving Theorem 3.1 and most part of this section is devoted to its proof. Proposition 3.2. There is a polynomial-time algorithm which, given a graph G without a small DH obstruction and a positive integer k, either correctly reports that (G, k) is a No-instance to DH Vertex Deletion, or returns a DH-modulator S ⊆ V (G) of size O(k 3 · log n). A recent work of Jansen and Pilipczuk [20] for a polynomial kernel for Chordal Vertex Deletion employs an approximation algorithm as an important subroutine. We follow a similar vein of approach as in [20] here. The crux is to reduce the problem of finding an approximate DH-modulator to a restricted version where an input instance comes with a biclique DH-modulator (which we call a controlled instance). In this special case, finding an approximate DH-modulator boils down to solving Vertex Multicut. We construct an instance of Vertex Multicut using a feasible solution to the LP relaxation of DH Vertex Deletion. To this end, we obtain a decomposition V (G) = D ] K` ] · · · K1 ] X` ] · · · X1 √ where G[D] is distance-hereditary, each Ki is a biclique, |Xi | = O(k log k) and ` = O(k·log n), if (G, k) is a Yes-instance (Proposition 3.10). Such a decomposition is achieved by recursively extracting pairs (K, X) from G, where K is a biclique, X is a vertex set √ of size at most O(k log k) until the resulting graph after removing those sets is distancehereditary. Then in the graph G[D ] K` ] · · · K1 ], we recursively find an approximate DH-modulator using the algorithm for a controlled instance. As we consider distance-hereditary graphs instead of chordal graphs, our approximation algorithm makes some important deviations from [20]. First, we extract a pair containing a biclique, instead of a clique. Second, unlike in [20], we cannot guarantee that a long induced cycle traverses exactly one connected component of the distance-hereditary graph D. Such differences call for nontrivial tweaks in our approximation. Except for the last subsection in which we prove Theorem 3.1, we assume that G contains no small DH obstruction. 8 EUN JUNG KIM AND O-JOUNG KWON 3.1. LP relaxation and preprocessing. Given a graph G, let x be a mapping from V (G) to R Pand denote x(v) as xv for every v ∈ V (G). For a subgraph H of G, we define x(H) := v∈V (H) xv and |x| := x(G). As we assume that G does not contain any small DH obstructions, the following is a linear program formulation of DH Vertex Deletion for an instance (G, k): X min xv v s.t x(H) ≥ 1 xv ≥ 0 ∀H is an induced cycle of length at least 7 ∀v ∈ V (G). It is clear that an optimal integral solution corresponds to an optimal DH-modulator and vice versa. We call a feasible solution to this LP a feasible fractional solution to DH Vertex Deletion (for G). Observation 3.3. If x∗ is a feasible fractional solution to DH Vertex Deletion for a graph G, then for any induced subgraph G0 of G, x∗ restricted to V (G0 ) is a feasible fractional solution for G0 as well. An optimal fractional solution x∗ to DH Vertex Deletion can be found in polynomial time using the ellipsoid method3 provided that there is a separation oracle for detecting a violated constraint for a fractional solution x0 . Such a separation oracle can be easily implemented in polynomial time. Lemma 3.4. Let G be a graph with non-negative weights x0 : V (G) → Q≥0 and ` ∈ Q≥0 . For any positive integer d, one can decide in time O(nd+2 ) whether there is an induced cycle H of length at least d with x0 (H) < `. Proof. For every size-d vertex subset D of G such that G[D] is an induced path, with s and t as end vertices, we solve a weighted shortest-path problem on G0 with weights x0 |V (G0 ) , where G0 is obtained by removing all internal vertices of D and their neighbors, except for s and t. Clearly, D together with the obtained shortest (s, t)-path forms an induced cycle of length at least d. Conversely, if there is an induced cycle of length at least d, then it can be detected by considering all size-d vertex subsets.  Let x∗ be an optimal fractional solution to DH Vertex Deletion for G and let X̃ be 1 . Observe the set of all vertices v such that x∗v ≥ 20 (1) k ≥ x∗ (G) ≥ 1 · |X̃| + x∗ (G − X̃) 20 From Inequality (1), it is easy to see that if |X̃| > 20k, then (G, k) is a No-instance. Therefore, we may assume that |X̃| ≤ 20k. Furthermore, by Observation 3.3, x∗ restricted 1 to V (G) \ X̃ is a feasible fractional solution for G − X̃ and x∗v < 20 for every v ∈ V (G) \ X̃. We add X̃ to the approximate DH-modulator S we are constructing and remove X̃ from G. Henceforth, we assume that x∗ is a feasible fractional solution to DH Vertex Deletion 1 for G such that x∗v < 20 for every v ∈ V (G). Clearly, |x∗ | ≤ k. 3We mention that for our LP relaxation, found optimal solution has all rational values, each being represented using polynomial number of digits in n. A POLYNOMIAL KERNEL FOR DISTANCE-HEREDITARY VERTEX DELETION 9 3.2. Decomposition into DH and bicliques. Using the following observations, we decompose the vertex set of G into bicliques, a set inducing a distance-hereditary graph, and a bounded number of extra vertices. We first prove an O(n3 ) bound on the number of maximal bicliques in a graph having no small DH obstructions. This can be seen as an extension of an O(n2 ) bound √ on the number of maximal cliques in graphs without C4 [13, Proposition 2] or an O(n n) bound for graphs without C4 and the diamond [12, Theorem 2.1]. The tightness of the latter result was also confirmed. We say two sets A and B cross if A \ B 6= ∅, A ∩ B 6= ∅, and B \ A 6= ∅. Lemma 3.5. Let A be a set and let C = {C1 , . . . , Cm } be a family of subsets of A such that for each distinct integers i, j ∈ {1, . . . , m}, Ci 6= Cj and Ci and Cj do not cross. Then m ≤ |A|(|A|+1) . 2 Proof. We may assume |A| ≥ 2. Let v ∈ A. Note that the sets in C containing v can be ordered linearly by the inclusion relation. Therefore, there are at most |A| sets containing v. By induction {Ci ∈ C : v ∈ / Ci } contains at most (|A|−1)|A| elements. Thus, in total, 2 |A|(|A|+1) |C| ≤ .  2 Lemma 3.6. Let G be a graph on n vertices that has no small DH obstructions. Then 3 maximal bicliques, and they can be enumerated in polynomial G contains at most n +5n 6 time. Proof. We claim that every vertex is contained at most (n−1)n + 1 maximal bicliques of G. 2 Then by recursively enumerating all maximal bicliques containing v of G and discarding   P (i−1)i n3 +5n + 1 ≤ 6 on the number of maximal v from G, we obtain the bound 1≤i≤n 2 bicliques in total. Let v ∈ V (G), and let N1 := NG (v) and let N2 be the set of vertices in G−({v}∪NG (v)) that have a neighbor in N1 . We claim that for w, z ∈ N2 , NG (w) ∩ N1 and NG (z) ∩ N1 do not cross. Suppose for contradiction that there exists w, z ∈ N2 where NG (w) ∩ N1 and NG (z) ∩ N1 cross. By definition, there exists a1 ∈ (NG (w) \ NG (z)) ∩ N1 , a2 ∈ (NG (w) ∩ NG (z)) ∩ N1 , and a3 ∈ (NG (z) \ NG (w)) ∩ N1 . If wz ∈ E(G), then regardless of the adjacency between a1 and a3 , G[{w, z, a1 , a3 , v}] is isomorphic to C5 or the house. We may assume wz ∈ / E(G). If a1 a3 ∈ E(G), then G[{w, z, a1 , a2 , a3 }] is isomorphic to C5 , the house, or the gem. If a1 a3 ∈ / E(G), then G[{v, w, z, a1 , a2 , a3 }] contains an induced subgraph isomorphic to the domino, the house, or the gem. Therefore, we can always find a small DH obstruction. We conclude that for w, z ∈ N2 , NG (w) ∩ N1 and NG (z) ∩ N1 do not cross, as G has no small DH obstructions. So, {NG (v) ∩ N1 : v ∈ N2 } forms a family of sets such that any two sets do not cross. Since |N1 | ≤ |V (G)| − 1, by Lemma 3.5, it contains at most (n−1)n sets. 2 Notice that every biclique containing v and a vertex in N2 should consists of one part with the union of v and a set of vertices in N2 having the same neighbors on N1 . Thus, the number of such bicliques is at most (n−1)n . With the maximal biclique containing 2 the trivial biclique with the partitions {v} and N1 , there are at most (n−1)n + 1 bicliques 2 containing v, as required. Furthermore, by classfying the classes of vertices in N2 having the same neighborhoods in N1 , we can enumerate all bicliques in polynomial time.  10 EUN JUNG KIM AND O-JOUNG KWON One main observation is that every connected distance-hereditary graph admits a biclique that is also a balanced vertex separator. We prove this. Lemma 3.7. Let G be a connected distance-hereditary graph on at least two vertices. Then G contains a blicique that is a balanced vertex separator of G. Proof. Let D be a canonical split decomposition of G. If D consists of a single bag B, then B = G. Note that B is either a star or a complete graph on at least two vertices. In this case, we take the whole vertex set V (G) as a balanced vertex separator of G. Henceforth, we can assume that D contains at least two bags. For every marked edge e = xy of D, let Ux (e) (respectively, Uy (e)) denote the set of unmarked vertices contained in the connected component of D − e containing x (respectively, y). Recall that (Ux (e), Uy (e)) defines a split of G. Let Rx (e) := NG (Uy (e)), Ry (e) := NG (Ux (e)), and Ke := Rx (e) ∪ Ry (e). We note that a vertex v belongs to Ry (e) if and only if v is an unmarked vertex in D that is connected to y by an odd-length path in D − e alternating in marked edges and unmarked edges. Since (Ux (e), Uy (e)) is a split, the vertex set Ke forms a biclique. ~ be a graph obtained by orienting every marked edge e = xy from x to y whenever Let D G[Uy (e) \ Ry (e)] contains a connected component of size larger than 21 n. Note that a connected component of G[Uy (e) \ Ry (e)] is a connected component of G − Ke . If there is ~ K := Ke is a desired biclique that is a balanced vertex an unoriented edge e = xy in D, ~ Since every bag of separator. Hence we assume that every marked edge is oriented in D. ~ can have at most one marked edge oriented outward, there exists a bag B such that all D ~ incident marked edges are oriented toward B in D. Consider the case when B is a leaf bag, e = xy is the unique marked edge incident with B oriented from x to y, and y ∈ V (B). If B is a complete bag or a star bag in which y is the center, clearly all unmarked vertices of B belong to Ry (e), and thus Uy (e) \ Ry (e) = ∅, contradicting the orientation of e. If B is a star bag in which y is a leaf, the (unmarked) center of B belongs to Ry (e). Observe that each unmarked leaf vertex of B forms a trivial connected component of G[Uy (e) \ Ry (e)], contradicting the orientation of e. Hence B is incident with at least two marked edges, say ei = xi yi for i = 1, 2, . . ., where yi ∈ V (B) for every i. Let UB be the set of unmarked vertices in B. We argue that B is a star bag with its center unmarked. S (a) B is a complete bag: Observe that for every i, Ryi (ei ) = j6=i Rxj (ej ) ∪ UB . This S means Kei = Rxi (ei ) ∪ Ryi (ei ) = j Rxj (ej ) ∪ B, that is, Kei is the same for every i. Moreover, we have UB ⊆ Kei . This means that each connected component of G − Kei of size at most 21 n, contradicting the orientations. (b) B is a star bag with its center marked: Notice that the center of B is one of yi ’s, say y1 . The orientation of e1 implies that G[Uy1 (e1 ) \ Ry1 (e1 )] has a connected component C containing more than 21 n vertices. On the other hand, all vertices of UB and Rxi (ei ) for i 6= 1 have an odd-length S path in D − e1 to y1 alternating in marked and unmarked edges, implying that UB ∪ i6=1 Rxi (ei ) ⊆ Ry1 (e1 ). Therefore, C is contained in a connected component of G[Uxj (ej ) \ Rxj (ej )] for some j 6= 1. This contradicts the orientation of ej . Hence, B is a star bag with its center unmarked. Let v be the center of B S and observe that for every i, v is the only vertex in Byi (ei ). Observe that K := {v} ∪ i Rxi (ei ) is a biclique with the desired property. This completes the proof.  A POLYNOMIAL KERNEL FOR DISTANCE-HEREDITARY VERTEX DELETION 11 The following result is from [14]. √ Theorem 3.8 (Feige, Hajiaghayi, and Lee [14]). There is an O( log opt)-approximation algorithm for finding a balanced vertex separator. Lemma 3.9. Let (G, k) be an instance to DH Vertex Deletion such that G is connected and contains no small DH obstructions. There is a polynomial-time algorithm which finds a balanced vertex separator K ] X such that - K is a biclique√or an empty set, - and |X| = O(k log k) whenever (G, k) is a Yes-intance. Proof. We perform the following algorithm. Let K be a maximal biclique of G or an empty set. If every connected component of G − K contains at most 23 n vertices, we take X := ∅. Otherwise, we apply Theorem 3.8 to a (unique) largest connected component √ C of G − K to find a balanced vertex separator X of C of size O(opt log opt). In both √ cases, if X is of size at most O(k log k), then K ] X is clearly a desired balanced vertex √ separator. If no balanced vertex separator of size at most O(k log k) is found while iterating over all maximal bicliques of G and an empty set as K, then we report that there is no DH-modulator of size at most k. This algorithm runs in polynomial time since a balanced vertex separator X of a connected component C can be found in polynomial time by Theorem 3.8, and Lemma 3.6 provides an efficient way to iterate over all maximal bicliques. To see the correctness, suppose that (G, k) is a Yes-instance and let X0 be an optimal DH-modulator. If G−X0 forms an independent set, then X0 is a balanced vertex separator of G − K, where √ K := ∅. Therefore, the approximation algorithm of Theorem 3.8 will indeed find O(k log k)-size balanced vertex separator when the above algorithm considers K = ∅. Suppose this is not the case, and let C be a largest connected component of G − X0 . By Lemma 3.7, there is a balanced vertex separator K0 of C which is a biclique. Let K be a maximal biclique in G with K0 ⊆ K. Since each connected component of G − X0 − K0 , and thus of G − X0 − K, contains at most 32 |C| ≤ 23 n vertices, X0 ∪ K is a balanced vertex separator of G. Let C 0 be any largest connected component of G−K. If C 0 contains at most 2 0 3 n vertices, then the above algorithm will set X := ∅. If not, observe that (X0 \ K) ∩ C 0 is a balanced vertex separator of C whose size is at most k. Hence, the above √ algorithm applies the approximation algorithm of Theorem 3.8 to C 0 , and finds O(k log k)-size balanced vertex separator X 0 of C 0 . Notice that each connected component of G − K − X 0 has size at most max{ 31 n, 23 |C 0 |} ≤ 23 n. This completes the proof.  For an instance (G, k) such that G does not contain any small DH obstructions, let K1 ] X1 be a balanced vertex separator obtained by applying Lemma 3.9 to a connected component of G that is not distance-hereditary. Notice that K1 ] X1 is not necessarily a DH-modulator and there may be a connected component of G − (K1 ] X1 ) which is not distance-hereditary. At i-th recursive step, we apply Lemma 3.9 to a connected component S Gi of G − j<i (Kj ] Xj ) which is not distance-hereditary and obtain a balanced vertex separator Ki ]Xi of Gi . If the algorithm of Lemma 3.9 reports that (Gi , k) is a No-instance for some i, then indeed (G, k) is a No-instance. Otherwise, we obtain a decomposition V (G) = D ] K` ] · · · K1 ] X` ] · · · X1 , 12 EUN JUNG KIM AND O-JOUNG KWON where √ G[D] is distance-hereditary, each Ki is a biclique or an empty set, and |Xi | = O(k log k). The recursive applications of Lemma 3.9 can be represented as a collection of branching trees T , where each internal node corresponds to the initial connected component (that are not distance-hereditary) to Lemma 3.9 and its children correspond to the connected components obtained after removing a balanced separator. Suppose that (G, k) is a Yesinstance and let S be a size-k modulator of G. Observe that each connected component corresponding to an internal node of T contains at least one vertex of S. Since the maximum length of a root-to-leaf path in T is O(log n), any vertex of G (and thus, S) appears in at most O(log n) connected components represented as the nodes of T . It follows that the number S of internal nodes of T√is at most O(k log n), and thus ` = O(k log n). This implies i≤` Xi has at most O(k 2 log k log n) vertices. We add them to a DH-modulator S under construction and remove from G. We summarize the result of this subsection. Proposition 3.10. Let (G, k) be an instance to DH Vertex Deletion such that G contains no small DH obstructions. There is a polynomial-time algorithm which, given such (G, k), either computes a decomposition V (G) = D ] K` ] · · · K1 ] X √ such that G[D] is distance-hereditary, each Ki is a biclique, |X| = O(k 2 log k log n) and ` = O(k log n), or correctly reports that (G, k) is a No-instance. 3.3. Handling a controlled instance. A graph G is called a controlled graph with a partition (D, K) if G contains no small DH obstructions and V (G) is partitioned into D ] K such that G[D] is distance-hereditary and K is a biclique. We fix such a partition D ] K for a given controlled instance under consideration. Also we fix a bipartition A ] B for the given biclique K such that ab ∈ E(G) for every a ∈ A and b ∈ B. In this part, it is important that both A and B are non-empty by the definition of a biclique. The next lemma is useful. Lemma 3.11. Let G be a controlled graph with a partition (D, K). For an induced cycle H of length at least 7, let ` be the number of connected components in G[V (H) ∩ K]. Then the followings hold. (a) If ` = 1, then both G[V (H) ∩ K] and H − K are paths, and |V (H) ∩ K| ≤ 3. (b) If ` ≥ 2, there exists a subpath P of H such that P is a K-path, and the length of P is at least 3. Proof. If ` = 1, clearly both G[V (H) ∩ K] and H − K are (induced) paths. Suppose |V (H) ∩ K| ≥ 4, and note that V (H) ∩ K are contained in either A or B, say A. Then G[(V (H) ∩ K) ∪ {b}] induces a gem for any b ∈ B since G[V (H) ∩ K] is an induced path. This contradicts that G does not contain any small DH obstructions. It follows |V (H) ∩ K| ≤ 3. Suppose ` ≥ 2. There exist two K-paths on H, say P1 and P2 , each containing at least one internal vertex and occuring on H consecutively. (Recall that an S-path is a path whose end vertices are in S and all of whose internal vertices lie outside S.) We note that the end vertices of both P1 and P2 are contained in either A or B, say A; otherwise H contains a chord. To prove (b), it suffices to show that one of P1 and P2 is of length at least three. Obviously, we have |V (Pi )| ≥ 3 for i = 1, 2. Suppose that |V (P1 )| = |V (P2 )| = 3. A POLYNOMIAL KERNEL FOR DISTANCE-HEREDITARY VERTEX DELETION 13 Let Q be a component of G[V (H) ∩ K] that intersects with both P1 and P2 (possibly Q consists of a single vertex). Pick an arbitrary vertex b ∈ B; such b exists for B 6= ∅. If |V (Q)| = 1, observe that G[V (P1 ) ∪ V (P2 ) ∪ {b}] induces a gem, a house or a domino, a contradiction. If |V (Q)| ≥ 2, then G[V (P1 ) ∪ V (Q) ∪ {b}] contains a gem or a house, a contradiction. This establishes (b).  Lemma 3.12. Let G be a controlled graph with a partition (D, K). If x∗ is a fractional 1 for every vertex v of G, then solution to DH Vertex Deletion for G such that x∗v < 20 0 x defined as ( 0 if v ∈ K x0v = ∗ 2xv if v ∈ D is also a feasible fractional solution. Proof. Consider an arbitrary induced cycle H of length at least 7. We only need to verify that x0 (H) ≥ 1. There are two possibilities. Suppose G[V (H) ∩ K] contains exactly one connected component. By Lemma 3.11, we P 1 < 12 , and thus have |V (H) ∩ K| ≤ 3. By assumption, we have v∈V (H)∩K x∗v < 3 · 20 P 1 ∗ v∈V (H)∩D xv ≥ 2 . It follows that X X X x0v = x0v = 2x∗v ≥ 1. v∈V (H) v∈V (H)∩D v∈V (H)∩D If G[V (H)∩K] contains at least two connected components, by Lemma 3.11, H contains a K-path P of length at least 3 as a subpath. Recall that V (H) ∩ K are contained in either A or B, say A. Hence, for any b ∈ B, G[{b} ∪ V (P )] contains an induced cycle H 0 of length at least 7 by Lemma 2.2. Note that G[V (H 0 ) ∩ K] has exactly one connected component and thus x0 (H 0 ) ≥ 1. Since x0b = 0, we have X X X x0v ≥ x0v ≥ x0v ≥ 1.  v∈V (H) v∈V (P ) v∈V (H 0 ) We mention that the feasible fractional solution x0 obtained as in Lemma 3.12 meets 1 ≤ 2|x∗ | and for every vertex v of G, we have x0v < 10 . An instance of Vertex Multicut consists of an undirected graph G and a set T of (unordered) vertex pairs of G. The goal is to find a minimum-size set X ⊆ V (G) that hits every path from s to t for every (s, t) ∈ T . Notice that we are allowed to delete a terminal. An LP formulation of (G, T ) of Vertex Multicut is the same as the above LP of DH Vertex Deletion, except that we replace the constraints on induced cycles of length at least 7 by x(P ) ≥ 1 |x0 | for every (s, t)-path P with (s, t) ∈ T . The following result from [18] is originally stated for Directed Multicut, where we want to find a minimum set of arcs to hit all directed (s, t)-path for every (ordered) terminal pairs. Using standard reductions, one can reduce the undirected version of Vertex Multicut to Directed Vertex Multicut, which again can be reduced to Directed Multicut. Moreover, these reductions preserve the objective values of both the integral solutions and feasible fractional solutions. 14 EUN JUNG KIM AND O-JOUNG KWON Theorem 3.13 (Gupta [18]). Let x0 be a feasible fractional solution to a Vertex Multicut instance (G, T ). There exists a constant c such that, in polynomial time, one can find an integral solution to Vertex Multicut of size at most c · |x0 |2 . Lemma 3.14. Let G be a controlled graph with a partition (D, K) and let x0 be a feasible 1 fractional solution to DH Vertex Deletion such that x0v < 10 for all v ∈ D and x0v = 0 for all v ∈ K. There is a polynomial-time algorithm which, given such (G, k) and x0 , returns a DH-modulator X of size O(|x0 |2 ). Proof. We construct an instance (G[D], T ) of Vertex Multicut with terminal pairs T := {(s, t) ⊆ D × D : distG[D],x0 (s, t) ≥ 1}, where distG[D],x0 (s, t) is the minimum x0 (P ) over all (s, t)-paths P . Notice that for every terminal pair (s, t) ∈ T , and for every (s, t)-path P in G[D], we have x0 (P ) ≥ distG[D],x0 (s, t) ≥ 1, meaning that x0 is a feasible fractional solution to Vertex Multicut for the instance (G[D], T ). By Theorem 3.13, we can obtain a vertex set X ⊆ D of size O(|x0 |2 ) such that G[D \ X] contains no (s, t)-path for every terminal pair (s, t) ∈ T in polynomial time. It is sufficient to show that G − X is distance-hereditary. For the sake of contradiction, suppose G − X contains an induced cycle H of length at least 7, and we specifically choose H so as to minimize the number of connected components in G[V (H) ∩ K] Claim 1. G[V (H) ∩ K] has exactly one connected component and |V (H) ∩ K| ≤ 3. Proof of the Claim: Suppose G[V (H) ∩ K] has at least two connected components. Observe that V (H) ∩ K is entirely contained either in A or B, say A. By Lemma 3.11, there exists a subpath P of H that is a K-path and having length at least 3. Choose any vertex b ∈ B and observe that G[V (P )∪{b}] contains a DH obstruction H 0 by Lemma 2.2. Especially, H 0 must be an induced cycle of length at least 7 since G does not contain any small DH obstructions. For B ∩ X = ∅, H 0 is an induced cycle in G − X having strictly less connected components in G[V (H 0 ) ∩ K], contradicting the choice of H. This proves the first part of the statement. The second part follows from Lemma 3.11. ♦ By Claim 1, H − K is an induced path P contained in a connected component of G[D]. Let s and t be the end vertices of P and notice that (s, t) ∈ / T since P contains no vertex of X. Hence, G[D] contains an induced (s, t)-path W such that x0 (W ) < 1. Since x0 is a feasible fractional solution to DH Vertex Deletion, we have x0 (P ) ≥ x0 (H) ≥ 1. 1 Therefore, P contains at least 11 vertices since x0v < 10 for every v ∈ D and x0v = 0 for every v ∈ K. Since G[D] is distance-hereditary and W is induced, we have |V (W )| = |V (P )| ≥ 11. Let w1 (= s), w1 , . . . , wp (= t) be the vertices of W in the order of their occurrence on W where p ≥ 11. Now we argue that G[V (W ) ∪ (V (H) ∩ K)] contains a DH obstruction. Claim 2. G[V (W ) ∪ (V (H) ∩ K)] contains an induced cycle of length at least 7. Proof of the Claim: If |V (H) ∩ K| = 1, this follows from Lemma 2.2. So, we may assume that 2 ≤ |V (H) ∩ K| ≤ 3. Let v1 , v2 be vertices of V (H) ∩ K that are adjacent with s = w1 and t = wp , respectively. A POLYNOMIAL KERNEL FOR DISTANCE-HEREDITARY VERTEX DELETION 15 If v1 is adjacent with any of wj with j ≥ 4, then Lemma 2.2 applies and we have a DH obstruction. Such an obstruction can only be an induced cycle of length at least 7 as we assume that G does not contain a small DH obstruction. Hence, we may assume that v1 is not adjacent with any of w4 , . . . , wp . By a symmetric argument, we may assume that v2 is not adjacent with any of w1 , . . . , wp−3 . Let Q be a shortest path between v1 and v2 such that the set of internal vertices of Q is non-empty and contained {w1 , . . . , wp }. Such Q exists since v1 and v2 are adjacent with w1 and wp , respectively. By the assumption that v1 (respectively, v2 ) is not adjacent with wj for 4 ≤ j ≤ p (respectively, 1 ≤ j ≤ p − 3), the length of Q clearly exceeds 6. If v1 and v2 are the only vertices of V (H) ∩ K, then v1 v2 ∈ E(G) and observe that G[{v1 , v2 } ∪ V (Q)] forms an induced cycle of length at least 7. If there is another vertex in V (H) ∩ K, observe that the remaining vertex, say v3 , is adjacent to v1 and v2 . By Lemma 2.2, there exists a DH obstruction in G[{v1 , v2 , v3 } ∪ V (Q)], which can only be an induced cycle of length at least 7. ♦ Let H̃ be such an induced cycle of length at least 7 as stated in Claim 2. That V (H̃) ⊆ V (W ) ∪ (V (H) ∩ K) and x0 (V (H) ∩ K) = 0 implies x0 (H̃) ≤ x0 (W ) < 1. This contradicts the assumption that x0 is a feasible fractional solution to DH Vertex Deletion. This concludes the proof that G − X is distance-hereditary.  One can easily obtain the main result of this subsection. Proposition 3.15. Let G be a controlled graph with a partition (D, K) and x∗ be a feasible 1 for every v ∈ V (G). fractional solution to DH Vertex Deletion such that x∗v < 20 ∗ There is a polynomial-time algorithm which, given such G and x , finds a DH-modulator X of size at most O(|x∗ |2 ). Proof. By Lemma 3.12, we can obtain a feasible fractional solution x0 to DH Vertex 1 for every v ∈ D and |x0 | ≤ 2|x∗ |. Deletion such that x0v = 0 for every v ∈ K, x0v < 10 Such x0 meets the condition of Lemma 3.14, and we can obtain a DH-modulator X of G such that |X| = O(|x0 |2 ) = O(|x∗ |2 ) in polynomial time.  3.4. Proof of Theorem 3.1. We first present the proof of Proposition 3.2. Let (G, k) be an instance of DH Vertex Deletion such that G does not contain any small DH obstructions. Let x∗ be an optimal fractional solution to DH Vertex Deletion for G. We may assume that |x∗ | ≤ k, otherwise we immediately report that (G, k) is a No1 instance. Let X̃ be the set of all vertices v such that x∗v ≥ 20 . Observe that |X̃| ≤ 20k 1 ∗ ∗ since otherwise, |x | ≥ 20 · |X̃| > k, a contradiction. Also x restricted to V (G) \ X̃ is a 1 fractional feasible solution to DH Vertex Deletion for G − X̃ such that x∗v < 20 for every v. S We compute a decomposition V (G − X̃) = D ] `i=1 Ki ] X as in Proposition 3.10, √ or correctly report (G, k) as a No-instance. Recall that ` = O(k log n) and |X| = O(k 2 log k· S log n). Note that V (G − (X̃ ∪ X)) = D ] `i=1 Ki . From i = 1 up to `, we want to obtain a DH-modulator Si of Gi , where G1 := G[D ∪ K1 ] and for i = 2, . . . , `, Gi is the subgraph of G induced by (V (Gi−1 ) \ Si−1 ) ∪ Ki . Notice that for every i = 1, . . . , ` − 1, if Gi − Si is distance-hereditary, then Gi+1 is a controlled graph with a partition (V (Gi )\Si , Ki+1 ). For i = 1, clearly G1 is a controlled graph. Hence, we can inductively apply the algorithm of Proposition 3.15 and obtain a DH-modulator Si of size at most O(|x∗ |2 ) of Gi . Especially, 16 EUN JUNG KIM AND O-JOUNG KWON G` − S` is distance-hereditary, implying that the set defined as S := X̃ ∪ X ∪ ` [ Si i=1 |x∗ | is a DH-modulator of G. From ≤ k, we have |Si | = O(k 2 ). It follows that |S| = 3 O(k · log n). Proposition 3.2 immediately yields the proof of Theorem 3.1, which we summarize below. Proof of Theorem 3.1. Let P be a maximal collection of vertex-disjoint copies of small DH obstructions in G. If P contains at least k + 1 copies, then clearly (G, k) is a No-instance to DH Vertex Deletion. Otherwise, let V (P) be the vertex set of the copies in P and notice that |V (P)| ≤ 6k. Notice that G − V (P) contains no small DH obstruction, and thus we can apply the algorithm A of Propositioin 3.2. If A reports that (G − V (P), k) is a No-instance, then clearly (G, k) is a No-instance as well. Otherwise, let S be a DHmodulator of G − V (P) whose size is O(k 3 · log n). It remains to observe that S ∪ V (P) is a DH-modulator of G whose size is O(k 3 · log n).  4. Good Modulator In the previous section, we presented a polynomial-time algorithm, given an instance (G, k) which outputs a DH-modulator of size O(k 3 · log n) whenever (G, k) is a Yesinstance. In this section, we shall see how to obtain a good DH-modulator. In order to obtain a good DH-modulator, we need to find a small-sized hitting set that intersects every DH obstruction having exactly one vertex in S. This task is easy for a small DH obstruction, but not straightforward for the induced cycles of length at least 5. We first present a tool to efficiently handle the latter case. Proposition 4.1. Let G be a graph without any small DH obstruction, v be a vertex of G such that G − v is distance-hereditary and k be a positive integer. In polynomial time, one can either (1) find a set X ⊆ V (G) \ {v} of size at most O(k 2 ) such that G − X contains no induced cycle of length at least 5 traversing v, or (2) correctly reports that any DH-modulator of size at most k must contain v. Proof. Consider an instance (G − v, T ) of Vertex Multicut where T := {(s, t) : s, t ∈ NG (v), distG−v (s, t) ≥ 3}. First, we claim that X ⊆ V (G) \ {v} hits all induced cycles of G of length at least 5 if and only if X is a vertex multicut for (G − v, T ). Suppose X is a vertex multicut for (G − v, T ) and H is an induced cycle of length at least 5 in G − X. Since G − v is distance-hereditary, v is a vertex of H and H − v is a path of length at least 3 between, say, s and t. This means distG−v (s, t) ≥ 3 because G − v is distance-hereditary and thus (s, t) ∈ T , contradicting the assumption that X hits all paths between every terminal pair in T . Conversely, suppose X ⊆ V (G) \ {v} hits all induced cycles of length at least 5 and there is an (s, t)-path P in (G − v) − X for some (s, t) ∈ T . Note that P is of length at least 3 and thus by Lemma 2.2, G[{v} ∪ V (P )] contains a DH obstruction H. By the assumption that G does not contain a small DH obstruction, H is an induced cycle of length at least 7 in G − X, a contradiction. A POLYNOMIAL KERNEL FOR DISTANCE-HEREDITARY VERTEX DELETION 17 Let x∗ be an optimal fractional solution to Vertex Multicut, which can be efficiently found using the ellipsoid method and an algorithm for the (weighted) shortest path problem as a separation oracle. If |x∗ | ≤ k, then we can construct a multicut X ⊆ V (G) \ {v} of size O(|x∗ |2 ) = O(k 2 ) using the approximation algorithm of Theorem 3.13. By the previous claim, we know that X hits all induced cycles of G of length at least 5 (which must traverse v). If |x∗ | > k, then any integral solution for (G − v, T ) is larger than k. By the previous claim, any set X ⊆ V (G) \ {v} hitting all induced cycles of G of length at least 5 must be larger than k. It follows that any DH-modulator of size at most k must contain v, completing the proof.  The following theorem states that a good DH-modulator of size O(k 5 · log n) can be constructed efficiently. Theorem 4.2. There is a polynomial-time algorithm which, given a graph G and a positive integer k, either (1) returns an equivalent instance (G0 , k 0 ) with a good DH-modulator S 0 ⊆ V (G0 ) of size O(k 5 · log n), or (2) correctly reports that (G, k) is a No-instance to Distance-hereditary Vertex Deletion. Proof. We first apply the algorithm of Theorem 3.1. If this algorithm reports that (G, k) is a No-instance, then we are done. Hence, we assume that a DH-modulator S of G containing at most O(k 3 · log n) vertices is returned. Let U := ∅, and for each v ∈ S, let Hv := G[(V (G) \ S) ∪ {v}]. For each v ∈ S, we do the following. First, find either k + 1 small DH obstructions in Hv whose pairwise intersection is v, or a vertex set Tv of V (G) \ S such that |Tv | ≤ 5k and Hv − Tv has no small DH obstructions. It can be done in polynomial time by going through all 5-size subsets of V (G) \ S. In the former case, we add v to U . Otherwise, we obtain a vertex set Tv in the second statement. Assume we obtained the vertex set Tv . Since Hv − Tv has no small DH obstructions, every DH obstruction in Hv is an induced cycle of length at least 7. We apply the algorithm of Proposition 4.1 to Hv −Tv and v, and it returns either a vertex set Xv ⊆ V (Hv −Tv )\{v} of size O(k 2 ) such that Hv − (Tv ∪ Xv ) has no DH obstructions, or correctly reports that any DH-modulator of size at most k must contain v. In the latter case, we add v to U . Otherwise, we obtain such a vertex set Xv . This finishes the algorithm. S We claim that (G − U, k − |U |) is an instance equivalent to (G, k) and S ∪ ( v∈S\U (Tv ∪ Xv )) is a good DH-modulator for G − U . It is easy to see that if (G − U, k − |U |) a Yesinstance, then (G, k) is a Yes-instance. Suppose G has a vertex set T such that |T | ≤ k and G − T is distance-hereditary. Let v ∈ U . Since v ∈ U , by the algorithm as above, either there are k + 1 pairwise small DH obstructions in Hv whose pairwise intersection is v, or any DH-modulator of size at most k must contain v. Thus, T contains v, and it implies that U ⊆ TS. Therefore, T \ U is a solution of (G − U, k − |U |). Let S 0 := S ∪ ( v∈S\U (Tv ∪ Xv )). It remains to see that S 0 is a good DH-modulator for G − U . Clearly S 0 is a DH-modulator. For contradiction, suppose that F is a DH obstruction of S G−U and that V (F )∩S 0 = {w}. Since S is a DH-modulator of G, w cannot be a vertex of v∈S\U (Tv ∪ Xv ), and thus we have w ∈ S and F is an induced subgraph of Hw − (Tw ∪ Xw ). However, Hw − (Tw ∪ Xw ) has no DH obstruction, contradiction. This completes the proof.  18 EUN JUNG KIM AND O-JOUNG KWON We remark that given a graph G and a good DH-modulator removing a vertex v in V (G) \ S does not create a new DH obstruction. Hence, S remains a good DH-modulator in the graph G − v. 5. Twin Reduction Rule In a distance-hereditary graph, there may be a large set of pairwise twins. We introduce a reduction rule that bounds the size of a set of pairwise twins in G−S by O(k 2 |S|3 ), where S is a DH-modulator. In the FPT algorithm obtained by Eiben, Ganian, and Kwon [10], there is a similar rule which reduces the size of a twin set outside of a DH-modulator, however, under the assumption that the given instance has no small DH obstructions. For our kernelization algorithm, we cannot assume that the given instance has no small DH obstructions. Therefore, we need to analyze more carefully. The underlying observation is that it suffices to keep up to k + 1 vertices that are pairwise twins with respect to each subset of S of small size. For a subset S 0 ⊆ S, two vertices u and v in V (G) \ S are S 0 -twins if u and v have the same neighbors in S 0 . It is not difficult to get an upper bound O(k|S|5 ), by considering all subsets S 0 of S of size min{|S|, 5} and marking up to k + 1 S 0 -twins. To get a better bound, we proceed as follows. Reduction Rule 1. Let W be a set of pairwise twins in G − S, and let m := min{|S|, 3}. (1) Over all subsets S 0 ⊆ S of size m, we mark up to k + 1 pairwise S 0 -twins in W that are unmarked yet. (2) When |S| ≥ 4, over all subsets S 0 ⊆ S of size 4, if there is an unmarked vertex v of W such that G[S 0 ∪ {v}] is isomorphic to the house or the gem, then we mark up to k + 1 previously unmarked vertices in W including v that are pairwise S 0 -twins. (3) If there is an unmarked vertex v of W after finishing the marking procedure, we remove v from G. Lemma 5.1. Reduction Rule 1 is safe Proof. We recall that m := min{|S|, 3}. Let W be a set of pairwise twins in G − S, and suppose there is an unmarked vertex in W . We show that (G, k) is a Yes-instance if and only if (G − v, k) is a Yes-instance. The forward direction is clear. Suppose that G − v has a vertex set T with |T | ≤ k such that (G − v) − T is distance-hereditary. We claim that G − T is also distance-hereditary. For contradiction, suppose G − T contains a DH obstruction F . Clearly, v ∈ V (F ). In case when F − v is an induced path, let w, z be the end vertices of the path, and choose a set S 0 ⊆ S of size m containing {w, z} ∩ S (possibly, an empty set). Since v is an unmarked vertex in Reduction Rule 1, there are v1 , . . . , vk+1 ∈ W \ {v} where v1 , . . . , vk+1 , v are pairwise S 0 -twins. Note that V (F ) ∩ {v1 , . . . , vk+1 } = ∅ since no other vertex in F is adjacent to both w and z. Thus, there exists v 0 ∈ {v1 , . . . , vk+1 } \ T such that G[V (F ) \ {v} ∪ {v 0 }] is a DH obstruction in (G − v) − T , a contradiction. We may assume F − v is not an induced path, and in particular F is not an induced cycle. Suppose |V (F ) ∩ S| ≤ 3. Then there exists a set S 0 ⊆ S of size m such that V (F ) ∩ S ⊆ S 0 . Since v remains unmarked in the application of Reduction Rule 1, there are v1 , . . . , vk+1 ∈ W \ {v} where v1 , . . . , vk+1 , v are pairwise S 0 -twins. Note that V (F ) ∩ {v1 , . . . , vk+1 } = ∅ since F contains no twins. Thus, there exists v 0 ∈ {v1 , . . . , vk+1 } \ T such that G[V (F ) \ {v} ∪ {v 0 }] is a DH obstruction in (G − v) − T , a contradiction. A POLYNOMIAL KERNEL FOR DISTANCE-HEREDITARY VERTEX DELETION 19 Now we assume |V (F ) ∩ S| ≥ 4. There are two possibilities. Case 1. F is isomorphic to either the house or the gem. Since |V (F ) ∩ S| ≥ 4, we have V (F ) \ {v} ⊆ S. By Step (2) of Reduction Rule 1, there are v1 , . . . , vk+1 ∈ W \ {v} where v1 , . . . , vk+1 , v are pairwise (V (F ) ∩ S)-twins. Thus, there exists v 0 ∈ {v1 , . . . , vk+1 } \ T such that G[V (F ) \ {v} ∪ {v 0 }] is a DH obstruction in (G − v) − T , contradiction. Case 2. F is isomorphic to the domino. Since F − v is not an induced path, v is a vertex of degree 2 in F . Let v 0 , w be the neighbors of v having degree 2 and degree 3 in F , respectively. Let w0 be the vertex of degree 3 in F other than w. Let z be the vertex in NF (w) \ {v, w0 } and let z 0 be the vertex in NF (w0 ) \ {v 0 , w}. Now, we take a subset S 0 of S of size 3 containing S ∩ {v 0 , w, z 0 } (possibly, an empty set). Since v is an unmarked vertex in Reduction Rule 1, there are v1 , . . . , vk+1 ∈ W \ {v} where v1 , . . . , vk+1 , v are pairwise S 0 -twins. Note that V (F ) ∩ {v1 , . . . , vk+1 } = ∅ since no other vertex in F is adjacent to both v 0 , w and not adjacent to z 0 . Thus, there exists a vertex v 00 ∈ {v1 , . . . , vk+1 } \ T . If v 00 is adjacent to z, then v 0 w0 wz is an induced path of length 3 and v 00 is adjacent to its end vertices. It follows that G[{v 00 , v 0 , w0 , w, z}] contains a DH obstruction by Lemma 2.2, a contradiction to the assumption that (G − v) − T is distance-hereditary. Suppose that v 00 is not adjacent to z. If v 00 is adjacent to w0 , then G[{v 00 , w, w0 , z, z 0 }] is isomorphic to the house, and otherwise, G[{v 00 , v 0 , w, w0 , z, z 0 }] is isomorphic to the domino. This contradicts the assumption that (G − v) − T is distance-hereditary. Therefore, G − T is distance-hereditary, which completes the proof.  We can apply Reduction Rule 1 exhaustively in polynomial time by considering all twin sets of G − S, and for each twin set going through all subsets S 0 of S of size min(|S|, 4). We observe that the size of a twin set W after applying Reduction Rule 1 is bounded by a polynomial function in k and |S|. Lemma 5.2. Let S be a DH-modulator of G, and W be a set of pairwise twins in G − S. If (G, k) is irreducible with respect to Reduction Rule 1, then we have |W | = O(k 2 |S|3 ) or (G, k) is a No-instance. Proof. Suppose that (G, k) is a Yes-instance. It suffices to prove that |W | satisfies the  0 claimed bound. First assume that |S| ≥ 4. There are at most |S| 3 different choices of S 0 3 in Step (1), and for each S we mark up to 2 (k + 1) vertices of W . Consider an auxiliary hypergraph H on the vertex set S. A size-4 subset S 0 of S forms a hyperedge of H if and only if S 0 is used to mark some vertex of W in Step (2). Observe that if there exist k + 1 vertex-disjoint hyperedges of H, then there are k + 1 vertex-disjoint copies of a house or a gem. As we assume that (G, k) is a Yes-instance, a maximum packing of hyperedges has size at most k. Let C be the vertices of S that are contained in a maximal packing of hyperedges and notice that |C| ≤ 4k. Since any hyperedge e of H intersects with C, the following count on the maximum number of hyperedges is derived:            4k 4k |S| 4k |S| 4k |S| + + + . 4 3 1 2 2 1 3 20 EUN JUNG KIM AND O-JOUNG KWON For each hyperedge S 0 of H, at most 24 different sets of pairwise S 0 -twins, from which we mark up to k + 1 vertices. It follows that              |S| 4k 4k |S| 4k |S| 4k |S| 3 4 W ≤ 2 (k + 1) + 2 (k + 1) + + + . 3 4 3 1 2 2 1 3 Assume that |S| ≤ 3. Then we mark up to 2|S| (k + 1) ≤ 8(k + 1) vertices of W . Thus, if |W | > 8(k + 1), then the set W can be reduced further by removing a vertex. The claimed bound follows.  6. Bounding the number of non-trivial connected components of G − S We provide a reduction rule that that bounds the number of connected components of G − S each having at least 2 vertices, when S is a good DH-modulator. Let (G, k) be an instance, and let S be a good DH-modulator. For each pair of v ∈ S and a connected component C of G − S, let N (v, C) := NG (v) ∩ V (C). Note that for a non-trivial connected component C of G − S, (V (C), V (G) \ V (C)) is not a split if and only if there exist v, w ∈ S such that N (v, C) 6= ∅, N (w, C) 6= ∅ and N (v, C) 6= N (w, C). We say that a pair (v, w) of vertices in S is a witnessing pair for a connected component C of G − S if N (v, C) 6= ∅, N (w, C) 6= ∅ and N (v, C) 6= N (w, C). The following lemma is essential. Lemma 6.1. Let (G, k) be an instance and S be a good DH-modulator. If C1 , C2 are two connected components of G − S and v, w ∈ S such that (v, w) is a witnessing pair for both C1 and C2 , then G[{v, w} ∪ V (C1 ) ∪ V (C2 )] contains a DH obstruction. Proof. Since N (v, C1 ) 6= ∅, N (w, C1 ) 6= ∅, and N (v, C1 ) 6= N (w, C1 ), there exists a vertex z ∈ V (C1 ) where z is adjacent to only one of v and w. Without loss of generality, we may assume that z is adjacent to v. We choose a neighbor z 0 of v in C2 . Clearly, there is a path from z to z 0 in G[{v, w} ∪ V (C1 ) ∪ V (C2 )] − v because w has a neighbor on each of C1 and C2 . Let P be a shortest path from z to z 0 in G[{v, w} ∪ V (C1 ) ∪ V (C2 )] − v. Note that P has length at least 3, as w and z are not adjacent. Thus, by Lemma 2.2, G[{v, w} ∪ V (C1 ) ∪ V (C2 )] contains a DH obstruction.  Lemma 6.1 observes that if a pair of vertices in S witnesses at least k + 2 non-trivial connected components in G − S, at least one of the pair must be contained in any sizek DH-modulator. Furthermore, keeping exactly k + 2 non-trivial connected components would suffice to impose this restriction. This suggests the following reduction rule. Reduction Rule 2. For each pair of vertices v and w in S, we mark up to k + 2 non-trivial (previously unmarked) connected components C of G − S such that (v, w) is a witnessing pair for C. If there is an unmarked non-trivial connected component C after the marking procedure, then we remove all edges in C. The following is useful to see the safeness of our reduction rule. Lemma 6.2. Let G be a graph, and let (A, B) be a split of G. Then for every DH obstruction H of G, either |V (H) ∩ A| ≤ 1 or |V (H) ∩ B| ≤ 1. Proof. Suppose for contradiction that |V (H) ∩ A| ≥ 2 and |V (H) ∩ B| ≥ 2. Since H is connected, (V (H) ∩ A, V (H) ∩ B) is a split of H. This is contradiction because every DH obstruction does not have a split.  A POLYNOMIAL KERNEL FOR DISTANCE-HEREDITARY VERTEX DELETION 21 Lemma 6.3. Reduction Rule 2 is safe. Moreover, S remains a good DH-modulator after applying the reduction rule. Proof. Suppose there is an unmarked non-trivial connected component C of G − S after the marking procedure. Let G0 be the graph obtained by removing all edges in C. We claim that (G, k) is a Yes-instance if and only if (G0 , k) is a Yes-instance. We first prove the converse direction. Suppose T is a vertex set of G0 such that |T | ≤ k and G0 − T is distance-hereditary. We claim that (V (C) \ T, V (G) \ V (C) \ T ) is a split of G − T . Suppose (V (C) \ T, V (G) \ V (C) \ T ) is not a split of G − T . Thus, there are v, w ∈ S \ T , where NG (v) ∩ (V (C) \ T ) 6= ∅, NG (w) ∩ (V (C) \ T ) 6= ∅, and NG (v) ∩ (V (C) \ T ) 6= NG (w) ∩ (V (C) \ T ). It further implies that (v, w) is a witnessing pair for C in G. Since C is unmarked, there are k + 2 non-trivial connected components C1 , . . . , Ck+2 of G − S other than C where (v, w) is a witness pair for each Ci in G. From |T | ≤ k, there are two components Ci , Cj ∈ {C1 , . . . , Ck+2 } that do not contain a vertex of T . By Lemma 6.1, the graph (G0 − T )[{v, w} ∪ V (C1 ) ∪ V (C2 )] contains a DH obstruction. It contradicts to the assumption that G0 − T has no DH obstructions. Thus, (V (C) \ T, V (G) \ V (C) \ T ) is a split of G − T as claimed. Suppose for contradiction that G − T contains a DH obstruction H. (V (C) \ T, V (G) \ V (C) \ T ) is a split of G − T , we have either |V (H) ∩ V (C)| ≤ 1 or |V (H) \ V (C)| ≤ 1 by Lemma 6.2. As S is a good DH-modulator, the only possibility is |V (H) ∩ V (C)| ≤ 1. This means that H is also an induced subgraph of G0 − T , a contradiction. Therefore, T is also a solution to (G, k). For the forward direction, suppose that T is a vertex set of G such that |T | ≤ k and G − T is distance-hereditary. By a similar argument as above, one can show that (V (C) \ T, V (G0 ) \ V (C) \ T ) is a split in G0 − T . Hence, any DH obstruction H in G0 − T contains at most one vertex of C, and thus H is also an induced subgraph of G − T , which contradicts to the assumption that G − T is distance-hereditary. We conclude that (G0 , k) is a Yes-instance if (G, k) is a Yes-instance. To see that S remains a good DH-modulator after applying the reduction rule, suppose that S is not a good DH-modulator after the application of Reduction Rule 2. It is easy to see that S is again a DH-modulator of G0 . Hence, we may assume there is a DH osbtruction F in G0 such that |V (F ) ∩ S| = 1. Such F must contain at least two vertices u, v such that uv ∈ E(G) \ E(G0 ). Notice that the reduction rule ensures that such u, v are adjacent only with the vertices of S. Due to the assumption |V (F ) ∩ S| = 1, u and v are pendant vertices in F , which is not possible for a DH obstruction F . Therefore, S is a good DH-modulator of G0 . This completes the proof.  Now we analyze the bound on the number of non-trivial connected components in G−S after applying Reduction Rule 2. It is not difficult to see that there are at most (k + 2)|S|2 non-trivial connected components in G − S after the reduction. We obtain the following bound, which is better than a naive bound whenever |S| is a polynomial in k of degree at least two. Proposition 6.4. Let (G, k) be an instance and S be a good DH-modulator. If (G, k) is irreducible with respect to Reduction Rule 2, then either the number of non-trivial connected components is at most O(k 2 · |S|) or it is a No-instance. The basic idea is that if there is a collection of k + 1 pairwise disjoint pairs in S, each witnessing at least two non-trivial connected components of G−S, there exist k+1 disjoint 22 EUN JUNG KIM AND O-JOUNG KWON copies of DH obstructions due to Lemma 6.1. Therefore, after removing the vertices in this matching structure, any pair of vertices in the remaining part of S must witness at most one connected component. Then, we use Erdős-Pósa property for cycles and a generalization of Lemma 6.1 to argue that the remaining part of S is sparse, in the sense that the number of connected components witnessed by this part is linear in |S|. Theorem 6.5 (Erdős and Pósa [11]). There exists a constant r such that, given an arbitrary graph G and a positive integer k, either finds k + 1 vertex-disjoint cycles or a vertex set X ⊆ V (G) with |X| ≤ r · k log k hitting all cycles of G. The following is a generalization of Lemma 6.1. Lemma 6.6. Let (G, k) be an instance and S be a good DH-modulator. Suppose that v1 , v2 , . . . , vm is a circular ordering of m(≥ 2) vertices in S and C be a set of non-trivial connected components of G − S such that over all i, the pairs (vi , vi+1 ) witness mutuS ally distinct components of C, where vm+1 = v1 . Then G[{v1 , v2 , . . . , vm } ∪ C∈C V (C)] contains a DH obstruction. Proof. We prove by induction on m. Let C1 , . . . , Cm be mutually distinct components of S C witnessed by (vi , vi+1 ). Let H := G[{v1 , v2 , . . . , vm } ∪ C∈C V (C)]. The statement is equivalent to Lemma 6.1 when m = 2, hence we assume m ≥ 3. We claim that for every i, the neighbors of Ci among {v1 , . . . , vm } are exactly {vi , vi+1 } or there is a DH obstruction in H. Suppose that there exist i and vj ∈ / {vi , vi+1 } such that vj has a neighbor in Ci . If N (vj , Ci ) = N (vi , Ci ), then N (vj , Ci ) 6= N (vi+1 , Ci ), and thus (vj , vi+1 ) is a witnessing pair for Ci . Observe that vi+1 , vi+2 , . . . , vj is a circular ordering (possibly j = i + 2) meeting the condition of the statement, with Ci+1 , . . . , Ci as the connected components witnessed by the consecutive pairs (vi+1 , vi+2 ), . . . , (vj , vi+1 ). If N (vj , Ci ) 6= N (vi , Ci ), the circular ordering vi , vj , . . . , vi−1 , possibly with j = i − 1, meets the condition with Ci , Cj , . . . , Ci−1 witnessed by the pairs (vi , vj ), (vj , vj+1 ), . . . , (vi−1 , vi ). In both cases, we conclude that H contains a DH obstruction by induction hypothesis. Therefore, we may assume that for every i, the neighbors of Ci among {v1 , . . . , vm } are exactly {vi , vi+1 }. Since N (v1 , C1 ) 6= ∅, N (v2 , C1 ) 6= ∅, and N (v1 , C1 ) 6= N (v2 , C1 ), there exists a vertex z ∈ V (C1 ) where z is adjacent to only one of v1 and v2 . By symmetry, we may assume that z is adjacent to v1 . We choose a neighbor z 0 of v1 in Cm . Note that H − v1 is connected. Let P be a shortest path from z to z 0 in H − v1 . Since {v2 , . . . , vm } separates z and z 0 in H − v1 and the only neighbor of C1 in {v2 , . . . , vm } is v2 by the above claim, the path P traverse v2 . From the fact that z is not adjacent with v2 , it follows that P has length at least 3. By Lemma 2.2, G[V (P ) ∪ {v1 }] contains a DH obstruction. This completes the proof.  We are ready to prove Proposition 6.4 Proof of Proposition 6.4. If (G, k) is a No-instance, there is nothing to prove. We assume that (G, k) is a Yes-instance. Let us define an auxiliary multigraph F on the vertex set S such that for every pair v, w ∈ S, the multiplicity of the edge vw equals the number of non-trivial connected components that are marked by the witness of (v, w) in Reduction Rule 2. Recall that each non-trivial connected component of G − S is marked at most once, which implies that the edge set of F can be bijectively mapped to the non-trivial connected components A POLYNOMIAL KERNEL FOR DISTANCE-HEREDITARY VERTEX DELETION 23 of G − S (after removing unmarked components). Therefore, it suffices to obtain a bound on the number of edges in F with the edge multiplicity taken into account. Construct a maximal packing of 2-cycles in F and let S1 ⊆ S be the vertices contained in the packing. By Lemma 6.1, a packing of size k + 1 implies the existence of k + 1 vertex-disjoint DH obstructions. Therefore, |S1 | ≤ 2k. Again, due to the assumption that (G, k) is a Yes-instance, the subgraph F − S1 does not have k + 1 vertex-disjoint cycles: otherwise, G contains k + 1 vertex-disjoint DH obstructions by Lemma 6.6. Theorem 6.5 implies that there exists a vertex set S2 ⊆ V (F ) \ S1 hitting all cycles of F − S1 with |S2 | ≤ r · k log k for some constant r. Now, the number of edges in F is at most |S1 | · |S|(k + 2) + |S2 | · |S \ S1 | + (|S \ S1 \ S2 |) = 2k(k + 2)|S| + r · k log k · |S| + |S| ≤ (7 + r)k 2 · |S|, which establishes the claimed bound.  7. Bounding the size of non-trivial connected components of G − S In this section, we introduce several reduction rules that reduce the number of bags in the canonical split decomposition of a non-trivial connected component of G − S, where S is a good DH-modulator of G. Together with Reduction Rule 1 which shrinks the twin set in each bag, the result of this section bounds the number of vertices of each nontrivial connected component of G − S. In particular, we will prove that if the canonical split decomposition of a non-trivial connected component of G − S contains more than 3|S|(20k + 54) bags, then we can apply some reduction rule. Let D be the canonical split decomposition of a connected component H of G − S. Since S is a good DH-modulator, for each vertex v of S, G[V (H) ∪ {v}] is distancehereditary. In particular, if G[V (H) ∪ {v}] is connected, then we can extend D into a canonical split decomposition of G[V (H) ∪ {v}] using the result by Gioan and Paul [17]. By Theorem 2.6, in time O(|V (G)|) we can uniquely decide either a bag or a marked edge of D that will accommodate v so as to extend the split decomposition D of H into the split decomposition of G[V (H) ∪ {v}]. See Theorem 2.6 for details on how the unique bag (called the partially accessible bag) or marked edge is characterized. The bag or marked edge that accommodations v shall be colored for all v ∈ S, and also we apply a short-range propagation rule on the colored parts. We shall apply reduction rules to shrink uncolored parts. Let f be the injective function from S ∩ NG (V (H)) to the union of the set of all marked edges and the set of all bags such that f (v) is the the partially accessible bag or the marked edge indicated by Theorem 2.6. We can compute this function f in time O(|S| · |V (G)|). A bag or a marked edge in D is S-affected if it is f (v) for some v ∈ S, and S-unaffected otherwise. We may assume that D consists of more than one bag. For two adjacent bags B1 and B2 , we denote by e(B1 , B2 ) the marked edge linking B1 and B2 . 7.1. Reduction Rules to bound the number of leaf bags. We first provide simpler rules. Reduction Rule 3. If v is a vertex of degree at most 1 in G, then remove v. The safeness of Reduction Rule 3 is clear. 24 EUN JUNG KIM AND O-JOUNG KWON B B0 B B0 Figure 4. An illustration of Reduction Rule 4. Reduction Rule 4. Let B be a leaf bag of D and let B 0 be its neighbor bag such that • B, B 0 , and e(B, B 0 ) are S-unaffected, • D − V (B 0 ) has exactly two connected components, and • B 0 is a star bag whose center is adjacent to B. Then remove the unmarked vertices in B 0 . Reduction Rule 4 is illustrated in Figure 4. Lemma 7.1. Reduction Rule 4 is safe. Proof. We claim that there is no DH obstruction containing an unmarked vertex in B 0 . First observe that B is not a star bag whose leaf is adjacent to B 0 because D is a canonical split decomposition. Furthermore, vertices in B are pairwise twins in G, as B is Sunaffected. If G has a DH obstruction H containing an unmarked vertex of B 0 , then H contains at least 2 vertices in B as B, B 0 , and e(B, B 0 ) are S-unaffected. But this is not possible since every DH obstruction does not contain twins. Therefore, we can safely remove the vertices in B 0 .  Reduction Rule 5. Let A ⊆ V (H) be a set of vertices that are pairwise twins in G. Flip the adjacency relation among the vertices of A if the resulting graph has strictly smaller number of bags in D. The safety of Reduction Rule 5 is already observed in [10], which is an immediate consequence of the fact that every DH obstruction contains at most one vertex among pairwise twins. Lemma 7.2. One can apply Reduction Rules 3, 4, and 5 exhaustively in polynomial time. Furthermore, S is a good DH-modulator in the resulting graph G0 . Proof. The statement trivially holds for Reduction Rules 3 and 4. Let A ⊆ V (H) be a set of vertices that are pairwise twins in G. Then A must be contained in a bag of D. Notice that a twin set in G − S is a twin set in G if and only if it is either complete or anti-complete to each vertex of S, which can be tested in polynomial time. Therefore, by skimming through each bag and a twin set contained in it (and modifying the canonical split decomposition accordingly), we can detect a set A to apply Reduction Rule 5 or correctly decide that no such A exists. Each application of Reduction Rules 3, 4, and 5 reduces either the number of vertices in G or the number of bags, and the statement follows. To see the second statement holds, we only need to check that S is a good DH-modulator in G0 obtained by applying Reduction Rule 5 once. This is an immediate consequence of the fact A is a twin set in G0 and no DH obstruction can contain two twin vertices.  Lemma 7.3. Let (G, k) be an instance reduced under Reduction Rules 3, 4, and 5. If a leaf bag B of D is S-unaffected, then A POLYNOMIAL KERNEL FOR DISTANCE-HEREDITARY VERTEX DELETION 25 (i) either B is a complete bag or it is a star bag whose center is marked, and (ii) the unique bag B 0 adjacent with B is a star bag whose center is adjacent with B. Proof. Suppose B is a star bag whose center is unmarked. Since B is S-unaffected, there are no edges between S and the set of leaves of B. Thus, each leaf of B is a leaf of G, contradicting that (G, k) is reduced under Reduction Rule 3. The first statement follows. To prove (ii), first suppose B 0 is a complete bag. Then B cannot be a complete bag since there cannot be two complete bags adjacent in a canonical split decomposition. Hence by (i), B is a star bag whose center is adjacent with B 0 . Since B is S-unaffected, each vertex of S is either complete to the set of unmarked vertices of B, or anti-complete to it. So, the set of unmarked vertices of B is a twin set of G and applying Reduction Rule 5 will recompose the marked edge e(B, B 0 ), strictly reducing the number of bags. This contradicts that (G, k) is reduced under Reduction Rule 5. Therefore, B 0 is a star bag. First assume that a leaf of B 0 is adjacent to B. In that case, B cannot be a star bag whose center is adjacent to B 0 , because D is a canonical split decomposition. Thus, B is a complete bag. Since B is S-unaffected, the set of unmarked vertices of B is a twin set of G, and applying Reduction Rule 5 will lead to recomposing the marked edge e(B, B 0 ), strictly reducing the number of bags. Thus we conclude that the center of B 0 is adjacent to B.  Throughout the rest of the section, we assume that (G, k) is reduced under Reduction Rules 3, 4, and 5. We call that a bag B is a branch bag if D − V (B) contains at least 3 connected components having at least two bags. We color the bags of D with red and blue in the following way. (1) If a bag B is S-affected or incident with an S-affected edge, we color B with red. (2) If a bag B is adjacent to an S-affected leaf bag, we color B with red. (3) If B is a branch bag, then we color B with red. (4) All other bags are colored with blue. Let R be the set of all red bags, and let Q be the set of all blue leaf bags B whose unique neighbor bag is red. We prove the followings. Lemma 7.4. For each bag B, there is at most one blue leaf bag adjacent to B. Proof. Suppose for contradiction that there are a bag B and two blue leaf bags B1 and B2 adjacent to B. Since each Bi is a blue leaf bag, Bi is S-unaffected. Therefore, by Lemma 7.3, B is a star bag whose center is adjacent to Bi for both i = 1, 2, which is impossible.  Lemma 7.5. Let (G, k) be an instance Rules 3, 4, and 5. For S reduced under Reduction 0 0 any connected components D of D − B∈R∪Q V (B), D is adjacent with exactly two red bags in D. Proof. Suppose that D0 is adjacent with exactly one red bag, say L, in D. Notice that D0 consists of at least two bags since otherwise, the single bag in D0 is in Q. Let B be a leaf bag of D0 that is farthest from L in D and B 0 be the unique bag adjacent with B in D0 . Note that B 0 6= L. Since B is S-unaffected, Lemma 7.3 implies that either B is a complete bag or it is a star bag whose center is marked, and B 0 is a star bag whose center is adjacent with B. We observe that D − V (B 0 ) has exactly two connected components; the one consisting of B and another component adjacent with L in D. Indeed, as we chose B as a farthest 26 EUN JUNG KIM AND O-JOUNG KWON leaf bag from L in D, an additional component adjacent with B 0 must consist of a single (leaf) bag. However, this is impossible since B is the only leaf bag of D adjacent with B 0 by Lemma 7.4. Now, B and B 0 satisfy the condition of Reduction Rule 4, contradicting the assumption that (G, k) is reduced under this rule. Suppose that D0 is adjacent with at least three red bags, say R1 , R2 and R3 , in D. Since D0 consists solely of blue bags, it does not contain a branch bag. Hence, at least one of Ri ’s, say R1 , is a leaf bag of D. However, R1 could have been colored red only in (1), that is, R1 is incident with S-affected edge or it is S-affected itself. In both cases, the bag of D0 adjacent with R1 must be colored either by (1) or (2) of the coloring procedure, a contradiction. This completes the proof.  Lemma 7.6. Let (G, k) be an instance reduced under Reduction Rules 3, 4, and 5. Then, the number of red bags in D is at most 3|S|. Proof. An S-affected edge causes at most two bags to be colored red in (1). An S-affected bag B causes at most two bags to be colored red in (2), that is, the bag itself and possibly an adjacent bag if B is a leaf bag. Hence, the number of bags colored in (1)-(2), is at most 2|S|. It remains to prove that the number of branch bags is at most |S|. Let B be the set of branch bags. We create a graph F on the vertex set B such that two bags B1 and B2 in B are adjacent in F if and only if there is a path of bags in D from B1 to B2 that does not contain any other branch bag. Since such a path of bags is unique between any B1 and B2 in D, F is clearly a tree. Let L be a leaf of F . Since D − V (L) contains at least 3 connected components having at least two bags, at least two of these components does not contain any other bag in B. Consider an arbitrary component D0 of D − V (L) that contains at least two bags and does not contain a bag of B. Lemma 7.5 implies that D0 contains a red bag. We argue that D0 contains either an S-affected bag or an S-affected marked edge. Suppose not, and notice that the only red bag in D0 is the one adjacent with L in D. Let us call this bag B. By Lemma 7.5, the connected components of D0 − V (B) must be singletons, consisting of a leaf bag. There are at most one such component by Lemma 7.4 consisting of a leaf bag B 0 . Then we can apply Reduction Rule 4 to B and B 0 , a contradiction. We conclude that D0 contains either an S-affected bag or an S-affected marked edge. Now, every leaf L of F can be associated with two connected components of D − V (L) containing either an S-affected bag or an S-affected marked edge. Notice that the two connected components, as a set of bags of D, associated to the set of all leaves in F are pairwise disjoint. Therefore, the number of leaves of F is at most 21 |S|. It follows that F contains at most |S| vertices, thus the number of red bags colored in (3) is at most |S|. This completes the proof.  S Lemma 7.7. The number of connected components of D − B∈R∪Q V (B) is at most 3|S| and |R ∪ Q| ≤ 6|S|. Proof. Consider a tree F on the vertex set R in which any two red bag is adjacent if and only if there is a path of bags in D containing no red S bag. By Lemma 7.5, there is an injection from the set of connected components of D − B∈R∪Q V (B) to the set of edges of F . Observe that F has at most |R| edges. By Lemma 7.6, we have |R| ≤ 3|S|, which establishes the first claimed bound. Lemma 7.4 implies that |Q| ≤ |R|. The second bound |R ∪ Q| ≤ 6|S| follows immediately.  A POLYNOMIAL KERNEL FOR DISTANCE-HEREDITARY VERTEX DELETION Ba1 B a2 Ba3 Ba4 Ba1 B a2 Ba3 Ba4 27 Figure 5. An illustration of Reduction Rule 6. 7.2. Reducing the length of a sequence of S-unaffected bags. We assume that the instance (G, k) is reduced under Reduction Rules 3, 4, and 5. Let D0 be a connected S component of D − B∈R∪Q V (B). We introduce three reduction rules that contribute to bound the number of bags in D0 . Let us fix the sequence B1 , · · · , Bm of bags of D0 . For 1 ≤ i < j < k ≤ m, a bag Bj is called a (Bi , Bk )-separator bag if the center of Bj is adjacent to neither Bj−1 nor Bj+1 . For a (B1 , Bm )-separator bag B we define • η(B) := {v} if v is the center of B and there is no leaf bag adjacent to B, • η(B) := X if there is a leaf bag B 0 adjacent to B, and X is the set of unmarked vertices in B 0 . Below, we present a rule that gives a bound on the number of (B1 , Bm )-separator bags. We remark that for every bag Bj in D0 with 1 < j < m other than (B1 , Bm )-separator bags, there are no leaf bags having Bj as a neighbor bag: if Bj has a leaf bag as a neighbor, such a leaf bag must be S-affected because of Lemma 7.3. Then Bj is a red bag by the coloring procedure (3), contradicting that Bj is a bag in D0 . Reduction Rule 6. Let Ba1 , Ba2 , Ba3 , Ba4 be (B1 , Bm )-separator bags of D0 such that 1 ≤ a1 < a2 < a3 < a4 ≤ m, for each i ∈ {1, . . . , 3} there are no (Bai , Bai+1 )-separator bags. If there is a bag Bz where a2 < z < a3 , then we remove all unmarked vertices in Bz . Lemma 7.8. Reduction Rule 6 is safe. Proof. Suppose there is a bag Bz where a2 < z < a3 , and let v be an unmarked vertex of Bz . We claim that there is no DH obstruction containing v, which shows that v can be safely removed. Suppose for contradiction that there is a DH obstruction F containing v. Since the set of all unmarked vertices in D0 induces a distance-hereditary graph, F must contain at least one vertex from S. Notice that η(Ba2 ) ∪ η(Ba3 ) is a separator between v and S and since any DH obstruction is 2-connected, F contains at least two vertices of η(Ba2 ) ∪ η(Ba3 ). That each η(Bai ) is a twin set in G while F contains no twins imply that F contains exactly vertex from η(Ba2 ) ∪ η(Ba3 ) respectively. A similar argument shows F contains exactly one vertex from η(Bai ) for each i ∈ {1, 2, 3, 4}. Furthermore, as every vertex in S cannot be adjacent to both Ba1 and Ba4 , we have |F | ≥ 7, and thus F is an induced cycle. For each i ∈ {1, 2, 3, 4}, let wi be the vertex in V (F ) ∩ η(Bi ). If v is contained in a complete bag, then F contains an induced cycle of length 3 together with vertices w2 and w3 , contradiction. We may assume v is contained in a star bag. So, 28 EUN JUNG KIM AND O-JOUNG KWON Ba1 B a2 Ba1 B a2 B a3 B a4 Ba5 B a4 Ba5 Figure 6. An illustration of Reduction Rule 7. v is adjacent to one of w2 and w3 . Since F has no leaves, there is a neighbor v 0 of v in F that is not in {w2 , w3 }. Since v 0 is also contained in a star bag, v 0 is adjacent to one of w2 and w3 that is not adjacent to v. However, this implies that F contains an induced cycle of length 4, contradiction. Therefore, v cannot be contained any DH obstruction, and we can safely remove it.  We can observe that after applying Reduction Rule 6 exhaustively, if Ba1 , Ba2 , . . . , Bat be the sequence of (B1 , Bm )-separator bags where t ≥ 4 and a1 < a2 < · · · < at , then for each i ∈ {2, . . . , t − 2}, ai+1 = ai + 1, that is, there are no bags between Bai and Bai+1 . We describe how we reduce the number of (B1 , Bm )-separator bags. Reduction Rule 7. Let Ba1 , Ba2 , Ba3 , Ba4 , Ba5 be (B1 , Bm )-separator bags of D0 such that 1 ≤ a1 < a2 < · · · < a5 ≤ m, and for each i ∈ {1, . . . , 4}, there are no (Bai , Bai+1 )separator bags. We first remove Ba3 and also remove the leaf bag adjacent to Ba3 if one exists, and link marked vertices of Ba2 and Ba4 in D0 , which were adjacent to Ba3 , by a marked edge. If |η(B2 )| > |η(B3 )| = 1, then we remove the leaf bag adjacent to Ba2 , and if |η(B2 )| > |η(B3 )| ≥ 2, then we remove vertices in η(Ba2 ) except |η(Ba3 )| many vertices. Lemma 7.9. Reduction Rule 7 is safe. Furthermore, in the resulting graph, S is again a good DH-modulator. Proof. Let D00 be the resulting canonical split decomposition, and let G0 be the resulting e as graph. For each i ∈ {1, . . . , 5}, let Ui := η(Bi ). In the decomposition D00 , we define U e := {v} if v is the center of Ba and there is no leaf bag adjacent to Ba , • U 2 2 e := X if there is a leaf bag B adjacent to Ba , and X is the set of unmarked • U 2 vertices in B. e . We prove that (G, k) is a Yes-instance if and only Notice that G − (U2 ∪ U3 ) = G0 − U 0 if (G , k) is a Yes-instance. First suppose that G has a vertex set T such that |T | ≤ k and G − T is distancehereditary. Assume that T contains no vertex in U2 ∪ U3 . We claim that G0 − T is distance-hereditary. Suppose for contradiction that G0 − T contains a DH obstruction e , then F is an induced subgraph of G − T , as F . If F does not contain a vertex in U e . Thus, F contains a vertex in U e , and since U e is a set of pairwise G − (U2 ∪ U3 ) = G0 − U 0 e e . We observe that twins in G , we have |V (F ) ∩ U | = 1. Let v be the vertex in V (F ) ∩ U • F contain at least one vertex from each of U1 , U4 , U5 , A POLYNOMIAL KERNEL FOR DISTANCE-HEREDITARY VERTEX DELETION 29 • the vertices in V (F ) ∩ Ũ and V (F ) ∩ U4 have no neighbors in S, • every vertex in S is not adjacent to both η(B1 ) and η(B5 ). These imply that F is an induced cycle of length at least 6. Thus we can obtain an induced cycle of length at least 7 in G from F by replacing v with a vertex of U2 and a vertex of U3 , contradiction. We conclude that G0 − T is distance-hereditary when T ∩ (U2 ∪ U3 ) = ∅. Hence, we assume T ∩ (U2 ∪ U3 ) 6= ∅. As Ui is a set of pairwise twins in G, if T ∩ Ui 6= ∅, e is a solution to (G0 , k) and we have then Ui ⊆ T . We can observe that (T \ (U2 ∪ U3 )) ∪ U 0 e | ≤ |T | ≤ k. It implies that (G , k) is a Yes-instance. |(T \ (U2 ∪ U3 )) ∪ U For the converse direction, suppose that G0 has a vertex set T 0 such that |T 0 | ≤ k and 0 e = ∅. Suppose G − T 0 has a G − T 0 is distance-hereditary. We first assume that T 0 ∩ U DH obstruction F . We have V (F ) ∩ (U2 ∪ U3 ) 6= ∅, otherwise F is an induced subgraph of G0 − T 0 . As U2 and U3 are twin sets of G, F contains at most one vertex from each of U2 and U3 . Furthermore, F contains exactly one vertex from each of U1 , . . . , U5 , and thus it is an induced cycle of length at least 7. We can obtain an induced cycle of length at least 6 in G0 − T 0 from F by contracting the edge between V (F ) ∩ U2 and V (F ) ∩ U3 , which contradicts to the assumption that G0 − T 0 is distance-hereditary. We conclude that e = ∅. G − T 0 is distance-hereditary in the case when T 0 ∩ U e 6= ∅. As U e is a set of pairwise twins in G0 , we have U e ⊆ T 0. Lastly, suppose T 0 ∩ U 0 e We obtain a set T from T by removing U , and adding Ui with i ∈ {2, 3} where |Ui | = min{|U2 |, |U3 |}. If |U2 | = |U3 |, then we add one of them chosen arbitrarily. Clearly, |T | ≤ |T 0 | ≤ k. We can observe that G − T has no DH obstruction containing a vertex in e has no DH obstructions, we conclude that G − T U2 ∪ U3 . Since G − (U2 ∪ U3 ) = G0 − U is distance-hereditary, as required. This proves that Reduction Rule 7 is safe. We argue that S is again a good DHmodulator in G0 . We need to verify that for every v ∈ S, G0 − S \ {v} has no DH obstructions. Suppose for contradiction that G0 − S \ {v} contains a DH obstruction F e , otherwise, F is also a for some v ∈ S. The obstruction F should contain a vertex in U DH obstruction in G[(V (G) \ S) ∪ {v}]. Observe that F should contain at least one vertex from U1 , U4 , U5 , and thus F is an induced cycle of length at least 6, and the neighbors of v in F are contained in U1 and U4 . Thus we can obtain an induced cycle of length at e with a vertex of U2 and a vertex of U3 in G, least 7 by replacing the vertex in V (F ) ∩ U which implies that G[(V (G) \ S) ∪ {v}] contains a DH obstruction. It contradicts to our assumption that S is a good DH-modulator. We conclude that S is a good DH-modulator in the resulting graph.  In the following reduction rule, we describe how to reduce a sequence of non-(B1 , Bm )separator bags. Reduction Rule 8. Let a be a positive integer such that a ≤ m − (5k + 11), and for each i ∈ {1, . . . , 5k + 10}, Ba+i is not a (B1 , Bm )-separator bag. Among bags in {Ba+i : 1 ≤ i ≤ 5k + 10}, we mark up to k + 1 bags for each types : complete bags, star bags Bj whose centers are adjacent to Bj+1 , and star bags Bj whose centers are adjacent to Bj−1 . Choose a bag Ba+j with j ∈ {1, . . . , 5k +10} that is not marked after finishing the marking procedure, and remove vertices in Ba+j from G. 30 EUN JUNG KIM AND O-JOUNG KWON We observe the every DH obstruction can be turned into an induced path by removing a vertex v. Note that this vertex is not unique; for instance, we can choose any vertex in an induced cycle of length 5. We will use this observation. Lemma 7.10. Reduction Rule 8 is safe. Proof. Suppose there is a bag Ba+j with j ∈ {1, . . . , 5k + 10} that is not marked after finishing the marking procedure in Reduction Rule 8, and let v be an unmarked vertex in Ba+j . We prove that (G, k) is a Yes-instance if and only if (G − v, k) is a Yes-instance. The forward direction is clear. Suppose that G − v has a vertex set T with |T | ≤ k such that (G − v) − T is distance-hereditary and G − T contains a DH obstruction F . Note that v ∈ V (F ). Let b := a + (5k + 11). We partition the vertex set V (G) into four parts. Let U be the set of all unmarked vertices contained in Ba+1 , Ba+2 , . . . , Bb−1 . Since D0 consists of only blue bags, there are exactly two sets N1 and N2 in {NG (x) ∩ U : x ∈ V (G) \ U } that correspond to marked edges e(Ba , Ba+1 ) and e(Bb−1 , Bb ), respectively. We define • Ai := {x ∈ V (G) \ U : NG (x) ∩ U = Ni } for each i ∈ {1, 2}. It is clear that A1 and A2 are disjoint. Let W := V (G) \ (U ∪ A1 ∪ A2 ). We first show some necessary lemmas. Claim 3. If F is an induced cycle of length at least 5, then |V (F ) ∩ U | ≤ 2. Proof of the Claim: Suppose F is an induced cycle of length at least 5, and F contains at least three vertices w1 , w2 , w3 in U . Since each wi is contained in either N1 or N2 , at least two vertices of w1 , w2 , w3 are contained in the same set of N1 and N2 . By relabeling if necessary, we assume that w1 and w2 are contained in the same set, say N1 . Let Bx and By be the two bags containing w1 and w2 , respectively, and without loss of generality, we may assume x ≤ y. Then every neighbor of w1 in G is adjacent to w2 , and therefore, F contains a cycle of length 4 as a subgraph. This contradicts to the fact that F is an induced cycle of length at least 5. We conclude that |V (F ) ∩ U | ≤ 2. ♦ Claim 4. If F is a DH obstruction that is not an induced cycle, then |V (F ) ∩ U | ≤ 4. Proof of the Claim: If |V (F ) ∩ U | ≥ 5, then |V (F ) ∩ S| ≤ 1, contradicting to the assumption that S is a good DH-modulator. ♦ Claim 5. If there are two vertices v1 ∈ A1 and v2 ∈ A2 such that v1 v2 ∈ / E(G), then for every i ∈ {a + 1, a + 2, . . . , b − 5}, bags Bi , Bi+1 , Bi+2 , Bi+3 , Bi+4 contain three vertices w1 , w2 , w3 where G[{v1 , v2 , w1 , w2 , w3 }] is isomorphic to a DH obstruction. Proof of the Claim: Suppose there exist v1 ∈ A1 and v2 ∈ A2 such that v1 v2 ∈ / E(G). Let i ∈ {a + 1, a + 2, . . . , b − 5}. We prove three special cases. Case 1. (There exist x, y, z ∈ {i, i + 1, . . . , i + 4} with x < y such that Bx is a star bag whose center is adjacent to Bx+1 , By is a star bag whose center is adjacent to By−1 , and Bz is a complete bag.) Let w1 , w2 , w3 be unmarked vertices of Bx , By , Bz , respectively. Since v1 w2 w1 v2 is an induced path and w3 is adjacent to both v1 and v2 , by Lemma 2.2, G[{v1 , v2 , w1 , w2 , w3 }] is isomorphic to a DH obstruction. Case 2. (There exist x, y, z ∈ {i, i + 1, . . . , i + 4} with x < y < z such that Bx and Bz are complete bags, and By is a star bag.) A POLYNOMIAL KERNEL FOR DISTANCE-HEREDITARY VERTEX DELETION 31 Let w1 , w2 , w3 be unmarked vertices of Bx , By , Bz , respectively. Assume By is a star bag whose center is adjacent to By−1 . Since w2 v1 w3 v2 is an induced path and w1 is adjacent to both w2 and v2 , by Lemma 2.2, G[{v1 , v2 , w1 , w2 , w3 }] is isomorphic to a DH obstruction. If By is a star bag whose center is adjacent to By+1 , then w2 v2 w1 v1 is an induced path and w3 is adjacent to both w2 and v1 , G[{v1 , v2 , w1 , w2 , w3 }] is isomorphic to a DH obstruction. Case 3. (There exist x1 , x2 , x3 , x4 ∈ {i, i + 1, . . . , i + 4} with x1 < x2 < x3 < x4 such that Bx1 and Bx3 are star bags whose centers are adjacent to the next bags, and Bx2 and Bx4 are star bags whose centers are adjacent to the previous bags.) Let w1 , w2 , w3 , w4 be unmarked vertices of Bx1 , Bx2 , Bx3 , Bx4 , respectively. It is not hard to verify that G[{v1 , v2 , w1 , w2 , w3 , w4 }] is isomorphic to the domino. Now we prove in general. Since D is a canonical split decomposition, one of Bi and Bi+1 is either a complete bag or a star bag whose center is adjacent to the next bag. Let Bi0 be such a bag. Assume Bi0 is a complete bag. Then Bi0 +1 is a star bag. If there is a complete bag among Bi0 +2 , Bi0 +3 , then the claim holds by Case 2. Otherwise, all of Bi0 +1 , Bi0 +2 , Bi0 +3 are star bags, and the claim holds by Case 1. Assume Bi0 is a star bag whose center is adjacent to Bi0 +1 . If all of Bi0 +1 , Bi0 +2 , Bi0 +3 are star bags, then the claim holds by Case 3. We may assume there exists a complete bag in Bi0 +1 , Bi0 +2 , Bi0 +3 . If two other bags are star bags whose centers are adjacent to the next bags, then the claim holds by Case 2. Otherwise, there is a star bag whose center is adjacent to the previous bag, and the claim holds by Case 1. ♦ Claim 6. If there are three vertices v1 ∈ A1 , v2 ∈ A2 , v3 ∈ W such that v1 v2 , v2 v3 , v3 v1 ∈ E(G), then for every i ∈ {a + 1, a + 2, . . . , b − 4}, bags Bi , Bi+1 , Bi+2 , Bi+3 contain two vertices w1 , w2 where G[{v1 , v2 , v3 , w1 , w2 }] is isomorphic to a DH obstruction. Proof of the Claim: Suppose there are three vertices v1 ∈ A1 , v2 ∈ A2 , v3 ∈ W such that v1 v2 , v2 v3 , v3 v1 ∈ E(G). Let i ∈ {a + 1, a + 2, . . . , b − 4}. We prove three special cases. We observe that there is x ∈ {i, i + 1, i + 2, i + 3} such that either (1) Bx is a complete bag and Bx+1 is a star bag whose center is adjacent to Bx , (2) Bx is a star bag whose center is adjacent to Bx+1 and Bx+1 is a complete bag, or (3) Bx and Bx+1 are star bags and their centers are adjacent. Since D is a canonical split decomposition, one of Bi and Bi+1 is either a complete bag or a star bag whose center is adjacent to the next bag. Let Bi0 be such a bag. Assume Bi0 is a complete bag. Then Bi0 +1 is a star bag. If its center is adjacent to Bi0 , then the statement (1) holds. We may assume the center of Bi0 +1 is adjacent to Bi0 +2 . If Bi0 +2 is a complete bag, then the statement (2) holds, and if Bi0 +2 is a star bag whose center is adjacent to Bi0 +1 , then the statement (3) holds. Assume Bi0 is a star bag whose center is adjacent to Bi0 +1 . If Bi0 +1 is a complete bag, then the statement (2) holds, and if Bi0 +1 is a star bag whose center is adjacent to Bi0 , then the statement (3) holds. Let w1 ∈ Bx , w2 ∈ Bx+1 be unmarked vertices for such bags Bx and Bx+1 . One can observe that in any case, G[{v1 , v2 , v3 , w1 , w2 }] is isomorphic to a DH obstruction. ♦ Claim 7. If there are four vertices v1 ∈ A1 , v2 ∈ A2 , v3 , v4 ∈ W such that v1 v2 , v2 v3 , v3 v4 , v4 v1 ∈ E(G) and v1 v3 , v2 v4 ∈ / E(G), then for every i ∈ {a+1, a+2, . . . , b−3}, bags Bi , Bi+1 , Bi+2 contain two vertices w1 , w2 where G[{v1 , v2 , v3 , v4 , w1 , w2 }] contains an induced subgraph isomorphic to a DH obstruction. 32 EUN JUNG KIM AND O-JOUNG KWON Proof of the Claim: Suppose there are four vertices v1 ∈ A1 , v2 ∈ A2 , v3 , v4 ∈ W such that v1 v2 , v2 v3 , v3 v4 , v4 v1 ∈ E(G) and v1 v3 , v2 v4 ∈ / E(G). Let i ∈ {a + 1, a + 2, . . . , b − 3}. If Bi , Bi+1 , Bi+2 contains a complete bag, then an unmarked vertex w in the bag satisfies that G[{v1 , v2 , v3 , v4 , w}] is isomorphic to the house. We may assume those bags are star bags. Then there is i0 ∈ {i, i + 1} such that Bi0 is a star bag whose center is adjacent to Bi0 +1 and Bi0 +1 is a star bag whose center is adjacent to Bi0 . Let w1 ∈ Bi0 , w2 ∈ Bi0 +1 be unmarked vertices. One can observe G[{v1 , v2 , v3 , v4 , w1 , w2 }] is isomorphic to the domino. ♦ Now, we prove the result based on the previous claims. Suppose |V (F ) ∩ U | = 1. In this case, by the marking procedure of Reduction Rule 8, there are distinct integers j1 , j2 , . . . , jk+1 ∈ {1, . . . , 5k + 10} \ {j} such that Ba+j , Ba+j1 , Ba+j2 , . . . , Ba+jk+1 have the same type (recall that Ba+j is an unmarked bag in the application of Reduction 8 abd v ∈ Ba+j ). Therefore, there is a vertex v 0 not contained in T , where v and v 0 have the same neighborhood on V (F )\{v}, which implies that G[(V (F )\{v})∪{v 0 }] is a DH obstruction of (G − v) − T . This is contradiction. Thus, we may assume that |V (F ) ∩ U | ≥ 2. We choose q ∈ V (F ) such that F − q is an induced path, and • q = v if F is an induced cycle, • q is the closest vertex to v in the underlying cycle if F is either the house, the gem, or the domino. Let P := F −q, and let w and z be the end vertices of P , and let w0 and z 0 be the neighbors of w and z in P , respectively. We divide into following four cases depending on the places of w and z: (1) (2) (3) (4) Both w and z are contained in U . One of w and z is in A1 ∪ A2 and the other is contained in U . Both w and z are contained in A1 ∪ A2 . One of w and z is contained in W . We aim to show that these cases are not possible, because (G−v)−T is distance-hereditary. First observe that w and z are not contained in U together. Suppose w and z are contained in U . Let Bx and By be the bags containing w and z, respectively. We can assume x ≤ y, otherwise the proof is symmetric. Since they are not adjacent, either Bx is a star whose center is adjacent to Bx−1 or By is a star whose center is adjacent to By+1 . By symmetry, assume that By is a star bag whose center is adjacent to By+1 . Since q is adjacent to both w and z, Bx should be either a complete bag, or a star bag whose center is adjacent to Bx+1 . Then z 0 should be also adjacent to w, contradicting to the fact that F − q is an induced path. Secondly, assume that one of w and z is in A1 ∪ A2 and the other is contained in U . We assume that w ∈ A1 and z ∈ U . For the other cases (w ∈ A2 and z ∈ U ) and (z ∈ A1 and w ∈ U ) and (z ∈ A2 and w ∈ U ), we can prove in the similar way. Since wz ∈ / E(G), z is contained in a star bag Bx whose center is adjacent to Bx+1 for some x ∈ {a + 1, a + 2, . . . , b − 1}. Furthermore, if z 0 ∈ U , then z 0 should be adjacent to w, a contradiction. Thus, we have z 0 ∈ A2 . Note that w, z 0 ∈ / T and wz 0 ∈ / E(G). Since b − a − 1 ≥ 5(k + 2), by Claim 5, there exists i ∈ {a + 1, a + 2, . . . , b − 5} such that bags Bi , Bi+1 , Bi+2 , Bi+3 , Bi+4 contain three vertices w1 , w2 , w3 where w1 , w2 , w3 ∈ / T ∪ {v} and G[{w, z 0 , w1 , w2 , w3 }] is isomorphic to a DH obstruction. This contradicts to the assumption that (G − v) − T is distance-hereditary. A POLYNOMIAL KERNEL FOR DISTANCE-HEREDITARY VERTEX DELETION 33 Thirdly, assume that both w and z are contained in A1 ∪ A2 . If w and z are contained in distinct sets of A1 and A2 , then by the same argument in the previous paragraph, there exists i ∈ {a + 1, a + 2, . . . , b − 5} such that bags Bi , Bi+1 , Bi+2 , Bi+3 , Bi+4 contain three vertices w1 , w2 , w3 where w1 , w2 , w3 ∈ / T ∪ {v} and G[{w, z, w1 , w2 , w3 }] is isomorphic to a DH obstruction. Thus, we may assume both w and z are contained in Ai for some i ∈ {1, 2}. Without loss of generality, we assume w, z ∈ A1 . Suppose there are at least k + 5 bags Bx in {Ba+1 , Ba+2 , . . . , Bb−1 } that are either complete bags or star bags whose centers are adjacent to Bx−1 . Note that by Claims 3 and 4, |V (F ) ∩ U | ≤ 4. Thus, there is a bag among them having no vertex in T ∪ V (F ), and an unmarked vertex in the bag will form a DH obstruction with P in (G−v)−T . Therefore, there are at most k +4 such bags. This implies that there are at most 2k +9 bags, as there are no two consecutive bags in the canonical split decomposition. It contradicts to our assumption that b − a − 1 ≥ 5k + 10. Lastly, we assume that one of w and z is contained in W . If q = v, then w or z cannot be in W . Especially, F is a DH obstruction that is not an induced cycle. Let q 0 be the vertex of degree 3 other than q if F is the domino. Let us assume w ∈ W . The proof is symmetric when z ∈ W . If q ∈ W , then {q, w, w0 , z} ⊆ A1 ∪ A2 ∪ W . Since |V (F ) ∩ U | ≥ 2, F should be isomorphic to the domino and V (F ) ∩ U = {q 0 , z 0 }. But since q is adjacent to q 0 , this is contradiction. Therefore, we have q ∈ A1 ∪ A2 . We remark that if V (F ) ∩ Ai = ∅ for some i ∈ {1, 2}, then (V (F ) ∩ U, V (F ) ∩ (W ∪ A3−i )) is a split of F , contradicting the fact that F has no splits. Hence, it holds that V (F ) ∩ Ai 6= ∅ for i ∈ {1, 2}. We divide cases depending on whether F is isomorphic to the domino or not. Case 1. F is not isomorphic to the domino. Note that {q, w, w0 } ⊆ A1 ∪ A2 ∪ W . Since |V (F )| = 5 and |V (F ) ∩ U | ≥ 2, we have V (F ) ∩ U = {z, z 0 }. Furthermore, q and w0 are contained in distinct sets of A1 and A2 . By Claim 6, for every i ∈ {a + 1, a + 2, . . . , b − 4}, Bi , Bi+1 , . . . , Bi+3 contain two vertices w1 and w2 where G[{q, w, w0 , w1 , w2 }] is isomorphic to a DH obstruction. As b − a − 1 ≥ 4(k + 2), there is a pair of such vertices w1 and w2 not contained in T ∪ {v}. So, (G − v) − T contains a DH obstruction, which is contradiction. Case 2. F is isomorphic to the domino. Recall that q is chosen as the vertex of degree 3 in F closer to v. Since q ∈ / U , v is a vertex of degree 2. Furthermore, since w ∈ W , we have z = v. Note that w0 ∈ W ∪A1 ∪A2 . Suppose q and w0 are contained in distinct sets of A1 and A2 . Since b−a−1 ≥ 5(k +2), by Claim 5, there exists i ∈ {a+1, a+2, . . . , b−5} such that bags Bi , Bi+1 , Bi+2 , Bi+3 , Bi+4 contain three vertices w1 , w2 , w3 where w1 , w2 , w3 ∈ / T ∪ {v} and G[{q, w0 , w1 , w2 , w3 }] is isomorphic to a DH obstruction. If q and w0 are contained in the same set of A1 or A2 , then z should be adjacent to w0 , contradiction. Thus, we can conclude that w0 ∈ W . Therefore, q 0 ∈ / U , and {z, z 0 } ⊆ U . Since q 0 is not adjacent to z, q and q 0 are contained in distinct sets of A1 and A2 . Now, by Claim 7, for every i ∈ {a + 1, a + 2, . . . , b − 3}, bags Bi , Bi+1 , Bi+2 contain two vertices w1 , w2 where G[{w, w0 , q, q 0 , w1 , w2 }] contains an induced subgraph isomorphic to a DH obstruction. As b − a − 1 ≥ 3(k + 2), there is a pair of such vertices w1 and w2 not contained in T ∪ {v}. So, (G − v) − T contains a DH obstruction, which is contradiction. We proved that |V (F ) ∩ U | ≥ 2 cannot hold when (G − v, k) is a Yes-instance. We conclude that (G, k) is a Yes-instance if and only if (G − v, k) is a Yes-instance.  34 EUN JUNG KIM AND O-JOUNG KWON 7.3. The size of a non-trivial component. Lemma 7.11. Let (G, k) be an instance reduced under Reduction Rules 3, 4, 5, 6, 7, and 8 and let D be the canonical split decompositionSof a non-trivial connected component of G − S. If D0 be a connected component of D − B∈R∪Q V (B), then D0 contains at most 20k + 52 bags. Proof. Let B1 , · · · , Bm be a sequence of bags in D0 . By Reduction Rule 7, D0 contains at most four (B1 , Bm )-separator bags Bj , and by Reduction Rule 6, if there are four (B1 , Bm )-separators bags, then there are no bags between the second and third (B1 , Bm )separator bags. Also, there is at most leaf bag adjacent to a (B1 , Bm )-separator bag, and there are no leaf bags adjacent to a non-(B1 , Bm )-separator bag. By Reduction Rule 8, there are at most 5k + 11 consecutive bags Bj that are not (B1 , Bm )-separator bags. In total, D0 contains at most 4(5k + 11) + 4 · 2 = 20k + 52 bags.  We summarized the main result of this section. Lemma 7.12. Let (G, k) be an instance reduced under Reduction Rules 3, 4, 5, 6, 7, and 8 and let D be the canonical split decomposition of a non-trivial connected component of G − S. Then D has at most 3|S|(20k + 54) bags. Proof. Lemma 7.7Sstates that |R ∪ Q| ≤ 6|S| and there are at most 3|S| connected components of D − B∈R∪Q V (B). By Lemma 7.11, each connected component of D − S B∈R∪Q V (B) contains at most 20k + 52 bags. Therefore, D contains at most 6|S| + 3|S|(20k + 52) = 3|S|(20k + 54) bags.  8. Polynomial kernel for Distance-hereditary Vertex Deletion We present a proof of Theorem 1.1 in this section. Proof of Theorem 1.1. We first prove that given an instance (G, k) and a good DH-modulator S, one can output an equivalent instance of size O(k 5 |S|5 ). We first apply Reduction Rule 2 to (G, k) with S. After that, G − S has O(k 2 |S|) non-trivialial connected components or we can correctly report that (G, k) is a No-instance by Lemma 6.4. Notice that S remains a good DH-modulator after the application of Reduction Rule 2 by Lemma 6.3. We apply Reduction Rules 3, 4, 5, 6, 7 and 8 exhaustively. The first three rules can be applied exhaustively in polynomial time by Lemma 7.2. Polynomial-time applicability of Reduction Rules 7, and 8 is straightforward. We remark that S remains a good DHmodulator after each application of Reduction Rules 3, 4 and 5 by Lemma 7.2. Also Reduction Rules 6 and 8 preserves S as a good DH-modulator since these rules delete vertices not contained in S. The application of Reduction Rule 7 preserves the goodness of S by Lemma 7.9. Then the canonical split decomposition D of each non-trivial connected component of G − S has at most 3|S|(20k + 54) bags by Lemma 7.12. Then apply Reduction Rule 1 exhaustively in polynomial time. This bounds the size of a twin set in G − S by O(k 2 |S|3 ) by Lemma 5.2. We note that the unmarked vertices of a bag form at most two twin sets. Therefore, the number of unmarked vertices in a bag is bounded by O(k 2 |S|3 ) by Lemma 5.2. Especially, the same bounds apply to the number of trivial components in G − S since they form an independent set in G − S. Let (G0 , k 0 ) be the resulting instance. Combining the previous bounds altogether, we conclude that V (G0 ) = O(k 5 · |S|5 ). A POLYNOMIAL KERNEL FOR DISTANCE-HEREDITARY VERTEX DELETION 35 We may assume that the input instance (G, k) satisfies n ≤ 2ck for some constant c. Recall that there is an algorithm for Distance-hereditary Vertex Deletion running in time 2ck · nO(1) by Eiben, Ganian, and Kwon [10]. If n > 2ck , then the algorithm of [10] solves the instance (G, k) correctly in polynomial time, in which case we can output a trivial equivalent instance. By Theorem 4.2, we can obtain a good DH-modulator S of size O(k 5 log n) = O(k 6 ) in polynomial time or correctly report (G, k) as a No-instance. The previous argument yields that in polynomial time, an equivalent instance (G0 , k 0 ) of size O(k 35 ) can be constructed. Now, applying Theorem 4.2 again4 to (G0 , k 0 ), we can either correctly conclude that (G0 , k 0 ), and thus (G, k), is a No-instance or output a good DH-modulator S 0 of size O(k 5 log k). Now we obtain a kernel of size O(k 30 · log5 k).  9. Concluding remarks Apparently, there is much room to improve the kernel size O(k 30 log5 k) presented in this work. It is not difficult to convert our approximation algorithm in Theorem 3.1 to an O(opt2 log n)-approximation algorithm. It is an intriguing question to obtain an approximation algorithm with better performance ratio. This will immediately improve our kernelization bound of this paper. Given a DH-modulator S, Proposition 4.1 states that extra factor of O(k 2 ) will be incurred per vertex in S in the course of obtaining a good DH-modulator. In fact, a good DH-modulator of size O(k|S|) can be constructed in polynomial time using Mader’s S-path theorem. Given a collection S of disjoint vertex sets in G, an S-path is a path whose end vertices belong to distinct sets in S. Mader’s S-path theorem provides a primaldual characterization of the maximum number of pairwise vertex-disjoint S-paths. From S-path theorem, one can show the following alternative to Proposition 4.1. Proposition 9.1. Let G be a graph without any small DH obstruction, v be a vertex of G such that G − v is distance-hereditary and k be a positive integer. In polynomial time, one can decide whether there is k + 1-sunflower at v or find a set X ⊆ V (G) \ {v} of size at most 2k such that G − X contains no induced cycle of length at least 5 traversing v. This proposition holds because the property of distance at most two in G − v between neighbors of v gives an equivalent relation, and thus hitting induced cycles of length at least 5 traversing v can be translated to hitting all paths linking two distinct equivalent classes, and we can use Mader’s S-path Theorem. The caveat here is that the polynomial time algorithm in this proposition calls as a subroutine an algorithm which can efficiently compute both a primal and a dual optimal solutions of Mader’s characterization. Lovasz [24] showed that S-path packing problem and the min-max duality is a special case of linear matroid parity problem and the corresponding duality. Matroid parity problem is NP-hard even with a compact representation [24], but for linear matroid it can be efficiently solved. We can use such an algorithm A, for example [24] or [5] for a more recent treatement. Moreover, the optimal dual solution satisfying Mader’s S-path theorem can be efficiently computed via computing an optimal dual solution for the corresponding linear matroid parity problem, see [25]. In this paper, we give a simpler-to-describe algorithm using an approximation algorithm for Vertex Multicut instead of relying on a reduction to linear matroid parity problem. An interesting question is, can we efficiently find the primal and dual optimal solution 4That applying kernelization twice can yield an improved bound was adequately observed in [2]. 36 EUN JUNG KIM AND O-JOUNG KWON satisfying Mader’s S-path theorem without using a reduction to linear matroid parity problem? We are not aware of any literature claiming such a result. One might also ask for a kernelization lower bound for Distance-hereditary Vertex Deletion parameterized by the size of a DH-modulator or by k. Acknowledgement We thank Saket Saurabh for pointing to the idea of [2] to apply the kernelization twice, which leads to an improved bound in Theorem 1.1. References [1] I. Adler, M. M. Kanté, and O. Kwon. Linear rank-width of distance-hereditary graphs I. A polynomialtime algorithm. Algorithmica, pages 1–36, 2016. [2] A. Agrawal, D. Lokshtanov, P. Misra, S. Saurabh, and M. Zehavi. Feedback vertex set inspired kernel for chordal vertex deletion. In Proceedings of the Twenty-Eighth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2017, Barcelona, Spain, Hotel Porta Fira, January 16-19, pages 1383– 1398, 2017. [3] H.-J. Bandelt and H. M. Mulder. Distance-hereditary graphs. J. Combin. Theory Ser. B, 41(2):182– 208, 1986. [4] A. Bouchet. Transforming trees by successive local complementations. J. Graph Theory, 12(2):195– 207, 1988. [5] H. Y. Cheung, L. C. Lau, and K. M. Leung. Algebraic algorithms for linear matroid parity problems. ACM Trans. Algorithms, 10(3):10:1–10:26, 2014. [6] B. Courcelle, J. A. Makowsky, and U. Rotics. Linear time solvable optimization problems on graphs of bounded clique-width. Theory Comput. Syst., 33(2):125–150, 2000. [7] B. Courcelle and S. Olariu. Upper bounds to the clique width of graphs. Discrete Appl. Math., 101(13):77–114, 2000. [8] W. H. Cunningham and J. Edmonds. A combinatorial decomposition theory. Canad. J. Math., 32(3):734–765, 1980. [9] E. Dahlhaus. Parallel algorithms for hierarchical clustering, and applications to split decomposition and parity graph recognition. Journal of Algorithms, 36(2):205–240, 2000. [10] E. Eiben, R. Ganian, and O. Kwon. A Single-Exponential Fixed-Parameter Algorithm for DistanceHereditary Vertex Deletion. In P. Faliszewski, A. Muscholl, and R. Niedermeier, editors, 41st International Symposium on Mathematical Foundations of Computer Science, MFCS 2016, volume 58 of Leibniz International Proceedings in Informatics (LIPIcs), pages 34:1–34:14, Dagstuhl, Germany, 2016. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik. [11] P. Erdős and L. Pósa. On independent circuits contained in a graph. Canad. J. Math., 17:347–352, 1965. [12] E. M. Eschen, C. T. Hoàng, J. P. Spinrad, and R. Sritharan. On graphs without a C4 or a diamond. Discrete Appl. Math., 159(7):581–587, 2011. [13] M. Farber. On diameters and radii of bridged graphs. Discrete Math., 73(3):249–260, 1989. [14] U. Feige, M. Hajiaghayi, and J. R. Lee. Improved approximation algorithms for minimum weight vertex separators. SIAM J. Comput., 38(2):629–657, 2008. [15] F. V. Fomin, D. Lokshtanov, N. Misra, and S. Saurabh. Planar F-Deletion: approximation, kernelization and optimal FPT algorithms. In 2012 IEEE 53rd Annual Symposium on Foundations of Computer Science—FOCS 2012, pages 470–479. IEEE Computer Soc., Los Alamitos, CA, 2012. [16] A. C. Giannopoulou, B. M. P. Jansen, D. Lokshtanov, and S. Saurabh. Uniform kernelization complexity of hitting forbidden minors. In Automata, languages, and programming. Part I, volume 9134 of Lecture Notes in Comput. Sci., pages 629–641. Springer, Heidelberg, 2015. [17] E. Gioan and C. Paul. Split decomposition and graph-labelled trees: characterizations and fully dynamic algorithms for totally decomposable graphs. Discrete Appl. Math., 160(6):708–733, 2012. [18] A. Gupta. Improved results for directed multicut. In Proceedings of the Fourteenth Annual ACMSIAM Symposium on Discrete Algorithms, SODA 2003, January 12-14, 2003, Baltimore, Maryland, USA., pages 454–455, 2003. A POLYNOMIAL KERNEL FOR DISTANCE-HEREDITARY VERTEX DELETION 37 [19] E. Howorka. A characterization of distance-hereditary graphs. Quart. J. Math. Oxford Ser. (2), 28(112):417–420, 1977. [20] B. M. P. Jansen and M. Pilipczuk. Approximation and kernelization for chordal vertex deletion. In 28th Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2017, January 16-19, 2017, Barcelona, Spain., 2017. To appear. [21] M. M. Kanté, E. J. Kim, O. Kwon, and C. Paul. An fpt algorithm and a polynomial kernel for linear rankwidth-1 vertex deletion. Algorithmica, pages 1–30, 2016. [22] E. J. Kim, A. Langer, C. Paul, F. Reidl, P. Rossmanith, I. Sau, and S. Sikdar. Linear kernels and single-exponential algorithms via protrusion decompositions. ACM Trans. Algorithms, 12(2):Art. 21, 41, 2016. [23] J. M. Lewis and M. Yannakakis. The node-deletion problem for hereditary properties is NP-complete. J. Comput. Syst. Sci., 20(2):219–230, 1980. [24] L. Lovász. Matroid matching and some applications. J. Comb. Theory, Ser. B, 28(2):208–236, 1980. [25] J. B. Orlin. A fast, simpler algorithm for the matroid parity problem. In Integer Programming and Combinatorial Optimization, 13th International Conference, IPCO 2008, Bertinoro, Italy, May 26-28, 2008, Proceedings, pages 240–258, 2008. [26] S. Oum. Rank-width and vertex-minors. J. Combin. Theory Ser. B, 95(1):79–100, 2005. (Kim) CNRS-Université Paris-Dauphine, Place du Marechal de Lattre de Tassigny, 75775 Paris cedex 16, France (Kwon) Institute of Software Technology and Theoretical Computer Science, Technische Universität Berlin, Germany. E-mail address: [email protected] E-mail address: [email protected]
8cs.DS
Conditional Hardness for Sensitivity Problems Monika Henzinger ∗1 , Andrea Lincoln Virginia Vassilevska Williams §4 1 2 3 arXiv:1703.01638v1 [cs.DS] 5 Mar 2017 4 †2 , Stefan Neumann ‡3 , and University of Vienna, Faculty of Computer Science, Vienna, Austria [email protected] Computer Science Department, Stanford University, Stanford, USA [email protected] University of Vienna, Faculty of Computer Science, Vienna, Austria [email protected] Computer Science Department, Stanford University, Stanford, USA [email protected] Abstract In recent years it has become popular to study dynamic problems in a sensitivity setting: Instead of allowing for an arbitrary sequence of updates, the sensitivity model only allows to apply batch updates of small size to the original input data. The sensitivity model is particularly appealing since recent strong conditional lower bounds ruled out fast algorithms for many dynamic problems, such as shortest paths, reachability, or subgraph connectivity. In this paper we prove conditional lower bounds for these and additional problems in a sensitivity setting. For example, we show that under the Boolean Matrix Multiplication (BMM) conjecture combinatorial algorithms cannot compute the (4/3 − ε)-approximate diameter of an undirected unweighted dense graph with truly subcubic preprocessing time and truly subquadratic update/query time. This result is surprising since in the static setting it is not clear whether a reduction from BMM to diameter is possible. We further show under the BMM conjecture that many problems, such as reachability or approximate shortest paths, cannot be solved faster than by recomputation from scratch even after only one or two edge insertions. We extend our reduction from BMM to Diameter to give a reduction from All Pairs Shortest Paths to Diameter under one deletion in weighted graphs. This is intriguing, as in the static setting it is a big open problem whether Diameter is as hard as APSP. We further get a nearly tight lower bound for shortest paths after two edge deletions based on the APSP conjecture. We give more lower bounds under the Strong Exponential Time Hypothesis. Many of our lower bounds also hold for static oracle data structures where no sensitivity is required. Finally, we give the first algorithm for the (1 + ε)-approximate radius, diameter, and eccentricity problems in directed or undirected unweighted graphs in case of single edges failures. The algorithm has a truly subcubic running time for graphs with a truly subquadratic number of edges; it is tight w.r.t. the conditional lower bounds we obtain. 1998 ACM Subject Classification F.2.2 Computations on discrete structures Keywords and phrases sensitivity, conditional lower bounds, data structures, dynamic graph algorithms ∗ † ‡ § The research leading to these results has received funding from the European Research Council under the European Union’s Seventh Framework Programme (FP/2007-2013) / ERC Grant Agreement no. 340506. Supported by a Stanford Graduate Fellowship. Supported by the Doctoral Programme “Vienna Graduate School on Computational Optimization” which is funded by Austrian Science Fund (FWF, project no. W1260-N35). VVW and AL were supported by NSF Grants CCF-1417238, CCF-1528078 and CCF-1514339, and BSF Grant BSF:2012338. © Monika Henzinger, Andrea Lincoln, Stefan Neumann and Virginia Vassilevska Williams; licensed under Creative Commons License CC-BY Leibniz International Proceedings in Informatics Schloss Dagstuhl – Leibniz-Zentrum für Informatik, Dagstuhl Publishing, Germany XX:2 Conditional Hardness for Sensitivity Problems Digital Object Identifier 10.4230/LIPIcs... 1 Introduction A dynamic algorithm is an algorithm that is able to handle changes in the input data: It is given an input instance x and is required to maintain certain properties of x while x undergoes (possibly very many) updates. For example, an algorithm might maintain a graph, which undergoes edge insertions and deletions, and a query is supposed to the return the diameter of the graph after the updates. Often dynamic algorithms are also referred to as data structures. During the last few years strong conditional lower bounds for many dynamic problems were derived (see, e.g., [36, 3, 27, 4, 21, 1, 32]), which rule out better algorithms than simple recomputation from scratch after each update or before each query. Partially due to this, in recent years it has become popular to study dynamic problems in a more restricted setting that only allows for a bounded number of changes to the input instance (see, for example, [37, 23, 10, 19], and the references in Table 4). These algorithms are usually referred to as sensitivity 1 data structures. The hope is to obtain algorithms in the sensitivity setting which are faster than the conditional lower bounds for the general setting. More formally, a data structure with sensitivity d for a problem P has the following properties: It obtains an instance p of P and is allowed polynomial preprocessing time on p. After the preprocessing, the data structure must provide the following operations: (Batch) Update: Up to d changes are performed to the initial problem instance p, e.g., d edges are added to or removed from p. Query: The user queries a specific property about the instance of the problem after the last update, e.g., the shortest path between two nodes avoiding the edges deleted in the last update. The parameter d bounding the batch update size is referred to as the sensitivity of the data structure. Note that every batch update is performed on the original problem instance. Thus, in contrast to “classic” dynamic algorithms (without sensitivity), a query only reflects the changes made to p by the last batch update and not by previous batch updates. As the size of a batch update is constrained to at most d, each query is executed on a graph that differs from p by at most d edges. After a batch update an arbitrary number of queries may be performed. Some data structures (usually called oracles) combine a query and an update into a single operation, i.e., the combined operation obtains an input tuple (Q, U ), where Q is a query and U is an update. A special case are static oracles, which have U = ∅. The conditional lower bounds we derive in this paper also hold in this setting, since oracles with an efficient combined operation can be used to solve sensitivity problems. While some existing sensitivity data structures can preprocess the answers to all possible updates and queries during their preprocessing time, this is not possible in general (due to constraints in the preprocessing time and the fact that the number of possible updates/queries grows exponentially in the parameter d). Hence, we still consider a sensitivity data structure a dynamic (instead of static) algorithm. 1 Sometimes sensitivity data structures are also called “fault-tolerant” or “emergency planning” algorithms. See Appendix A.2 for a discussion of terminology. M. Henzinger, A. Lincoln, S. Neumann and V. Vassilevska Williams The Hypotheses. We state the hypotheses on which we base the conditional lower bounds in this paper. By now they are all considered standard in proving fine-grained reduction-based lower bounds. For a more detailed description of the hypotheses, see, e.g., Abboud and Williams [3], Henzinger et al. [27], and the references therein. As usual we work in the word-RAM model of computation with word length of O(log n) bits. The hypotheses below concern the complexity of the Boolean Matrix Multiplication (BMM), Satisfiability of Boolean Formulas in Conjunctive Normal Form (CNF-SAT), All Pairs Shortest Paths (APSP), Triangle Detection and Online Boolean Matrix Vector Multiplication (OMv) problems. Other popular hypotheses from prior work consider other famous problems such as 3SUM and other sparsity regimes such as triangle detection in very sparse graphs (see, e.g. [3]). I Conjecture 1 (Impagliazzo, Paturi and Zane [29, 30]). The Strong Exponential Time Hypothesis (SETH) states that for each ε > 0, there exists a k ∈ N, such that k-SAT cannot be solved in time O(2n(1−ε) poly(n)). I Conjecture 2. The Boolean Matrix Multiplication (BMM) conjecture states that for all ε > 0, there exists no combinatorial algorithm that computes the product of two n×n matrices in expected time O(n3−ε ). Note that BMM can be solved in truly subcubic using fast matrix multiplication (FMM): the current fastest algorithms run in O(n2.373 ) time [41, 25]. However, algorithms using FMM are not considered to be combinatorial. Formally, the term combinatorial algorithm is not well-defined and it is common to rule out the use of FMM or other “Strassen-like” methods in the design of such algorithms as most of them are not considered practical. True combinatorial algorithms are not only considered practical but also easily extendable. For instance, prior work on combinatorial BMM algorithms has almost always led to an algorithm for APSP with similar running time (e.g. [5] and [17]). One of the simplest graph problems is that of detecting whether the graph contains a triangle, i.e., three nodes with all three edges between them. Itai and Rodeh [31] showed that any algorithm for BMM can solve Triangle detection in the same time. Conversely, Vassilevska Williams and Williams [42] showed that any truly subcubic combinatorial algorithm for Triangle Detection can be converted into a truly subcubic combinatorial algorithm for BMM. Hence, the BMM conjecture implies there is no truly subcubic combinatorial algorithm for Triangle Detection. We use this fact and the resulting Triangle Conjecture that there is no truly subcubic algorithm for Triangle Detection in our reductions based on BMM. The following is a popular conjecture about the APSP problem. I Conjecture 3. The APSP conjecture states that given a graph G with n vertices, m edges, and edge weights in {1, . . . , nc } for some constant c, the All Pairs Shortest Paths problem (APSP) cannot be solved in O(n3−ε ) expected time for any ε > 0. Similar to the relationship between BMM and Triangle Detection, [42] showed that there is a triangle problem in weighted graphs, Negative Triangle, that is equivalent under subcubic reductions to APSP. We use that problem in our reductions. Our final conjecture concerns the online version of Boolean matrix vector product. I Conjecture 4 (Henzinger et al. [27]). Let B be a Boolean matrix of size n × n. In the Online Matrix-vector (OMv) problem, n binary vectors v1 , . . . , vn of size n appear online and an algorithm solving the problem must output the vector Bvi before the next vector vi+1 arrives. XX:3 XX:4 Conditional Hardness for Sensitivity Problems The OMv conjecture states that for all ε > 0 and after any polynomial time preprocessing of B, it takes Ω(n3−ε ) time to solve the OMv problem with error probability at most 1/3. Most of the conjectures are stated w.r.t. expected time, i.e., the conjectures rule out randomized algorithms. In case of dynamic algorithms using randomness, it is common to argue if an oblivious or a non-oblivious adversary is allowed. Previous literature on conditional lower bounds for dynamic algorithms did not explicitly state what kind of adversaries are allowed for their lower bounds. We give a quick discussion of this topic in Appendix A.3. Our Results. In this paper we develop a better understanding of the possibilities and limitations of the sensitivity setting by providing conditional lower bounds for sensitivity problems. We show that under plausible assumptions for many dynamic graph problems even the update of only one or two edges cannot be solved faster than by re-computation from scratch. See Table 2 and Table 3 in the Appendix for a list of all our conditional lower bounds for sensitivity data structures, and our lower bounds for static oracles respectively. Table 1 gives explanations of the problems. The abbreviations used in the tables are explained in its captions. We next discuss our main results. New reductions. We give several new reductions for data structures with small sensitivity. (1) We give a novel reduction from triangle detection and BMM to maintaining an approximation of the diameter of the graph and eccentricities of all vertices, under a single edge failure. This is particularly surprising because in the static case it is unknown how to reduce BMM to diameter computation. Using the BMM conjecture this results in lower bounds of n3−o(1) on the preprocessing time or of n2−o(1) update or query time for (4/3 − ε)approximate decremental diameter and eccentricity in unweighted graphs with sensitivity 1, i.e., when a single edge is deleted. Those results are tight w.r.t. the algorithm we present in Section 5. (2) A particular strength of BMM-based reductions is that they can very often be converted into APSP-based lower bounds for weighted variants of the problems. APSP-based lower bounds, in turn, no longer require the “combinatorial”-condition on the algorithms, making the lower bounds stronger. We show how our BMM-based lower bounds for approximate diameter with sensitivity 1 can be converted into an APSP-based lower bound for diameter with sensitivity 1 in weighted graphs. In particular, we show that unless APSP has a truly subcubic algorithm, any data structure that can support diameter queries for a single edge deletion must either have essentially cubic preprocessing time, or essentially quadratic query time. This lower bound is tight w.r.t. to a trivial algorithm using the data structure of [10]. The APSP to 1-sensitive Diameter lower bound is significant also because it is a big open problem whether in the static case Diameter and APSP are actually subcubically equivalent (see e.g. [2]). (3) We consider the problem of maintaining the distance between two fixed nodes s and t in an undirected weighted graph under edge failures. The case of a single edge failure can be solved in m edge, n node graphs with essentially optimal O(mα(n)) preprocessing time and O(1) query time with an algorithm of Nardelli et al. [33]. The case of two edge failures has been open for some time. We give compelling reasons for this by showing that under the APSP conjecture, maintaining the s-t distance in an unweighted graph under two edge failures requires either n3−o(1) preprocessing time or n2−o(1) query time. Notice that with no M. Henzinger, A. Lincoln, S. Neumann and V. Vassilevska Williams preprocessing time, just by using Dijkstra’s algorithm at query time, one can obtain O(n2 ) query time. Similarly, one can achieve Õ(n3 ) preprocessing time and O(1) query time by applying the single edge failure algorithm of [33] n times at preprocessing, once for G \ {e} for every e on the shortest st path. Thus our lower bound shows that under the APSP conjecture, the naive recomputation time is essentially optimal. (4) We show lower bounds with sensitivity d for deletions-only and insertions-only (2 − ε)-approximate single source and (5/3 − ε)-approximate st-shortest paths in undirected unweighted graphs, as well as for weighted bipartite matching problems under the OMv conjecture. The lower bounds show that with polynomial in n preprocessing either the update time must be super-polynomial in d or the query time must be d1−o(1) . New upper bounds. We complement our lower bounds with an algorithm showing that some of our lower bounds are tight: In particular, we present a deterministic combinatorial algorithm that can compute a (1 + ε)-approximation (for any ε > 0) for the eccentricity of any given vertex, the radius and the diameter of a directed or undirected unweighted graph after single edge failures. The p preprocessing time of the data structure is Õ(mn + n1.5 Dm/ε), where D is the diameter of the graph and m and n are the number of edges and vertices; the p query time is constant. Since D ≤ n, the data structure can be preprocessed in time Õ(n2 m/ε). In particular, for 1 sparse graphs with m = Õ(n), it takes time Õ(n2.5 ε− 2 ) to build the data structure. Our lower bounds from BMM state that even getting a (4/3 − ε)-approximation for diameter or eccentricity after a single edge deletion requires either n3−o(1) preprocessing time, or n2−o(1) query or update time. Hence, our algorithm’s preprocessing time is tight (under the conjecture) since it has constant time queries. Conditional Lower Bounds based on modifications of prior reductions. Some reductions in prior work [42, 3] only perform very few updates before a query is performed or they can be modified to do so. After the query, the updates are “undone” by rolling back to the initial instance of the input problem. Hence, some of their reductions also hold in a sensitivity setting. Specifically we achieve the following results in this way: (1) Based on the BMM conjecture we show that for reachability problems with st-queries already two edge insertions require n3−o(1) preprocessing time or n2−o(1) update or query time; for ss-queries we obtain the same bounds even for a single edge insertion. This lower bound is matched by an algorithm that recomputes at each step. (2) We present strong conditional lower bounds for static oracle data structures. We show that under the BMM conjecture, oracle data structures that answer about the reachability between any two queried vertices cannot have truly subcubic preprocessing time and truly subquadratic query time. This implies that combinatorial algorithms either essentially need to compute the transitive closure matrix of the graph during the preprocessing time or essentially need to traverse the graph at each query. We show the same lower bounds for static oracles that solve the (5/3 − ε)-approximate ap-shortest paths problem in undirected unweighted graphs. This shows that we essentially cannot do better than solving APSP in the preprocessing or computing the distance in each query. (3) The subcubic equivalence between the replacement paths problem and APSP [42] immediately leads to a conditional lower bound for s-t distance queries with sensitivity 1 in directed, weighted graphs. Our lower bound for s-t distance queries with sensitivity 2 in undirected graphs is inspired by this reduction. The lower bound for sensitivity 1 is matched XX:5 XX:6 Conditional Hardness for Sensitivity Problems by the algorithm of Bernstein and Karger [10]. Similarly, a reduction from BMM to replacement paths in directed unweighted graphs √ from [42] shows that the O(m n) time algorithm of Roditty and Zwick [38] is optimal among all combinatorial algorithms, for every choice of m as a function of n. It also immediately implies that under the BMM conjecture, combinatorial s-t distance 1-sensitivity oracles in unweighted graphs require either mn0.5−o(1) preprocessing time or m/n0.5+o(1) query time, for every choice of m as a function of n; this is tight due to Roditty and Zwick’s algorithm. (The combinatorial restriction is important here as there is a faster Õ(n2.373 ) time non-combinatorial algorithm for replacement paths [40] and hence for distance sensitivity oracles in directed unweighted graphs.) (4) We additionally provide new lower bounds under SETH: We show that assuming SETH the #SSR problem cannot be solved with truly subquadratic update and query times when any constant number of edge insertions is allowed; this matches the lower bound for the general dynamic setting. For the ST -reachability problem and the computation of (4/3 − ε)-approximate diameter we show that under SETH truly sublinear update and query times are not possible even when only a constant number of edge insertions are supported. The sensitivity of the reductions is a constant K(ε, t) that is determined by the preprocessing time O(nt ) we allow and some properties of the sparsification lemma [30]. Notice that while the constant K(ε, t) depends on the preprocessing time and the constant in the sparsification lemma, it does not depend on any property of the SAT instance in the reduction. See Section 4 for a thorough discussion of the parameter K(ε, t). The lower bound for #SSR shows that we cannot do better than recomputation after each update. (5) Using a reduction from OMv we show lower bounds with sensitivity d for deletionsonly or insertions-only st-reachability, strong connectivity in directed graphs. The lower bounds show that with polynomial in n preprocessing either the update time must be super-polynomial d or the query time must be Ω(d1−ε ). Related Work. In the last few years many conditional lower bounds were derived for dynamic algorithms. Abboud and Williams [3] gave such lower bounds under several different conjectures. New lower bounds were given by Henzinger et al. [27], who introduced the OMv conjecture, and by Abboud, Williams and Yu [4], who stated combined conjectures that hold as long as either the 3SUM conjecture or SETH or the APSP conjecture is correct. Dahlgaard [21] gave novel lower bounds for partially dynamic algorithms. Abboud and Dahlgaard [1] showed the first hardness results for dynamic algorithms on planar graphs and Kopelowitz, Pettie and Porat [32] gave stronger lower bounds from the 3SUM conjecture. However, none of the lower bounds mentioned in the above papers explicitly handled the sensitivity setting. During the last decade there have been many new algorithms designed for the sensitivity setting. In Section A.5 we give a short discussion summarizing many existing algorithms. 2 Lower Bounds From Boolean Matrix Multiplication The following theorem summarizes the lower bounds we derived from the BMM conjecture. I Theorem 5. Assuming the BMM conjecture, combinatorial algorithms cannot solve the following problems with preprocessing time O(n3−ε ), and update and query times O(n2−ε ) for any ε > 0: 1. incremental st-reachability with sensitivity 2, M. Henzinger, A. Lincoln, S. Neumann and V. Vassilevska Williams 2. 3. 4. 5. incremental ss-reachability with sensitivity 1, static ap-reachability, (7/5 − ε)-approximate st shortest paths in undirected unweighted graphs with sensitivity 2, (3/2 − ε)-approximate ss shortest paths in undirected unweighted graphs with sensitivity 1, 6. static (5/3 − ε)-approximate ap shortest paths 7. decremental (4/3 − ε)-approx. diameter in undirected unweighted graphs with sensitivity 1, 8. decremental (4/3 − ε)-approx. eccentricity in undirected unweighted graphs with sensitivity 1. Additionally, under the BMM conjecture, decremental st-shortest paths with sensitivity 1 √ in directed unweighted graphs with n vertices and m ≥ n edges require either m1−o(1) n √ preprocessing time or m1−o(1) / n query time for every function m of n. A strength of the reductions from BMM is that they can usually be extended to provide APSP-based reductions for weighted problems without the restriction to combinatorial algorithms; we do this in Section 3. While we state our results in the theorem only for combinatorial algorithms under the BMM conjecture, we would like to point out that they also hold for any kind of algorithm under a popular version of the triangle detection conjecture for sparse graphs that states that finding a triangle in an m-edge graph requires m1+δ−o(1) time for some δ > 0. Our lower bounds then rule out algorithms with a preprocessing time of O(m1+δ−ε ) and update and query times O(m2δ−ε ) for any ε > 0. Many of the bullets of the theorem follow from prior work via a few observations, which we discuss in Appendix A.6. Our results on decremental diameter and eccentricity, however, are completely novel. In fact, it was completely unclear before this work whether such results are possible. Impagliazzo et al. [16] define a strengthening of SETH under which there can be no deterministic fine-grained reduction from problems such as APSP and BMM to problems such as orthogonal vectors or diameter in sparse graphs. It is not clear whether a reduction from BMM to diameter in dense graphs is possible, as the same “quantifier issues” that arise in the sparse graph case arise in the dense graph case as well: Diameter is an ∃∀-type problem (i.e., do there exist two nodes such that all paths between them are long?), and BMM is equivalent to Triangle detection which is an ∃-type problem (i.e., do there exist three nodes that form a clique?). Decremental Diameter. We give the reduction from BMM to decremental diameter in undirected unweighted graphs with sensitivity 1. Note that the lower bound also holds for eccentricity oracles: Instead of querying the diameter n times, we can query the eccentricity of a variable vertex n times. Let G = (V, E) be an undirected unweighted graph for Triangle Detection. We construct a graph G0 as follows. We create four copies of V denoted by V1 , V2 , V3 , V4 , and for i = 1, 2, 3, we add edges between nodes ui ∈ Vi and vi+1 ∈ Vi+1 if (u, v) ∈ E. We create vertices av and bv for each v ∈ V , and denote the set of all av by A and the set of all bv by B. We connect the vertices in A to a clique and also those of B. For each v ∈ V , we add an edge (v1 , av ) and an edge (av , bv ). A node bv is connected to all vertices in V4 . We further introduce two additional vertices c, d, which are connected by an edge. We add edges between c and all nodes in V2 and V3 , and between d and all nodes in V3 and V4 . The node c has an edge to each vertex in A and the node d has an edge to each vertex in B. Notice that the resulting graph has O(n) vertices and O(n2 ) edges. We visualized the graph in Figure 2 in the appendix. XX:7 XX:8 Conditional Hardness for Sensitivity Problems Note that even without the edges from B × V4 , no pair of nodes has distance larger than 3, except for pairs of nodes from V1 × V4 . If a node v participates in a triangle in G, then in G0 there is a path of length 3 from v1 to v4 without an edge from B × V4 . Otherwise, there is no such path, i.e., the diameter increases to 4 after the deletion of (bv , v4 ). We perform one stage per vertex v ∈ V : Consider the copy v4 ∈ V4 of v. We remove the edge (bv , v4 ) and query the diameter of the graph. We claim that G has a triangle iff one of the queries returns diameter 3. I Lemma 6. For each vertex v in G, the diameter of G0 \ {(bv , v4 )} is larger than 3 if and only if v does not participate in a triangle in G. Proof. Assume that G has a triangle (v, u, w) ∈ V 3 and consider the stage for v. Notice that only the shortest paths change that used edge (bv , v4 ); this is not the case for any z 6= v, because the path z1 → az → bz → z4 is not affected by the edge deletion. We only need to consider the path v1 → av → bv → v4 . Since G has a triangle (v, u, w), there exists the path v1 → u2 → w3 → v4 of length 3 as desired. Hence, the diameter is 3. Assume the query in the stage for vertex v ∈ V returned diameter 3. Since we deleted the edge (bv , v4 ), there is no path of length 3 from v1 to v4 via A and B. Hence, the new shortest path from v1 to v4 must have the form v1 → u2 → w3 → v4 . By construction of the graph, this implies that G has a triangle (v, u, w). J Altogether we perform n queries and n updates. Thus under the BMM conjecture any combinatorial algorithm requires n3−o(1) preprocessing time or n2−o(1) update or query time. 3 Sensitivity Lower Bounds from the APSP Conjecture In this section we present new lower bounds based on the APSP conjecture. These lower bounds hold for arbitrary, not necessarily combinatorial, algorithms. We present our results in the following theorem and give the proofs in Appendix A.7. I Theorem 7. Assuming the APSP conjecture, no algorithms can solve the following problems with preprocessing time O(n3−ε ), and update and query times O(n2−ε ) for any ε > 0: 1. Decremental st-shortest paths in directed weighted graphs with sensitivity 1, 2. decremental st-shortest paths in undirected weighted with sensitivity 2, 3. decremental diameter in undirected weighted graphs with sensitivity 1. Decremental st-shortest paths in directed weighted graphs with sensitivity 1. In 2010, Vassilevska Williams and Williams [42] showed that the so called Replacement Paths (RP) problem is subcubically equivalent to APSP. RP is defined as follows: given a directed weighted graph G and two nodes s and t, compute for every edge e in G, the distance between s and t in G \ {e}. Note that only the deletion of the at most n − 1 edges on the shortest path from s to t affect the distance from s to t. This has an immediate implication for 1-sensitivity oracles for st-shortest paths: The APSP conjecture would be violated by any 1-sensitivity oracle that uses O(n3−ε ) preprocessing time and can answer distance queries between two fixed nodes s and t with one edge deletion in time O(n2−ε ) for any ε > 0. M. Henzinger, A. Lincoln, S. Neumann and V. Vassilevska Williams Decremental st-shortest paths in undirected weighted with sensitivity 2. With this we are able to show that on undirected weighted graphs finding a shortest path between fixed s and t with 2 edge deletions cannot be done with truly sub-cubic preprocessing time and truly subquadratic query time assuming the APSP conjecture. This is surprising because in the case of a single edge failure Nardelli et al. [33] show that shortest paths can be solved with an essentially optimal O(mα(n)) preprocessing time and O(1) query time. Thus, assuming the APSP conjecture we show a separation between 1 sensitivity and 2 sensitivity. Additionally, with sensitivity 2 and no preprocessing time O(n2 ) update time is achievable, and with Õ(n3 ) preprocessing time using Nardelli et al. we can get an O(1) query time. Thus, we show these approaches are essentially tight assuming the APSP conjecture. The full reduction is in Appendix 3. Decremental diameter in undirected weighted graphs with sensitivity 1. A nice property of BMM-based reductions is that they can very often be converted to APSP-based reductions to weighted versions of problems. Here we convert our BMM-based reduction for decremental 1-sensitive Diameter to a reduction from APSP into decremental 1-sensitive diameter in undirected weighted graphs. Note that, as in the BMM case we can get the same lower bounds for eccentricity. 4 SETH Lower Bounds with Constant Sensitivity In this section, we prove conditional lower bounds with constant sensitivity from SETH. Before we give the reductions, we first argue about what their sensitivities are. I Theorem 8. Let ε > 0, t ∈ N. The SETH implies that there exists no algorithm with preprocessing time O(nt ), update time u(n) and query time q(n), such that max{u(n), q(n)} = O(n1−ε ) for the following problems: 1. Incremental #SSR with constant sensitivity K(ε, t), 2. (4/3 − ε)-approximate incremental diameter with constant sensitivity K(ε, t), 3. incremental ST-Reach with constant sensitivity K(ε, t). We prove the theorem in Appendix A.8. The parameter K(ε, t) is explained in the following paragraph*. The Sensitivity of the Reductions. The conditional lower bounds we prove from SETH hold even for constant sensitivity; however, the derivation of these constants is somewhat unnatural. Nonetheless, we stress that our lower bounds hold for constant sensitivity and in particular for every algorithm with sensitivity ω(1). To derive the sensitivity of our reductions, we use a similar approach as Proposition 1 in [3], but we need a few more details. We start by revisiting the sparsification lemma. I Lemma 9 (Sparsification Lemma, [30]). For ε > 0 and k ∈ N, there exists a constant Wl C = C(ε, k), such that any k-SAT formula F with ñ variables can be expressed as F = i=1 Fi , where l = O(2εñ ) and each Fi is a k-SAT formula with at most C ñ clauses. This disjunction can be computed in time O(2εñ poly(ñ)). XX:9 XX:10 Conditional Hardness for Sensitivity Problems We set C(ε) to the smallest C(ε, k), over all k such that k-SAT cannot be solved faster than in O∗ (2(1−ε)ñ ) time2 ; formally, C(ε) = min{C(ε0 , k) : ε0 < ε and k ∈ N with k-SAT 6∈ 0 O∗ (2(1−ε )ñ )}. Note that C(ε) is well-defined if we assume that SETH is true (see also Proposition 1 in [3]). Finally, for any ε > 0 and t ∈ N, we set K(ε, t) = C(ε) · t/(1 − ε), which gives the sensitivity of our reductions. In our reductions, t ∈ N is the exponent of the allowed preprocessing time and ε > 0 denotes the improvement in the exponent of the running time over the 2n -time algorithm. We note that K(ε, t) gives a tradeoff: For small t (i.e., less preprocessing time), the lower bounds hold for smaller sensitivities; a smaller choice of ε yields larger sensitivities. In the reductions we will write K to denote K(ε, t) and c to denote C(ε, k) whenever it is clear from the context. The Reductions. Our reductions are conceptually similar to the ones in [3], but the graph instances we construct are based on a novel idea to minimize the size of the batch updates we need to perform. Here we describe the construction of the graphs we use in the reductions and refer to Appendix A.8 for full proofs. We give two graphs, Hδ and Dδ , for δ ∈ (0, 1). For the construction, let F be a SAT formula over a set V of ñ variables and c · ñ clauses. Let U ⊂ V be a subset of δñ variables. Construction of Hδ : For each partial assignment to the variables in U we introduce a node. The set of these nodes is denoted by Ū . For each clause of F we introduce a node and denote the set of these nodes by C. We add an edge between a partial assignment ū ∈ Ū and a clause c ∈ C if ū does not satisfy c. Observe that Hδ has O(2δñ ) vertices and O∗ (2δñ ) edges. Construction of Dδ : We partition the set of clauses C into K = c/δ groups of size δñ each and denote these groups by G1 , . . . , GK . For all groups Gi , we introduce a vertex into the graph for each non-empty subset g of Gi . The edges to and from the nodes of Dδ will be introduced during reductions. Observe that for each group we introduce O(2δñ ) vertices and Dδ has O(K · 2δñ ) vertices in total. Our reductions have small sensitivity since we will only need to insert a single edge from Hδ to each group of clauses in Dδ . Hence, we only need to insert K = O(1) edges in order to connect Hδ and Dδ at each stage in the reduction. However, we will need to argue how we can efficiently pick the correct sets in Dδ . 5 Diameter Upper Bound In this section, we present deterministic algorithms, which can compute a (1+ε)-approximation for the eccentricity, the radius and the diameter of directed and undirected unweighted graphs after single edge deletions. All of these algorithms run in time truly subcubic time for graphs with a truly subquadratic number of edges. Bernstein and Karger [10] give an algorithm for the related problem of all-pairs shortest paths in a directed weighted graph G = (V, E) in case of single edge deletions. Their oracle data structure requires Õ(mn) preprocessing time. Given a triplet (u, v, e) ∈ V 2 × E, the oracle can output the distance from u to v in G \ e in O(1) time. 2 The O∗ (·) notation hides poly(ñ) factors. M. Henzinger, A. Lincoln, S. Neumann and V. Vassilevska Williams For the diameter problem with single edge deletions, note that only deletions of the edges in the shortest paths trees can have an effect on the diameter. Using this property, a trivial algorithm to compute the exact diameter after the deletion of a single edge works as follows: Build the oracle data structure of Bernstein and Karger [10]. For each vertex v, consider its shortest paths tree Tv . Delete each tree-edge once and query the distance from v to u in G \ e for all vertices u in the subtree of the deleted tree-edge. By keeping track of the maximum distances, the diameter of G after a single edge deletion is computed exactly. As there are n − 1 edges in Tv , we spend O(n2 ) time for each vertex. Thus, the trivial algorithm requires O(n3 ) time. In this section, we improve upon this result as follows. I Theorem 10. Let G = (V, E) be a directed or undirected unweighted graph with n vertices and m edges, let ε > 0, and let D be the diameter of G. There exists a data structure that given a single edge e ∈ E returns for G \ e in constant time (1) the diameter, (2) the radius, and (3)pthe eccentricity of any vertex v ∈ V within an approximation ratio of 1 + ε. It takes Õ(n1.5 Dm/ε + mn) preprocessing time to build this data structure. The rest of this section is devoted to the proof of the theorem. We give the proof of the theorem for directed graphs and point out the same proof also works for undirected graphs. We first describe how we can answer queries for the eccentricity of a fixed vertex v ∈ V after a single edge deletion. After this, we explain how to extend this algorithm to solve the diameter and the radius problems after single edge deletions, and analyse the correctness and running time of the algorithm. The data structure preprocesses the answers to all queries. Then queries can be answered via table lookup in O(1) time. Preliminaries. Let G = (V, E) be a directed unweighted graph. For two vertices u, u0 ∈ V we denote the distance of u and u0 in G by dG (u, u0 ). For an edge e ∈ E and vertices u, u0 ∈ V , we denote the distance in the graph G \ e by dG\e (u, u0 ). Given a tree T with root v and a tree-edge e ∈ T , we denote the subtree of T that is created when e is removed from T and that does not contain v by Te . We let de be the height of Te . A node u in T has level i, if dG (v, u) = i. Let F ∈ N be some suitably chosen parameter (see the last paragraph* of this section). Then given a tree T with root v, we call a tree-edge e high, if both of its endpoints have level less than F from v; we call all other edges low. We denote the set of all high edges by T< , i.e., T< = {e = (w, w0 ) ∈ T : dG (v, w) < F, dG (v, w0 ) < F }; the set of all low edges is given by T> . The Algorithm. Our data structure preprocesses the answers to all queries, and then queries can be answered via table lookup in O(1) time. The preprocessing has three steps: First, in the initialization phase, we compute several subsets of vertices that are required in the next steps. Second, we compute the eccentricity of v after the deletion of a high edge exactly. We compute it exactly, since after the deletion of a tree-edge high up in the shortest path tree Tv of v, the nodes close to v in Tv might “fall down” a lot. This possibly affects all vertices in the corresponding subtrees and, hence, we need to be careful which changes occur after deleting a high edge. On the other side, the relative distance of nodes which are “far away” from v in G before any edge deletion cannot increase too much. Thus, we simply estimate their new distances XX:11 XX:12 Conditional Hardness for Sensitivity Problems in the third step. More precisely, in the third step we compute a (1 + ε)-approximation of the eccentricity of v after the deletion of a low edge. Step 1: Initialization. We build the data structure of Bernstein and Karger [10], in mn time which for each triplet (u, v, e) can answer queries of the form dG\e (u, v) in O(1) time. We compute the shortest path tree T = Tv of v in time O(nm) and denote its depth by dv . By traversing T bottom-up, we compute the height de of the subtree Te for each tree-edge e; this takes time O(n). We further construct the sets T< and T> of high and low tree-edges, respectively. Fix ε > 0. We construct a set Sv ⊂ V as follows: First add v to Sv . Then add each u ∈ V which has the following two properties: (1) u is at level iεF for some integer3 i > 0 and (2) there exists a node u0 in the subtree of u in Tv , such that u0 has distance εF/2 in Tv from u. Note that we can add the root, but every other node we add can be charged to 2n the εF/2 parent nodes that come before it. Thus, we can have at most 1 + εF nodes in Sv . Note that for every z ∈ V there exists a y ∈ Sv , s.t. y is an ancestor of z in Tv and there exists a path from y to z in Tv of length at most εF . Using a second bottom-up traversal of T , for each tree-edge e ∈ T , we compute the set Se = Te ∩ Sv , i.e., the intersection of the vertices in Te and those in Sv . This can be done in O(n) time by, instead of storing Se explicitly for each edge e = (w, w0 ), storing a reference to the set containing the closest children of w0 which are in Sv ; then Se can be constructed in O(|Se |) time by recursively following the references. For each non-tree-edge e, we store dv as the value for the eccentricity of v when e is deleted. Step 2: Handling high edges. For each level j = 1, . . . , F − 1, we proceed as follows. We consider each tree-edge e = (w, w0 ) ∈ T< with d(v, w) < d(v, w0 ) = j, there are at most n of these. We build a graph Ge containing all nodes of Te together with a additional directed path P of length de + 4 with startpoint r. The nodes in P are new vertices added to Ge . Each edge on P has weight 1, except the single edge incident to r, which has weight dG (v, w0 ) − 1. Additionally to the path, the graph contains as edges: (1) all edges from E, which have both endpoints in Te , and (2) for each e = (z, z 0 ) which has its startpoint z 6∈ Te and its endpoint z 0 ∈ Te , an edge (z 00 , z 0 ), where z 00 is the node on P with distance dG (v, z) from r. Observe that Ge has the property that all distances after the deletion of e are maintained exactly: By construction, the shortest path from r to u ∈ Te in Ge has exactly length dG\e (v, u) (we prove this formally in Lemma 11). After building Ge , we compute its depth starting from node r and store this value for edge e. Step 3: Handling low edges. For each tree-edge e = (w, w0 ) ∈ T> , we do the following: Let S = Se ∪ {w0 }. As answer for a deleted edge e, we store max{dv , (1 + ε) maxy∈S dG\e (v, y)}. To determine dG\e (v, y), we use the data structure of [10]. Extension to (1+ε)-approximate Diameter and Radius. We repeat the previously described procedure for all v ∈ V (but we build the data structure for Bernstein and Karger only once). To compute the diameter, we keep track of the maximum value we encounter for each deleted edge e. To compute the radius, we keep track of the minimum value we encounter for each deleted edge e. 3 For readability we leave out the floors, however, we are considering the integer levels biεF c. M. Henzinger, A. Lincoln, S. Neumann and V. Vassilevska Williams Correctness. Observe that it is enough to show correctness for a fixed v ∈ V . We first prove the correctness of the algorithm after removing high edges. I Lemma 11. After the deletion of a high edge e ∈ T< , we compute the eccentricity of v exactly. Proof. Consider any vertex u ∈ Te and consider the shortest path p from v to u in G \ e. We can assume that p has exactly one edge (z, z 0 ), s.t. z 6∈ Te and z 0 ∈ Te : Assume that there is a path p0 with two edges (x, x0 ) and (y, y 0 ), s.t. x, y 6∈ Te , x0 , y 0 ∈ Te and y appears later on p0 than x. Since y 6∈ Te , there exists a path from v to y that does not use any vertex from Te and that is of the same length as the subpath of p0 from v to y in T , because T is a shortest-path tree with root v. Hence, we can choose a path to y without entering Te . Let z, z 0 be as before. Then dG\e (v, u) = dG\e (v, z) + 1 + dG (z 0 , u). By construction of Ge , there exists a vertex on P in Ge with distance dG\e (v, z) from r and which has an edge to z 0 . All paths which only traverse vertices from Te are unaffected by the deletion of e. Hence, in Ge there exists a path of length dG\e (u, v). Also, there is no shorter path in Ge from r to u, because this would imply a shorter path in G \ e by construction. J Next we prove the correctness of the algorithm after the removal of low edges. Consider a tree-edge e = (w, w0 ) ∈ T> with F ≥ d(v, w0 ) > d(v, w). Let S = Se ∪ {w0 }. I Lemma 12. For each node z ∈ Te , there exists a vertex y ∈ S s.t. dG\e (y, z) ≤ εF . Proof. Since w0 ∈ S, the claim is true for all nodes z ∈ Te with d(w0 , z) ≤ εF . By construction of Sv , any (directed) tree path of length εF contains a node of Sv . For any node z ∈ Te with d(w0 , z) > εF , there exists an ancestor u of z in Te with d(u, z) ≤ εF . The path from u to z is a directed tree path and, thus, must contain a node in Sv . Thus, for each node in Te there is a path of length at most εF from some node in Sv . J I Lemma 13. Consider two vertices y, z ∈ Te and assume there exists a path from y to z in G \ e. Then dG\e (y, z) ≤ X implies dG\e (v, z) ≤ dG\e (v, y) + X. Proof. Concatenate the shortest paths from v to y in G \ e and from y to z in G \ E, which both avoid e. This path cannot be shorter than the shortest path from v to z in G \ e. J We define the maximum height achieved by the vertices of Te in G \ e by n(v, e) = max dG\e (v, z). z∈Te Notice that the eccentricity of v in G \ e is given by max{dv , n(v, e)}. Hence, by giving a (1 + ε)-approximation of n(v, e), we obtain a (1 + ε)-approximation for the eccentricity of v in G \ e. In the remainder of this subsection, we show this guarantee on the approximation ratio of n(v, e). I Lemma 14. n(v, e) ≤ (1 + ε) maxy∈S dG\e (v, y). XX:13 XX:14 Conditional Hardness for Sensitivity Problems Proof. Let z 0 be any vertex in Te such that dG\e (v, z 0 ) = n(v, e). By Lemma 12 there exists a vertex y 0 ∈ S with dG\e (y 0 , z 0 ) ≤ εF . Then by Lemma 13, n(v, e) = dG\e (z 0 , v) ≤ dG\e (v, y 0 ) + εF ≤ max dG\e (v, y) + εdG (v, w0 ) y∈S ≤ (1 + ε) max dG\e (v, y), y∈S where in the second last step we used F ≤ dG (v, w0 ) and in the last step we used that w0 ∈ S. J I Lemma 15. (1 + ε) maxy∈S dG\e (v, y) ≤ (1 + ε)n(v, e). Proof. This follows from the definition of n(v, e), since S is a subset of the vertices in Te . J Running Time Analysis. Let us first consider the time spent on step 1, preprocessing. We build the data structure of Bernstein and Karger [10] in time Õ(mn). For each node v, computing the shortest path tree of v takes time Õ(m) and we spend time O(n) computing the heights of the subtrees of T and computing the sets T< , T> , Sv . The sets Se can as well be computed in O(n) time by storing them only implicitly. Now let us consider the time spent on step 2, the high edges. For the high edges e at level j ≤ F , observe that the trees Te are mutually disjoint. Hence, for a fixed level j, in time Õ(m) we can compute the depths of all graphs Ge with e at level j. Since we have to do this for each level less than F , the total time for this step is Õ(F m). Finally, let us consider the time spent on step 3, the low edges. For all low edges at level n j > F , we query all nodes of Sv with height more than j. These are O( εF ) many such nodes. n Thus, the total time we spend for all edges in T is O(dv · εF ). To compute the diameter, we have to execute the above steps once for each v ∈ V , but we only need to build the data structure of Bernstein and Karger once. Hence, the q total time is Õ(mn + F mn + ndv · n εF ). Denote the diameter of G by D. Then setting F = p p yields a total running time of Õ(n1.5 Dm/ε + mn). Since D ≤ n, this is Õ(n2 m/ε). Dn εm References 1 2 3 4 5 6 Amir Abboud and Søren Dahlgaard. Popular conjectures as a barrier for dynamic planar graph algorithms. In FOCS, 2016. Amir Abboud, Fabrizio Grandoni, and Virginia Vassilevska Williams. Subcubic equivalences between graph centrality problems, APSP and diameter. In SODA, pages 1681–1697, 2015. Amir Abboud and Virginia Vassilevska Williams. Popular conjectures imply strong lower bounds for dynamic problems. In FOCS, pages 434–443. IEEE, 2014. Amir Abboud, Virginia Vassilevska Williams, and Huacheng Yu. Matching triangles and basing hardness on an extremely popular conjecture. In STOC, pages 41–50, 2015. V. L. Arlazarov, E. A. Dinic, M. A. Kronrod, and I. A. Faradzev. On economical construction of the transitive closure of an oriented graph. Soviet Math. Dokl., 11:1209–1210, 1970. Surender Baswana, Keerti Choudhary, and Liam Roditty. Fault tolerant reachability for directed graphs. In DISC, pages 528–543, 2015. M. Henzinger, A. Lincoln, S. Neumann and V. Vassilevska Williams 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 Surender Baswana, Keerti Choudhary, and Liam Roditty. Fault tolerant subgraph for single source reachability: Generic and optimal. In STOC, pages 509–518, 2016. Surender Baswana and Neelesh Khanna. Approximate shortest paths avoiding a failed vertex: Near optimal data structures for undirected unweighted graphs. Algorithmica, 66(1):18–50, 2013. Surender Baswana, Utkarsh Lath, and Anuradha S. Mehta. Single source distance oracle for planar digraphs avoiding a failed node or link. In SODA, pages 223–232, 2012. Aaron Bernstein and David Karger. A nearly optimal oracle for avoiding failed vertices and edges. In STOC, pages 101–110, 2009. Davide Bilò, Fabrizio Grandoni, Luciano Gualà, Stefano Leucci, and Guido Proietti. Improved purely additive fault-tolerant spanners. In ESA, 2015. Davide Bilò, Luciano Gualà, Stefano Leucci, and Guido Proietti. Fault-tolerant approximate shortest-path trees. In ESA, 2014. Davide Bilo, Luciano Guala, Stefano Leucci, and Guido Proietti. Compact and fast sensitivity oracles for single-source distances. In ESA, 2016. Davide Bilò, Luciano Gualà, Stefano Leucci, and Guido Proietti. Multiple-edge-faulttolerant approximate shortest-path trees. In STACS, pages 18:1–18:14, 2016. Gilad Braunschvig, Shiri Chechik, and David Peleg. Fault tolerant additive spanners. In WG, 2012. Marco L. Carmosino, Jiawei Gao, Russell Impagliazzo, Ivan Mihajlin, Ramamohan Paturi, and Stefan Schneider. Nondeterministic extensions of the strong exponential time hypothesis and consequences for non-reducibility. In ITCS, pages 261–270, 2016. T. M. Chan. More algorithms for all-pairs shortest paths in weighted graphs. In STOC, pages 590–598, 2007. Shiri Chechik, Sarel Cohen, Amos Fiat, and Haim Kaplan. 1 + ε-approximate f -sensitive distance oracles. In SODA, 2017. Shiri Chechik, Michael Langberg, David Peleg, and Liam Roditty. f-sensitivity distance oracles and routing schemes. Algorithmica, 63(4):861–882, 2012. Keerti Choudhary. An optimal dual fault tolerant reachability oracle. In ICALP, pages 130:1–130:13, 2016. Søren Dahlgaard. On the hardness of partially dynamic graph problems and connections to diameter. In ICALP, pages 48:1–48:14, 2016. Ran Duan and Seth Pettie. Dual-failure distance and connectivity oracles. In SODA, pages 506–515, 2009. Ran Duan and Seth Pettie. Connectivity oracles for failure prone graphs. In STOC, pages 465–474, 2010. Ran Duan and Seth Pettie. Connectivity oracles for graphs subject to vertex failures. In SODA, 2017. François Le Gall. Powers of tensors and fast matrix multiplication. In ISSAC, pages 296–303, 2014. Fabrizio Grandoni and Virginia Vassilevska Williams. Improved distance sensitivity oracles via fast single-source replacement paths. In FOCS, pages 748–757, 2012. Monika Henzinger, Sebastian Krinninger, Danupon Nanongkai, and Thatchaphol Saranurak. Unifying and strengthening hardness for dynamic problems via the online matrix-vector multiplication conjecture. In STOC, pages 21–30, 2015. Monika Henzinger and Stefan Neumann. Incremental and fully dynamic subgraph connectivity for emergency planning. In ESA, 2016. Russell Impagliazzo and Ramamohan Paturi. On the complexity of k-sat. J. Comput. Syst. Sci., 62(2):367–375, 2001. XX:15 XX:16 Conditional Hardness for Sensitivity Problems 30 Russell Impagliazzo, Ramamohan Paturi, and Francis Zane. Which problems have strongly exponential complexity? J. Comput. Syst. Sci., 63(4):512–530, 2001. 31 A. Itai and M. Rodeh. Finding a minimum circuit in a graph. SIAM J. Computing, 7(4):413–423, 1978. 32 Tsvi Kopelowitz, Seth Pettie, and Ely Porat. Higher lower bounds from the 3sum conjecture. In SODA, pages 1272–1287, 2016. 33 E. Nardelli, G. Proietti, and P. Widmayer. A faster computation of the most vital edge of a shortest path. Information Processing Letters, 79(2):81–85, 2001. 34 Merav Parter. Dual failure resilient BFS structure. In PODC, pages 481–490, 2015. 35 Merav Parter and David Peleg. Fault tolerant approximate bfs structures. In SODA, pages 1073–1092, 2014. 36 Mihai Patrascu. Towards polynomial lower bounds for dynamic problems. In STOC, pages 603–610, 2010. 37 Mihai Patrascu and Mikkel Thorup. Planning for fast connectivity updates. In FOCS, pages 263–271, 2007. 38 L. Roditty and U. Zwick. Replacement paths and k simple shortest paths in unweighted directed graphs. In ICALP, pages 249–260, 2005. 39 Liam Roditty and Uri Zwick. Replacement paths and k simple shortest paths in unweighted directed graphs. ACM Trans. Algorithms, 8(4):33, 2012. 40 Virginia Vassilevska Williams. Faster replacement paths. In SODA, pages 1337–1346, 2011. 41 Virginia Vassilevska Williams. Multiplying matrices faster than Coppersmith-Winograd. In STOC, pages 887–898, 2012. 42 Virginia Vassilevska Williams and Ryan Williams. Subcubic equivalences between path, matrix and triangle problems. In FOCS, pages 645–654, 2010. A A.1 Appendix Definitions of the Problems We give definitions of the problems we consider in this paper in Table 1. A.2 A Note on Terminology The terminology used in the literature for dynamic data structures in the spirit of Section 1 is not consistent. The phrases which are used contain “fault-tolerant algorithms”, “algorithms with sensitivity”, “algorithms for emergency planning” and “algorithms for failure prone graphs”. In the community of spanners and computational graph theory, it is common to speak about “fault-tolerant subgraphs”. In this area, this term is used consistently. In the dynamic graph algorithms community, multiple phrases have been used to describe algorithms for the model proposed in Section 1. First, the field was introduced by [37] as algorithms for “emergency planning”. Later, the terminologies “sensitivity” and “failure prone graphs” were used (e.g., [19, 18, 23, 24]). When the number of failures in the graph was fixed (e.g. 1 or 2), then often this was stated explicitly (without further mentioning sensitivity or failure prone graphs). However, it appears that in the dynamic graph algorithms community the phrase “sensitivity” is the most widely used one. M. Henzinger, A. Lincoln, S. Neumann and V. Vassilevska Williams Maintain Directed graph Directed graph and a fixed source vertex s. Problem Update Reachability Edge insertions/deletions #SSR Edge insertions/deletions Query Given two vertices u, v, can v be reached from u? How many vertices can be reached from s? Strong Connectivity (SC) Edge insertions/deletions Is the graph strongly connected? 2 Strong Components (SC2) Directed graph Edge insertions/deletions Are there more than 2 SCCs? 2 vs k Strong Components (AppxSCC) Directed graph Edge insertions/deletions Is the number of SCCs 2 or more than k? Maximum SCC Size (MaxSCC) Directed graph Edge insertions/deletions What is the size of the largest SCC? Subgraph Connectivity Fixed undirected graph, Turn on/off vertex Given two vertices u, v, with some vertices on and are u and v connected by a path some off. only traversing vertices that are on? α-approximate Shortest Paths Directed or undirected Edge insertions/deletions Given two vertices u, v, (possibly weighted) graph return an α-approximation of the length of the shortest path from u to v. α-approximate Eccentricity Undirected graph Edge insertions/deletions Given a vertex u, return an α-approximation of the eccentricity of v. α-approximate Radius Undirected graph Edge insertions/deletions Return an α-approximation of the radius of the graph. α-approximate Diameter Undirected graph Edge insertions/deletions Return an α-approximation of the diameter of the graph. Bipartite Perfect Matching (BPMatch) Undirected bipartite graph Edge insertions/deletions Does the graph have a perfect matching? Bipartite Maximum Weight Matching (BWMatch) Undirected bipartite graph Edge insertions/deletions Return the weight of the with integer edge weights maximum weight perfect matching. Table 1 The problems we consider in this paper. Directed graph XX:17 XX:18 Conditional Hardness for Sensitivity Problems A.3 A Note on Adversaries Some of the conditional lower bounds we obtain are for randomized algorithms. Previous literature [3, 27, 32] also gave conditional lower bounds for randomized dynamic algorithms; however, it was not discussed under which kind of adversary the obtained lower bounds hold. This depends on the conjecture from which the lower bound was obtained. We observe that in reductions from the static triangle problem, the only randomness is over the input distribution of the static problem. Hence, for lower bounds from the triangle conjecture, we can assume an oblivious adversary. Furthermore, we assume the OMv conjecture in its strongest possible form, i.e. for oblivious adversaries. (In [27] the authors did not explicitly state which kind of adversary they assume for their conjecture.) Thus, all conditional lower bounds we obtain for randomized algorithms hold for oblivious adversaries. Note that a lower bound which holds for oblivious adversaries must always hold for non-oblivious ones. We would like to point out another subtlety of our lower bounds: In reductions from the triangle detection conjecture, the running time of the algorithm is assumed to be a random variable, but the algorithm must always answer correctly. However, in reductions from OMv the running time of the algorithm is determinstic, but the probability of obtaining a correct answer must be at least 2/3. A.4 Our Lower Bounds In Table 2 we summarize summarize our lower bounds for sensitivity data structures. Table 3 states our lower bounds for static oracle data structures. A.5 Existing Sensitivity Data Structures In Table 4 we summarize existing sensitivity data structures. In the table, we also list algorithms for “fault-tolerant subgraphs” although they are not algorithms for the sensitivity setting in the classical sense. However, the fault-tolerant subgraphs are often much smaller than the input graphs and by traversing the fault-tolerant subgraph during queries, one can obtain better query times than by running the static algorithm on the original graph. Unfortunately, the construction time of these subgraphs is often very expensive, though still polynomial; the goal of these papers is to optimize the trade-offs between the size of the subgraphs and the approximation ratios achieved for the specific problem. It is striking that (to the best of our knowledge) most of the existing algorithmic work was obtained for the case of decremental algorithms with a limited number of failures. While this is natural for the construction of fault-tolerant subgraphs, this is somewhat surprising from an algorithmic point of view. Our lower bounds might give an explanation of this phenomenon as they indicate that for many problems there is a natural bottleneck when it comes to the insertion of edges. M. Henzinger, A. Lincoln, S. Neumann and V. Vassilevska Williams Problem Inc/Dec Reachability Reach., SC, BPMatch (3/2 − ε)-sh. paths (und. unw.) (7/5 − ε)-sh. paths (und. unw.) #SSR reachability, (4/3 − ε)-diameter for sparse graphs SC2, AppxSCC, and MaxSCC subgraph conn. ( =⇒ reachability, BPMatch, SC) (2 − ε)-sh. paths (5/3 − ε)-sh. paths ( =⇒ BWMatch) Inc Inc Inc Inc Inc Inc Inc Inc Query Type ss st ss Lower Bounds p(m, n) u(m, n) q(m, n) n3−ε n2−ε n2−ε 3−ε 2−ε n n n2−ε n3−ε n2−ε n2−ε XX:19 Sens. Conj. Cite 1 2 1 BMM BMM Theorem 5 [3] Theorem 5 st n3−ε n2−ε n2−ε 2 BMM Theorem 5 ss ST st nt nt poly(n) m1−ε n1−ε n2−ε m1−ε n1−ε n2−ε K(ε, t) K(ε, t) ω(log n) SETH SETH SETH Lemma 18 Lemmas 20 and 19 [3] poly(n) m1−ε m1−ε ω(log n) SETH [3] poly(n) poly(d) d1−ε d OMv Theorem 21 n2−ε poly(n) poly(n) n1−ε poly(d) poly(d) d1−ε d1−ε d1−ε d d d 3SUM OMv OMv [32] Theorem 21 Theorem 21 ss st diameter (4/3 − ε), und. unw. Dec n3−ε n2−ε n2−ε 1 BMM 3−ε 2−ε dir. & und. w. Dec n n n2−ε 1 APSP (4/3 − ε)-ecc. Dec n3−ε n2−ε n2−ε 1 BMM 3−ε 2−ε 2−ε weighted-ecc. Dec n n n 1 APSP shortest paths dir. w. Dec st n3−ε n2−ε n2−ε 1 APSP 3−ε 2−ε 2−ε und. w. Dec st n n n 2 APSP reachability Dec st n3−ε n2−ε n2−ε Ω(log n) BMM ( =⇒ SC, BPMatch) BMM 3−ε 2−ε 2−ε shortest paths Dec st n n n Ω(log n) BMM (undir. unw.) subgraph conn. Dec st poly(n) poly(d) d1−ε d OMv ( =⇒ reachability, BPMatch, SC) n2−ε n1−ε d1−ε d 3SUM (2 − ε)-sh. paths Dec ss poly(n) poly(d) d1−ε d OMv (5/3 − ε)-sh. paths Dec st poly(n) poly(d) d1−ε d OMv ( =⇒ BWMatch) Table 2 The conditional lower bounds we obtained for non-zero sensitivity. Problems for which there exists a tight upper bound are marked bold. Regarding the sensitivities, the lower bounds hold for any data structure that supports at least the sensitivity given in the table; d is a parameter that can be picked arbitrarily, and K(ε, t) is a constant depending on properties of SAT and the allowed preprocessing time (see Section 4). Lower bounds for constant sensitivities hold in particular for any dynamic algorithm which allows for any larger fixed constant sensitivity or sensitivity ω(1). For the query type we use the following abbreviations: st – fixed source and sink, ss – single source, ap – all pairs, ST – a fixed set of sources and a fixed set of sinks. The rest of the abbreviations are as follows: sh. paths means shortest paths, conn. means connectivity, SC means strongly connected components, SC2 means whether the number of strongly connected components is more than 2, Reach. means Reachability, BPMatch is bipartite matching, BWMatch is bipartite maximum weight matching, ecc. is eccentricity, dir. means directed, und. means undirected, w. means weighted, unw. means unweighted, Conj. means Conjecture. Theorem 5 Section 3 Theorem 5 Lemma 17 [42] Section 3 [3] [3] Theorem 5 Theorem 21 [32] Theorem 21 Theorem 21 XX:20 Conditional Hardness for Sensitivity Problems Problem Inc/Dec/ Static static static static Query Type ap ap st Lower Bounds p(m, n) u(m, n) q(m, n) n3−ε n2−ε 3−ε n n2−ε n3−ε n2−ε Conj. Cite Reach. BMM Theorem 5 (5/3 − ε)-sh. paths BMM Theorem 5 Repl. paths APSP Section A.7 (1 edge fault) (dir. w.) Table 3 The conditional lower bounds we obtained for static oracle data structures, i.e., data structures with zero sensitivity. Problems for which there exists a tight upper bound are marked bold. The query type “ap” denotes all pairs queries, Repl. means replacement, the rest of the abbreviations are as in Table 1. Dec ap-Connectivity Dec ap-SubgraphConn Inc ap-SubgraphConn Fully Dynamic ap-SubgraphConn Dec ss-Reachability (implies SCC, dominator tree) Dec ss-SP undirected unweighted Approx. Space n d1−2/c mn1/c dm m n2 n2 m n n n 2d n Upper Bounds p(m, n) u(m, n) poly(n) d d1−2/c mn1/c d4+2c mn mn n3 n3 m m n poly(n) 2d mn q(m, n) 1 d d3 d2 d2 d4 1 d d d d2 n 1 1 1 2d n Sensitivity d d d d d d 1 1 2 d Ref. [37] [23] [24] [24] [28] [28] [6] [9] [20] [7] Remark Any c ∈ N can be picked; space simplified. Deterministic. Randomized. Uses [24] as a blackbox. Subgraph. Oracle. Planar graph. Allows for vertex failures. Subgraph. Reasonable for d = o(log(m/n)). 3 n m 1 1 [8] Oracle. 1+ε n/ε3 1 1 [8] Oracle. 5/3 5/3 exact n poly(n) 1 n 2 [34] More robust BFS tree. directed unweighted exact n2 nω 1 1 1 [26] Algorithm and oracle. undirected weighted 1+ε m + n/ε mn 1/ε 1 [13] Oracle. 2 m mn 1 1 [13] Oracle. 2 2O + 1 dn dm d d [14] Oracle. Table 4 Upper Bounds. We omit polylog factors in the stated running times and spaces usages. We use the following abbreviations: “ap” means “all pairs”, “ss” means “single source”, “st” denotes problems with a fixed source and a fixed sink. Oracles combine update and query into a single operation. For algorithms with an additive approximation guarantee, we included the optimal result O; all other approximation algorithms achieve multiplicative approximation guarantees. See table 5 for APSP upper bounds. M. Henzinger, A. Lincoln, S. Neumann and V. Vassilevska Williams Problem XX:21 XX:22 Dec APSP unweighted undirected Approx. O+2 O+4 O + 10 O + 14 (2k − 1)(1 + ε) 3 Space n5/3 n3/2 n7/5 n4/3 Upper Bounds p(m, n) u(m, n) poly(n) poly(n) poly(n) poly(n) 1 1 1 1 4 −1 kn1+(kε ) n dn n/ε2 q(m, n) Sensitivity Ref. n5/3 n3/2 n7/5 n4/3 1 1 1 1 [11] [11] [11] [11] k Remark Additive Additive Additive Additive spanner. spanner. spanner. spanner. Oracle. Any k > 1 and ε > 0. Spanner. 3(d + 1)O + (d + 1) log n Spanner. non-negative weights, undirected 1+ε Spanner. Vertex and edge deletions. weighted, undirected (8k + 2)(d + 1) dkn1+1/k poly(n) d d [19] Oracle. Any k ∈ N. 1+ε dn2 (log n/ε)d dn5 log(n/ε)d d5 d [18] Oracle. 2.88 weighted, directed exact Mn n0.7 1 [26] Oracle. Weights: {−M, . . . , M }. Simplified running times. exact n2 mn 1 1 [10] Oracle. exact n2 poly(n) 1 2 [22] Oracle. 4/3 4/3 O+d dn poly(n) 1 n d [15] Additive spanner. Table 5 Upper Bounds for APSP. We omit polylog factors in the stated running times and spaces usages. For algorithms with an additive approximation guarantee, we included the optimal result O; all other approximation algorithms achieve multiplicative approximation guarantees. poly(n) poly(n) poly(n) 1 1 1 n dn n/ε2 1 1 d 1 [8] [35] [35] [12] Conditional Hardness for Sensitivity Problems Problem M. Henzinger, A. Lincoln, S. Neumann and V. Vassilevska Williams A.6 Triangle Detection Proofs We provide full details of the reachability and shortest paths sensitivity results from Theorem 5. Reachability Let G = (V, E) be an undirected unweighted graph for Triangle Detection. We create four copies of V denoted by V1 , V2 , V3 , V4 , and for i = 1, 2, 3, we add edges between nodes ui ∈ Vi and vi+1 ∈ Vi+1 if (u, v) ∈ E. For a fixed source s ∈ V and sink t ∈ V , Abboud and Williams [3] give the following reduction: For each vertex v ∈ V , they insert the edges (s, v1 ) and (v4 , t), and query if there exists a path from s to t. They show that there exists a triangle in G iff one of the queries is answered positively. We observe that this reduction requires n batch updates of size 2 and n queries. Hence, it holds for sensitivity 2. Now keep s fixed, but remove the sink t, and allow single-source reachability queries4 . We perform a stage for each v ∈ V , in which we add the single edge (s, v1 ) and query if there exists a path from s to v4 . By the same reasoning as before, there exists a triangle in G iff one of the queries returns true. The reduction requires n updates of size 1 and n queries. Thus, it has sensitivity 1. Finally, we remove the source node s and ask all-pairs reachability queries5 . We perform a stage for each v ∈ V , which queries if there exists a path from v1 to v4 . There exists a triangle in G iff one if the queries returns true. This reduction has sensitivity 0, i.e., it uses no updates, and n queries. Hence, we have derived a very simple conditional lower bound for static reachability oracles. These reductions prove the first three results of Theorem 5. Shortest Paths The above reduction for st-reachability can be easily altered to work for (7/5−ε)-approximate st-shortest paths in undirected unweighted graphs (for any ε > 0) with the same running time lower bounds: Just observe that the graphs in the reduction are bipartite. Thus, either there is a path from s to t of length 5 and there is a triangle in the original graph, or the shortest path between s and t has length at least 7. Thus distinguishing between length 7 and 5 solves the triangle problem. To obtain a lower bound for (3/2 − ε)-approximate ss-shortest paths, we take the construction for ss-reachability and again observe that the graph is bipartite so that if there is no path of length 4 between s and a node v ∈ V , then the shortest path between them must have length at least 6. With the same bipartiteness observation, we obtain a conditional lower bound for (5/3−ε)approximate static ap-shortest paths. In a stage for node v ∈ V , we query the shortest path from v1 to v4 . The query returns 3 if there exists a triangle in the original graph containing the vertex v and ≥ 5 otherwise. Thus, distinguishing between 3 and ≥ 5 suffices to solve the problem. Finally, let us discuss how we obtain a lower bound for incremental shortest paths with sensitivity 1 in directed graphs. Vassilevska Williams and Williams [42] reduce BMM to the 4 5 Given v ∈ V , a query returns true iff there exists a path from s to v. Given two nodes u, v ∈ V , a query returns true iff there exists a path from u to v. XX:23 XX:24 Conditional Hardness for Sensitivity Problems replacement paths problem in directed unweighted graphs: given a directed graph G on m edges and n nodes and two nodes s and t, compute for every e ∈ E, the distance between s and t in G \ {e}. [42] shows that if a combinatorial algorithm can solve the latter problem in O(mn1/2−ε ) time for any ε > 0 (for any choice of m as a function of n), then BMM has a √ truly subcubic combinatorial algorithm. This showed that the O(m n) time algorithm of Roditty and Zwick [39] is tight. Here we observe that the [42] reduction immediately implies a 1-sensitivity oracle lower bound, as any 1-sensitivity oracle for st distances must be able to answer the replacement paths problem by querying the less than n nodes on the shortest s-t path: either the preprocessing time is at least mn0.5−o(1) or the query time is at least m/n0.5+o(1) . For dense graphs this gives a lower bound of either n2.5−o(1) preprocessing or n1.5−o(1) query time. The lower bound is again tight via Roditty and Zwick’s algorithm [39] for replacement paths. A.7 All Pairs Shortest Paths Proofs We prove the statements of Theorem 7 in Lemma 16 and Lemma 17. I Lemma 16. Assuming the APSP conjecture, decremental st-shortest paths in undirected weighted graphs with sensitivity 2 cannot be solved with preprocessing time O(n3−ε ), and update and query times O(n2−ε ) for any ε > 0. Proof. We use a reduction similar to the reduction from APSP to RP from [42], but to deal with the undirected edges we add more weights and we add additional nodes to the graph. As in [42], we start by taking an instance of APSP and turning it into a tripartite graph for the negative triangle detection problem6 ; denote resulting graph H 0 . If H 0 has no negative edge weights, we are done (there are no negative triangles). If H 0 has negative edge weights, let M = min{w(e)|e ∈ EH 0 } and add −M + 1 to all edges (thus making all edges have positive weights). Now we want to detect if there is a triangle with (positive) weight less than −3M + 3. Denote the new graph by H and denote the three tripartite groups A, B and C; each set A, B and C has n nodes. We construct a graph G in which n shortest paths queries with two edge deletions determine if there exist any triangles with weight less than −3M + 3 in H. Let W = 4 max{w(e)|e ∈ EH } and observe that W is larger than the maximum possible difference in the weight of two triangles. We will use this weight to enforce that we must take certain paths. We add two vertices s and t to G. We add a path P 0 of length n to s, where each edge on the path has weight 0; the first node after s on P 0 is denoted c01 , the next node on P 0 is denoted c02 , and the i’th node on P 0 is denoted c0i . Next, we add a path P 00 of length n to t, where each edge on the path has weight 0; the first node after t on P 00 is denoted c00n , second node on P 00 is denoted c00n−1 and the ith node away from t on P 00 is denoted c00n−i+1 . We add the nodes in A, B and C from H to G and keep all edges from A × B and from B × C, however, we delete all edges from A × C. We increase the weight of all edges from A to B and of all edges from B to C by 6nW . We add edges between all nodes in A and all nodes on the path P 0 ; specifically, for all ai ∈ A and for all j ∈ [1, n], we add an edge (ai , c0j ) of weight (7n − j)W + w((ai , cj )). We further add edges from C to the path P 00 ; specifically, we add an edge from ci ∈ C to c00i of weight (6n + i)W . The resulting graph is given in Figure 1. 6 In the negative triangle detection problem we are given an edge-weighted graph G = (V, E) with possibly negative edge-weights from Z, and we must determine if G contains a triangle consisting of vertices u, v, x such that w(u, v) + w(v, x) + w(x, u) < 0. M. Henzinger, A. Lincoln, S. Neumann and V. Vassilevska Williams P’ s XX:25 P” A B C t bp ai cq c0j c00k Figure 1 The graph G. Note that all edges in the graph G either have weight 0 or their weight is from the range [6nW, 7nW + W/4]. All edges of weight 0 are on the paths P 0 and P 00 ; all paths from s to t must contain at least one edge from P 0 to A, one from A to B, one from B to C and finally one edge from C to P 00 . Each of the non-path-edges has weight from the range [6nW, 7nW + W/4] and we must take at least four of them in total. If we backtrack (and go from A back to P 0 or from B back to A, etc) then we must take at least six non-zero edges; hence, it is never optimal to backtrack since (7nW + W/4)4 < 66̇nW . We explain which n queries answer the negative triangle question in H. For each i = 1, . . . , n, we delete the edge (c0i , c0i+1 ) from path P 0 and the edge (c00i , c00i−1 ) from path P 00 , and we query the shortest path from s to t. Note that with these edges deleted to take only four “heavy” edges, one must leave from a c0j where j ≤ i and enter a c00k where k ≥ i. The length from s to c0j and from c00k to t is zero. So a shortest path from s to t has length (7n − j)W + w(ap , cj ) + w(ap , bq ) + 6nW + w(bq , ck ) + 6nW + (6n + k)W. Note that because W is large and we want to minimize the length of the shortest path, we want to maximize j and minimize k. Due to the deleted edges, the maximum plausible value of j is i and the minimum plausible value of k is i. In that case, the path length is (7n − i)W + w(ap , ci ) + w(ap , bq ) + 6nW + w(bq , ci ) + 6nW + (6n + i)W. This simplifies to 25nW + w(ap , ci ) + w(ap , bq ) + w(bq , ci ). If the length of the shortest st-path is less than 25nW − 3M + 3, then there exists a negative triangle in the graph H 0 containing ci . Otherwise, there is no such triangle. J I Lemma 17. Assuming the APSP conjecture, decremental diameter in undirected weighted graphs with sensitivity 1 cannot be solved with preprocessing time O(n3−ε ), and update and query times O(n2−ε ) for any ε > 0. Proof. As in [42] we start by taking an instance of APSP and turning it into a weighted tripartite graph for the negative triangle detection problem; denote the resulting graph for the negative triangle detection problem H 0 . XX:26 Conditional Hardness for Sensitivity Problems Let M be a positive integer such that all edges in H 0 have weights between −M and M . We increase all edge weights in H by 5M (thus making all edges have weight at least 4M ). We denote this new graph H and call the three tripartite groups X, Y and Z. Note that X, Y and Z each have n nodes. Now we want to detect if there is a triangle with weight less than 15M in H. We construct the graph G depicted in Figure 2 as follows. We create sets V1 and V4 containing copies of the nodes in X, the set V2 containing copies of the nodes from Y , and the set V3 containing copies of the nodes from Z. We additionally create two groups of vertices, A and B, containing copies of X. Finally, we add two vertices c and d to G. For convenience, we denote the different copies of xi ∈ X as follows: The copy in V1 as x1i , the B copy in V4 as x4i , the copy in A as xA i , and the copy in B as xi . V1 V2 c A V3 V4 d B Figure 2 The graph G0 . We introduce edges between V1 and V2 if the corresponding nodes in X and Y have an edge; the edges between V2 and V3 are determined by the edges between Y and Z; the edges between V3 and V4 are determined by the corresponding edges between nodes of X and Z. All edges we added to the graph have the same weight as their corresponding copies in H. Note that there are no edges between V1 and V3 , nor between V1 and V4 , nor between V2 and V4 . A For all i = 1, . . . , n, we add edges of weight 4M between x1i and xA i , and between xi and B xB i . Additionally, for all i = 1, . . . , n and all j = 1, . . . , n, we add an edge between xi and 4 xj of weight 4M . For all v ∈ V2 ∪ V3 ∪ A, we add an edge of weight 4M between c and v, and for all v ∈ V3 ∪ V4 ∪ B, we add an edge of weight 4M between d and v. We add edges with weight 4M to connect all vertices in A into a clique, and we do the same for B. Finally, we add an edge of weight 4M between c and d. Note that all edges in this graph have weights between 4M and 6M . Further note that in G all pairs of nodes have a path of length at most 12M between them. Our n queries are picked as follows: For all i = 1, . . . , n, we delete the edge between 4 xB i and xi and query the diameter. Observe that the only path lengths that could become greater than 12M are between the nodes in V1 and the node x4i . However, for all x1j where B 4 j = 6 i, the path x1j → xA j → xj → xi still has all of its edges, and there exists a path of length 12M for these vertices. Thus the only pair of vertices for the path length might increase is x1i to x4i . One must M. Henzinger, A. Lincoln, S. Neumann and V. Vassilevska Williams use at most three edges to obatain a path of length at most 15M (since any path with four hops has length at least 16M because every edge in G has weight at least 4M ). Hence, any path of length less than 15M between x1i and x4i must go from x1i to V2 to V3 to x4i . Thus, if a path of length less than 15M exists between x1i and x4i after the edge deletion between xB i and x4i , then there is a negative triangle in H 0 containing node xi . Thus, we can detect if any negative triangle exists in the tripartite graph H 0 by asking these n queries, determining for all xi ∈ X if a negative triangle containing xi exists. J 4 1 Note that if for all i = 1, . . . , n we delete edge (xB i , xi ), then the eccentricity of xi is less than 15M if and only if the diameter of the graph is less than 15M . Thus, this serves as lower bound for eccentricity as well. A.8 SETH Proofs I Lemma 18. Let ε > 0, t ∈ N. SETH implies that there exists no algorithm for incremental #SSR with sensitivity K(ε, t), which has preprocessing time O(nt ), update time u(n) and query time q(n), such that max{u(n), q(n)} = O(n1−ε ). Proof. Set δ = (1 − ε)/t. Assume that the k-CNFSAT formula F has c · ñ clauses for some constant c. Partition the clauses into K = c/δ groups of size δñ and denote these groups by G1 , . . . , GK . Further let U be a subset of the ñ variables of F of size δñ, and let Ū denote the set of all partial assignments to the variables in the U . We construct a graph G as the union of Dδ and Hδ . It consists of Ū and the set C of clauses. We direct the edges in Hδ from C to Ū , and add a directed edge from a node d ∈ Dδ to c ∈ C iff c ∈ d. We further add a single node s to the graph. The resulting graph has n = O(2δñ ) nodes and O(2δñ ñ) edges. We proceed in stages with one stage for each partial assignment to the variables in V \ U . At a stage for a partial assignment φ to the variables in V \ U , we proceed as follows: For each group Gi ⊂ C, we add an edge from s to the largest non-empty subset di of Gi which only contains clauses that are not satisfied by φ, i.e., to the set di = {c ∈ Gi : φ 6 c}; if di is empty, then we do not introduce an edge. Let D0 be the set of nodes di that received an edge from s and let d(s) = |D0 |. Note that d(s) ≤ K, since we introduce at most one edge for each of the K groups. Further, let B denote the number of clauses in C reachable from the PK sets di ∈ D0 , i.e., B = i=1 |di |. We query if the number of nodes reachable from s is less than d(s) + B + 2δñ . If the answer to the query is true, then we return that F is satisfiable, otherwise, we proceed to the next partial assignment to the variables in V \ U . We prove the correctness of the reduction: Assume that F is satisfiable. Then there exist partial assignments φ and φ0 to the variables in V \ U and U , such that φ · φ0 satisfies F . Hence, for each subset of clauses d ⊂ C we have that each clause c ∈ d is satisfied by φ or by φ0 . Thus, the node u ∈ Ū corresponding to φ0 cannot be reachable from s and there must be less than d(s) + B + 2δñ nodes reachable from s. Now assume that at a stage for the partial assignment φ the result to the query is true, i.e., less than d(s) + B + 2δñ nodes are reachable from s; namely d(s) at distance 1, B at distance 2, and less than 2δñ at distance 3. In this case, there must be a node u ∈ Ū which is not reachable from s: In Dδ there are exactly d(s) nodes reachable and in C there are exactly B nodes reachable by construction of the graph and definition of d(s) and B. This implies that for the partial assignment φ0 corresponding to u, each clause c ∈ C must be satisfied by φ or φ0 . Hence, F is satisfiable. Note that determining the sets di ∈ D0 can be done in time O(δñ2 ) per group Gi as for each clause we can check in time O(ñ) whether it is satisfied by φ. Thus the set D0 and the value B can be computed in total time O(cn) and the total time for all stages is XX:27 XX:28 Conditional Hardness for Sensitivity Problems O(21−δñ (ñ2 + Ku(n) + Kq(n)). If both u(n) and q(n) are O(n1−ε ) = O(2δñ(1−ε) ), then SAT can be solved in time O∗ (2ñ(1−εδ) ). J I Lemma 19. Let ε > 0, t ∈ N. SETH implies that there exists no (4/3 − ε)-approximation algorithm for incremental diameter with sensitivity K(ε, t), which has preprocessing time O(nt ), update time u(n) and query time q(n), such that max{u(n), q(n)} = O(n1−ε ). Proof. Set δ = (1 − ε)/t. During the proof we will assume that the k-CNFSAT formula F has c · ñ clauses for some constant c. We partition these clauses into K = c/δ groups of size δñ and denote these groups by G1 , . . . , GK . We construct a graph as follows: For U ⊂ V of size δñ we create the graph Hδ with the set of all partial assignments to the variables in U denoted by Ū and the set of clauses C. We also add the graph Dδ containing all the subsets of the groups Gi . Furthermore, we introduce four additional nodes x, y, z and t. Observe that the graph has O(2δñ ) vertices. We add an edge from x to each node in Ū . We connect y to all nodes in C and to all nodes in Dδ . We add further edges between a clause c and a set g ∈ Dδ if c ∈ g. We also add the following edges to E: {x, y}, {y, z} and {z, t}. Hence, we have O(2δñ ñ) edges in total. If during the construction of the graph we encounter that a clause is satisfied by all partial assignments in Ū , then we remove this clause. Also, if there exists a partial assignment from Ū which satisfies all clauses, we return that the formula is satisfiable. Thus, we can assume that each node in Ū must have an edge to a node in C and vice versa. We proceed in stages with one stage for each partial assignment to the variables in V \ U . Denote the partial assignment of the current stage by φ. For each Gi , we add an edge between t and the subset of Gi that contains all clauses of Gi which are not satisfied by φ, i.e., we add an edge between t and {c ∈ Gi : φ 6 c} for all i = 1, . . . , K. Hence, in each stage we have O(K) = O(1) updates. We query the diameter of the resulting graph. The diameter is 3, if the formula F is not satisfiable, and it is 4, otherwise. After that we remove the edges that were added in the update. We prove the correctness of our construction: Observe that via x and y all nodes from Ū ∪ C ∪ G have a distance of at most 3. From z we can reach all vertices of G and C via y within two steps and all nodes of Ū within three steps via y and x. From t we can reach all nodes of {x, y, z} ∪ C ∪ G within three steps using the path t → z → y → v, where v ∈ C ∪ Dδ ∪ {x}. Hence, all nodes in {x, y, z, t} ∪ C ∪ G have a maximum distance of 3. From ū ∈ Ū we can reach t in four steps with the path ū → x → y → z → t. Assume that for ū there exists a path ū → c → g → t, then by construction ū 6 c and φ 6 c, since c ∈ g. Hence, F is not satisfied by ū · φ. Thus, if the diameter is 3, then F is not satisfiable. On the other hand, if F is not satisfiable, then for each pair of partial assignments ū and φ, there must be a clause c which both partial assignments do not satisfy. Hence, there must be a path of the form ū → c → g → φ for some g with c ∈ g and g has an edge to t. Thus, if F is not satisfiable, then the graph has diameter 3. The sets di can be computed as in the previous proof. J I Lemma 20. Let ε > 0, t ∈ N. SETH implies that there exists no algorithm for incremental ST-Reach with sensitivity K(ε, t), which has preprocessing time O(nt ), update time u(n) and query time q(n), such that max{u(n), q(n)} = O(n1−ε ). Proof. We reuse the graph from the proof of Lemma 19. We update it by removing the vertices x, y, z. We further set S = Ū and T = {t}. We proceed in stages with one stage for each partial assignment to the variables in V \ U . Denote the partial assignment of the current stage by φ. For each Gi , we add an edge M. Henzinger, A. Lincoln, S. Neumann and V. Vassilevska Williams between t and the subset of Gi that contains all clauses of Gi which are not satisfied by φ, i.e. we add an edge between t and {c ∈ Gi : φ 6 c} for all i = 1, . . . , K. Hence, in each stage we have O(K) = O(1) updates. We query for ST-Reachability. If the answer is true, then F is not satisfiable, otherwise, it is. We prove the correctness of our construction: If F is not satisfiable, then for each pair of partial assignments ū and φ, there must be a clause c which both partial assignments do not satisfy. Hence, there must be a path of the form ū → c → g → φ for some g with c ∈ g and g has an edge to t. Thus, if F is not satisfiable, then all nodes in S will be able to reach t. On the other hand, assume that for ū there exists a path ū → c → g → t, then by construction ū 6 c and φ 6 c, since c ∈ g. Hence, F is not satisfied by ū · φ. Thus, if all nodes from S can reach t, then F is not satisfiable. The sets di can be computed as in the first proof of the section. J A.9 Conditional Lower Bounds For Variable Sensitivity In this section we prove conditional lower bounds for algorithms where the sensitivity is not fixed, but given a parameter d. Before we give our results, we shortly argue why this setting is relevant. First, several results were obtained in the setting with sensitivity d. Some of these results are by Patrascu and Thorup [37] for decremental reachability, by Duan and Pettie [23, 24] and by Henzinger and Neumann [28] for subgraph connectivity and by Chechik et al. [19, 18] for decremental all pairs shortest paths. Our lower bounds show that the results in [23, 24] and the incremental algorithm in [28] are tight. Second, when d is not fixed and we can prove a meaningful lower bound, this will help us understand whether updates or queries are more sensitive to changes of the problem instance. Third, when d is fixed to a constant, the problems might become easier in the sense that constant or polylogarithmic update and query times can be achieved. For example, for APSP with single edge failures one can achieve query and update times O(1) (see [10]); for APSP with two edge failures one can achieve query and update times O(log n) (see [22]). In these cases we cannot prove any non-trivial conditional lower bounds for them. However, with an additional parameter d we can derive conditional lower bounds which are polynomial in the parameter d. Our results are summarized in the following theorem. I Theorem 21. Under the OMv conjecture for any ε > 0, there exists no algorithm with preprocessing time poly(n), update time poly(d) and query time Ω(d1−ε ) for the following problems: 1. Decremental/incremental st-SubConn in undirected graphs with sensitivity d 2. decremental/incremental st-reach in directed graphs with sensitivity d, 3. decremental/incremental BP-Match in undirected bipartite graphs with sensitivity d, and 4. decremental/incremental SC in directed graphs with sensitivity d. 5. (2 − ε)-approximate ss-shortest paths with sensitivity d in undirected unweighted graphs, 6. (5/3 − ε)-approximate st-shortest paths with sensitivity d in undirected unweighted graphs, 7. BW-Matching with sensitivity d. Conditional Lower Bounds for Directed Graphs. We observe that some existing reductions can be used to obtain conditional lower bounds for sensitivity problems. In this section, we summarize the results that can be obtained this way. XX:29 XX:30 Conditional Hardness for Sensitivity Problems We call a reduction from a dynamic problem A to another dynamic problem B sensitivitypreserving if in the reduction a single update in problem A propagates to problem B as at most one update. We observe that the reductions in [3] from st-subgraph-connectivity to st-reachability (Lemma 6.1) and from st-reachability to BP-Match (Lemma 6.2) and SC (Lemma 6.4) are sensitivity-preserving. Henzinger et al. [27] give conditional lower bounds for the st-subgraph-connectivity problem with sensitivity d. The previous observations about sensitivity preserving reductions imply that we get the same lower bounds for st-reach, BP-Match and SC with sensitivity d. This implies the first four points of Theorem 21. The construction of the lower bound in [27] required d = mδ for some δ ∈ (0, 1/2]. This appears somewhat artifical, since in practice one would rather expect situations with much smaller values for d, e.g., d = O(1) or d = poly log(n). However, the lower bound is still interesting because it applies to all algorithms that allow setting d = mδ . For example, the sensitive subgraph connectivty algorithms of Duan and Pettie [23, 24] is tight w.r.t. to the above lower bound. Conditional Lower Bounds for Undirected Graphs. In this subsection, we prove the last three points of Theorem 21. We give a reduction from the γ-uMv-problem, which was introduced by Henzinger et al. [27]. The γ-uMv-problem is as follows: Let γ > 0. An algorithm for the γ-uMv problem is given an n1 × n2 binary matrix M with n1 = bnγ2 c, that can be preprocessed. Then two vectors u and v appear and the algorithm must output the result of the Boolean vector-matrix-vector-product ut M v. Henzinger et al. [27, Corollary 2.8] show that under the OMv conjecture for all ε > 0, no algorithm exists for the γ-uMv-problem that has preprocessing time poly(n1 , n2 ), computation time O(n1−ε n2 + n1 n1−ε ), and error probability at most 1/3. We give a reduction from the 1 2 γ-uMv-problem to (2 − ε)-approximate ss-shortest-paths with sensitivity d in the following lemma. This lemma and the proof of Corollary 3.12 in [27] imply the result in Theorem 21 for ss-shortest-paths. I Lemma 22. Let δ ∈ (0, 1/2]. Given an algorithm A for incremental/decremental (2 − ε)δ ss-shortest paths with sensitivity d, one can solve ( 1−δ )-uMv with parameters n1 and n2 by running the preprocessing step of A on a graph with O(m) edges and O(m1−δ ) vertices, then making a single batch update of size O(d) and O(m1−δ ) queries, where m is such that m1−δ = n1 and d = mδ = n2 . Proof. We prove the lower bound for the incremental problem. δ Let M be a n1 ×n2 binary matrix for ( 1−δ )-uMv. We construct a bipartite graph GM from the matrix M : Set GM = ((L ∪ R), E), where L = {l1 , . . . , ln1 }, R = {r1 , . . . , rn2 } and the edges are given by E = {(li , rj ) : Mij = 1}. We add an additional vertex s to GM and attach a path of length 3 to s, the vertex on the path with distance 3 from s has edges to all vertices in L. Observe that GM has O(n1 n2 ) = O(m) edges and n1 + n2 = Θ(mδ + m1−δ ) = Θ(m1−δ ) vertices. When the vectors u and v arrive, we add an edge (s, rj ) for each vj = 1 in a single batch of O(d) updates. After that for each ui = 1, we query the shortest path from s to li . In total, we perform O(m1−δ ) queries and only use a single batch update consisting of O(d) insertions. We claim that one of the queries returns less than 4 iff ut M v = 1. First assume that ut M v = 1. Then there exist indices i, j such that ui = Mij = vj = 1. Hence, there must be a path li → rj → s of length 2 in GM and since li = 1 we ask the query for li . Hence, any (2 − ε)-approximation algorithm must return less than 4 in the query for li . Now assume that a query for vertex li returns less than 4. Since any path from a vertex M. Henzinger, A. Lincoln, S. Neumann and V. Vassilevska Williams in L to s must have length 2k for some k ∈ N, there exists a path li → rj → s. Since query for li , we have ui = 1. Due to the edge li → rj , Mij = 1, and due to edge rj → s, vj = 1. Thus, ui Mij vj = 1 and ut M v = 1. The proof for the decremental problem works by initially adding all edges from s to R to the graph and then removing edges corresponding to the 0-entries of v. J To obtain the result of Theorem 21 for st-shortest-paths, observe that the above reduction can be changed to work for this problem: We add additional vertices s, t to the original bipartite graph and connect s and t by a path of length 5 (i.e., introducing 3 additional vertices). Then a similar proof to the above shows that any algorithm for st-reachability that can distinguish between a shortest path of length at most 3 or at least 5 can be used to decide if ut M v = 1. The result for BW-Match follows from the reduction in [3]. B No (globally) fixed constant sensitivity with polynomial preprocessing time In this section, we will first discuss how SETH reductions depend on their sensitivity. In particular, we will see that even though some of our previous reductions had constant sensitivities, these constants are not bounded globally. Afterwards we will prove that if we allow for polynomial preprocessing time, then there cannot be a globally fixed upper bound on the sensitivities. B.1 A note on SETH reductions Let us recall that the sensitivities of the reductions in Section 4 had the form K = c/δ, where cn was the number of clauses in the k-CNFSAT formula and δ < 1 was a parameter indicating the size of our initial graph. We will first discuss the dependency of K on δ and after that on c. Firstly, let us discuss how the SETH reductions depend on the parameter δ. Let F be a k-CNFSAT formula with n variables and O(n) clauses. Notice that if the input graph that we construct in the reduction had size N = O(2n/2 ), then the preprocessing time of an algorithm refuting SETH would have to be O(N 2−ε ). In order to allow for arbitrary polynomial preprocessing times of the algorithm, the reductions in [3] (and also the ones from the section before) were parameterized such that the initial graphs have size O(2δn ) (disregarding poly(n) factors). Then for an algorithm with preprocessing time O(N t ) we can pick δ < 1/t and hence the preprocessing takes time O(2δnt ) = O(2(1−γ)n ) for some γ > 0. Thus, despite the “large” preprocessing time we could still refute the SETH. However, the sensitivities K = c/δ are not bounded if we consider δ as a parameter, i.e. K → ∞ as δ → 0. If we consider δ as the inverse of the power of the preprocessing time O(N t ), i.e. δ = 1/t, then this can be interpreted as “large preprocessing time” corresponds to “large sensitivity” (since δ → 0 iff t → ∞). Now one might want to fix δ (and thus bound the preprocessing time) in order to get (globally) fixed constant sensitivities. Unfortunately, this approach is also not feasible; in the SETH reductions for proving an algorithm that solves k-CNFSAT in time 2(1−ε)n , there is another parameter c which denotes the number of clauses of the k-CNFSAT instance after the application of the sparsification lemma by Impagliazzo, Paturi and Zane [30]. Looking at the proof of the lemma one can see that c = c(k, ε) and that c → ∞ as k → ∞, as well as c → ∞ as ε → 0. Hence, if we use the sparsification lemma and fix δ, then we still cannot refute the SETH. XX:31 XX:32 Conditional Hardness for Sensitivity Problems B.2 Upper bound in case of polynomial preprocessing The former reasoning heavily relies on the constructions in our proofs and does not rule the possibility of a reduction with (globally) fixed constant sensitivity from SETH. However, the following theorem and the corollary after it will show that if we allow for polynomial preprocessing time, then there cannot be a polynomial time upper bound on update and query time under any conjecture. I Theorem 23. Let P be a fully dynamic graph problem7 with sensitivity K on a graph G = (V, E) with n vertices and m edges where edges are added and removed. Assume that for the static version of P there exists an algorithm running in time poly(n). Then there exists an algorithm with p(n) = nt for some t = t(K), u(n) = O(K) and q(n) = log(n). The algorithm uses space O(nt ). Proof. The basic idea of the algorithm is to preprocess the results of all possible queries that might be encountered during P . Since we have only sensitivity K, we will only have polynomially many graphs during the running time of the algorithm. We can save all of these results in a balanced tree of height O(log n) and during a query we just traverse the tree in logarithmic time. Denote the initial input graph by G0 . Since we know that after each update has size at most K and after the update we roll back to the initial graph, we can count how many graphs can be created while running P . Particularly, notice that a graph G1 = (V, E1 ) can be created while running P if and only if S = E0 4E1 has |S| ≤ K.8 Then in total the number of graphs which P will have to answer queries on can be bounded by computing how many such sets S exist: K  2 X n i=0 i  ≤ K max i=0,...,K n2 i  = K poly(n) = nt , for some t (where in the second step we used that K is constant). Now consider the naïve algorithm which just preprocesses all trees and stores the results: We enumerate all nt possible trees and run the static algorithm on them. This can be done in time O(poly(n)). We store the results of the static algorithm in a balanced binary tree with O(nt ) leaves which is of height O(log n). The traversal of the tree can be done, e.g., in the following way: We fix some order ≺ on V × V ; this implicitly gives an order ≺ on the set {S ⊆ V × V }. For a graph G1 we compute S = E1 4E0 and traverse according to S. During updates the algorithm maintains an array of size K which contains the edges that are to be removed or added ordered by ≺. This can be done in time O(K) = O(1). During a query the algorithm will traverse the binary tree from the preprocessing according to ≺ and the updates that were saved during the updates. This takes time O(log n). Hence, we have found algorithm with p(n) = poly(n) and u(n) = O(1) and q(n) = O(log n). J I Corollary 24. If for a problem with the properties from Theorem 23 there exists a reduction from conjecture C to P with p(n) = poly(n) and max{u(n), q(n)} = Ω(nγ−ε ) for any γ > 0 and all ε ∈ (0, γ). Then C is false. 7 8 We only argue about dynamic graph problems to simplify our language. The theorem holds for all dynamic problems with the given properties. A4B denotes the symmetric difference of A and B, i.e. A4B = A \ B ∪ B \ A. M. Henzinger, A. Lincoln, S. Neumann and V. Vassilevska Williams Proof. We use Theorem 23 to obtain an algorithm which is better than the lower bound given in the assumption of the corollary. Hence, we obtain a contradiction to C. J Notice that Corollary 24 implies that in order to obtain meaningful lower bounds for dynamic problems with a certain sensitivity, we must either bound the preprocessing time of the algorithm or bound the space usage of the algorithm or allow the sensitivity to become arbitrarily large. XX:33
8cs.DS
JOURNAL OF GEOPHYSICAL RESEARCH, VOL. ???, XXXX, DOI:10.1029/, This information is distributed solely for the purpose of predissemination peer review and must not be disclosed, released, or published until after approval by the U.S. Geological Survey (USGS). It is deliberative and predecisional information and the findings and conclusions in the document have not been formally approved for release by the USGS. It does not represent and should not be construed to represent any USGS determination or policy. arXiv:1308.5846v1 [physics.geo-ph] 27 Aug 2013 A Domain Decomposition Approach to Implementing Fault Slip in Finite-Element Models of Quasi-static and Dynamic Crustal Deformation B. T. Aagaard,1 M. G. Knepley,2 and C. A. Williams3 We employ a domain decomposition approach with Lagrange multipliers to implement fault slip in a finite-element code, PyLith, for use in both quasi-static and dynamic crustal deformation applications. This integrated approach to solving both quasistatic and dynamic simulations leverages common finite-element data structures and implementations of various boundary conditions, discretization schemes, and bulk and fault rheologies. We have developed a custom preconditioner for the Lagrange multiplier portion of the system of equations that provides excellent scalability with problem size compared to conventional additive Schwarz methods. We demonstrate application of this approach using benchmarks for both quasi-static viscoelastic deformation and dynamic spontaneous rupture propagation that verify the numerical implementation in PyLith. Abstract. cycles generally simplify not only the fault loading and rupture propagation, but also the physical properties to make the calculations tractable [Ward , 1992; Robinson and Benites, 1995; Hillers et al., 2006; Rundle et al., 2006; Pollitz and Schwartz , 2008; Dieterich and Richards-Dinger , 2010]. Some dynamic spontaneous rupture modeling studies have attempted to examine a broader space-time window to remove simplifying assumptions and more accurately capture the complex interactions over the earthquake cycle. For example, Duan and Oglesby [2005] simulated multiple earthquake cycles on a fault with a bend to capture the spatial variation in the stress field around the bend, which they found to have a strong role in determining whether a rupture would propagate past the bend. By spinning up the model over many earthquake cycles, they obtained a much more realistic stress field immediately prior to rupture compared with assuming a simple stress field or calculating the stress field from a static analysis. Chen and Lapusta [2009] examined the behavior of small repeating earthquakes by modeling a stable sliding region (friction increases with slip rate) surrounding an unstable sliding region (friction decreases with slip rate). They found that the aseismic slip occurring within the unstable patch between ruptures contributed a significant fraction of the long-term slip. As a result, their simulations displayed a complex interaction between aseismic slip between earthquakes and coseismic slip that would not have been possible if they did not explicitly model the interseismic deformation. Kaneko et al. [2011] developed more sophisticated earthquake cycle models using spectral element simulations that permit spatial variations in physical properties that capture the dynamic rupture propagation as well as the interseismic deformation. They examined the effects of low-rigidity layers and a fault damaged zone on rupture dynamics. In addition to purely dynamic effects, such as amplified slip rates during dynamic rupture, they found several effects that required resolving both the interseismic deformation and the rapid slip during dynamic rupture; the low-rigidity layers reduced the nucleation size, amplified slip rates during dynamic rupture, increased the recurrence interval, and reduced the amount of aseismic slip. Reproducing observed earthquake cycle behavior remains a challenge. Barbot et al. [2012] applied boundary integral 1. Introduction The earthquake cycle, from slow deformation associated with interseismic behavior to rapid deformation associated with earthquake rupture, spans spatial scales ranging from fractions of a meter associated with the size of contact asperities on faults and individual grains to thousands of kilometers associated with plate boundaries. Similarly, temporal scales range from fractions of a second associated with slip at a point during earthquake rupture to thousands of years of strain accumulation between earthquakes. The complexity of the many physical processes operating over this vast range of scales leads most researchers to focus on a narrow space-time window to isolate just one or a few processes; the limited spatial and temporal coverage of observations also often justifies this narrow focus. Researchers have recognized for some time, though, that interseismic deformation and fault interactions influence earthquake rupture propagation, and the dynamics of rupture propagation, in turn, affect postseismic deformation [Igarashi et al., 2003; Ito et al., 2007; Chen and Lapusta, 2009; Matsuzawa et al., 2010]. In most cases one simplifies some portion of the process to expedite the modeling results of another portion. For example, studies of slow deformation associated with interseismic and postseismic behavior often approximate dynamic rupture behavior with the static coseismic slip [Reilinger et al., 2000; Pollitz et al., 2001; Langbein et al., 2006; Chlieh et al., 2007]. Likewise, studies of rapid deformation associated with earthquake rupture propagation often approximate the loading of the crust at the beginning of a rupture [Mikumo et al., 1998; Harris and Day, 1999; Aagaard et al., 2001; Peyrat et al., 2001; Oglesby and Day, 2001; Dunham and Archuleta, 2004]. Numerical seismicity models that attempt to model multiple earthquake 1 Earthquake Science Center, U.S. Geological Survey, Menlo Park, California, USA. 2 Computation Institute, University of Chicago, Chicago, Illinois, USA. 3 GNS Science, Lower Hutt, New Zealand. Copyright 2013 by the American Geophysical Union. 0148-0227/13/$9.00 1 X-2 AAGAARD ET AL.: FAULT SLIP VIA DOMAIN DECOMPOSITION simulation techniques to develop an earthquake cycle model of Mw 6.0 Parkfield, California, earthquakes. They employed spatial variation of the fault constitutive properties for Dieterich-Ruina rate-state friction to yield regions with stable sliding and regions with stick-slip behavior. This allowed their numerical model to closely match the observed geodetic interseismic behavior as well as the slip pattern of the 2004 Parkfield earthquake. Nevertheless, some aspects of the physical process, such as the 3-D nonplanar flowerstructure geometry of the San Andreas fault and 3-D variation in elastic properties were not included in the Barbot et al. [2012] model. Collectively, these studies suggest a set of desirable features for models of the earthquake cycle to capture both the slow deformation associated with interseismic behavior and the rapid deformation associated with earthquake rupture propagation. These features include the general capabilities of modeling elasticity with elastic, viscoelastic, and viscoelastoplastic rheologies, as well as slip on faults via either prescribed ruptures or spontaneous ruptures controlled by a fault constitutive model. Additionally, a model could also include the coupling of elasticity to fluid and/or heat flow. With the goal of modeling the entire earthquake cycle with as few simplifications as possible, much of our work in developing PyLith has focused on modeling fault slip with application to quasi-static simulations of interseismic and coseismic deformation and dynamic simulations of earthquake rupture propagation. This effort builds on our previous work on developing the numerical modeling software EqSim [Aagaard et al., 2001] for dynamic spontaneous rupture simulations and Tecton [Melosh and Raefsky, 1980; Williams and Richardson, 1991] for quasi-static interseismic and postseismic simulations. We plan to seamlessly couple these two types of simulations together to resolve the earthquake cycle. Implementing slip on the potentially nonplanar fault surface differentiates these types of problems from many other elasticity problems. Complexities arise because earthquakes may involve offset on multiple, intersecting irregularly shaped fault surfaces in the interior of a modeling domain. Furthermore, we want the flexibility to either prescribe the slip on the fault or have the fault slip evolve according to a fault constitutive model that specifies the friction on the fault surface. Here, we describe a robust, yet flexible method for implementing fault slip with a domain decomposition approach, its effect on the overall design of PyLith, and verification of its implementation using benchmarks. Because both T and u are vector quantities, there can be some spatial overlap of the surfaces ST and Su ; however, a degree of freedom at any location cannot be associated with both prescribed displacements (Dirichlet) and traction (Neumann) boundary conditions simultaneously. Following a conventional finite-element formulation (ignoring the fault surface for a moment), we construct the weak form by taking the dot product of the governing equation with a weighting function and setting the integral over the domain equal to zero,   Z ∂2u φ · ∇ · σ + f − ρ 2 dV = 0. (5) ∂t V The weighting function φ is a piecewise differentiable vector field with φ = 0 on Su . After some algebra and use of the boundary conditions (equations (2) and (3)), we have Z Z Z φ : σ dV + φ · f dV ∇φ φ · T dS + − ST V V (6) Z ∂2u − φ · ρ 2 dV = 0, ∂t V φ : σ is the double inner product of the gradient of where ∇φ the weighting function and the stress tensor. Using a domain decomposition approach, we consider the fault surface as an interior boundary between two domains as shown in Figure 1. We assign a fault normal direction to this interior boundary and “positive” and “negative” labels to the two sides of the fault, such that the fault normal is the vector from the negative side of the fault to the positive side of the fault. Slip on the fault is the displacement of the positive side relative to the negative side. Slip on the fault also corresponds to equal and opposite tractions on the positive (l+ ) and negative (l− ) sides of the fault, which we impose using Lagrange multipliers with l+ + l− = 0. Recognizing that the tractions on the fault surface are analogous to the boundary tractions, we add in the contributions from integrating the Lagrange multipliers (fault tractions) over the fault surface, Z Z Z φ : σ dV + φ · l dS − ∇φ φ · T dS − V Z Sf − 2. Numerical Model of Fault Slip In this section we summarize the formulation of the governing equations using the finite-element method. We augment the conventional finite-element formulation for elasticity with a domain decomposition approach [Smith et al., 1996; Zienkiewicz et al., 2005] to implement the fault slip. The PyLith manual [Aagaard et al., 2012] provides a stepby-step description of the formulation. We solve the elasticity equation including inertial terms, ∂2u − f − ∇ · σ = 0 in V, ∂t2 σ · n = T on ST , (1) (2) u = u0 on Su , (3) d − (u+ − u− ) = 0 on Sf , (4) where u is the displacement vector, ρ is the mass density, f is the body force vector, σ is the Cauchy stress tensor, and t is time. We specify tractions T on surface ST , displacements u0 on surface Su , and slip d on fault surface Sf , where the tractions and fault slip are in global coordinates. Sf + Z φ · l dS + + ρ ST Z φ · f dV − V V ∂2u φ · ρ 2 dV = 0. ∂t (7) Our sign convention for the fault normal and fault tractions (tension is positive) leads to the Lagrange multiplier terms having the opposite sign as the boundary tractions term. We also construct the weak form for the constraint associated with slip on the fault by taking the dot product of the constraint equation with the weighting function and setting the integral over the fault surface to zero, Z φ · (d − u+ + u− ) dS = 0. (8) Sf This constraint equation applies to the relative displacement vector across the fault and slip in the tangential and fault opening directions. The domain decomposition approach for imposing fault slip or tractions on a fault is similar to the “split nodes” and “traction at split nodes” (TSN) techniques used in a number of finite-difference and finite-element codes [Melosh and Raefsky, 1981; Andrews, 1999; Bizzarri and Cocco, 2005; Day et al., 2005; Duan and Oglesby, 2005; Dalguer and Day, 2007; Moczo et al., 2007], but differs from imposing fault X-3 AAGAARD ET AL.: FAULT SLIP VIA DOMAIN DECOMPOSITION slip via double couple point sources. The domain decomposition approach treats the fault surface as a frictional contact interface, and the tractions correspond directly to the Lagrange multipliers needed to satisfy the constraint equation involving the jump in the displacement field across the fault and the fault slip. As a result, the fault tractions are equal and opposite on the two sides of the fault and satisfy equilibrium. The TSN technique is often applied in dynamic spontaneous rupture models with explicit time stepping and a diagonal system Jacobian, so that the fault tractions are explicitly computed as part of the solution of the uncoupled equations. In this way the TSN technique as described by Andrews [1999] could be considered an optimization of the domain decomposition technique for the special case of dynamic spontaneous rupture with a fault constitutive model and explicit time stepping. Imposing fault slip via double couple point sources involves imposing body forces consistent with an effective plastic strain associated with fault slip (sometimes called the “stress-free strain” [Aki and Richards, 2002]). The total strain is the superposition of this effective plastic strain and the elastic strain. The fault tractions are associated with the elastic strain. This illustrates a key difference between this approach and the domain decomposition approach in which the Lagrange multipliers and the constraint equation directly relate the fault slip to the fault tractions (Lagrange multipliers). One implication of this difference is that when using double couple point forces, the body forces driving slip depend on the elastic modulii and will differ across a fault surface with a contrast in the elastic modulii, whereas the fault tractions (Lagrange multipliers) in the domain decomposition approach will be equal in magnitude across the fault. We express the weighting function φ , trial solution u, Lagrange multipliers l, and fault slip d as linear combinations of basis functions, X φ= am Nm , (9) mensions Nm is a 3 × 3m matrix, where m is the number of basis functions. The weighting function is arbitrary, so the integrands must be zero for all am , which leads to Z Z Z T T T ∇Nm · σ dV + Nm · T dS − Nm · Np · lp dS − ST V Sf + Z T Nm · Np · lp dS + + Sf − T Nm · f dV V Z T ρNm · Nn · − V Z Z ∂ 2 un dV = 0, ∂t2 (17) NpT · (Np · dp − Nn+ · un+ + Nn− · un− ) dS = 0. Sf (18) We want to solve these equations for the coefficients un and lp subject to u = u0 on Su . When we prescribe the slip, we specify d on Sf , and when we use a fault constitutive model we specify how the Lagrange multipliers l depend on the fault slip, slip rate, and state variables. We evaluate the integrals in equations (17) and (18) using numerical quadrature [Zienkiewicz et al., 2005]. This involves evaluating the integrands at the quadrature points, multiplying by the corresponding weighting function, and summing over the quadrature points. With an appropriate choice for the quadrature scheme the finite-element method allows inclusion of spatial variations of boundary tractions, density, body forces, and physical properties within the cells. To solve equations (17) and (18), we construct a linear system of equations. For nonlinear bulk rheologies it is convenient to work with the increment in stress and strain, so we formulate the solution of the equations in terms of the increment in the solution from time t to t + ∆t rather than the solution at time t + ∆t. Consequently, rather than constructing a system with the form A·u(t+∆t) = b(t+∆t), we construct a system with the form A·du = b(t+∆t)−A·u(t), where u(t + ∆t) = u(t) + du. We use an initial guess of zero for the increment in the solution. 2.1. Quasi-static Simulations m u= X l= X un Nn , (10) l p Np , (11) dp Np . (12) n p d= X p Because the weighting function is zero on Su , the number of basis functions for the trial solution u is generally greater than the number of basis functions for the weighting function φ , i.e., n > m. The basis functions for the Lagrange multipliers and fault slip are associated with the fault surface, which is a lower dimension than the domain, so p  n in most cases. If we express the linear combination of basis functions in terms of a matrix-vector product, we have For quasi-static simulations we ignore the inertial term and time-dependence only enters through the constitutive models and the loading conditions. As a result, the quasistatic simulations are a series of static problems with potentially time-varying physical properties and boundary conditions. The temporal accuracy of the solution is limited to resolving these temporal variations. Considering the deformation at time t + ∆t, Z Z T T − ∇Nm · σ(t + ∆t) dV + Nm · T (t + ∆t) dS V ST Z T − Nm · Np · lp (t + ∆t) dS Sf + Z Sf − Z T Nm · f (t + ∆t) dV = 0, + φ = Nm · am , (13) u = Nn · un , (14) l = Np · lp , (15) d = Np · dp . (16) The first term on the right hand side of these equations is a matrix of the basis functions. For example, in three di- (19) T Nm · Np · lp (t + ∆t) dS + V Z NpT · (Np · dp (t + ∆t) − Nn+ · un+ (t + ∆t)) dS Sf Z + (20) NpT · (Nn− · un− (t + ∆t)) dS = 0. Sf To march forward in time, we simply increment time, solve the equations, and add the increment in the solution to the X-4 AAGAARD ET AL.: FAULT SLIP VIA DOMAIN DECOMPOSITION solution from the previous time step. We solve these equations using the Portable, Extensible Toolkit for Scientific Computation (PETSc), which provides a suite of tools for solving linear systems of algebraic equations with parallel processing [Balay et al., 1997, 2010]. In solving the system, we compute the residual (i.e., r = b−A·u) and the Jacobian u  of the system (A). In our case the solution is u = lnn , and the residual is simply the left sides of equations (19) and (20). The Jacobian of the system, A, is the action (operation) that we apply to the increment of the solution, du. To find the portion of the Jacobian associated with equation (19), we let σ(t + ∆t) = σ(t) + dσ(t). The action on the increment of the solution is associated with the increment in the stress tensor dσ(t). We approximate the increment in the stress tensor using linear elasticity and infinitesimal strains, dσ(t) = 1 C(t) · (∇ + ∇T )u(t), 2 (21) where C is the fourth order tensor of elastic constants. For bulk constitutive models with a linear response, C is constant in time. For other constitutive models we form C(t) from the current solution and state variables. Substituting into the first term in equation (19) and expressing the displacement vector as a linear combination of basis functions, we find this portion of the Jacobian is Z 1 T (∇T + ∇)Nm · C · (∇ + ∇T )Nn dV. (22) K= 4 V This matches the tangent stiffness matrix in conventional solid mechanics finite-element formulations. In computing the residual, we use the expression given in equation (17) with one implementation for infinitesimal strain and another implementation for small strain and rigid body motion using the Green-Lagrange strain tensor and the second PiolaKirchoff stress tensor [Bathe, 1995]. Following a similar procedure, we find the portion of the Jacobian associated with the constraints, equation (20), is Z NpT · (Nn+ − Nn− ) dS. (23) L= Sf Thus, the Jacobian of the entire system has the form,   K LT . (24) A= L 0 Note that the terms in Nn+ and Nn− are identical, but they refer to degrees of freedom (DOF) on the positive and negative sides of the fault, respectively. Consequently, in practice we compute the terms for the positive side of the fault and assemble the terms into the appropriate DOF for both sides of the fault. Hence, we compute Z Lp = NpT · Nn+ dS, (25) Sf with the Jacobian of the entire system taking the form,   Knn Knn+ Knn− 0 T  Kn+ n Kn+ n+ 0 Lp  , A= (26)  K n− n 0 Kn− n− −LTp  0 Lp −Lp 0 where n denotes DOF not associated with the fault, n− denotes DOF associated with the negative side of the fault, n+ denotes DOF associated with the positive side of the fault, and p denotes DOF associated with the Lagrange multipliers. The matrix L defined in equation (23) is spectrally equivalent to the identity, because it involves integration of products of the basis functions. This makes the traditional Ladyzhenskaya-Babuska-Brezzi (LBB) stability criterion [Brenner and Scott, 2008] trivial to satisfy by choosing the space of Lagrange multipliers to be exactly the space of displacements, restricted to the fault. This means we simply need to know the distance between any pair of vertices spanning the fault, which can be expressed as a relative displacement, i.e., fault slip. 2.2. Dynamic Simulations In dynamic simulations we include the inertial term to resolve the propagation of seismic waves, with an intended focus on applications for earthquake physics and groundmotion simulations. The general form of the system Jacobian remains the same as in quasi-static simulations given in equation (24). The integral equation for the fault slip constraint remains unchanged, so the corresponding portions of the Jacobian (L) and residual (rp ) are also exactly the same as in the quasi-static simulations. Including the inertial term in equation (19) for time t rather than t + ∆t yields Z Z T T − ∇Nm · σ(t) dV + Nm · T (t) dS V ST Z T Nm · Np · lp (t) dS − Sf + Z T Nm · Np · lp (t) dS + (27) Sf − Z + Z − V T Nm · f (t) dV V 2 T ρNm · Nn · ∂ un (t) dV = 0. ∂t2 We find the upper portion of the Jacobian of the system by considering the action on the increment in the solution, just as we did for the quasi-static simulations. In this case we associate the increment in the solution with the temporal discretization. We march forward in time using explicit time stepping via Newmark’s method [Newmark , 1959] with a central difference scheme wherein the acceleration and velocity are given by ∂ 2 u(t) 1 = (du − u(t) + u(t − ∆t)) , ∂t2 ∆t2 ∂u(t) 1 = (du + u(t) − u(t − ∆t)) . ∂t 2∆t (28) (29) Expanding the inertial term yields Z ∂ 2 un (t) T dV = − ρNm · Nn · ∂t2 V Z 1 T − 2 ρNm · Nn · (dun (t) − un (t) + un (t − ∆t)) dV, ∆t V (30) so that the upper portion of the Jacobian is Z 1 T K= ρNm · Nn dV. ∆t2 V (31) This matches the mass matrix in conventional solid mechanics finite-element formulations. Earthquake ruptures in which the slip has a short rise time tend to introduce deformation at short length scales X-5 AAGAARD ET AL.: FAULT SLIP VIA DOMAIN DECOMPOSITION (high frequencies) that numerical models cannot resolve accurately. This is especially true in spontaneous rupture simulations, because the rise time is sensitive to the evolution of the fault rupture. To reduce the introduction of deformation at such short length scales we add artificial damping via Kelvin-Voigt viscosity [Day et al., 2005; Kaneko et al., 2008] to the computation of the strain, i 1h ∇u + (∇u)T , 2 i 1h ε≈ ∇ud + (∇ud )T , 2 ∂u , ud = u + η ∗ ∆t ∂t ε= (32) (33) (34) where η ∗ is a nondimensional viscosity on the order of 0.1– 1.0. 2.3. Nondimensionalization The domain decomposition approach for implementing fault slip with Lagrange multipliers requires solving for both the displacement field and the Lagrange multipliers, which correspond to fault tractions. We expect the displacements to be generally on the order of mm to m whereas the fault tractions will be on the order of MPa. Thus, if we use dimensioned quantities in SI units, then we would expect the solution to include terms that differ by up to nine orders of magnitude. This results in a rather ill-conditioned system. We avoid this ill-conditioning by nondimensionalizing all of the quantities involved in the problem based upon user-specified scales [Aagaard et al., 2012], facilitating the formation of well-conditioned systems of equations for problems across a wide range of spatial and temporal scales. 2.4. Prescribed Fault Rupture In a prescribed (kinematic) fault rupture we specify the slip-time history d(x, y, z, t) at every location on the fault surfaces. The slip-time history enters into the calculation of the residual as do the Lagrange multipliers, which are available from the current trial solution. In prescribing the slip-time history we do not specify the initial tractions on the fault surface so the Lagrange multipliers are the change in the tractions on the fault surfaces corresponding to the slip. PyLith includes a variety of slip-time histories, including a step function, a linear ramp (constant slip rate), the integral of Brune’s far-field time function [Brune, 1970], a sine-cosine function developed by Liu et al. [2006], and a user-defined time history. These are discussed in detail in the PyLith manual [Aagaard et al., 2012]. PyLith allows specification of the slip initiation time independently at each location as well as superposition of multiple earthquake ruptures with different origin times, thereby permitting complex slip behavior. 2.5. Spontaneous Fault Rupture In contrast to prescribed fault rupture, in spontaneous fault rupture a constitutive model controls the tractions on the fault surface. The fault slip evolves based on the fault tractions as driven by the initial conditions, boundary conditions and deformation. In our formulation of fault slip, slip is assumed to be known and the fault tractions (Lagrange multipliers) are part of the solution (unknowns). The fault constitutive model places bounds on the Lagrange multipliers and the system of equations is nonlinear– when a location on the fault is slipping, we must solve for both the fault slip (which is known in the prescribed ruptures) and the Lagrange multipliers to find values consistent with the fault constitutive model. At each time step, we first assume the increment in the fault slip is zero, so that the Lagrange multipliers correspond to the fault tractions required to lock the fault. If the Lagrange multipliers exceed the fault tractions allowed by the fault constitutive model, then we iterate to find the increment in slip that yields Lagrange multipliers that satisfy the fault constitutive model. On the other hand, if the Lagrange multipliers do not exceed the fault tractions allowed by the fault constitutive model, then the increment in fault slip remains zero, and no adjustments to the solution are necessary. In iterating to find the fault slip and Lagrange multipliers that satisfy the fault constitutive model, we employ the following procedure. We use this same procedure for all fault constitutive models, but it could be specialized to provide better performance depending on how the fault constitutive model depends on slip, slip rate, and various state variables. We first compute the perturbation in the Lagrange multipliers necessary to satisfy the fault constitutive model for the current estimate of slip. We then compute the increment in fault slip corresponding to this perturbation in the Lagrange multipliers assuming deformation is limited to vertices on the fault. That is, we consider only the DOF associated with the fault interface when computing how a perturbation in the Lagrange multipliers corresponds to a change in fault slip. In terms of the general form of a linear system of equations (Au = b), our subset of equations based on equation (26) has the form      u n+ b n+ Kn+ n+ 0 LTp  0 (35) Kn− n− −LTp  un−  = bn−  , lp bp Lp −Lp 0 where n+ and n− refer to the DOF associated with the positive and negative sides of the fault, respectively. Furthermore, we can ignore the terms bn+ and bn− because they remain constant as we change the Lagrange multipliers or fault slip. Our task reduces to solving the following system of equations to estimate the change in fault slip ∂d associated with a perturbation in the Lagrange multipliers ∂lp : Kn+ n+ · ∂un+ = −LTp · ∂lp , Kn− n− · ∂un− = LTp · ∂lp , ∂dp = ∂un+ − ∂un− . (36) (37) (38) The efficiency of this iterative procedure depends on both the fault constitutive model and how confined the deformation is to the region immediately surrounding the fault. If the fault friction varies significantly with slip, then the estimate of how much slip is required to match the fault constitutive model will be poor. Similarly, in rare cases in which the fault slip extends across the entire domain, deformation extends far from the fault and the estimate derived using only the fault DOF will be poor. To make this iterative procedure more robust so that it works well across a wide variety of fault constitutive models, we add a small enhancement to the iterative procedure. At each iteration we use a simple line search to find the increment in slip that best satisfies the fault constitutive model. Specifically, we search for α using a bilinear search in logarithmic space to minimize C = klp + α∂lp − f (dp + α∂dp )k2 , (39) where f (d) corresponds to the fault constitutive model and kxk2 denotes the L2 -norm of x. Performing this search in logarithmic space rather than linear space greatly accelerates the convergence in constitutive models in which the coefficient of friction depends on the logarithm of the slip rate. X-6 AAGAARD ET AL.: FAULT SLIP VIA DOMAIN DECOMPOSITION PyLith includes several commonly used fault constitutive models, all of which specify the shear traction on the fault Tf as a function of the cohesive stress Tc , coefficient of friction, µf , and normal traction Tn , Tf = Tc − µf Tn . (40) Tf in this equation corresponds to the magnitude of the shear traction vector; the shear traction vector is resolved into the direction of the slip rate. We use the sign convention that compressive normal tractions are negative. When the fault is under compression, we prevent interpenetration, and when the fault is under tension, the fault opens (dn > 0) and the fault traction vector is zero. The fault constitutive models include static friction, linear slip-weakening [Ida, 1972], linear time-weakening [Andrews, 2004], and Dieterich-Ruina rate-state friction with an aging law [Dieterich, 1979]. See the PyLith manual [Aagaard et al., 2012] for details. 3. Finite-Element Mesh Processing Like all finite-element engines, PyLith performs operations on cells and vertices comprising the discretized domain (finite-element mesh). These operations include calculating cell and face integrals to evaluate weak forms, assemble local cell vectors and matrices into global vector and matrix objects, impose Dirichlet boundary conditions on the algebraic system, and solve the resulting system of nonlinear algebraic equations. In PyLith, these operations are accomplished using PETSc, and in particular the Sieve package for finite-element support [Knepley and Karpeev , 2009]. The Sieve application programming interface (API) for mesh representation and manipulation is based upon a direct acyclic graph representation of the covering relation in a mesh, illustrated in Figure 2. For example, faces cover cells, edges cover faces, and points cover edges. By focusing on the key topological relations, the interface can be both concise and quite general. Using this generic API, PyLith is able to support one, two, and three dimensional meshes, with simplicial, hex, and even prismatic cell shapes, while using very little dimension or shape specific code. However, in order to include faults, we include additional operations in Sieve beyond those necessary for conventional finite-element operations. In our domain decomposition approach, the finite-element mesh includes the fault as an interior surface. This forces alignment of the element faces along the fault. To impose a given fault slip as in equation (4), we must represent the displacement on both sides of the fault for any vertex on the fault. One option is to designate “fault vertices” which possess twice as many displacement DOF [Aagaard et al., 2001]. However, this requires storing the global variable indices by cell rather than by vertex or adding special fault metadata to the vertices, significantly increasing storage costs and/or index lookup costs. We choose another option and modify the initial finiteelement mesh by replacing each fault face with a zero-volume cohesive cell. Many mesh generation tools do not support specification of faces on interior surfaces. Consequently, we create these cohesive cells in a preprocessing step at the beginning of a simulation. We construct the set of oriented fault faces from a set of vertices marked as lying on the fault. We join these vertices into faces, consistently orient them (using a common fault normal direction), and associate them with pairs of cells in the original mesh. Given this set of oriented fault faces, we introduce a set of cohesive cells using a step-by-step modification of the Sieve data structure representing the mesh illustrated in Figure 3. First, for each vertex on the negative side of the fault Sf − , we introduce a second vertex on the positive side of the fault Sf + and a third vertex corresponding to the Lagrange multiplier constraint. The Lagrange multiplier vertex lies on an edge between the vertex on Sf + and the vertex on Sf − . The fault faces are organized as a Sieve, and each face has the two cells it is associated with as descendants. Because the cells are consistently oriented, the first cell attached to each face is on the negative side of the fault, i.e., Sf − . We replace the vertices on the fault face of each second cell, which is on the positive side of the fault, i.e., Sf + , with the newly created vertices. Finally, we add a cohesive cell including the original fault face, a face with the newly created vertices, and the Lagrange vertices. These cohesive cells are prisms. For example, in a tetrahedral mesh the cohesive cells are triangular prisms, whereas in a hexahedral meshes they are hexahedrons. We must also update all cells on the positive side of the fault that touch the fault with only an edge or single vertex. We need to replace the original vertices with the newly introduced vertices on the positive side of the fault. In cases where the fault reaches the boundaries of the domain, it is relatively easy to identify these cells because these vertices are shared with the cells that have faces on the positive side of the fault. However, in the case of a fault that does not reach the boundary of the domain, cells near the ends of the fault share vertices with cells that have a face on the positive side of the fault and cells that have a face on the negative side of the fault. We use a breadth-first classification scheme to classify all cells with vertices on the fault into those having vertices on the positive side of the fault and those having vertices on the negative side of the fault, so that we can replace the original vertices with the newly introduced vertices on the positive side of the fault. In classifying the cells we iterate over the set of fault vertices. For each vertex we examine the set of cells attached to that vertex, called the support of the vertex in the Sieve API [Knepley and Karpeev , 2009]. For each unclassified cell in the support, we look at all of its neighbors that touch the fault. If any is classified, we give the cell this same classification. If not, we continue with a breadth-first search of its neighbors until a classified cell is found. This search must terminate because there are a finite number of cells surrounding the vertex and at least one is classified (contains a face on the fault with this vertex). Depending on the order of the iteration, this can produce a “wrap around” effect at the ends of the fault, but it does not affect the numerical solution as long as the fault slip is forced to be zero at the edges of the fault. In prescribed slip simulations this is done via the user-specified slip distribution, whereas in spontaneous rupture simulations it is done by preventing slip with artificially large coefficients of friction, cohesive stress, or compressive normal tractions. 4. Solver Customization 4.1. Quasi-static Simulations To solve the large, sparse systems of linear equations arising in our quasi-static simulations, we employ preconditioned Krylov subspace methods [Saad , 2003]. We create a sequence of vectors by repeatedly applying the system matrix to the right-hand-side vector, Ak · b, and they form a basis for a subspace, termed the Krylov space. We can efficiently find an approximate solution in this subspace. Because sparse matrix-vector multiplication is scalable via parallel processing, this is the method of choice for parallel simulation. However, for most physically relevant problems, the Krylov solver requires a preconditioner to accelerate convergence. While generic preconditioners exist [Saad , 2003; Smith et al., 1996], the method must often be specialized to a particular problem. In this section we describe a preconditioner specialized to our formulation for fault slip with Lagrange multipliers. X-7 AAGAARD ET AL.: FAULT SLIP VIA DOMAIN DECOMPOSITION The introduction of Lagrange multipliers to implement the fault slip constraints produces the saddle-point problem shown in equation (24). Traditional black-box parallel preconditioners, such as the additive Schwarz Method (ASM) [Smith et al., 1996], are not very effective for this type of problem and produce slow convergence. However, PETSc provides tools to construct many variations of effective parallel preconditioners for saddle point problems. The field split preconditioner in PETSc [Balay et al., 2010] allows the user to define sets of unknowns which correspond to different fields in the physical problem. This scheme is flexible enough to accommodate an arbitrary number of fields, mixed discretizations, fields defined over a subset of the mesh, etc. Once these fields are defined, a substantial range of preconditioners can be assembled using only PyLith options for PETSc. Table 1 shows example preconditioners and the options necessary to construct them. Another option involves using the field split preconditioner in PETSc in combination with a custom preconditioner for the submatrix associated with the Lagrange multipliers. In formulating the custom preconditioner, we exploit the structure of the sparse Jacobian matrix. Our system Jacobian has the form   K LT . (41) A= L 0 The Schur complement S of the submatrix K is given by, S = −LK −1 LT (42) which leads to a simple block diagonal preconditioner for A     K 0 Pelasticity 0 P = = . (43) 0 Pfault 0 −LK −1 LT The elastic submatrix K, in the absence of boundary conditions, has three translational and three rotational null modes. These are provided to the algebraic multigrid (AMG) preconditioner, such as the ML library [Sala et al., 2004] or the PETSc GAMG preconditioner, to assure an accurate coarse grid solution. AMG mimics the action of traditional geometric multigrid, but it generates coarse level operators and interpolation matrices using only the system matrix, treated as a weighted graph, rather than a separate description of the problem geometry, such as a mesh. We split the elastic block from the fault block and also manage the Schur complements. In this way, all block preconditioners, including those nested with multigrid, can be controlled from the options file without recompilation or special code. We now turn our attention to evaluating the fault portion of the preconditioning matrix associated with the Lagrange multipliers, since PETSc preconditioners can handle the elastic portion as discussed in the previous paragraph. In computing Pfault we approximate K −1 with the inverse of the diagonal portion of K. Because L consists of integrating the products of basis functions over the fault faces, its structure depends on the quadrature scheme and the choice of basis functions. For conventional low order finite-elements and Gauss quadrature, L contains nonzero terms coupling the degree of freedom for each coordinate axes of a vertex with the corresponding degree of freedom of the other vertices in a cell. However, if we collocate quadrature points at the cell vertices, then only one basis function is nonzero at each quadrature point and L becomes block diagonal; this is also true for spectral elements with Legendre polynomials and Gauss-Lobatto-Legendre quadrature points. This leads to a diagonal matrix for the lower portion of the conditioning matrix, Pfault = −Lp (Kn+n+ + Kn−n− )LTp , (44) where Lp is given in equation (25) and Kn+n+ and Kn−n− are the diagonal terms from equation (26). Our preferred setup uses the field splitting options in PETSc to combine an AMG preconditioner for the elasticity submatrix with our custom fault preconditioner for the Lagrange multiplier submatrix. See section 5 for a comparison of preconditioner performance for an application involving a static simulation with multiple faults. It shows the clear superiority of this setup over several other possible preconditioning strategies. 4.2. Dynamic Simulations In dynamic simulations the Courant-Friderichs-Lewy condition [Courant et al., 1967] controls the stability of the explicit time integration. In most dynamic problems this dictates a relatively small time step so that a typical simulation involves tens of thousands of time steps. Hence, we want a very efficient solver to run dynamic simulations in a reasonable amount of time. The Jacobian for our system of equations involves two terms: the inertial term given by equation (31) and the fault slip constraint term given by equation (23). Using conventional finite-element basis functions in these integrations results in a sparse matrix with off-diagonal terms. Although we can use the same solvers as we do for quasi-static simulations to find the solution, eliminating the off-diagonal terms so that the Jacobian is diagonal permits use of a much faster solver. With a diagonal Jacobian the number of operations required for the solve is proportional to the number of DOF, and the memory requirements are greatly reduced by storing the diagonal of the matrix as a vector rather than as a sparse matrix. However, the block structure of our Jacobian matrix, with the fault slip constraints occupying off-diagonal blocks, requires a two step approach to solve the linear system of equations without forming a sparse matrix. First, we eliminate the off-diagonal entries in each block of the matrix during the finite-element integrations. The current best available option for eliminating the off-diagonal terms formed during the integration of the inertial term focuses on choosing a set of orthogonal basis functions, such as the Legendre polynomials with Gauss-Lobatto-Legendre quadrature points [Komatitsch and Vilotte, 1998]. This discretization (often called the spectral element method) naturally produces a diagonal block for each finite-element cell without introducing any additional approximations. Because the fault slip constraint term also involves integration of the products of the basis functions over lower-dimension cells, orthogonal basis functions also produce a diagonal block for this integration. In contrast, traditional finite-element approaches do introduce additional approximations when constructing a diagonal approximation. In PyLith we employ one of these traditional approaches, because it produces good approximations for many different choices of basis functions and quadrature points. For each finite-element cell, we construct a diagonal approximation of the integral such that the action on rigid body motion is the same for the diagonal approximation of the integral as it is for the original integral, A · urigid = Adiagonal · urigid . (45) Expressing the diagonal block of the Jacobian matrix as a vector and the matrix of basis functions as a vector we have, Z Z X A= N T · N dΩ → Adiagonal = N Ni dΩ, (46) Ω Ω i where Ni is the scalar basis function for degree of freedom i and Ω may be the domain volume (as in the case of the X-8 AAGAARD ET AL.: FAULT SLIP VIA DOMAIN DECOMPOSITION inertial term) or a boundary (as in the case of the fault slip constraint term). The errors associated with this approximation are small as long as the deformation occurs at length scales significantly larger than the discretization size, which is consistent with resolving seismic wave propagation accurately. Furthermore, in contrast to other approaches that choose basis functions or quadrature points that affect the accuracy of all of the finite-element integrations, such as choosing quadrature points coincident with the vertices of a cell, this approach only affects the accuracy of the terms involved in the Jacobian. For consistency in the formulation of the system of equations, these approximations are also applied to the inertial term and fault slip constraint term when computing the residual. Second, we leverage the structure of the off-diagonal blocks associated with the fault slip constraint in solving the system of equations via a Schur’s complement algorithm. We compute an initial residual assuming the increment in the solution is zero (i.e., dun = 0 and dlp = 0),    ∗    un bn rn K LT . (47) − = r∗ = lp bp rp∗ L 0 We compute a corresponding initial solution to the system of equations du∗n ignoring the off-diagonal blocks in the Jacobian and the increment in the Lagrange multipliers. du∗n = K −1 · rn , (48) taking advantage of the fact that we construct K so that it is diagonal. We next compute the increment in the Lagrange multipliers to correct this initial solution so that the true residual is zero. Making use of the initial residual, the expression for the true residual is      ∗  dun rn rn K LT . (49) r= = − ∗ dlp rp rp L 0 Solving the first row of equation (49) for the increment in the solution and accounting for the structure of L as we write the expressions for DOF on each side of the fault, we have T dun+ = du∗n+ − Kn−1 + n+ · Lp · dlp , (50) T dun− = du∗n− + Kn−1 − n− · Lp · dlp . (51) Substituting into the second row of equation (49) and isolating the term with the increment in the Lagrange multipliers yields  T −1 ∗ ∗ ∗ Lp · Kn−1 + n+ + Kn− n− ·Lp ·dlp = −rp +Lp ·(dun+ − dun− ) . (52) Letting  −1 T Sp = Lp · Kn−1 (53) + n+ + Kn− n− · Lp , and recognizing that Sp is diagonal because K and Lp are diagonal allows us to solve for the increment in the Lagrange multipliers,   dlp = Sp−1 · −rp∗ + Lp · (du∗n+ − du∗n− ) . (54) Now that we have the increment in the Lagrange multipliers, we can correct our initial solution du∗n so that the true residual is zero, dun = du∗n − K −1 · LT · dlp . (55) Because K and L are comprised of diagonal blocks, this expression for the updates to the solution are local to the DOF attached to the fault and the Lagrange multipliers. We also leverage the elimination of off-diagonal entries from the blocks of the Jacobian in dynamic simulations when updating the slip in spontaneous rupture models. Because K is diagonal in this case, the expression for the change in slip for a perturbation in the Lagrange multipliers (equations (36)–(38)) simplifies to  −1 T ∂dp = − Kn−1 (56) + n+ + Kn− n− · Lp · ∂lp . Consequently, the increment in fault slip and Lagrange multipliers for each vertex can be done independently. In dynamic simulations the time step is small enough that the fault constitutive model is much less sensitive to the slip than in most quasi-static simulations, so we avoid performing a line search in computing the update. 5. Performance Benchmark We compare the relative performance of the various preconditioners discussed in section 4.1 for quasi-static problems using a static simulation with three vertical, strike-slip faults. Using multiple, intersecting faults introduces multiple saddle points, so it provides a more thorough test of the preconditioner compared to a single fault with a single saddle point. Figure 4 shows the geometry of the faults embedded in the domain and Table 2 gives the parameters used in the simulation. We apply Dirichlet boundary conditions on two lateral sides with 2.0 m of shearing motion and no motion perpendicular to the boundary. We also apply a Dirichlet boundary condition to the bottom of the domain to prevent vertical motion. We prescribe uniform slip on the three faults with zero slip along the buried edges. We generate both hexahedral meshes and tetrahedral meshes using CUBIT (available from http://cubit. sandia.gov) and construct meshes so that the problem size (number of DOF) for the two different cell types (hexahedra and tetrahedra) are nearly the same (within 2%). The suite of simulations examines increasingly larger problem sizes as we increase the number of processes (with one process per core), with 7.8 × 104 DOF for 1 process up to 7.1 × 106 DOF for 96 processes. The corresponding discretization sizes are 2033 m to 437 m for the hexahedral meshes and 2326 m to 712 m for the tetrahedral meshes. Figure 5 shows the 1846 m resolution tetrahedral mesh. As we will see in section 6.1, the hexahedral mesh for a given resolution in a quasi-static problem is slightly more accurate, so the errors in solution for each pair of meshes are larger for the tetrahedral mesh. 5.1. Preconditioner Performance We characterize preconditioner performance in terms of the number of iterations required for the residual to reach a given convergence tolerance and the sensitivity of the number of iterations to the problem size. Of course, we also seek a minimal overall computation time. We examine the computation time in the next section when discussing the parallel performance. An ideal preconditioner would yield a small, constant number of iterations independent of problem size. However, for complex problems such as elasticity with fault slip and potentially nonuniform physical properties, ideal preconditioners may not exist. Hence, we seek a preconditioner that provides a minimal increase in the number of iterations as the problem size increases, so that we can efficiently simulate quasi-static crustal deformation related to faulting and post-seismic and interseismic deformation. For this benchmark of preconditioner performance, we examine the number of iterations required for convergence using the PETSc additive Schwarz (ASM), field split (with and without our custom preconditioner), and Schur complement AAGAARD ET AL.: FAULT SLIP VIA DOMAIN DECOMPOSITION preconditioners discussed in section 4.1. We characterize the dependence on problem size using serial simulations (we examine parallel scaling for the best preconditioner in the next section) and the three lowest resolution meshes in our suite of hexahedral and tetrahedral meshes with the results summarized in Table 3. The Schur complement and family of field split preconditioners using algebraic multigrid methods minimize the increase in the number of iterations with problem size. For these preconditioners the number of iterations increases by only about 20% for a four times increase in the number of degrees of freedom, compared to 60% for the ASM preconditioner. Within the family of field split preconditioners using algebraic multigrid methods, the one with multiplicative composition minimizes the number of iterations. The custom preconditioner for the Lagrange multiplier submatrix greatly accelerates the convergence with an 80% reduction in the number of iterations required for convergence. This preconditioner also provides the fastest runtime of all of these preconditioners. 5.2. Parallel Scaling Performance The underlying PETSc solver infrastructure has demonstrated optimal scalability on the largest machines available today [Smith et al., 2008; Kaushik et al., 2009; Mills et al., 2010; Brown et al., 2012]. However, computer science scalability results are often based upon unrealistically simple problems which do not advance the scientific state-of-theart. In evaluating the parallel scalability of PyLith, we consider the sources responsible for reducing the scalability and propose possible steps for mitigation. The main impediment to scalability in PyLith is load imbalance in solving the linear system of equations. This imbalance is the combination of three effects: the inherent imbalance in partitioning an unstructured mesh, partitioning based on cells rather than DOF, and weighting the cohesive cells the same as conventional bulk cells while partitioning. In this performance benchmark matrix-vector multiplication (the PETSc MatMult function) has a load imbalance of up to 20% on 96 cores. The cell partition balances the number of cells across the processes using ParMetis [Karypis et al., 1999] to achieve good balance for the finite element integration. This does not take into account a reduction in the number of DOF associated with constraints from Dirichlet boundary conditions or the additional DOF associated with the Lagrange multiplier constraints, which can exacerbate any imbalance. Nevertheless, eliminating DOF associated with Dirichlet boundary conditions preserves the symmetry of the overall systems and, in many cases, results in better conditioned linear systems. We evaluate the parallel performance via a weak scaling criterion. That is, we run simulations on various numbers of processors/cores with an increase in the problem size as the number of processes increases (with one process per core) to maintain the same workload (e.g., number of cells and number of DOF) for each core. In ideal weak scaling the time for the various stages of the simulation is independent of the number of processes. For this performance benchmark we use the entire suite of hexahedral and tetrahedral meshes described earlier that range in size from 7.8 × 104 DOF (1 process) to 7.1 × 106 DOF (96 processes). We employ the AMG preconditioner for the elasticity submatrix and our custom preconditioner for the Lagrange multipliers submatrix. We ran the simulations on Lonestar at the Texas Advanced Computing Center. Lonestar is comprised of 1888 compute nodes connected by QDR Infiniband in a fat-tree topology, where each compute node consists of two six-core Intel Xeon E5650 processors with 24 GB of RAM. Simulations run on twelve or fewer cores were run on a single compute node with processes distributed across processors and then cores. For example, the two process simulation used X-9 one core on each of two processors. In addition to algorithm bottlenecks, runtime performance is potentially impeded by core/memory affinity, memory bandwidth, communication among compute nodes (including communication from other jobs running on the machine). The single node scaling for PyLith (twelve processes or less in this case) is almost completely controlled by the available memory bandwidth. Good illustrations of the memory system performance are given by the VecAXPY, VecMAXPY and VecMDot operations reported in the log summary [Balay et al., 2010]. These operations are limited by available memory bandwidth rather than the rate at which a processor or core can perform floating points operations. From Table 4, we see that we saturate the memory bandwidth using two processes (cores) per processor, since scaling plateaus from 2 to 4 processes, but shows good scaling from 12 to 24 processes. This lack of memory bandwidth will depress overall performance, but should not affect the inter-node scaling of the application. Machine network performance can be elucidated by the VecMDot operation for vector reductions, and MatMult for point-to-point communication. In Table 4 we see that the vector reduction shows good scaling up to 96 processes. Similarly in Table 5, we see that MatMult has good scalability, but that it is a small fraction of the overall solver time. The AMG preconditioner setup (PCSetUp) and application (PCApply) dominate the overall solver time. The AMG preconditioner setup time increases with the number of processes. Note that many weak scaling studies do not include this event, because it is amortized over the iteration. Nevertheless, in our benchmark it is responsible for most of the deviation from perfect weak scaling. We could trade preconditioner strength for scalability by reducing the work done on the coarse AMG grids, so that the solver uses more iterations which scale very well. However, that would increase overall solver time and thus would not be the choice to maximize scientific output. Figure 6 illustrates the excellent parallel performance for the finite-element assembly routines (reforming the Jacobian sparse matrix and computing the residual). As discussed earlier in this section, the ASM preconditioner performance is not scalable because the number of iterations increases significantly with the number of processes. As shown in Figure 6, the introduction of Schur complement methods and an AMG preconditioner slows the growth considerably, and future work will pursue the ultimate goal of iteration counts independent of the number of processes. 6. Code Verification Benchmarks In developing PyLith we verify the numerical implementation of various features using a number of techniques. We employ unit testing to verify correct implementation of nearly all of the individual routines. Having a test for most object methods or functions isolates bugs at their origin during code development and prevents new bugs from occurring as code is modified or optimized. We also rely on full-scale benchmarks to verify that the code properly solves the numerical problem. These benchmarks include quasi-static strike-slip and reverse viscoelastic simulations and various exercises in the suite of dynamic spontaneous rupture benchmarks developed by the Southern California Earthquake Center (SCEC) and the United States Geological Survey [Harris et al., 2009]. The mesh generation and simulation parameter files for many of the benchmarks, including those discussed here, are available from the CIG subversion repository (http://geodynamics.org/svn/cig/ short/3D/PyLith/benchmarks/trunk/). In this section we X - 10 AAGAARD ET AL.: FAULT SLIP VIA DOMAIN DECOMPOSITION focus on two benchmarks that test different scientific applications: quasi-static relaxation of a Maxwell viscoelastic material subjected to multiple earthquake cycles involving slip and steady creep on a vertical strike-slip fault [Savage and Prescott, 1978] and supershear dynamic spontaneous rupture of a 60 degree dipping normal fault in a DruckerPrager elastoplastic medium. This second benchmark corresponds to benchmark TPV13 in the SCEC suite of dynamic spontaneous rupture benchmarks [Harris et al., 2011]. 6.1. Quasi-static Benchmark As a test of our quasi-static solution, we compare our numerical results against the analytical solution of Savage and Prescott [1978]. This problem consists of an infinitely long strike-slip fault in an elastic layer overlying a Maxwell viscoelastic half-space. The parameter files for this benchmark are available in the quasistatic/sceccrustdeform/savageprescott directory of the benchmark repository. Figure 7 illustrates the geometry of the problem with an exaggerated view of the deformation during the tenth earthquake cycle. Between earthquakes the upper portion of the fault is locked, while the lower portion slips at the plate velocity. At regular intervals (the earthquake recurrence time) the upper portion of the fault slides such that the slip on the locked portion exactly complements the slip on the creeping portion so the cumulative slip over an earthquake cycle is uniform. This problem tests the ability of the kinematic fault implementation to include steady aseismic creep and multiple earthquake ruptures along with viscoelastic relaxation. The analytical solution for this problem provides the along-strike component of surface displacement as a function of distance perpendicular to the fault. The solution is controlled by the ratio of the fault locking depth to the thickness of the elastic layer and the ratio of the earthquake recurrence time to the viscoelastic relaxation time, τ0 = µT /2η, where T is the recurrence time, µ is the shear modulus and η is the viscosity. For this benchmark we use a locking depth of 20 km, an elastic layer thickness of 40 km, an earthquake recurrence time of 200 years, a shear modulus of 30 GPa, a viscosity of 2.37 × 1019 Pa-s, and a relative plate velocity of 2 cm/year, implying a coseismic offset of 4 m every 200 years (see Table 6). The viscosity and shear modulus values yield a viscoelastic relaxation time of 50 years, and τ0 = 4. We employ a 3-D model (2000 km by 1000 km by 400 km) with Dirichlet boundary conditions enforcing symmetry to approximate an infinitely long strike-slip fault. We apply velocity boundary conditions in the y-direction to the -x and +x faces with zero x-displacement. We constrain the vertical displacements on the bottom of the domain to be zero. Finally, we fix the xdisplacements on the -y and +y faces to enforce symmetry consistent with an infinitely long strike-slip fault. We examine four different numerical solutions considering the effects of cell type (hexahedral versus tetrahedral) and discretization size. In our coarse hexahedral mesh we use a uniform resolution of 20 km. In our higher resolution hexahedral mesh we refine an inner region (480 km by 240 km by 100 km) by a factor of three, yielding a resolution near the center of the fault of 6.7 km. For the tetrahedral meshes, we match the discretization size of the hexahedral mesh near the center of the fault (20km or 6.7 km) while increasing the discretization size in a geometric progression at a rate of 1.02. This results in a maximum discretization size of approximately 60 km for the coarser mesh and 40 km for the higher resolution mesh. Note that for both the hexahedral and tetrahedral coarse meshes, the discretization size on the fault is the maximum allowable size that still allows us to represent the fault locking depth as a sharp boundary. In this viscoelastic problem neither the analytical or numerical models approach steady-state behavior until after several earthquake cycles. There is also a difference in how steady plate motion is applied for the two models. For the analytical solution, steady plate motion is simply superimposed, while for the numerical solution steady plate motion is approached after several earthquake cycles, once the applied fault slip and velocity boundary conditions have produced nearly steady flow in the viscoelastic half-space. It is therefore necessary to spin-up both solutions to their steady-state solution over several earthquake cycles to allow a comparison between the two. In this way, the transient behavior present in both models will have nearly disappeared, and both models will have approximately the same component of steady plate motion. We simulate ten earthquake cycles for both the analytical and numerical models for a total duration of 2000 years. For the numerical solution we use a constant time step size of five years. This time step corresponds to one tenth of the viscoelastic relaxation time; hence it tests the accuracy of the viscoelastic solution for moderately large time steps relative to the relaxation time. Recall that the quasi-static formulation does not include inertial terms and time stepping is done via a series of static problems so that the temporal accuracy depends only on the temporal variation of the boundary conditions and constitutive models. These benchmarks simulations can be run on a laptop or desktop computer. For example, the high resolution benchmarks took 46 min (hexahedral cells) and 36 min (tetrahedral cells) using four processes on a dual quad core desktop computer with Intel Xeon E5630 processors. Figure 8 compares the numerical results extracted on the ground surface along the center of the model perpendicular to the fault with the analytic solution. Using a logarithmic scale with distance from the fault facilitates examining the solution both close to and far from the fault. For the second earthquake cycle, the far-field numerical solution does not yet accurately represent steady plate motion and the numerical simulations underpredict the displacement. By the tenth earthquake cycle, steady plate motion is accurately simulated and the numerical results match the analytical solution. Within about one elastic thickness of the fault the effect of the resolution of the numerical models becomes apparent. We find large errors for the coarse models, which have discretization sizes matching the fault locking depth. The finer resolution models (6.7 km discretization size) provide a close fit to the analytical solution. The 6.7 km hexahedral solution is indistinguishable from the analytical solution in Figure 8(b); the 6.7 km tetrahedral solution slightly underpredicts the analytical solution for times late in the earthquake cycle. The greater accuracy of the hexahedral cells relative to the tetrahedral cells with the same nominal discretization size for quasi-static solutions is consistent with our findings for other benchmarks. The greater number of polynomial terms in the basis functions of the hexahedra allows the model to capture a more complex deformation field at a given discretization size. 6.2. Dynamic Benchmark As a test of PyLith’s dynamic spontaneous rupture solutions, we use SCEC Spontaneous Rupture Benchmark TPV13 that models a high stress-drop, supershear, dip-slip earthquake that produces extreme (very large) ground motions, large slip, and fast slip rates [Harris et al., 2011]. It uses a Drucker-Prager elastoplastic bulk rheology and a slip-weakening friction model in a depth-dependent initial stress field. The parameter files for this benchmark are available in the dynamic/scecdynrup/tpv210-2d and dynamic/scecdynrup/tpv210 directories of the benchmark repository. AAGAARD ET AL.: FAULT SLIP VIA DOMAIN DECOMPOSITION Figure 9 shows the geometry of the benchmark and the size of the domain we used in our verification test. The benchmark includes both 2-D (TPV13-2D is a vertical slice through the fault center-line with plane strain conditions) and 3-D versions (TPV13). This benchmark specifies a spatial resolution of 100 m on the fault surface. To examine the effects of cell type and discretization size we consider both triangular and quadrilateral discretizations with resolutions on the fault of 50 m, 100 m, and 200 m for TPV13-2D and 100 m and 200 m for TPV13. We gradually coarsen the mesh with distance from the fault by increasing the discretization size at a geometric rate of 2%. This provides high resolution at the fault surface to resolve the small scale features of the rupture process and less resolution at the edges of the boundary where the solution is much smoother. Figure 10 shows the triangular mesh for a discretization size of 100 m on the fault. Rupture initiates due to a low static coefficient of friction in the nucleation region. Figure 11(a) illustrates the depth dependence of the stress field in terms of the fault tractions and Table 7 summarizes the benchmark parameters. Harris et al. [2011] provides a more complete description with all of the details available from http://scecdata.usc.edu/ cvws/cgi-bin/cvws.cgi. A challenging feature of this, and many other benchmarks in the SCEC Spontaneous Rupture Code Verification Exercise, is the use of parameters with spatial variations that are not continuous. This includes the variation in the static coefficient of friction for the nucleation region and the transition to zero deviatoric stresses near the bottom of the fault. We impose the geometry of these discontinuities in the construction of the finite-element mesh and use the spatial average of the parameters where they are discontinuous. This decreases the sensitivity of the numerical solution to the discretization size. This SCEC benchmark also includes fluid pressures. Because PyLith does not include fluid pressure, we instead formulate the simulation parameters in terms of effective stresses. The TPV13-2D simulations require a small fraction of the computational resources needed for the TPV13 3-D simulations and run quickly on a laptop or desktop computer. The 50 m resolution cases took 62 s (triangular cells) and 120 s (quadrilateral cells) using 8 processes on a dual quad core desktop computer with Intel Xeon E5630 processors. Figure 11(b) displays the final slip distribution in the TPV132D simulation with triangular cells at a resolution of 100 m. The large dynamic stress drop and supershear rupture generate 20 m of slip at a depth of about 7 km. Figure 12(a)–(d) demonstrates the convergence of the solution as the discretization size decreases as evident in the normal faulting component of fault slip rate time histories. For a resolution of 200 m on the fault, the solution contains some high-frequency oscillation due to insufficient resolution of the cohesive zone [Rice, 1993]. The finer meshes provide sufficient resolution of the cohesive zone so there is very little high-frequency oscillation in the slip rate time histories. The triangular cells generate less oscillation compared with quadrilateral cells. In this benchmark without an analytical solution, as in all of the exercises in the SCEC spontaneous rupture benchmark suite, we rely on comparison with other dynamic spontaneous rupture modeling codes to verify the numerical implementation in PyLith. Figure 12(e)–(h) compares the slip rate time histories from PyLith with four other codes (see Harris et al. [2011], Andrews et al. [2007], Barall [2009], Ma [2009], and Dunham et al. [2011] for a discussion of these other finite-element and finite-difference codes). The slip rate time histories agree very well, although some codes yield more oscillation than others. We attribute this to variations in the amount of numerical damping used in the various codes. The 3-D version of the TPV13 benchmark yields similar results but requires greater computational resources. The X - 11 simulations with a discretization size of 100 m took 2.5 hours using 64 processes (8 compute nodes with 8 processes per dual quad core compute node) on a cluster with Intel Xeon E5620 processors. Figure 13(a) shows the same trends in rupture speed with discretization size that we observed in the 2-D version. In both cases models with insufficient resolution to resolve the cohesive zone propagate slightly slower than models with sufficient resolution. In this case the differences between the rupture times for the 200 m and 100 m resolution tetrahedral meshes are less than 0.1 seconds over the entire fault surface. Comparing the rupture times among the modeling codes in Figure 13, we find that the four codes fall into two groups. In the mode-III (along-strike) direction, PyLith and the spectral element code by Kaneko et al. [2008] are essentially identical while the finite-element codes by Barall [2009] and Ma and Andrews [2010] are also essentially identical. In the mode-II (up-dip) direction all four codes agree very closely. As in the 2-D version, we attribute the differences among the codes not to the numerical implementation but the treatment of discontinuities in the spatial variation of the parameters. This explains why the higherorder spectral element code by Kaneko et al. [2008] agrees so closely with PyLith, a lower-order finite-element code. The slip rate and velocity time histories displayed in Figures 14 and 15 are consistent with the trends observed in the comparison of rupture times. Furthermore, the codes all produce consistent results throughout the entire time histories. The small differences in rupture time in the mode-III (along-strike) direction between the two groups of codes is evident in the slip rate time histories at a depth of 7.5 km and 12 km along strike (Figure 14(f)). Nevertheless, this simply produces a small time shift in the time history. From the 2-D and 3-D versions of the SCEC spontaneous rupture benchmark TPV13, we conclude that PyLith performs similarly to other finite-element and finite-difference dynamic spontaneous rupture modeling codes. In particular it is well-suited to problems with complex geometry, as we are able to vary the discretization size while simulating a dipping normal fault. The code accurately captures supershear rupture and properly implements a Drucker-Prager elastoplastic bulk rheology and slip-weakening friction. 7. Conclusions PyLith provides a flexible numerical implementation of fault slip using a domain decomposition approach. We have evaluated the efficiency of several preconditioners for use of this fault implementation in quasi-static simulations. We find that algebraic multigrid preconditioners for elasticity combined with a custom preconditioner for the fault block associated with the Lagrange multipliers accelerates the convergence of the Krylov solver with the fewest number of iterations and the least sensitivity to problem size. Benchmark tests demonstrate the accuracy of our fault slip implementation in PyLith with excellent agreement to (1) an analytical solution for viscoelastic relaxation and strike-slip faulting over multiple earthquake cycles and (2) other codes for supershear dynamic spontaneous rupture on a dipping normal fault embedded in an elastoplastic domain. Consequently, we believe this methodology provides a promising avenue for modeling the earthquake cycle through coupling of quasi-static simulations of the interseismic and postseismic deformation and dynamic rupture simulations of earthquake rupture propagation. Notation A matrix associated with Jacobian operator for the entire system of equations. X - 12 C d f l AAGAARD ET AL.: FAULT SLIP VIA DOMAIN DECOMPOSITION fourth order tensor of elastic constants. fault slip vector. body force vector. Lagrange multiplier vector corresponding to the fault traction vector. matrix associated with Jacobian operator for constraint equation. matrix associated with Jacobian operator for elasticity equation. matrix for m basis functions. normal vector. preconditioning matrix. preconditioning matrix associated with elasticity. preconditioning matrix associated with fault slip constraints (Lagrange multipliers). fault surface. surface with Neumann boundary conditions. surface with Dirichlet boundary conditions. time. Traction vector. scalar shear traction associated with cohesion. scalar shear traction associated with friction. scalar normal traction. displacement vector. spatial domain of model. dilatational wave speed. shear wave speed. time step. nondimensional viscosity used for numerical damping. weighting function. coefficient of friction. mass density. Cauchy stress tensor. Andrews, D. J. (1999), Test of two methods for faulting in finitedifference calculations, Bulletin of the Seismological Society of America, 89 (4), 931–937. Andrews, D. J. (2004), Rupture calculations with dynamicallydetermined slip-weakening friction, Bulletin of the Seismological Society of America, 94 (3), 769–775, doi:10.1785/ 0120030142. L Andrews, D. J., T. C. Hanks, and J. W. Whitney (2007), Physical limits on ground motion at Yucca Mountain, Bulletin of K the Seismological Society of America, 97 (6), 1771–1792, doi: 10.1785/0120070014. Balay, S., W. D. Gropp, L. C. McInnes, and B. F. Smith (1997), Nm Efficient management of parallelism in object oriented numern ical software libraries, in Modern Software Tools in Scientific P Computing, edited by E. Arge, A. M. Bruaset, and H. P. Langtangen, pp. 163–202, Birkhäuser Press. Pelastic Balay, S., J. Brown, K. Buschelman, W. D. Gropp, Pfault D. Kaushik, M. G. Knepley, L. C. McInnes, B. F. Smith, and H. Zhang (2010), PETSc users manual, Tech. Rep. Sf ANL-95/11 - Revision 3.1, Argonne National Laboratory, http://www.mcs.anl.gov/petsc. ST Barall, M. (2009), A grid-doubling finite-element technique for Su calculating dynamic three-dimensional spontaneous rupture on t an earthquake fault, Geophysical Journal International, 178, 845–859, doi:10.1111/j.1365-246X.2009.04190.x. T Barbot, S., N. Lapusta, and J.-P. Avouac (2012), Under the Tc hood of the earthquake machine: Toward predictive modelTf ing of the seismic cycle, Science, 336 (6082), 707–710, doi: Tn 10.1126/science.1218796. Bathe, K.-J. (1995), Finite-Element Procedures, Prentice Hall, u Upper Saddle River, New Jersey. V Bizzarri, A., and M. Cocco (2005), 3D dynamic simulations of Vp spontaneous rupture propagation governed by different constitutive laws with rake rotation allowed, Annals of Geophysics, Vs 48 (2), doi:10.4401/ag-3201. ∆t Brenner, S. C., and L. R. Scott (2008), The Mathematical Theory ∗ η of Finite Element Methods, Texts in Applied Mathematics, 3rd ed., Springer, New York, New York. Brown, J., B. F. Smoth, and A. Ahmadia (2012), Achieving textφ book multigrid efficiency for hydrostatic ice flow, SIAM Jourµf nal on Scientific Computing, accepted for publication. ρ Brune, J. N. (1970), Tectonic stress and spectra of seismic shear waves from earthquakes, Journal of Geophysical Research, 75, σ 4997–5009. Chen, T., and N. Lapusta (2009), Scaling of small repeating earthAcknowledgments. We thank Sylvain Barbot, Ruth Harris, quakes explained by interaction of seismic and aseismic slip in and Fred Pollitz for their careful reviews of the manuscript. Dea rate and state fault model, Journal of Geophysical Research: velopment of PyLith has been supported by the Earthquake HazSolid Earth, 114 (B01311), doi:10.1029/2008JB005749. ards Program of the U.S. Geological Survey, the Computational Chlieh, M., J.-P. Avouac, V. Hjorleifsdottir1, R.-R. A. Song, Infrastructure for Geodynamics (NSF grant EAR-0949446), GNS C. Ji, K. Sieh, A. Sladen, H. Herbert, L. Prawirodirdjo, Science, and the Southern California Earthquake Center. SCEC Y. Bock, and J. Galetzka (2007), Coseismic slip and afterslip of is funded by NSF Cooperative Agreement EAR-0529922 and the great Mw 9.15 Sumatra-Andaman earthquake of 2004, Bulletin of the Seismological Society of America, 97 (1A), S152– USGS Cooperative Agreement 07HQAG0008. PyLith developS173, doi:10.1785/0120050631. ment has also been supported by NSF grants EAR/ITR-0313238 Courant, R., K. Friedrichs, and H. Lewy (1967), On the partial and EAR-0745391. This is SCEC contribution number 1665. difference equations of mathematical physics, IBM Journal of Several of the figures were produced using Matplotlib [Hunter , Research and Development, 11 (2), 215–234, english transla2007] and PGF/TikZ (available from http://sourceforge.net/ tion of the original 1928 paper published in Mathematische projects/pgf/). Computing resources for the parallel scalabilAnnalen. ity benchmarks were provided by the Texas Advanced Computing Center (TACC) at The University of Texas at Austin Dalguer, L. A., and S. M. Day (2007), Staggered-grid split-node method for spontaneous rupture simulation, Journal of Geo(http://www.tacc.utexas.edu). physical Research: Solid Earth, 112 (B02302), doi:10.1029/ 2006JB004467. Day, S. M., L. A. Dalguer, N. Lapusta, and Y. Liu (2005), Comparison of finite difference and boundary integral solutions to References three-dimensional spontaneous rupture, Journal of Geophysical Research, 110 (B09317), doi:10.1029/2007JB005553. Aagaard, B., S. Kientz, M. Knepley, , L. Strand, Dieterich, J. H. (1979), Modeling of rock friction, 1. Experimenand C. Williams (2012), PyLith User Manual, Vertal results and constitutive equations, Journal of Geophysical sion 1.7.1, Computational Infrastructure for GeoResearch: Solid Earth, 84 (B5), 2161–2168. dynamics (CIG), University of California, Davis, Dieterich, J. H., and K. B. Richards-Dinger (2010), Earthquake http://www.geodynamics.org/cig/software/pylith/pylith manual- recurrence in simulated fault systems, Pure and Applied Geo1.7.1.pdf. physics, 167 (8–9), 1087–1104, doi:10.1007/s00024-010-0094-0. Aagaard, B. T., T. H. Heaton, and J. F. Hall (2001), DyDuan, B., and D. D. Oglesby (2005), Multicycle dynamics of namic earthquake ruptures in the presence of lithostatic nornonplanar strike-slip faults, Journal of Geophysical Research, mal stresses: Implications for friction models and heat produc110 (B12), B03304, doi:10.1029/2004JB003298. tion, Bulletin of the Seismological Society of America, 91 (6), Dunham, E. M., and R. J. Archuleta (2004), Evidence for a su1765–1796, doi:10.1785/0120000257. pershear transient during the 2002 Denali earthquake, Bulletin Aki, K., and P. G. Richards (2002), Quantitative Seismology, of the Seismological Society of America, 68 (6B), S256–S268, doi:10.1785/0120040616. University Science Books, Sausalito, California. AAGAARD ET AL.: FAULT SLIP VIA DOMAIN DECOMPOSITION Dunham, E. M., D. Belanger, L. Cong, and J. E. Kozdon (2011), Earthquake ruptures with strongly rate-weakening friction and off-fault plasticity: Planar faults, Bulletin of the Seismological Society of America, 101 (5), 2308–2322, doi: 10.1785/0120100075. Harris, R. A., and S. M. Day (1999), Dynamic 3-D simulations of earthquakes on en echelon faults, Geophysical Research Letters, 26 (14), 2089–2092. Harris, R. A., M. Barall, R. Archuleta, E. Dunham, B. Aagaard, J. P. Ampuero, H. Bhat, V. Cruz-Atienza, L. Dalguer, P. Dawson, S. Day, B. Duan, G. Ely, Y. Kase, N. Lapusta, Y. Liu, S. Ma, D. Oglesby, K. Olsen, A. Pitarka, S. Song, and E. Templeton (2009), The SCEC/USGS dynamic earthquake rupture code verification exercise, Seismological Research Letters, 80 (1), 119–126, doi:10.1785/gssrl.80.1.119. Harris, R. A., M. Barall, D. J. Andrews, B. Duan, S. Ma, E. M. Dunham, A. A. Gabriel, Y. Kaneko, Y. Kase, B. T. Aagaard, D. D. Oglesby, J. P. Ampuero, T. C. Hanks, and N. Abrahamson (2011), Verifying a computational method for predicting extreme ground motion, Seismological Research Letters, 82 (5), 638–644, doi:10.1785/gssrl.82.5.638. Hillers, G., Y. Ben-Zion, and P. M. Mai (2006), Seismicity on a fault with rate- and state-dependent friction and spatial variations of the critical slip distance, Journal of Geophysical Research: Solid Earth, 111 (B01403), doi:10.1029/2005JB003859. Hunter, J. D. (2007), Matplotlib: A 2d graphics environment, Computing In Science & Engineering, 9 (3), 90–95. Ida, Y. (1972), Cohesive force across the tip of a longitudinalshear crack and Griffith’s specific surface energy, Journal of Geophysical Research, 77 (20), 3796–3805. Igarashi, T., T. Matsuzawa, and A. Hasegawa (2003), Repeating earthquakes and interplate aseismic slip in the northeastern Japan subduction zone, Journal of Geophysical Research: Solid Earth, 108 (B5), doi:10.1029/2002JB001920. Ito, Y., K. Obara, K. Shiomi, S. Sekine, and H. Hirose (2007), Slow earthquakes coincident with episodic tremors and slow slip events, Science, 315 (315), 503–506, doi:10.1126/science. 1134454. Kaneko, Y., N. Lapusta, and J.-P. Ampuero (2008), Spectral element modeling of spontaneous earthquake rupture on rate and state faults: Effect of velocity-strengthening friction at shallow depths, Journal of Geophysical Research, 113 (B09317), doi:10.1029/2007JB005553. Kaneko, Y., J.-P. Ampuero, and N. Lapusta (2011), Spectralelement simulations of long-term fault slip: Effect of low-rigidity layers on earthquake-cycle dynamics, Journal of Geophysical Research, 116 (B10313), 18pp, doi:10.1029/ 2011JB008395. Karypis, G., R. Aggarwal, V. Kumar, and S. Shekhar (1999), Multilevel hypergraph partitioning: Applications in VLSI domain, IEEE Transactions on Very Large Scale Integration (VLSI) Systems, 7 (1), 69–79. Kaushik, D., M. Smith, A. Wollaber, B. Smith, A. Siegel, and W. S. Yang (2009), Enabling high fidelity neutron transport simulations on petascale architectures, in ACM/IEEE Proceedings of SC2009: High Performance Networking and Computing. Knepley, M. G., and D. A. Karpeev (2009), Mesh algorithms for PDE with Sieve I: Mesh distribution, Scientific Programming, 17 (3), 215–230, doi:10.3233/SPR-2009-0249. Komatitsch, D., and J. P. Vilotte (1998), The spectral element method: An efficient tool to simulate the seismic response of 2d and 3d geological structures, Bulletin of the Seismological Society of America, 88 (2), 368–392. Langbein, J., J. R. Murray, and H. A. Snyder (2006), Coseismic and initial postseismic deformation from the 2004 Parkfield, California, earthquake, observed by global positioning system, electronic distance meter, creepmeters, and borehole strainmeters, Bulletin of the Seismological Society of America, 96 (4B), S304–S320, doi:10.1785/0120050823. Liu, P., R. J. Archuleta, and S. H. Hartzell (2006), Prediction of broadband ground-motion time histories: Hybrid low/highfrequency method with correlated random source parameters, Bulletin of the Seismological Society of America, 96 (6), 2118– 2130, doi:10.1785/0120060036. Ma, S. (2009), Distinct asymmetry in rupture-induced inelastic strain across dipping faults: An off-fault yielding model, Geophysical Research Letters, 36 (L20317), doi:10. 1029/2009GL040666. X - 13 Ma, S., and D. J. Andrews (2010), Inelastic off-fault response and three-dimensional earthquake rupture dynamics on a strikeslip fault, Journal of Geophysical Research, 115, B04,304, doi: 10.1029/2009JB006382. Matsuzawa, T., H. Hirose, B. Shibazaki, and K. Obara (2010), Modeling short- and long-term slow slip events in the seismic cycles of large subduction earthquakes, Journal of Geophysical Research: Solid Earth, 115 (B12), doi:10.1029/2010JB007566. Melosh, J., and A. Raefsky (1980), The dynamical origin of subduction zone topography, Geophysical Journal of the Royal Astronomical Society, 60 (3), 333–354, doi:10.1111/j. 1365-246X.1980.tb04812.x. Melosh, J., and A. Raefsky (1981), A simple and efficient method for introducing faults into finite element computations, Bulletin of the Seismological Society of America, 71 (5), 1391– 1400. Mikumo, T., T. Miyatake, and M. A. Santoyo (1998), Dynamic rupture of asperities and stress change during a sequence of large interplate earthquakes in the mexican subduction zone, Bulletin of the Seismological Society of America, 88 (3), 686– 702. Mills, R. T., V. Sripathi, G. Mahinthakumar, G. Hammond, P. C. Lichtner, and B. F. Smith (2010), Engineering PFLOTRAN for scalable performance on Cray XT and IBM BlueGene architectures, in Proceedings of SciDAC 2010 Annual Meeting. Moczo, P., O. A. Robertsson, and L. Eisner (2007), The finitedifference time-domain method for modeling of seismic wave propagation, in Advances in Wave Propagation in Heterogenous Earth, Advances in Geophysics, vol. 48, pp. 421–516, Elsevier, doi:10.1016/S0065-2687(06)48008-0. Newmark, N. M. (1959), A method of computation for structural dynamics, Journal of Engineering Mechanics, 85 (EM3), 67– 94. Oglesby, D. D., and S. M. Day (2001), Fault geometry and the dynamics of the 1999 Chi-Chi (Taiwan) earthquake, Bulletin of the Seismological Society of America, 91 (5), 1099–1111, doi:10.1785/0120000714. Peyrat, S., K. Olsen, and R. Madariaga (2001), Dynamic modeling of the 1992 Landers earthquake, Journal of Geophysical Research: Solid Earth, 106 (B11), 26,467–26,482, doi: 10.1029/2001JB000205. Pollitz, F. F., and D. P. Schwartz (2008), Probabilistic seismic hazard in the San Francisco Bay area based on a simplified viscoelastic cycle model of fault interactions, Journal of Geophysical Research: Solid Earth, 113 (B05409), doi: 10.1029/2007JB005227. Pollitz, F. F., C. Wicks, and W. Thatcher (2001), Mantle flow beneath a continental strike-slip fault: Postseismic deformation after the 1999 Hector Mine earthquake, Science, 293 (5536), 1814–1818, doi:10.1126/science.1061361. Reilinger, R. E., S. Ergintav, R. Burgmann, S. McClusky, O. Lenk, A. Barka, O. Gurkan, L. Hearn, K. L. Feigle, R. Cakmak, B. Aktug, H. Ozener, and M. N. Toksoz (2000), Coseismic and postseismic fault slip for the 17 August 1999, M = 7.5, Izmit, Turkey earthquake, Science, 289 (5484), 1519–1524, doi:10.1126/science.289.5484.1519. Rice, J. R. (1993), Spatiotemporal complexity of slip on a fault, Journal of Geophysical Research, 98 (B6), 9885–9907. Robinson, R., and R. Benites (1995), Synthetic seismicity models of multiple interacting faults, Journal of Geophysical Research: Solid Earth, 100 (B9), 18,229–18,238, doi:10.1029/95JB01569. Rundle, P. B., J. B. Rundle, K. F. Tiampo, A. Donnellan, and D. L. Turcotte (2006), Virtual California: Fault model, friction parameters, applications, Pure and Applied Geophysics, 163 (9), 1819–1846, doi:10.1007/s00024-006-0099-x. Saad, Y. (2003), Iterative Methods for Sparse Linear Systems, 2nd ed., SIAM, Philadelphia, Pennsylvania. Sala, M., J. J. Hu, and R. S. Tuminaro (2004), ML3.1 Smoothed Aggregation User’s Guide, Tech. Rep. SAND2004-4821, Sandia National Laboratories, Albuquerque, NM (USA). Savage, J. C., and W. H. Prescott (1978), Asthenosphere readjustment and the earthquake cycle, Journal of Geophysical Research, 83 (B7), 3369–3376, doi:10.1029/JB083iB07p03369. Smith, B. F., P. Bjørstad, and W. D. Gropp (1996), Domain Decomposition: Parallel Multilevel Methods for Elliptic Partial Differential Equations, Cambridge University Press, http://www.mcs.anl.gov/˜bsmith/ddbook.html. X - 14 AAGAARD ET AL.: FAULT SLIP VIA DOMAIN DECOMPOSITION Smith, M. A., C. Rabiti, D. Kaushik, B. Smith, W. S. Yang, and G. Palmiotti (2008), Fast reactor core simulations using the UNIC code, in Proceedings of the International Conference on the Physics of Reactors, Nuclear Power: A Sustainable Resource. Ward, S. N. (1992), An application of synthetic seismicity in earthquake statistics: The Middle America Trench, Journal of Geophysical Research: Solid Earth, 97 (B5), 6675–6682, doi: 10.1029/92JB00236. Williams, C. A., and R. M. Richardson (1991), A rheologically layered three-dimensional model of the San Andreas Fault in central and southern California, Journal of Geophysical Research: Solid Earth, 96 (B10), 16,597–16,623, doi: 10.1029/91JB01484. Zienkiewicz, O. C., R. L. Taylor, and J. Z. Zhu (2005), The FiniteElement Method: Its Basis and Fundamentals, 6th ed., Elsevier Butterworth-Heinemann, Burlington, Massachusetts. B. T. Aagaard, USGS MS977, 345 Middlefield Rd, Menlo Park, CA 94025, USA. ([email protected]) M. G. Knepley, Computation Institute, University of Chicago, Searle Chemistry Laboratory, 5735 S. Ellis Avenue, Chicago, IL 60637, USA. C. A. Williams, GNS Science, 1 Fairway Drive, Avalon, PO Box 30368, Lower Hutt 5040, New Zealand. AAGAARD ET AL.: FAULT SLIP VIA DOMAIN DECOMPOSITION Sf- Sf+ u+,T+ u-,Tn Figure 1. Diagram of domain decomposition approach for modeling fault slip. The fault slip introduces a jump in the displacement field across the fault, whereas the tractions are continuous. X - 15 X - 16 AAGAARD ET AL.: FAULT SLIP VIA DOMAIN DECOMPOSITION (a) Interpolated triangular mesh (b) Interpolated quadrilateral mesh 8 7 0 4 10 1 3 6 10 7 Edges 8 3 2 9 10 5 4 0 Cells 9 6 3 2 Cells 0 1 7 6 4 8 6 0 1 3 5 14 1 5 4 13 12 5 2 1 3 2 11 14 7 (d) Optimized quadrilateral mesh 4 Vertices 8 0 3 0 13 1 12 4 1 (c) Optimized triangular mesh 2 5 4 10 6 11 0 2 9 Vertices 3 9 5 2 2 7 5 3 4 0 5 6 1 7 AAGAARD ET AL.: FAULT SLIP VIA DOMAIN DECOMPOSITION X - 17 X - 18 AAGAARD ET AL.: FAULT SLIP VIA DOMAIN DECOMPOSITION (a) Original mesh (b) Add colocated vertices Sf − (c) Update cells with fault faces (d) Classify cells and update remaining cells + Sf + - + - + + - n + - + + Original fault vertex (negative side) fault vertex Cell on negative side Cell on positive side + - Add Lagrange multiplier vertex Add vertex on positive side Figure 3. Construction of cohesive cells for a fault. (a) Original mesh with fault normal and fault vertices identified. (b) For each vertex on the fault, introduce a vertex on the positive side of the fault Sf + and a vertex corresponding to the Lagrange multiplier constraint between the pair of vertices on the positive and negative sides of the fault. (c) Identify cells with faces on the fault. Use the orientation of each face to identify cells on the positive and negative sides of the fault. Replace vertices in cells on the positive side of the fault with the newly created vertices. (d) Classify remaining cells with vertices on the fault using breadth-first search, and replace original vertices in cells on positive side of the fault with newly created vertices. Construct cohesive cells with zero volume from the vertices on the positive side of the fault, negative side of the fault, and Lagrange multiplier constraints. X - 19 AAGAARD ET AL.: FAULT SLIP VIA DOMAIN DECOMPOSITION 102 Solve Reform Jacobian Reform Residual Hex8 Tet4 Time (s) 36 km 2.0 m 2.0 m 72 km 101 100 10-1 0 10 72 km 101 102 101 # Processors 102 Figure 4. Geometry of problem used in quasi-static performance benchmark. Dirichlet boundary conditions prescribe a horizontal lateral displacement of 2.0 m with no motion normal to the boundary on two sides of the domain and zero vertical displacement on the bottom boundary. We specify uniform slip of 1.0 m of rightlateral motion on the middle fault and 0.5 m of left-lateral motion on the two other faults. The faults extend down to a depth of 12.0 km. # Iterations 102 101 100 0 10 Figure 5. Tetrahedral finite-element mesh with a uniform discretization size of 1744 m for the performance benchmark. The colors correspond to the volumes in the CUBIT geometry that are separated by the fault surfaces and boundary between the upper crust and lower crust. Figure 6. Plot of parallel scaling for the performance benchmark with the algebraic multigrid preconditioner and fault block custom preconditioner. The stages shown include the numerical integration of the residual (Reform Residual) and Jacobian (Reform Jacobian) and setting up the preconditioner and solving the linear system of equations (Solve). The finite-element integrations for the Jacobian and residual exhibit good weak scaling with minimal sensitivity to the problem size. The linear solve (solid lines in the top panel) does not scale as well, which we attribute to the poor scaling of the algebraic multigrid setup and application as well as limited memory and interconnect bandwidth. We attribute fluctuations in the relative performance to variations in the machine load from other jobs on the cluster. X - 20 AAGAARD ET AL.: FAULT SLIP VIA DOMAIN DECOMPOSITION 0.4 (a) 0.3 0.2 0.1 0.0 0.5 Disp. / Coseismic Disp. Figure 7. Deformation (exaggerated by a factor of 5000) 95% of the way through earthquake cycle 10 of the Savage and Prescott benchmark, which involves viscoelastic relaxation over multiple earthquake cycles on a vertical, strike-slip fault. The coordinates are in units of elastic layer thickness and the displacement field is in units of coseismic slip. The locking depth is one-half of the thickness of the elastic layer. We refine the hexahedral mesh by a factor of three near the center of the domain. Figure 8 compares profiles along y=0 with the analytic solution. Disp. / Coseismic Disp. 0.5 Analytic Hex8 20km Tet4 20km Hex8 6.7km Tet4 6.7km Earthquake Cycle 2 0.4 Earthquake Cycle 10 (b) 0.3 0.2 0.1 0.0 -1 10 t=0.95 t=0.75 t=0.50 t=0.25 t=0.05 101 100 Dist. from Fault / Elastic thickness Figure 8. Comparison of displacement profiles perpendicular to the fault in the Savage and Prescott benchmark during earthquake cycles (a) two and (b) ten. The displacement values shown are relative to the values at the beginning of the earthquake cycle to facilitate comparison between the analytical solution and the numerical models. Both the analytical and numerical simulations require spin-up to reach the steady-state solution, and the numerical models also require spin-up to achieve steady plate motion, which is superimposed on the analytical solution. Both the hexahedral (Hex8) and tetrahedral (Tet4) discretizations resolve the viscoelastic deformation and display excellent agreement with the steady-state solution by the tenth earthquake cycle. The coarser (20 km) resolutions are unable to match the details of the displacement field at distances less than about one elastic thickness, but all of the numerical models provide a good fit to the analytical solution in the tenth earthquake cycle at distances greater than 2–3 times the elastic thickness. X - 21 AAGAARD ET AL.: FAULT SLIP VIA DOMAIN DECOMPOSITION 0 (a) Tshear Tnormal Tfailure Tsliding 15 Dist. Down Dip (km) 2 km km 36 km 30 4 6 8 10 12 14 150 64 km 0 50 0 50 Traction (MPa) 5 15 10 Slip (m) (b) 100 150 20 25 2 Dist. Down Dip (km) 48 km Figure 9. Geometry for SCEC spontaneous rupture benchmark TPV13 involving a Drucker-Prager elastoplastic bulk rheology, slip-weakening friction, a depthdependent stress field, and normal fault with a 60 degree dip angle. The 2-D version corresponds to the vertical slice shown by the dashed line. The red dots denote locations on the fault used in the comparison of the vertical slip rates (Figures 12 and 14). The blue dots indicate locations on the ground surface used in the comparison of fault normal and vertical velocity time histories (Figure 15). 100 4 6 8 10 12 14 0 Figure 11. (a) Depth-dependent fault tractions in SCEC spontaneous rupture benchmark TPV13-2D and TPV13. Tshear denotes the initial shear traction, Tnormal denotes the initial effective normal traction, Tfailure denotes the frictional failure stress corresponding to the initial effective normal traction, and Tsliding denotes the dynamic sliding stress corresponding to the initial effective normal traction. Positive shear tractions correspond to normal faulting and negative normal tractions correspond to compression. (b) Final slip as a function of depth in TPV13-2D for the triangular mesh with a resolution of 100 m on the fault. Figure 10. Finite-element mesh comprised of quadrilateral cells for SCEC spontaneous rupture benchmark TPV13-2D. The discretization size is 100 m on the fault surface and increases at a geometric rate of 2% with distance from the fault. We employ this same spatial variation of the discretization size in the 3-D model. X - 22 AAGAARD ET AL.: FAULT SLIP VIA DOMAIN DECOMPOSITION Quad4, 200m Tri3, 200m Quad4, 100m Tri3, 100m Quad4, 50m Tri3, 50m Andrews Barall Dunham Ma PyLith (Tri3) Slip Rate (m/s) (e) Slip Rate (m/s) 16 14 (b) 12 10 8 6 4 2 0 (f) Slip Rate (m/s) 16 14 (c) 12 10 8 6 4 2 0 (g) Slip Rate (m/s) 0.0 km Down Dip 16 14 (a) 12 10 8 6 4 2 0 16 14 (d) 12 10 8 6 4 2 0 0 1 (h) 3.0 km Down Dip 7.5 km Down Dip 12.0 km Down Dip 2 3 4 5 Time (s) 6 7 8 0 1 2 3 4 5 Time (s) 6 7 8 Figure 12. Slip rate time histories for SCEC spontaneous rupture benchmark TPV13-2D. Locations correspond to the red dots along the center-line of the fault shown in Figure 9. Panels (a)–(d) show convergence of the solution for quadrilateral and triangular cells as a function of discretization size, and panels (e)–(h) demonstrate of code verification via excellent agreement among PyLith and four other dynamic rupture modeling codes [Harris et al., 2011]. X - 23 AAGAARD ET AL.: FAULT SLIP VIA DOMAIN DECOMPOSITION Dist. Down Dip (km) 0 Tet4, 200m Tet4, 100m (a) Barall Kaneko Ma PyLith (b) 5 10 15 15 10 5 5 0 10 Dist. Along Strike (km) 15 15 10 5 5 0 10 Dist. Along Strike (km) 15 Figure 13. Rupture time contours (0.5 s interval) for SCEC spontaneous rupture benchmark TPV13. (a) Effect of discretization size and (b) demonstration of code verification via excellent agreement among PyLith and three other dynamic rupture modeling codes [Harris et al., 2011]. The contours for PyLith and Kaneko (spectral element code) are nearly identical. X - 24 AAGAARD ET AL.: FAULT SLIP VIA DOMAIN DECOMPOSITION Barall Kaneko Ma PyLith (b) 7.5 km Down Dip 16 (d) 0.0 km Along Strike 14 (e) Slip Rate (m/s) Slip Rate (m/s) 0.0 km Down Dip 16 (a) 0.0 km Along Strike 14 4.5 km Along Strike (c) 12.0 km Along Strike 12 10 8 6 4 2 0 12 10 8 6 4 2 0 4.5 km Along Strike (f) 12.0 km Along Strike 0 1 2 3 4 5 6 7 8 0 1 2 3 4 5 6 7 8 0 1 2 3 4 5 6 7 8 Time (s) Time (s) Time (s) Figure 14. Comparison of normal faulting component of slip rate at six locations on the fault surface for SCEC spontaneous rupture benchmark TPV13. (a)–(c) are at a depth of 0 km and (d)–(f) are at a depth of 7.5 km. The slip rate time histories for all four dynamic rupture modeling codes agree very well. At 12 km along strike and 7.5 km down dip, there is a small discrepancy between two groups of codes (PyLith and Kaneko versus Barall and Ma) that we attribute to how the modelers handled the discontinuity in the initial stress field and parameters. AAGAARD ET AL.: FAULT SLIP VIA DOMAIN DECOMPOSITION Barall Kaneko Ma PyLith -3.0 km From Fault, 12.0 Along Strike Velocity (m/s) Fault Normal Component 3 (a) 2 1 0 1 2 Vertical Component (b) Velocity (m/s) 3.0 km From Fault, 0.0 Along Strike 3 (c) (d) 2 1 0 1 2 0 1 2 3 4 5 6 7 8 0 1 2 3 4 5 6 7 8 Time (s) Time (s) Figure 15. Comparison of fault normal and vertical components of velocity time histories at two sites on the ground surface for SCEC spontaneous rupture benchmark TPV13. Panels (a)–(b) are associated with a site that is on the hanging wall 3 km from the fault trace and 12 km along strike, and panels (c)– (d) are associated with a site that is on the footwall 3 km from the fault trace along the fault center-line. As expected based on the close agreement in the rupture time contours and fault slip rates, the velocity time histories from the difference dynamic rupture modeling codes agree very closely. X - 25 X - 26 AAGAARD ET AL.: FAULT SLIP VIA DOMAIN DECOMPOSITION Table 1. Example Preconditioners for the Saddle Point Problem in Equation (24)a AMG with   additive relaxation K 0 0 I [pylithapp.problem.formulation] split fields = True matrix type = aij [pylithapp.petsc] fs pc type = fieldsplit fs pc field split real diagonal = true fs pc field split type = additive fs fieldsplit 0 pc type = ml fs fieldsplit 0 ksp type = preonly fs fieldsplit 1 pc type = jacobi fs fieldsplit 1 ksp type = gmres AMG with   multiplicative relaxation K LT 0 I [pylithapp.problem.formulation] split fields = True matrix type = aij [pylithapp.petsc] fs pc type = fieldsplit fs pc field split real diagonal = true fs pc field split type multiplicative fs fieldsplit 0 pc type = ml fs fieldsplit 0 ksp type = preonly fs fieldsplit 1 pc type = jacobi fs fieldsplit 1 ksp type = gmres Schur complement, upper factorization   K LT 0 S [pylithapp.problem.formulation] split fields = True matrix type = aij [pylithapp.petsc] pc type = fieldsplit pc field split type = schur fs pc field split real diagonal = true pc fieldsplit schur factorization type = upper pc fieldsplit schur precondition = user fieldsplit 0 pc type = ml fieldsplit 0 ksp type = preonly fieldsplit 1 pc type = jacobi fieldsplit 1 ksp type = gmres Schur complement,    fullfactorization   I 0 A 0 I A−1 B T −1 0 S 0 I B A I [pylithapp.problem.formulation] split fields = True matrix type = aij [pylithapp.petsc] pc type = fieldsplit pc field split type = schur fs pc field split real diagonal = true pc fieldsplit schur factorization type = full pc fieldsplit schur precondition = user fieldsplit 0 pc type = ml fieldsplit 0 ksp type = preonly fieldsplit 1 pc type = jacobi fieldsplit 1 ksp type = gmres a Four examples of preconditioners often used to accelerate convergence in saddle point problems. Below the mathematical expression for the preconditioner, we show the PyLith parameters used to construct the preconditioner. X - 27 AAGAARD ET AL.: FAULT SLIP VIA DOMAIN DECOMPOSITION Table 2. Performance Benchmark Parametersa Parameter Value Domain Length 72 km Width 72 km Height 36 km Angle between faults 60 deg Elastic properties Vp 5.774 km/s Vs 3.333 km/s Density (ρ) 2700. kg/m3 Middle fault Length 39.19 km Width 12 km Slip 1.0 m RL End faults Length 43.74 km Width 12 km Slip 0.5 m LL a Simulation parameters for the performance benchmark with three faults embedded in a volume domain as shown in Figure 4. We prescribe right-lateral (RL) slip on the middle fault and leftlateral (LL) slip on the end faults. Table 3. Preconditioner Performancea Preconditioner Cell Problem Size S1 S2 S4 ASM Tet4 184 217 270 Hex8 143 179 221 Schur (full) Tet4 82 84 109 Hex8 54 60 61 Schur (upper) Tet4 79 78 87 Hex8 53 59 57 FieldSplit (add) Tet4 241 587 585 Hex8 159 193 192 FieldSplit (mult) Tet4 284 324 383 Hex8 165 177 194 FieldSplit (mult,custom) Tet4 42 48 51 Hex8 35 39 43 a Number of iterations for additive Schwarz (ASM), Schur complement (Schur), and field split (additive, multiplicative, and multiplicative with custom fault block preconditioner), preconditioners for tetrahedral and hexahedral discretizations and three problem sizes (S1 with 1.8×105 DOF, S2 with 3.5×105 DOF, and S3 with 6.9 × 105 DOF). The Schur complement preconditioners and the field split preconditioner with multiplicative factorization and the custom fault block preconditioner yield the best performance with only a fraction of the iterates as the other preconditioners and a small increase with problem size. Furthermore, the field split preconditioner with multiplicative factorization and the custom fault block preconditioner provides the shortest runtime. Table 4. Performance Benchmark Memory System Evaluationa Event VecMDot VecAXPY VecMAXPY # Cores 1 2 4 6 12 24 48 96 1 2 4 6 12 24 48 96 1 2 4 6 12 24 48 96 Load Imbalance 1.0 1.1 1.1 1.1 1.2 1.2 1.2 1.3 1.0 1.1 1.1 1.1 1.2 1.2 1.2 1.3 1.0 1.1 1.1 1.1 1.2 1.2 1.2 1.3 MFlops/s 2007 3809 5431 5967 5714 11784 20958 17976 1629 3694 5969 6028 5055 10071 18761 33676 1819 3415 5200 5860 6051 12063 23072 28461 a Examination of memory system performance using three PETSc vector operations for simulations with the hexahedral meshes. The performance for the tetrahedral meshes is very similar. For ideal scaling the number of floating point operations per second should scale linearly with the number of processes. VecMDot corresponds to the operation for vector reductions, VecAXPY corresponds to vector scaling and addition, and VecMAXPY corresponds to multiple vector scaling and addition. Table 5. Performance Benchmark Solver Evaluationa Event MatMult PCSetUp PCApply KSPSolve MatMult PCSetUp PCApply KSPSolve MatMult PCSetUp PCApply KSPSolve MatMult PCSetUp PCApply KSPSolve # Calls p = 180 1 57 1 p = 207 1 66 1 p = 222 1 71 1 p = 234 1 75 1 Time (s) 12 2.7 5.7 5.5 15.1 24 3.1 5.2 6.6 16.4 48 4.0 10.1 9.4 25.1 96 4.0 11.8 11.6 30.5 MFlops/s 6113 232 3690 3013 12293 526 7285 6666 21136 628 12032 10129 42130 1943 20422 17674 a Examination of solver performance using three of the main events comprising the linear solve for simulations with the hexahedral meshes and 12, 24, 48, and 96 processes. The performance for the tetrahedral meshes is nearly the same. For ideal scaling the time for each event should be constant as the number of processes increases. The KSPSolve event encompasses the entire linear solve. MatMult corresponds to matrix-vector multiplications. PCSetUp and PCApply correspond to the setup and application of the AMG preconditioner. X - 28 AAGAARD ET AL.: FAULT SLIP VIA DOMAIN DECOMPOSITION Table 6. Savage and Prescott Benchmark Parametersa Table 7. SCEC Benchmark TPV13 Parametersa Parameter Value Domain Length 2000 km Width 1000 km Height 400 km Fault dip angle 90 deg Physical properties Shear modulus 30 GPa Viscosity 2.37 × 1019 Pa-s Elastic thickness 40 km Fault slip Locking depth 20 km Earthquake recurrence 200 yr Earthquake slip 4m Creep rate 2 cm/yr a Simulation parameters for the Savage and Prescott benchmark with multiple earthquake cycles on a vertical strike-slip fault embedded in an elastic layer over a viscoelastic half-space. Parameter Value Domain Length 64 km Width 48 km Height 36 km Fault dip angle 60 deg Elastic properties Vp 5.716 km/s Vs 3.300 km/s Density (ρ) 2700. kg/m3 Nondimensional viscosity (η ∗ ) 0.4 a Basic simulation parameters for the SCEC dynamic spontaneous rupture benchmark TPV13. A complete list of the parameters can be found in Harris et al. [2011].
5cs.CE
Application of artificial neural networks and genetic algorithms for crude fractional distillation process modeling Łukasz Pater PKN ORLEN S.A. Płock, Poland, Faculty of Mathematics and Computer Science, Nicolaus Copernicus University, Toruń, Poland Email: [email protected]  Abstract—This work presents the application of the artificial neural networks, trained and structurally optimized by genetic algorithms, for modeling of crude distillation process at PKN ORLEN S.A. refinery. Models for the main fractionator distillation column products were developed using historical data. Quality of the fractions were predicted based on several chosen process variables. The performance of the model was validated using test data. Neural networks used in companion with genetic algorithms proved that they can accurately predict fractions quality shifts, reproducing the results of the standard laboratory analysis. Simple knowledge extraction method from neural network model built was also performed. Genetic algorithms can be successfully utilized in efficient training of large neural networks and finding their optimal structures. I. INTRODUCTION rtificial neural networks (ANN) as well as genetic algorithms (GA) are popular machine learning technologies. They were both designed in analogy to structures and processes occurring in nature. Due to their desired properties, they are widely applied to solve various problems of modeling and optimization [1-5]. Although those techniques are utilized mostly separately, together they can extend the range of their possible applications. They can be applied to problems, where it is difficult to recover a clear analytical solution [6,7]. The example can be crude fractional distillation, which is a highly nonlinear process [8]. It also includes many random disturbances caused by many unpredictable factors like mechanical or measurement problems [9]. Because of the above obstacles, data from such process can be perfectly suited to verify the behaviour and properties of artificial neural networks trained and optimized by genetic algorithms. The aim of this work is to apply artificial neural networks, trained and structurally optimized by the genetic algorithm, to model laboratory quality measurements of main crude oil fractional distillation products. A A. Artificial neural networks Artificial neural network is a structure built by many interconnected basic elements called artificial neurons. It resembles the natural tissues in brain, which consists from many nervous cells. Observation of the natural neurons behaviour resulted in uncovering its basic operation  principles and interesting properties. The first mathematical description of artificial neuron was done by McCulloch and Pitts in 1943. Rosenblatt in 1957 refined his idea creating modern artificial neuron called simple perceptron [10,11]. Perceptron artificial neuron can be perceived as a transducer of many input signals giving one output. This led to deriving mathematical description of the neuron, which is presented on Fig. 1 and characterized by equation (1). n y=F (∑( i=0 ) ui wi ) +w0 (1) where: y – value of the output signal, F – activation function, n – number of input signals, u – value of input signal number i, w – weight value of the connection number i. Fig 1. Artificial neuron – simple perceptron [11]. Weights located on input connections are coefficients, which are set during learning process. They can resemble storage of gained knowledge. Every input value is multiplied by weight coefficient and added at the end. This sum is then an argument for activation function of choice. Activation function determines the properties of the artificial neuron. Typically the unipolar sigmoid activation function, defined by equation (2), is commonly used [10, 11]. Chart showing its curve was presented on Fig. 2. Results of this function are included in range from 0 to 1. β parameter in this equation is responsible for the sigmoid function steepness. Learning process is basically equivalent to shape modification of the activation function. The result of this function is the output value, which can be final or become input for another artificial neuron [10,11]. F( x)= 1 1+e−β x (2) where: F – type of activation function, x – sum of weights multiplied by input values, β – sigmoid function steepness parameter. during neural network learning and it is based on iterative modification of the weights in order to achieve desired output [10, 11]. In this work only supervised type of learning is used. This type of training is based on presenting to the artificial neural network example pairs of input values with corresponding outputs. For each pair difference between expected example output and resulting output is calculated. The overall performance of artificial neural network is measured by error function, which can be defined as root mean square (3). Total training error after one iteration of training is sum of training data sample errors (4) [10, 11]. y ∑ ( t k s k )2 E s= k= 0 (3) y n E total =∑ E s (4) s=0 where: Es – root mean square of two sets t and s , y – number of outputs, t – set of model output values, s – set of calculated output values, Etotal – total error of single iteration of training, n – total number of training data samples. Fig 2. Sigmoid activation function [11]. In order to extend the single perceptron classification capabilities of nonlinear relationships, many artificial neurons are grouped into many layers, creating multi layer perceptrons (MLP). Layers between the input and output layer are called hidden layers. This class of artificial neural network is widely used for a great majority of problems, because it can model highly nonlinear data relationships. Structure of artificial neural network also has to be chosen carefully. Too large structure, consisting of many layers or neurons, may result in overfitting. It means that artificial neural network can classify correctly only training data [10,11]. Choosing the optimal number of layers in multilayer perceptron and number of artificial neurons in hidden layers, can represent a task for the genetic algorithm to solve [12-15]. Artificial neural networks are also not uniform. They can be divided into a diverse group of classes, based on the type of connections between neurons. In this study only multilayer perceptron feedforward networks of fully interconnected neurons are considered, which is used most often. It means that signals they receive are directed from the input to output, without cycles. The principle of artificial neural network operation is based on proper modification of signals that flow through the connections between neurons, by the weights accredited to this connections. The acquisition of knowledge, is performed After that the weights of artificial neural network are updated by applied training algorithm. New result of error function is calculated. One iteration is called epoch. This cycle ends, when the calculated error is lower than arbitrarily set desired value [10, 11]. There are several training algorithms for feedforward multilayer perceptrons, which vary in performance. Typically, the back-propagation (BP) training algorithm is used, because of its speed. It works by minimization of the training error function. In every iteration it follows only those weights values, which gives lowest training error, against the gradient of error function [10, 11]. Unfortunately, most of the gradient-based algorithms, like BP, share the same drawback. While adjusting weights they can easily get stuck in the local minima of the error function, what causes training to stop prematurely, without reaching desired minimal target error [16]. It is narrowing the space of possible solutions. Artificial neural network created in this manner is not able to fully model the training data, showing poor accuracy. There were many attempts to solve this problem by introducing various modifications into the training process itself [11]. One of the different solutions is to utilize genetic algorithm for training [17-23]. Fig 3. Atmospheric crude distillation column [23]. B. Genetic algorithm Genetic algorithm is a general purpose global random search algorithm. It is mostly used for the large variety of optimization problems. It can also be used for training of artificial neural network. Because it is not using gradient of error function to reach best solution, it is also not sensitive to local minima problem [15]. Design of the algorithm was inspired by observation of natural Darwinian evolution process and survival of the fittest principle. Algorithm is performing operations on the chromosomes, which could be defined as set of features. Population consists of many chromosomes. Establishing a proper measurement of fitness is also crucial in setting correct direction of optimization. Every genetic algorithm performs several operations including [15, 17]: 1. random initialization of the preliminary population, 2. in-loop evaluation of every chromosome by measuring its fitness, 3. comparison with the minimal desired fitness, 4. selection of the fittest subset of chromosomes, 5. perform crossing-over, which is exchange of features from the selected subset of chromosomes, 6. introduce mutations, which are random changes applied to randomly chosen features of the chromosomes, 7. return to the 2nd point. Genetic algorithm can be used in any optimization problem. It can be used in artificial neural network training or determining its best performing structure. During training, every chromosome for genetic algorithm comprises from all the connection weights from artificial neural network. When searching for best structure of artificial neurons in the network, chromosomes possesses information mostly about number of layers and neurons in each layer. C. Crude oil fractional distillation Crude oil is a complex mixture of hydrocarbons, that vary in their molecular weight and properties. Due to the above, they also have various boiling temperatures. The main objective of distillation is to separate crude oil into fractions, using those differences [23]. First step of this process is performed in the distillation columns, under atmospheric pressure, in every refinery. Raw crude oil, is pumped directly from the extraction site. Then, it is heated in furnace and enters the atmospheric distillation column. In every column there are a several dozen of trays, which improve the separation by temporarily keeping some amount of liquid. Every column of this type also possesses steam injection and several pumparounds, which are responsible for recovering excessive amount of heat and increasing evaporation rate of hydrocarbons, what further improves separation. Final products are recovered via side draws. The residue from the bottom is directed for vacuum distillation. Efficiency of the distillation depends on side products draw maximization and minimization of the leftover residue. Diagram of crude oil atmospheric distillation column is presented on the Fig. 3 [23]. Every refinery imposes its own quality standards, that distillation process operators have to keep. Quality of each fraction can be changed by manipulation of those key parameters: temperatures or flows of draws, pumparounds. Other important parameters are steam to column, amount of feed to the column and temperature after the furnace. Quality of each fraction is determined by daily laboratory analysis, according to ASTM D86 international standard [8]. It is done by measuring temperature, in which known volume of sample evaporates. Operators adjust the distillation process parameters depending on those analyses [8]. Every laboratory sample analysis is also afflicted with a measurement error, in this case it can be 3-4 degrees. Although it is possible to predict fraction quality from the temperature measurement based on the chosen column tray using statistical linear regression model, there are many other factors involved, that lowers the accuracy [8]. Distillation is a nonlinear process. Raw data from measurements often contain noise, false values or have a great variability. In order to improve prediction of the fraction quality, we can take into account more process variables. Establishing a clear relation between them is not often viable. Properties of artificial neural networks and genetic algorithm combined, makes them suitable for solving such a problem, avoiding overfitting or local minima problem during training [8, 24-26]. II. METHODS A. Software design In order to maintain both high performance of artificial neural network training procedure and speed of development, all of the calculation intense programs were written in pure C programming language. User interface, genetic algorithm structure optimization as well as data preparation scripts were written using PHP. Only feedforward multilayer perceptron neural networks were considered in this study. The task of training algorithm is to find the optimal weight value set, promoting variables of higher model importance. The goal of genetic algorithm structure optimization is to find the neural network configuration with the lowest training error. B. Data preparation Input variables for the artificial neural network model were chosen arbitrarily. Every model created was built using 13 main distillation parameters, which included: • flows of: product draws, pumparounds, total feed to the column, steam to column; • temperatures of: crude oil after passing furnace, pumparounds, draw tray, column top; • pressure in the column. Through the courtesy of PKN ORLEN S.A. refinery (Płock, Poland), 1 year data readings from mayor parameters of one of the crude oil atmospheric distillation column was extracted, with the sampling frequency of 1 minute. Corresponding laboratory analyses of the fractions quality were also collected. Data set was then divided equally into two subsets: training and validation data. The main purpose of validation data is to evaluate the ability of the trained artificial neural network to model values of laboratory analyses of fraction samples. It is a simple solution to detect problems with artificial neural network models like overfitting effect or premature ending of a training procedure. Ideal artificial neural network should generalize its knowledge, that means it can model with high accuracy not only training data, but also validation data. In order to fit the sigmoid activation function, all of the input data values were scaled into 0 and 1 range. Procedure of normalization was performed using equation (5). N (x)= x− min (x) max( x)−min (x ) (5) where N(x) is a result of x normalization. C. Structure optimization Genetic algorithm was applied in feedforward multilayer perceptron artificial neural network structure optimization application. Optimized parameters, that were included in chromosomes, consisted of not only number of artificial neurons, hidden layers but also parameters for training: population size, maximal learning step size, percentage of the fittest chromosomes for crossing-over, number of random mutations per chromosome and crossing-over intensity per chromosome. For every combination of the above parameters, adequate artificial neural network was built and trained. Population number of 10, yielded models with different training errors. Training of a single artificial neural network was limited to 10000 iterations (epochs). Only 5 of the fittest were chosen for creation of a next generation chromosomes, which underwent mutation and crossing-over operations. This process was repeated over 20 generations. The objective of structure optimization, was to determine such parameter combination, that resulted in artificial neural network with lowest training error. D. Training process Every artificial neural network training was performed using training application implementing genetic algorithm. Chromosome was built from all of the weights written in list. Learning parameters and neural network structure was received from the structure optimization application. Training ended when the artificial neural network error converged to the minimal value. Trained weights as well as learning parameters and structure information was written to single text file. Models created in this way, were then utilized to generate output values from the training and validation input data sets. III. RESULTS IV. DISCUSSION Quality of the mayor crude distillation products in kerosene, light and heavy diesel fraction, according to international ASTM D86 standard, were determined by artificial neural networks, trained and optimized by genetic algorithm. Temperatures, in which 5, 10, 50, 90, 95, 100 percentage of a sample volume evaporates, was calculated for each fraction product. The results shown similar performance in reproducing laboratory analyses on validation data, so only neural network model for 10% kerosene sample evaporation temperature was discussed as an example. Structure chosen by genetic algorithm of the neural network is a multilayer perceptron with one hidden layer, consisting of 5 neurons. Such configuration is simple in comparison with the number of input values and may hold a promise to avoid over-fitting, This kind of structure is mostly used because of its ability to model nonlinear data. Two other options, which are simple perceptron and two hidden layer perceptron may have not enough potential to either model training data or unnecessarily prolong the training process. In Table 1 we can see that learning parameters were set mostly between their limits. Among training parameters we can also observe a high percentage of killed chromosomes on epochs, high crossing-over rate and population number. This may suggest a great evolutionary pressure for neural network to develop minimal training error. Learning curve on Fig 4. is of typical shape of every training algorithm. It shows a rapid error function descent with every epoch in the first stage. Then, the curve of the error slows down, because finding better solutions is becoming much harder. After that learning curve reaches plateau, when the training algorithm can not find a better weight combination. Training was completed after 5000 iterations. A. Genetic algorithm structure optimization Results of the genetic algorithm structure as well as training parameters optimization are presented in the Table 1. Genetic algorithm, moving within available range set, created total of 200 different neural network models were tested with root mean square (3) training error ranging from 0,0032 to 0,053. Those optimized parameters yielded the fittest artificial neural network with training error of 0,0032. B. Learning curve Learning curve shape visualizes the progress of the training process. It can be helpful in determining the phase of learning and distance to the end. The learning curve of the best artificial neural network is presented on the Fig 4. C. Genetic algorithm training Fig 4. Learning curve of the neural network model for temperature of 10% kerosene sample evaporation. Fig. 5. presents the performance of generated artificial neural network to model the results of laboratory kerosene sample analyses. For this model only training data set was used. D. Model validation In order to identify the generalization ability of the created model, test data set was used,which was never used in training. Plot shown at Fig. 6. presents the performance of the artificial neural network to mimic the laboratory analyses. It can show how the model is behaving using data previously unseen. TABLE I. PARAMETERS FOR GENETIC ALGORITHM ARTIFICIAL NEURAL NETWORK STRUCTURE OPTIMIZATION FOR TEMPERATURE OF 10% VOLUME KEROSENE SAMPLE EVAPORATION. Available range Result Artificial neural network structural parameters Number of inputs - 13 Number of outputs - 1 Number of hidden layers 0-2 1 Number of neurons in 1st hidden layer 1-10 5 Number of neurons in 2nd hidden layer 1-10 - Genetic algorithm artificial neural network training parameters Population number 5-60 40 Learning step size 0,05-0,6 0,35 Number of mutations per single chromosome 10-70 33 Number of chromosome crossing-over operations 10-70 40 Maximal length of chromosome mutation 1-10 4 Percentage of killed chromosomes on epoch 0,2-0,8 0,6 Sigmoid function steepness parameter 0,3-0,5 0,4 Fig 5. Performance of the artificial neural network to model the temperature of 10% kerosene sample evaporation determined by laboratory analyses during training. Fig 5. is presenting ability of created artificial neural network to model the training data. We can observe correctly modeled three major changes in the distillation process with a slight deviations on 14.07.2014 and 1.09.2014 The most important chart is presented at Fig 6., when the artificial neural network was calculating quality output based only on the knowledge it retained. We can notice that two major kerosene fraction quality shifts were predicted correctly: 6.03.2014 and 7.05.2004. There were several minor quality changes 13.01.2014, 21.03.2014 and 4.04.2014, which were also foreseen by the artificial neural network model. There were also two cases where the difference between prediction and laboratory analysis is of 4-8 degrees: 10.02.2014 and 12.05.2014. In general model can accurately predict most of the variability of the kerosene fraction quality and can be used as a valuable simulation However, the results obtained from the artificial neural network model are well enough to quickly provide valuable process information, without the need to wait for the laboratory analysis results. It may be a on-line soft sensor for kerosene product quality. Artificial neural network model is often considered as a black box model, because it is not possible to recover a clear relationship from the weights between input and output [27]. However, there are ways to recover basic rules from trained neural network knowledge, explaining the output result [28]. One of the simple method of approximate knowledge extraction form trained artificial neural network, is casual index technique, suggested in [29], which is described by equation (6) [29]. Fig 6. Performance of the artificial neural network to model the temperature of 10% kerosene sample evaporation determined by laboratory analyses during testing. tool. The results could have been influenced by many factors. The biggest impact on the models have the data used for training and validation. The data sets used were obtained from a high throughput, industrial crude distillation process under normal operation, so it may contain natural errors like false or low accuracy measurements. Also the behaviour of the plant changes in time. For example, the performance of heat exchangers installed on the pumparounds is decreasing in time due to fouling and they need to be cleaned periodically. Flow measurements on valves also need to be properly calibrated. Another source of possible errors may represent the kerosene fraction sample collection of frequency 2-3 times a day, which might not be collected on the exact time labelled or properly handled. Additionally, the laboratory analysis is also naturally affected with error. h CI = ∑ ( w yj w yi ) (6) j=1 where: - h – total number of hidden neurons, - j – single hidden neuron, - y – output, - wyj – weights from output to hidden neurons, - wju – weights from hidden neurons to input. It measures the estimate impact magnitude of every input value on the single output. Casual index of a single input can be perceived as sum of multiplied weights that lay on paths from output to that input [29]. Inputs with a positive CI values are most significant, because they mostly influence output [30]. Calculated CI values for the artificial neural network in this work are presented in the Table II. TABLE II. CASUAL INDEX VALUES FOR THE ARTIFICIAL NEURAL NETWORK TRAINED FOR KEROSENE QUALITY. THE MOST SIGNIFICANT INPUTS IN BOLD. CI Input variable description 141 Kerosene draw 76 Kerosene pumparound 61 Steam to column 41 Steam to side stripper 37 Top column temperature 15 Total feed -8 Kerosene tray temperature -9 Furnace temperature -35 Column top pressure -43 Top reflux -56 Light diesel pumparound -56 Kerosene pumparound temperature -151 Light diesel draw learning parameters are set properly. Using only basic means of natural selection, it took 5000 genetic algorithm training iterations to set sum of 76 weights of the best performing artificial neural network (Table 1). That also involved assessing the performance of 40 chromosomes in population, 76 weights each. Addition of another hidden layer or increasing number of artificial neurons can double that number. Still, genetic algorithm can successfully train a valid neural network model, even working on such a long chromosome [22]. Future work involves using created artificial neural network and genetic algorithm modeling software for building simulator of the whole industrial process unit such as crude distillation units. This would enable to test the behaviour of the plant and identify its performance boundaries as well as serve for people training purposes. This research can be also continued by performing a comparison between the most popular neural networks training algorithm back-propagation and genetic algorithm in terms of speed and efficiency of training. V. CONCLUSIONS Artificial neural networks, which weights and structure has been optimized by genetic algorithm, proved that they can be successfully utilized for modeling complex relationships using raw process data. Genetic algorithm can operate even on a large parameter chromosomes, given the amount of crossing-over and mutation operations are set correspondingly. Presented techniques have a great potential not only in the crude oil refining industry, but also in general model prediction as well as global optimization problems. REFERENCES Casual index method presented that neural network correctly identified mayor quality parameter, which is kerosene draw. Another important parameters are feed and top temperatures [8]. Kerosene pumparound and steam amount are also important factors responsible for separation in the kerosene section of distillation column. Based on this we can can conclude that neural network model trained by genetic algorithm uses valid parameters. In order to ensure the correctness of the output values from the trained neural network, it is vital to use input values in the same range when training. Using input values, outside the range of training may lead to false results [31], One of the main advantage of artificial neural network model trained and optimized by genetic algorithm is simplicity of use. Model generation process, using written software, is fully automated and requires very little maintenance. Automatic model update can be used after certain period of time or on demand, in order to fit a new operation conditions of the modeled subject, like a distillation process in a refinery. It is also easy to notice that genetic algorithm can efficiently train even large neural networks, given its [1] Smith K. A., Gupta J. N. D., Neural networks in business: techniques and applications for the operations researcher, Computers & Operations Research 27, 2000, 1023-1044. [2] Wu R. C., Neural network models: Foundations and applications to an audit decision problem, Annals of Operations Research 75, 1997, 291-301. [3] Karul C., Soyupak S., Yurteri C., Neural network models as a management tool in lakes, Hydrobiology 408/409, 1999, 139-144. [4] Yin-ju B., Application of genetic BP network to discriminating earthquakes and explosions, Acta Seismologica Sinica, 2002, 540-549. [5] Krongrad A., Lai S., Artificial neural networks in urology: Con, Urology 54, 1999, 949-951. [6] Dokur Z., Segmentation of MR and CT Images Using a Hybrid Neural Network Trained by Genetic Algorithm, Neural Processing Letters 16, 2002, 211-225. [7] Henderson C. E., Potter W. D., Predicting Aflatoxin Contamination in Peanuts:A Genetic Algorithm/Neural Network Approach, Applied Intelligence 12, 2000, 183-192. [8] Brambilla A., Distillation control and optimization, McGraw-Hill Education, 2014, 309-319. [9] Kaes G. L., Some Practical Aspects Of Modeling Crude Oil Distillation, VMGSimUser'sManual, 2012, 1-18. [10] Rojas R., Neural Networks A Systematic Introduction, Springer-Verlag, Berlin, 1996, 1-28, 57-77, 429-449. [11] Kriesel D., A Brief introduction to Neural Networks, www.dkriesel.com, 2007, 15-37. [12] Stastny J., Skorpil V., Genetic Algorithm and Neural Network, Proceedings of the 7 th WSEAS International Conference on Applied Informatics and Communications, Athens, 2007, 345-349. [13] Periaux J., Winter G., Genetic Algorithms in Engineering and Computer Science, John Wiley& Sons, 1995, 1-15. [14] Fiszelew A., Britos P., Ochoa A., Merlino H., Fernández E., GarcíaMartínez R., Finding Optimal Neural Network Architecture Using Genetic Algorithm, Research in Computer Science 27, 2007, 15-24. [15] Jiang J., BP Neural Network Algorithm Optimized by Genetic Algorithm and Its Simulation, International Journal of Computer Science Issues 10, 2013, 516-519. [16] Joy C. U., Comparing the Performance of Backpropagation Algorithm and Genetic Algorithms in Pattern Recognition Problems, International Journal of Computer Information Systems 2, 2011, 7-12. [17] Montana D. J., Davis L., Training Feedforward Neural Networks Using Genetic Algorithms, Proceedings of the 11th international joint conference on Artificial Intelligence, 1989, 762-767. [18] Vishwakarma D. D., Genetic Algorithm based Weights Optimization of Artificial Neural Network, International Journal of Advanced Research in Electrical, Electronics and Instrumentation Engineering 1, 2012, 206211. [19] Montana D. J., Neural Network Weight Selection Using Genetic Algorithms, Intelligent Hybrid Systems, 1995, 85-104. [20] Sexton R. S., Dorsey R. E., Johnson J. D., Toward global optimization of neural networks: a comparison of the genetic algorithm and backpropagation, Decision Support Systems 22, 1998, 171-185. [21] Sexton R. S., Dorsey R. E., Reliable Classification Using Neural Networks: A Genetic Algorithm and Backpropagation Comparison, Decision Support Systems 30,2000, 11-22. [22] Korning P. G., Training of Neural Networks by means of Genetic Algorithms Working on very long Chromosomes, Journal of Neural Systems 6, 1995, 299-316. [23] Fahim M. A., Al.-Sahhaf T. A., Elkilani A. S., Fundamentals of Petroleum Refining, Elsevier B. V., 2010, 69-80. [24] Quin S. J., Neural Networks for Intelligent Sensors and Control Practical Issues and Some Solutions, 1996, 215-236. [25] Michalopoulos J., Papadokonstadakis S., Arampatzis G., Lygeros A., Moddeling of an Industrial Catalytic Cracking Unit Using Neural Networks, Trans IChemE 79, 2001, 137-142. [26] Bo C. M., Li J., Zhang S., Sun C. Y., Wang Y. R., The Application of Neural Network Soft Sensor Technology to an Advanced Control System of Distillation Operation, Proceedings of the International Joint Conference on Neural Networks, 2003, 1054-1058. [27] Smith K. A., Gupta J. N. D., Neural networks in business: techniques and applications for the operations researcher, Computers & Operations Research 27 2000, 1023-1044. [28] Feraud E., Clerot F., A methodology to explain neural network classification, Neural networks 15, 2002, 237-246. [29] Boger Z., Guterman H., Knowledge Extraction from Artificial Neural Networks Models, IEEE International Conference On Systems, Man, And Cybernetics 4, 1997, 3030-3035. [30] Pérez-Magariño S., Ortega-Heras M., González-San José M.L., Boger Z., Comparative study of artificial neural network and multivariate methods to classify Spanish DO rose wines, Talanta 62, 2004, 983– 990. [31] Kurd Z., Kelly T., Austin J., Developing artificial neural networks for safety critical systems, Neural Computing & Applications 16, 2007, 1119.
9cs.NE
On the Effectiveness of Simple Success-Based Parameter Selection Mechanisms for Two Classical Discrete Black-Box Optimization Benchmark Problems Carola Doerr1 and Markus Wagner2 1 arXiv:1803.01425v1 [cs.NE] 4 Mar 2018 Sorbonne Université, CNRS, Laboratoire d’Informatique de Paris 6, LIP6, 75005 Paris, France 2 Optimisation and Logistics, The University of Adelaide, Adelaide, SA 5005, Australia Abstract Despite significant empirical and theoretically supported evidence that non-static parameter choices can be strongly beneficial in evolutionary computation, the question how to best adjust parameter values plays only a marginal role in contemporary research on discrete black-box optimization. This has led to the unsatisfactory situation in which feedback-free parameter selection rules such as the cooling schedule of Simulated Annealing are predominant in state-of-the-art heuristics, while, at the same time, we understand very well that such time-dependent selection rules can only perform worse than adjustment rules that do take into account the evolution of the optimization process. A number of adaptive and self-adaptive parameter control strategies have been proposed in the literature, but did not (yet) make their way to a broader public. A key obstacle seems to lie in their rather complex update rules. The purpose of our work is to demonstrate that high-performing online parameter selection rules do not have to be very complicated. More precisely, we experiment with a multiplicative, comparison-based update rule to adjust the mutation probability of a (1+1) Evolutionary Algorithm. We show that this simple self-adjusting rule outperforms the best static unary unbiased black-box algorithm on LeadingOnes, achieving an almost optimal speedup of about 18%. 1 Introduction One of the best known randomized black-box optimization techniques is Simulated Annealing [KGV83]. Simulated Annealing builds on the Metropolis heuristic, a randomized search method that aims to overcome the risk of getting stuck in local optima by allowing the search to continue in points that are worse than the current best solution. The probability to “accept” such an inferior solution depends on the absolute difference in function values and upon a parameter T , which is often referred to as the temperature of the system. The improvement of Simulated Annealing over the Metropolis algorithm is a non-static choice of this temperature T . By decreasing T over time, the search algorithm converges from an exploratory behavior to a more and more greedy hill-climber, which exploits the good regions identified during the earlier phases. Numerous successful applications and more than 42,000 citations of [KGV83] witness that this idea to control the temperature during the optimization process can have an impressive impact on the performance of the Metropolis algorithm. It is today quite well understood that non-static parameter choices can be quite beneficial also for evolutionary computation (EC) methods, cf. [KHE15, DGWY17, Doe17]. The question 1 how to adjust the parameters, however, is largely open. Already the selection of suitable static parameter values is a very complex problem that has given rise to a number of sophisticated parameter tuning techniques; it is not for nothing that the parameter selection problem is coined the “Achilles’ heel of evolutionary computation” in [FCSS10]. Finding methods that automatically detect and track optimal parameter values over all stages of the optimization process are the long-term vision of research on parameter control techniques. Adaptive parameter choices are indispensable in continuous optimization, and therefore used in most state-of-the-art heuristics. In discrete domains, however, the situation is quite different. A number of different parameter control techniques have been experimented with in the literature, but so far none of them has been able to establish itself as a standard technique. Quite the contrary, the vast majority of research papers on discrete black-box optimization problems use static parameters values [KHE15]. In light of the success story of Simulated Annealing, this situation is quite unsatisfactory. A potential reason for the discrepancy between the commonly acknowledged benefits of nonstatic parameter selection schemes and its low degree of utilization may be the complexity of the parameter control techniques that predominate in the EC literature: these are often based on self-adaptation, hyper-heuristics, or principles from machine learning [DL16a,DDY16a,KHE15, LOW17]. Such (more or less) sophisticated techniques are in sharp contrast to the rather simple cooling schedule of Simulated Annealing, which updates the temperature based on the time elapsed so far. Of course, we easily convince ourselves that such a feedback-free update rule cannot be optimal, and that more efficient parameter control techniques take into account the behavior of the optimization process, such as, for example, the rate of success, the magnitude of improvement achieved within a given time-window, or the diversity of the population. 1.1 Our Results We analyze in this work one of the simplest ways to incorporate feedback from the optimization process into the selection of suitable parameter values: a success-based multiplicative update rule. To abstract away potential inter-dependencies between multiple parameters, we concentrate on the control of a single parameter, the mutation rate of a (1+1) Evolutionary Algorithm (EA) that does not evaluate offspring that are identical to their parents (cf. Section 2 for details and motivation). The update of the mutation rate depends only on whether or not the parent individual is replaced by the offspring. When no improvement is found, the mutation rate p is decreased to bp (with the idea to be more conservative), and it is increased to Ap otherwise (motivated by the desire to make even more progress by searching at a larger distance). A and b are hyper-parameters that satisfy A > 1 and 0 < b < 1. This multiplicative control technique is entirely comparison-based, a highly desirable property for online parameter selection mechanisms [FCSS10]. We investigate the performance of the adaptive (1 + 1) EA variant, the (1 + 1) EAα , on OneMax and on LeadingOnes. The experiments on OneMax confirm that, for a very broad range of update strengths, the (1 + 1) EAα is capable of identifying optimal parameter values “on-the-fly”. This leads to average optimization times that are very close to being optimal among all unary unbiased black-box algorithms.1 For OneMax in reasonable problem dimensions n ≤ 20, 000, the relative advantage of nonstatic parameter choices is only around 2%, and thus not very pronounced. The main task of the (1 + 1) EAα is therefore to identify good (i.e., in the context of OneMax, low) mutation 1 We recall that unary unbiased algorithms are those that sample all search points uniformly at random from the whole search space or from unbiased distributions that depend on exactly one previously evaluated search point. A distribution is unbiased if it does not discriminate between bit positions, not between bit values [LW12]. 2 rates, and to not get distracted by a potential desire to greedily increase the mutation rate during the optimization. To investigate the ability of the (1 + 1) EAα to not only identify but to also track optimal parameter values that change quite drastically during the optimization process, we also regard its performance on the classic LeadingOnes benchmark. For LeadingOnes, the optimal number of bits to flip depends on the fitness of the current-best individual. It is n for x with Lo(x) = 0, n/2 for search points of fitness 1, and decreases to 1 for search points of Lo-values ≥ n/2, cf. Lemma 1. Our empirical results confirm that, again for a broad range of hyperparameters, the (1 + 1) EAα is able to find and to track these optimal mutation rates. About 62% of all 450 tested configurations with 1 < A ≤ 2.5 and 0.4 < b < 1 and around 39% of all 2, 450 configurations with 1 < A ≤ 6 and 0 < b < 1 outperform Randomized Local Search, the best unary unbiased black-box algorithm with static mutation rates, by at least 10%. Some configurations achieve an almost optimal advantage of around 18%. Disclaimer. A common critique of fundamental research on OneMax and similar benchmark problems is that such “sterile” environments are not very representative for typical applications of EAs. Based on the results presented in this work, we, of course, do not know to what extend the advantages of the success-based multiplicative update rule applies to more complex optimization problems. It has been argued, however, that results for OneMax can serve, at the very least, to verify if some important properties of parameter control techniques are satisfied [Thi09,FCSS09]. In this sense, our results can be seen as a “proof of concept” for the largely unexplored potential of parameter control. We also wish to point out that multiplicative update rules have of course been studied much prior to this work, e.g., [LS11, DD15, DDK16, JDW05]. The appealing aspect of our study lies in the simplicity of the algorithm and problems, which help to nicely illustrate the working principles of this promising parameter update rule. We hope that the convincing and detailed empirical evaluation serves as a motivation to experiment with parameter control techniques. The case of Simulated Annealing has shown that paradigm changes are possible, and we feel that it is time for EC methods to overcome static and feedback-free parameter selection mechanisms. 2 Algorithms and Benchmarks Our study aims at quantifying the positive effects of online parameter selection. To remove any unwanted side effects, we therefore remove the population size and selective pressure as parameters, and concentrate on adapting the mutation rate in the two classical black-box optimization algorithms Randomized Local Search (RLS) and the (1+1) Evolutionary Algorithm (EA). We use this section to describe the algorithms and benchmark problems studied in our work. For the hasty reader, we wish to point out that we regard a variant of the (1 + 1) EA in which we ensure that an offspring does not equal its direct parent (i.e., we do not allow offspring to be copies of their parent’s genotype). Notation. The description of the algorithms assumes the maximization of a pseudo-Boolean function f : {0, 1}n → R as optimization task. By [n] we abbreviate the set {1, 2, . . . , n}, and we let [0..r] := {0} ∪ [r]. 2.1 RLS and the Resampling (1+1) EA RLS and the (1 + 1) EA are (1+1) schemes. That is, they always maintain one previously queried solution x, sample from it exactly one offspring y, and use elitist selection; that is, y replaces x if any only if f (y) ≥ f (x). The difference of RLS and the (1 + 1) EA lies in the generation of y. While RLS creates the offspring y by flipping exactly one bit in x that 3 is chosen uniformly at random, the (1 + 1) EA creates y by standard bit mutation. That is, y = (y1 , . . . , yn ) is selected by first copying x and then flipping each bit with some positive probability p, independently of all other bits. The parameter p is referred to as the mutation probability or mutation rate. A standard choice for p is 1/n, which results in an expected number of one bit flip. Put differently, an average iteration of the (1 + 1) EA with mutation probability 1/n behaves like an RLS iteration, with the difference that standard bit mutation is a global variation operator: in every iteration, every search point x ∈ {0, 1}n has a positive probability to be sampled. Our main interest is in studying adaptive choices of p, but before we discuss our adaptation rules, we recall one important observation about standard bit mutation. It is not very difficult to see that standard bit mutation can be identically defined by first choosing a step size (aka mutation strength) ` from the binomial distribution Bin(n, p) and then applying the mut` variation operator (Algorithm 1), which samples ` different indices uniformly at random and creates an offspring y from x by flipping the bits in these ` positions and copying the values from x elsewhere. Note that with this description, RLS is the algorithm that uses in each iteration the operator mut1 , i.e., it chooses ` = 1 deterministically. Algorithm 1: mut` chooses ` different positions and flips the entries in these positions. 1 2 3 4 Input: x ∈ {0, 1}n , ` ∈ N; Select ` different positions i1 , . . . , i` ∈ [n] u.a.r.; y ← x; for j = 1, ..., ` do yij ← 1 − xij ; It was noted in [JZ14, PD17, vHB02] that the literate implementation of standard bit mutation is inadequate for most practical purposes, since the probability that an offspring is identical to its direct parent equals Bin(n, p)(0) = (1 − p)n , which for p = 1/n converges very quickly to 1/e ≈ 36.8%. Unless we are dealing with very noisy function evaluations, which is not the situation regarded here, such offspring do not advance the optimization process, as they do not carry any new information about the problem instance. Any reasonable implementation of the (1 + 1) EA would therefore not evaluate such offspring. An efficient implementation of the (1 + 1) EA would therefore avoid to generate such offspring in the first place. This is easily possible, as all we need to do is to re-sample the step size ` from Bin(n, p) until we get a non-zero value. This is identical to sampling ` from the conditional distribution  Bin>0 (n, p), which assigns probability 0 to the step size 0 and probability Bin>0 (n, p)(k) = nk pp (1 − p)n−k /(1 − (1 − p)n ) to any positive step size k > 0. According to [PD17], this resampling strategy seems to be a very common implementation of standard bit mutation in plus strategies like the (1 + 1) EA. To distinguish this interpretation of the (1 + 1) EA from the one classically regarded in the theory of evolutionary computation literature, it is named (1 + 1) EA>0 in [PD17]. 2.2 Self-Adaptive Mutation Rates As mentioned in the introduction, our main interest is in the study of performance gains that can be achieved by a non-static choice of the mutation rate p. To this end, we investigate the following simple update rule. If an iteration was successful, i.e., if it produced an offspring y that replaces x, we increase the mutation probability p by a constant multiplicative factor A ≥ 1. That is, we replace p by Ap if f (y) ≥ f (x) holds. If, on the other hand, y is discarded (f (y) < f (x)), we decrease p to bp, where b ≤ 1 is again some fixed constant. We cap the value of p to ensure that it is always greater than 1/n2 and at most 1/2. The initial value of p is set to p0 , for some constant p0 > 0. This gives the (1 + 1) EAα (A, b, p0 ), which we summarize in Algorithm 2. Note that the (1 + 1) EAα (A = 1, b = 1, p0 ) is the (1 + 1) EA>0 with static 4 mutation rate p = p0 . Algorithm 2: The (1 + 1) EAα with update strengths A and b and initial mutation probability p0 ∈ [1/n2 , 1/2] for the maximization of a pseudo-Boolean function f : {0, 1}n → R 1 2 3 4 5 6 7 8 9 10 Initialization: Sample x ∈ {0, 1}n uniformly at random and compute f (x); Set p = p0 ; Optimization: for t = 1, 2, 3, . . . do Sample ` from Bin>0 (n, p); y ← mut` (x); evaluate f (y); if f (y) ≥ f (x) then x ← y and p ← min{A · p, 1/2} else p ← max{b · p, 1/n2 } In our experiments we will compare the performance of the (1 + 1) EAα with a variant of RLS that uses a non-static choice of the step size. This variant will be described in Section 3. 2.3 OneMax and LeadingOnes As benchmark problems, we select OneMax and LeadingOnes, since for these two problems we understand quite well how the optimal mutation strengths depend on the state of the optimization process, so that we have a solid baseline against to which we can compare the performance of the (1 + 1) EAα . OneMax and LeadingOnes are both problems with a unique global optimum z ∈ {0, 1}n . OneMax. For every target string z ∈ {0, 1}n , the OneMax function Omz assigns to each search point x ∈ {0, 1}n the number of positions in which x and z agree, i.e., Omz (x) := |{i ∈ [n] | xi = zi }|. Maximizing Omz corresponds to minimizing the Hamming distance between x and z. It is well known that every mutation-based algorithm (in the unary unbiased sense promoted in [LW12]) needs Ω(n log n) function evaluations, on average, to optimize OneMax. In this asymptotic sense, all RLS and all static (1 + 1) EA variants considered in this work are optimal, since they are all unary unbiased algorithms and they all achieve a Θ(n log n) expected optimization time. We will nevertheless see that the actual (i.e., non-asymptotic) running time can differ substantially for the different algorithms. We will discuss more precise running time statements in Section 3 below. LeadingOnes is the problem of optimizing an unknown function of the type Loz,σ : {0, 1}n → R, x 7→ max{i ∈ [0..n] | ∀j ∈ [i] : xσ(i) = zσ(i) }, where z is an unknown lengthn bit string and σ : [n] → [n] an unknown permutation (one-to-one map) of the positions. That is, Loz,σ (x) is the length of the longest common prefix between z and x in the order determined by σ. Every (1+1) elitist [DL16b] and every unary unbiased [LW12] black-box algorithm needs Ω(n2 ) function evaluations, on average, to optimize LeadingOnes. This bound is matched by RLS and the (1 + 1) EA, as we shall discuss in the next section. 5 3 Theoretical Performance Limits To establish bounds against which we can compare the (1 + 1) EAα , we now take a closer look at the best possible performance that any mutation-based algorithm can achieve on OneMax and LeadingOnes. In both cases, this performance is obtained by a variant of RLS that replaces the static choice ` = 1 classically used by RLS by a fitness-dependent step size `. More precisely, it is known that, for OneMax, such an RLS variant has a performance that can not be worse than an optimal unary unbiased black-box algorithm by more than an additive o(n) term [DDY16b]. For LeadingOnes a similar statement can be derived from the methods introduced in [BDN10, DDY16b], cf. Section 3.2. 3.1 OneMax As mentioned above and summarized in [DDY16b], we know quite well how RLS and the (1 + 1) EA perform on the OneMax problem. From the known bounds, we can compute theoretical performance limits of the (1 + 1) EAα . This is the focus of this section. For static parameter values, i.e., for arbitrary p0 ∈ [1/n2 , 1/2] and A = b = 1, the expected optimization time of the (1 + 1) EAα on OneMax cannot be better than that of RLS, which is equal to n ln(n) + (γ − ln(2)) + o(1) ≈ n ln n − 0.1159n [DD16] (γ = 0.5772 . . . denotes the Euler-Mascheroni constant). Likewise, for adaptive parameter values (i.e., for arbitrary values of A, b, and p0 ) the expected optimization time of the (1 + 1) EAα is bounded from below by the performance of a best unary unbiased black-box algorithm, which satisfies n ln(n) − αn ± o(n) for a constant α that is between 0.2539 and 0.2665 [DDY16b]. The above-mentioned values are asymptotically optimal running times. In order to obtain absolute performance limits for concrete problem dimensions, we regard the drift-maximizing RLS variant studied in [DDY16b]. Although it cannot be formally proven that this algorithm is indeed optimal, the result in [DDY16b] states that its performance cannot be much worse than that of the best possible unary unbiased (i.e., mutation-based) black-box algorithm. We even conjecture that the drift-maximizing RLS, which we call RLSopt,OM , is indeed optimal within this class. RLSopt,OM is the RLS variant that modifies the best-so-far solution x by applying to it the variation operator mut` for a value of ` that maximizes the expected progress that can be obtained in one iteration. This expected progress is often referred to ashdrift, hence the name “drift maximizer”. It is not difficult to see that the expected progress E max{Om(mut` (x)) − i Om(x), 0} of mut` applied to x equals ` X n−Om(x) i  i=d`/2e Om(x) (2i `−i  n ` − `) . (1) This expression depends only on the problem dimension n and the function value Om(x), but not on the structure of the search point x. For every n and every possible function value f ∈ [0..n], we can therefore abbreviate the progress-maximizing choice of ` by kopt,OM (n, f ). With this abbreviation, RLSopt,OM is Algorithm 3. As proven in [DDY16b], the value of kopt,OM (n, f ) equals 1 whenever f ≥ 2n/3. For general f , however, we do not have a simple to evaluate closed form expression to describe kopt,OM (n, f ). For this reason an approximation of kopt,OM (n, f ) is used in [DDY16b]. Since here in this work we are not interested in asymptotic bounds, but rather absolute values for concrete problem dimensions, we do not need to approximate kopt,OM (n, f ) but can work with the exact drift maximizing choice. Using these values, we can evaluate the expected performance of RLSopt,OM 6 empirically. This is our approach for the results presented in Sections 4 and 6. These empirical averages are quite close to the above-mentioned asymptotic lower bound presented in [DDY16b]. An alternative way would be to apply a variable drift theorem to the point-wise drift, i.e., expression (1) evaluated for ` = kopt,OM (n, Om(x)). Algorithm 3: The drift-maximizing algorithm RLSopt,OM 1 2 3 4 5 Sample x ∈ {0, 1}n uniformly at random and compute Om(x); for t = 1, 2, 3, . . . do ` ← kopt,OM (n, Om(x)); y ← mut` (x); if f (y) ≥ f (x) then x ← y; 3.2 LeadingOnes For LeadingOnes the known theoretical bounds are as follows. RLS needs 1 + n2 /2 function evaluations, on average, for its optimization. This bound is also a lower bound for the (1+1) EAα with static parameter choices; i.e., for arbitrary p0 ∈ [1/n2 , 1/2] and A = b = 1. For the classical (1 + 1) EA, which samples ` from the unconditional binomial distribution Bin(n, p) (and may therefore sample ` = 0), the best static choice is p ≈ 1.59n, which gives an expected optimization time of about 0.77n2 , while for the (1 + 1) EA>0 it holds that the smaller the mutation rate, the better performance we obtain [JZ11]. More precisely, it holds that the expected running time of the (1 + 1) EA>0 converges to 1 + n2 /2 when the mutation rate p converges to zero. In [BDN10], also optimal adaptive mutation rates have been computed for the classical (1 + 1) EA. It is shown there that the (1 + 1) EA using at each point x the mutation rate (n − Lo(x))/n has an expected running time on LeadingOnes of 0.68n2 ± O(n). This is optimal among all (1 + 1) EA variants that are charged for 0-bit flip iterations. The adaptive (1 + 1) EA variant from [BDN10] clearly looses performance for iterations in which the offspring equals its parent. It is therefore natural to ask for the best performance that a—possibly adaptive—unary unbiased black-box algorithm can achieve. As far as we know, such a best-possible mutation-based algorithm has not been explicitly reported in the literature. It turns out, however, that we can generalize mathematical statements proven in [BDN10] and [DDY16b] to design such an optimal unary unbiased black-box algorithm for LeadingOnes. Before describing this algorithm in detail, we note that already allowing 1- and 2-bitflips (i.e., mut` with ` = 1 and ` = 2) decreases the optimal 1 + n2 /2 expected optimization time of static unary unbiased algorithms to about 0.4233n2 [LOW17] (the fact that mut` is defined slightly different in [LOW17] has a negligible impact on this result). This running time can be further reduced by allowing larger step sizes. We investigate the limits of this approach in the remainder of this section. To compute the progress-maximizing variant of RLS, we could, similarly to the OneMax case, compute the expected progress of mut` when applied to a search point x. For LeadingOnes, however, it suffices to maximize the probability of making progress [BDN10], which is, in general, much easier than computing the expected progress. When applied to a search point x, the offspring y created from x by flipping ` bits satisfies Lo(y) > Lo(x) if and only if the (Lo(x) + 1)-st bit is flipped but none of the first Lo(x) bits. The probability of this event, for 7 uniformly chosen bit flips, equals     n − Lo(x) n ` / n − Lo(x) ` `     n − Lo(x) − 1 n = / . `−1 ` h i P Lo(mut` (x)) > Lo(x) = (2) In line with the notation used for the OneMax case, we abbreviate the value ` that maximizes expression (2) by kopt,LO (n, Lo(x)). The following lemma seems to be well known in the theory of evolutionary computation community, but, as far as we know, it has not been mentioned explicitly. Lemma 1 (kopt,LO (n, Lo(x))). For all n ∈ N and for all x ∈ {0, 1}n it holds that kopt,LO (n, Lo(x)) = bn/(Lo(x) + 1)c. With these values, we can study the expected running time of RLSopt,LO , which is Algorithm 3 with line 2 replaced by “` ← kopt,LO (n, Lo(x))”. Combining Lemma 1 with the characterization of unary unbiased mutation operators provided in [DDY16b, Lemma 1] and an extension of the results proven in [BDN10] to unary unbiased black-box algorithms, it is not difficult to show the following theorem, which, intuitively speaking, states that RLSopt,LO is optimal among all mutation-based black-box algorithms for LeadingOnes. Furthermore, this optimality does not only apply to the overall optimization time, but also to all intermediate target values. We thus obtain the following statement about the fixed-target performance of RLSopt,LO . Theorem 2. For LeadingOnes, the expected number of function evaluations needed by RLSopt,LO to obtain a search point of function value at least i equals    i−1  1X n n−j−1 T (RLSopt,LO , Lo, i) := 1 + / 2 kopt,LO (n, j) kopt,LO (n, j) − 1 j=0    i−1  n−j−1 1X n =1+ . / bn/(j + 1)c − 1 2 bn/(j + 1)c j=0 For all n and all i this performance is optimal among all unary unbiased black-box algorithms. That is, for any unary unbiased black-box algorithm A the expected time needed by A to reach a search point of LeadingOnes value ≥ i is at least as large as that of RLSopt,LO . We did not find an easy to evaluate closed form for T (RLSopt,LO , Lo, i). We can nevertheless evaluate this sum numerically, and obtain that for n → ∞ the expected optimization time of RLSopt,LO seems to converge to around 0.388...n2 , cf. Table 1. For n = 10, 000 the value is still around 0.3884n2 . 4 Grid search With the description of the algorithms and benchmark problems in place, we can now report our empirical results for the (1 + 1) EAα . In a first step, we are interested in the sensitivity of the (1 + 1) EAα with respect to the two update strengths A and b. To analyze the influence of these two hyper-parameters, we perform a grid search, in which we run the (1 + 1) EAα for various combinations of A and b. For these experiments, we always initialize the mutation rate 8 (a) OneMax with n = 500 (b) OneMax with n = 1500 (d) LeadingOnes with n = 100 (e) LeadingOnes with n = 250 (c) LeadingOnes with n = 500 (f) LeadingOnes with n = 500 Figure 1: Optimization times of the (1 + 1) EAα , averaged over 101 independent runs as p0 = 1/n. In Figures 1a to 1f we report for each configuration the average optimization times of 101 independent runs of these algorithms on OneMax (Figures 1a and 1b) and on LeadingOnes (Figures 1d, 1e, 1f). In these plots, the parameters are chosen as follows. For OneMax and for LeadingOnes with n ≤ 250, we vary A between 1.0 and 6.0, in multiples of 0.1, and we choose b between 0.00 and 1.00, in multiples of 0.02. For LeadingOnes with n = 500 we restrict the values to 1 ≤ A ≤ 3 and 0.4 ≤ b ≤ 1. That is, Figure 1f is a zoom into the upper left region of the full grid search. These graphics are to be read as follows. As so-called heat maps, we visualize in color the optimization times of the (1 + 1) EAα variants; that is, we plot the average number of fitness evaluations that these algorithms needed in order to locate the global optimum. We use a binning of colors to emphasize the visibility of regions and gradients. For example, the large green regions indicate the configurations for which the (1 + 1) EAα performs best. Also, the quick succession of colors in the top right corner shows that, beyond some threshold values for A and b, small changes in the configuration can cause large changes in the performance. For OneMax we first observe that the heat maps have a very similar structure across the different dimensions, cf. Figures 1a and 1b. In addition to the results shown in Figure 1 we also computed heat maps for OneMax with problem dimension n = 100, n = 500, and n = 1, 500 and for each of these heat maps the overall structure is very similar to those plotted in Figure 1. Also for LeadingOnes the figures are quite similar across the dimensions, cf. Figures 1d, 1e, and 1f (recall that Figure 1f is a zoom into upper left corner). We also observe that the performance landscapes for OneMax is quite flat; i.e., the bulk of the configurations achieves a very similar performance. For both problems, OneMax and LeadingOnes, we see that for large values of A and b the average optimization times become worse very quickly. In Figure 1c we therefore zoom into the most interesting region of high-performing configurations and display only results for con9 figurations that achieve an average optimization time that is at most 150, 000 (for comparison, the (1 + 1) EA>0 needs around 135, 700 iterations, on average, on this problem instance, and RLS 125, 000, cf. Table 1). This zoom increases the granularity of the color scheme, and allows to detect more structure within this region. As a next step, we compare the average running times with those of the (1 + 1) EA>0 and RLS. We observe that a significant number of configurations outperform the static (1+1) EA>0 . For LeadingOnes, the average optimization times of different algorithms can be found in Table 1 and for OneMax we note that the average optimization time of the (1 + 1) EA>0 is around 4, 750 for n = 500 and about 16, 630 for n = 1, 500. Several configurations also outperform RLS, but for OneMax the 101 runs do not suffice to make a statistically sound comparison, since the advantage of adaptive step sizes is bounded by around 2% for all tested dimensions. For LeadingOnes, however, the advantages over RLS are quite significant, as Figure 2 demonstrates. In this plot, the lowermost two lines illustrate the fraction of all 2,450 configurations with 1 < A ≤ 6 and 0 < b < 1 that yield a better average performance on LeadingOnes than RLS. In this figure, the x-axis indicates the percentage by which the algorithms are better than RLS, and on the y-axis we plot the fraction of the configurations that outperform RLS by at least this much. That is, we see that among all 2,450 configurations around 67% have an average optimization time below n2 /2. Between 37% (n = 100) and 41% (n=250) of all configurations are better than RLS by at least 10%. When we restrict the configurations to those 450 that satisfy 1 < A ≤ 2.5 and 0.4 ≤ b < 1 (three uppermost lines), around 78% of them are better than RLS, around 62% are better by at least 10%, around 30% excel over RLS by at least 15%, and almost 20% of the configurations are better than 16%. From an algorithm design point of view this is very good news: finding good hyper-parameters is not very difficult for this problem. We also see that the numbers are very similar across all three tested dimensions n = 100, 250, 500, suggesting that this surprisingly good performance might translate to larger dimensions. As we have proven in Section 3, the best possible running time on LeadingOnes (among all unary unbiased black-box algorithms, and hence in particular among all (1 + 1) EA and RLS variants) is achieved by RLSopt,LO . For the considered problem dimensions, RLSopt,LO is better, in expectation, than RLS by around 22.3%, cf. Table 1. This advantage over RLS is of course also the maximal improvement that any (1 + 1) EAα variant can achieve over RLS. For all dimensions, we observe that between 2 and 4% of the configurations are better than RLS by at least 18%. No configuration achieves a 20% improvement. Note here that this does not come as a surprise: even if the (1 + 1) EA chooses in each iteration the for this state optimal mutation rate, its performance still suffers from the random choice of the step sizes. This risk is eliminated in RLS and RLSopt by the deterministic choice of the mutation strength ` = 1 and ` = kopt,Lo (n, Lo(x)), respectively. We can therefore not expect any configuration, or, more generally, any evolutionary algorithm, to achieve the same performance as RLSopt,LO . In comparison to the (1 + 1) EA>0 , the comparison is even more impressive. About 73% of all 2, 450 and around 82% of the 450 restricted configurations with 1 < A ≤ 2.5 and 0.4 ≤ b < 1 have a better performance on LeadingOnes than the (1 + 1) EA>0 . About 64% (76% for the restricted hyper-parameters) are better by at least 10% and still around 14% (47%) are better, on average, by more than 20%. The best improvements over the (1 + 1) EA>0 are around 26%, but we should keep in mind here that the numbers are averages for 101 independent runs only. We will therefore do a more thorough investigation of selected configurations in the next subsection. Despite the variance of the algorithmic performance, however, we see a quite consistent behavior in Figure 2, raising our confidence that these results are not much skewed by the relatively low number of independent runs. For OneMax, around 90% of all configurations perform better than the (1 + 1) EA>0 , and 10 Figure 2: Fraction of all 2,450 (450) configurations with 1 < A ≤ 6 and 0 < b < 1 (1 < A ≤ 2.5 and 0.4 ≤ b < 1) that outperform RLS on LeadingOnes by at least x% between 64% (n = 100) and 83% (n = 2, 000) are better by at least 30%. The best configurations achieve an improvement of up to around 40%. 5 Detailed Results for LeadingOnes To substantiate the comparisons made in Section 4 and to investigate how the results translate to larger problem dimensions, we now take a closer look at some selected configurations. In this section we regard LeadingOnes. Detailed results for OneMax can be found in Section 6 below. For LeadingOnes, the results of this comparison are summarized in Table 1, where we report both the average optimization times T and the relative values T /n2 . For RLS and RLSopt,LO the numbers in Table 1 are computed from the exact running time statements (cf. Section 3), which are all indeed very close to the results that we obtain empirically. All other numbers in Table 1 are averages over 1, 001 and 101 independent runs, respectively. In addition to the (1 + 1) EA>0 , we list 4 different configurations. The (1 + 1) EAα with A = 1.3, b = 0.75 and with A = 1.2, b = 0.85 are examples for configurations that show a good (but not empirically best) performance in the grid search conducted in Section 4. We also add to the comparison the configuration A = 2, b = 0.5, a seemingly intuitive configuration used also in different context, e.g., in the adaptive choice of the population size in [LS11]. The configuration A = 1.11, b = 0.66 corresponds to the 1/5-th rule with update strength 1.5, a very common adaptation rule in continuous domain (cf. [DD15] for a discussion and references). We observe that the performances are quite stable over the tested dimensions. The two selected configurations A = 1.3, b = 0.75 and A = 1.2, b = 0.85 are better by around 18% than RLS, on all tested dimensions. The doubling/halving rule A = 2, b = 0.5 achieves a 15 − 17% performance gain over RLS, while the 1/5-th rule with A = 1.11, b = 0.66 achieves an improvement over RLS of about 7 − 10%. As an important consequence, the results of this section suggest that a tuning of the hyper11 Algorithm n = 100 T T /n2 T n = 250 T /n2 T n = 500 T /n2 T n = 1000 T /n2 T n = 1500 T /n2 RLSopt,LO RLS 3,883 38.83% 24,273 38.8368% 97,102 38.8408% 388,427 38.8427% 873,981 38.8436% 5,001 50.01% 31,251 50.0016% 125,001 50.0004% 500,001 50.0001% 1,125,001 50.0000% (1+1) EA>0 5,401 54.01% 33,817 54.1072% 135,782 54.3128% 544,288 54.4288% 1,216,448* 54.0644% (1+1) EAα (A=1.2, b=0.85) 4,063 40.63% 25,497 40.7952% 101,976 40.7904% 409,820* 40.9820% 921,900* 40.9733% (1+1) EAα (A=1.3, b=0.75) 4,185 41.85% 25,731 41.1696% 102,985 41.1940% 413,518* 41.3518% 931,313* 41.3917% (1+1) EAα (A=2.0, b=0.5) 4,195 41.95% 26,247 41.9952% 104,193* 41.6772% 416,362* 41.6362% 932,791* 41.4574% (1+1) EAα (A=1.11, b=0.66) 4,495 44.95% 28,277 45,2432% 114,814* 45.9256% 448,815* 44.8815% 1,016,830* 45.1924% Table 1: Average optimization times for LeadingOnes. Exact bounds for RLS and RLSopt,LO , empirical averages over 1,001 (*=101) independent runs otherwise. parameters A and b on smaller dimension is possible. In addition, the stability of the results indicates that similar results as those presented in Section 4 are likely to apply also to larger problem dimensions. 5.1 Zooming into Typical Runs We finally want to understand how well the selected mutation rates resemble the optimal ones. Our benchmark problem is the 500-dimensional LeadingOnes function. We store for 10 independent runs of the (1 + 1) EAα with A = 1.2 and b = 0.85 and for each iteration the Lo-value of a best-so-far solution along with the mutation strength ` that has been chosen in this iteration, i.e., the number of bits that have been flipped by the mut` operator to create the offspring of this iteration. We then average for each function value Lo(x) over the `-values that have been used in iterations that started with this fitness value. Figure 3 plots these averages for 3 ≤ Lo(x) < 100 (blue, ragged curve), along with the corresponding kopt,LO (n, Lo(x)) values (smooth red curve). The (1 + 1) EAα seems to sample indeed almost optimal mutation strengths. For Lo(x) ∈ {0, 1, 2} we note that the values are smaller than kopt,LO (n, Lo(x)), but this is explained by the initialization of the mutation rate with p0 = 1/n, which forces the algorithm to first increase this rate to a close-to-optimal value. This process decreases the average considerably. For values Lo(x) ≥ 100, the two curves are almost indistinguishable and have therefore been removed from the illustration. 6 Detailed Results for OneMax Similar to Figure 2 we display in Figure 4 the fraction of all 2,450 (600 for n = 2, 000) tested configurations with 1 < A ≤ 6 and 0 < b < 1 that are better than the (1 + 1) EA>0 . Note that, for OneMax, we cannot expect the configurations to outperform RLS, since the performance of RLS and RLSopt are very close: for the here-tested problem dimensions the difference between these two algorithms is only around 2%. In light of the high variance of the running times, statistically sound comparison would require a lot of independent repetitions. We have to leave this aspect for future work. We also note that our main objective with the OneMax benchmark is to understand if the (1 + 1) EAα is capable of identifying that the optimal mutation strength very quickly converges to 1 as the optimization proceeds. This aspect is considered in Figure 5, where we plot for the 2000-dimensional OneMax function and the configuration with A = 1.2 and b = 0.85 for 11 independent runs the average value of ` that has been chosen at a given function value. We zoom 12 Figure 3: Average and optimal mutation strengths for different Lo(x) values (n = 500, 10 independent runs of the (1 + 1) EAα with A = 1.2, b = 0.85, and p0 = 1/n) Figure 4: Fraction of all 2,450 (600 for n = 2, 000) configurations with 1 < A ≤ 6 and 0 < b < 1 (1 < A ≤ 3.0 and 0.4 ≤ b < 1) that outperform the (1 + 1) EA>0 on OneMax by at least x% in this picture into the most interesting region of Om-values between 1, 050 and 1, 360. Just as in Figure 3 we observe that the `-values first have to be increased, since p0 is initialized as 1/n, whereas the optimal mutation rate is around 1/2 for Om(x) = 1, 000 = n/2 (recall that the random initial solution has a function value of around 1, 000, so that we do not regard Om(x) values below this value). While the initial values are certainly smaller than kopt,OM (n, Om(x)) for Om(x) < 1, 230, we see that they are still much above the static choice ` = 1 used by RLS. For Om-values greater than 1, 332 the one-bit flips are optimal, i.e., kopt,OM (n, Om(x)) = 1 whenever Om(x) > 1, 332. All average `-values are very close to one in this regime. We also conducted experiments for the same configurations as in Table 1, for problem dimensions up to n = 3, 000. The results are similar to those for LeadingOnes in that also for OneMax the relative performance gains observed in small dimensions seem to transfer to larger ones. It is remarkable also that all the selected configurations, on average over 1, 001 independent runs, achieve a performance that is very close to that of RLS, and in some instances even outperform it. The following table summarizes selected results. For convenience, we also 13 Figure 5: Average and optimal mutation strengths for different Om(x) values (n = 2, 000, 11 independent runs of the (1 + 1) EAα with A = 1.2, b = 0.85, and p0 = 1/n) compute for each empirical average T the value c := T /(n ln n). Starred results are for 101 independent runs, all other results are averages over 1, 001 runs. Algorithm RLS RLSopt (1+1) EA>0 (1+1) EAα (A=1.2, b=0.85) (1+1) EAα (A=1.3, b=0.75) n = 100 T c n = 500 T c 445 0.9663 3,050 0.9816 436 0.9474 2,974 0.9572 n = 1000 T c 6,871 6,690 n = 2000 T c n = 3000 T c 0.9947 14,809 0.9742 23,814 0.9915 0.9685 14,722 0.9684 23,507 0.9787 679 1.4738 4,756 1.5306 10,574 1.5307 24,352 1.6019 37,256 1.5511 450 0.9776 3,059 0.9845 450 0.9767 3,033 0.9761 6,751 6,801 0.9773 14,801 0.9736 23,558 0.9808 0.9845 14,974 0.9850 23,715 0.9873 (1+1) EAα (A=2.0, b=0.5) 455 0.9872 3,013 0.9697 (1+1) EAα (A=1.11, b=0.66) 447 0.9704 3,039 0.9780 6,753 6,749 0.9776 14613 0.9613 23,027 0.9587 0.9770 15,134 0.9955 24,011 0.9997 Table 2: Average optimization times for OneMax for 1,001 (*=101) independent runs. c := 100T /(n ln n) 7 Conclusions We hope to contribute with our work to a more widespread experimentation and use of nonstatic parameter selection mechanisms in discrete optimization contexts. We are confident that significant performance gains are possible, for a broad number of applications. We have shown in this work that already quite simple parameter control mechanisms can give almost optimal performance. On LeadingOnes, significant performance gains over the best static parameter values were possible for a broad range of multiplicative update rules. Much more sophisticated parameter control techniques, including a number of portfoliobased methods inspired by the multi-armed bandit literature have been proposed and analyzed in the literature, by experimental [Thi05, FCSS08, FCSS09] and theoretical [DDY16a, LOW17] means. Developing a rigorous understanding of which update scheme to favor under which circumstances is the ultimate goal of our research. First comparisons with the above-mentioned techniques are quite favorable for the success-based multiplicative update rule; a rigorous comparison is left for future work. 14 As a more immediate research question, it would be desirable to understand how the performance of the (1+1) EAα scales with very large dimensions, by means of an empirical comparison and/or a mathematical running time analysis. Acknowledgments The authors would like to thank Eduardo Carvalho Pinto for providing his implementation of the (1 + 1) EAα and his contributions to a preliminary experimentation with the multiplicative parameter control mechanism. Our work was supported by a public grant as part of the Investissement d’avenir project, reference ANR-11-LABX-0056-LMH, LabEx LMH and by the Australian Research Council project DE160100850. References [BDN10] Süntje Böttcher, Benjamin Doerr, and Frank Neumann. Optimal fixed and adaptive mutation rates for the LeadingOnes problem. In Proc. of Parallel Problem Solving from Nature (PPSN’10), volume 6238 of Lecture Notes in Computer Science, pages 1–10. Springer, 2010. [DD15] Benjamin Doerr and Carola Doerr. Optimal parameter choices through selfadjustment: Applying the 1/5-th rule in discrete settings. In Proc. of Genetic and Evolutionary Computation Conference (GECCO’15), pages 1335–1342. ACM, 2015. [DD16] Benjamin Doerr and Carola Doerr. The impact of random initialization on the runtime of randomized search heuristics. Algorithmica, 75:529–553, 2016. [DDK16] Benjamin Doerr, Carola Doerr, and Timo Kötzing. Provably optimal self-adjusting step sizes for multi-valued decision variables. In Proc. of Parallel Problem Solving from Nature (PPSN’16), volume 9921 of LNCS, pages 782–791. Springer, 2016. [DDY16a] Benjamin Doerr, Carola Doerr, and Jing Yang. k-bit mutation with self-adjusting k outperforms standard bit mutation. In Proc. of Parallel Problem Solving from Nature (PPSN’16), volume 9921 of LNCS, pages 824–834. Springer, 2016. [DDY16b] Benjamin Doerr, Carola Doerr, and Jing Yang. Optimal parameter choices via precise black-box analysis. In Proc. of Genetic and Evolutionary Computation Conference (GECCO’16), pages 1123–1130. ACM, 2016. [DGWY17] Benjamin Doerr, Christian Gießen, Carsten Witt, and Jing Yang. The (1 + λ) evolutionary algorithm with self-adjusting mutation rate. In Proc. of Genetic and Evolutionary Computation Conference (GECCO’17), pages 1351–1358. ACM, 2017. [DL16a] Duc-Cuong Dang and Per Kristian Lehre. Self-adaptation of mutation rates in nonelitist populations. In Proc. of Parallel Problem Solving from Nature (PPSN’16), volume 9921 of LNCS, pages 803–813. Springer, 2016. [DL16b] Carola Doerr and Johannes Lengler. The (1+1) elitist black-box complexity of LeadingOnes. In Proc. of Genetic and Evolutionary Computation Conference (GECCO’16), pages 1131–1138. ACM, 2016. 15 [Doe17] Carola Doerr. Non-static parameter choices in evolutionary computation. In Companion Material for Proc. of Genetic and Evolutionary Computation Conference (GECCO’17), pages 736–761. ACM, 2017. [FCSS08] Álvaro Fialho, Luı́s Da Costa, Marc Schoenauer, and Michèle Sebag. Extreme value based adaptive operator selection. In Proc. of Parallel Problem Solving from Nature (PPSN’08), volume 5199 of LNCS, pages 175–184. Springer, 2008. [FCSS09] Álvaro Fialho, Luı́s Da Costa, Marc Schoenauer, and Michèle Sebag. Dynamic multi-armed bandits and extreme value-based rewards for adaptive operator selection in evolutionary algorithms. In Proc. of Learning and Intelligent Optimization (LION’09), volume 5851 of LNCS, pages 176–190. Springer, 2009. [FCSS10] Álvaro Fialho, Luı́s Da Costa, Marc Schoenauer, and Michèle Sebag. Analyzing bandit-based adaptive operator selection mechanisms. Annals of Mathematics and Artificial Intelligence, 60:25–64, 2010. [JDW05] Thomas Jansen, Kenneth A. De Jong, and Ingo Wegener. On the choice of the offspring population size in evolutionary algorithms. Evolutionary Computation, 13:413–440, 2005. [JZ11] Thomas Jansen and Christine Zarges. Analysis of evolutionary algorithms: from computational complexity analysis to algorithm engineering. In Proc. of Foundations of Genetic Algorithms (FOGA’11), pages 1–14. ACM, 2011. [JZ14] Thomas Jansen and Christine Zarges. Performance analysis of randomised search heuristics operating with a fixed budget. Theoretical Computer Science, 545:39–58, 2014. [KGV83] Scott Kirkpatrick, C. D. Gelatt, and Mario P. Vecchi. Optimization by simulated annealing. Science, 220(4598):671–680, 1983. [KHE15] G. Karafotias, M. Hoogendoorn, and A.E. Eiben. Parameter control in evolutionary algorithms: Trends and challenges. IEEE Transactions on Evolutionary Computation, 19:167–187, 2015. [LOW17] Andrei Lissovoi, Pietro Simone Oliveto, and John Alasdair Warwicker. On the runtime analysis of generalised selection hyper-heuristics for pseudo-boolean optimisation. In Proc. of Genetic and Evolutionary Computation Conference (GECCO’17), pages 849–856. ACM, 2017. [LS11] Jörg Lässig and Dirk Sudholt. Adaptive population models for offspring populations and parallel evolutionary algorithms. In Proc. of Foundations of Genetic Algorithms (FOGA’11), pages 181–192. ACM, 2011. [LW12] Per Kristian Lehre and Carsten Witt. Black-box search by unbiased variation. Algorithmica, 64:623–642, 2012. [PD17] Eduardo Carvalho Pinto and Carola Doerr. Discussion of a more practice-aware runtime analysis for evolutionary algorithms. In Proc. of Artificial Evolution (EA’17), pages 298–305, 2017. [Thi05] Dirk Thierens. An adaptive pursuit strategy for allocating operator probabilities. In Proc. of Genetic and Evolutionary Computation Conference (GECCO’05), pages 1539–1546. ACM, 2005. 16 [Thi09] Dirk Thierens. On benchmark properties for adaptive operator selection. In Proc. of Genetic and Evolutionary Computation Conference (GECCO’09), Companion Material, pages 2217–2218. ACM, 2009. [vHB02] Jano I. van Hemert and Thomas Bäck. Measuring the searched space to guide efficiency: The principle and evidence on constraint satisfaction. In Proc. of Parallel Problem Solving from Nature (PPSN’02), volume 2439 of LNCS, pages 23–32. Springer, 2002. 17
9cs.NE
Convergence and Correctness of Max-Product Belief Propagation for Linear Programming∗ Jinwoo Shin† Sejun Park arXiv:1412.4972v5 [cs.AI] 28 Jun 2017 Abstract The max-product belief propagation (BP) is a popular message-passing heuristic for approximating a maximum-a-posteriori (MAP) assignment in a joint distribution represented by a graphical model (GM). In the past years, it has been shown that BP can solve a few classes of linear programming (LP) formulations to combinatorial optimization problems including maximum weight matching, shortest path and network flow, i.e., BP can be used as a message-passing solver for certain combinatorial optimizations. However, those LPs and corresponding BP analysis are very sensitive to underlying problem setups, and it has been not clear what extent these results can be generalized to. In this paper, we obtain a generic criteria that BP converges to the optimal solution of given LP, and show that it is satisfied in LP formulations associated to many classical combinatorial optimization problems including maximum weight perfect matching, shortest path, traveling salesman, cycle packing, vertex/edge cover and network flow. 1 Introduction The max-product belief propagation (BP) is the most popular heuristic for approximating a maximum-a-posteriori (MAP) assignment1 of given graphical model (GM) [28, 18, 17, 25], where its performance has been not well understood in loopy GMs, i.e., GM with cycles. Nevertheless, BP often shows remarkable performances even on loopy GM. Distributed implementation, associated ease of programming and strong parallelization potential are the main reasons for the growing popularity of the BP algorithm. For example, several software architectures for implementing parallel BPs were recently proposed [15, 11, 16]. In the past years, there have been made extensive research efforts to understand BP performances on loopy GMs under connections to combinatorial optimization [3, 21, 12, 20, 2, 24, 19, 10, 6, 1, 22]. In particular, it has been studied about the BP convergence to the correct answer under a few classes of loopy GM formulations of combinatorial optimization problems: matching [3, 21, 12, 20], perfect matching [2], matching with odd cycles [24], shortest path [19] and network flow [10]. The important common feature of these instances is that BP converges to a correct MAP assignment if linear programming (LP) relaxation of the MAP inference problem is tight, i.e., it has no integrality gap. In other words, BP can be used as an efficient distributed solver for those LPs, and is presumably a better choice than classical centralized LP solvers such as simplex methods [8], interior point methods [9] and ellipsoid ∗ The preliminary conference version of this work was presented at Conference on Uncertainty in Artificial Intelligence (UAI), 2015 † S. Park and J. Shin are with School of Electrical Engineering, Korea Advanced Institute of Science & Technology, Republic of Korea. Emails: {sejun.park, jinwoos}@kaist.ac.kr 1 In general, MAP is NP-hard to compute exactly [7]. 1 methods [14] for large-scale inputs. However, these theoretical results on BP are very sensitive to underlying structural properties depending on specific problems and it is not clear what extent they can be generalized to, e.g., the BP analysis for matching problems [3, 21, 12, 20] does not extend to even for perfect matching ones [2]. In this paper, we overcome such technical difficulties for enhancing the power of BP as a LP solver. 1.1 Contribution We establish a generic criteria for GM formulations of given LP so that BP converges to the optimal LP solution given arbitrary initialization. Consequently, it also provides a sufficient condition for guaranteeing that a BP fixed point is unique. As one can naturally expect given prior results, one of our conditions requires the LP tightness. Our main contribution is finding other sufficient generic conditions so that BP converges to the correct MAP assignment of GM. First of all, our generic criteria can rediscover all prior BP results on this line, including matching [3, 21, 12], perfect matching [2], matching with odd cycles [24] and shortest path [19], i.e., we provide a unified framework on establishing the convergence and correctness of BPs in relation to associated LPs. Furthermore, we provide new instances under our framework: we show that BP can solve LP formulations associated to other popular combinatorial optimizations including perfect matching with odd cycles, traveling salesman, cycle packing, network flow and vertex/edge cover, which are not known in the literature. Here, we remark that the same network flow problem was already studied using BP by Gamarnik et al. [10]. However, our BP is different from theirs and much simpler to implement/analyze: the authors study BP on continuous GMs, and we do BP on discrete GMs. While most prior known BP results on this line focused on the case when the associated LP has an integral solution, the proposed criteria naturally guides the BP design to compute fractional LP solutions as well (see Section 4.2 and Section 4.4 for details). Our proof technique is built on that of [21] where the authors construct an alternating path in the computational tree induced by BP to analyze its performance for the maximum weight matching problem. Such a trick needs specialized case studies depending on the associated LP when the path reaches a leaf of the tree, and this is one of main reasons why it is not easy to generalize to other problems beyond matching. The main technical contribution of this paper is providing a way to avoid the issue in the BP analysis via carefully analyzing associated LP polytopes. The main appeals of our results are providing not only tools on BP analysis, but also guidelines on BP design for its high performance, i.e., one can carefully design a BP given LP so that it satisfies the proposed criteria. Our results provide not only new tools on BP analysis and design, but also new directions on efficient distributed (and parallel) solvers for large-scale LPs and combinatorial optimization problems. 1.2 Organization In Section 2, we introduce necessary backgrounds for the BP algorithm. We provide the main result of the paper in Section 3 and its several concrete applications to popular combinatorial optimizations are presented in Section 4. The proof of the main theorem is presented in Section 5. 2 2 Preliminaries 2.1 Graphical Model A joint distribution of n (binary) random variables Z = [Zi ] ∈ {0, 1}n is called a graphical model (GM) if it factorizes as follows: for z = [zi ] ∈ Ωn , Y Y ψi (zi ) ψα (zα ), Pr[Z = z] ∝ α∈F i∈{1,...,n} where {ψi , ψα } are (given) non-negative functions, the so-called factors; F is a collection of subsets F = {α1 , α2 , ..., αk } ⊂ 2{1,2,...,n} (each αj is a subset of {1, 2, . . . , n} with |αj | ≥ 2); zα is the projection of z onto dimensions included in α.2 In particular, ψi is called a variable factor. Figure 1 depicts the graphical relation between factors F and variables z. Figure 1: Factor graph for the graphical model with F = {α1 , α2 , α3 } and n = 4: Pr[z] ∝ ψα1 (z1 , z3 )ψα2 (z1 , z2 , z4 )ψα3 (z2 , z3 , z4 ). Each αj selects a subset of z, e.g., α1 selects {z1 , z3 }. Assignment z ∗ is called a maximum-a-posteriori (MAP) assignment if z ∗ satisfies z ∗ = arg maxz∈{0,1}n Pr[z]. This means that computing a MAP assignment requires comparing Pr[z] for all possible z, which is typically computationally intractable (i.e., NP-hard) unless the induced bipartite graph of factors F and variables z, so-called factor graph, has a bounded treewidth [7]. 2.2 Max-Product Belief Propagation The (max-product) belief propagation (BP) algorithms are popular heuristics for approximating the MAP assignment in a graphical model. BP is an iterative procedure; at each iteration t, there are four messages {mtα→i (c), mti→α (c) : c ∈ {0, 1}} between every variable zi and every associated α ∈ Fi , where Fi := {α ∈ F : i ∈ α}; that is, Fi is a subset of F such that all α in Fi include the ith position of z for any given z. Then, messages are updated as follows: Y mt+1 (c) = max ψ (z ) mtj→α (zj ) (1) α α α→i zα :zi =c mt+1 i→α (c) = ψi (c) j∈α\i Y mtα0 →i (c). α0 ∈Fi \α 2 For example, if z = [0, 1, 0] and α = {1, 3}, then zα = [0, 0]. 3 (2) First, we note that each zi only sends messages to Fi ; that is, zi sends messages to αj only if αj selects/includes i. The outer-term in the message computation (1) is maximized over all possible zα ∈ {0, 1}|α| with zi = c. The inner-term is a product that only depends on the variables zj (excluding zi ) that are connected to α. The message-update (2) from a variable zi to a factor ψα is a product which considers all messages received by ψα in the previous iteration, except for the message sent by zi itself. One can reduce the complexity of messages by combining (1) and (2) as: Y Y 0 (zα0 ) mtj→α0 (zj ), mt+1 max ψ (c) = ψ (c) i α i→α α0 ∈Fi \α zα0 :zi =c j∈α0 \i which we analyze in this paper. Finally, given a set of messages {mi→α (c), mα→i (c) : c ∈ {0, 1}}, the so-called BP marginal beliefs are computed as follows: Y bi [zi ] = mα→i (zi ). (3) α∈Fi Then, the BP algorithm outputs z BP = [ziBP ] as   1 if bi [1] > bi [0] BP zi = ? if bi [1] = bi [0] .   0 if bi [1] < bi [0] It is known that z BP converges to a MAP assignment if the factor graph is a tree and the MAP assignment is unique. However, if the graph has loops in it, the BP algorithm has no guarantee to find a MAP assignment in general. 3 3.1 Convergence and Correctness of Belief Propagation Convergence and Correctness Criteria of BP In this section, we provide the main result of this paper: a convergence and correctness criteria of BP. Consider the following GM: for x = [xi ] ∈ {0, 1}n and w = [wi ] ∈ Rn , Y Y Pr[X = x] ∝ e−wi xi ψα (xα ), (4) i α∈F where F is the set of non-variable factors and the factor function ψα for α ∈ F is defined as ( 1 if Aα xα ≥ bα ψα (xα ) = , 0 otherwise for some matrices Aα and vectors bα . Now we consider the linear programming (LP) corresponding the above GM: minimize w·x subject to Aα x ≥ bα for all α ∈ F (5) n x = [xi ] ∈ [0, 1] To simplify the notation, we often use Ax ≥ b with A ∈ Rm×n , b ∈ Rm which includes all inequalities Aα x ≥ bα and x ∈ [0, 1]n . Without loss of generality, we assume that kAi∗ k2 = 1 4 (a) x∗α (c) x0α (b) xα (d) x00α Figure 2: Illustration of Condition C3 ofP Theorem 1 under i = 1, γ = {2} and ψα (xα ) = 1 ∗ 0 00 (i.e., say ψα satisfies) if and only if i∈α xi = 1. All four variables xα , xα , xα , xα ∗ must satisfy ψα . For example, let xα = (1, 0, 0, 0) and xα = (0, 1, 0, 0). Then, both x0α = (x∗1 , x∗2 , x3 , x4 ) and x00α = (x1 , x2 , x∗3 , x∗4 ) satisfy ψα . for all i = 1, 2, . . . , m throughout this paper, where Ai∗ is the i-th row of A. Similarly, we denote A∗i as the i-th column of A. One can easily observe that the MAP assignments for GM (4) corresponds to the (optimal) solution of LP (5) if the LP has an integral solution x∗ ∈ {0, 1}n . Furthermore, if the solution of LP (5) is unique, the there exists a positive constant ρ satisfying the following identity: ρ := inf x∈P\x∗ w · x − w · x∗ > 0. kx − x∗ k1 Using the notation and observation, we establish the following sufficient conditions so that the max-product BP can indeed find the LP solution. Theorem 1 Suppose the following conditions hold: C1. LP (5) has a unique integral solution x∗ ∈ {0, 1}n , i.e., it is tight. C2. For every i ∈ {1, 2, . . . , n}, the number of factors associated with xi is at most two, i.e., |Fi | ≤ 2. C3. For every factor ψα , every xα ∈ {0, 1}|α| with ψα (xα ) = 1, and every i ∈ α with xi 6= x∗i , there exists γ ⊂ α such that |{j ∈ {i} ∪ γ : |Fj | = 2}| ≤ 2 ( xk if k ∈ / {i} ∪ γ 0 0 ψα (xα ) = 1, where xk = . ∗ xk otherwise ( xk if k ∈ {i} ∪ γ 00 ψα (xα ) = 1, where x00k = . x∗k otherwise Then the max-product BP   on GM (4) with arbitrary initial message converges to the solution wmax 3 of LP (5) in ρ + 1 K iterations, where K= max ξ⊂{1,...,m}:|ξ|=n,det(Aξ )6=0 k(Aξ )−1 1k1 and wmax = max |wj |. j Figure 2 illustrates Condition C3. Since Theorem 1 holds for arbitrary initial messages, it also provides the uniqueness of BP fixed points, as stated in what follows. Corollary 2 The max-product BP on GM (4) has a unique fixed point if Conditions C1-C3 hold. 3 Aξ is a square matrix consisting of rows of A corresponding to the row index set ξ, and 1 is the vector consisting of ones. 5 3.2 Remarks on Theorem 1 Conditions C2, C3 of Theorem 1 are typically easy to check given GM (4) and the uniqueness in C1 can be easily guaranteed via adding random noises. On the other hand, the integral property in C1 requires to analyze LP (5), where it has been extensively studied in the field of combinatorial optimization [23], e.g., Totally Unimodular (TUI). However, the conditions of Theorem 1 do not imply TUI, and vice versa. Since the TUI condition requires all vertices of the LP polytope of constraints are integral, Condition C1 is, at least, not stronger than it. On the other hand, even if the LP polytope is TUI, C3 might be not satisfied in general. For example, consider the following TUI constraint:     1 −1 1 0 −1 0 −1 1 −1 0  0 1  x ≥  . 1 0 0 1 0 α 1 −1 0 0 −1 0 −1 In Condition C3, suppose x∗α = (1, 1, 0, 0, 0) and xα = (0, 0, 1, 1, 1). Then, one can easily observe that ψα (x∗α ) = ψα (xα ) = 1. However, if we choose i = 1, then there does not exist γ satisfying Condition C3. We also remark that for some special cases of GM (4), e.g., entries of A consists of {0, ±1}, Condition C3 and the constant K can be removed and simplified, respectively, as stated in the following lemmas. Lemma 3 Given GM (4), if every factor function ψα (·) can be expressed as ( 1 if Lα ≤ aα · xα ≤ Uα ψα (xα ) = 0 otherwise for some aα ∈ {−1, 1}|α| and Lα , Uα ∈ R, then GM (4) satisfies Condition C3 of Theorem 1. Proof. As stated in Condition C3, suppose that there are two assignments x∗α 6= xα satisfying ψα (x∗α ) = ψα (xα ) = 1 and xi 6= x∗i for some i ∈ α. Since aα ∈ {−1, 1}|α| , we have aα · (x†α − xα ) ∈ {−1, 1} where x†α is defined as ( x†k = x∗k xk if k = i , otherwise for k ∈ α. There are two cases aα · (x∗α − xα ) < 0 and aα · (x∗α − xα ) ≥ 0. We assume the case aα · (x∗α − xα ) < 0 while the case aα · (x∗α − xα ) ≥ 0 can be argued in a similar manner. If aα · (x†α − xα ) = −1, then choosing γ = ∅ results in Lα ≤ aα · x0α = aα · xα − 1 ≤ Uα Lα ≤ aα · x00α = aα · x∗α + 1 ≤ Uα , i.e., ψ(x0α ) = ψ(x00α ) = 1, which satisfies Condition C3. Now, suppose that aα ·(x†α −xα ) = 1. Since we assumed aα ·(x∗α −xα ) < 0, there exists j ∈ α such that xj 6= x∗j and aα ·(x‡α −xα ) = −1 where x‡α is defined as ( x‡k = x∗k xk if k = j , otherwise 6 for k ∈ α. Then, choosing γ = {j} results in Lα ≤ aα · x0α = aα · xα ≤ Uα Lα ≤ aα · x00α = aα · x∗α ≤ Uα , i.e., ψ(x0α ) = ψ(x00α ) = 1, which satisfies Condition C3. This completes the proof of Lemma 3.  Lemma 4 If GM (4) satisfies Conditions C1-C3 and entries of A consists of {0, ±1}, then K ≤ n2.5 where K is defined in Theorem 1. Proof. For any n × n invertible submatrix Aξ of A, it is known [5] that every entry of (Aξ )−1 is in {0, ±1/2, ±1}. This observation directly leads to the following bound on K: K= max ξ⊂{1,...,m}:|ξ|=n,det(Aξ )6=0 ≤ √ n× eξ )−1 1k1 k(A max ξ⊂{1,...,m}:|ξ|=n,det(Aξ )6=0 k(Aξ )−1 1k1 ≤ n2.5 e is a row scaled matrix of A so that A ei∗ = ci Ai∗ and kA ei∗ k2 = 1 for some constant where A ci . This completes the proof of Lemma 4.  4 Applications of Theorem 1 In this section, we introduce concrete instances of LPs satisfying the conditions of Theorem 1 so that BP correctly converges to its optimal solution. Specifically, we consider LP formulations associated to several combinatorial optimization problems including shortest path, maximum weight perfect matching, traveling salesman, maximum weight disjoint vertex cycle packing, vertex/edge cover and network flow. We note that the shortest path result, i.e., Corollary 5, is known [19], where we rediscover it as a corollary of Theorem 1. Our other results, i.e., Corollaries 6-12, are new and what we first establish in this paper. 4.1 Example I: Shortest Path |E| Given a directed graph G = (V, E) and non-negative edge weights w = [we : e ∈ E] ∈ R+ , the shortest path problem is to find the shortest path from the source s to the destination t: it minimizes the sum of edge weights along the path. One can naturally design the following LP for this problem: minimize w·x subject to    1 if v = s X X xe − xe = −1 if v = t   e∈δ o (v) e∈δ i (v) 0 otherwise (6) x = [xe ] ∈ [0, 1]|E| . where δ i (v), δ o (v) are sets of incoming, outgoing edges of v. It is known that the above LP always has an integral solution, i.e., the shortest path from s to t. We consider the following GM for LP (6): Y Y Pr[X = x] ∝ e−we xe ψv (xδ(v) ), (7) e∈E v∈V 7 where δ(v) = δ i (v) ∪ δ o (v) and the factor function ψv is defined as  P P  1 if e∈δo (v) xe − e∈δi (v) xe          1 if v = s ψv (xδ(v) ) = . = −1 if v = t       0 otherwise    0 otherwise For the above GM (7), one can easily check that Condition C2 of Theorem 1 and the condition of Lemma 3 hold. This directly leads to the following corollary. Corollary 5 If the shortest path from s to t, i.e., the solution of the shortest path LP (6), is unique, then the max-product BP on GM (7) converges in O(wmax |E|2.5 /ρ) iterations. The uniqueness condition in the above corollary is easy to guarantee by adding small random noises to edge weights. 4.2 Example II: Maximum Weight Perfect Matching Given an undirected graph G = (V, E) and non-negative edge weights w = [we : e ∈ E] ∈ |E| R+ on edges, the maximum weight perfect matching problem is to find a set of edges such that each vertex is connected to exactly one edge in the set and the sum of edge weights in the set is maximized. One can naturally design the following LP for this problem: maximize subject to w·x X xe = 1 (8) e∈δ(v) x = [xe ] ∈ [0, 1]|E| . where δ(v) is the set of edges connected to a vertex v. If the above LP has an integral solution, it corresponds to the solution of the maximum weight perfect matching problem. It is known that the maximum weight matching LP (8) always has a half-integral solution x∗ ∈ {0, 21 , 1}|E| . We will design BP for obtaining the half-integral solution. To this end, duplicate each edge e to e1 , e2 and define a new graph G0 = (V, E 0 ) where E 0 = {e1 , e2 : e ∈ E}. Then, we suggest the following equivalent LP that always have an integral solution: maximize subject to w0 · x X xei = 2 (9) ei ∈δ(v) 0 x = [xei ] ∈ [0, 1]|E | . where we0 1 = we0 2 = we . One can easily observe that solving LP (9) is equivalent to solving LP (8) due to our construction of G0 and w0 . Now, construct the following GM for LP (9): Y w0 x Y Pr[X = x] ∝ e ei ei ψv (xδ(v) ), (10) ei ∈E 0 v∈V 8 where the factor function ψv is defined as ( 1 ψv (xδ(v) ) = 0 if P ei ∈δ(v) xei =2 otherwise . For the above GM (10), one can easily check that Condition C2 of Theorem 1 and the condition of Lemma 3 hold. This directly leads to the following corollary. Corollary 6 If the solution of the maximum weight perfect matching LP (9) is unique, then the max-product BP on GM (10) converges in O(wmax |E|2.5 /ρ) iterations. Again, the uniqueness condition in the above corollary is easy to guarantee by adding small random noises to edge weights [we0 i ]. We note that it is known [2] that BP converges to the unique and integral solution of LP (8), while Corollary 6 implies that BP can solve it without the integrality condition of LP (8) by solving GM (10). We note that one can easily obtain a similar result for the maximum weight (non-perfect) matching problem, where we omit the details in this paper. 4.3 Example III: Maximum Weight Perfect Matching with Odd Cycles In previous section we prove that BP converges to the optimal (possibly, fractional) solution of LP (9), equivalently LP (8). One can add odd cycle (also called Blossom) constraints and make those LPs tight i.e. solves the maximum weight perfect matching problem: maximize subject to w·x X xe = 1, ∀v ∈ V e∈δ(v) X xe ≤ e∈C |C| − 1 , 2 (11) ∀C ∈ C, x = [xe ] ∈ [0, 1]|E| . where C is a set of oddPcycles in G. The authors [24] study BP for solving LP (11) by replacing P e∈δ(v) xe = 1 by e∈δ(v) xe ≤ 1, i.e., for the maximum weight (non-perfect) matching problem. Using Theorem 1, one can extend the result to the maximum weight perfect matching problem, i.e., solving LP (11). To this end, we follow the approach [24] and construct the 0 following graph G0 = (V 0 , E 0 ) and weight w0 = [we0 : e ∈ E 0 ] ∈ R|E | given set C of disjoint odd cycles: V 0 = V ∪ {vC : C ∈ C} E 0 = {(u, vC ) : u ∈ C, C ∈ C} ∪ E \ {e ∈ C : C ∈ C} we0 = 1 P dC (u,e0 ) w 0  e  2 e0 ∈E(C) (−1)   we 9 if e = (u, vC ) for some C ∈ C , otherwise where dC (u, e0 ) is the graph distance between u, e0 in cycle C. Then, LP (11) is equivalent to the following LP: maximize subject to w0 · y X ye = 1, ∀v ∈ V e∈δ(v) X (−1)dC (u,e) y(vC ,u) ∈ [0, 2], ∀e ∈ E(C) u∈V (C) X ye ≤ |C| − 1, (12) ∀C ∈ C e∈δ(vC ) 0 y = [ye ] ∈ [0, 1]|E | . Now, we construct the following GM from the above LP: Y Y Y Pr[Y = y] ∝ ewe ye ψv (yδ(v) ) ψC (yδ(vC ) ), e∈E v∈V (13) C∈C where the factor function ψv , ψC is defined as ( P 1 if e∈δ(v) ye = 1 , ψv (yδ(v) ) = 0 otherwise  P dC (u,e) y  (vC ,u) ∈ {0, 2} 1 if Pu∈V (C) (−1) ψC (yδ(vC ) ) = . e∈δ(vC ) ye ≤ |C| − 1   0 otherwise For the above GM (13), we derive the following corollary of Theorem 1. Corollary 7 If the solution of the maximum weight perfect matching with odd cycles LP (12) is unique and integral, then the max-product BP on GM (13) converges in O(wmax |E|2.5 /ρ) iterations. Proof. The proof of Corollary 7 can be done by using Theorem 1. From GM (13), each variable is connected to two factors (C2 of Theorem 1). Now, lets check C3 of Theorem 1. For v ∈ V , we can apply same argument as the maximum weight matching case. Suppose there are vC and yδ(vC ) with ψC (yδ(vC ) ) = 1. Consider the case when there is (u1 , vC ) ∈ ∗ δ(vC ) with y(u1 ,vC ) = 1 6= y(u . As a feasible solution yδ(vC ) forms a disjoint even 1 ,vC ) paths [24], check edges along the path contains u1 . If there is u2 ∈ V (C) in the path with ∗ y(u2 ,vC ) = 1 6= y(u exists, choose such (u1 , vC ). If not, choose (u2 , vC ) ∈ V (C) with 2 ,vC ) ∗ y(u2 ,vC ) = 0 6= y(u2 ,vC ) at the end of the path. On the other hand, consider the case when ∗ there is (u1 , vC ) ∈ δ(vC ) with y(u1 ,vC ) = 0 6= y(u . As a feasible solution yδ(vC ) form a 1 ,vC ) disjoint even paths, check edges along the path contains u1 . If there is u2 ∈ V (C) in the path ∗ with y(u2 ,vC ) = 0 6= y(u exists, choose such (u1 , vC ). If not, choose (u2 , vC ) ∈ V (C) 2 ,vC ) ∗ with y(u2 ,vC ) = 1 6= y(u2 ,vC ) at the end of the path. Then, from disjoint even paths point of 10 view, we can check that 0 ) = 1, ψC (yδ(v C) where 0 y(u,v C) ( y(u,vC ) = ∗ y(u,v C) if u 6= u1 , u2 . otherwise ( y(u,vC ) = ∗ y(u,v C) if u = u1 , u2 . otherwise 00 ψC (yδ(v ) = 1, C) where 00 y(u,v C) From Theorem 1, we can conclude that if the solution of LP (12) is unique and integral, the max-product BP on GM (13) converges to the solution of LP (12) in O(wmax |E|2.5 /ρ) iterations. This completes the proof of Corollary 7.  We again emphasize that a similar result for the maximum weight (non-perfect) matching problem was established in [24]. However, the proof technique in the paper does not extend to the perfect matching problem. This is in essence because presumably the perfect matching problem is harder than the non-perfect matching one. Under the proposed generic criteria of Theorem 1, we overcome the technical difficulty. 4.4 Example IV: Vertex Cover Given an undirected graph G = (V, E) and non-negative integer vertex weights b = [bv : v ∈ |V | V ] ∈ Z+ , the vertex cover problem is to find a set of vertices minimizes the sum of vertex weights in the set such that each edge is connected to at least one vertex in it. This problem is one of Karp’s 21 NP-complete problems [13]. The associated LP formulation to the vertex cover problem is as follows: minimize b·y subject to yu + yv ≥ 1 (14) y = [yv ] ∈ [0, 1]|V | . However, if we design a GM from the above LP, it does not satisfy conditions in Theorem 1. Instead, we will show that BP can solve the following dual LP: X maximize xe e∈E X subject to xe ≤ bv (15) e∈δ(v) |E| x = [xe ] ∈ R+ . Note that the above LP always has a half-integral solution. As we did in Section 4.2, one can duplicate edges, i.e., E 0 = {e1 , . . . , e2bmax : e ∈ E} with bmax = maxv bv , and design the following equivalent LP having an integral solution: maximize subject to w0 · x X xei ≤ 2bv , ∀v ∈ V ei ∈δ(v) 0 x = [xei ] ∈ [0, 1]|E | 11 , (16) where we0 i = we for e ∈ E and its copy ei ∈ E 0 . From the above LP, we can construct the following GM: Y w0 x Y Pr[X = x] ∝ e ei ei ψv (xδ(v) ), (17) ei ∈E 0 where the factor function ψv is defined as ( 1 ψv (xδ(v) ) = 0 if v∈V P ei ∈δ(v) xei ≤ 2bv otherwise . For the above GM (17), one can easily check that Condition C2 of Theorem 1 and the condition of Lemma 3 hold. This directly leads to the following corollary. Corollary 8 If the solution of the vertex cover dual LP (16) is unique, then the max-product BP on GM (17) converges in O(wmax |E|2.5 /ρ) iterations. Again, the uniqueness condition in the above corollary is easy to guarantee by adding small random noises to edge weights [we0 i ]. We further remark that if the solution of the primal LP (14) is integral, then it can be easily found from the solution of the dual LP (16) using the strictly complementary slackness condition [4] . 4.5 Example V: Edge Cover Given an undirected graph G = (V, E) and non-negative edge weights w = [we : e ∈ E] ∈ |E| R+ on edges, the minimum weight edge cover problem is to find a set of edges such that each vertex is connected to at least one edge in the set and the sum of edge weights in the set is minimized. One can naturally design the following LP for this problem: minimize subject to w·x X xe ≥ 1 (18) e∈δ(v) x = [xe ] ∈ [0, 1]|E| . where δ(v) is the set of edges connected to a vertex v. If the above LP has an integral solution, it corresponds to the solution of the minimum weight edge cover problem. Similarly as the case of matching, it is known that the minimum weight edge cover LP (18) always has a half-integral solution x∗ ∈ {0, 21 , 1}|E| . We will design BP for obtaining the half-integral solution. To this end, duplicate each edge e to e1 , e2 and define a new graph G0 = (V, E 0 ) where E 0 = {e1 , e2 : e ∈ E}. Then, we suggest the following equivalent LP that always have an integral solution: minimize subject to w0 · x X xei ≥ 2 (19) ei ∈δ(v) 0 x = [xei ] ∈ [0, 1]|E | . where we0 1 = we0 2 = we . One can easily observe that solving LP (19) is equivalent to solving LP (18) due to our construction of G0 and w0 . Now, construct the following GM for LP (19): Y −w0 x Y Pr[X = x] ∝ e ei ei ψv (xδ(v) ), (20) ei ∈E 0 v∈V 12 where the factor function ψv is defined as ( 1 ψv (xδ(v) ) = 0 if P ei ∈δ(v) xei ≥2 otherwise . For the above GM (20), one can easily check that Condition C2 of Theorem 1 and the condition of Lemma 3 hold. This directly leads to the following corollary. Corollary 9 If the solution of the minimum weight edge cover LP (9) is unique, then the maxproduct BP on GM (20) converges in O(wmax |E|2.5 /ρ) iterations. Again, the uniqueness condition in the above corollary is easy to guarantee by adding small random noises to edge weights [we0 i ]. 4.6 Example VI: Traveling Salesman |E| Given a directed graph G = (V, E) and non-negative edge weights w = [we : e ∈ E] ∈ R+ , the traveling salesman problem (TSP) is to find the minimum weight Hamiltonian cycle in G. The natural LP formulation to TSP is the following: minimize subject to w·x X xe = 2 e∈δ(v) (21) x = [xe ] ∈ [0, 1]|E| . From the above LP, one can construct the following GM: Y Y Pr[X = x] ∝ e−we xe ψv (xδ(v) ), e∈E (22) v∈V where the factor function ψv is defined as ( P 1 if e∈δ(v) xe = 2 ψv (xδ(v) ) = . 0 otherwise It is known that LP (21) always has an integral solution [5]. For the above GM (22), one can easily check that Condition C2 of Theorem 1 and the condition of Lemma 3 hold. This directly leads to the following corollary. Corollary 10 If the solution of the traveling salesman LP (21) is unique, then the max-product BP on GM (22) converges in O(wmax |E|2.5 /ρ) iterations. Again, the uniqueness condition in the above corollary is easy to guarantee by adding small random noises to edge weights. 4.7 Example VII: Maximum Weight Cycle Packing Given an undirected graph G = (V, E) and non-negative edge weights w = [we : e ∈ E] ∈ |E| R+ , the maximum weight vertex disjoint cycle packing problem is to find the maximum weight set of cycles with no common vertex. It is easy to observe that it is equivalent to find a 13 subgraph maximizing the sum of edge weights on it such that each vertex of the subgraph has degree 2 or 0. The natural LP formulation to this problem is following: w·x X maximize subject to xe = 2yv (23) e∈δ(v) x = [xe ] ∈ [0, 1]|E| , y = [yv ] ∈ [0, 1]|V | . From the above LP, one can construct the following GM: Y Y Pr[X = x, Y = y] ∝ ewe xe ψv (xδ(v) , yv ), e∈E where the factor function ψv is defined as ( 1 ψv (xδ(v) , yv ) = 0 if (24) v∈V P e∈δ(v) xe = 2yv otherwise . For the above GM (24), one can easily check that Condition C2 of Theorem 1 and the condition of Lemma 3 hold. This directly leads to the following corollary. Corollary 11 If the solution of maximum weight vertex disjoint cycle packing LP (23) is unique and integral, then the max-product BP on GM (24) converges in O(wmax |E|2.5 /ρ) iterations. Again, the uniqueness condition in the above corollary is easy to guarantee by adding small random noises to edge weights. 4.8 Example VIII: Minimum Cost Network Flow Given a directed graph G = (V, E), supply/demand d = [dv ] ∈ Z|E| and capacity c = [ce : |E| e ∈ E] ∈ Z+ , the minimum cost network flow problem can be forumlated by the following LP. minimize subject to w·x X xe − e∈δ o (v) X xe = dv e∈δ i (v) (25) xe ≤ ce |E| x = [xe ] ∈ R+ , where δ i (v), δ o (v) are the set of incoming, outgoing edges of v. It is known that the above LP always has an integral solution. We will design BP for obtaining the solution of LP (25). To this end, duplicate each edge e to e1 , . . . , ece and define a new graph G0 = (V, E 0 ) where E 0 = {e1 , . . . , ece : e ∈ E}. Then, we suggest the following equivalent LP that always have an integral solution: minimize subject to w0 · x X xei − ei ∈δ o (v) X xei = dv ei ∈δ i (v) 0 x = [xei ] ∈ [0, 1]|E | . 14 (26) where we0 1 = · · · = we0 ce = we . One can easily observe that solvin LP (25) is equivalent to solving LP (26) due to our construction of G0 and w0 . Now, construct the following GM for LP (26): Y −w0 x Y Pr[X = x] ∝ e ei ei ψv (xδ(v) ), (27) ei ∈E 0 v∈V where the factor function ψv is defined as ( P P 1 if ei ∈δo (v) xei − ei ∈δi (v) xei = dv ψv (xδ(v) ) = . 0 otherwise For the above GM (27), one can easily check that Condition C2 of Theorem 1 and the condition of Lemma 3 hold. This directly leads to the following corollary. Corollary 12 If the solution of the network flow LP (25) is unique, then the max-product BP on GM (27) converges in O(wmax |E 0 |2.5 /ρ) iterations. Gamarnik et al. [10] also studied the convergence and correct of BP on the minimum cost network flow problem. However, they studied BP on GM of continuous variables while our analysis is for BP on GM of binary variables. For practical purposes, the latter is easier to run than the former. 5 Proof of Theorem 1 To begin with, we define some necessary notation. We let P denote the polytope of feasible solutions of LP (5): P := {x ∈ [0, 1]n : ψα (xα ) = 1, ∀ α ∈ F } . Similarly, Pα is defined as n o Pα := x ∈ [0, 1]|α| : ψα (xα ) = 1 . Now, we state the following key technical lemma. Lemma 13 There exist universal constants η > 0 for LP (5) such that if z ∈ [0, 1]n and 0 < ε < η satisfy the followings: P1. There exist at most two violated factors for z, i.e., |{α ∈ F : zα ∈ / Pα }| ≤ 2. P2. For each violated factor α, there exists i ∈ α such that zα† ∈ Pα , where z † = z + εei or z † = z − εei where ei ∈ {0, 1}n is the unit vector whose i-th coordinate is 1, then there exists z ‡ ∈ P such that kz − z ‡ k1 ≤ εK.4 The proof of Lemma 13 is presented in Section 5.1. Now, from Condition C1, it follows that there exists ρ > 0 such that ρ := 4 inf x∈P\x∗ w · x − w · x∗ > 0. kx − x∗ k1 K is defined in Theorem 1. 15 We let x bt ∈ {0, 1, ?}n denote the BP estimate at the t-th iteration for the MAP computation. We will show that under Conditions C1-C3,   wmax t ∗ x b =x , for t > + 1 K. ρ Suppose bti 6= x∗i  statement is false, i.e., there exists i ∈ {1, 2, . . . , n} such that x  the above for t > wmax ρ + 1 K. Under the assumption, we will reach a contradiction. To this end, we construct a tree-structured GM Ti (t), popularly known as the computational tree [27], as follows: 1. Add yi ∈ {0, 1} as the root variable with variable factor function e−wi yi . 2. For each leaf variable yj , for each α ∈ Fj and ψα which is not associated with yj in the current tree-structured GM, add a factor function ψα as a child of yj . 3. For each leaf factor ψα , for each variable yk such that k ∈ α and yk is not associated with ψα in the current tree-structured GM, add a variable yk as a child of ψα with variable factor function e−wk yk . 4. Repeat Step 2, 3 t times. Suppose the initial messages of BP are set by 1, i.e., mj→α (·)0 = 1. Then, if x bti ∈ {0, ?}, it is known [26] that there exists a MAP configuration y MAP on Ti (t) with yiMAP = 0 at the root variable. A similar conclusion also holds for the case x bti ∈ {1, ?}. For other initial messages, one can guarantee the same property under changing weights of leaf variables of the treestructured GM. Specifically, for a leaf variable k with |Fk = {α1 , α2 }| = 2 and α1 being its 0 parent factor in Ti (t), one can reset its variable factor by e−wk yk , where wk0 = wk − log maxzα2 :zk =1 ψα2 (zα2 )Πj∈α2 \k m0j→α2 (zj ) maxzα2 :zk =0 ψα2 (zα2 )Πj∈α2 \k m0j→α2 (zj ) . (28) This is the reason why our proof of Theorem 1 goes through for arbitrary initial messages. For notational convenience, we present the proof for the standard initial message of m0j→α (·) = 1, where it can be naturally generalized to other initial messages using (28). Now we construct a new valid assignment y NEW on the computational tree Ti (t) as follows: 1. Initially, set y NEW ← y MAP . 2. Update the value of the root variable of Ti (t) by yiNEW ← x∗i . 3. For each child factor ψα of root i ∈ α, choose γ ⊂ α according to Condition C3 and update the associated variable by yjNEW ← x∗j ∀j ∈ γ. 4. Repeat Step 2,3 recursively by substituting Ti (t) by the subtree of Ti (t) of root j ∈ γ until the process stops (i.e., γ = {i}) or the leaf of Ti (t) is reached (i.e., i does not have a child). One can notice that the set of revised variables in Step 2 of the above procedure forms a path structure Q in the tree-structured GM. Define ζj and κj be the number of copies of xj in path Q with x∗j = 1 and x∗j = 0, respectively, where ζ = [ζj ], κ = [κj ] ∈ Zn+ . Then, from our construction of y NEW , one can observe that w · y MAP − w · y NEW = w · (κ − ζ). 16 We consider three cases: (a) no end of the path Q touches a leaf of Ti (t), (b) only one end of the path Q touches a leaf of Ti (t), and (c) both ends of the path Q touch leaves of Ti (t). 1 First, consider the case (a). If we set z = x∗ + ε(κ − ζ) where 0 < ε < 2t , then due to our NEW construction of y utilizing Condition C3, one can observe z ∈ P. However, since x∗ is the unique optimum of LP (5), we have 1 w · y MAP − w · y NEW = (w · z − w · x∗ ) > 0, ε which contradicts to the fact that y MAP is a MAP configuration. Next, consider the case (c), where the case (b) can be argued in a similar manner. In this case, we use Lemma 13 by 1 , η and one can check that z satisfies setting z = x∗ + ε(κ − ζ) where 0 < ε < min 2t Conditions P1, P2 of Lemma 13 due to Conditions C2, C3. Hence, from Lemma 13, there exists z ‡ ∈ P such that kz ‡ − zk1 ≤ εK and kz ‡ − x∗ k1 ≥ ε(kζk1 + kκk1 − K) ≥ ε(t − K). Hence, it follows that w · z ‡ − w · x∗ kz ‡ − x∗ k1 w · z + εwmax K − w · x∗ ≤ ε(t − K) εw · (κ − ζ) + εwmax K = ε(t − K) w · (κ − ζ) + wmax K = . t−K 0<ρ≤ Furthermore, if t >  wmax ρ  + 1 K, the above inequality implies that w · y MAP − w · y NEW = w · (κ − ζ) ≥ ρt − (wmax + ρ)K > 0. This is the contradiction to the fact that y MAP is a MAP configuration. This completes the proof of Theorem 1. 5.1 Proof of Lemma 13 We first define Pε = {x : Ax ≥ b − ε1}, where 1 is the vector of ones. Then, one can check that z ∈ Pε for z, ε satisfying conditions of Lemma 13. Now we aim to achieve the following inequality dist(P, Pε ) := max min kx − yk1 ≤ εK, x∈Pε y∈P which leads to the conclusion of Lemma 13. To this end, for ξ ⊂ [1, 2, . . . , m] with |ξ| = n, we again let Aξ be the square sub-matrix of A by choosing ξ-th rows of A and bξ is the ndimensional subvector of b corresponding ξ. Using this notation, we first prove the following claim. Claim 14 If Aξ is invertible and vξ := (Aξ )−1 bξ ∈ P, then vξ is a vertex of polytope P. 17 Proof. Suppose vξ is not a vertex of P, i.e. there exist x, y ∈ P such that x 6= y and vξ = λx+(1−λ)y for some λ ∈ (0, 1/2]. Under the assumption, we will reach a contradiction. Since P is a convex set,   3λ 3λ y ∈ P. (29) x+ 1− 2 2 However, as Aξ is invertible,     3λ 3λ y 6= bξ . (30) Aξ x+ 1− 2 2 From (29) and (30), there exists a row vector Ai∗ of Aξ and the corresponding entry bi of bξ such that     3λ 3λ Ai∗ · y > bi . x+ 1− 2 2 Using the above inequality and Ai∗ · (λx + (1 − λ)y) = bi , one can conclude that     λ λ Ai∗ · y < bi , x+ 1− 2 2  which contradict to λ2 x + 1 − λ2 y ∈ P. This completes the proof of Claim 14.  We also note that if v is a vertex of polytope P, there exists ξ such that Aξ is invertible and v = (Aξ )−1 bξ . We define the following notation: I = {ξ : (Aξ )−1 bξ ∈ P} and Iε = {ξ : (Aξ )−1 (bξ − ε1) ∈ Pε }, where Claim 14 implies that {vξ := (Aξ )−1 bξ : ξ ∈ I} and {uξ,ε := (Aξ )−1 (bξ − ε1) : ξ ∈ Iε } are sets of vertices of P and Pε , respectively. Using the notation, we show the following claim. Claim 15 There exists η > 0 such that Iε ⊂ I for all ε ∈ (0, η). Proof. Suppose η > 0 satisfying the conclusion of Claim 15 does not exist. Then, there exists a strictly decreasing sequence {εk > 0 : k = 1, 2, . . . } converges to 0 such that Iεk ∩ {ξ : ξ∈ / I} 6= ∅. Since |{ξ : ξ ⊂ [1, 2, . . . , m]}| < ∞, there exists ξ 0 such that |K := {k : ξ 0 ∈ Iεk ∩ {ξ : ξ ∈ / I}}| = ∞. (31) For any k ∈ K, observe that the sequence {uξ0 ,ε` : ` ≥ k, ` ∈ K} converges to vξ0 . Furthermore, all points in the sequence are in Pεk since Pε` ⊂ Pεk for any ` ≥ k. Therefore, one can conclude that vξ0 ∈ T Pεk for all k ∈ K, where we additionally use the fact that Pεk is a closed set. Because P = k∈K Pεk , it must be that vξ0 ∈ P, i.e., vξ0 must be a vertex of P from Claim 14. This contradicts to the fact ξ 0 ∈ {ξ : ξ ∈ / I}. This completes the proof of Claim 15.  From the above claim, we observe P that any x ∈ P Pε can be expressed as a convex combination of {uξ,ε : ξ ∈ I}, i.e., x = ξ∈I λξ uξ,ε with ξ∈I λξ = 1 and λξ ≥ 0. For all ε ∈ (0, η) for η > 0 in Claim 15, one can conclude that X X dist(P, Pε ) ≤ max k λξ uξ,ε − λξ vξ k1 x∈Pε ξ∈I = max εk x∈Pε X ξ∈I λξ (Aξ ) ξ∈I ≤ ε max k(Aξ )−1 1k1 ξ∈I ≤ εK. 18 −1 1k1 This completes the proof of Lemma 13. 6 Conclusion The BP algorithm has been the most popular algorithm for solving inference problems arising graphical models, where its distributed implementation, associated ease of programming and strong parallelization potential are the main reasons for its growing popularity. In this paper, we aim for designing BP algorithms solving LPs, and provide sufficient conditions for its correctness and convergence. We believe that our results provide new interesting directions on designing efficient distributed (and parallel) solvers for large-scale LPs. References [1] Antar Bandyopadhyay and David Gamarnik. Counting without sampling: new algorithms for enumeration problems using statistical physics. In Proceedings of the seventeenth annual ACM-SIAM symposium on Discrete algorithm, pages 890–899. Society for Industrial and Applied Mathematics, 2006. [2] Mohsen Bayati, Christian Borgs, Jennifer Chayes, and Riccardo Zecchina. Belief propagation for weighted b-matchings on arbitrary graphs and its relation to linear programs with integer solutions. SIAM Journal on Discrete Mathematics, 25(2):989–1011, 2011. [3] Mohsen Bayati, Devavrat Shah, and Mayank Sharma. Maximum weight matching via max-product belief propagation. In Information Theory, 2005. ISIT 2005. Proceedings. International Symposium on, pages 1763–1767. IEEE, 2005. [4] Dimitris Bertsimas and John N Tsitsiklis. Introduction to linear optimization, volume 6. Athena Scientific Belmont, MA, 1997. [5] Ethan D Bolker and Thomas Zaslavsky. A simple algorithm that proves half-integrality of bidirected network programming. Networks, 48(1):36–38, 2006. [6] Venkat Chandrasekaran, Misha Chertkov, David Gamarnik, Devavrat Shah, and Jinwoo Shin. Counting independent sets using the bethe approximation. SIAM Journal on Discrete Mathematics, 25(2):1012–1034, 2011. [7] Venkat Chandrasekaran, Nathan Srebro, and Prahladh Harsha. Complexity of inference in graphical models. In UAI 2008, Proceedings of the 24th Conference in Uncertainty in Artificial Intelligence, pages 70–78. AUAI Press, 2008. [8] George B Dantzig. Linear programming and extensions. Princeton university press, 1998. [9] George B Dantzig and Mukund N Thapa. Linear programming 2: theory and extensions. Springer Science & Business Media, 2006. [10] David Gamarnik, Devavrat Shah, and Yehua Wei. Belief propagation for min-cost network flow: Convergence and correctness. Operations Research, 60(2):410–428, 2012. [11] Joseph Gonzalez, Yucheng Low, and Carlos Guestrin. Parallel splash belief propagation. Technical report, DTIC Document, 2010. 19 [12] Bert C Huang and Tony Jebara. Loopy belief propagation for bipartite maximum weight b-matching. In International Conference on Artificial Intelligence and Statistics, pages 195–202, 2007. [13] Richard M Karp. Reducibility among combinatorial problems. Springer, 1972. [14] Leonid G Khachiyan. Polynomial algorithms in linear programming. USSR Computational Mathematics and Mathematical Physics, 20(1):53–72, 1980. [15] Yucheng Low, Joseph Gonzalez, Aapo Kyrola, Danny Bickson, Carlos Guestrin, and Joseph M. Hellerstein. Graphlab: A new framework for parallel machine learning. In UAI 2010, Proceedings of the Twenty-Sixth Conference on Uncertainty in Artificial Intelligence, pages 340–349. AUAI Press, 2010. [16] Nam Ma, Yinglong Xia, and Viktor K Prasanna. Task parallel implementation of belief propagation in factor graphs. In Parallel and Distributed Processing Symposium Workshops & PhD Forum (IPDPSW), 2012 IEEE 26th International, pages 1944–1953. IEEE, 2012. [17] Marc Mezard and Andrea Montanari. Information, physics, and computation. Oxford University Press, 2009. [18] Tom Richardson and Ruediger Urbanke. Modern coding theory. Cambridge University Press, 2008. [19] Nicholas Ruozzi and Sekhar Tatikonda. st paths using the min-sum algorithm. In Communication, Control, and Computing, 2008 46th Annual Allerton Conference on, pages 918–921. IEEE, 2008. [20] Justin Salez and Devavrat Shah. Belief propagation: an asymptotically optimal algorithm for the random assignment problem. Mathematics of Operations Research, 34(2):468– 480, 2009. [21] Sujay Sanghavi, Dmitry Malioutov, and Alan Willsky. Belief propagation and lp relaxation for weighted matching in general graphs. Information Theory, IEEE Transactions on, 57(4):2203–2212, 2011. [22] Sujay Sanghavi, Devavrat Shah, and Alan S Willsky. Message passing for maximum weight independent set. Information Theory, IEEE Transactions on, 55(11):4822–4834, 2009. [23] Alexander Schrijver. Combinatorial optimization: polyhedra and efficiency, volume 24. Springer, 2003. [24] Jinwoo Shin, Andrew E Gelfand, and Misha Chertkov. A graphical transformation for belief propagation: Maximum weight matchings and odd-sized cycles. In Advances in Neural Information Processing Systems, pages 2022–2030, 2013. [25] Martin J Wainwright and Michael I Jordan. Graphical models, exponential families, and variational inference. Foundations and Trends R in Machine Learning, 1(1-2):1–305, 2008. [26] Yair Weiss. Belief propagation and revision in networks with loops. Technical report, MIT AI Laboratory, 1997. 20 [27] Yair Weiss and William T Freeman. On the optimality of solutions of the max-product belief-propagation algorithm in arbitrary graphs. Information Theory, IEEE Transactions on, 47(2):736–744, 2001. [28] Jonathan S Yedidia, William T Freeman, and Yair Weiss. Constructing free-energy approximations and generalized belief propagation algorithms. Information Theory, IEEE Transactions on, 51(7):2282–2312, 2005. 21
2cs.AI
Paper accepted to IEEE GLOBECOM 2017. Energy-aware Mode Selection for Throughput Maximization in RF-Powered D2D Communications Deepak Mishra1 , Swades De1 , George C. Alexandropoulos2, and Dilip Krishnaswamy3 1 arXiv:1709.01755v2 [cs.IT] 7 Sep 2017 2 Department of Electrical Engineering, Indian Institute of Technology Delhi, New Delhi 110016, India Mathematical and Algorithmic Sciences Lab, Paris Research Center, Huawei Technologies France SASU 3 IBM Research Labs, Bangalore, Karnataka 560045, India Abstract—Doubly-near-far problem in RF-powered networks can be mitigated by choosing appropriate device-to-device (D2D) communication mode and implementing energy-efficient information transfer (IT). In this work, we present a novel RF energy harvesting architecture where each transmitting-receiving user pair is allocated a disjoint channel for its communication which is fully powered by downlink energy transfer (ET) from hybrid access point (HAP). Considering that each user pair can select either D2D or cellular mode of communication, we propose an optimized transmission protocol controlled by the HAP that involves harvested energy-aware jointly optimal mode selection (MS) and time allocation (TA) for ET and IT to maximize the sum-throughput. Jointly global optimal solutions are derived by efficiently resolving the combinatorial issue with the help of optimal MS strategy for a given TA for ET. Closed-form expressions for the optimal TA in D2D and cellular modes are also derived to gain further analytical insights. Numerical results show that the joint optimal MS and TA, which significantly outperforms the benchmark schemes in terms of achievable RFpowered sum-throughput, is closely followed by the optimal TA scheme for D2D users. In fact, about 2/3 fraction of the total user pairs prefer to follow the D2D mode for efficient RF-powered IT. I. I NTRODUCTION With the advent of 5G radio access technologies [1], the ubiquitous deployment of low power wireless devices has led to the emergence of device-to-device (D2D) communications as a promising technology for performance enhancement by exploiting the proximity gains. Despite these merits, the underlying challenge is to provide sustainable network operation by overcoming the finite battery life bottleneck of these devices. Recently, the efficacy of energy harvesting (EH) from dedicated radio frequency (RF) energy transfer (ET) has been investigated to enable controlled energy replenishment of battery-constrained wireless devices [2]. However, due to fundamental bottlenecks [2], such as low energy reception sensitivity and poor end-to-end ET efficiency, there is a need for novel RF-EH based D2D communication protocols. In the pioneering work on wireless powered communication network (WPCN) [3], the optimal time allocation (TA) for downlink ET and uplink information transfer (IT) from multiple EH users was investigated to maximize the system throughput. It was shown that WPCN suffers from the doublynear-far-problem which limits its practical deployment. Although optimal cooperative resource allocation strategies [2], [4] have been proposed, in this work we focus on the efficacy of D2D communications in resolving this issue by exploiting Cellular mode Ui Uj HAP Ui, Uj : Cell users Uk , Ul : D2D users RF-ET IT Uk D2D mode Ul Fig. 1: Modes of operation in RF-powered D2D communications. proximity. Despite the pioneering research on WPCN [3]–[5], the investigation on EH-assisted D2D communications, where both the information source and the destination are energy constrained, is still in its infancy [6]–[9]. In [6], performance of the D2D transmission powered solely by ambient interference in cellular networks was investigated using stochastic geometry. The joint resource block and power allocation for maximizing the sum-rate of D2D links in EH-assisted D2D communication underlying downlink cellular networks was studied in [7]. Recently, D2D communication powered by ambient interference in cellular networks for relaying machinetype communication traffic was investigated in [8]. An integrated information relaying and energy supply assisted RFEH communication model was presented in [9] to maximize the RF-powered throughput between two energy constrained devices. However none of the above mentioned works [6]– [9] investigated the fundamental problem of mode selection (MS) and resource sharing between cellular and D2D users, as done in conventional D2D communications [10]. In the recent work [11], without considering EH, joint optimization of MS, uplink/downlink TA, and power allocation was performed to minimize the energy consumption in meeting the traffic demands of a D2D communication network. To the best of our knowledge, the harvested energy-aware joint MS and TA has not been investigated for RF-powered D2D communications. Here, different from conventional D2D systems [10], [11], the optimal decision-making is strongly influenced by the TA for EH during downlink ET from the hybrid access point (HAP). In comparison to RF-powered cellular networks, RF-EH assisted D2D communication also provides pairing gain, where, as shown in Fig. 1, each user pair can select either D2D or cellular mode of communication based on the harvested energy and radio propagation environment. D2D mode enables shortrange and low-power links saving the power consumption at the transmitter, and thus assisting in overcoming the doublynear-far problem [3]. On the other hand, communicating via an energy-rich HAP in cellular mode can help in increasing the end-to-end IT range. Apart from MS, the total transmission time needs to be allocated optimally for IT and ET in D2D and cellular modes to maximize RF-powered throughput. So, we need to tackle two trade-offs: (i) choosing between D2D and cellular mode; and (ii) time sharing between ET and IT. The key contributions of this work are four fold. (1) Novel RF-EH communication model and transmission protocol are presented to enable efficient sustainable D2D communications. (2) A joint optimization framework is proposed to maximize sum-throughput of the system by optimally selecting the transmission mode (D2D or cellular) along with TA for ET and IT. Although this is a combinatorial problem which is NPhard in general [11], we demonstrate that it can be effectively decoupled into equivalent convex problems to obtain both individual and joint global optimal MS and TA solutions. (3) Closed-form expressions are derived for: (i) optimal TA for D2D and cellular modes of communication between a single EH pair; and (ii) tight approximation for optimal TA with fixed D2D mode for all nodes. We also provide analytical insights on the harvested energy-aware optimal MS strategy for a given TA for ET. (4) Throughput gains achieved with help of proposed optimization framework over the benchmark schemes involving fixed TA and MS are quantified by numerical simulations. These results incorporating the impact of practical RF-EH system constraints also validate the accuracy of the analysis and provide useful insights on the jointly optimal solutions. II. S YSTEM M ODEL We consider a heterogeneous small cell orthogonal frequency division multiple access (OFDMA) network with a single HAP and multiple RF-EH users that are fully-powered by dedicated RF energy broadcast from the HAP. Without loss of generality, we focus on the RF-powered IT among N RFEH users, denoted by {U1 , U2 , . . . , UN }, that are interested in communicating within this small cell. We assume that N2 non-overlapping frequency channels are available to enable simultaneous communication between these possible N2 user pairs. The transmitter and receiver in each user pair are predecided and allocated a disjoint frequency channel [10], [11]. Each RF-EH user is composed of a single omnidirectional antenna. To enable simultaneous reception and transmission of information at different frequencies in the uplink and downlink, the HAP is equipped with two omnidirectional antennas, one being dedicated for information reception and the other antenna is dedicated for energy or information transmission. Each N2 user pair chooses either (i) D2D mode where nodes directly communicate with each other, or (ii) cellular mode where they communicate via HAP in a two-hop decodeand-forward (DF) fashion. Both D2D and cellular modes of communication are solely powered by RF-ET from the HAP. As the cell size is very small due to low RF-ET range of the HAP [2], we have not considered the reuse mode [10] to avoid strong co-channel interference. All the links are Phase 2a of duration 1 − te − td,Ti Phase 2b of duration td,Ti Phase 1 of duration te RF energy broadcast from HAP to all EH users Uplink IT from cell user transmitter Ti to HAP Downlink IT from HAP to cell user receiver Ri Ri (a) Transmission protocol for i th cell user pair Ti –R Phase 1 of duration te Phase 2 of duration 1 − te RF energy broadcast IT from D2D transmitters from HAP to all EH users to D2D receivers (b) Transmission protocol for D2D users Fig. 2: Proposed transmission protocols for cellular and D2D modes. assumed to follow independent quasi-static block fading; for simplicity, we consider this block duration as T = 1 sec. The instantaneous channel gains between the HAP and user Ui for downlink ET and uplink IT are denoted by HUi and ρUi HUi , respectively, where ρUi is a positive scalar with ρUi = 1 representing the channel reciprocity case. Similarly, the channel gain between Uj and Uk is denoted by GUj ,Uk . These channel gains {HUi , GUj ,Uk } can be defined as HU i = p h0,U dn 0,Ui i , GUj ,Uk = p gU j ,Uk dn , ∀i, j, k ≤ N, j 6= k, (1) Uj ,Uk where p is path-loss coefficient; h0,Ui and gUj ,Uk respectively denote the channel fading components for HAP-to-Ui and Uj to-Uk links; n is path-loss exponent; d0,Ui and dUj ,Uk respectively denote HAP-to-Ui and Uj -to-Uk euclidean distances. We assume that the HAP has the full acquisition of instantaneous channel state information (CSI) of links to all users, including the CSI between all possible N (N2−1) user pairs. This CSI is estimated by the respective receivers and then fed back to the HAP via the control channel [10], [11]. Although the proposed HAP-controlled optimization algorithm is based on instantaneous CSI which incurs a lot of signalling overhead, it can serve as a benchmark for distributed algorithms [11]. As the desired frequency characteristics for efficient ET and IT are different [2] and the maximum end-to-end ET efficiency is achieved over narrow-band transmission [5], we consider a pessimistic scenario by ignoring EH during downlink IT from the HAP. Also, since the received uplink signal strength from energy constrained users is relatively very weak in comparison to the transmit signal strength in the downlink IT from the energy-rich HAP, we do not consider full-duplex operation at the HAP. Instead, we propose an enhanced half-duplex information relaying where orthogonal frequencies can be received and transmitted simultaneously using two antennas. III. P ROPOSED T RANSMISSION P ROTOCOL As shown in Fig. 2, the proposed transmission protocols for both cellular and D2D modes of communication are divided into RF-ET of duration te sec and IT phase of duration 1 − te sec. This downlink RF-ET based IT forms a WPCN [3]. Next, we discuss the sub-operations in these two phases in detail. Phase 1): RF-ET from the HAP to all the EH users: During RF-ET phase, HAP broadcasts a single-tone RF energy signal xe [5], having zero mean and variance P0 , to all EH users. The energy signal ye,Ui thus received at user Ui is given by p (2) ye,Ui = HUi xe + zUi , ∀i ∈ {1, 2, . . . , N } , where zUi is the received Additive White Gaussian Noise (AWGN) at Ui . Ignoring EH from noise signal zUi due to very low energy reception sensitivity [2], the energy EH,Ui harvested at Ui over the RF-ET duration of te sec is given by (3) EH,Ui = ηUi P0 HUi te , ∀i ∈ {1, 2, . . . , N } , where ηUi is RF-to-DC rectification efficiency of RF-EH unit at Ui which is in general a nonlinear function of the received RF power [12]. If Ui is a receiver, then harvested energy EH,Ui is stored for carrying out internal node operations. Otherwise, EH,Ui is solely used for carrying out IT from Ui to HAP, if it follows cellular mode, or to its receiving partner in D2D mode. Phase (2): RF-Powered IT: The operations in this phase depend on the transmission mode, i.e., cellular or D2D. a) Cellular Mode: The IT phase is divided into uplink and downlink subphases. By exploiting the availability of disjoint channels and two antennas at the HAP, we consider different uplink and downlink IT times, as denoted by 1 − te − td,Ti and td,Ti , for efficient cellular mode communication between transmitter Ti and receiver Ri of ith user pair with Ti , Ri ∈ {U1 , . . . , UN } and 1 ≤ i ≤ N/2. The transmit power PTCi of Ti for IT to HAP using its harvested energy EH,Ti is PTCi = θEH,T i 1−te −td,Ti = θηT P0 HTi te i 1−te −td,Ti , (4) where θ is the fraction of EH,Ti available for IT after excluding the internal energy losses. Although we only consider the energy harvested during the current block for carrying out IT, the proposed optimization can be easily extended to the scenario  θ ES,T +EH,T where transmit power is given as PTCi = 1−tei−td,T i with i ES,Ti denoting the stored energy available at Ti for IT at the beginning of the current block. The information signal received at the HAP due to this uplink IT from Ti is given by q (5) yu,Ti = PTCi ρTi HTi xu,Ti + z0 , where xu,Ti is the normalized zero mean information symbol transmitted by Ti having unit variance and z0 is the received AWGN at the HAP having zero mean and variance σ 2 . After decoding the message signal from yu,Ti , the HAP forwards the decoded message signal x bu,Ti to the receiving cell user Ri in the second subphase of phase 2. Cellular communication between Ti and Ri completes upon downlink IT from the HAP to Ri . The information signal yd,Ri as received at Ri is p yd,Ri = φRi HRi P0 x (6) bu,Ti + zRi , where P0 is transmit power of HAP and zRi denotes zero mean AWGN having variance σ 2 . φRi incorporates the difference in HAP-to-Ri channel characteristics for downlink ET and IT [5]. Since the HAP acts like a DF relay [10] with 1 − te − td,Ti and td,Ti being time allocations for uplink and downlink IT, the RF-powered throughput for cellular mode communication between Ti and Ri , as obtained using (5) and (6), is given by    2 θη P0 ρ HT te i i τTCi ,Ri = min (1 − te − td,Ti ) log2 1 + σ2Ti1−t T−t , ( e d,Ti )  td,Ti log2 1 + P0 φRi HRi σ −2 . (7)   2 θηT P0 ρT HTi te UL i i With τTi ,Ri = (1 − te − td,Ti ) log2 1 + σ2 1−t −t ( e d,Ti )  and τTDL = td,Ti log2 1 + P0 φRi HRi σ −2 respectively i ,Ri representing uplink and downlink rates, throughput τTCi ,Ri den o fined in (7) can be rewritten as: τTCi ,Ri = min τTUL , τTDL . i ,Ri i ,Ri b) D2D Mode: Under this mode, Ti directly communicates with Ri by forming a D2D link. With IT phase of 1 − te duration, the transmit power PTDi of D2D transmitter Ti is PTDi = θEH,T i 1−te = θηT P0 HTi te i 1−te . (8) The corresponding information signal yd2,Ri received at Ri is q yd2,Ri = PTDi GTi ,Ri xd2,Ti + zRi , (9) where xd2,Ti is the zero mean and unit variance information symbol transmitted by Ti of ith user pair choosing D2D mode. So using (8) and (9), the RF-powered throughput for the D2D mode communication between ith user pair is given by   θη P0 HTi GTi ,Ri te . (10) τTDi ,Ri = (1 − te ) log2 1 + Ti σ2 (1−t e) With the above two throughput definitions, we investigate the joint optimal MS (between D2D and cellular) and TA (for different phases) policy for the sum-throughput τS maximization. IV. O PTIMAL T IME A LLOCATION In this section we first investigate the concavity of the RFpowered throughput in TA for both cellular and D2D modes. Then, we derive the expressions for globally optimal TA. A. Concavity of Throughput in TA We first show that the throughput τTCi ,Ri in cellular mode communication between users Ti and Ri is jointly concave τTUL in TAs te and td,Ti by proving the concavity of  and i ,Ri  = τTDL,R . The Hessian matrix of τTUL is given by H τTUL i ,Ri i ,Ri  i∂ 2 τiUL  2 UL " # ∂ τ Ti ,Ri Ti ,Ri te 1 − td,Ti 2 ∂te ∂td,Ti   2 ∂tULe = −Zi where 2 UL t2e ∂ τT ,R ∂ τT ,R te i i i i 1−td,T ∂td,Ti ∂te Zi , ∂td,Ti 2 i 2  (1−td,Ti ) ηTi θρTi P0 HT2 i  2 . 2 t +σ 2 1−t −t ln(2)(1−te −td,Ti ) ηT θP0 ρT HT ( e d,Ti ) e i i As i Zi , te , and td,Ti are positive with te + td,Ti < 1, we   notice ∂ 2 τTULi ,Ri ∂ 2 τTULi ,Ri that ∂t2 , ∂t2 < 0, and the determinant of H τTUL i ,Ri e d,Ti   UL is zero. This proves that H τTi ,Ri is negative semi-definite; hence, τTUL is concave in te and td,Ti . Also, the downlink rate i ,Ri DL τTi ,Ri is linear in td,Ti and independent of te . Finally, with the minimum of two concave functions being concave [13], the joint concavity of τTCi ,Ri in te and td,Ti is proved. The strict-concavity of throughput for D2D mode in te is shown by ∂ 2 τTDi ,Ri ∂t2e = (1−te ) t2e  −1 ln(2) 1+ ηθH σ2 (1−te ) Ti GTi ,Ri P0 te 2 < 0. B. Global Optimal TA Solution Using (7), the throughput maximization problem for cellular mode communication between Ti and Ri can be defined as (OP) : maximize τTCi ,Ri = xi , subject to : xi ,te ,td,Ti , (C1) : xi ≤ τTUL i ,Ri , (C2) : xi ≤ τTDL i ,Ri (C3) : te + td,Ti ≤ 1, (C4) : te , td,Ti ≥ 0. Keeping the positivity constraint (C4) implicit and associating Lagrange multipliers λ1 , λ2 , λ3 with remaining constraints, the Lagrangian function by L , xi − h for OP iis given   UL λ1 [t + td,Ti − 1] − λ2 xi − τTi ,Ri − λ3 xi − τTDL . The i ,Ri corresponding optimality (KKT) conditions [13] are given by constraints (C1)–(C4), dual feasibility conditions λ1 , λ2 , λ3 ≥ ∂L ∂L , , ∂L = 0, and Comple0, subgradient conditions ∂x i ∂te ∂td,Ti mentary h Slacknessi Conditions (CSC) [13]λ1 [t + td,Ti − 1] = = 0. To allocate = 0, λ3 xi − τTDL 0, λ2 xi − τTUL i ,Ri i ,Ri non-zero time for uplink IT, te + td,Ti < 1, which results ∂L ∂L in λ∗1 = 0. Using this in ∂x , , ∂L = 0, implies that i ∂te ∂td,Ti for τTCi ,Ri > 0, λ∗1 = 0, λ∗2 > 0, and λ∗3 > 0. Using λ∗2 > 0 and λ∗3 > 0 in CSC deduces to xi = τTUL = τTDL . This i ,Ri i ,Ri implies that the optimal TA td,Ti for downlink IT from the HAP to receiver Ri is such that the uplink and downlink rates become equal, i.e., τTCi ,Ri = τTUL = τTDL . On solving this, i ,Ri i ,Ri ∗ the global optimal TA td,Ti for downlink IT is given by ! t∗d,Ti , (1 − te ) 1 + where Y1,i = ln(Y2,i )  σ2 (1−te ) 2 t , ηT θP0 ρT HT e i ,(11) Y ln(Y2,i ) +Y1,i W−1 − 1,iY +1 1,i Y 2,i i ln(Y2,i ) P0 φR HRi Y2,i = 1 + i σ2 i , and W−1 (·) is the Lambert function [14]. Using optimal t∗d,Ti ∗ along with τTUL = τTDL , the optimal cellular rate τTCi ,Ri , i ,Ri i ,Ri −2 ∗ is a unimodal function of te . td,Ti log2 1 + P0 φRi HRi σ D Since throughput τTi ,Ri in D2D communication between Ti and Ri is strictly-concave in te , the global optimal TA te for maximizing it, as obtained by solving "  Y −1  #−1 ∗ tD e,i , 1− 3,i Y3,i W0 exp(1)  Y −1  3,i W0 exp(1) −Y3,i +1 ∂τTD ,R i i ∂te with Y3,i = = 0, is given by P0 HTi GTi ,Ri i−1 h (12) σ2 θηT i Here W0 (·) is the Lambert function of principal branch [14]. V. J OINT M ODE S ELECTION AND T IME A LLOCATION ∗ Using the definition for τTCi ,Ri , the mathematical formulation of the joint optimization of MS and TA for maximizing the sum-throughput τS of the considered system is given by  P0 φ HR  N/2 P i Ri (J P): maximize τS , (1 − mi ) t∗d,Ti log2 1 + σ2 N/2 te ,{mi }i=1 i=1  + mi (1 − te ) log2 1 + θηT P0 HTi GTi ,Ri te i σ2 (1−te )  subject to: (C5) : mi ∈ {0, 1} , (C6) : 0 ≤ te ≤ 1, where constraint (C5) is defined ∀ i = 1, 2, . . . , N/2 and mi is the MS based binary decision variable which is defined as ( ∗ 0, τTCi ,Ri > τTDi ,Ri (i.e., Cellular mode) mi = (13) ∗ 1, τTCi ,Ri ≤ τTDi ,Ri (i.e., D2D mode). In general J P is a combinatorial problem as it involves binary variable {mi }. However, we next present a novel harvested energy-aware optimal MS strategy that resolves this issue and helps in obtaining the jointly global optimal solution of J P. A. Optimal Mode Selection Strategy For a given TA te , the analytical condition for throughput of RF-powered communication between Ti and Ri of ith user pair in D2D mode to be higher than that in cellular mode is: ∗ τTDi ,Ri > τTCi ,Ri . Using t∗d,Ti defined in (11), this reduces to: 1−Fi  2 θηT P0 ρT HT te θηT P0 HTi GTi ,Ri te i i i i , (14) > 1 + σ2 (1−te )(1−Fi ) 1+ σ2 (1−te ) t∗ d,Ti te ≤ 1. We note that 1−t and Fi are strictly where Fi , (1−t e) e increasing functions ofh te , where the latter holds because  Y  i−1 −Y1,i −1 1,i 2 ∗ W − 1−t ln Y +1 ( −1 −Y2,i e −td,T )σ 2,i ∂Fi i > 0. ∂te = η θP0 ρ H 2 t2 (1−te )Y1,i Ti Ti Ti e This result is obtained by knowing W−1 (x) + 1 < 0,∀x ∈ Y i h − ln Y2,i1,i −1 −1 , 0 and Y > 1 along with ≤ < 0. 2,i Y1,i exp(1) exp(1) Y2,i Now if GTi ,Ri ≥ ρTi HTi , implying that direct link quality is better than the uplink quality, then from (14) we note that ∗ τTDi ,Ri ≥ τTCi ,Ri or mi = 1 for any feasible te because D2D mode is more energy-efficient and provides higher throughput for the same amount of harvested energy. Whereas if GTi ,Ri < ∗ te τTDi ,Ri = τTCi ,Ri , then it can be ρTi HTi and ∃ tth e,i , shown that for te > tth e,i , D2D mode is preferred by the ith user pair over the cellular mode, and vice-versa. because  D This holds C∗ th , 1 , τ > τ ∈ (0, 1), then ∀t ∈ t if ∃ tth e e,i e,i Ti ,Ri Ti ,Ri due to C∗ strictly decreasing nature of τTi ,Ri in Fi , the rate of increase of ∗ τTCi ,Ri is lower than that of τTDi ,Ri , ∀te > tth e,i . The value of this threshold tth implies that even when uplink quality is better e,i than direct link between Ti and Ri , D2D is better mode than cellular for te > tth e,i because the resulting harvested energy makes it more spectrally-efficient as compared to the cellular mode involving redundant transmission during downlink IT. B. Jointly Global Optimization Algorithm N/2 Using thresholds {tth e,i }i=1 , the optimal MS for each EH user pair can be decided based on TA te for ET. So, we divide the feasible range for te into N2 + 1 subranges based on N2 thresholds {tth e,i }. For each of these subranges, the optimal MS N/2 policy {m∗i }i=1 can be obtained using the discussion given in N/2 Section V-A. Further, using the concavity of {τTDi ,Ri }i=1 and ∗ N/2 {τTCi ,Ri }i=1 in TA, as proved in Section IV-A, we note that the sum-throughput τS for optimal MS {m∗i } is concave in TA te because it is a sum of N2 concave functions comprising of ∗ either {τTDi ,Ri } or {τTCi ,Ri }. Hence, the global optimal MS and TA can be obtained by selecting the subrange that gives the maximum sum throughput. We have summarized these steps of the proposed joint global optimization strategy in Algorithm 1. In Algorithm 1 after dividing the feasible te range, optimal TA t∗e for each of the possible N2 + 1 MS scenarios is obtained using the Golden Section (GS) based one dimensional (1D) search with acceptable tolerance ξ ≪ 1 (implemented in steps 26 to 33). The upper and lower bounds for each D∗ search are either based on the thresholds {tth e,i } or on {te,i }, as defined in (12) for pair i having worst and best average link qualities, respectively. So, we conclude that Algorithm 1 Algorithm 1 Joint global optimal MS and TA to maximize τS Input: Set S = (Ti , Ri ) Ti , Ri ∈ {U1 , . . . UN } ∧ 1 ≤ i ≤ ; channel and system parameters HTi , HRi , GTi ,Ri , ηTi , ρTi , φRi for each user pair in S, along with θ, P0 , σ 2 ; and tolerances ǫ, ξ Output: Optimal MS {m∗i } and TA t∗e , {t∗d,Ti } along with τS∗ 1: Initialize C = ∅ and define a very small positive quantity ǫ ≈ 0 } do 2: for i ∈ {1, 2, . . . , N ∗2 3: if τTDi ,Ri > τTCi ,Ri for both te = ǫ and te = 1 − ǫ then 4: Set tth ⊲ Represents D2D mode e,i = 0 ∗ 5: else if τTDi ,Ri < τTCi ,Ri for both te = ǫ and te = 1 − ǫ then 6: Set tth ⊲ Represents Cellular mode e,i = 1, C = C ∪ i 7: else o n D C∗ 8: Set tth e,i = te τTi ,Ri = τTi ,Ri , C = C ∪ i 9: Sort tth to store ivalues in V andhindexes in I i e,i in descending h 10: Set k1 = argmin ηTi HTi GTi ,Ri , k2 =argmax ηTi HTi GTi ,Ri 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: 1≤i≤|C|+1 37: if (| C |= ∅) then 38: Set m∗i = 1, t∗d,Ti = 0, ∀i = 1, 2, . . . , N2 39: else if | C |= N then 2 40: ∀i, m∗i = 0 and t∗d,Ti is obtained using te =t∗e in (11) 41: else ( 42: 43: 1, i = Iopt+1 , Iopt+2 , . . . , I|C| ∀i = 1, 2, . . . , N2 , set m∗i = 0, otherwise, ( obtained by substituting t∗e in (11), m∗i = 0 t∗d,Ti = 0, (i.e., D2D mode,) otherwise, returns the global optimal MS and TA along with maximum τS after running GS-based 1D-search for at most N2 + 1 times. VI. N UMERICAL R ESULTS AND D ISCUSSION For generating numerical results we consider that N nodes are deployed randomly following Poisson Point Process (PPP) Optimal percentage of D2D Users (%) 11: 1≤i≤N/2  θηT P0 HTj GTj ,Rj te  j Set τ1 (te ) = j=1 (1 − te ) log2 1 + σ 2 (1−te ) if | C |= ∅ then ⊲ Represents all Nodes in D2D mode ∗ D∗ Set lb1 = tD e,k2 and ub1 = te,k1 by using (12) N else if | C |= 2 then ⊲ Represents all Nodes in cellular mode ∗ Set lb1 = 0 and ub1 = tD  PN/2 ∗ e,k1 Set τ1 (te ) = j=1 td,Tj log2 1 + P0 φRj HRj σ −2 else ∗ Set lb1 = V1 and ub1 = tD e,k1 for i ∈ {1, 2, . . . , | C |} do ∗ Set τi+1 (te ) = τi (te ) + τTCI ,RI − τTDI ,RI i i i i if i <| C | then Set lbi+1 = Vi+1 and ubi+1 = Vi else Set lbi+1 = 0 and lbi+1 = Vi for i ∈ {1, 2, . . . , | C | +1} do Set tl = lbi and tu = ubi Set tp = tu − 0.618 (tu − tl ) , tq = tl + 0.618 (tu − tl ) while tu − ti > ξ do if τi (tp ) ≥ τi (tq ) then Set tu = tq , tq = tp , tp = tu − 0.618 (tu − tl ) else Set tl = tp , tp = tq , tq = tl + 0.618 (tu − tl ) ∗ l and τS,i =τi (t∗i ) Set t∗i = tu +t 2 N if (| C |= ∅) ∨ | C |= 2 then break ∗ ∗ Set opt = argmax τS,i , τS∗ = τS,opt , and t∗e = t∗opt PN/2 240 Path-loss exponent n 2 3 4 Jointly Opt Opt TA (D2D) Opt TA (Cell) Fix TA (D2D) Fix TA (Cell) 200 160 5 N = 40 users 120 80 N = 20 users 40 23.4 9.2 5.8 Maximum field size L (m) 4.4 Fig. 3: Throughput performance comparison of different schemes. 70 5 4.5 Path-loss exponent n 4 3.5 N = 10 68 N = 20 N = 30 66 64 2 2.5 3 N = 40 4 8 12 16 Maximum field size L (m) 20 24 Fig. 4: Variation of optimal MS (D2D versus cellular) with L, n. Optimal TA for RF-ET t∗e 1≤i≤N/2 Sum-throughput τS∗ in bits per second per Hz (bps/Hz) N 2  0.18 N = 10 N = 40 Opt TA (D2D) 0.16 0.14 0.12 Joint Opt MS-TA 0.1 0.08 Opt TA (Cell) 2 2.5 3 3.5 4 4.5 5 Path-loss exponent n Fig. 5: Variation of optimal TA t∗e for ET in different modes. over a square field of area L×L m2 with the HAP positioned at the center. This field size L ensures that the average received power for a given path-loss exponent n and average fading parameter HTi is higher than the minimum received power sensitivity of −20 dBm for practical RF-EH circuits [9]. So, as n is varied from 2 to 5, maximum field size L decreases from 23.4 m to 4.4 m. For user pairing we have considered that node i pairs with node N − i + 1, ∀i = {1, 2, . . . , N/2}. The graphs in this section are obtained by plotting the average results for multiple random channel realizations and multiple random node deployments with unit average channel fading components {HTi , HRi , GTi ,Ri } and path-loss coefficient p. We have assumed P0 = 4 W, σ 2 = −100 dBm, θ = 0.8, ρTi = φRi = 1, ηTi = 0.5, ∀ i, with tolerances ξ = 10−3 and ǫ = 10−6 . Firstly, we investigate the throughput gain achieved with the help of proposed joint MS and TA optimization over the benchmark schemes that include fixed communication mode (all nodes are either in cellular or D2D mode) and uniform TA for each phase where te = td,Ti = 13 for cellular mode and te = 21 for D2D mode. Results in Fig. 3 show that the joint 0.6 Uplink (Opt MS-TA) 0.261 Downlink (Opt MS-TA) 0.26 0.259 Uplink (Opt TA) 4.7 4.75 4.8 Downlink (Opt TA) 0.5 0.4 0.3 3 4 6 0.6 4 0.4 0 0 N = 40 N = 30 200 N = 20 100 0 N = 10 2 3 4 Path-loss exponent n 5 x-coordinate (a) Deployment 1 D2D Rx 1 10 6 0.8 1 4 0.6 0.4 8 5 0.2 0 2 3 9 7 0 0.2 0.4 0.6 0.8 x-coordinate (b) Deployment 2 1 Fig. 7: Examples to give graphical insights on optimal MS strategy. Average increase in sum-throughput (%) Sum-throughput (bps/Hz) Optimal TA Approximation 1 8 7 5 0.2 0.4 0.6 0.8 D2D Tx 1 2 (a) Average uplink and downlink IT time 300 Cell Rx 10 0.2 5 Path-loss exponent n 9 3 0.8 0.2 2 Cell Tx y-coordinate HAP 1 y-coordinate Average optimal TA for IT in cellular mode 0.7 80 N = 10 N = 20 N = 30 N = 40 60 40 20 0 L = 23.4, n = 2 L = 9.2, n = 3 L = 5.8, n = 4 L = 4.4, n = 5 Maximum field size L (m), Path-loss exponent n (b) Approximation validation Fig. 6: Insights on average IT in cellular mode and validation of Fig. 8: Performance enhancement provided by joint optimal MS-TA. closed-form approximation for optimal TA in all-D2D mode scenario. optimization scheme provides significant gains over the fixed TA and MS schemes. These gains which scale with increased system size N , get enhanced with diminishing field size L due to increased path-loss exponent n for both 20 and 40 user systems. Furthermore, the throughput performance of D2D mode for both optimal TA and fixed TA is much better than that for the corresponding cellular mode communication. In fact, the performance of optimal TA with all nodes selecting D2D mode is very close to that of joint optimal strategy. The reason for this can be observed from the results plotted in Figs. 4 and 5. From Fig. 4 we observe that irrespective of field size L, about 2/3 fraction of the total users prefer D2D mode. As the D2D mode involves direct IT, it is more spectrallyefficient and can allocate higher t∗e for ET as shown in Fig. 5. Since joint MS and TA involves both D2D and cellular modes, its t∗e lies between that of all-D2D and all-cellular scenarios. We numerically quantify the average optimal uplink and downlink IT times in cellular mode. Fig. 6(a) shows that optimal uplink IT time is much higher than optimal downlink IT time due to significantly low link quality for uplink IT from energy constrained users. On the contrary, downlink involves IT from energy-rich HAP. Further, the IT times (of both uplink and downlink) for joint MS and TA are relatively lower than that for scenario where all nodes follow cellular mode because the former selects only the pairs that have better uplink and downlink qualities for cellular mode communication. From Figs. 3 and 4, it was noted that optimal TA with all nodes selecting D2D performs very close to jointly optimal MS and TA. So, in Fig. 6(b) we have compared the variation of τS achieved by optimal TA scheme with fixed D2D mode for all nodes against that achieved by considering tight analytical D∗ for t∗ as obtained by substituting the approximation tc e e average channel gain for the RF-powered D2D IT link in (12). −1  Y4 −1 N/2 P 2 Y3,i Y 4 W0 ( exp(1) ) ∗ D , 1− where Y4 , So, tc Y4 −1 e N . W0 ( exp(1) )−Y4 +1 i=1 Fig. 6(b) shows that although the quality of approximation gets degraded with increasing N , it is still very much acceptable as the average percentage error is always less than 1.5%. Next we present graphical insights on optimal MS. In Fig. 7 we have plotted two N = 10 user deployments with L = 1 unit and shown optimal MS in each case. User pairing is same as discussed before, i.e., user 1 transmits to 10, 4 transmits to 7, and so on. We note that when transmitter (Tx) and receiver (Rx) are placed almost opposite to each other with the HAP being in the center and far from the Tx, then cellular mode is preferred. Otherwise, mostly (≈ 66% times) D2D is preferred. Finally via Fig. 8, we show that the joint optimization scheme taking advantage of proximity can achieve spectral efficiency gains by optimal MS and can effectively solve the tradeoff between efficient ET and IT by optimal TA. As a result it provides significant gain in terms of τS over that achieved by benchmark scheme having uniform TA for all three phases (ET, uplink and downlink IT) with all nodes selecting cellular mode. Fig. 8 also shows that higher gains are achieved when the average link qualities become poorer due to increased n. VII. C ONCLUSION We have presented a novel system architecture and transmission protocol for efficient the RF-powered D2D communications. To maximize the sum-throughput of RF-EH small cell OFDMA network, we have derived the joint global optimal MS and TA by resolving the underlying combinatorial issue. Analytical insights on the impact of harvested energy on the optimal decision-making have been provided. We have observed that the jointly optimal MS and TA can provide about 45% enhancement in achievable sum-throughput. Lastly, we have showed that with our proposed joint MS and TA about 66% nodes follow D2D mode, and the optimal TA scheme with fixed D2D mode for all nodes very closely follows the sum-throughput performance of the jointly optimal scheme. ACKNOWLEDGMENTS This work was supported by the Department of Science and Technology under Grant SB/S3/EECE/0248/2014 along with the 2016 Raman Charpak and 2016-2017 IBM PhD Fellowship programs. In addition, the views of Dr. G. C. Alexandropoulos expressed here are his own and do not represent Huawei’s ones. R EFERENCES [1] E. Hossain and M. Hasan, “5G cellular: Key enabling technologies and research challenges,” IEEE Instrum. Meas. Mag., vol. 18, no. 3, pp. 11– 21, Jun. 2015. [2] D. Mishra et al., “Smart RF energy harvesting communications: Challenges and opportunities,” IEEE Commun. Mag., vol. 53, no. 4, pp. 70– 78, Apr. 2015. [3] H. Ju and R. Zhang, “Throughput maximization in wireless powered communication networks,” IEEE Trans. Wireless Commun., vol. 13, no. 1, pp. 418–428, Jan. 2014. [4] H. Chen et al., “Harvest-then-cooperate: Wireless-powered cooperative communications,” IEEE Trans. Signal Process., vol. 63, no. 7, pp. 1700– 1711, Apr. 2015. [5] P. Grover and A. Sahai, “Shannon meets Tesla: Wireless information and power transfer,” in Proc. IEEE ISIT, Austin, Jun. 2010, pp. 2363–2367. [6] A. H. Sakr and E. Hossain, “Cognitive and energy harvesting-based D2D communication in cellular networks: Stochastic geometry modeling and analysis,” IEEE Trans. Commun., vol. 63, no. 5, pp. 1867–80, May 2015. [7] S. Gupta et al., “Energy harvesting aided device-to-device communication underlaying the cellular downlink,” IEEE Access, Aug. 2016. [8] R. Atat et al., “Energy harvesting-based D2D-assisted machine-type communications,” IEEE Trans. Commun., vol. 65, no. 3, pp. 1289–1302, Mar. 2017. [9] D. Mishra and S. De, “i2 RES: Integrated information relay and energy supply assisted RF harvesting communication,” IEEE Trans. Commun., vol. 65, no. 3, pp. 1274–1288, Mar. 2017. [10] D. Feng 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. [11] D. D. Penda et al., “Energy efficient D2D communications in dynamic TDD systems,” IEEE Trans. Commun., vol. 65, no. 3, pp. 1260–1273, Mar. 2017. [12] E. Boshkovska et al., “Practical non-linear energy harvesting model and resource allocation for SWIPT systems,” IEEE Commun. Lett., vol. 19, no. 12, pp. 2082–2085, Dec. 2015. [13] S. Boyd and L. Vandenberghe, Convex Optimization. Cambridge University Press, 2004. [14] E. W. Weisstein, “Lambert W-Function,” From MathWorld. [Online]. Available: http://mathworld.wolfram.com/LambertW-Function.html
7cs.IT
arXiv:1710.00870v2 [cs.CV] 29 Oct 2017 Rethinking Feature Discrimination and Polymerization for Large-scale Recognition Yu Liu∗, Hongyang Li∗ , Xiaogang Wang The Chinese University of Hong Kong {yuliu, yangli, xgwang}@ee.cuhk.edu.hk Abstract Feature matters. How to train a deep network to acquire discriminative features across categories and polymerized features within classes has always been at the core of many computer vision tasks, specially for large-scale recognition systems where test identities are unseen during training and the number of classes could be at million scale. In this paper, we address this problem based on the simple intuition that the cosine distance of features in high-dimensional space should be close enough within one class and far away across categories. To this end, we proposed the congenerous cosine (COCO) algorithm to simultaneously optimize the cosine similarity among data. It inherits the softmax property to make inter-class features discriminative as well as shares the idea of class centroid in metric learning. Unlike previous work where the center is a temporal, statistical variable within one mini-batch during training, the formulated centroid is responsible for clustering inner-class features to enforce them polymerized around the network truncus. COCO is bundled with discriminative training and learned end-to-end with stable convergence. Experiments on five benchmarks have been extensively conducted to verify the effectiveness of our approach on both small-scale classification task and large-scale human recognition problem. 1 Introduction Deep neural networks [14, 8, 9] have dramatically advanced the computer vision community in recent years, with high performance boost in tremendous tasks, such as image classification [8, 34, 21], object detection [4, 32, 20, 30, 27], object tracking [2], saliency detection [19], etc. The essence behind the success of deep learning resides in both the superior expression power of non-linear complexity in high-dimension space [9] and the large-scale datasets [3, 7] where the deep networks could, in full extent, learn complicated patterns and representative features. The basic question still halts the core of many vision tasks: how can we obtain discriminative features across categories and polymerized features within one class? The most fundamental task in computer vision is image classification [34, 14, 8]: given N categories in the training set, we train a deep model that could best discriminate features among categories in high-dimensional space. The test set also consists of the same N classes (identities). However, there are two challenges when we apply the classification task in real-world applications. The first is the number of categories could be exponentially increased (e.g., MegaFace [12] contains one million test identities). This requires the features should be discriminative to have large margin across classes. The second is the category mismatch between training and test set. Often we train on a set of N known classes and evaluate the algorithm on M new, different identities. This hastens the features should be polymerized to share small distances within classes. ∗ The first two authors contribute equally. 31st Conference on Neural Information Processing Systems (NIPS 2017) Deep Learning Workshop. (a) Softmax loss (b) Triplet loss (c) Center loss w/o softmax 60 (d) Center loss with softmax (e) COCO 0.6 0.4 40 0.2 20 0 0 −0.2 −20 −0.4 −0.6 −40 −0.8 1 −60 100 0.5 50 50 0 0 −0.5 −50 −100 0.5 0 0 −50 −1 −100 −0.5 Figure 1: Feature visualization under different loss strategies, trained on MNIST [15] with 10 classes. (a) Softmax loss; (b) triplet loss; (c) center loss without softmax; (d) center loss; (e) our proposed COCO. The feature dimension is three for better illustration. The triplet loss [33] has a constraint on feature embedding (kf k2 = 1) and thus the learned features are scatted on a hypersphere. In this paper, we optimize the deeply learned features to be both discriminative and polymerized, given the large-scale constraint: ultra category number and open test set. Faced with the aforementioned challenges, the community extends the classification problem into two sub tasks: data verification and identification. Since our main focus lies in the field of human-related tasks, we use the term face with data exchangeably thereafter. Face verification [38, 31] aims at differentiating whether a pair of instances belong to the same identity; whilst face identification [25, 35] strives for predicting the class of an identity given the test gallery [12]. Person recognition [28, 44] also belongs to the verification case, only with more non-frontal and unstrained face (head) settings2 . For the feature discrimination concern, the softmax loss and its variants [26, 31, 25] are proposed to provide a hyperplane with large margin in high-dimensional space and thus effectively distinguish features across classes. However, it ignores the intra-class similarity, making the sample distance within one class distant also and thus amply filling in the feature space (Fig. 1(a)); for the feature polymerization concern, one can resort to distance metric learning [43, 41]. Previous work [36] usually introduced neural networks, using contrastive loss [35] or triplet loss [39, 24, 33], to learn the features, followed by a simple metric such as Euclidean or cosine distance to verify the identity (Fig. 1(b)). Such methods are effective to decrease the intra-class distance in some extent and yet bears an internal drawback due to the formulation: the selection of positive and negative samples are relative within each batch and thus could occur training instability, especially the number of classes and data scale increase (see Fig. 3(b)). An alternative is to jointly combine the discriminative feature learning in a softmax spirit and the polymerized feature learning in a metric learning manner. The center loss [42] and its variant [45] are two typical approaches. They linearly combine two terms as the total loss: the first being softmax and the second a class center supervision kxi − cli k. The hybrid solution can effectively enlarge the inter-class distance as well as the inner-class similarity; nevertheless, the concept of class center is updated in a statistical manner without consulting to the network parameter update during training. Moreover, the center loss term has to be bundled with an ad-hoc softmax (thus requires more model parameters); if not, the center barely changes according to its formulation and thus the loss could be zero (c.f., Fig. 1(c)-(d)). To this end, we propose the congenerous cosine (COCO) algorithm to provide a new perspective on jointly considering the feature discrimination and polymerization. The intuition is that we directly optimize and compare the cosine distance (similarity) between features: the intra-class distance should be as minimal as possible whereas the inter-class variation should be magnified to the most extent (see Fig. 1(e)). COCO inherits the softmax property to make features discriminative in the high-dimensional space as well as keeps the idea of class centroid. Note that unlike the statistical role of cli in [42], the update of our centroid is performed simultaneously during the network training; and there is no additional loss term in the formulation. By virtue of class centroid bundled with discriminative training, COCO is learned end-to-end with stable convergence. Experiments on two small-scale image classification datasets first verify the feasibility of our proposed approach and three 2 The term recognition has a broad sense: detection, verification, classification, etc. Person recognition is face verification with more unstrained samples. For not making any confusion, we follow this terminology as did in the community. In this paper, we refer to face verification, identification and person recognition, in a general sense, as human recognition. 2 large-scale human recognition benchmarks further demonstrate the effectiveness of applying COCO in an ultra class number and open test set environment. The source code is publicly available3 . 2 Related Work The related work of different loss methods to optimize features is compared and discussed throughout the paper. In this section, we mainly focus on the face and person recognition applications. Face verification and identification have been extensively investigated [12, 31, 25, 36, 35, 42] recently due to the dramatic demand in real-life applications. Schroff et al. [33] directly learned a mapping from face images to a compact Euclidean space where distances directly correspond to a measure of face similarity. DeepID2 [35] employed a contrastive loss with both the identification and verification supervision. It increased the dimension of hidden representations and added supervision to early convolutional layers. Tadmor et al. [36] introduced a multibatch method to generate invariant face signatures through training pairs. The training tended to be faster to convergence by virtue of smaller variance of the estimator. SphereFace [25] formulated an angular softmax loss that enabled CNN to learn discriminative features by imposing constraints on a hypersphere manifold. Person recognition in photo albums [1, 29, 28, 22, 44, 18] aims at recognizing the identity of people in daily life photos, where such scenarios can be complex with cluttered background. [1] first address the problem by proposing a Markov random filed framework to combine all contextual cues to recognize the identity of persons. Recently, Zhang et al. [44] introduce a large-scale dataset called PIPA for this task. The test set on PIPA is split into two subsets, namely test_0 and test_1 with roughly the same number of instances. In [28], a detailed analysis of different cues is explicitly investigated and three additional test splits are proposed for evaluation. [22] embed scene and relation contexts in LSTM and formulate person recognition as a sequence prediction task. Note that previous work [44, 28, 18, 22] use the training set only for extracting features and a follow-up classifier (SVM or neural network) is trained on test_0. The recognition system is evaluated on the test_1 set. We argue that such a practice is infeasible and ad hoc in realistic application since the second training on test_0 is auxiliary and needs re-training if new samples are added. 3 Optimizing Congenerous Cosine Distance 3.1 COCO Formulation and Optimization Let f (i) ∈ RD denote the feature vector of the i-th sample,where D is the feature dimension. We first introduce the cosine similarity of two features as:  C(f (i) , f (j) ) = f (i)T · f (j) kf (i) kkf (j) k. (1) The cosine similarity metric quantifies how close two samples are in the feature space. A natural intuition to a desirable loss is to increase the similarity of samples within a category and enlarge the centroid distance of samples across classes. Let li , lj ∈ {1, · · · , K} be the labels of sample i, j, where K is the total number of categories, we have the following loss to maximize: Lnaive = X δ(li , lj )C(f (i) , f (j) ) i,j∈B [1 − δ(li , lj )]C(f (i) , f (j) ) +  , (2) where B denotes the mini-batch, δ(·, ·) is an indicator function and  is a trivial number for computation stability. The naive design in (2) is reasonable in theory and yet suffers from computational 2 inefficiency. Since the complexity of the loss above is O(CM ) = O(M 2 ), it increases quadratically as batch size M goes bigger. Also the network suffers from unstable parameter update and is hard to converge if we directly compute loss from two arbitrary samples from a mini-batch: a similar drawback as does in the triplet loss [39]. As discussed previously, an effective solution to polymerize the inner-class feature distance is to provide a series of truncus in the network: serving as the centroid for each class and thus enforcing features to be learned around these hubs. To this end, we define the centroid of class k as the average 3 https://github.com/sciencefans/coco_loss 3 P of features over a mini-batch: ck = N1k i∈B δ(li , k)f (i) ∈ RD , where Nk is the number of samples that belong to class k within the batch. Incorporating the spirit of class centroid into Eqn. (2), one can derive the following revised loss to maximize: Lrevise = exp C(f (i) , cli ) X i∈B P m6=li exp C(f (i) , cm ) , (3) where m indexes along the category dimension. The direct intuition behind Eqn. (3) is to measure the distance of one sample against other samples by way of a class centroid, instead of a direct pairwise comparison as in Eqn. (2). The numerator ensures sample i is close enough to its class center li and the denominator enforces a minimal distance against samples in other classes. The exponential operator exp is to transfer the cosine similarity to a normalized probability output. To optimize the aforementioned loss in practice, we first normalize the feature and centroid by l2 norm and then scale the feature before feeding them into the loss layer: ĉk = ck αf (i) exp(ĉTk · fˆ(i) ) (i) , , fˆ(i) = , p = P T ˆ(i) ) kck k kf (i) k k m exp(ĉm · f (4) (i) where α is the scale factor and pk is an alternative expression4 to the inner term of summation in Eqn. (3). Therefore, the proposed congenerous cosine (COCO) loss are formulated, in a cross-entropy manner to minimize, as follows: X (i) X  (i) (i) LCOCO f (i) , ck = − tk log pk = − log pli , (5) i∈B i∈B,k (i) where k indexes along the class dimension in RK and tk ∈ {0, 1} is the binary mapping of sample i based on its label li . The proposed COCO inherits the properties from (2) to (3), that is to increase the discrimination across categories as well as to polymerize the compactness within one class in a cooperative way. Moreover, it reduces the computation complexity compared with the naive version and can be implemented in a cheat way. Note that both the features and cluster centroids are trained end-to-end. We now derive the gradients of loss LCOCO w.r.t. the unnormalized input feature f (i) and the centroid ck . For brevity, we drop the sample index i and superscript notation in the loss. Denote ∇x L, x ∈ {d, j} as the element-wise top gradient of loss w.r.t. the normalized feature, i.e., ∂L/∂ fˆx , we have the following gradient by applying the chain rule: X ∂L ∂ fˆd ∂ fˆj X ∂ fˆd = ∇d L · = ∇j L · + ∇d L · , ∂fj ∂fj ∂fj ∂fj d d6=j    α ∇j L − (∇LT · fˆ)fˆj fi fd ∇j L X − ∇d L · , =α = kf k kf k3 kf k (6) d where ∇L ∈ RD is the vector form of ∇x L. Considering the specific loss defined in Eqn. (5), the top gradient ∇x L can be obtained: X ∂L ∂zk X ∇x L = · = (pk − tk ) · ĉkx . (7) ∂zk ∂ fˆx k k The derivation of gradient w.r.t. centroid ∂L/∂ckj can be derived in a similar manner. The features are initialized from pretrain models and the initial value of ck is thereby obtained. Towards an Optimal Scale Factor α 3.2 As stated in previous subsection, we first normalize and scale the feature; now we have the following theorem to prove that there exists an optimal value for the factor. The derivations are provided in the supplementary. 4 In practice, it is more feasibly convenient to include m = li in the denominator and the result barely differs. 4 Softmax Loss 0.8 0.7 Positive 0.6 Negative Triplet Loss 0.9 0.8 lower 0.6 0.8 0.6 0.5 0.4 lower 0.3 0.2 0.1 0.1 0 0 -1 -0.5 0 0.5 1 larger higher 0.4 smaller 0.3 0.2 Positive Negative 0.7 0.5 0.4 (polymerization) COCO Loss 0.9 Postive Negative 0.7 0.5 higher 1 1 1 0.9 (discrimnation) 0.3 0.2 0.1 -1 0 -0.5 0.5 1 0 -1 -0.5 0 0.5 1 Figure 2: Histogram statistics of cosine distance for positive and negative pairs on MNIST [15]. Feature discrimination and polymerization are more evident using COCO than other losses. Theorem 1. Given the optimization loss L has an upper bound , i.e, L < ; and the neural network has a class number of K, the scale factor α enforced on the input feature has a lower boundary: α> 3.3 1 K −1 log . 2 exp  − 1 (8) COCO Verification on Image Classification In this subsection, we provide results and discussions to verify the effectiveness of COCO on smallscale image classification datasets, namely, MNIST [15] and CIFAR-10 [13]. The dataset, network structure and implementation details are provided in the supplementary. An optimal scale factor matters. Take CIFAR-10 as example. When α is small (α = 1, error rate 12.4), the lower bound of loss is high, leading to a high loss in easy samples; however, the loss for hard examples still remains at low value. This will make the gradients from easy and hard samples stay at the same level. This is hard for the network to optimize towards hard samples - leading to a higher error rate. When α = 10, the error rate is 7.22; if we set the factor to the optimal value defined in Eqn. (8), the error rate is 6.25. Feature discrimination and polymerization. Figure 2 shows the histogram of the cosine distance among positive pairs (i.e., two arbitrary samples that belong to the same class) and negative pairs. We can see that the distance in softmax and triplet cases resemble each other; in the COCO case, the discrepancy between the positive and negative is larger (center distance on x-axis between two clusters); the intra-class similarity is also more polymerized (area under two clusters). Training loss. Figure 3 describes the training loss curves under different loss strategies on CIFAR and LFW datasets. We can observe that our proposed method undergoes a stable convergence as the epoch goes; whereas other losses do not witness an obvious drop when the learning rate decreases. The triplet loss is effective the number of classes is small on CIFAR; however, when the task extends to a larger scale and includes over 1,000 categories, the triplet term suffers from severe disturbance during training since the optimized feature distance is altered frequently within one batch. Quantitative results. We report the image classification error rate on MNIST and CIFAR-10 in Table 1. Note that MNIST is quite a smalls-scale benchmark and the performance tends to saturate. Moreover, we conduct the ablative study on different losses: softmax, center loss, triplet loss and their combination. For fair comparison, they all share the same CNN structure as COCO’s. We can observe that the center loss alone bears a limited improvement (6.66 vs 6.70) over softmax; the triplet loss has the training instability concern and thus the error rate is much higher (12.69). Without resorting to softmax, our method is neat in formulation and achieves the lowest error (6.25). 4 4.1 COCO for Large-scale Recognition Face Verification and Identification We follow the general convention as in [42, 33, 25] to conduct face verification and identification: train a network using COCO loss to obtain robust features, extract features in the test set based on the trained model, and compare or identify the unknown classes given a large scale test setting. The main modifications to the traditional practice are two folds: first we employ the detection pipeline 5 Center term Softmax term (a) Softmax loss Triplet loss Center loss COCO 2 10 Center term Softmax term 1 10 (b) 0 10 −1 10 −2 10 0 2 4 6 8 10 12 Figure 3: Training loss vs epoch of different losses. (a): Image classification on CIFAR-10 [13]; (b): Face verification on trained on MS-1M celebrity set. Note that for the center loss there are two curves, corresponding to the center and softmax term, respectively. to leverage the feature selection and conduct landmark regression, in a multi-task RPN manner [32]. One task is for classifying the foreground or background landmarks while the other focus on regressing them. There are five landmarks: left or right eyes, nose, and left or right corners of mouth. The second revision is the landmark alignment via affine transformation, in order to switch the position to a base one. 4.2 Person Recognition Following a general pipeline of the verification task, we first train features using the proposed COCO algorithm on a specific body region (e.g., DropConnect [37] 0.57 9.41 NIN [23] 0.47 10.47 head) to classify different identities; during inMaxout [6] 0.45 11.68 ference, the features on both test subsets are DSN [17] 0.39 9.69 extracted to compute the cosine distance and R-CNN [5] 0.31 8.69 to determine whether both instances are of the GenPool [16] 0.31 7.62 same identity. We utilize the multi-region spirit [22] during training and test to merge results Softmax 0.36 6.70 Center loss + softmax 0.32 6.66 from four regions, namely, face, head, upper Triplet loss 1.45 12.69 body and whole body. The contributions as reTriplet loss + softmax 0.38 6.73 gard to this task are two folds: remove the second training on test_0 as did in previous work, COCO 0.30 6.25 which credits from the property of COCO to Table 1: Classification error rate (%) on MNIST learn discriminative and polymerized features; align each region patch to a base location to and CIFAR-10 without data augmentation. reduce variation among samples. Method MNIST CIFAR-10 The detailed description of region detection and patch alignment are provided in the supplementary. Given the cropped and aligned patches, we train (finetune) models for different regions on PIPA training set using COCO loss. At testing stage, we measure the cosine similarity between two test splits to recognize the identity in test_1 based on the labels in test_0. The similarity between two patches i and j in test_1 and test_0 is denoted as s(r)ij , where r indicates a region. We normalize the preliminary s(r)ij in order to have scores across different regions comparable:     −1 (i,r) (j,r) s(r)ij = C(f ,f ), ŝ(r)ij = 1 + exp − β0 + β1 s(r)ij , (9) where β0 , β1 are parameters of the logistic regression. The final score Sij is a weighted mean of the PR normalized scores ŝ(r)ij of each region: Sij = r=1 γ r · ŝ(r)ij , where R is the total number of regions and γ r being the weight of each region’s score. The identity of patch i in test_1 is decided 6 1 0.99 0.98 COCO Loss 0.97 True positive rate Center Loss Softmax Loss 0.96 Triplet Loss DeepFace 0.95 DeepID Method Train Data mAcc FaceNet [33] DeepID2 [35] * CenterFace [42] L-Softmax [26] SphereFace [25] 200M 300K 700K webface webface 99.65 99.47 99.28 98.71 99.42 DeepID2 0.94 DeepID2+ 0.93 DeepID3 DLIB 0.92 Faceall GaussianFace 0.91 High dimensional LBP Human,cropped 0.9 10 -3 10 -2 False positive rate THU CV-AI Lab-1 10 TL Joint Bayesian Softmax Center loss + softmax Triplet loss Triplet loss + softmax half half half half MS-1M MS-1M MS-1M MS-1M 99.75 99.78 98.85 99.68 COCO half MS-1M 99.86 Figure 4: The ROC curves of different methods Table 2: Face verification accuracy (%) on LFW. for face verification on LFW. Our model using The first three models use private outside training COCO to train features achieves a higher AUC data. * Result comes from an ensemble method score. that has 25 models. by the label corresponding to the maximum score in the reference set: li = arg maxj∗ Sij . The test parameters of β and γ are determined by a validation set on PIPA. 5 Experiments Dataset and evaluation metric. Face recognition. The Labeled Face in the Wild (LFW) dataset [10] contains 13,233 web-collected images from 5749 different identities, with large variations in pose, expression and illuminations. Following the standard protocol of unrestricted with labeled outside data, we test on 6,000 face pairs. The MegaFace [12] is a very challenging dataset and aims to evaluate the performance of face recognition algorithms at the million scale of distractors: people who are not in the test set. It includes gallery set and probe set. The gallery set consists of more than one million images from 690K different individuals, as a subset of Flickr photos from Yahoo. The probe set descends from two existing databases: Facescrub and FGNet. Person recognition. The People In Photo Albums (PIPA) dataset [44] is divided into train, validation, test and leftover sets, where the head of each instance is annotated in all sets and it consists of over 60,000 instances of around 2,000 individuals. In this work, thanks to the discriminative and polymerized features learned by COCO, we take full advantage of the training set and remove the second training on test_0. Moreover, [28] introduced three more challenging splits besides the original test split, namely album, time and day. Each new split emphasizes different temporal distance (various albums, events, days, etc.) between the two subsets of the test data. The evaluation metric is the averaged classification accuracy over all instances on test_1. 5.1 Face Verification and Identification We now apply the COCO feature learning to large-scale human recognition system. For fair comparison of our method to other losses (softmax, center loss, triplet loss and their combination), we use the same CNN network structure in the following experiments. Features on LFW is available on the github repository. Figure 4 shows the ROC curves of different methods and Table 2 reports the accuracy (%) for face verification on LFW [10]. It is observed that COCO model is competitively superior (99.86) than its counterparts. Compared with FaceNet [33] which intakes around 200M outside training data, or DeepID2 [35] which ensembles 25 models, our approach demonstrates the effectiveness of feature learning. Table 3 illustrates the identification accuracy on MegaFace challenge [12], where the test identities share no interaction with those in training and the data scale is quite large. Our model using COCO is competent at different number of distractors. The combination of center loss with softmax ranks second (76.57 vs 75.79 @1M), which verifies that applying center loss alone cannot guarantee a good feature learning for large-scale task. The triplet loss (69.13) is inferior and our model competes favorably against those using large protocol of training data. 7 Method NTechLab DeepSense SphereFace [25] L-Softmax [26] Method Protocol @1M Method Protocol @1M small small small small 58.22 70.98 75.77 67.13 NTechLab DeepSense ShanghaiTech Google FaceNet large large large large 73.30 74.80 74.05 70.50 Protocol @1M @100k @10k @1k Softmax Center loss + softmax Triplet loss Triplet loss + softmax small small small small 71.17 75.79 69.13 70.22 85.78 90.74 85.64 86.77 93.22 96.45 93.38 94.71 96.14 97.91 96.66 97.02 COCO small 76.57 91.77 96.72 98.03 Table 3: Face identification accuracy (%) on MegaFace challenge at various number of distractors. Method Face Head RNN [22] - X X X X - X X Softmax - X X Upper body Whole body original album time day X X 84.17 89.24 88.40 88.76 84.93 87.43 81.93 80.78 81.46 82.15 79.15 78.25 77.54 73.84 74.00 76.84 70.90 68.64 66.43 67.40 62.46 53.75 61.48 57.87 42.91 43.73 42.30 34.77 X X X X X 87.86 88.13 89.71 91.43 80.85 82.87 78.29 80.67 71.65 73.01 66.60 70.46 59.03 55.52 52.21 55.56 X X X X 88.73 92.78 80.26 83.53 71.56 77.68 50.36 61.73 X X X X X X X X X X X X X X X Table 4: Person recognition on PIPA [44]. Investigation on the merging similarity score from different body regions during inference. The top two results in each split set are marked in bold and italic, respectively. COCO loss is applied in all cases if not specified. 5.2 Person Recognition Comparison with state-of-the-arts and visual results. The comparison figure and visual results are provided in the supplementary due to page limit. We can see that our recognition system outperforms against previous state-of-the-arts in all four test splits. Note that the test identities share no interaction with those in the training set and thus this task is also a challenging open set verification problem. The visual results show some examples of the predicted instances by our model, where complex scenes with non-frontal faces and body occlusion can be handled properly in most scenarios. The last two columns show failure cases where our method could not differentiate the identities, this is probably due to the very similar appearance configuration in these scenarios. Ablation study on different regions. Table 4 depicts the investigation on merging the similarity score from different body regions during inference. [22] also employs a multi-region processing step and we include it in Table 4. For some region combination, on certain splits our model is superior (e.g., head plus upper body region, 88 vs 84 on original, 79 vs 78 on album, 68 vs 66 on time); whereas on other splits ours is inferior (e.g., 42 vs 43 on day). This is probably due to distribution imbalance among splits: the upper body region differs greatly in appearance with some instances absent of this region, making COCO hard to learn the corresponding features. However, under the score integration scheme, the final prediction (last line) can complement features learned among different regions and achieves better performance against [22]. 8 6 Conclusion In this work, we re-investigate the feature learning problem based on the motivation that deeply learned features should be both discriminative and polymerized. We address the problem by proposing a congenerous cosine (COCO) loss, which optimizes the cosine distance among data features to simultaneously enlarge inter-class variation and intra-class similarity. COCO can be learned in a neat way with stable end-to-end training. We have extensively conducted experiments on five benchmarks, from image classification to face identification, to demonstrate the effectiveness of our approach, especially applying it to the large-scale human recognition tasks. References [1] D. Anguelov, K. chih Lee, S. B. Gokturk, and B. Sumengen. Contextual identity recognition in personal photo albums. In CVPR, 2007. [2] Z. Chi, H. Li, H. Lu, and M.-H. Yang. Dual deep network for visual tracking. IEEE Trans. on Image Processing, 2017. [3] J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei. ImageNet: A Large-Scale Hierarchical Image Database. In CVPR, 2009. [4] R. Girshick. Fast R-CNN. In ICCV, 2015. [5] R. Girshick, J. Donahue, T. Darrell, and J. Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. In CVPR, 2014. [6] I. J. Goodfellow, D. Warde-farley, M. Mirza, A. Courville, and Y. Bengio. Maxout networks. In ICML. 2013. [7] Y. Guo, L. Zhang, Y. Hu, X. He, and J. Gao. MS-Celeb-1M: a dataset and benchmark for large-scale face recognition. arXiv preprint:1607.08221, 2016. [8] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In CVPR, 2016. [9] G. E. Hinton and R. R. Salakhutdinov. Reducing the dimensionality of data with neural networks. Science, 313, 2006. [10] G. B. Huang, M. Ramesh, T. Berg, and E. Learned-Miller. Labeled faces in the wild: A database for studying face recognition in unconstrained environments. Technical Report 07-49, University of Massachusetts, Amherst, October 2007. [11] S. Ioffe and C. Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML. 2015. [12] I. Kemelmacher-Shlizerman, S. M. Seitz, D. Miller, and E. Brossard. The megaface benchmark: 1 million faces for recognition at scale. In CVPR, 2016. [13] A. Krizhevsky and G. Hinton. Learning multiple layers of features from tiny images. In Technical Report, 2009. [14] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In NIPS, pages 1106–1114, 2012. [15] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. In Proceedings of the IEEE, volume 86, pages 2278–2324, 1998. [16] C.-Y. Lee, P. W. Gallagher, and Z. Tu. Generalizing pooling functions in convolutional neural networks: Mixed, gated, and tree. arXiv preprint:1509.08985, 2015. [17] C.-Y. Lee, S. Xie, P. Gallagher, Z. Zhang, and Z. Tu. Deeply-supervised nets. arXiv preprint: 1409.5185, 2014. [18] H. Li, J. Brandt, Z. Lin, X. Shen, and G. Hua. A multi-level contextual model for person recognition in photo albums. In CVPR, 2016. [19] H. Li, J. Chen, H. Lu, and Z. Chi. CNN for saliency detection with low-level feature integration. Neurocomputing, 226:212–220, 2017. [20] H. Li, Y. Liu, W. Ouyang, and X. Wang. Zoom out-and-in network with map attention decision for region proposal and object detection. In arXiv preprint: 1709.04347, 2017. [21] H. Li, W. Ouyang, and X. Wang. Multi-bias non-linear activation in deep neural networks. In ICML, 2016. [22] Y. Li, G. Lin, B. Zhuang, L. Liu, C. Shen, and A. van den Hengel. Sequential person recognition in photo albums with a recurrent network. arXiv preprint:1611.09967, 2016. [23] M. Lin, Q. Chen, and S. Yan. Network in network. In ICLR, 2014. [24] H. Liu, Y. Tian, Y. Wang, L. Pang, and T. Huang. Deep relative distance learning: Tell the difference between similar vehicles. In CVPR, 2016. [25] W. Liu, Y. Wen, Z. Yu, M. Li, B. Raj, and L. Song. Sphereface: Deep hypersphere embedding for face recognition. In CVPR, 2017. 9 [26] W. Liu, Y. Wen, Z. Yu, and M. Yang. Large-margin softmax loss for convolutional neural networks. In ICML, 2016. [27] Y. Liu, H. Li, J. Yan, F. Wei, X. Wang, and X. Tang. Recurrent scale approximation for object detection in CNN. In IEEE International Conference on Computer Vision, 2017. [28] S. J. Oh, R. Benenson, M. Fritz, and B. Schiele. Person recognition in personal photo collections. In ICCV, 2015. [29] S. J. Oh, R. Benenson, M. Fritz, and B. Schiele. Faceless person recognition; privacy implications in social media. In ECCV, 2016. [30] W. Ouyang, H. Li, X. Zeng, and X. Wang. Learning deep representation with large-scale attributes. In ICCV, 2015. [31] R. Ranjan, C. D. Castillo, and R. Chellappa. L2-constrained softmax loss for discriminative face verification. arXiv preprint:1703.09507, 2017. [32] S. Ren, K. He, R. Girshick, and J. Sun. Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks. In NIPS, 2015. [33] F. Schroff, D. Kalenichenko, and J. Philbin. Facenet: A unified embedding for face recognition and clustering. In CVPR, 2015. [34] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015. [35] Y. Sun, X. Wang, and X. Tang. Deeply learned face representations are sparse, selective, and robust. In CVPR, 2015. [36] O. Tadmor, Y. Wexler, T. Rosenwein, S. Shalev-Shwartz, and A. Shashua. Learning a metric embedding for face recognition using the multibatch method. In NIPS, 2016. [37] L. Wan, M. Zeiler, S. Zhang, Y. L. Cun, and R. Fergus. Regularization of neural networks using dropconnect. In ICML, 2013. [38] F. Wang, X. Xiang, J. Cheng, and A. L. Yuille. Normface: L2 hypersphere embedding for face verification. arXiv preprint:1704.06369, 2017. [39] X. Wang and A. Gupta. Unsupervised learning of visual representations using videos. In ICCV, 2015. [40] S.-E. Wei, V. Ramakrishna, T. Kanade, and Y. Sheikh. Convolutional pose machines. In CVPR, 2016. [41] K. Q. Weinberger and L. K. Saul. Distance metric learning for large margin nearest neighbor classification. Journal of Machine Learning Research, 2009. [42] Y. Wen, K. Zhang, Z. Li, and Y. Qiao. A discriminative feature learning approach for deep face recognition. In ECCV, 2016. [43] E. P. Xing, A. Y. Ng, M. I. Jordan, and S. Russell. Distance metric learning, with application to clustering with side-information. In NIPS, 2003. [44] N. Zhang, M. Paluri, Y. Taigman, R. Fergus, and L. Bourdev. Beyond frontal faces: Improving person recognition using multiple cues. In CVPR, 2015. [45] X. Zhang, Z. Fang, Y. Wen, Z. Li, and Y. Qiao. Range loss for deep face recognition with long-tail. arXiv preprint:1611.08976, 2016. 10 Supplementary 6.1 Proof on the optimal scale factor, Theorem 1 Proof. It is obvious that the infimum value of COCO loss is of the form: exp s+ , exp s+ + (K − 1) exp s− s+ = α exp(cos θ) ≤ α, inf LCOCO = − log − s = α exp(cos θ) ≥ −α, (10) (11) (12) where s is the probability output in the final classification layer. For brevity, we denote inf s = s− and sup s = s+ ; θ is the angle between two features. Often we have E[cos θ] ≥ 0 in practice and yet the minimal value of cos θ can still be −1. Therefore, sup LCOCO = − log exp(−α) . exp(−α) + (K − 1) exp α (13) The loss to minimize in an optimization problem usually meets some upper bound criteria, and we denote this target value as , i.e., inf LCOCO < . Incorporating this prior knowledge into previous derivations, we have: log(exp α + (K − 1) exp(−α)) < α + , K −1 1 α > log . 2 exp  − 1 (14) (15) It is empirically found that a typical value for  is 10−4 and thus the scale factor can be expressed in a deterministic closed form: 1 (16) α = log(K − 1) + 3. 2 6.2 Details on Image Classification and Face Recognition For image classification on CIFAR, we use a simple ResNet-20 structure and train the network from scratch. We set the momentum as 0.9 and the weight decay to be 0.005. The base learning rate is set to be 0.1, 0.1, 0.05, respectively. We drop the learning rate by 10way and stop to decrease the learning rate until it reaches a minimum value (0.0001). All the convolutional layers are initialized with Gaussian distribution with mean of zero and standard variation of 0.05 or 0.1. For face recognition, we use the Inception ResNet model and add a new fully-connected layer after the final global pooling layer to generate a 128-dim feature. The model is trained from scratch. The training data is a subset of the Microsoft-1M celebrity dataset, which consists of 80k identities with 3M images in total, removing all overlapping IDs. For COCO, softmax and center loss, we train the network with SGD solver with a base learning rate 0.01 and drop it to 10% every five epoch. The total training time is 12 epoch. The momentum is set to 0.9. Batch normalization [11] with moving average is employed. For the triplet loss, we have a base learning rate to 0.1 with a bigger batch size 128*3 (it is hard to converge if the size is less than 64*3); we drop the rate to 10% every 90k iteration. The total training time is around 300k iterations. Evaluation metric on face recognition. For verification, the test set is LFW [10] and the metric is under standard ‘Unrestricted, Labeled Outside Data’ setting of LFW. It verifies 6,000 pairs to determine if they belong to the same person. We report ROC curve and the mean accuracy. For identification on MegaFace [12], we have the test set into two subsets: the first is probe set that consists of FaceScrub (3530 images of 80 persons); the second is gallery set that consists of distractors (1M images with no overlap with FaceScrub). The test metric is under standard MegaFace Challenge1 setting. We report the CMC curve in terms of Top-1 accuracy with 10, 100, 1000, 10k, 100k and 1M distractors. 11 Figure 5: Training workflow of person recognition task. (a) Each person is labelled with a groundtruth box of the head. (b): Face, whole body and upper body detection. (c): Each region (patch) is aligned to a base position to alleviate the inner-class variance. (d) Each aligned patch is further fed into a deep model to obtain representative and robust features using COCO loss. Test split original album time day n-a Face ali n-a Head ali [22] n-a 95.47 94.66 91.03 90.36 97.45 96.57 93.36 91.32 74.23 65.47 55.88 35.27 82.69 73.77 64.31 44.24 81.75 74.21 63.73 42.75 76.67 66.23 55.24 26.49 Upper body ali [22] 80.75 69.58 57.40 32.09 79.92 70.78 58.80 34.61 Whole body n-a ali 75.04 64.21 55.53 32.85 79.06 67.27 54.62 29.59 Table 5: Ablation study on body regions and feature alignment using softmax as loss. We report the classification accuracy (%) where n-a denotes the non-alignment case and ali indicates the alignment case. Note that for face region, we only evaluate instances with faces. 6.3 More Algorithm Details for Person Recognition The COCO features are trained on four regions (thus four models), namely, face, head, upper body and whole body. We take the face region as an illustration for the alignment scheme. A face detector is first pretrained in a RPN spirit [32]. The face detector identifies some keypoints (eye, brow, mouth, etc.) and we align the detected face patch to a base location via an affine transformation. Let p, q ∈ Rz×2 denote m keypoints and the aligned locations, respectively. We define P, Q as two affine spaces, then the transformation A : P 7→ Q is defined as: p 7→ q = Ap + b, where A ∈ Rz×z is a linear transformation matrix in P and b ∈ Rz×2 being the bias in Q. Such an alignment scheme ensures samples both within and across categories do not have large variance: if the model is learned without alignment, it has to distinguish more patterns, e.g., different rotations among persons, making it more prone to overfitting; with alignment, it can better classify features of various identities despite of rotation, viewpoint, translation, etc. Given the cropped and aligned patches, we finetune the face model on PIPA training set using COCO loss. The head region is given as the ground truth for each person. To detect a whole body, we also pre-train a detector in the RPN framework. The model is trained on the large-scale human celebrity dataset [7], where we use the first 87021 identities in 4638717 images. The network structure is an inception model [11] with the final pooling layer replaced by a fully connected layer. To determine the upper body region, we conduct human pose estimation [40] to identity keypoints of the body and the upper part is thereby located by these points. The head, whole body and upper body models, which are used for COCO loss training, are finetuned on PIPA training set using the pretained inception model, following similar procedure of patch alignment stated previously for the face region. The aligned patches of four regions are shown in Figure 5(c). 6.4 Experiments on Person Recognition Ablation study on feature alignment for different regions. Table 5 reports the performance of using feature alignment and different body regions, where several remarks could be observed. First, the alignment case in each region performs better by a large margin than the non-alignment case, which verifies the motivation of patch alignment to alleviate inner-class variance stated in the main paper. Second, for the alignment case, the most representative features to identify a person reside in the region of face, followed by head, upper body and whole body at last. Such a clue is not that 12 Methods original album time day PIPER [44] RNN [22] Naeil [28] Multi-context [18] 83.05 84.93 86.78 88.75 78.25 78.72 83.33 66.43 69.29 77.00 43.73 46.61 59.35 Ours 92.78 83.53 77.68 61.73 Table 6: Verification accuracy (%) comparison to state-of-the-arts on PIPA [44] for person recognition. obvious for the non-alignment case. Third, we notice that for the whole body region, accuracy in the non-alignment case is higher than that of the alignment case in time and day. This is probably due to the improper definition of base points on these two sets. Visual results. Figure 6 shows some visualization results for person recognition task. (a) Test 1 (b) Test 0 Figure 6: Visualization of our method on the PIPA test_1 set. Given the image as input to be predicted in (a), its nearest neighbour in the feature space from text_0 is shown in (b). The identity of the input is determined by the label of its neighbour. Our model can handle complex scenes with non-frontal faces and body occlusion. The last two columns show failure cases. 13
1cs.CV
Toward an enumeration of unlabeled trees Recuero, P. M. Abstract We present an algorithm that, on input n, lists every unlabeled tree of order n. arXiv:1703.06113v1 [cs.DS] 11 Mar 2017 1 Introduction The enumeration of structures is a primal theme of combinatorics. Whereas the problem of enumerating the labeled tree graphs has been solved by Borchardt [1]—and subsequently improved by Cayley [2]— over one century ago, an analogue for the unlabeled case remained elusive. Here, we present an algorithm that, on input n, lists every [unlabeled] tree of order n exactly once. Before we begin, a couple remarks on notational conventions and terminology: a multiset is a duple S = (S ∗ , MS ), where S ∗ is a set, called the underlying set and MS : S ∗ → Z+ is the so-called multiplicityf unction. A partition p of a natural number n is a multiset p = (p∗ , Mp ), p∗ ⊂ Z+ such P that i∈p∗ Mp i = n. We denote by P (n) the set of all partitions of n, and exceptionally, cortiously let (0,(0,1)) be the unique partition of zero. Additionally, by Ln we denote the linear [sometimes called “path”] graph on n vertices, that connected graph which either contains exactly two vertices of degree one, all other vertices having degree two, or is the unique graph on one vertex. 2 Main Result Our algorithm works in a series of steps, illustrated below for the case where our input n = 5. Fig. 1 That is, at the k th step, we have the linear graph Ln−k , which we call our backbone, plus k “free” vertices. Within each of these steps, we append the k free vertices to the backbone—that is, add an edge between a free vertex and a vertex of the backbone—in every possible way, while avoiding repetitions and conserving diameter—i.e. all trees generated at step k must have diameter n − k—, and then print out the resulting trees. Fig. 2 Above we have a few examples of trees we might run into upon initialization of our algorithm on input n = 10 at steps zero, and three through five, respectively. Moreso, the figure above evinces a 1 phenomenon to keep in mind: not only can we append our free vertices directly to our backbone, as in the second tree above, but we can also combine them with one another before doing so, as in the third and fourth trees, forming compound appendices; to the free vertices that were added directly to our backbone, as in the second tree, we by contrast refer as singular appendices. Appendices, compound or not, can also be linear, as in the second and third trees, or nonlinear. Appendices that have already been connected to the backbone we call substituents. But there is more than seemingly unnecessary terminological conventions to the figure above: as a matter of fact, instead of jumping straight into our algorithm, we will visit the two simpler cases exemplified by the second and third trees above, viz. those where we can only append the free vertices to our backbone directly or as halves of linear graphs, so as to warm us up and gather insight which shall later come to us useful. 2.1 Singular appendices How many ways are there to append k free vertices directly to a backbone of order n? The naı̈ve way tells us that there are n · k possibilities; however this of course leads to redundancies. Fig. 3 In any given backbone, appending free vertices directly to vertices of same color as in the figure above results in the same tree. Of course, if we only have one free vertex to append then we might as well just cut our backbone in half. Things do get more complicated as the number of free vertices that are to be appended grows, however in fact, cutting our trees into “half-trees” shall prove to be a didactic experiment, helping us deal with the aforeseen symmetry. Fig. 4 Above we have a half-backbone of order four with three free vertices to be directly appended. Being devoid of symmetry, unlike their ‘complete’ congeners, the matter of appending a given number of free vertices directly to a half-backbone of a given order is trivial. Indeed, the figure below hints at a mechanical method we can employ to generate all the possible trees that could arise therefrom, without repetitions. Fig. 5 And with some further thought, one can see that there are Gk (n) ways to append k free vertices directly to a half-backbone of order n, where ( n X 0 if n = 0; G0 (n) = Gk+1 (n) = Gk (i) (1) 1 if n > 0. i=0 Now to pass from half-backbones to full backbones, we proceed as follows: we regard a backbone of order 2n as two half-backbones, h1 , h2 ; if we are to append k free vertices directly to this backbone, then there are the following options: we can append k free vertices directly to h1 and zero to h2 ; or we can append k − 1 free vertices directly to h1 and one to h2 ; or k − 2 to h1 and two to h2 , and so on, up until k − bk/2c to h1 and bk/2c to h2 —if we went further than that then we would be going backwards—, as illustrated in the figure below for the case where we have a backbone of order six, split into two half-backbones of order three, and four vertices to append. 2 Fig. 6 And at each of these steps, we can “glue” our half-trees into trees. But how many ways are there to do that? If we append k1 free vertices to h1 and k2 free vertices to h2 , then there are only two options: (a) k1 6= k2 , in which case, the sets of half-trees generated [from appending k1 free vertices to h1 and k2 free vertices to h2 ] have no elements in common, and thus there are in total Gk1 (n) · Gk2 (n) trees that result from the gluing of the half-trees—n assumed to be the order of the half-trees; (b) k1 = k2 , in which case the sets are the same, and as such there are Gk12(n) +Gk1 (n) trees resulting from the gluing of the half-trees. From the above we can thus derive that there are bk/2c X F (k − i, i, n) (2) i=0 ways to directly append k free vertices to a backbone of order 2n, where ( Gx (z) · Gy (z) if x = 6 y;  F (x, y, z) = Gx (z) + G (z) if x = y. x 2 (3) is our gluing function. This however only solves the case for even backbones. To deal with odd backbones, we proceed as follows: we regard a backbone of order 2n + 1 as two half-backbones of order n—the “sides”— and one extra vertex—the “middle”. And now we do as earlier: if we are to append k free vertices directly to an odd backbone, we can append k free vertices to the sides and zero to the middle; or we can append k − 1 free vertices to the sides and one to the middle, and so on, up until zero free vertices to the sides and k to the middle. As such we obtain that there are k−j 2 c X X k·d(n) b j=0 F (k − j − i, i, bn/2c) (4) i=0 ways to append k free vertices to a backbone of order n, where d is just a function that maps its input to one, if it is odd, and to zero otherwise. 3 Fig. 7 There is yet another thing that we must note. Recall how we stated that our algorithm requires that all trees resulting from the appending of the free vertices to the backbones have the same diameter as their backbones. Above we see a tree with diameter eight generated by the appending of two free vertices to a backbone of diameter six. Were we to allow this genre of thing in our algorithm, we would have repetitions: indeed, were we to initialize our algorithm on input n = 8, then the tree above would be listead [at least] twice: once on the zeroth step, as the backbone of order eight with no substituents; and then again at step two. In our case dealing only with the direct appending of free vertices to backbones, the solution to this is simple: we just forbid substituents at end vertices of our backbones. We shall see how things play out in other settings shortly. 2.2 Linear appendices Here, we can combine our set of free vertices into halves of linear graphs before appending them to our backbone. First let us examine how the simplest cases of this episode behave: those where all appendices are equal. Notice how we can use the very same methods from the previous subsection here to append linear appendices to our backbones and half-backbones. The sole difference lies in how we can commit to our conservation of diameter restriction. Fig. 8 The tree above was obtained from a backbone of diameter four, and yet displays diameter five, despite the fact that the substituent is not found on the end vertex. Nonetheless, the solution to this is simple: we stipulate that appendices of radius r must be appended to vertices of the backbone with distance equal to or greater than r from an end vertex, the end vertices themselves having distance zero. With this, we can obtain that there are k·d(n) b k−j 2 c X X j=0 F (k − j − i, i, b i=0 n − 2r c) 2 (5) ways to append k appendices of radius r to a backbone of order n such that the resulting trees all have diameter n. However even though we are equipped to compute the number of and mechanically generate trees obtained by the appending of linear appendices to backbones, we can only do so when all appendices in question are all of equal radii. Let us see how things go when we are without this prerogative. The first thing to note is that, evidently, the dividing of a set of k free vertices into halves of linear graphs coincides with integer partitions of k. Now suppose we are faced with the following: Fig. 9 We know how to both generate [while conserving diameters] the trees from the appending of the two singular vertices and from the appending of the one half line graph of order two, though so far only separately. 4 Fig. 10 To attain simultaneity, we can “combine” the trees generated from appendices of different radii. Fig. 11 Above we see the results of combining the top-right tree with the top-left and bottom trees [Fig. 10]. One can see that there are two ways to combine the top-right tree with the top-left one, though only one way to combine the top-right one with the bottom one. Evidently this is a matter of symmetry. Without much thought one can notice that whenever a symmetric tree is combined with another tree—be this second one symmetric or asymetric—there is only one possible combination, and when two asymmetric trees are combined, there are two possibilites. Let us then introduce the ◦ operation: for two sets S, T of trees of same diameter, let S ◦ T denote the set of all trees resulting from combining s ∈ S with t ∈ T ; patently we have that |S ◦ T | = 2 · α(S) · α(T ) + σ(S) · α(T ) + α(S) · σ(T ) + σ(S) · σ(T ) (6) Where by σ(S), α(S) we denote the number of symmetric, resp. asymmetric trees in S. Let us denote by H(k, r, n) the set of all trees generated by appending k linear appendices of radius r to a backbone of order n without altering its diameter; we can calculate this set’s cardinality with equation (5); however if we are interested in the cardinality of the set of trees generated by combining several H(ki , ri , n)’s, then we also need to calculate their α and σ. Clearly, if k is odd, then σ(H(k, r, n)) = 0, and if k is even, then σ(H(k, r, n)) = Gk/2 (bn/2c); from these, α(H(k, r, n)) can trivially be derived. Armed with these, we can calculate the number of trees that arise from the combination of two sets of trees generated by the appending of halves of linear graphs of two different radii; however we will also want to calculate combinations of combinations of several sets of graphs. By noting that the combination of an asymmetric tree with any other tree—be it symmetric or asymmetric—yields an asymmetric tree, and that the combination of two symmetric trees yields a symmetric tree, we can determine that σ(|S ◦ T |) = σ(S) · σ(T ) (7) whence again α(|S ◦ T |) can trivially be inferred. There is just one last thing with which we must deal before concluding our work here, and as in the previous subsection, it pertains to odd graphs and their middles. In the case where all appendices were singular, we proceeded by gradually increasing the number of free vertices directly appended to the middle; but in this here case, we are dealing with partitions, and if we just increase those blindly, mistakes can happen. Fig. 12 5 In the bottom-left tree above, for example, the middle substituent has radius greater than the distance between the vertex to which it is appended and an end vertex, violating our rule; indeed, even though it was generated from a backbone of diameter five, it displays diameter six. We need, as such, to discard those partitions. Putting all of the above together, we can obtain that there are k·d(n) X # " X j=0 J∈P (j) C(J ∗ , n) · X Q∈P (k−j) q∈Q∗ H(MQ (q), q, n) (8) trees generated by appending a set of k free vertices as halves of linear graphs to a backbone of order n, where ( 1 if maxi∈S ≤ bnc; C(S, n) = (9) 0 if maxi∈S > bnc. is the function that prevents appendices that are “too long” to be appended to the middle vertex by checking the greatest element of the underlying set of the given partition—corresponding to the appendix of greatest radius. 2 2.3 Nonlinear appendices We are now ready to tackle the case where the free vertices are allowed to combine with one another in any way they please. The first challenge thus to us presented is finding all possible such combinations— of compound appendices. Note how compound appendices coincide with half-trees. The following is an overview of a procedure to list all half-trees of a given order. Fig. 13 Just as we said that our algorithm for the listing of trees would be divided in steps, so will be our algorithm for the listing of half-trees: at the k th step we have a (half-)backbone of order n − k and k free vertices, n being our input; illustrated above is the case for n = 5. Within each of those steps we do as follows: we go over the partitions of k, and for each of those we “apply” them to our set of k free vertices. That is, if k = 15, say, and we have 2 + 2 + 2 + 3 + 3 + 3 as our given partition, then we shall divide our k free vertices into three half-trees of order two, and three half-trees of order three. Fig. 14 And for each of those sets of half-trees of same order, we can choose from the set of all half-trees of that given order to form our fixed order half-three multiset, as seen above for the case of the aforementioned partition on k = 15: there are only  two half-trees of order three; in our partition we must have three of those, so naturally there are 23 = 4 possible fixed order half-three multisets to choose from. Meanwhile, there is only one half-three of order two. Now, we can choose any combination of fixed order half-tree multisets to “manifest” our partition, yielding us our appendix set, itself a multiset whose 6 underlying set has half-trees as elements, the union of its fixed order half-tree multiset constituents. Fig. 15 We go over all appendix sets, and for each A of them, for each a ∈ A∗ , we list all of the half-trees generated by appending MA (a) appendices a to our half-backbone in question while conserving radius. In the figure above, for example we have chosen one of the appendix sets from Fig. 14 and apply it to a half-backbone of order four. So far, everything is just like earlier when all substituents were linear. Indeed, most of the times we can treat nonlinear substiuents in the same manner we treat linear ones, but as we shall see later they have a behavior of their own. For the purpose of this overview, we can simply ignore that and assume that we already know how to deal with them. Now, as earlier, we combine our half-trees and obtain our set of half-trees generated from appendix set A applied to the given half-backbone. Recapitulating in a clumsy mixture of prose and pseudocode, HT_n := { } for k in [0,n-2]: for p in P(k): for AS generatable from p: for a in AS: generate h.-t.’s by appending M_AS(a) a’s to half-backbone of order n-k combine h.-t.’s generated from different a’s append the results to HT_n Where HT_n is meant to be the set of all half-trees of order n, to which we add the sets of half-trees generated by appending k free vertices, combined as per every appendix set generatable from every partition of k to half-backbones of order n − k. 2 And now we turn to the aforementioned peculiarity of nonlinear appendices. Fig. 16 Consider the two half-trees above. Each was generated by appending three free vertices to a halfbackbone of order four, though by different appendix sets and partitions, and as such—were we to ignore the peculiarities of nonlinear appendices; above we have assumed that we already know how to deal with those—would both be listed, were we to initialize our algorithm for listing half-trees on input n = 7, at the third step. However note how they are isomorphic. Let us call a substituent of radius r that is appended to a vertex of the half-backbone with distance exactly r from the half-backbone [such as the nonlinear substituent on the tree to the left in the figure above] terminal. One can easily verify that often times, when appending nonlinear substituents terminally, the resulting half-tree is isomorphic to another half-tree generated from the same number k of free vertices, but with different appendix set. Other times, this does not happen, as in the top tree in the figure below. 7 Fig. 17 To deal with this, we will introduce an ordering relation <ht on the half-trees. In a tree with a terminal substiuent, call the half-tree formed by cutting the edge between the vertex of the half-backbone to which the substituent in question is appended and its neighbor closer to the end vertex—in Fig. 17 above, merely everything to the left of the blue vertex—of the half-backbone the tip induced by that substituent. We stipulate that an appendix a can only be appended terminally if we have that a ≤ht t, where t is the tip it shall thereby induce. The idea behind <ht shall be simple. Consider an expanded version of the aforementioned algorithm for the listing of all half-trees of a given order wherein all half-trees of all orders are listed: we simply go over the positive integers, starting from one, and run the algorithm above at each of those. We will say that for two half-trees a, b, we have that a <ht b if by this expanded algorithm, a is listed before b. As such it is required of us that we order the for’s within our first algorithm, define an ordering on the partitions of a given integer, and then on the appendix sets of a given partition. To order these last ones in turn, we need an ordering on the fixed order half-tree multisets. Let us begin with the ordering <p on the partitions. To decide the relationship between two given partitions p, q of the same integer, we proceed as follows: 1. 2. 3. X_p := p* X_q := q* if max{i in X_p} < max{j in X_q}: then p < q else: if M_p(max{i in X_p}) < M_q(max{j in X_q}: then p < q else: X_p -= max{i in X_p} X_q -= max{j in X_q} go to step 3 That is, we compare the greatest part of the partitions, and then its multiplicity, and then the second greatest part, and then its multiplicity and so on. In the procedure described above, at some point, X_p and X_q (our containers) will become empty, and then, seeing as all previous comparison of parts and their multiplicities led to a tie, the partitions will be equal. It also doesn’t hurt to notice that it is impossible for one of the X’s become empty before the other—if a partition p has fewer parts than another partition q on the same integer, by our definition we will have p >p q and our algorithm will decide that before we run out of parts. Next, an ordering on the appendix sets. First, only appendix sets generated from the same partition are important to us. This ordering here will be similar to our ordering on the partitions: recall that an appendix set consists of fixed order half-three multisets, each derived from a part of the partition whence the appendix set was generated. Assuming an ordering on these last ones, we simply proceed just like we did for partitions: for two appendix sets A, B generated from the same partition p, we compare first the fixed order half-three multiset derived from maxi∈p∗ i and so on. Thus, on to the ordering <m on the fixed order half-three multisets. Let us denote by HTn the set of all half-trees of order n. To each h ∈ HTn we assign a prime number as follows: to the first half-tree that is listed by the first half-tree listing algorithm (the one that lists half-trees of a given input), 2 is assigned; to the second, 3 is assigned, and so on. For a half-tree h, let us denote by ν(h) the prime number thereto assigned. Now for a fixed order half-tree multiset H we let Y M (h) N (H) = ν(h) H (10) h∈H ∗ Now we define that for two fixed order half-tree multisets (of half-three of same order) H1 , H2 , we have that H1 <m H2 iff N (H1 ) < N (H2 ).2 8 Now, at first sight it might seem self-referential, impossible or illegal devise an ordering on the halftrees based on an ordering on fixed order half-tree multisets that is itself based on the ordering on the half-trees. However notice that the smallest half-trees, by virtue of being simple, are greater or lesser than one another not because of the fixed order half-tree multisets that make up their appendix set, but rather because of petty differences in their radii or even partitions on their free vertex set: these minimal trees are too little to make room for such complexity. As our half-trees grow and the first half-trees start to exhibit big free vertex sets allowing diverse appendix sets, these last ones, in their turn, will be made out of the simpler half-trees, which will have already been ordered, and induce themselves an ordering on the larger half-trees. Armed with all of the above, we are now able to go in greater depth into our half-tree listing algorithm, whence we shall subsequently, at last, derive our tree listing algorithm. Having fixed n our input, • For natural k ∈ [0, n − 2]: • For each K ∈ P (k): • For each appendix set A generatable from K: • For each a ∈ A∗ : • Generate H 0 (MA (a), a, n − k); • Combine all of the H 0 (MA (a), a, n − k)’s; • List the half-trees in the resulting set. A few comments are warranted: — In keeping with the orderings we devised above, at the second, third and fourth bullets we go over the partitions, appendix sets and half-trees respectively in increasing order; — Here, H 0 is an extension of our H from the previous subsection; whereas the latter only took numbers as inputs—seeing as all graphs with which it dealt coincided with numbers—the former’s second argument is a half-tree; as such, H 0 (k, a, n) is the set of all half-trees generated by appending k half-trees a to a half-backbone of order n while conserving radius (here we allow nonlinear appendices to be appended terminally, for our half-trees are not done yet); — It is in the combine step that lie the nottiness the nonlinear appendices bring to the table; trees without terminal nonlinear substituents can be combined freely, however when combining a tree with terminal nonlinear substituents a1 , a2 , ... , it must be verified if the induced tip t is such that t >ht ai . As such, it must be the case that when combining the H 0 (k, a, n)’s, we begin from the half-trees of substituents of least radius, so that when the time comes to deal with a half-tree with a nonlinear terminal substituent, all appendices that could have been appended to the tip have already been; — At last the listing of the half-trees must be orderly. For many half-trees arise from the same appendix set, partition and half-backbone and yet we must order these as well. Here, we do so according to the position of the substituents. The simple idea is that the trees that have the smallest (by <ht ) substituents closer to the end are lesser, in keeping with the the mechanical method we employ to append a given number of free vertices onto a half-backbone (cf. Fig. 5 and many others). This is solved for the case were all substituents are equal, however we still must with half-trees with varied substituents. We do this as follows: for two trees with the same substituents a1 <ht a2 <ht ... <ht an , we first verify how close to the end vertex the a1 substituents are in both trees; there being a tie there, we go on to consider the a2 substituents and so on. 2 9 At last, our algorithm for the listing of trees—which by now should look like an obvious extension of the one for half-trees above, seeing as the only additions are the steps where we fuse the half-trees and deal with the middle vertices: having n our input been fixed, • For natural k ∈ [0, n − 3]: • If n − k is even: • For K ∈ P (k): • For each appendix set A generatable from K: • For each a ∈ A∗ : • For natural i ∈ [0, b MA2(a) c]: • Generate H 0 (MA (a) − i, a, n−k 2 ); ); • Generate H 0 (i, a, n−k 2 • Fuse the H 0 ’s into trees, yielding a set F Ha of trees; • Combine all of the F Ha ’s; • List the trees in the resulting set. • If n − k is odd: • For natural j ∈ [0, k]: • F Hj := ∅ • For Q ∈ P (k − j): • F HQ := ∅ • For each appendix set B generatable from Q: • For each b ∈ B ∗ : • For natural i ∈ [0, b MB2(b) c]: • Generate H 0 (MB (b) − i, b, b n−k 2 c); • Generate H 0 (i, b, b n−k c); 2 • Fuse the H 0 ’s into trees, yielding a set F Hb of trees; • Combine all of the F Hb ’s, call the resulting set of trees F HB ; • F HQ = F HQ ∪ F HB • F Hj = F Hj ∪ F HQ • For every J ∈ P (j): • For every appendix set C generatable from J: • Check if the c ∈ C ∗ of greater radius has radius greater than bn/2c; • If it does, discard this appendix set and move on to the next; if not, proceed; • Append the appendices to the middle vertex of a backbone of order n − k as per C; • Combine the resulting tree to all of those in F Hj ; • List the resulting trees;  3 Epilogue Evidently, from here, the elaboration of a closed-form expression for the number of trees listed by our algorithm on a given input, whence an enumeration on the unlabeled tree graphs would be yielded, presents an interesting task; such shall be the subject of a future writing. In passing, an implementation of the algorithm is also on its way. References [1] Borchardt, C. W. (1860); “Über eine Interpolationsformel für eine Art Symmetrischer Functionen und üben Deren Anwendung”; Math. Abh. der Akademie der Wiessenschaften zu Berlin, pp. 1–20. [2] Cayley, A. (1889); “A theorem on trees”; Quart. J. Math., Vol. 23, pp. 376–8. 10
8cs.DS
arXiv:1310.3478v2 [math.AC] 15 Oct 2013 Flat local morphisms of rings with prescribed depth and dimension Cristodor Ionescu Institute of Mathematics Simion Stoilow of the Romanian Academy P.O. Box 1-764 RO 014700 Bucharest Romania email: [email protected] Abstract For any pairs of integers (n, m) and (d, e) such that 0 ≤ n ≤ m, 0 ≤ d ≤ e, d ≤ n, e ≤ m and n − d ≤ m − e we construct a local flat ring morphism of noetherian local rings u : A → B such that dim(A) = n, depth(A) = d, dim(B) = m, depth(B) = e. 1 Introduction While preparing [3], the present author was looking for an example of a flat local ring homomorphism of noetherian local rings u : (A, m) → (B, n) such that A and B/mB are almost Cohen-Macaulay, while B is not almost CohenMacaulay. This means that one should construct for example such a morphism with depth(B) = depth(A) = 0, dim(B) = 2 and dim(A) = 1. Note that actually the flatness of the homomorphism u is the non-trivial point in the construction. After asking several people without obtaining a satisfactory answer, he decided to let it as an open question in [3]. The answer came soon, an example with the desired features being constructed by Tabaâ [6]. Using his idea, we construct a quite general example of this type, construction that can be useful in various situations. 2 The construction We start by pointing out the following easy and well-known fact. Lemma 2.1 Let k be a field, n, d ∈ N such that 0 ≤ d ≤ n. Then there exists m ∈ N, m ≥ n and a monomial ideal I ⊂ S := k[X1 , . . . , Xm ] such that dim(S/I)(X1 ,...,Xm ) = n and depth(S/I)(X1 ,...,Xm ) = d. 1 Proof: Let r = n−d. If r = 0 the assertion is clear. Assume that r > 0. If d = 0 let S = k[X0 , X1 , . . . , Xr ] and if d > 0 let S = k[X0 , X1 , . . . , Xr , T1 , . . . , Td ]. Consider for example the monomial ideal I = (X0 ) ∩ (X0 , . . . , Xr )r+1 . Then Ass(S/I) = {(X0 ), (X0 , . . . , Xr )}, hence dim(S/I) = r+d = n and depth(S/I) = d. Now taking m = r + 1 + d and renumbering the indeterminates we get the desired relations. Remark 2.2 Clearly there are also many other choices for a monomial ideal with the properties of the above lemma. For more things about this kind of construction one can see [5]. Theorem 2.3 Let 0 ≤ d1 ≤ n1 and 0 ≤ d2 ≤ n2 be natural numbers such that n1 ≤ n2 , d1 ≤ d2 and n1 − d1 ≤ n2 − d2 . Then there exists a local flat morphism of noetherian local rings u : (A, m) → (B, n) such that depth(A) = d1 , dim(A) = n1 , depth(B) = d2 and dim(B) = n2 . Proof: Let k be a field and A = (k[X]/I)(X) , X = (X1 , . . . , Xm ) be a local ring obtained cf. 2.1 with depth(A) = d1 , dim(A) = n1 . Let s = d2 − d1 , t = n2 − n1 and let C = (k[Y ]/J)(Y ) , Y = (Y1 , . . . , Yp ) be a local ring obtained cf. 2.1 with depth(C) = s, dim(C) = t. Now let D := A ⊗k C = k[X]/I ⊗k k[Y ]/J = k[X, Y ](Ik[X, Y ] + Jk[X, Y ]) and let B := D(X,Y ) . Then obviously the canonical morphism u : A → B is flat and local, being a localisation of the base change of the flat morphism k → C. We need the following probably well-known fact: Lemma 2.4 Let k be a field and m, p ∈ N. Let also I and J be monomial ideals in k[X] = k[X1 , . . . , Xm ] and k[Y ] = k[Y1 , . . . , Yp ] respectively and set S := k[X, Y ]. Then Min(IS + JS) = {P S + QS |P ∈ Min(I), Q ∈ Min(J)}. Consequently dim(S/(IS + JS)) = dim(k[X]/I) + dim(k[Y ]/J). Proof: Using [2], 3.4 we obtain q √ √ √ Min(IS + JS) = Min( IS + JS) = Min( IS + JS) = √ √ = Min( IS + JS) = {P S + QS | P ∈ Min(I), Q ∈ Min(J)}. Returning at the proof of the Theorem, by 2.4 we get dim(B) = dim(A) + dim(C) = n1 +t = n2 and by [1], Lemma 2 we have that depth(B) = depth(A)+ depth(C) = d2 . This concludes the proof of 2.3. Example 2.5 Let k be a field and let A = C = (k[X, Y ]/(X 2 , XY ))(X,Y ) and let B = A ⊗k C = (k[X, Y, U, V ]/(X 2 , XY, U 2 , U V ))(X,Y,U,V ) . The canonical morphism u : A → B is the morphism obtained performing the above construction. This is the example from [6], namely we have dim(A) = 1, dim(B) = 2, depth(A) = depth(B) = 0. 2 Remark 2.6 If (A, m) is a noetherian local ring, we call the Cohen-Macaulay defect of A, the natural number cmd(A) = dim(A)−depth(A). Thus A is CohenMacaulay if and only if cmd(A) = 0 and A is almost Cohen-Macaulay if and only if cmd(A) ≤ 1(see [3]). Example 2.7 Using the above construction, one can also get examples of flat local morphisms of noetherian local rings, whose closed fiber has prescribed Cohen-Macaulay defect, or even more general, has prescribed dimension n and depth d ≤ n. Indeed, by ([4], 15.1, 23.3), the flatness of u implies that n = dim(B/mB) = n2 − n1 and d = depth(B/mB) = d2 − d1 , so that it is enough to choose appropriate values for n1 ≤ n2 and d1 ≤ d2 and perform the above construction. Acknowledgment: The author would like to thank Marius Vlădoiu for some illuminating discussions concerning lemma 2.4 and to Javier Majadas for pointing out a missing condition in the statement of the main result. References [1] R. Fröberg, A note on the Stanley-Reisner ring of a join and of a suspension, Manuscripta Math., 60(1988), 89-91. [2] H. T. Hà, S. Morey, Embedded associated primes of powers of square-free monomial ideals, J. Pure Appl. Algebra, 214(2010), 301-308. [3] C. Ionescu, More properties of almost Cohen-Macaulay rings, preprint, arxiv 1304.7332, arxiv.org. [4] H. Matsumura, Commutative Ring Theory, Cambridge Univ. Press, 1986. [5] R. Sharp, Some results on the vanishing of local cohomolgy modules, Proc. London Math. Soc., 30(1975), 177-195. [6] M. Tabaâ, Sur le produit tensoriel d’algèbres, preprint, arxiv 1304.5395v3, arxiv.org. 3
0math.AC
arXiv:1711.01057v2 [math.GR] 13 Nov 2017 Open subgroups of the automorphism group of a right-angled building Tom De Medts Ana C. Silva November 15, 2017 Abstract We study the group of type-preserving automorphisms of a rightangled building, in particular when the building is locally finite. Our aim is to characterize the proper open subgroups as the finite index closed subgroups of the stabilizers of proper residues. One of the main tools is the new notion of firm elements in a rightangled Coxeter group, which are those elements for which the final letter in each reduced representation is the same. We also introduce the related notions of firmness for arbitrary elements of such a Coxeter group and n-flexibility of chambers in a right-angled building. These notions and their properties are used to determine the set of chambers fixed by the fixator of a ball. Our main result is obtained by combining these facts with ideas by Pierre-Emmanuel Caprace and Timothée Marquis in the context of Kac–Moody groups over finite fields, where we had to replace the notion of root groups by a new notion of root wing groups. 1 Introduction A Coxeter group is right-angled if the entries of its Coxeter matrix are all equal to 1, 2 or ∞ (see Definition 2.1 below for more details). A right-angled building is a building for which the underlying Coxeter group is right-angled. The most prominent examples of right-angled buildings are trees. To some extent, the combinatorics of right-angled Coxeter groups and right-angled buildings behave like the combinatorics of trees, but in a more complicated and therefore in many aspects more interesting fashion. Right-angled buildings have received attention from very different perspectives. One of the earlier motivations for their study was the connection with lattices; see, for instance, [RR06, Tho06, TW11, KT12, CT13]. On the other hand, the automorphism groups of locally finite right-angled buildings are totally disconnected locally compact (t.d.l.c.) groups, and their full automorphism group was shown to be an abstractly simple group by Pierre-Emmanuel Caprace in [Cap14], making these groups valuable in the 1 study of t.d.l.c. groups. Caprace’s work also highlighted important combinatorial aspects of right-angled buildings; in particular, his study of parallel residues and his notion of wings (see Definition 3.6 below) are fundamental tools. From this point of view, we have, in a joint work with Koen Struyve, introduced and investigated universal groups for right-angled buildings; see [DMSS16]. More recently, Andreas Baudisch, Amador MartinPizarro and Martin Ziegler have studied right-angled buildings from a modeltheoretic point of view; see [BMPZ17]. In this paper, we continue the study of right-angled buildings in a combinatorial and topological fashion. In particular, we introduce some new tools in right-angled Coxeter groups and we study the (full) automorphism group of right-angled buildings. Our main goal is to characterize the proper open subgroups of the automorphism group of a locally finite semi-regular right-angled building as the closed finite index subgroups of the stabilizer of a proper residue; see Theorem 4.29 below. The first tool we introduce is the notion of firm elements in a rightangled Coxeter group: these are the elements with the property that every possible reduced representation of that element ends with the same letter (see Definition 2.10 below), i.e., the last letter cannot be moved away by elementary operations. If an element of the Coxeter group is not firm, then we define its firmness as the maximal length of a firm prefix. This notion will be used to define the concepts of firm chambers in a right-angled building and of n-flexibility of chambers with respect to another chamber; this then leads to the notion of the n-flex of a given chamber. See Definition 3.9 below. A second new tool is the concept of a root wing group, which we define in Definition 4.6. Strictly speaking, this is not a new definition since the root wing groups are defined as wing fixators, and as such they already appear in the work of Caprace [Cap14]. However, we associate such a group to a root in an apartment of the building, and we explore the fact that they behave very much like root subgroups in groups of a more algebraic nature, such as automorphism groups of Moufang spherical buildings or Kac–Moody groups. Outline of the paper. In Section 2, we provide the necessary tools for right-angled Coxeter groups. In Section 2.1, we recall the notion of a poset ≺w that we can associate to any word w in the generators, introduced in [DMSS16]. Section 2.2 introduces the concepts of firm elements and the firmness of elements in a right-angled Coxeter group. Our main result in that section is the fact that long elements cannot have a very low firmness; see Theorem 2.18. Section 3 collects combinatorial facts about right-angled buildings. After recalling the important notions of parallel residues and wings, due to 2 Caprace [Cap14], in Section 3.1, we proceed in Section 3.2 to introduce the notion of chambers that are n-flexible with respect to another chamber and the notion of the square closure of a set of chambers (which is based on results from [DMSS16]); see Definitions 3.9 and 3.12. Our main result in Section 3 is Theorem 3.13, showing that the square closure of a ball of radius n around a chamber c0 is precisely the set of chambers that are n-flexible with respect to c0 . In Section 4, we study the automorphism group of a semi-regular rightangled building. We begin with a short Section 4.1 that uses the results of the previous sections to show that the set of chambers fixed by a ball fixator is bounded; see Theorem 4.4. In Section 4.2, we associate a root wing group Uα to each root (Definition 4.6), we show that Uα acts transitively on the set of apartments through α (Proposition 4.7) and we adopt some facts from [CM13] to the setting of root wing groups. We then continue towards our characterization of the open subgroups of the full automorphism group of a semi-regular locally finite right-angled building. Our final result is Theorem 4.29 showing that every proper open subgroup is a finite index subgroup of the stabilizer of a proper residue. We distinguish between the case where the open subgroup is compact (Section 4.3) and non-compact (Section 4.4). In the compact case, we provide a characterization that remains valid for right-angled buildings that are not locally finite, and we use our knowledge about the fixed-point set of ball fixators; see Proposition 4.15. In the non-compact case, we have to restrict to locally finite buildings. We follow, to a very large extent, the strategy taken by Pierre-Emmanuel Caprace and Timothée Marquis in [CM13] in their study of open subgroups of Kac–Moody groups over finite fields; in particular, we show that an open subgroup of Aut(∆) contains sufficiently many root wing groups, and much of the subtleties of the proof go into determining precisely the types of the root groups contained in the open subgroup, which will then, in turn, pin down the residue, the stabilizer of which contains the given open subgroup as a finite index subgroup. In the final Section 5, we mention two applications of our main theorem. The first is a rather immediate corollary, namely the fact that the automorphism group of a semi-regular locally finite right-angled building is a Noetherian group; see Proposition 5.3. The second application shows that every open subgroup of the automorphism group is the reduced envelope of a cyclic subgroup; see Proposition 5.6. Acknowledgments. This paper would never have existed without the help of Pierre-Emmanuel Caprace. Not only did he suggest the study of open subgroups of the automorphism group of right-angled buildings to us; we also benefited a lot from discussions with him. We also thank the Research Foundation in Flanders (F.W.O.-Vlaanderen) 3 for their support through the project “Automorphism groups of locally finite trees” (G011012N). 2 Right-angled Coxeter groups We begin by recalling some basic definitions and facts about Coxeter groups. Definition 2.1. (i) A Coxeter group is a group W with generating set S = {s1 , . . . , sn } and with presentation W = hs ∈ S | (st)mst = 1i where mss = 1 for all s ∈ S and mst = mts ≥ 2 for all i 6= j. It is allowed that mst = ∞, in which case the relation involving st is omitted. The pair (W, S) is called a Coxeter system of rank n. The matrix M = (msi sj ) is called the Coxeter matrix of (W, S). The Coxeter matrix is often conveniently encoded by its Coxeter diagram, which is a labeled graph with vertex set S where two vertices are joined by an edge labeled mst if and only if mst ≥ 3. (ii) A Coxeter system (W, S) is called right-angled if all entries of the Coxeter matrix are 1, 2 or ∞. In this case, we call the Coxeter diagram Σ of W a right-angled Coxeter diagram; all its edges have label ∞. Definition 2.2. Let (W, S) be a Coxeter system and let J ⊆ S. (i) We define WJ := hs | s ∈ Ji ≤ W and we call this a standard parabolic subgroup of W . It is itself a Coxeter group, with Coxeter system (WJ , J). Any conjugate of a standard parabolic subgroup WJ is called a parabolic subgroup of W . (ii) The subset J ⊆ S is called a spherical subset if WJ is finite. When (W, S) is right-angled, J is spherical if and only if |st| ≤ 2 for all s, t ∈ J. (iii) The subset J ⊆ S is called essential if each irreducible component of J is non-spherical. In general, the union J0 of all irreducible nonspherical components of J is called the essential component of J. If P is a parabolic subgroup of W conjugate to some WJ , then the essential component P0 of P is the corresponding conjugate of WJ0 , where J0 is the essential component of J. Observe that P0 has finite index in P . (iv) Let E ⊆ W . We define the parabolic closure of E, denoted by Pc(E), as the smallest parabolic subgroup of W containing E. Lemma 2.3 ([CM13, Lemma 2.4]). Let H1 ≤ H2 be subgroups of W . If H1 has finite index in H2 , then Pc(H1 ) has finite index in Pc(H2 ). 4 2.1 A poset of reduced words Let Σ = (W, S) be a right-angled Coxeter system and let MS be the free monoid over S, the elements of which we refer to as words. Notice that there is an obvious map MS → W denoted by w 7→ w; if w ∈ MS is a word, then its image w under this map is called the element represented by w, and the word w is called a representation of w. For w1 , w2 ∈ MS , we write w1 ∼ w2 when w1 = w2 . By some slight abuse of notation, we also say that w2 is a representation of w1 (rather than a representation of w1 ). Definition 2.4. A Σ-elementary operation on a word w ∈ MS is an operation of one of the following two types: (1) Delete a subword of the form ss, with s ∈ S. (2) Replace a subword st by ts if mst = 2. A word w ∈ MS is called reduced (with respect to Σ) if it cannot be shortened by a sequence of Σ-elementary operations. Clearly, applying elementary operations on a word w does not alter its value in W . Conversely, if w1 ∼ w2 for two words w1 , w2 ∈ MS , then w1 can be transformed into w2 by a sequence of Σ-elementary operations. The number of letters in a reduced representation of w ∈ W is called the length of w and is denoted by l(w). Tits proved in [Tit69] (for arbitrary Coxeter systems) that two reduced words represent the same element of W if and only if one can be obtained from the other by a sequence of elementary operations of type (2) (or rather its generalization to all values for mst ). Definition 2.5. Let w = s1 s2 · · · sℓ ∈ MS . If σ ∈ Sym(ℓ), then we let σ.w be the word obtained by permuting the letters in w according to the permutation σ, i.e., σ.w := sσ(1) sσ(2) · · · sσ(ℓ) . In particular, if w′ is obtained from w by applying an elementary operation of type (2) replacing si si+1 by si+1 si , then σ.w = w′ for σ = (i i+ 1) ∈ Sym(ℓ). In this case, si and si+1 commute and we call σ = (i i + 1) a w-elementary transposition. In this way, we can associate an elementary transposition to each Σ-elementary operation of type (2). It follows that two reduced words w and w′ represent the same element of W if and only if w′ = (σn · · · σ1 ).w, where each σi is a (σi−1 · · · σ1 ).w-elementary transposition, i.e., if w′ is obtained from w by a sequence of elementary transpositions. 5 Definition 2.6. If w ∈ MS is a reduced word of length ℓ, then we define Rep(w) := {σ ∈ Sym(ℓ) | σ = σn · · · σ1 , where each σi is a (σi−1 · · · σ1 ).w-elementary transposition}. In other words, the set Rep(w) consists of the permutations of ℓ letters which give rise to reduced representations of w. We now define a partial order ≺w on the letters of a reduced word w in MS with respect to Σ. Definition 2.7 ([DMSS16, Definition 2.6]). Let w = s1 · · · sℓ be a reduced word of length ℓ in MS and let Iw = {1, . . . , ℓ}. We define a partial order “≺w ” on Iw as follows: i ≺w j ⇐⇒ σ(i) > σ(j) for all σ ∈ Rep(w). Note that i ≺w j implies that i > j. As a mnemonic, one can regard j ≻w i as “j → i”, i.e., the generator si comes always after the generator sj regardless of the reduced representation of w. We point out a couple of basic but enlightening consequences of the definition of this partial order. Observation 2.8. Let w = s1 · · · si · · · sj · · · sℓ be a reduced word in MS with respect to a right-angled Coxeter diagram Σ. (i) If |si sj | = ∞, then i ≻w j. The converse is not true. Indeed, suppose there is i < k < j such that |si sk | = ∞ and |sk sj | = ∞. Then i ≻w j, independently of whether |si sj | = 2 or ∞. (ii) If i 6≻w j, then by (i), it follows that |si sj | = 2 and, moreover, for each k ∈ {i + 1, . . . , j − 1}, either |si sk | = 2 or |sk sj | = 2 (or both). (iii) On the other hand, if sj and sj+1 are consecutive letters in w, then |sj sj+1 | = ∞ if and only if j ≻w j + 1. Lemma 2.9 ([DMSS16, Lemma 2.8]). Let w = w1 · si · · · sj · w2 ∈ MS be a reduced word. If i 6≻w j, then there exist two reduced representations of w of the form w1 · · · si sj · · · w2 and w1 · · · sj si · · · w2 , i.e., the positions of si and sj can be exchanged using only elementary operations on the generators {si , si+1 , . . . , sj−1 , sj }, without changing the prefix w1 and the suffix w2 . 6 2.2 Firm elements of right-angled Coxeter groups In this section we define firm elements in a right-angled Coxeter group W and we introduce the concept of firmness to measure “how firm” an arbitrary elements of W is. This concept will be used over and over throughout the paper. See, in particular, Definition 3.9, Theorem 3.13, Theorem 4.4 and Proposition 4.7. Our main result in this section is Theorem 2.18, showing that the firmness of elements cannot drop below a certain value once they become sufficiently long. Definition 2.10. Let w ∈ W be represented by some reduced word w = s1 · · · sℓ ∈ MS . (i) We say that w is firm if i ≻w ℓ for all i ∈ {1, . . . , ℓ−1}. In other words, w is firm if its final letter sℓ is in the final position in each possible reduced representation of w. Equivalently, w is firm if and only if there is a unique r ∈ S such that l(wr) < l(w). (ii) Let F # (w) be the largest k such that w can be represented by a reduced word in the form s1 · · · sk tk+1 · · · tℓ , with s1 · · · sk firm. We call F # (w) the firmness of w. We will also use the notation F # (w) := F # (w). Lemma 2.11. Let w = s1 · · · sk tk+1 · · · tℓ be a reduced word such that s1 · · · sk is firm and F # (w) = k. Then (i) |sk ti | = 2 for all i ∈ {k + 1, . . . , ℓ}. (ii) i ≻w k for all i ∈ {1, . . . , k − 1}. (iii) Let r ∈ S. If l(wr) > l(w), then F # (wr) ≥ F # (w). Proof. (i) Assume the contrary and let j be minimal such that |sk tj | = ∞. Using elementary operations to swap tj to the left in w as much as possible, we rewrite w ∼ s1 · · · sk t′1 · · · t′p tj · · · as a word with s1 · · · sk t′1 · · · t′p tj firm, which is a contradiction to the maximality of k. (ii) The fact that the prefix p = s1 · · · sk is firm tells us that i ≻p k for all i ∈ {1, . . . , k − 1}. By Lemma 2.9, this implies that also i ≻w k for all i ∈ {1, . . . , k − 1}. (iii) Since l(wr) > l(w), firm prefixes of w are also firm prefixes of wr, hence the result. 7 The following definition will be a useful tool to identify which letters of the word appear in a firm subword. Definition 2.12. Let w = s1 · · · sℓ ∈ MS be a reduced word and consider the poset (Iw , ≺w ) as in Definition 2.7. For any i ∈ {1, . . . , ℓ}, we define Iw (i) = j ∈ {1, . . . , ℓ} | j ≻w i .  In words, Iw (i) is the set of indices j such that sj comes at the left of si in any reduced representation of the element w ∈ W . Observation 2.13. Let w = s1 · · · sℓ ∈ MS be a reduced word. (i) Let i ∈ {1, . . . , ℓ} and write Iw (i) = {j1 , . . . , jk } with jp < jp+1 for all p. Then we can perform elementary operations on w so that w ∼ s j 1 · · · s j k s i t1 · · · tq and the word sj1 · · · sjk si is firm. In particular, if Iw (i) = ∅, then we can rewrite w as si w1 . (ii) If i ≻w j, then Iw (i) ( Iw (j). (iii) It follows from (i) that F # (w) = maxi∈{1,...,ℓ} |Iw (i)| + 1. Remark 2.14. If the Coxeter system (W, S) is spherical, then F # (w) = 1 for all w ∈ W . Indeed, as each pair of distinct generators commute, we always have Iw (i) = ∅. The next definition will allow us to deal with possibly infinite words. Definition 2.15. (i) A (finite or infinite) sequence (r1 , r2 , . . . ) of letters in S will be called a reduced increasing sequence if l(r1 · · · ri ) < l(r1 · · · ri ri+1 ) for all i ≥ 1. (ii) Let w ∈ MS . A sequence (r1 , r2 , . . . ) of letters in S will be called a reduced increasing w-sequence if l(wr1 · · · ri ) < l(wr1 · · · ri ri+1 ) for all i ≥ 0. Lemma 2.16. Let α = (r1 , r2 , . . . ) be a reduced increasing sequence in S. Assume that each subsequence of α of the form (ra1 , ra2 , . . . ) with |rai rai+1 | = ∞ for all i has ≤ b elements. Then there is some positive integer f (b) depending only on b and on the Coxeter system (W, S), such that α has ≤ f (b) elements. 8 Proof. We will prove this result by induction on |S|; the case |S| = 1 is trivial. Suppose now that |S| ≥ 2. If (W, S) is a spherical Coxeter group, then the result is obvious since the length of any reduced increasing sequence is bounded by the length of the longest element of W . We may thus assume that there is some s ∈ S that does not commute with some other generator in S \ {s}. Since the sequence α is a reduced increasing sequence, we know that between any two s’s, there must be some ti such that |sti | = ∞. Consider the subsequence of α given by (s, t1 , s, t2 , . . . ). This subsequence has ≤ b elements by assumption, and between any two generators s in the original sequence α, we only use letters in S \ {s}. The result now follows from the induction hypothesis. Lemma 2.17. Let w ∈ W . Then there is some k(w) ∈ N, depending only on w, such that for every reduced increasing w-sequence (r1 , r2 , . . . ) in S, we have F # (wr1 · · · rk(w) ) > F # (w). Proof. Assume that there is a reduced increasing w-sequence α = (r1 , r2 , . . . ) in S such that F # (wr1 · · · ri ) = F # (w) for all i. (∗) Let w0 = w, wi = wi−1 ri and denote Ii = Iwi (i) for all i. Let b = F # (w). By assumption (∗) and Observation 2.13(iii), we have |Ii | ≤ b − 1 for all i. Moreover, if i < j with |ri rj | = ∞, then Ii ( Ij by Observations 2.8(i) and 2.13(ii); it follows that each subsequence of α of the form (ra1 , ra2 , . . . ) with |rai rai+1 | = ∞ for all i has at most b elements. By Lemma 2.16, this implies that the sequence α has at most f (b) elements. We conclude that every reduced increasing w-sequence (r1 , r2 , . . . , rk(w) ) in S with k(w) := f (F # (w)) + 1 must have strictly increasing firmness. Theorem 2.18. Let (W, S) be a right-angled Coxeter system. For all n ≥ 0, there is some d(n) ∈ N depending only on n, such that F # (w) > n for all w ∈ W with l(w) > d(n). Proof. This follows by induction on n from Lemma 2.17 since there are only finitely many elements in W of any given length. 9 3 Right-angled buildings We will start by recalling the procedure of “closing squares” in right-angled buildings from [DMSS16] and we define the square closure of a set of chambers. Our goal in this section is to describe the square closure of a ball in the building and to show that this is a bounded set, i.e., it has finite diameter; see Theorem 3.13. 3.1 Preliminaries Throughout this section, let (W, S) be a right-angled Coxeter system with Coxeter diagram Σ and let ∆ be a right-angled building of type (W, S). We regard buildings as chamber systems, following the notation in [Wei09]. Definition 3.1. Let δ : ∆×∆ → W be the Weyl distance of the building ∆. The gallery distance between the chambers c1 and c2 is defined as dW (c1 , c2 ) := l(δ(c1 , c2 )), i.e., the length of a minimal gallery between the chambers c1 and c2 . For a fixed chamber c0 ∈ Ch(∆) we define the spheres at a fixed gallery distance from c0 as S(c0 , n) := {c ∈ Ch(∆) | dW (c0 , c) = n} and the balls as B(c0 , n) := {c ∈ Ch(∆) | dW (c0 , c) ≤ n}. Definition 3.2. (i) Let c be a chamber in ∆ and R be a residue in ∆. The projection of c on R is the unique chamber in R that is closest to c and it is denoted by projR (c). (ii) If R1 and R2 are two residues, then the set of chambers projR1 (R2 ) := {projR1 (c) | c ∈ Ch(R2 )} is again a residue and the rank of projR1 (R2 ) is bounded above by the ranks of both R1 and R2 ; see [Cap14, Section 2]. (iii) The residues R1 and R2 are called parallel if projR1 (R2 ) = R1 and projR2 (R1 ) = R2 . In particular, if P1 and P2 are two parallel panels, then the chamber sets of P1 and P2 are mutually in bijection under the respective projection maps (see again [Cap14, Section 2]). 10 Definition 3.3. Let J ⊆ S. We define the set J ⊥ = {t ∈ S \ J | ts = st for all s ∈ J}. If J = {s}, then we write the set J ⊥ as s⊥ . Proposition 3.4 ([Cap14, Proposition 2.8]). Let ∆ be a right-angled building of type (W, S). (i) Any two parallel residues have the same type. (ii) Let J ⊆ S. Given a residue R of type J, a residue R′ is parallel to R if and only if R′ is of type J, and R and R′ are both contained in a common residue of type J ∪ J ⊥ . Proposition 3.5 ([Cap14, Corollary 2.9]). Let ∆ be a right-angled building. Parallelism of residues of ∆ is an equivalence relation. Another very important notion in right-angled buildings is that of wings, introduced in [Cap14, Section 3]. For our purposes, it will be sufficient to consider wings with respect to panels. Definition 3.6. Let c ∈ Ch(∆) and s ∈ S. Denote the unique s-panel containing c by Ps,c . Then the set of chambers Xs (c) = {x ∈ Ch(∆) | projPs,c (x) = c} is called the s-wing of c. Notice that if P is any s-panel, then the set of s-wings of each of the different chambers of P forms a partition of Ch(∆) into equally many combinatorially convex subsets (see [Cap14, Proposition 3.2]). 3.2 Sets of chambers closed under squares We start by presenting two results proved in [DMSS16, Lemmas 2.9 and 2.10] that can be used in right-angled buildings to modify minimal galleries using the commutation relations of the Coxeter group. We will refer to these results as the “Closing Squares Lemmas” (see also Figure 1 below). We s use the notation c1 ∼ c2 to denote that two chambers c1 and c2 of ∆ are s-adjacent, i.e., are contained in a common s-panel of ∆. Lemma 3.7 (Closing Squares 1). Let c0 be a fixed chamber in ∆. Let c1 , c2 ∈ S(c0 , n) and c3 ∈ S(c0 , n + 1) such that t c1 ∼ c3 and s c2 ∼ c3 for some s 6= t. Then |st| = 2 in Σ and there exists c4 ∈ S(c0 , n − 1) such that s t c1 ∼ c4 and c2 ∼ c4 . 11 Lemma 3.8 (Closing Squares 2). Let c0 be a fixed chamber in ∆. Let c1 , c2 ∈ S(c0 , n) and c3 ∈ S(c0 , n − 1) such that s c1 ∼ c2 and t c2 ∼ c3 for some s 6= t. Then |st| = 2 in Σ and there exists c4 ∈ S(c0 , n − 1) such that t s c1 ∼ c4 and c3 ∼ c4 . c3 t n+1 c1 s c1 c2 s n n t t t c4 n−1 c4 .. . c2 s s .. . c3 n−1 c0 c0 (a) Lemma 3.7 (b) Lemma 3.8 Figure 1: Closing Squares Lemmas Definition 3.9. Let c0 be a fixed chamber of ∆ and let n ∈ N. (i) Let c ∈ Ch(∆). Then we call c firm with respect to c0 if and only if δ(c0 , c) ∈ W is firm (as in Definition 2.10(i)). (ii) We will create a partition of the sphere S(c0 , n) by defining A1 (n) = {c ∈ S(c0 , n) | c is firm}, A2 (n) = {c ∈ S(c0 , n) | c is not firm}, as in Figure 2. Notice that this is equivalent to the definition given in [DMSS16, Definition 4.3]. (iii) Let c ∈ S(c0 , k) for some k > n. We say that c is n-flexible with respect to c0 if for each minimal gallery γ = (c0 , c1 , . . . , cn+1 , . . . , ck = c) from c0 to c, none of the chambers cn+1 , . . . , ck is firm. By convention, all chambers of B(c0 , n) are also n-flexible with respect to c0 . Observe that a chamber c is n-flexible with respect to c0 if and only if F # (δ(c0 , c)) ≤ n. In particular, if c is n-flexible, then so is any chamber on any minimal gallery between c0 and c. (iv) We define the n-flex of c0 , denoted by Flex(c0 , n), to be the set of all chambers of ∆ that are n-flexible with respect to c0 . 12 n+1 t t t t c1 c2 t c2 c1 t n c3 t s s s s s t c3 s n t n−1 n−1 .. . .. . c0 c0 (a) ci firm: for all t 6= s, l(δ(c0 , ci )t) > l(δ(c0 , ci )). (b) ci not firm: for some t 6= s, l(δ(c0 , ci )t) < l(δ(c0 , ci )). Figure 2: Partition of S(c0 , n). We also record the following result, which we rephrased in terms of firm chambers; its Corollary 3.11 will be used several times in Section 4. Lemma 3.10 ([DMSS16, Lemma 2.15]). Let c0 be a fixed chamber of ∆ and let s ∈ S. Let d ∈ S(c0 , n) and e ∈ B(c0 , n + 1) \ Ch(Ps,d ). If c := projPs,d (e) ∈ S(c0 , n + 1), then c is not firm with respect to c0 . Corollary 3.11. Let c0 ∈ Ch(∆) and c ∈ S(c0 , n + 1) such that c is firm with respect to c0 . Let d be the unique chamber of S(c0 , n) adjacent to c and let s = δ(d, c) ∈ S. Then B(c0 , n) ⊂ Xs (d). Proof. Let e ∈ B(c0 , n). If e = d, then of course e ∈ Xs (d), so assume e 6= d; then e ∈ B(c0 , n + 1) \ Ch(Ps,d ). Notice that all chambers of Ps,d \ {d} have the same Weyl distance from c0 as c and hence are firm. By Lemma 3.10, this implies that the projection of e on Ps,d must be equal to d, so by definition of the s-wing Xs (d), we get e ∈ Xs (d). We now come to the concept of the square closure of a set of chambers of ∆. Definition 3.12. (i) We say that a subset T ⊆ W is closed under squares if the following holds: If wsi and wsj are contained in T for some w ∈ T with |si sj | = 2, si 6= sj and l(wsi ) = l(wsj ) = l(w) + 1, then also wsi sj = wsj si is an element of T . (ii) Let c0 be a fixed chamber of ∆. A set of chambers C ⊆ Ch(∆) is closed under squares with respect to c0 if for each n ∈ N, the following holds (see Figure 1a): 13 If c1 , c2 ∈ C ∩ S(c0 , n) and c4 ∈ C ∩ S(c0 , n − 1) such that sj s c4 ∼i c1 and c4 ∼ c2 for some |si sj | = 2 with si 6= sj , then sj the unique chamber c3 ∈ S(c0 , n + 1) such that c3 ∼ c1 and s c3 ∼i c2 is also in C . In particular, if C is closed under squares with respect to c0 , then the set of Weyl distances {δ(c0 , c) | c ∈ C } ⊆ W is closed under squares. (iii) Let c0 ∈ Ch(∆) and let C ⊆ Ch(∆). We define the square closure of C with respect to c0 to be the smallest subset of Ch(∆) containing C and closed under squares with respect to c0 . Theorem 3.13. Let c0 ∈ Ch(∆) and let n ∈ N. The square closure of B(c0 , n) with respect to c0 is Flex(c0 , n). Moreover, the set Flex(c0 , n) is bounded. Proof. We will first show that Flex(c0 , n) is indeed closed under squares. Let c3 be a chamber in Flex(c0 , n) at Weyl distance w from c0 and let c1 and c2 be chambers in Flex(c0 , n) adjacent to c3 , at Weyl distance wsi and wsj from c0 , respectively, such that |si sj | = 2 and l(wsi ) = l(wsj ) = l(w) + 1. Let c3 be the unique chamber at Weyl distance wsi sj from c0 that is sj -adjacent to c1 and si -adjacent to c2 . c3 = vk si sj sk vk−1 c2 si sk c1 sj d2 si sj l(w) + 1 sk vk−2 d1 l(w) vk−3 l(w) − 1 vn+1 n vn c0 = v0 Figure 3: Proof of Theorem 3.13 Our aim is to show that also c3 is an element of Flex(c0 , n). If l(wsi sj ) ≤ n, then this is obvious, so we may assume that l(wsi sj ) > n. 14 Let γ = (c0 = v0 , . . . , vn+1 , . . . , vk = c3 ) be an arbitrary minimal gallery between c0 and c3 , as in Figure 3 (so k = l(w) + 2 > n). We have to show that none of the chambers vn+1 , . . . , vk is firm with respect to c0 . This is clear for vk = c3 . If k = n + 1, then there is nothing left to show, so assume k ≥ n + 2. If vk−1 ∈ {c1 , c2 }, then vk−1 is n-flexible by assumption, and since k − 1 > n it is not firm. (In fact, this shows immediately that in this case, none of the chambers vn+1 , . . . , vk−1 is firm). So assume that vk−1 is distinct from c1 and c2 ; then vk−1 is sk -adjacent to c3 for some sk different from si and sj . Then by closing squares (Lemma 3.7), we have |sj sk | = 2 and there is a sj s chamber d1 ∈ S(c0 , l(w)) such that d1 ∼ vk−1 and d1 ∼k c1 . Similarly, there s s is a chamber d2 ∈ S(c0 , l(w)) such that d2 ∼i vk−1 and d2 ∼k c2 . Hence vk−1 is not firm with respect to c0 . Continuing this argument inductively (see Figure 3), we conclude that none of the chambers vn+1 , . . . , vk is firm with respect to c0 . Hence c3 is n-flexible; we conclude that Flex(c0 , n) is closed under squares with respect to c0 . Conversely, let C be a set of chambers closed under squares that contains B(c0 , n); we have to prove that Flex(c0 , n) ⊆ C . So let c ∈ Flex(c0 , n) be arbitrary; we will show by induction on k := dW (c0 , c) that c ∈ C . This is obvious for k ≤ n, so assume k > n. Then c is not firm, hence there exist s s c1 , c2 ∈ S(c0 , k − 1) such that c1 ∼1 c and c2 ∼2 c for some s1 6= s2 ∈ S. By s Lemma 3.7 we have |s1 s2 | = 2 and there is d ∈ S(c0 , k − 2) such that d ∼2 c1 s1 and d ∼ c2 . Since c is n-flexible and c1 , c2 and d all lie on some minimal gallery between c0 and c, it follows that also c1 , c2 and d are n-flexible. By the induction hypothesis, all three elements are contained in C . Since C is assumed to be closed under squares, however, we immediately deduce that also c ∈ C . We conclude that Flex(c0 , n) is the square closure of B(c0 , n) with respect to c0 . We finally show that Flex(c0 , n) is a bounded set. Recall that a chamber c is contained in Flex(c0 , n) if and only if F # (δ(c0 , c)) ≤ n. By Theorem 2.18, there is a constant d(n) such that F # (w) > n for all w ∈ W with l(w) > d(n). This shows that Flex(c0 , n) ⊆ B(c0 , d(n)) is indeed bounded. 4 The automorphism group of a right-angled building In this section, we study the group Aut(∆) of type-preserving automorphisms of a thick semi-regular right-angled building ∆. We will first study the action of a ball fixator and introduce root wing groups. Next, we will 15 characterize the compact open subgroups of Aut(∆). Finally, when the building is locally finite, we will show that any proper open subgroup of Aut(∆) is a finite index subgroup of the stabilizer of a proper residue; see Theorem 4.29. Definition 4.1. Let ∆ be a right-angled building of type (W, S). Then ∆ is called semi-regular if for each s, all s-panels of ∆ have the same number qs of chambers. In this case, the building is said to have prescribed thickness (qs )s∈S in its panels. By [HP03, Proposition 1.2], there is a unique right-angled building of type (W, S) of prescribed thickness (qs )s∈S for any choice of cardinal numbers qs ≥ 1. Theorem 4.2 ([KT12, Theorem B], [Cap14, Theorem 1.1]). Let ∆ be a thick semi-regular building of right-angled type (W, S). Assume that (W, S) is irreducible and non-spherical. Then the group Aut(∆) of type-preserving automorphisms of ∆ is abstractly simple and acts strongly transitively on ∆. The strong transitivity has first been shown by Angela Kubena and Anne Thomas [KT12] and has been reproved by Pierre-Emmanuel Caprace in the same paper where he proved the simplicity [Cap14]. In our proof of Proposition 4.7 below, we will adapt Caprace’s proof of the strong transitivity to a more specific setting. The following extension result is very powerful and will be used in the proof of Theorem 4.4 below. Proposition 4.3 ([Cap14, Proposition 4.2]). Let ∆ be a semi-regular rightangled building. Let s ∈ S and P be an s-panel. Given any permutation θ ∈ Sym(Ch(P)), there is some g ∈ Aut(∆) stabilizing P satisfying the following two conditions: (a) g|Ch(P) = θ; (b) g fixes all chambers of ∆ whose projection on P is fixed by θ. 4.1 The action of the fixator of a ball in ∆ In this section we study the action of the fixator K in Aut(∆) of a ball B(c0 , n) of radius n around a chamber c0 . Our goal will be to prove that the fixed point set ∆K coincides with the square closure of the ball B(c0 , n) with respect to c0 , which is Flex(c0 , n), and which we know is bounded by Theorem 3.13. Theorem 4.4. Let ∆ be a thick semi-regular right-angled building. Let c0 be a fixed chamber of ∆ and let n ∈ N. Consider the pointwise stabilizer K = FixAut(∆) (B(c0 , n)) in Aut(∆) of the ball B(c0 , n). Then the fixed-point set ∆K is equal to the bounded set Flex(c0 , n). 16 Proof. Recall from Theorem 3.13 that Flex(c0 , n) is precisely the square closure of B(c0 , n) with respect to c0 . First, notice that the fixed point set of any automorphism fixing c0 is square closed with respect to c0 because the chamber “closing the square” is unique (see Definition 3.12(ii)). It immediately follows that Flex(c0 , n) ⊆ ∆K . We will now show that if c is a chamber not in Flex(c0 , n), then there exists a g ∈ K not fixing c. Since c is not n-flexible, there exists a chamber d on some minimal gallery between c0 and c with k := dW (c0 , d) > n such that d is firm. Notice that any automorphism fixing c0 and c fixes every chamber on any minimal gallery between c0 and c, so it suffices to show that there exists a g ∈ K not fixing d. s Since d is firm, there is a unique chamber e ∈ S(c0 , k − 1) such that e ∼ d for some s ∈ S. By Corollary 3.11, B(c0 , n) ⊆ Xs (e), where Xs (e) is the s-wing of ∆ corresponding to e. Now take any permutation θ of Ps,e fixing e and mapping d to some third chamber d′′ different from d and e (which exists because ∆ is thick). By Proposition 4.3, there is an element g ∈ Aut(∆) fixing Xs (e) and mapping d to d′′ . In particular, g belongs to K and does not fix d, as required. We conclude that ∆K = Flex(c0 , n). The fact that this set is bounded was shown in Theorem 3.13. 4.2 Root wing groups In this section we define groups that resemble root groups, using the partition of the chambers of a right-angled building by wings; we call these groups root wing groups. We show that a root wing group acts transitively on the set of apartments of ∆ containing the given root. We also prove that the root wing groups corresponding to roots disjoint from a ball B(c0 , n) are contained in the fixator of that ball in the automorphism group. We first fix some notation for the rest of this section. Notation 4.5. (i) Fix a chamber c0 ∈ Ch(∆) and an apartment A0 containing c0 (which can be considered as the fundamental chamber and the fundamental apartment). Let Φ denote the set of roots of A0 . For each α ∈ Φ, we write −α for the root opposite α in A0 . (ii) We will write A0 for the set of all apartments containing c0 . For any A ∈ A0 , we will denote its set of roots by ΦA . (iii) For any k ∈ N, we write Kr := FixAut(∆) (B(c0 , r)). Definition 4.6. (i) When α ∈ ΦA is a root in an apartment A, its wall ∂α consists of the panels of ∆ having chambers in both α and −α. Since the building is right-angled, these panels all have the same type 17 s ∈ S, which we refer to as the type of α and write as type(α) = s. Notice that the s-wings of A are precisely the roots of A of type s. (ii) Let α ∈ ΦA of type s and let c ∈ α be such that Ps,c ∈ ∂α. Then we define the root wing group Uα as Uα := Us (c) := FixAut(∆) (Xs (c)). Observe that Uα does not depend of the choice of the chamber c as all panels in the wall ∂α are parallel (see Definition 3.2(iii)) and hence determine the same s-wings in ∆. The fact that these groups behave, to some extent, like root groups in Moufang spherical buildings or Moufang twin buildings, is illustrated by the following fact. Proposition 4.7. Let α ∈ ΦA be a root. The root wing group Uα acts transitively on the set of apartments of ∆ containing α. Proof. We carefully adapt the proof of the strong transitivity of Aut(∆) from [Cap14, Proposition 6.1]. Let c be a chamber of α on the boundary and let A and A′ be two apartments of ∆ containing α. The strategy in loc. cit. (where A and A′ are arbitrary apartments containing c) is to construct an infinite sequence of automorphisms g0 , g1 , g2 , . . . such that (a) each gn fixes the ball B(c, n − 1) pointwise; (b) let An := gn gn−1 · · · g0 (A); then An ∩ A′ ⊇ B(c, n) ∩ A′ . We will show that the elements gi constructed in loc. cit. are all contained in Uα ; the result then follows because Uα is a closed subgroup of Aut(∆). To construct the element gn+1 , we consider the set E of chambers in B(c, n + 1) ∩ A′ that are not contained in An (as in loc. cit.). The crucial observation now is that by Theorem 4.4, the chambers of E are firm with respect to c. Hence, for each x ∈ E, there is a unique chamber y ∈ S(c, n) that is s-adjacent to x (for some s ∈ S). The element gn+1 constructed in loc. cit. is then contained in the group generated by the subgroups Us (y) for such pairs (y, s) corresponding to the various elements of E. However, because the elements of E are firm, the root α is contained in each root corresponding to a pair (y, s) in A′ ; [Cap14, Lemma 3.4(b)] now implies that each such group Us (y) is contained in Uα . Remark 4.8. The group Uα does not, in general, act sharply transitively on the set of apartments containing α. This is clear already in the case of trees: an automorphism fixing a half-tree and an apartment need not be trivial. Corollary 4.9. Let α ∈ ΦA be a root of type s and let c, c′ be two s-adjacent chambers of A with c ∈ α and c′ ∈ −α. Then there exists an element in hUα , U−α i stabilizing A and interchanging c and c′ . 18 Proof. Let A′ be an apartment different from A containing α (which exists because ∆ is thick) and let β be the root opposite α in A′ . By Proposition 4.7, there is some g ∈ Uα mapping −α to β. Similarly, there is some h ∈ U−α mapping β to α. Let γ := h.α; then there exists a third automorphism g′ ∈ Uα mapping γ to −α. The composition g′ hg ∈ Uα U−α Uα is the required automorphism. Next we present a property similar to the FPRS (“Fixed Points of Root Subgroups”) property introduced in [CR09] for groups with a twin root datum. It is the analogous statement of [CM13, Lemma 3.8], but in the case of right-angled buildings, we can be more explicit. Lemma 4.10. For every root α ∈ Φ with dist(c0 , α) > r, the group U−α is contained in Kr = FixAut(∆) (B(c0 , r)). Proof. Let α be a root at distance n > r from c0 and let s be the type of α. Let c = projα (c0 ) and let c′ be the other chamber in Ps,c ∩ A0 ; notice that c′ ∈ S(c0 , n − 1). We will show that B(c0 , r) ⊆ Xs (c′ ), which will then of course imply that U−α = Us (c′ ) ⊆ Kr . The chamber c is firm with respect to c0 because if c would be t-adjacent to some chamber at distance n − 1 from c0 for some t 6= s, then ∂α would contain panels of type s and of type t, which is impossible. Corollary 3.11 now implies that B(c0 , n−1) ⊆ Xs (c′ ), so in particular B(c0 , r) ⊆ Xs (c′ ). Following the idea of [CM13, Lemmas 3.9 and 3.10], we present two variations on the previous lemma that allow us to transfer the results to other apartments containing the chamber c0 . Lemma 4.11. Let g ∈ Aut(∆) and let A ∈ A0 containing the chamber d = gc0 . Let b ∈ StabAut(∆) (c0 ) such that A = bA0 , and let α = bα0 be a root of A with α0 ∈ Φ. If dist(d, −α) > r, then bUα0 b−1 ⊆ gKr g−1 . Proof. Analogous to the proof of [CM13, Lemma 3.9]. Definition 4.12 ([CM13, Section 2.4]). Let w ∈ W . (i) A root α ∈ Φ is called w-essential if wn α ( α for some n ∈ Z. (ii) A wall is called w-essential if it is the wall ∂α of some w-essential root α. Lemma 4.13. Let A ∈ A0 and let b ∈ StabAut(∆) (c0 ) such that A = bA0 . Also, let α = bα0 (with α0 ∈ Φ) be a w-essential root for some w ∈ StabAut(∆) (A)/ Fix Aut(∆) (A). Let g ∈ StabAut(∆) (A) be a representative of w. 19 Then there exists some n ∈ Z such that Uα0 ⊆ b−1 gn Kr g−n b U−α0 ⊆ b −1 −n g and n Kr g b. Proof. The proof can be copied ad verbum from [CM13, Lemma 3.10]. 4.3 Compact open subgroups of Aut(∆) We now focus on the description of open subgroups of the automorphism group of ∆. The main result of the next section will be that any proper open subgroup of the automorphism group of a locally finite thick semiregular right-angled building ∆ is contained with finite index in the setwise stabilizer in Aut(∆) of a proper residue of ∆ (see Theorem 4.29 below). We will split the proof in the cases where the open subgroup is compact and non-compact. In this section, we first deal with the (easier) compact case. Throughout this section, we assume that ∆ is a thick irreducible semiregular right-angled building (not necessarily locally finite) and we will denote the Davis realization of ∆ by X (see [Dav98]). Using the work developed in Section 4.1, we can prove that an open subgroup of Aut(∆) which is locally X-elliptic on X must be compact. Definition 4.14. A group acting continuously on a space X is called locally X-elliptic if every compactly generated subgroup of Aut(∆) fixes a point in X. Proposition 4.15. Let H be an open subgroup of Aut(∆). Then the following are equivalent: (a) H is locally X-elliptic; (b) H fixes a point of X; (c) H is a finite index subgroup of the stabilizer of a spherical residue of ∆; (d) H is compact. Proof. Notice that the points of X correspond precisely to the spherical residues of ∆ and that the maximal compact open subgroups of Aut(∆) are precisely the stabilizers of a maximal spherical residue, so the only nontrivial implication is (a) =⇒ (b). So assume that H is locally X-elliptic. We will rely on [CL10, Theorem 1.1] to show first that H has a global fixed point on X or H fixes an end of X. Notice that X has finite geometric dimension (namely equal to the highest possible rank of a spherical parabolic subgroup of (W, S)) and hence also finite telescopic dimension (see loc. cit. for these notions). For 20 each finite subset F ⊂ H, we let XF be the set of fixed points in X of hF i; then each XF is non-empty because X is locally X-elliptic, and the collection {XF } is a filtering family of closed convex subspaces of X. By [CL10, T Theorem 1.1], either the intersection XF is nonempty, or the intersection T of the boundaries ∂XF is nonempty. In the first case, H fixes a point of X; in the second case, H fixes an end of X. Assume that H fixes an end of X; we will show that H then also fixes a point of X. Since H is open, it contains the fixator of some finite ball, i.e., K := FixAut(∆) (B(c0 , n)) ⊆ H for some c0 ∈ Ch(∆) and some n ∈ N. Moreover, for each h ∈ H, the group Hh := hh, Ki is open and compactly generated. Since H is locally X-elliptic by assumption, each Hh has a global fixed point, i.e., X Hh 6= ∅. S Hence H = Hh with each Hh open and compactly generated and we can take this union to be countable because Aut(∆) is second countable. Observe that X Hh ⊆ X K for each h ∈ H. By Theorem 4.4, the fixed-point set X K is bounded. Since a countable intersection of compact bounded nonempty sets is non-empty, we conclude that X H is non-empty; hence H fixes a point of X, as claimed. 4.4 Open subgroups of Aut(∆), with ∆ locally finite We will assume from now on that ∆ is a thick irreducible semi-regular locally finite right-angled building. Consider an open subgroup H of Aut(∆) and assume that H is non-compact. Definition 4.16. We continue to use the conventions from Notation 4.5 and we will identify the apartment A0 with W . (i) Given a root α ∈ Φ, let rα denote the unique reflection of W setwise stabilizing the panels in ∂α and let Uα be the root wing group introduced in Definition 4.6. By Corollary 4.9, the reflection rα ∈ W lifts to an automorphism nα ∈ hUα , U−α i ≤ Aut(∆) stabilizing A0 . (ii) For each c ∈ Ch(∆) and each subset J ⊆ S, we write RJ,c for the residue of ∆ of type J containing c. We use the shorter notation RJ := RJ,c0 when c = c0 . Moreover, we write PJ := StabAut(∆) (RJ ), and we call this a standard parabolic subgroup of Aut(∆). Any conjugate of PJ , i.e., any stabilizer of an arbitrary residue, is then called a parabolic subgroup. (iii) Let J ⊆ S be minimal such that there is a g ∈ Aut(∆) such that H ∩ g−1 PJ g has finite index in H. In particular, J is essential (see Definition 2.2(iii)). See also [CM13, Lemma 3.4]. For such a g, we set H1 = gHg−1 ∩ PJ . Thus H1 stabilizes RJ and it is an open subgroup of Aut(∆) contained in gHg−1 with finite index; 21 since H is non-compact, so is H1 . Hence we may assume without loss of generality that g = 1 and hence H1 = H ∩ PJ has finite index in H. (iv) Let A0 be the set of apartments of ∆ containing c0 . For A ∈ A0 we let NA := StabH1 (A) and WA := NA / FixH1 (A), which we identify with a subgroup of W . For h ∈ NA , let h denote its image in WA ≤ W . The idea will be to prove that H1 contains a hyperbolic element h such that the chamber c0 achieves the minimal displacement of h. Moreover, we can find the element h in the stabilizer in H1 of an apartment A1 containing c0 . Thus we can identify it with an element h of W and consider its parabolic closure (see Definition 2.2(iv)). The key point will be to prove that the type of Pc(h) is J, which will be achieved in Lemma 4.24. We will also show that H1 acts transitively on the chambers of RJ ; this will allow us to conclude that any open subgroup of Aut(∆) containing H1 as a finite index subgroup is contained in the stabilizer of RJ∪J ′ for some spherical subset J ′ of J ⊥ (Proposition 4.26). This strategy is analogous (and, of course, inspired by) [CM13, Section 3]. As the arguments of loc. cit. are of a geometric nature, we will be able to adapt them to our setting. The root groups associated with the Kac–Moody group in that paper can be replaced by the root wing groups defined in Section 4.2. It should not come as a surprise that many of our proofs will simply consist of appropriate references to arguments in [CM13]. Lemma 4.17. For all A ∈ A0 , there exists a hyperbolic automorphism h ∈ NA such that Pc(h) = hrα | α is an h-essential root of Φi and is of finite index in Pc(WA ). Proof. Using the fact that the reflections rα lift to elements nα ∈ hUα , U−α i (see Definition 4.16(i)), the proof is the same as for [CM13, Lemma 3.5]. Lemma 4.18. There exists an apartment A ∈ A0 such that the orbit NA .c0 is unbounded. In particular, the parabolic closure in W of WA is nonspherical. Proof. The proofs of [CM13, Lemmas 3.6 and 3.7] continue to hold without a single change. Notice that this depends crucially on the fact that H1 is non-compact. Definition 4.19. (i) Let A1 ∈ A0 be an apartment such that the essential component of Pc(WA1 ) is non-empty and maximal with respect 22 to this property (see Definition 2.2(iii)); such an apartment exists by Lemma 4.18. Choose h1 ∈ NA1 as in Lemma 4.17. In particular, h1 is a hyperbolic element of H1 . (ii) Up to conjugating H1 by an element of StabAut(∆) (RJ ), we can assume without loss of generality that Pc(h1 ) is a standard parabolic subgroup that is non-spherical and has essential type I (6= ∅). Moreover, the type I is maximal in the following sense: if A ∈ A0 is such that Pc(WA ) contains a parabolic subgroup of essential type IA with I ⊆ IA , then I = IA . Definition 4.20. Recall that Φ is the set of roots of the apartment A0 . For each T ⊆ S, let ΦT := {α ∈ Φ | RT contains at least one panel of ∂α} and L+ T := hUα | α ∈ ΦT i, where Uα is the root wing group introduced in Definition 4.6. Our next goal is to prove that H1 contains L+ J , where J is as in Definition 4.16(iii); as we will see in Lemma 4.22 below, this fact is equivalent to H1 being transitive on the chambers of RJ . We will need the results in Section 4.2 regarding fixators of balls and root wing groups. Notation 4.21. Since H1 is open, we fix, for the rest of the section, some r ∈ N such that FixAut(∆) (B(c0 , r)) ⊆ H1 . The next lemma corresponds to [CM13, Lemma 3.11], but some care is needed because of our different definition of the groups Uα . Lemma 4.22. Let T ⊆ S be essential and let A ∈ A0 . Then the following are equivalent: (a) H1 contains L+ T; (b) H1 is transitive on RT ; (c) NA is transitive on RT ∩ A; (d) WA contains the standard parabolic subgroup WT of W . Proof. It is clear that (c) and (d) are equivalent. We first show that (a) implies (c). It suffices to show that for each chamber c1 of A that is s-adjacent to c0 for some s ∈ T , there is an element of NA mapping c0 to c1 . Let α be the root of A0 containing c0 but not the chamber c2 in A0 that is s-adjacent to c0 ; notice that Uα and U−α 23 are contained in L+ T . By Proposition 4.7, there is some g ∈ Uα fixing c0 and mapping c1 to c2 . Now the element nα ∈ hUα , U−α i stabilizes A0 and interchanges c0 and c2 ; it follows that the conjugate g−1 nα g stabilizes A and interchanges c0 and c1 , as required. The proofs of the implications (d) ⇒ (b) ⇒ (a) are exactly as in [CM13, Lemma 3.11]. The next statement is the analogue of [CM13, Lemma 3.12]. Lemma 4.23. Let A ∈ A0 . There exists IA ⊆ S such that WA contains a parabolic subgroup PIA of W of type IA as a finite index subgroup. Proof. The proof can be copied ad verbum from [CM13, Lemma 3.12]. For each A ∈ A0 , we fix such an IA ⊆ S; without loss of generality, we may assume that IA is essential. We also consider the corresponding parabolic subgroup PIA contained in WA . Observe that PIA1 has finite index in Pc(WA1 ) by Lemma 2.3, where A1 is as in Definition 4.19(i). Therefore I = IA 1 . The next task in the process of showing that H1 contains L+ J is to prove that J = I, which is achieved by the following sequence of steps, each of which follows from the previous ones and which are analogues of results in [CM13]. Lemma 4.24. Let A ∈ A0 and let I and J be as in Definition 4.19(ii) and 4.16(iii), respectively. Then: (i) H1 contains L+ I ; (ii) IA ⊂ I; (iii) WA contains WI as a subgroup of finite index; (iv) I = J. Proof. (i) This follows from the fact that I = IA1 and PI = WI ; the conclusion follows from Lemma 4.22. (ii) See [CM13, Lemma 3.14]. (iii) See [CM13, Lemma 3.15]. (iv) See [CM13, Lemma 3.16]. Corollary 4.25. The group H1 acts transitively on the chambers of RJ . Proof. This follows by combining Lemmas 4.22 and 4.24. 24 We are approaching our main result; the following proposition already shows, in particular, that H is contained in the stabilizer of a residue, and it will only require slightly more effort to show that it is a finite index subgroup of such a stabilizer. Proposition 4.26. Every subgroup of Aut(∆) containing H1 as a subgroup of finite index is contained in a stabilizer StabAut(∆) (RJ∪J ′ ), where J ′ is a spherical subset of J ⊥ . Proof. The proof is exactly the same as in [CM13, Lemma 3.19]. Notice that since ∆ is irreducible, the index set J ∪ J ′ is only equal to S if already J = S. Lemma 4.27. The group H1 is a finite index subgroup of StabAut(∆) (RJ ). Proof. Let G := StabAut(∆) (RJ ). We already know that H1 stabilizes RJ (see Definition 4.16(iii)) and acts transitively on the set of chambers of RJ (see Corollary 4.25). Notice that the stabilizer in G of a chamber of RJ is compact, hence H1 is a cocompact subgroup of G. Since H1 is also open in G, we conclude that H1 is a finite index subgroup of G. Lemma 4.28. For every spherical J ′ ⊆ J ⊥ , the index of StabAut(∆) (RJ ) in StabAut(∆) (RJ∪J ′ ) is finite. Proof. By [Cap14, Lemma 2.2], we have Ch(RJ∪J ′ ) = Ch(RJ ) × Ch(RJ ′ ). As J ′ is spherical, the chamber set Ch(RJ ′ ) is finite; the result follows. We are now ready to prove our main theorem. Theorem 4.29. Let ∆ be a thick irreducible semi-regular locally finite rightangled building of rank at least 2. Then any proper open subgroup of Aut(∆) is contained with finite index in the stabilizer in Aut(∆) of a proper residue. Proof. Let H be a proper open subgroup of Aut(∆). If H is compact, then the result follows from Proposition 4.15. So assume that H is not compact. By Definition 4.16(iii), we may assume that H contains a finite index subgroup H1 which, by Corollary 4.25, acts transitively on the chambers of some residue RJ . By Proposition 4.26, H is a subgroup of G := StabAut(∆) (RJ∪J ′ ) for some spherical J ′ ⊆ J ⊥ . On the other hand, Lemmas 4.27 and 4.28 imply that H1 is a finite index subgroup of G; since H1 is a finite index subgroup of H, it follows that also H has finite index in G. It only remains to show that RJ∪J ′ is a proper residue. If not, then G = Aut(∆), but since G is simple (Theorem 4.2) and infinite, it has no proper finite index subgroups. Since H is a proper open subgroup of G, the result follows. 25 5 Two applications of the main theorem In this last section we present two consequences of Theorem 4.29, both of which were suggested to us by Pierre-Emmanuel Caprace. The first states that the automorphism group of a locally finite thick semi-regular rightangled building ∆ is Noetherian (see Definition 5.1); the second deals with reduced envelopes in Aut(∆). Definition 5.1. We call a topological group Noetherian if it satisfies the ascending chain condition on open subgroups. We will prove that the group Aut(∆) is Noetherian by making use of the following characterization. Lemma 5.2 ([CM13, Lemma 3.22]). Let G be a locally compact group. Then G is Noetherian if and only if every open subgroup of G is compactly generated. Proposition 5.3. Let ∆ be a locally finite thick semi-regular right-angled building. Then the group Aut(∆) is Noetherian. Proof. By Lemma 5.2, we have to show that every open subgroup of Aut(∆) is compactly generated. By Theorem 4.29, every open subgroup of Aut(∆) is contained with finite index in the stabilizer of a residue of ∆. Stabilizers of residues are compactly generated, since they are generated by the stabilizer of a chamber c0 (which is a compact open subgroup) together with a choice of elements mapping c0 to each of its (finitely many) neighbors. Since a closed cocompact subgroup of a compactly generated group is itself compactly generated (see [MS59]), we conclude that indeed every open subgroup of Aut(∆) is compactly generated and hence Aut(∆) is Noetherian. Our next application deals with reduced envelopes, a notion introduced by Colin Reid in [Rei16b] in the context of arbitrary totally disconnected locally compact (t.d.l.c.) groups. Definition 5.4. (i) Two subgroups H1 and H2 of a group G are called commensurable if H1 ∩ H2 has finite index in both H1 and H2 . (ii) Let G be a totally disconnected locally compact (t.d.l.c.) group and let H ≤ G be a subgroup. An envelope of H in G is an open subgroup of G containing H. An envelope E of H is called reduced if for any open subgroup E2 with [H : H ∩ E2 ] < ∞ we have [E : E ∩ E2 ] < ∞. Not every subgroup of G has a reduced envelope, but clearly any two reduced envelopes of a given group are commensurable. 26 Theorem 5.5 ([Rei16a, Theorem B]). Let G be a t.d.l.c. group and let H be a (not necessarily closed) compactly generated subgroup of G. Then there exists a reduced envelope for H in G. We will apply Reid’s result to show the following. Proposition 5.6. Every open subgroup of Aut(∆) is commensurable with the reduced envelope of a cyclic subgroup. Proof. Let H be an open subgroup of Aut(∆) and assume without loss of generality that J ⊆ S and H1 = H ∩ StabAut(∆) (RJ ) are as in Definition 4.16(iii). Let h1 be the hyperbolic element of H1 as in Definition 4.19, so that Pc(h1 ) = WJ . By Theorem 5.5, the group hh1 i has a reduced envelope E in Aut(∆). In particular, [E : E ∩ H1 ] is finite. On the other hand, H2 := E ∩ StabAut(∆) (RJ ) is an open subgroup of G containing hh1 i, hence Lemma 4.27 applied on H2 shows that H2 is a finite index subgroup of StabAut(∆) (RJ ) for the same subset J ⊆ S, i.e., [StabAut(∆) (RJ ) : StabAut(∆) (RJ ) ∩ E] < ∞. Since also H1 has finite index in StabAut(∆) (RJ ) by Lemma 4.27 again, it follows that also [H1 : H1 ∩ E] is finite. We conclude that H1 , and hence also H, is commensurable with E, which is the reduced envelope of a cyclic subgroup. References [BMPZ17] Andreas Baudisch, Amador Martin-Pizarro, and Martin Ziegler. A model-theoretic study of right-angled buildings. J. Eur. Math. Soc. (JEMS), 19(10):3091–3141, 2017. [Cap14] Pierre-Emmanuel Caprace. Automorphism groups of right-angled buildings: simplicity and local splittings. Fund. Math., 224(1):17–51, 2014. [CL10] Pierre-Emmanuel Caprace and Alexander Lytchak. At infinity of finitedimensional CAT(0) spaces. Math. Ann., 346(1):1–21, 2010. [CM13] Pierre-Emmanuel Caprace and Timothée Marquis. Open subgroups of locally compact Kac-Moody groups. Math. Z., 274(1-2):291–313, 2013. [CR09] Pierre-Emmanuel Caprace and Bertrand Rémy. Simplicity and superrigidity of twin building lattices. Invent. Math., 176(1):169–221, 2009. [CT13] Inna Capdeboscq and Anne Thomas. Cocompact lattices in complete Kac-Moody groups with Weyl group right-angled or a free product of spherical special subgroups. Math. Res. Lett., 20(2):339–358, 2013. [Dav98] Michael W. Davis. Buildings are CAT (0). In Geometry and cohomology in group theory (Durham, 1994), volume 252 of London Math. Soc. Lecture Note Ser., pages 108–123. Cambridge Univ. Press, Cambridge, 1998. 27 [DMSS16] Tom De Medts, Ana C. Silva, and Koen Struyve. Universal groups for right-angled buildings. ArXiv e-prints, March 2016. [HP03] Frédéric Haglund and Frédéric Paulin. Constructions arborescentes d’immeubles. Math. Ann., 325(1):137–164, 2003. [KT12] Angela Kubena and Anne Thomas. Density of commensurators for uniform lattices of right-angled buildings. J. Group Theory, 15(5):565– 611, 2012. [MS59] Alexander M. Macbeath and Stanisłav Świerczkowski. On the set of generators of a subgroup. Nederl. Akad. Wetensch. Proc. Ser. A 62 = Indag. Math., 21:280–281, 1959. [Rei16a] Colin D. Reid. Distal actions on coset spaces in totally disconnected, locally compact groups. ArXiv e-prints, October 2016. [Rei16b] Colin D. Reid. Dynamics of flat actions on totally disconnected, locally compact groups. New York J. Math., 22:115–190, 2016. [RR06] Bertrand Rémy and Mark Ronan. Topological groups of Kac-Moody type, right-angled twinnings and their lattices. Comment. Math. Helv., 81(1):191–219, 2006. [Tho06] Anne Thomas. Lattices acting on right-angled buildings. Algebr. Geom. Topol., 6:1215–1238, 2006. [Tit69] Jacques Tits. Le problème des mots dans les groupes de Coxeter. In Symposia Mathematica (INDAM, Rome, 1967/68), Vol. 1, pages 175– 185. Academic Press, London, 1969. [TW11] Anne Thomas and Kevin Wortman. Infinite generation of noncocompact lattices on right-angled buildings. Algebr. Geom. Topol., 11(2):929–938, 2011. [Wei09] Richard M. Weiss. The structure of affine buildings, volume 168 of Annals of Mathematics Studies. Princeton University Press, Princeton, NJ, 2009. 28
4math.GR
1 On the Minimax Misclassification Ratio of Hypergraph Community Detection arXiv:1802.00926v1 [cs.IT] 3 Feb 2018 I (Eli) Chien, Chung-Yi Lin, and I-Hsiang Wang Abstract In this paper, community detection in hypergraphs is explored. Under a generative hypergraph model called “d-wise hypergraph stochastic block model” (d-hSBM) which naturally extends the Stochastic Block Model (SBM) from graphs to d-uniform hypergraphs, the asymptotic minimax mismatch ratio (the risk function in the community detection problem) is characterized. For proving the achievability, we propose a two-step polynomial time algorithm that provably achieves the fundamental limit. The first step of the algorithm is a hypergraph spectral clustering method which achieves partial recovery to a certain precision level. The second step is a local refinement method which leverages the underlying probabilistic model along with parameter estimation from the outcome of the first step. To characterize the asymptotic performance of the proposed algorithm, we first derive a sufficient condition for attaining weak consistency in the hypergraph spectral clustering step. Then, under the guarantee of weak consistency in the first step, we upper bound the worst-case risk attained in the local refinement step by an exponentially decaying function of the size of the hypergraph and characterize the decaying rate. Compared to the existing works in SBM, the main technical challenge lies in the complex structure of error events since community relations become much more complicated. We tackle the challenge by a series of non-trivial generalizations. To ensure the optimality of the refinement algorithm, all possible misclassification patterns among a wealth of community relations should be considered and treated with care when concentration inequalities are applied. Moreover, in proving the performance guarantee of the spectral clustering algorithm, we have to deal with random matrices whose entries are no longer independent as opposed to its graph counterpart. For proving the converse, the lower bound of the minimax mismatch ratio is set by finding a smaller parameter space which contains the most dominant error events, inspired by the analysis in the achievability part. It turns out that the minimax mismatch ratio decays exponentially fast to zero as the number of nodes tends to infinity, and the rate function is a weighted combination of several divergence terms, each of which is the Rényi divergence of order 1/2 between two Bernoulli distributions. The Bernoulli distributions involved in the characterization of the rate function are those governing the random instantiation of hyperedges in d-hSBM. Experimental results on synthetic data validate our theoretical finding that the refinement step is critical in achieving the optimal statistical limit. I (Eli) Chien was with the Department of Electrical Engineering, National Taiwan University, Taipei 10617, Taiwan. He is now with the Department of Electrical and Computer Engineering, University of Illinois at Urbana-Champaign, Champaign, Illinois, USA (email:[email protected]). C.-Y. Lin is with the Graduate Institute of Communication Engineering, National Taiwan University, Taipei 10617, Taiwan (email: [email protected]). I.-H. Wang is with the Department of Electrical Engineering and the Graduate Institute of Communication Engineering, National Taiwan University, Taipei 10617, Taiwan (email: [email protected]). The material in this paper was partly presented at the IEEE International Symposium on Information Theory, Aachen, Germany, June 2017 [1] and to partly appear in the International Conference on Artificial Intelligence and Statistics, Canary Islands, Spain, April 2018 [2]. February 6, 2018 DRAFT 2 I. I NTRODUCTION Community detection (clustering) has received great attention recently across many applications, including social science, biology, computer science, and machine learning, while it is usually an ill-posed problem due to the lack of ground truth. A prevalent way to circumvent the difficulty is to formulate it as an inverse problem on a graph G = {V, E}, where each node i ∈ V = [n] , {1, . . . , n} is assigned a community (label) σ (i) ∈ [k] , {1, . . . , k} that serves as the ground truth. The ground-truth community assignment σ : [n] → [k] is hidden while the graph G is revealed. Each edge in the graph models a certain kind of pairwise interaction between the two nodes. The goal of community detection is to determine σ from G, by leveraging the fact that different combination of community relations leads to different likeliness of edge connectivity. When the graph G is passively observed, community detection can be viewed as a statistical estimation problem, where the community assignment σ is to be estimated from a statistical experiment governed by a generative model of random graphs. A canonical generative model is the stochastic block model (SBM) [3] (also known as planted partition model [4]) which generates randomly connected   edges from a set of labeled nodes. The presence of the n2 edges is governed by n2 independent Bernoulli random variables, and the parameter of each of them depends on the community assignments of the two nodes in the corresponding edge. Through the lens of statistical decision theory, the fundamental statistical limits of community detection provides a way to benchmark various community detection algorithms. Under SBM, the fundamental statistical limits have been characterized recently. One line of work takes a Bayesian perspective, where the unknown labeling σ of nodes in V is assumed to be distributed according to certain prior, and one of the most common assumption is i.i.d. over nodes. Along this line, the fundamental limit for exact recovery is characterized [5] in the full generality, while partial recovery remains open in general. See the survey [6] for more details and references therein. A second line of work takes a minimax perspective, and the goal is to characterize the minimax risk, which is typically the mismatch ratio between the true community assignment and the recovered one. In [7], a tight asymptotic characterization of the minimax mismatch ratio for community detection in SBM is found. Along with these theoretical results, several algorithms have been proposed to achieve these limits, including degree-profiling comparison [8] for exact recovery, spectral MLE [9] for almost-exact recovery, and a two-step mechanism [10] under the minimax framework. However, graphs can only capture pairwise relational information, while such dyadic measure may be inadequate in many applications, such as the task of 3-D subspace clustering [11] and the higher-order graph matching problem in computer vision [12]. Moreover, in a co-authorship network such as the DBLP bibliography database where collaboration between scholars usually comes in a group-wise fashion, it seems more appropriate to represent the co-writing relationship in a single collective way rather than inscribing down each pairwise interaction [13]. Therefore, it is natural to model such beyond-pairwise interaction by a hyperedge in a hypergraph and study the clustering problem in a hypergraph setting [14]. Hypergraph partitioning has been investigated in computer science, and several algorithms have been proposed, including spectral methods based on clique expansion [15], hypergraph Laplacian [16], game-theoretic approaches [17], tensor method [18], linear programming [19], to name a few. Existing approaches, however, mainly focus on optimizing a certain score function entirely based on the February 6, 2018 DRAFT 3 connectivity of the observed hypergraph and do not view it as a statistical estimation problem. In this paper, we investigate the community detection problem in hypergraphs through the lens of statistical decision theory. Our goal is to characterize the fundamental statistical limit and develop computationally feasible algorithms to achieve it. As for the generative model for hypergraphs, one natural extension of the SBM model to a hypergraph setting is the hypergraph stochastic block model (hSBM), where the presence of an order-h hyperedge e ⊂ V (i.e. |e| = h ≤ M , the maximum edge cardinality) is governed by a Bernoulli random variable with parameter θe and the presence of different hyperedges are mutually independent. Despite the success of the aforementioned algorithms applied on many practical datasets, it remains open how they perform in hSBM since the the fundamental limits have not been characterized and the probabilistic nature of hSBM has not been fully utilized. As a first step towards characterizing the fundamental limit of community detection in hypergraphs, in this work we focus on the “d-wise hypergraph stochastic block model” (d-hSBM), where all the hyperedges generated in the hypergraph stochastic block model are of order d. Our main contributions are summarized as follows. • First, we characterize of the asymptotic minimax mismatch ratio in d-hSBM for any order d. • Second, we propose a polynomial time algorithm which provably achieves the minimax mismatch ratio in the asymptotic regime, under mild regularity conditions. To the best of our knowledge, this is the first result which characterizes the fundamental limit on the minimax risk of community detection in random hypergraphs, together with a companion efficient recovery algorithm. The proposed algorithm consists of two steps. The first step is a global estimator that roughly recovers the hidden community assignment to a certain precision level, and the second step refines the estimated assignment based on the underlying probabilistic model. It is shown that the minimax mismatch ratio in d-hSBM converges to zero exponentially fast as n, the size of the hypergraph, tends to infinity. The rate function, which is the exponent normalized by n, turns out to be a linear combination of Rényi divergences of order 1/2. Each divergence term in the sum corresponds to a pair of community relations that would be confused with one another when there is only one misclassification, and the weighted coefficient associated with it indicates the total number of such confusing patterns. Probabilistically, there may well be two or more misclassifications, with each confusing relation pair pertaining to a Rényi divergence when analyzing the error probability. However, we demonstrate technically that these situations are all dominated by the error event with a single misclassified node, which leaves out only the “neighboring” divergence terms in the asymptotic expression. The main technical challenge resolved in this work is attributed to the fact that the community relations become much more complicated as the order d increases, meaning that more error events may arise compared to the dichotomy situation (i.e. same-community and different-community) in the graph SBM case. In the proof of achievability, we show that the second refinement step is able to achieve the fundamental limit provided that the first initialization step satisfies a certain weak consistency condition. The core of the secondstep algorithm lies in a local version of the maximum likelihood estimation, where concentration inequalities are utilized to upper bound the probability of error. Here, an additional regularity condition is required to ensure that the probability parameters, which corresponds to the appearance of various types of hyperedge, do not deviate too much from each other. We would like to note that this constraint can be relaxed as long as the number of February 6, 2018 DRAFT 4 communities k considered does not scale with n. For the first step, we use the tools from perturbation theory such as the Davis-Kahan theorem to prove the performance of the proposed spectral clustering algorithm. Since entries in the derived hypergraph Laplacian matrix are no longer independent, a union bound is applied here to make the analysis tractable with the concentration inequalities. The converse part of the minimax mismatch ratio follows a standard approach in statistics by finding a smaller parameter space where we can analyze the risk. We first lower bound the minimax risk by the Bayesian risk with a uniform prior. Then, the Bayesian risk is transformed to a local one by exploring the closed-under-permutation property of the targeted parameter space. Finally, we identify the local Bayesian risk with the risk function of a hypothesis testing problem and apply the Rozovsky lower bound in the large deviation theory to obtain the desired converse result. Related Works The hypergraph stochastic block model is first introduced in [20] as the planted partition model in random uniform hypergraphs where each hyperedge has the same cardinality. The uniform assumption is later relaxed in a follow-up work [21] and a more general hSBM with mixing edge-orders is considered. In [22], the authors consider the sparse regime and propose a spectral method based on a generalization of non-backtracking operator. Besides, a weak consistency condition is derived in [21] for hSBM by using the hypergraph Laplacian. Departing from SBM, an extension to the censored block model to the hypergraph setting is considered in [23], where an information theoretic limit on the sample complexity for exact recovery is characterized. As for the proposed two-step algorithm, the refine-after-initialize concept has also been used in graph clustering [8], [9], [10] and ranking [24]. This paper generalizes our previous works in the two conference papers [1], [2] in three ways. First, [1] only explores the extension from the graph SBM to 3-hSBM case where the observed hyperedges are 3-uniform, as compared to a more general d-hSBM model for any order d analyzed in [2] and here. In addition, the number of communities k is allowed to be scaled with the number of vertices n in this work, rather than being a constant as assumed in [2]. This slight relaxation actually leads to another regularization condition imposed on the connecting probabilities, which is an non-trivial technical extension. Finally, we also demonstrate that our proposed algorithms: the hypergraph spectral clustering algorithm and the local refinement scheme are able to achieve the partial recovery and the exact recovery criteria, respectively. The rest of the paper is organized as follows. We first introduce the random hypergraph model d-hSBM and formulate the community detection problem in Section II. Previous efforts on the minimax result in graph SBM and 3-hSBM are refreshed in Section III, which motivates the key quantities that characterize the fundamental limit in d-hSBM. The main contribution of this work, the characterization of the optimal minimax mismatch ratio under dhSBM for any general d, is presented in Section IV. We propose two algorithms in Section V along with an analysis on the time complexity. Theoretical guarantees for the proposed algorithms as well as the technical proofs are given in Section VI, while the converse part of the main theorem is established in Section VII. In Section VIII, we implement the proposed algorithms on synthetic data and present some experimental results. The paper is concluded with a few discussions on the extendability of the two-step algorithm and the minimax result to a weighted d-hSBM setting in Section IX. February 6, 2018 DRAFT 5 Notations • Let |S| denote the cardinality of the set S and [N ] , {1, 2, . . . , N } for N ∈ N. • Sn is the symmetric group of degree n, which contains all the permutations from [n] to itself. • The function σ(x) , (σ(x1 ), . . . , σ(xn )) represents the community label vector associated with a labeling function σ : [n] → [k] for a node vector x = (x1 , . . . , xn ). • For any community assignment y = (y1 , . . . , yn ) ∈ [k]n and permutation π ∈ Sk , yπ , (yπ(1) , . . . , yπ(n) ) denotes the permuted assignment vector. • The asymptotic equality between two functions f (n) and g(n), denoted as f ≍ g (as n → ∞), holds if limn→∞ f (n)/g(n) = 1. • Also, f ≈ g is to mean that f and g are in the same order if f (n)/C ≤ g(n) ≤ Cf (n) for some constant C ≥ 1 independent of n. f . g, defined by limn→∞ (f (n) − g(n)) ≤ 0, means that f (n) is asymtotically smaller than g(n). f & g is equivalent to g . f . These notations are equivalent to the standard Big O notations Θ(·), O(·), and Ω(·), which we also use in this paper interchangeably. • kxk2 , kxk1 is the ℓ2 and ℓ1 norm for a vector x, respectively. • dH (x, y) is the Hamming distance between two vectors x and y. • For a matrix M, we denote its operator norm by kMkop and its Frobenius norm by kMkF . • For a d-dimensional tensor T, we denote its (l1 , l2 , ..., ld )-th element by Tl , where l , (l1 , ..., ld ), and we write T = [Tl ]. •  Finally, let O(k1 , k2 ) = V ∈ Rk1 ×k2 | VT V = Ik2 for k1 ≥ k2 be the set of all orthogonal k1 ×k2 matrices. II. P ROBLEM F ORMULATION A. Community Relations Before introducing the random hypergaph model d-hSBM, we first describe the community relations among d nodes, which serves as the basic building block of our model. Let Kd , {ri } be the set of all possible community relations under d-hSBM and κd , |Kd | denotes the total number of them. In contrast to the dichotomy situation (same community or not) concerning the appearance of an edge between two nodes in the usual symmetric SBM, there is a growing number of community relations in d-hSBM as the order d increases. In order not to mess up with them, we use the idea of majorization [25] to organize Kd with each ri in the form of a histogram. Specifically, the histogram operator hist(·) is used to transform a vector r ∈ [k]d into its histogram vector hist(r). For convinience, we sort the histogram vector in descending order and append zero’s if necessary to make hist(r) a length-d vector. The notion of majorization is introduced as follows. For any a, b ∈ Rd , we say that a majorizes b, written as Pd Pd Pk Pk a ≻ b, if i=1 a↓i ≥ i=1 b↓i for k = 1, . . . , d and i=1 ai = i=1 bi , where x↓i ’s are elements of x sorted in descending order. Observe that each community relation ri in Kd can be uniquely represented, when sorted in descending order, by a d-dimensional histogram vector hi . We arrange the elements in Kd in majorization (pre)order such that hi ≻ hj if and only if i < j. For example, r1 is relation all-same with the most concentrated histogram h1 = (d, 0, . . . , 0) and r2 is the only-1-different relation with h2 = (d − 1, 1, 0, . . . , 0). Likewise, rκd −1 is the February 6, 2018 DRAFT 6 only-2-same relation with hκd −1 = (2, 1, . . . , 1, 0) and the last one in Kd , relation all-different rκd , has a histogram vector hκd = (1, . . . , 1) being the all-one vector. Example 2.1 (K4 in 4-hSBM): |K4 | = κ4 = 5 with histogram vectors being Relation Histogram Connecting Probability r1 (all-same) h1 = (4, 0, 0, 0) p1 r2 (only-1-different) h2 = (3, 1, 0, 0) p2 h3 = (2, 2, 0, 0) p3 r3 r4 (only-2-same) h4 = (2, 1, 1, 0) p4 r5 (all-different) h5 = (1, 1, 1, 1) p5 B. Random Hypergraph Model: d-hSBM In a d-uniform hypergraph, the adjacency relation among the n nodes in G = (V, E) can be equivalently represented by a d-dimensional n × · · · × n random tensor A , [Al ] (the size of each dimension being n), where l = (l1 , . . . , ld ) ∈ [n]d is the access index of an element in the tensor. The following two natural conditions on this adjacency tensor come from the basic properties of an undirected hypergraph: No self-loop: Al 6= 0 ⇐⇒ |{l1 , . . . , ld }| = d Symmetry: (all d elements in l are distinct) Al = Alπ ∀π ∈ Sd . For each l, Al is a Bernoulli random variable with success probability Ql . The parameter tensor Q , [Ql ] depends only on the community assignments of the associated nodes in the hyperedge and forms a block structure. The block structure is characterized by a symmetric community connection d-dimensional tensor B ∈ [0, 1]k×···×k where Ql = Bσ(l) . To setup the parameter space considered in our statistical study, below we first introduce some further notations. Let nt = |{i | σ(i) = t}| be the size of the t-th community for t ∈ [k]. Besides, let p = (p1 , . . . , pκd ) ∈ (0, 1)κd where pi denotes the success probability of the Bernoulli random variable that corresponds to the appearance of a hyperedge with relation ri ∈ Kd . We make a natural assumption that pi ≥ pj ∀i < j. The more concentrated a group is, the higher the chances that the members will be connected by an hyperedge. Remark 2.1: We would like to note that there is nothing peculiar about the assumption that pi ’s are in decreasing order and the condition can be relaxed. All that is required are that the connecting probabilities pi ’s are well separated and the difference between each pi − pj are within the same order. See Section VI for a more formal statement of our main result. The parameter space considered here is a homogeneous and approximately equal-sized case where each nt ≈   Formally speaking (let n′ , nk ), n o Θ0d (n, k, p, η) , (B, σ) | σ : [n] → [k], nt ∈ [(1 − η)n′ , (1 + η)n′ ] ∀t ∈ [k] n k . (1) where B has the property that Bσ(l) = pi if and only if hist(σ(l)) = hi . In other words, only the histogram of the community labels within a group matters when it comes to connectivity. η is a parameter that controls how much February 6, 2018 DRAFT 7 nt could vary. We assume the more interesting case that η ≥ 1 n′ where the community sizes are not restricted to be σ exactly equal. Interchangeably, we would write l ∼ ri to indicate the community relation within nodes l1 , . . . , ld under the assignment σ. Throughout the paper, we will assume that the order d of the observed hypergraph is a constant, while the other parameters, including the total number of communities k and the hyperedge connection probability p, can be coupled with n. Specifically, k can either be a constant or it can also scale with n. Moreover, as pointed out in [1], the regime where the hypergraph SBM is weakly recoverable could be orderly lower than the one considered in SBM of graphs [8]. To guarantee the solvability of weak recovery in d-hSBM, we set the probability  1 1 . Therefore, we would write p = nd−1 (a1 , . . . , aκd ) where parameter p should at least be in the order of Ω nd−1  1 ai = Ω(1) for all i = 1, . . . , κd . We would like to note that the probability regime Ω nd−1 considered here is  first motivated in [1]. Under 3-hSBM, the authors in [1] consider p = Ω n12 for the probability parameter, which is  orderly lower than the one (Θ n1 ) required for partial recovery in [8] and the minimax risk in [7] for graph SBM. The motivation is that, since the total number of random variables in a random 3-uniform hypergraph is roughly n-times larger than those in a traditional random graph, the underlying hypergraph is allowed to be n-times sparser  and still retain a risk of the same order. In light of this, we relax the probability parameter p from Ω n1 to  1 Ω nd−1 in d-hSBM. C. Performance Measure To evaluate how good an estimator σ b : G → [k]n is, we use the mismatch ratio as the performance measure to the community detection problem. The un-permuted loss function is defined as ℓ0 (σ1 , σ2 ) , 1 dH (σ1 , σ2 ) n where dH is the Hamming distance. It directly counts the proportion of misclassified nodes between an estimator and the ground truth assignment. Concerning the issue of possible re-labeling, the mismatch ratio is defined as the loss function which maximizes the agreements between an estimator and the ground truth after an alignment by label permutation. ℓ(b σ , σ) , min ℓ0 (b σπ , σ) π∈Sk (2) As convention, we use Rσ (b σ ) , Eσ ℓ(b σ , σ) to denote the corresponding risk function. Finally, the minimax risk for the parameter space Θ0d (n, k, p, η) under d-hSBM is denoted as R∗d , inf sup Rσ (b σ ). σ b (B,σ)∈Θ0d Remark 2.2: Notice that in a symmetric (homogeneous) SBM [6], the connectivity tensor B is uniquely determined by the labeling function σ. Therefore, we would drop the subscript B in PB,σ {·} and write Pσ {·} when it comes to the uncertainty arising from the random hypergraph model with the underlying assignment being σ. Similarly, we would write Eσ [·] instead of EB,σ [·] for ease of notation. February 6, 2018 DRAFT 8 III. P RIOR W ORKS For the case d = 2, the asymptotic minimax risk R∗2 is characterized in [7], which decays to zero exponentially fast as n → ∞. In addition, the (negative) exponent of R∗2 is determined by the Rényi divergence of order 1/2 between two Bernoulli distributions Ber(p) and Ber(q)  √ p p pq + 1 − p 1 − q Ipq , −2 log (3) where p is the success probability of a same-community edge while q stands for a different-community one. Extending from traditional graph SBM to a hypergraph setting, the authors in [1] generalize the minimax result obtained in [7] to the 3-hSBM model as follows − log R∗3 ≍  ′ n Ipq + (k − 2)(n′ )2 Iqr 2 where the probability parameter p = (p, q, r) corresponds to the community relations with histograms (3, 0, 0), (2, 1, 0) and (1, 1, 1), respectively. Observe that the exponent of the minimax risk in 3-hSBM does not depend on the divergence term Ipr explicitly. That is, R∗3 consists of only those neighboring divergence terms whose histogram vectors have a ℓ1 distance of 2. Besides, associated with each divergence term Ipi pj is a weighted coefficient, i.e.  n′ ′ 2 2 for Ipq and (k − 2)(n ) for Iqr . These coefficients appears in the hypothesis testing problem when deriving the lower bound of the minimax result. Essentially, they represent the total number of random variables that appear either as a relation-ri hyperedge or as a relation-rj hyperedge when the community label of this targeted node is being tested. It turns out that the optimal minimax risk in d-hSBM also decays to zero exponentially fast, given that the outcome of the initialization algorithm satisfies a certain condition. The exponent, as stated formally later, is a weighted combination of divergence terms. To specify the weight in this weighted average, we introduce further notations  below. We use Nd , (ri , rj ) | i < j, khi − hj k1 = 2 to denote the collection of ordered pairs of relations in Kd that are neighbors to each other. Second, there is a combinatorial number associated with every pairwise divergence term. Precisely, let us consider a least favorable sub-parameter space of Θ0d . n o 0 ′ ′ ′ ′ ΘL d (n, k, p, η) , (B, σ) ∈ Θd | nt ∈ {n − 1, n , n + 1} ∀t ∈ [k], nσ(1) = n + 1 (4) ′ In ΘL d , each community takes on only three possible sizes. In addition, there are exactly n + 1 members in the community where the first node belongs. We pick a σ0 in ΘL d and construct a new assignment σ[σ0 ] based on σ0 :   ′ arg min 2≤t≤k {nt = n } , for i = 1 σ[σ0 ](i) =  σ0 (i) , for 2 ≤ i ≤ n. In other words, assignments σ[σ0 ] and σ0 only disagree on the label of the first node. For each pair (ri , rj ) in Nd , we define the weighted coefficient mr i r j ,  σ[σ0 ] σ l = (1, l2 , . . . , ld ) | l ∼0 ri , l ∼ rj as the number of relation-ri hyperedges that we mistake as relation-rj hyperedges. Note that the above definition is independent to the choice of σ0 ∈ ΘL d due to the community size constraints. February 6, 2018 DRAFT 9 Example 3.1 (N4 in 4-hSBM): |N4 | = 5 with elements Relation Pair (r1 , r2 ) (r2 , r3 ) (r3 , r4 ) (r2 , r4 ) (r4 , r5 ) Weighted Coefficient ′ mr1 r2 ≍ n3 ′ mr2 r3 ≍ n2 n′ ′ mr3 r4 ≍ n′ (k − 2) n2 ′ mr2 r4 ≍ n2 (k − 2)n′  ′ 2 mr4 r5 ≍ n′ k−2 2 (n ) Note that mr1 r2 is the smallest while mr4 r5 is the largest. IV. M AIN C ONTRIBUTION The optimal minimax risk for the homogeneous and approximately equal-sized parameter space Θ0d (n, k, p, η) under the probabilistic model d-hSBM is characterized as follows.  1 1 Main Theorem: Suppose p = nd−1 (a1 , · · · , aκd ) = Ω nd−1 and ai ≈ aj ∀i, j = 1, . . . , κd . If P i<j:(ri ,rj )∈Nd mri rj Ipi pj →∞ k d log k and P i<j:(ri ,rj )∈Nd mri rj Ipi pj k d max(i,j):(ri ,rj )∈Nd as n → ∞. Then log R∗d ≍ − X p1 −pκd pi −pj (5) →∞ (6) mri rj Ipi pj . (7) i<j:(ri ,rj )∈Nd If k is a constant, then (7) holds without the further assumption (6). Remark 4.1: In this work, we assume that the order of the hypergraph d is a constant. More generally, one may also wonder how the characterized minimax risk changes when this order d is also allowed to scale with n. Certainly, the expression above for the optimal minimax risk depends on the hypergraph order d, yet only implicitly. To obtain an explicit form of R∗d in terms of d, we have to get further estimates of those weighted coefficient mri rj ’s (a −a )2 as well as the corresponding Rényi divergence term Ipi pj ’s. The latter can be estimated by Ipi pj ≈ nid−1 jai when  1 as assumed in the main theorem. On the other hand, as commented in Example 3.1, it is ai ≈ aj = ω nd−1  n′ not hard to see that mri rj achieves its minimum at d−1 between r1 with h1 = (d, 0, . . . , 0) and r2 with h2 =  ′ d−2 (d − 1, 1, 0, . . . , 0) while it attains its maximum at n′ k−2 between rκd −1 with hκd −1 = (2, 1, . . . , 1, 0) d−2 (n ) and rκd with hκd = (1, . . . , 1). Therefore, when the differences ai − aj are constant ∀i < j : (ri , rj ) ∈ Nd , the last P term with mrκd −1 rκd dominates other terms in the summation i<j:(ri ,rj )∈Nd mri rj Ipi pj seeing that the parameter k is coupled with n. In particular, the error exponent for the optimal minimax risk in equation (7) is in the order of 1 (d−2)! . Surprisingly, the minimax risk would decay more slowly due to the factorial term in the denominator as the order d increases. However, we would like to note that this observation is valid only under the assumption that the  1 considered hypergraphs are in the sparse regime Θ nd−1 where there are roughly n log n hyperedges generated no matter how large the order d is. February 6, 2018 DRAFT 10 The minimax risk is provably achieved, through Theorem 6.1 in Section VI, by the proposed two-step algorithm. Roughly speaking, we first demonstrate that the second-step refinement is capable of obataining an acurate parameter estimation as long as the first-step initialization satisfies a weak consistency condition. Then, the local MLE step is proved to achieve a mismatch ratio as the desired minimax risk, with which the local majority voting could recover the true community label for each node with the guaranteed risk. Finally, we show that our proposed spectral clustering algorithm with the hypergraph Laplacian matrix are qualified as a first-step initialization algorithm. We will compare our theoretical findings to those for the graph case [10] below as well as for the hypergraph setting [21] later in Section VI. On the other hand, the converse part is established through Theorem 7.1 in Section VII. A. Implications to Exact Recovery Since we consider a minimax framework, the theoretical guarantees of our two-step algorithm are also sufficient to ensure the partial recovery and the exact recovery as considered under the Bayesian perspective [8]. Before presenting the theorems in regard to the community recovery in the Bayesian case, let’s first refresh on these two recovery notions. The definitions of different recovery criterions discussed here can be found in the comprehensive survey [6]. We paraphrase them below for completeness. Please refer to the survey for more details and the references therein. In terms of the mismatch ratio (2), Definition 4.1 (Revised Definition 4 in [6]): Consider a σ ∈ Θd (n, k, p, η) and a corresponding random hypergraph G. The following recovery requirements are solved if there exists an algorithm A which takes G as input and estimates σ b = A(G) such taht • Partial Recovery: P {ℓ(b σ , σ) ≤ α} = o(1), α ∈ (0, 1) • Exact Recovery: P {ℓ(b σ , σ) = 0} = o(1) where the probability is taken over the random realizations of G and the asymptotic notation is with respect to the growth of n. Our proposed two-step algorithm in Section V can provably satisfy the exact recovery criterion. Theorem 4.1: If lim inf n→∞ P i<j:(ri ,rj )∈Nd log n mri rj Ipi pj > 1, (8) then Algorithm 1 combined with Algorithm 2 is able to solve the exact recovery problem. Proof. With (8), for any n ∈ N there exists a small constant c > 0 such that P i<j:(ri ,rj )∈Nd mri rj Ipi pj > 1 + c. log n By the Markov inequality, we have   1 P ℓ(b σ , σ) < ≤ n · E [ℓ(b σ , σ)] n ≤ nR∗d < n−c . Note that the event that mismatch ratio is smaller than February 6, 2018 1 n is equivalent to the event that it is identical to 0.  DRAFT 11 We would like to note that partial recovery is immediate from the exact recovery. Indeed, the required condition can be relaxed from (8) and depends on the extent of distortion α. B. Comparison with [10] We can recover the minimax result obtained in [10] by specializing d = 2 in the main theorem above. In [10], the authors consider the traditional SBM model under a homogeneous parameter space with connecting probability being p = (p, q) = ( na , nb ). We would like to note that the parameter space considered in [10] is more general in the sense that it needs not be nearly equal-sized case. To be more specific, the size of each community nt is allowed to vary i h within β1 n′ , βn′ (where n′ = ⌊ nk ⌋). However, the parameter β controlling this variation is itself only restricted p in the range [1, 5/3] for some technical issue, which makes the attempted relaxation on the community size less interesting. In light of this, we compare only the minimax result in [10] with β = 1, which is Θ02 in our notation. The overall result for Θ02 (n, k, p, η), when combining the spectral initialization step with the local refinement step proposed therein (denoted as σ bGM ), can be summarized as follows: Suppose p = ( na , nb ) and a ≈ b. If (a − b)2 →∞ ak 3 log k as n → ∞. Then, there exists a sequence ζn → 0 such that n o σGM , σ) ≥ exp − (1 − ζn )n′ Ipq → 0. sup Pσ ℓ(b (9) (10) (B,σ)∈Θ02 Indeed, conditiion (9) required is exactly the same as (5) by using the approximation Ipq ≈ (a−b)2 na . there is only one community relation pair (r1 , r2 ) in N2 and the weighted coefficient is mr1 r2 = n′ ≍ Note that n k. In fact, the situation is very simple in SBM since there are only two possible community relations, i.e. intra-community (relation all-same) and inter-community (relation all-diff ). On the contrary, the relational information gets more and more complicated as d increases. This inevitable “curse of dimension” is reflected in the second assumption (6) we made in the main theorem. First, recall that we set all of the probability parameters p = (p1 , . . . , pκd ) in the same order as the condition a ≈ b required in [10]. Apart from that, we also need to make sure that the differences pi − pj associated with the pairs (ri , rj ) ∈ Nd remain in the same order to successfully upper-bound the error probability in the proof of achievablity. Under the traditional SBM, it is not hard to see that the assumption (6) is weaker than the assumption (5). Therefore, the overall requirement is equivalent to (9) made in [10] without any further assumption. V. P ROPOSED A LGORITHMS In this section, we propose our main algorithm for community detection in random hypergraphs, which is later in Section VI proved to achieve the minimax risk R∗d in the d-hSBM asymptotically. The algorithm (Algorithm 1) comprises two major steps. In the first step, for each u ∈ [n], it generate an estimated assignment σ bu of all nodes except u by applying an initialization algorithm Alginit on the sub-hypergraph without the vertex u. For example, we can apply the hypergraph clustering method described in Subsection V-B on A−u , the (n − 1) × · · · × (n − 1) sub-tensor of A when the u-th coordinate is removed in each dimension. Then, in the second step, the label of February 6, 2018 DRAFT 12 u under σ bu is determined by maximizing a local likelihood function described in Subsection V-A. Note that the parameters of the underlying d-hSBM need not be known in advance, as it could conduct a parameter estimation before computing the local likelihood function if necessary. Finally, with n estimated assignments {b σu : u ∈ [n]}, the algorithm combines all of them together and forms a consensus via majority neighbor voting. A. Refinement Scheme Let us begin with the global likelihood function defined as follows. Let  X X  L(σ; A) , log pi Al + log(1 − pi )(1 − Al ) (11) σ {i|ri ∈Kd } {l|l∼ri } denote the log-likelihood of an adjacency tensor A when the hidden community structure is determined by σ. For each u ∈ [n], we use Lu (σ, t; A) , X X σ {i|ri ∈Kd } {l|l1 =u,l∼ri }   log pi Al + log(1 − pi )(1 − Al ) (12) to denote those likelihood terms in (11) pertaining to the u-th node when its label is t. It is not hard to see that Lu (σ, t; A) is a sum of independent Bernoulli random variables. However, Lu (σ, t; A) is not independent of Lv (σ, s; A) for any u 6= v since those random hyperedges that might enclose vertex u and vertex v simultaneously appear in both of the summands of the likelihood terms. The global likelihood function and the local likelihood function is related by L(σ; A) = 1 X Lu (σ, t; A). d u∈[n] This is because each likelihood term in (11) is counted exactly d times when summing over all possible equation (12)’s. For each node u ∈ [n], based on the estimated assignment of the other n − 1 nodes, we use the following local MLE method to predict the label of u. σ bu (u) , arg max Lu (σ, t; A) t∈[k] When the connectivity tensor B that governs the underlying random hypergraph model d-hSBM is unknown when b A) and L b u (σ, t; A) to denote the global and local likelihood function evaluating the likelihood, we will use L(σ; b Since the presence of each edge is independent based on with the true B replaced by its estimated counterpart B. b u to estimate the real parameters. Note that the superscript u our probabilistic model, we use the sample mean B b u is calculated with node u taken out. Finally, consensus is drawn by is to indicate the fact that the estimation B using the majority neighbor voting. In fact, the consensus step looks for a consensus assignment for the n possible different community assignments obtained in the local MLE method in Algorithm 1. Since all these n assignments will be close to the ground truth up to some permutation, this step combines all of them to conclude a single community assignment as the final output. February 6, 2018 DRAFT 13 Algorithm 1: Main Algorithm Input: Observation tensor A ∈ {0, 1}n×···×n , number of communities k, initialization algorithm Alginit . Local MLE: for u = 1 to n do Apply Alginit on A−u to obtain σ bu (v) ∀v 6= u. eu = {v|b Define C σu (v) = i} for all i ∈ [k]. i b u . Specifically, estimate each probability parameter pi with Estimate entries of B by its sample mean B o n σ bu ∼ r A 1 l i l l o pbi = P n σb u l 1 l ∼ ri P Assign the label of node u according to b u (b σu , t; A) σ bu (u) = arg max L (13) t∈[k] end Consensus: Define σ b(1) = σ b1 (1). For u = 2, . . . , n, define σ1 (v) = t} ∩ {v|b σu (v) = σ bu (u)} σ b(u) = arg max {v|b (14) t∈[k] Output: Community assignment σ b2 . B. Spectral Initialization In order to devise a good initialization algorithm Alginit , we develop a hypergraph version of the unnormalized spectral clustering [26] with regularization [27]. In particular, a modified version of the hypergraph Laplacian described below is employed. Let H = [Hve ] be the |V| × |E| incidence matrix, where each entry Hve is the indicator function whether or not node v belongs to the hyperedge e. Note that the incidence matrix H contains the same amount of information as the the adjacency tensor A. Let du , X Hue e∈E denote the degree of the u-th node, and 1 X du d¯ , n u∈[n] be the average degree across the hypergraph. The unnormalized hypergraph Laplacian is defined as L(A) , HHT − D February 6, 2018 (15) DRAFT 14 where D = diag(d1 , . . . , dn ) is a diagonal matrix representing the degree distribution in the hypergraph with adjacency tensor A and (·)T is the usual matrix transpose. Note that L(A) can be thought of as an encoding of the higher-dimensional connectivity relationship A into a two-dimensional matrix. Before we directly apply the spectral method, high-degree abnormals in the tensor A is first trimmed to ensure the performance of the clustering algorithm. Specifically, we use Aτ to denote the modification of A where all coordinates pertaining to the set {u ∈ [n] | du ≥ τ } are replaced with all-zero vectors. Let Hτ and Dτ be the corresponding incidence matrix and degree matrix of Aτ , respectively. The spectrum we are looking for is the trimmed version of L, denoted as Tτ (L(A)) , Hτ HT τ − Dτ (16) where the operator Tτ (·) represents the trimming process with a degree threshold τ . We use   b = uT · · · uT T ∈ Rn×k SVDk (Tτ (L(A))) , U 1 n to denote the k leading singular vectors generated from the singular value decomposition of the trimmed matrix Tτ (L(A)). Note that in a conventional spetral clustering algorithm, each node i ∈ [n] is represented by a reduced k-dimensional row vector ui . The spectral clustering algorithm is described in Algorithm 2. Algorithm 2: Spectral Initialization   T T , Input: Spectrum SVDk (Tτ (L(A))) = uT 1 · · · un number of communities k, q cirtical radius r = µ nk with some µ > 0. Set S = [n]. for t = 1 to k do Let st = arg maxi∈S {j ∈ S : kuj − ui k2 < r} . bt = {j ∈ S : kuj − ust k < r}. Set C 2 bt . Label σ b(i) = t ∀i ∈ C bt . Update S ← S \ C end Cleanup: If S 6= ∅, then for any i ∈ S, set σ b (i) = arg min t∈[k] Output: Community assignment σ b1 . 1 X kuj − ui k2 bt C bt j∈C b to cluster nodes. In each loop, we Similar to classical spectral clustering, we make use of the row vectors of U first choose the node which covers the most nodes with radius r in S to be the clustering center. Then, we assign all nodes whose distance from this center is smaller than r to this cluster. At the end of the loop, we remove all nodes within this cluster from S. The final cleanup step (2) in the algorithm is to assign those nodes that deviate February 6, 2018 DRAFT 15 too much from all k clusters. It assigns each remaining node to the cluster between which it has the minimum average distance. Remark 5.1: It is noteworthy that Algorithm 2 is just one method which is eligible to serve as a qualified first-step estimator Alginit . As mentioned above, the minimax risk is asymptotically achievable with Algorithm 1 as long as the initialization algorithm does not mis-classify too many nodes. The weak consistency requirement is stated explicitly in Section VI when theoretical guarantees are discussed. C. Time Complexity Algorithm 2 has a time complexity of O(n3 ), the bottleneck of which being the SVDk step. Still, the computation of SVD could be done approximately in O(n2 log n) time with high probability [9] if we are only interested in the first k spectrums. As for the refinement scheme, the sparsity of the underlying hypergraph can be utilized to reduce the complextiy since the whole network structure could be stored in the incidence matrix H equivalently as in the d-dimensional adjacency tensor A. As a result, the parameter estimation stage only requires O(dm) where m = |E| is the total number of hyperedges realized. Similary, the time complexity would be O(kdm) and O(kn2 ) for the calculation of likelihood function and the consensus step, respectively. Hence, the overall complexity for Algorithm 1 and Algorithm 2 combined are O(n3 log n + nkm + kn2 ) for a constant order d. It further reduces to O(n3 log n) in the sparse regime p = O(log n/nd−1 ) where m = O(n log n) with high probability. Remark 5.2: It is possible to simplify our algorithm in the same way as in [10], where the SVD is done only once. The time complexity of the simplified version of our algorithm will be O(n2 log n) in the sparse regime. This is comparable to the any other state-of-art min-cut algorithm, which usually exhibit time complexity at least O(|V ||E|). Although we are not able to provide any theoretical guarantee for this simplified version, as in [10], empirically it seems to have the same performance as the original algorithm. Proving its asymptotic optimality is left as future work. VI. T HEORETICAL G UARANTEES Combining the first-step and second-step algorithm in Section V, we have the following overall performance guarantee which serves as the achievability part of the Main Theorem in Section IV.  1 1 (a1 , · · · , aκd ) = Ω nd−1 and ai ≈ aj ∀i, j = 1, . . . , κd . If (5) and (6) holds as Theorem 6.1: Suppose p = nd−1 n → ∞. Then, the combined estimator σ b2 (Algorithm 1) along with estimator σ b1 (Algorithm 2) is able to achieve a risk of sup (B,σ)∈Θ0d Rσ (b σ2 ) ≤ exp  − (1 + ζn ) X i<j:(ri ,rj )∈Nd mri rj Ipi pj  (17) for some vanishing sequence ζn → 0. If k is a constant, then (17) holds without the further assumption (6). In what follows, we first state the theoretical guarantees of Algorithm 1 as well as Algorithm 2 and demonstrate how they in combination aggregate to the upper bound result. The detailed proofs of the intermediate theorems are established later in Subsection VI-A and Subsection VI-B, respectively. February 6, 2018 DRAFT 16 The algorithm proposed in Section V consists of two steps. We first get a rough estimation through the first step, which is a spectral clustering on the hypergraph Laplacian matrix. After that, for each node we perform a local maximum likelihood estimation, which serves as the second step, to further adjust its community assignment. It turns out that this refining mechanism is actually crucial in achieving the optimal minimax risk R∗d , as long as the first initialization step satisfies a certain weak consistency condition. Specifically, the first-step algorithm σ b0 should meet the requirement stated below. Condition 6.1: There exists constant C0 , δ > 0, and a positive sequence γn such that inf (B,σ)∈Θ0d Pσ {ℓ(b σ0 , σ) ≤ γn } ≥ 1 − C0 n−(1+δ) (18) for sufficiently large n. We have the following performance guarantee for our second-step algorithm. Theorem 6.2: If P i<j:(ri ,rj )∈Nd log k and Condition 6.1 is satisfied for γ=o and  γ=o mri rj Ipi pj  1 k log k →∞  (20) 1 k max(i,j):(ri ,rj )∈Nd Then, the estimator σ b2 (Algorithm 1) is able to achieve a risk of  sup Rσ (b σ2 ) ≤ exp − (1 + ζn′ ) (B,σ)∈Θ0d (19) p1 −pκd pi −pj X  . i<j:(ri ,rj )∈Nd (21) mri rj Ipi pj  (22) for some vanishing sequence ζn′ → 0. If k is a constant, then (22) holds without further assuming (21). As for the initialization algorithm, first recall that we assume the connecting probabilities p = (p1 , . . . , pκd ) = 1 nd−1 (a1 , . . . , aκd ) are in the same order. Also, we use λk to denote the k-th largest singular value of the matrix EL(A), which is the expectation of the hypergraph Laplacian (15). Note that each entry in the matrix is a weighted combination of the probability parameters pi ’s. Stated in terms of λk , the following theorem characterizes the mismatch ratio of the first-step algorithm that we propose. Theorem 6.3: If ka1 ≤ C1 λ2k for some sufficiently small C1 ∈ (0, 1) where p1 = a1 . nd−1 (23) Apply Algorithm 2 with a sufficiently small constant µ > 0 and τ = C2 d¯ for some sufficiently large constant C2 > 0. For any constant C ′ > 0, there exists some C > 0 depending only on C ′ , C2 , and µ so that ℓ(b σ , σ) ≤ C a1 λ2k ′ with probability at least 1 − n−C . To take out the dependency on λk , we use the observation below. February 6, 2018 DRAFT 17 Lemma 6.1: For d-hSBM in Θ0d (n, k, p, η), we have X λk & i<j:(ri ,rj )∈Nd mri rj (pi − pj ). (24) Proof of Theorem 6.1. Finally, we only need to prove that the result of Theorem 6.3 does match Condition 6.1. Combining Theorem 6.3 with Lemma 6.1, we have ℓ(b σ , σ) ≤ Cnd−1 p1 (λk )2 .P Hence, we need P Cnd−1 m2r i rj i<j:(ri ,rj )∈Nd Ipi pj Cnd−1 p1 2 2 i<j:(ri ,rj )∈Nd mri rj (pi − pj ) Cnd−1 . 2 i<j:(ri ,rj )∈Nd mri rj Ipi pj   1 = o k log k , which means that ≈P P 2 i<j:(ri ,rj )∈Nd mri rj Ipi pj nd−1 k log k → ∞. (25) Compared to the original requirement (19) in the main theorem in Section IV, which is P i<j:(ri ,rj )∈Nd mri rj Ipi pj → ∞. log k By counting arguments, we have 1 k d−1 ≤ mr i r j 1 ≤ . d−1 n k We can see that the new requirement (25) is only slightly more stringent than the original one. Together, we complete  the proof. A. Refinement Step To prove Theorem 6.2, we need a couple of technical lemmas, the proofs of which are delegated to the appendices. First, the lemma below ensures the accuracy of the parameter estimation with a qualified initialization algorithm. Lemma 6.2: Suppose as n → ∞, mri rj Ipi pj → ∞ for each (i, j) pair such that (ri , rj ) ∈ Nd , and Condition 6.1 holds with γ satisfying (20) for some δ > 0. Then there exists a sequence ζn → 0 as n → ∞ and a constant C > 0 such that inf (B,σ)∈Θ0d min Pσ u∈[n] n b us − Bsπ ≤ ζn min max B π∈Sk s∈[k]d max i<j:(ri ,rj )∈Nd o (pi − pj ) ≥ 1 − Cn−(1+δ) . (26) Based on Lemma 6.2, the next lemma shows that the local MLE method (13) is able to achieve a risk that decays exponentially fast. Lemma 6.3: Suppose mri rj Ipi pj → ∞ as n → ∞ for each (i, j) pair such that (ri , rj ) ∈ Nd , and either k is a  constant or (6) holds. If there are two sequences γn = o k1 and ζn′ = o(1), constants C, δ > 0, and permutations n {πu }u=1 ⊂ Sk such that n b u − Bs π ≤ ζ ′ σu )πu , σ) ≤ γn , B inf 0 min Pσ ℓ0 ((b n s (B,σ)∈Θd u∈[n] February 6, 2018 max i<j:(ri ,rj )∈Nd o (pi − pj ) ≥ 1 − Cn−(1+δ) . DRAFT 18 ′′ Then for the local maximum likelihood estimator σ bu (u) (13), there exists a vanishing sequence ζn → 0 such that   o n X ′′ mri rj Ipi pj + Cn−(1+δ) . σu (u))πu 6= σ(u) ≤ (k − 1) · exp − (1 − ζn ) sup max Pσ (b (B,σ)∈Θ0d u∈[n] i<j:(ri ,rj )∈Nd Finally, we justify the validity of using (14) as a consensus majority voting with the following lemma. Lemma 6.4 (Lemma 4 in [10]): For any labeling functions σ and σ ′ : [n] → [k], if for some constant C ≥ 1, min {u | σ(u) = t} ≥ t∈[k] Define map ξ : [k] → [k] as  n n 1 , min {u | σ ′ (u) = t} ≥ , and min ℓ0 σπ′ < . π∈Sk Ck t∈[k] Ck Ck ξ(i) = arg max {u | σ(u) = t} ∩ {u | σ ′ (u) = t} t∈[k] for each i ∈ [k]. Then ξ ∈ Sk and ℓ0 (ξ(σ ′ ), σ) is equal to minπ∈Sk ℓ0 (σπ′ , σ) We are ready to present the proof of Theorem 6.2. Proof of Theorem 6.2. Fix any (B, σ) in Θ0d . Let C0 , δ > 0 be constants and γn be a positive sequence in Condition 6.1. For each u ∈ [n], there exists some πu ∈ Sk so that Pσ {ℓ0 ((b σu )πu , σ) ≤ γn } ≥ 1 − C0 n−(1+δ) . In consequence, Eσ ℓ0 (b σ , σ) = Eσ   1 X 1 {(b σu (u))πCSS 6= σ(u)} n u∈[n] 1 X Pσ {(b σu (u))πCSS 6= σ(u)} = n u∈[n] ≤ where π CSS  1 X Pσ {(b σu (u))πu 6= σ(u)} + Pσ π CSS 6= πu n u∈[n] is the consensus permutation (14) in Algorithm 1. By Lemma 6.3, for any (B, σ) ∈ Θ0d and u ∈ [n],   X ′′ mri rj Ipi pj + Cn−(1+δ) Pσ {(b σu (u))πu 6= σ(u)} ≤ (k − 1) · exp − (1 − ζn ) i<j:(ri ,rj )∈Nd  for some constants C, δ > 0 and ζn → 0. Moreover, Lemma 6.4 implies that P π CSS 6= πu ′′ ≤ C ′ n−(1+δ) . Together, sup (B,σ)∈Θ0d Eσ ℓ0 (b σ , σ) ≤ (k − 1) · exp Since we assume that limn→∞ sup (B,σ)∈Θ0d P i<j:(ri ,rj )∈Nd Eσ ℓ0 (b σ , σ) ≤ exp   X ′′ − (1 − ζn ) mri rj Ipi pj i<j:(ri ,rj )∈Nd mri rj Ipi pj → ∞, we further have ′′′ − (1 − ζn ) X i<j:(ri ,rj )∈Nd mri rj Ipi pj   ′′ + C n−(1+δ) . ′′ + C n−(1+δ) = 1 + 2 February 6, 2018 DRAFT 19 ′′′ 1 )< for some ζn → 0. If 1 decays faster than 2 , then R∗d = o( n1+δ 1 n for sufficiently large n. Therefore, R∗d = 0 and the corresponding parameters satisfy the criterion of exact recovery. On the other hand, if 1 dominates 2 , then there exists ζn → 0 such that R∗d ≤ exp  − (1 − ζn ) X i<j:(ri ,rj )∈Nd  mri rj Ipi pj .  In either case, the claimed upper bound is achieved. The main difficulty of our proof above lies in proving Lemma 6.2 and Lemma 6.3. Compared to the graph SBM case [10], we are dealing with more kinds of random variables and more kinds of relations. Since the original analysis is already exhausted, we believe that our generalization is not a trivial work. Theorem 6.2 implies that as long as we have a good initialization that achieves Condition 6.1, we could apply our refinement algorithm to make the risk decay exponentially fast at the desired rate. This is because once Condition 6.1 is satisfied, we could find the correct permutation by the consensus step and correctly estimate the parameters. Also, since Condition 6.1 guarantees that we will only have o(1) proportion of misclassified nodes, it is not hard to see that the local MLE method will work well. B. Spectral Clustering Combined with Lemma 6.1, we have the following corollary to Theorem 6.3 in terms of mri rj and Ipi pj only.  1 1 (a1 , · · · , aκd ) = Ω nd−1 and ai ≈ aj ∀i, j = 1, . . . , κd . If Corollary 6.1: Suppose p = nd−1 P 1 i<j:(ri ,rj )∈Nd mri rj Ipi pj ≥ (27) kd c for some sufficiently small c ∈ (0, 1). Then, with the estimator σ b1 (Algorithm 2), corresponding to any constant C ′ > 0 there exists a constant C = C(C ′ ) > 0 such that  σ1 , σ) ≤ C P sup Pσ ℓ(b (B,σ)∈Θ0d k d−1 i<j:(ri ,rj )∈Nd mri rj Ipi pj  ′ ≥ 1 − n−C . (28) 1) Comparison with [21]: In [21], the authors consider the ”balanced partitions in uniform hypergraph” as a special case. In order to have a fair comparison, we would focus on the performance on this sub-parameter space. Essentially, it is the homogeneous and approximatedly equal-sized Θ0d that we consider, except that the authors only distinguish out the all-same community relation (associated with Ber(p)) from the rest of all possible community relations in Nd (associated with Ber(q)). We denote this parameter space as Θsd . The consistency result derived for Θsd with the spectral hypergraph partition algorithm σ bGD proposed therein can be summarized as follows: If p≥C k 2d−1 (log n)2 nd−1 for some absolute constant C > 0. Then,   σGD ) = O sup Pσ Rσ (b (B,σ)∈Θsd 1 k log n    1 ≥ 1 − O (log n)− 4 . (29) (30) On the other hand, the theoretical guarantee Corollary 6.1 for the spectral clustering algorithm σ b1 specializes to February 6, 2018 DRAFT 20 Corollary 6.2: Suppose p = (p, q, . . . , q) and p ≈ q. If p≥ 1 nd−1 ·C k 2d+1 n2 (31) for some absolute constant C > 0. Then,   1  σ1 ) = O sup Pσ Rσ (b ≥ 1 − n−O(1) k (B,σ)∈Θsd (32) under Θsd with some manipulations that are similar to the derivation of Lemma 6.1. It turns out that we allow the observed hypergraph to be sparser (a lower connecting probability) yet acquire a higher average mismatch ratio compared to the result obtained in [21]. However, if we raise the probability parameters p = (p, q, . . . , q) to the same order as in (29), the risk obtained in (32) will become    k ≥ 1 − n−O(1) . σ1 ) = O sup Pσ Rσ (b n2 log n (B,σ)∈Θsd That is, a k2 n2 = 1 (n′ )2 (33) gain in terms of the mismatch ratio over (30). In either case, we always have a success probability that converges faster to 1 for the weak consistency performance guarantee. 2) Proof of Theorem 6.3: The proof mainly follows from [10] and the main differences are the lemmas where we extend them for the d-hSBM case. For the sake of completeness, we include the extended proof below. The proof requires the following two lemmas, the details of which are defered to the appendices. First, we demonstrate that the trimmed hypergraph Laplacian does not deviate too much from its untrimmed expectation. Lemma 6.5: ∀C ′ > 0, ∃ C > 0 such that kTτ (L(A)) − EL(A)kop ≤ C p nd−1 p1 + 1   ′ with probability at least 1 − n−C uniformly over τ ∈ C1 (nd−1 p1 + 1), C2 (nd−1 p1 + 1) for some sufficiently large constants C1 and C2 . The next lemma analyzes the spectrum of EL(A) and pinpoints a special structure. Lemma 6.6 (Lemma 6 in [10]): We have SVDk (EL(A)) = UΛUT √ √ where U = Z∆−1 W with ∆ = diag( n1 , . . . , nk ). Z ∈ {0, 1}n×k is a matrix with exactly one nonzero entry in each row at (i, σ(i)) taking value 1 and W ∈ O(k, k). Proof of Theorem 6.3. Under the assumption p1 ≈ pκd , we have Eτ ∈ [C1′ nd−1 p1 , C2′ nd−1 p1 ] for some large con′ stant C1′ , C2′ . Thus by Bernstein’s inequality, with probability at least 1−e−C n , we have τ ∈ [C1 nd−1 p1 , C2 nd−1 p1 ]. By Davis-Kahan theorem [28], we have b − UW1 ||F ≤ C ||U √ k ||Tτ (L(A)) − EL(A)||op λk for some W1 ∈ O(k, k) and some constant C > 0. Then applying Lemma 6.6, we have √ k b ||Tτ (L(A)) − EL(A)||op ||U − V||F ≤ C λk February 6, 2018 (34) DRAFT 21 where V = Z∆−1 W = [v1T ...vnT ]T as we state in Lemma 6.6. Combining (34), Lemma 6.5 and the conclusion ′ τ ∈ [C1 nd−1 p1 , C2 nd−1 p1 ] with probability at least 1 − e−C n , we have √ p C k nd−1 p1 b − V||F ≤ ||U λk (35) ′ with probability at least 1 − n−C . The definition of V implies that  q  ≥ 2k , , if σ(i) 6= σ(j) n kvi − vj k2  = 0, , otherwise. Let X = ∆−1 W, which means vi = xσ(i) . Recall the definition of critical radius r = ν Define the sets n ro b s − xi k2 < , i ∈ [k]. Ti = s ∈ σ −1 (i) : ku 2 By definition, Ti ∩ Tj = ∅ for i 6= j and [ i∈[k] Thus,  [ Ti i∈[k] q k n in Algorithm 2. (36) n ro Ti = s ∈ [n] : kb u s − vs k 2 < . 2 c · X C 2 knd−1 p1 r2 b s − vs k22 ≤ ku ≤ 4 λ2k s∈[n] where the last inequality is due to (35). The rest of the proof is identical to the proof of Theorem 3 in [10]. For completeness, we shall repeat it again here. After some rearrangements, we have  [ c 4C 2 nd p1 ≤ Ti . µ2 λ2k (37) i∈[k] It means most nodes are close to the centers and are in the set we defined in (36). Also note that the sets {Ti }i∈[k] are disjoint. Suppose there is some i ∈ [k] such that |Ti | < |σ −1 (i)| − |(∪i∈[k] Ti )c |, we have | ∪i∈[k] Ti | = P c i∈[k] |Ti | < n − |(∪i∈[k] Ti ) | = | ∪i∈[k] Ti k, which leads to a contradiction. Thus, we must have |Ti | ≤ |σ −1 (i)| −  [ i∈[k] Ti c ≤ n 4C 2 nd p1 n − > k µ2 λ2k 2k where the last inequality is from the assumption (23). Since the cluster centers are at least q 2k n apart from each bi }i∈[k] (recall that C bi are defined in Algorithm 2) are defined through the critical others and both {Ti }i∈[k] , {C q bi should intersect with only one Ti . We claim that there is a permutation π of set [k], radius r = µ nk , each C such that bi C \ bi ≥ Tπ(i) ∀i ∈ [k]. Tπ(i) 6= ∅, C (38) We could now continue the proof with claim (38), where the proof of (38) can be found in [10] (in their proof of bi and (38), we Theorem 3). It is mainly established by an easy mathematical induction. From the definition of C bj = ∅. This directly implies that for any i 6= j, Tπ(i) ⊂ C bj . Thus, we know that have for any i 6= j, Tπ(i) ∩ C c  bc ⊂ ∪i∈[k] C bi . Therefore, Tπ(i) ∩ C i c [  \   [ bi . bic ⊂ C Tπ(i) C i∈[k] February 6, 2018 i∈[k] DRAFT 22 Combining with the fact that Ti ∩ Tj = ∅ ∀i 6= j, we have X Tπ(i) i∈[k] \ bc ≤ C i  [ i∈[k] bi C c . (39) bj = ∅ ∀i 6= j. Along with (38), we have bi T C By definition, C  [ c c  [ X X bi ≤ n − bi Ti . |Ti | = C =n− C (40) i∈[k] i∈[k] i∈[k] i∈[k] Together with (37), (39) and (40), we have X Tπ(i) i∈[k] \ 2 d bic ≤ 4C n p1 C µ2 λ2k (41)   bi , we have σ b(u) = i when σ(u) = π(i), the mis-classification ratio is bounded Since for each u ∈ ∪i∈[k] Tπ(i) ∩ C by \ c 1  [ bi Tπ(i) C n i∈[k]    [ c \ c \  [  1 [ bi Ti  Ti + Tπ(i) C ≤ n i∈[k] i∈[k] i∈[k]    [ c \ 1 X bic + ≤  Ti  Tπ(i) C n ℓ0 (b σ , π −1 (σ)) ≤ i∈[k] i∈[k] 2 d−1 ≤ 8C n p1 µ2 λ2k  where the last inequality is from (37) and (41). This proves the desired conclusion. Remark 6.1: Essentially, Theorem 6.3 says that the performance of Algorithm 2 will be upper-bounded in regard to the k-th largest singular value. When λk is large, it means that the singular vectors are well separated, ensuring the algorithm to have a good performance. This is similar to classical spectral clustering methods. VII. M INIMAX L OWER B OUND By constructing a smaller parameter space where we can analyze the risk, we are able to establish the converse part of the main theorem as follows. Theorem 7.1: If X i<j:(ri ,rj )∈Nd Then inf sup σ b (B,σ)∈Θ0d Rσ (b σ ) ≥ exp  mri rj Ipi pj → ∞. − (1 − ζn ) X i<j:(ri ,rj )∈Nd (42) mri rj Ipi pj  (43) for some vanishing sequence ζn → 0. We can see that condition (42) required here in the lower bound is less stringent than the condition (5) required in the upper bound. February 6, 2018 DRAFT 23 To prove Theorem 7.1, we first introduce the concept of local loss. The equivalence class of a community assignment σ is defined as Γ(σ) , {σ ′ | ∃π ∈ Sk s.t. σ ′ = σπ }. Let Sσ (b σ ) = {σ ′ ∈ Γ(b σ ) | dH (σ ′ , σ) = dH (b σ , σ)} be the set of all permutations in the equivalence class of σ b that achieve the minimum distance. For each i ∈ [n], the local loss function is defined as the proportion of false labeling of node i in Sσ (b σ ). X 1 {b σ (i) = 6 σ(i)} ℓ(b σ (i), σ(i)) , |S (b σ σ )| ′ σ ∈Sσ (b σ) It turns out that it is rather easy to study the local loss. In the proof of our converse, we consider a sub-parameter L 0 space of Θ0d , i.e. ΘL d (4) as defined in Section IV. Recall that the parameter space Θd is similar to Θd , but we only allow each community size to be within ⌊ nk ⌋ ± 1. Since ΘL d is closed under permutation, we can apply the global-to-local lemma in [7]. Lemma 7.1 (Lemma 2.1 in [7]): Let Θ be any homogeneous parameter space that is closed under permutation. Let Unif be the uniform prior over all the elements in Θ. Define the global Bayesian risk as Rσ∼Unif (b σ) = P P 1 1 σ , σ) and the local Bayesian risk Rσ∼Unif (b σ (1)) = |Θ| σ (1), σ(1)) for the first node. σ∈Θ Eσ ℓ(b σ∈Θ Eσ ℓ(b |Θ| Then inf Rσ∼Unif (b σ ) = inf Rσ∼Unif (b σ (1)). σ b σ b Second, the local Bayesian risk can be transformed into the risk function of a hypothesis testing problem. We consider the most indistinguishable case where the potential candidate only disagrees with the ground truth on a single node. The key observation is that the situation is exactly the same as our testing one node at a time in the local version of the MLE method. Lemma 7.2: Rσ∼Unif (b σ (1)) ≥ P where f (s) , s 1−s ( mri rj X X Cri rj i<j:(ri ,rj )∈Nd u=1  Xu(rj ) − Xu(ri )  ≥0 ) (r ) i.i.d. (r ) i.i.d. j for Cxy , log ff (x) ∼ Ber(pj ), Xu i ∼ Ber(pi ) ∀u = (y) , and for each (ri , rj ) pair in Nd , Xu 1, . . . , mri rj are all mutually indepedent random variables. With the aid of the Rozovsky lower bound [29], we are able to prove the following auxiliary result. P Lemma 7.3: If i<j:(ri ,rj )∈Nd mri rj Ipi pj → ∞, then ( ) mri rj     X X X (rj ) (ri ) P ≥ 0 ≥ exp − (1 + o(1)) Cri rj Xu − Xu mri rj Ipi pj . i<j:(ri ,rj )∈Nd u=1 (44) i<j:(ri ,rj )∈Nd Proof of Theorem 7.1. Finally, since the Bayesian risk always lower bound the minimax risk, we have σ , σ) R∗d = inf sup Eσ ℓ(b σ , σ) ≥ inf sup Eσ ℓ(b σ b σ∈Θ0d σ b σ∈ΘL d ≥ inf Rσ∼Unif (b σ ) = inf Rσ∼Unif (b σ (1)) σ b σ b ( ) mri rj   X X ≥P Cri rj Xu(rj ) − Xu(ri ) ≥ 0 i<j:(ri ,rj )∈Nd u=1 ≥ exp February 6, 2018  − (1 + o(1)) X i<j:(ri ,rj )∈Nd  mri rj Ipi pj . DRAFT 24  VIII. E XPERIMENTAL R ESULTS The advantage of clustering with a hypergraph representation over traditional graph-based approaches has been reported in the literature [11], [16], [18], [21]. Here, we present a comparative study of our two-step algorithm on generative 3-hSBM data with existing method, which manifests that our proposed algorithm indeed has a better performance and that the second refinement step is actually crucial in achieving a lower risk. In the following summary statistics, Algo 2 refers to our first-step spectral clustering (i.e. Algorithm 2) and Algo 1 refers to the combined two-step workflow (i.e. Algorithm 1 on top of Algorithm 2). We separate them apart to further see how much it can be improved on the mismatch ratio by using the local refinement mechanism. We compare the performance of our Algorithm 2 and Algorithm 1 with the spectral non-uniform hypergraph partitioning (SnHP) method [21] using the hypergraph Laplacian proposed in [16] on generative 3-hSBM data. The parameter space tested is homogeneous and exactly equal-sized, which means that each community has the same number of members. This ”nodes per community” parameter n′ = n/k scales from 20, 30, · · · to 100, while the number of communities k varies from 2, 3, · · · to 10. We set the connecting probability parameter p to be (60, 30, 10) × log(n)/n2 for each possible value of n = k × n′ . Note that the order of p is as prescribed for the sparse regime discussed in Section VI. The choice of this particular triplet is to ensure that the generated hypergraphs are not too sparse to be connected. Specifically, the total number of realized hyperedges are roughly in the order of 4n log(n) to 5n log(n). The performance under each scenario, i.e. each pair of (k, n′ ), is averaged over 25 random realizations. Figure 1 below summarizes our simulation results. Except for the first few scenarios where the total number of nodes n are quite small, we can see that our spectral clustering algorithm performs roughly as well as the algorithm in [21]. This somewhat indicates that the weak consistency condition Condition 6.1 can also be satisfied by using the hypergraph Laplacian proposed by [16] as the first initialization step. Furthermore, the refinement scheme indeed has a better performance of the spectral clustering method in terms of the mismatch ratio. Observe that the improvement due to the second step becomes larger as k (and hence n) increases. IX. D ISCUSSIONS The idea of using the hypergraph Laplacian matrix in the clustering problem can be traced back to [16]. However, statistical guarantee of its performance remains open. Theoretical guarantees of our hypergraph clustering method developed in Subsection VI-B can be viewed as an answer to this open question. The proposed hypergraph clustering method basically encodes the group-wise interactions in an effective weighted graph, where the weight of each edge records the number of hyperedges involving the two nodes. This is very similar to the Labeled SBM model studied in previous works [9], where each edge takes on a nonnegative weight (label) in a finite field and the appearance of each edge is independent to the rest of the graph. The key difference between our algorithm and those in Labeled SBM hence lies in the refinement step: for our d-hSBM model, values of weight on the edges of the effective weighted graph are not mutually independent, as they are compressed February 6, 2018 DRAFT 25 k=3 Ln Algo 2 Algo 1 0.06 Mismatch Ratio 0.05 0.04 0.03 0.02 0.01 20 30 40 50 60 70 80 90 100 nPrime (a) k = 3 k=3 Ln Algo 2 Algo 1 0.35 0.3 Mismatch Ratio 0.25 0.2 0.15 0.1 0.05 20 30 40 50 60 70 80 90 100 nPrime (b) k = 6 Fig. 1. Performance of Algo 2 and Algo 1 Compared to the Spectral Method [21]. results from higher-order interactions. The independence assumption in Labeled SBM may not be practical in some applications. When viewed as the level of participation in various group interactions among the network, the weight between two entities may well depend on a hidden third party. Our approach can thus serve as a solution to that problem, since we directly treat the group-wise interactions in a higher-order form in the local refinement step. After exploring the similarities and differences between Labeled SBM and hypergraph SBM, an even more complete treatment of the problem of community detection would be a generalization of d-hSBM to a weighted (or labeled) version. In either the Bayesian framework [9] or the minimax setting [30], it turns out that the Rényi divergence of order 1/2 still appears in the characterization of the threshold behavior of exact recovery. Extending from the February 6, 2018 DRAFT 26 divergence between two simple Bernoulli distributions, in a labeled observation of the network the Rényi divergence becomes ℓ Ipq   R p  −2 log ∞ p (x)q (x)dx n n −∞ =   p  −2 log P p (ℓ)q (ℓ) n n ℓ≥0 , for continuous distribution on R (45) , for discrete distribution on N between two more general edge weight distributions pn (x) and qn (x). Note that (3) is a special case of (45) when ℓ pn (x) = Ber(p) and qn (x) = Ber(q). We envision that Ipq would play a major role characterizing the minimax risk in the extended labeled d-hSBM model as well, and leave it for a possible direction of future work. Specifically, we conjecture that the minimax risk in such a labeled hypergraph probabilistic model would also be an exponentially decaying risk and the error exponent would be in the form of X mri rj Ipℓi pj i<j:(ri ,rj )∈Nd where Ipℓi pj is the Rényi divergence of order 1/2 between two hyperedge weight distributions pi = pi (x) and pj = pj (x). Finally, we would like to comment on the extendability of the two-step algorithm and our proof techniques. The refine-after-initialization methodology is introduced in [10] to achieve the minimax risk. We generalize this idea to the hypergraph setting and reach the conclusion that the minimax risk in d-hSBM is also an exponential rate. Besides, the exponent of the minimax risk consists of terms of pairwise comparison which are one node different. This can be directly identified with the case that is most difficult to recover where there is only one node mis-classified. The matching of the form of the local MLE risk to the form derived in the converse is the key for proving optimality. The robustness of our two-step algorithm lies in the fact that it is able to achieve the minimax risk under any probabilistic model that assumes the independence of each “group-wise” interaction. The estimator of the parameters is adapted to the hypothesized probabilistic model and the local likelihood function is adjusted accordingly. Hence, with a different underlying probabilistic model, we believe the two-step algorithm and our proofs will still work, as long as the refinement step is adjusted according to the model. R EFERENCES [1] C. Y. Lin, I. E. Chien, and I. H. Wang, “On the fundamental statistical limit of community detection in random hypergraphs,” in 2017 IEEE International Symposium on Information Theory (ISIT), June 2017, pp. 2178–2182. [2] I. E. Chien, C.-Y. Lin, and I.-H. Wang, “Community detection in hypergraphs: Optimal statistical limit and efficient algorithms,” in 2018 International Conference on Artificial Intelligence and Statistics, April 2018, to be published. [3] P. W. Holland, K. B. Laskey, and S. Leinhardt, “Stochastic blockmodels: First steps,” Social Networks, vol. 5, no. 2, pp. 109–137, 1983. [4] A. Condon and R. M. Karp, “Algorithms for graph partitioning on the planted partition model,” Random Structures and Algorithms, vol. 18, no. 2, pp. 116–140, March 2001. [5] E. Abbe, A. S. Bandeira, and G. Hall, “Exact recovery in the stochastic block model,” IEEE Transactions on Information Theory, vol. 62, no. 1, pp. 471–487, 2016. [6] E. Abbe, “Community detection and stochastic block models: recent developments,” CoRR, vol. abs/1703.10146, 2017. [7] A. Y. Zhang and H. H. Zhou, “Minimax rates of community detection in stochastic block models,” Ann. Statist., vol. 44, no. 5, pp. 2252–2280, 10 2016. [8] E. Abbe and C. Sandon, “Community detection in general stochastic block models: Fundamental limits and efficient algorithms for recovery,” 2015 IEEE 56th Annual Symposium on Foundations of Computer Science, pp. 670–688, Oct 2015. February 6, 2018 DRAFT 27 [9] S.-Y. Yun and A. Proutiere, “Optimal cluster recovery in the labeled stochastic block model,” ArXiv e-prints, October 2015. [10] C. Gao, Z. Ma, A. Y. Zhang, and H. H. Zhou, “Achieving optimal misclassification proportion in stochastic block models,” Journal of Machine Learning Research, vol. 18, no. 60, pp. 1–45, 2017. [Online]. Available: http://jmlr.org/papers/v18/16-245.html [11] S. Agarwal, J. Lim, L. Zelnik-Manor, P. Perona, D. Kriegman, and S. Belongie, “Beyond pairwise clustering,” in 2005 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR’05), vol. 2, 6 2005, pp. 838–845 vol. 2. [12] O. Duchenne, F. Bach, I. S. Kweon, and J. Ponce, “A tensor-based algorithm for high-order graph matching,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 33, no. 12, pp. 2383–2395, 12 2011. [13] C. Zhang, S. Hu, Z. G. Tang, and T.-H. H. Chan, “Re-revisiting learning on hypergraphs: Confidence interval and subgradient method,” in Proceedings of the 34th International Conference on Machine Learning, ser. Proceedings of Machine Learning Research, D. Precup and Y. W. Teh, Eds., vol. 70. International Convention Centre, Sydney, Australia: PMLR, 06–11 Aug 2017, pp. 4026–4034. [14] J. Y. Zien, M. D. F. Schlag, and P. K. Chan, “Multilevel spectral hypergraph partitioning with arbitrary vertex sizes,” IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, vol. 18, no. 9, pp. 1389–1399, 9 1999. [15] S. Agarwal, K. Branson, and S. Belongie, “Higher order learning with graphs,” Proceedings of International Conference on Machine Learning (ICML), pp. 17–24, 2006. [16] D. Zhou, J. Huang, and B. Schölkopf, “Learning with hypergraphs: Clustering, classification, and embedding,” in NIPS, vol. 19, 2006, pp. 1633–1640. [17] S. R. Buló and M. Pelillo, “A game-theoretic approach to hypergraph clustering,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 35, no. 6, pp. 1312–1327, 6 2013. [18] D. Ghoshdastidar and A. Dukkipati, “A provable generalized tensor spectral method for uniform hypergraph partitioning,” in Proceedings of the 32nd International Conference on Machine Learning, ICML 2015, 2015, pp. 400–409. [19] P. Li, H. Dau, G. Puleo, and O. Milenkovic, “Motif clustering and overlapping clustering for social network analysis,” arXiv preprint arXiv:1612.00895, 2016. [20] D. Ghoshdastidar and A. Dukkipati, “Consistency of spectral partitioning of uniform hypergraphs under planted partition model,” in Advances in Neural Information Processing Systems 27: Annual Conference on Neural Information Processing Systems 2014, 2014, pp. 397–405. [21] ——, “Consistency of spectral hypergraph partitioning under planted partition model,” Ann. Statist., vol. 45, no. 1, pp. 289–315, 02 2017. [22] M. C. Angelini, F. Caltagirone, F. Krzakala, and L. Zdeborová, “Spectral detection on sparse hypergraphs,” in Communication, Control, and Computing (Allerton), 2015 53rd Annual Allerton Conference on. IEEE, 2015, pp. 66–73. [23] K. Ahn, K. Lee, and C. Suh, “Community recovery in hypergraphs,” in Allerton Conference on Communication, Control and Computing. UIUC, 2016. [24] Y. Chen and C. Suh, “Spectral MLE: top-k rank aggregation from pairwise comparisons,” in Proceedings of the 32nd International Conference on Machine Learning, ICML 2015, 2015, pp. 371–380. [25] A. W. Marshall, I. Olkin, and B. C. Arnold, Inequalities: Theory of Majorization and its Applications, 2nd ed. Springer, 2011, vol. 143. [26] U. Von Luxburg, “A tutorial on spectral clustering,” Statistics and computing, vol. 17, no. 4, pp. 395–416, 2007. [27] P. Chin, A. Rao, and V. Vu, “Stochastic block model and community detection in sparse graphs: A spectral algorithm with optimal rate of recovery.” in COLT, 2015, pp. 391–423. [28] C. Davis and W. M. Kahan, “The rotation of eigenvectors by a perturbation. iii,” SIAM Journal on Numerical Analysis, vol. 7, no. 1, pp. 1–46, 1970. [29] L. Rozovsky, “A lower bound of large-deviation probabilities for the sample mean under the cramér condition,” Journal of Mathematical Sciences, vol. 118, no. 6, pp. 5624–5634, 2003. [30] V. Jog and P. Loh, “Information-theoretic bounds for exact recovery in weighted stochastic block models using the renyi divergence,” CoRR, vol. abs/1509.06418, 2015. [31] N. Alon and J. H. Spencer, The probabilistic method. John Wiley & Sons, 2004. [32] J. Lei, A. Rinaldo et al., “Consistency of spectral clustering in stochastic block models,” The Annals of Statistics, vol. 43, no. 1, pp. 215–237, 2015. February 6, 2018 DRAFT 28 A PPENDIX A P ROOF OF L EMMA 6.2 Fix any (B, σ) ∈ Θ0d and u ∈ [n]. We denote the induced community structure on the n nodes as [n] = ∪ki=1 Ci where Ci = {v ∈ [n] | σ(v) = i} is the i-th comomunity. Define the event  Eu , ℓ0 ((b σu )πu , σ) ≤ γ (46) For simplicity, we assume that πu is the identity permutation. Fix any i ∈ [k]. Then, on Eu we have eu ∩ Ci ≤ γ2 n eu ∩ Ci ≥ ni − γ1 n, C ni ≥ C i i (47) e u replaced where γ1 , γ2 ≥ 0 and γ1 + γ2 ≤ γ. Let Ci′ be a deterministic subset of [n] such that (47) holds with C i by Ci′ . By definition, there are at most    γn   X γn  X 1 n − ni ni ≤ exp C1 γn log m l m=0 γ (48) l=0 different subsets with this property for some absolute constant C1 > 0. In the following, we will go through the b u − Bi·1 ≤ o(max(i,j):(r ,r )∈N pi − pj ) where i · 1 , (i, i, . . . , i) corresponds to the all-community-i case B i·1 i j d connection. For the rest of the cases, we can easily follow an similar procedure to obtain the desired upper bound.  Let ξi′ be the edges within Ci′ . Note that ξi′ consists of ndi independent Bernoulli random variables. The number  of truly Ber(Bi·1 )’s is at least ni −γn . By an simple combinatorial argument, we have d ( ) # " |ξi′ | d pi − (1 − (1 − t) )(pi − pKd ) ≥ min E (49) |Ci′ | t∈[0,γk] " E d ( ) # |ξi′ | ≥ max pi + (1 − (1 − t)d )(p1 − pi ) |Ci′ | t∈[0,γk] (50) d Note that pi equals p1 in this case. In general, though, the estimation of all the parameters have a similar formula, and therefore we use pi still. Since d is constant, (49) becomes pi − o(max(i,j):(ri ,rj )∈Nd pi − pj ) by breaking pi − pKd into pairwise difference. Similarly, (50) would be pi + o(max(i,j):(ri ,rj )∈Nd pj − pi ) (since kγ = o(1) is assumed). Together, " E #   |ξi′ | − B ≤ o max p − p i·1 i j |Ci′ | (i,j):(ri ,rj )∈Nd (51) d On the other hand, by the Bernstein’s inequality, P Let |ξi′ | − E |ξi′ | > t ≤ 2 exp  − 2 t2   ni −γn p1 + 32 t d    2 ni − γn p1 C1 γn log γ −1 + (3 + δ) log n ∨ 2C1 γn log γ −1 + 2(3 + δ) log n d 2  ′ p n −1 d−1 −1 . n p1 γ log γ + γn log γ k d−1 t2 = We have P    |ξi′ | February 6, 2018 − E |ξi′ |   n′ p  −1 d−1 −1 ≤ exp −C1 γn log γ −1 n−(3+δ) > Cδ d−1 n p1 γ log γ + γn log γ k DRAFT 29 Hence, with probability at least , we have  1 − exp −C1 γn log γ −1 n−(3+δ) # "   p  1 d−1 |ξi′ | k3 |ξi′ | −1 d−1 p γ log γ −1 + γ log γ ≤ C − E n δ 1 |Ci′ | |Ci′ | n n2 d d Since kγ log γ −1 = O(1) and with the assumption max(i,j):(ri ,rj )∈Nd mri rj Ipi pj → ∞, p1 ≈ pKd , we further have # "   |ξi′ | |ξi′ | (52) ≤ o max p − p − E i j |Ci′ | |Ci′ | (i,j):(ri ,rj )∈Nd at least 1 − exp −C1 γn log γ (48), we have −1  d n d −(3+δ) in probability. Combining (52), (51) and apply the Union Bound over   |ξi′ | ≤ o max p − p − B i j i·1 |Ci′ | (i,j):(ri ,rj )∈Nd d with probability at least 1 − n−(3+δ) . The proof for the rest Bs , s ∈ [k]d are all similar and thus omitted. The key observation is that by the requirement on γ, we will only have o(1) misclassification proportion. This implies that for each sample mean, the proportion of ”correct” random variables will dominate the ”incorrect” ones. Thus, we obtain the result of the expectation of sample mean will deviate from the true parameter no larger than o(max(i,j):(ri ,rj )∈Nd pi − pj ). The second part bound the probability that the sample mean deviates too much from its expectation. Note that we can choose a proper t in the Berstein’s inequality to make sure that the error probability will still be desirably small after the union bound. Hence, we complete the proof. A PPENDIX B P ROOF OF L EMMA 6.3 Without loss of generality, we assume that πu is the identity permutation and node u belongs to the first community. Also, the access index is denoted as iu , (u, i2 , . . . , id ) and Mp (t) , pet + 1 − p is the MGF of a Ber(p) random variable. We have P {b σu (u) 6= 1 and Eu } ≤ X pl l6=1 where Eu is the event (46) of a good initialization. On Eu , pl is defined as the probability of the following error event. n o b u (b b u (b L σu , t; A) ≥ L σu , 1; A) (53) Recall that the initial method σ bu determines all the assignments except for the u-th node before the refining σ b process. We write iu ∼u r(tu ) to indicate the fact that now the community relation r within nodes u, i2 , . . . , id depends on the label of node u, which is to be decided. Similarly, we denote the estimated connection probability parameter pb as pb(tu ). Then, the event (53) is equivalent to  X 1 − pb(1) pb(l)(1 − pb(1)) + log ≥0 Aiu log pb(1)(1 − pb(l)) 1 − pb(l) iu February 6, 2018 DRAFT 30 Note that the summation is over all possible i2 < · · · < id . We can also write (53) in the form of pairwise p b (l)(1−b pj (1)) 1−b pi (1) b b comparison. Specifically, let νbij = νbij (1, l) , log pbij (1)(1−b pi (l)) and λij = λij (1, l) , log 1−b pj (l) . The error event is thus further equal to  X (i,j):(ri ,rj )∈Nd  σ b X iu ∼u r(1)=ri σ bu iu ∼ r(l)=rj (1,l) The inner two summations contain nij (1,l) nij bij + νbij Aiu + λ σ b X iu ∼u r(1)=rj σ bu iu ∼ r(l)=ri   bji ≥ 0 νbji Aiu + λ (54) (1,l) and nji random variables, respectively, where o n σ b σ b , iu | iu ∼u r(1) = ri and iu ∼u r(l) = rj (1,l) Observe that not all Aiu ’s in the summand associated with nij would really be Ber(pi ). The reason is that there are still a few nodes misclassified by the initialization σ bu . Nevertheless, since we require that σ bu satisfy (1,l) Condition 6.1, it can be shown that there are only o(1)nij (1,l) nij of random variables in the summand associated with are not Ber(pi ). Therefore, we can apply the Chernoff bound on P {(54)} to obtain P {(54)} ≤ where Y (i,j):(ri ,rj )∈Nd (Part 1 · Part 2) (55)  1  (1,l)  (1,l) νij nij bji (n(1,l) − n(1,l) ) · Mp νbij nji Mp −b Part 1 = exp − λ j i ij ji 2 2 2 and Part 2 = " ν bij 2 ) sup ν bij p∈{p1 ,...,pKd } Mj ( 2 ) Mp ( (1,l) #O(kγ)nji " · ν bij 2 ) sup −b νij p∈{p1 ,...,pKd } Mi ( 2 ) Mp (− (1,l) #O(kγ)nij First, since the parameter space we consider is an approximately equal-size one, each community has a size (1 ± o(1))n′ . In addition, Condition 6.1 makes sure that the community size generated from σ bu will still lie in (1 ± o(1))n′ . Thus, it is easy to find that (1,l) nij (1,l) ≍ nji ≍ mri rj ∀l 6= 1 Moreover, by a similar combinatorial argument as in our proof of Lemma 6.2, we know that the proportion of (1,l) wrongly added random variables is O(kγ). That is the reason we use O(kγ)nij for the number of wrongly added random variables. In the following, we are going to show that Part 1 can be upper bounded by exp(−(1 − o(1))mri rj Ipi pj ) and Part 2 can be upper bounded by a vanishing term with respect to Part 1. With a similar technique as in [10], we could immediately prove that Part 1 ≤ exp(−(1 − o(1))mri rj Ipi pj ) (56) For the second part, we have, for all i < j,   ν bij ν b pi − pj − 2ij 2 max e −1 , e − 1 ≤ C2 pi February 6, 2018 DRAFT 31 for some constant C2 > 0. Thus, ν bij 2 ) sup ν bij p∈{p1 ,...,pKd } Mj ( 2 ) Mp ( =1+ (p − pj ) e sup ν bij 2 ν bij −1  pj e 2 + 1 − pj  (p − pj )(pi − pj )  ≤1+O sup pi p∈{p1 ,...,pKd }    (p − pj )(pi − pj )  ≤ exp O sup pi p∈{p1 ,...,pKd } p∈{p1 ,...,pKd } The second term of Part 2 can be bounded similarly. Together, Part 2 is upper bounded by   (p − pj )(pi − pj ) sup exp O(kγ)mri rj pi p∈{p1 ,...,pKd } (57) 1) (21) holds: Then, (57) is upper bounded by   1  mri rj Ipi pj = exp(o(1)mri rj Ipi pj ) exp o log k 2) k is a constant: Then, (57) is upper bounded by  exp o(1)mri rj max (i,j):(ri ,rj )∈Nd Iri rj  Note that this term will still be absorbed to the term in the summation corresponds to max(i,j):(ri ,rj )∈Nd Iri rj since k = O(1). P (i,j):(ri ,rj )∈Nd mri rj Ipi pj that Combining (56) and (57) into (55) in either case, we complete the proof. A PPENDIX C P ROOF OF L EMMA 6.5 First, we state the lemmas that we are going to use. P Lemma 3.1: For independent Bernoulli random variables Xu ∼ Ber(pu ) and p = n1 u∈[n] pu , we have    X   t  (Xu − pu ) ≥ t ≤ exp t − (np + t) log 1 + P , ∀t ≥ 0 np u∈[n] This lemma is Corollary A.1.10 in [31]. Lemma 3.2: Consider the matrix AH , L(A) derived from the unnormalized graph Laplacian for a realization hyP pergraph A. Also, denote PH , EL(A) as its expected version for ease of notation. Suppose maxu∈[n] v∈[n] (AH )uv ≤ d˜ and for any S, T ⊂ [n], one of the following statements hold with some constant C > 0: 1) e(S,T ) d̃ |S||T | n ≤C 2) e(S, T ) log( e(S,T )d̃ ) ≤ C|T | log |Tn | |S||T | n p P P P where e(S, T ) = u∈S v∈T (AH )uv . Then, (u,v)∈U xu (AH )uv yv ≤ C ′ d˜ uniformly over all unit vectors x, y,  √  where U = (u, v) | |xu yv | ≥ nd̃ and C ′ > 0 is some constant. Note that this is the direct result to the Lemma 21 in [27].  Lemma 3.3: For any τ > C nd−1 p1 + 1 with some sufficiently large C > 0, we have {u ∈ [n] | du ≥ τ } ≤ February 6, 2018 n τ DRAFT 32 with probability at least 1 − exp (−C ′ n) for some constant C ′ > 0. Proof. Note that in this lemma, the edges e(S) and e(S, S c ) are counting the actual hyperedges in A. This is different from the definition in Lemma 3.2. Let us consider a subset of nodes S ⊂ [n] which contains all nodes with degree at least τ and |S| = l for some l ∈ [n]. By the requirement on S, we have either e(S) ≥ C1 lτ or e(S, S c ) ≥ C1 lτ for some constant C1 . We want to show that both P {e(S) ≥ C1 lτ } and P {e(S, S c ) ≥ C1 lτ } are   l  Pd−1 small. First, observe that e(S) consists of dl Bernoulli random variables and e(S, S c ) consists of s=1 n−l s d−s Bernoulli random variables. Thus, Ee(S) ≤ C2 ld p1 and Ee(S, S c ) ≤ C2 nd−1 lp1 for some constant C2 . Then, when  τ > C nd−1 p1 + 1 for some sufficiently large C > 0, we have P {e(S) ≥ C1 lτ } = P {e(S) − Ee(S) ≥ C1 lτ − Ee(S)}    C1 lτ ≤ exp C1 lτ − Ee(S) − C1 lτ log Ee(S)    C1 τ ≤ exp C1 lτ − C1 lτ log C2 nd−1 p1 ≤ exp (C1 lτ − C1 lτ log(C3 )) by Lemma 3.1 where C3 = ≤ exp (−C4 lτ ) C1 C C2 for some C4 > 0 where the last inequality holds since C3 is sufficiently large. Similarly, the same bound applies for P {e(S, S c ) ≥ C1 lτ } Thus, by Union Bound P {|{u ∈ [n] | du ≥ τ }| > ξn} ≤ X l>ξn   en  · exp (−C4 lτ ) ≤ exp(−C5 n) 2 exp l log l where we choose ξ = τ1 . We are done.  Lemma 3.4: Given τ > 0, define the subset J = {u ∈ [n] | du ≤ τ }. Then for any C ′ > 0, there is some constant C > 0 such that k(AH )JJ − (PH )JJ kop ≤ C ′ with probability at least 1 − n−C . p √ nd−1 p1 nd−1 p1 + τ + p √ nd−1 p1 + τ ! Proof. By definition, k(AH )JJ − (PH )JJ kop = sup X x,y∈S n−1 (u,v)∈J×J  xu (AH )uv − (PH )uv yv where x, y are some unit vectors lying on the unit sphere S n−1 in Rn−1 . Define the following two sets  o n √ p L = (u, v) : |xu yv | ≤ τ + nd−1 p1 /n n √  o p U = (u, v) : |xu yv | ≥ τ + nd−1 p1 /n February 6, 2018 DRAFT 33 Then we have k(AH )JJ − (PH )JJ kop ≤ X sup x,y∈S n−1 (u,v)∈L∩J×J + X sup x,y∈S n−1 (u,v)∈U∩J×J  xu (AH )uv − (PH )uv yv  xu (AH )uv − (PH )uv yv We will upper-bound these two parts separately. First we bound the light pairs {(u, v) ∈ L}. A discretization argument as in [27] implies that X  xu (AH )uv − (PH )uv yv . max max sup x,y∈N S⊂[n] x,y∈S n−1 (u,v)∈L∩J×J X (u,v)∈L∩S×S  xu (AH )uv − E(AH )uv yv n o p p p √ ˜ where N ⊂ S n−1 and |N | ≤ 5n . Let ruv = xu yv 1 |xu yv | ≤ d/n and d˜ = τ + nd−1 p1 . Then, ) ( p X  ˜ P ruv (AH )uv − E(AH )uv ≥ C d u<v =P =P =P ≤ ( ( ( X u<v id :i3 <···<id X 3 X u<v id :i3 <···<id 3 X ( ruv Au,v,id3 − EAu,v,id3  ruv Au,v,id3 − EAu,v,id3  X X P X 1≤a<b≤d ( X id 1 :i1 <···<id   exp − (ria ib ) Aid1 − EAid1  P r2 id 1 :i1 <···<id ia ib +  p ) d˜ by definition ) p ˜ ≥ C1 d ria ib ) Aid1 − EAid1 1/2C22 d˜ p1 ≥C  1≤a<b≤d id 1 :i1 <···<id 1≤a<b≤d ≤2 X ) p ≥ C1 d˜ ) p ≥ C2 d˜ √ d̃ 2 3 n C2 where C1 = C × (d − 2)! simple rearrangement according to independent terms (a) Union bound, C2 = C1 /   p  d˜   d 2 Bernstein’s inequality    d 1/2C22 d˜ √ ≤2 exp − (b) p  2 2p1 nd−2 + 32 nd̃ C2 d˜    C22  d since d˜ > p1 nd−1 ≤2 exp − n 2 4 + 4C3 2 P P The inequality (b) holds since ia <ib ri2a ib ≤ 2 1≤ia <ib ≤n x2ia yi2b ≤ 2nd−2 (recall that x, y are all unit vectors). Then, we apply the Union Bound over the space N and the other half of the Laplacian matrix AH , we have √  p X  xu (AH )uv − E(AH )uv yv ≤ C max max τ + nd−1 p1 x,y∈N S⊂[n] (u,v)∈L∩S×S with probability at least 1 − exp (−C ′ n). Thus, we complete the bound for light pairs. Here we want to highlight that the the above argument are all similar to [27], except the key step (a). Step (a) allows us to obtain a similar result under the d-hSBM setting. Next we show how to bound the heavy pairs {(u, v) ∈ U }. Similar to [10], we bound X xu (AH )uv yv sup (58) x,y∈S n−1 (u,v)∈U∩J×J February 6, 2018 DRAFT 34 and X sup xu (PH )uv yv x,y∈S n−1 (u,v)∈U∩J×J separately. By the definition of U , we have X sup x,y∈S n−1 (u,v)∈U∩J×J xu (PH )uv yv ≤ sup X x,y∈S n−1 (u,v)∈U∩J×J nd−1 p1 x2u yv2 (PH )uv ≤ p √ |xu yv | nd−1 p1 + τ The last equation hold since maxu,v (PH )uv ≤ nd−2 p1 . Then, we bound (58). Note that by the definition of the set J, the degree of the sub-graph (AH )JJ is bounded above by τ . We need to prove that the condition (the discrepancy ′ property) of Lemma 3.2 is satisfied with d˜ = τ + nd−1 p1 with probability at least 1 − n−C . The proof mainly follows the arguments in [32] and apply the Union Bound to make sure the independence (like what we have done in (a) above) . We have sup X x,y∈S n−1 (u,v)∈U∩J×J xu (AH )uv yv ≤ C  √ p τ + nd−1 p1 ′ with probability at least 1 − n−C . Together with all the results above, we are done.  Now we are ready to prove Lemma 6.5. Proof. By triangle inequality, kTτ (AH ) − PH kop ≤ kTτ (AH ) − Tτ (PH )kop + kTτ (PH ) − PH kop Then we have kTτ (AH ) − Tτ (PH )kop = k(AH )JJ − (PH )JJ kop , which is bounded by Lemma 3.4. By Lemma with probability at least 1 − exp (−C ′ n). This implies √ d−1 √ r 2 2n · maxi,j (PH )u,v 2n p1 c √ √ kTτ (PH ) − PH kop ≤ kTτ (PH ) − PH kF ≤ 2n |J | max(PH )u,v ≤ ≤ i,j τ τ   d−1 d−1 Taking τ ∈ C1 (1 + n p1 ), C2 (1 + n p1 ) . Proof completed.  3.3, we have |J c | ≤ n τ A PPENDIX D P ROOF OF L EMMA 6.1 We start from analyzing the entries of PH . Recall that PH , EL(A) for an adjacency tensor A. Under the transformation from a d-dimensional tensor into a two-dimensional matrix, each entry in PH is a weighted combination of the probability parameters pi ’s. To be specific, (PH )ij aggregates the contribution from other nodes u ∈ [n] \ {u, v}, and the value depends on the community relation induced by each hyperedge correspondingly. Depending on whether or not the two nodes u and v are in the same community, we have, ∀i 6= j   u σ(i) = σ(j) (PH )ij ≈  v , otherwise. February 6, 2018 (59) DRAFT 35 The explicit expression for (PH )ij changes for different values of d, the order of the underlying hypergraph. Observe that u ≥ v since we assume that pi ’s are in decreasing order, i.e. pi > pj for i < j. Below are u, v for the case d = 3 and 4. When d = 3   u ≈ (n′ )2   u ≈ n′ (p + (k − 1)q) (60)  v ≈ n′ (2q + (k − 2)r)   + k−1 2 p4 When d = 4  v ≈ (n′ )2 p2 + p3 + 5(k−2) p4 + k−2p5  2 2 1 2 p1 + (k − 1)p2 + k−1 2 p3 (61) Deducting v for each entry in PH , we have PH − (1 − η)v1n 1Tn ≈ (u − v) where vt is defined as vt = 0Tn1 , . . . , 1Tnt , . . . , 0Tnk other. Therefore, λk k X vt vtT t=1 By Weyl’s inequality, λk (PH ) ≥ (u − v) λk k X t=1 T ! vt vtT k X vt vtT (62) t=1 k for each t ∈ [k]. Note that {vt }t=1 are orthogonal to each ≥ min nt ≥ (1 − η)n′ t∈[k] !  + λn (1 − η)v1n 1Tn & (n′ ) (u − v) To further control u − v, let’s first look at a few cases for lower-order d. For the case d = 3, we have  u − v ≈ n′ p − q + (k − 2)(q − r) while for the case d = 4,     1 1 k−2 k−1 u − v ≈ (n′ )2 (p1 − p2 ) + (p2 − p3 ) + (k − 2)(p3 − p4 ) + (p2 − p4 ) + (p4 − p5 ) 2 2 2 2 P Note that u−v could be represented as a weighted sum of pairwise comparisons, that is, i<j:(ri ,rj )∈Nd Mri rj (pi − pj ) for some Mri ,rj ’s. Recall that in our definition, (i, j) : (ri , rj ) ∈ Nd if the hyperedges of type ri and rj have community assignments that differ on only one node. The new coefficient Mri rj would be similar to mri rj . In fact, they will only differ up to a constant related only to d (in fact, up to d − 1). Moreover, n′ Cri rj ≥ mri rj for all possible (ri , rj ). When counting, in mri ,rj we fix one dimension (the first dimension to node 1), while in Mri ,rj two dimensions are fixated at u and v. Essentially, u − v counts the difference of the number of random variables between two assignments, one being σ(u) = σ(v) and the other being otherwise. Without loss of generality, we may think of the community labeled of u as a fixed number as in the operational definition of mri ,rj , while the community label of v should be different from σ(u). By multiplying back n′ to get the expression n′ Mri ,rj , we unshackle v and allow it to vary within the σ(v)-th community, the cardinality of which is approximately n′ . Undoubtedly, there are double countings in both the number mri ,rj and Mri ,rj . The value of mri ,rj is normalized with respect to d − 1 companions (only one dimension is fixed), while the value of Mri ,rj is normalized with respect to d − 2 companions (two dimension are fixed). As a result, there are still some February 6, 2018 DRAFT 36 l = (u, v, l3 , . . . , ld )’s being doubled counted in coefficient n′ Mri ,rj as opposed to coefficient mri ,rj . This is the reason why the former is always larger than or equal to the latter. Recall that the probability parameter p = {p1 , . . . , pκd } follows the majorization rule, which means that pi > pj for all i < j. Combined with these fact, we have X λk (PH ) & (n′ ) (i,j):(ri ,rj )∈Nd Cri rj (pi − pj ) & X (i,j):(ri ,rj )∈Nd mri rj (pi − pj ) Hence we complete the proof. A PPENDIX E P ROOF First recall that Rσ∼Unif (b σ (1)) = OF L EMMA 7.2 1 X Eσ ℓ(σ(1), σ b(1)) |ΘL d| L σ∈Θd In order to connect Rσ∼Unif (b σ (1)) with the risk function of a hypothesis testing problem, we shall find an equivalent form of Eσ ℓ(σ(1), σ b(1)). The idea is to find another assignment σ ′ such that d(σ, σ ′ ) = dH (σ(1), σ ′ (1)) = 1. σ ′ is the most indistinguishable opponent against σ in the sense that their assignments differ by only one node. Specifically, for each σ0 ∈ ΘL d , we construct a new assignment σ[σ0 ] based on σ0 :  σ[σ0 ](1) = arg min nσ0 (i) = n′ 2≤i≤n L and σ[σ0 ](i) = σ0 (i) for 2 ≤ i ≤ n. Note that {i | nσ0 (i) = n′ } 6= ∅ ∀σ0 ∈ ΘL d and σ[σ0 ] ∈ Θd . In addition, for any L L σ1 , σ2 ∈ ΘL d , we can see that σ1 6= σ2 if and only if σ[σ1 ] 6= σ[σ2 ]. Therefore, {σ0 | σ0 ∈ Θd } = {σ0 | σ0 ∈ Θd } and thus Rσ∼Unif (b σ (1)) = X 1 b (1)) Eσ0 ℓ(σ0 (1), σ L |Θd | L σ0 ∈Θd = X 1  1 b(1)) + Eσ[σ0 ] ℓ(σ[σ0 ](1), σ b(1)) Eσ0 ℓ(σ0 (1), σ L 2 |Θd | L σ0 ∈Θd In the testing problem, we can use the optimal Bayes risk as a lower bound. Let σ bBayes be an assignment that  b(1)) + Eσ[σ0 ] ℓ(σ[σ0 ](1), σ b(1)) . Notice that σ bBayes (1) is a achieves the minimum Bayes risk inf σb 21 Eσ0 ℓ(σ0 (1), σ Bayes estimator concerning the 0-1 loss, indicating that σ bBayes (1) must to be the mode of the posterior distribution. Roughly speaking, the team who has a larger value of sum of the supporting random variables wins the test. Grouping terms together according to each community relation, the log-likelihood function under the true community assignment σ0 given an observation A becomes L(σ0 ; A) = log P{A | σ0 } = February 6, 2018 X l=(1,l2 ,...,ld )  n o pi σ log + log p¯i Al 1 l ∼0 ri p¯i i=1 Kd X DRAFT 37 Similarly, we can obtain the expression L(σ[σ0 ]; A) when the underlying community assignment changes to σ[σ0 ]. Hence, the probability of error is bBayes (1)) = Pσ0 {L(σ[σ0 ]; A) ≥ L(σ0 ; A)} Eσ0 ℓ(σ0 (1), σ ( ) mri rj  X X  (rj ) (ri ) =P ≥0 Xu − Xu (63) i<j:(ri ,rj )∈Nd u=1 where where f (s) , s 1−s (r ) i.i.d. j for Cxy , log ff (x) (y) , and for each (ri , rj ) pair in Nd , Xu (r ) i.i.d. ∼ Ber(pj ), Xu i ∼ Ber(pi ) ∀u = 1, . . . , mri rj are all mutually indepedent random variables. Note that when summing over all possible l’s in the log-likelihood function, the indices can be partitioned into two kinds of set: one whose label changes from ri to rj for some (ri , rj ) ∈ Nd when there is exactly one node disagreement and one whose label does not change whether the community assignment is σ0 or σ[σ0 ]. Specifically, {l = (1, l2 , . . . , ld )} = J ∪ J c where J= [ i<j:(ri ,rj )∈Nd  σ[σ0 ] σ0 l ∼ ri , l ∼ rj   Kd  [ σ[σ0 ] σ0 l ∼ ri , l ∼ ri J = c and i=1 The former contributes to the difference between two Bernoulli random variables with cardinality mri rj , while the latter is invariant to the hypothesis testing problem and its likelihood remains the same at both sides of the first inequality in (63). Note also that we rearrange terms on the specific side of the inequality to make Cri rj ≥ 0 ∀(ri , rj ) ∈ Nd due to the non-decreasing property of the probability parameters pi ’s. By symmetry, the situation is exactly the same for Eσ[σ0 ] ℓ(σ[σ0 ](1), σ bBayes (1)). Finally, since (63) holds for all σ0 ∈ ΘL d and inf(·) is a concave function, we have Rσ∼Unif (b σ (1)) ≥ inf Rσ∼Unif (b σ (1)) σ b = inf σ b X 1  1 b(1)) + Eσ[σ0 ] ℓ(σ[σ0 ](1), σ b(1)) Eσ0 ℓ(σ0 (1), σ 2 |ΘL | d L σ0 ∈Θd X  1 1 b(1)) + Eσ[σ0 ] ℓ(σ[σ0 ](1), σ b(1)) ≥ L inf Eσ0 ℓ(σ0 (1), σ σ b 2 |Θd | L σ0 ∈Θd X 1 P = L |Θd | L =P ( σ0 ∈Θd X ( mri rj  X  Xu(rj ) − Xu(ri ) ≥ 0 X i<j:(ri ,rj )∈Nd u=1 mri rj X  Xu(rj ) i<j:(ri ,rj )∈Nd u=1 − Xu(ri )  ≥0 ) ) A PPENDIX F P ROOF OF L EMMA 7.3 We can break the L.H.S. of (44) dirctly into ( ) mri rj  X X  P Xu(rj ) − Xu(ri ) ≥ 0 ≥ i<j:(ri ,rj )∈Nd u=1 February 6, 2018 Y i<j:(ri ,rj )∈Nd P ( mri rj X  u=1  Xu(rj ) − Xu(ri ) ≥ 0 ) DRAFT 38 Note that there are only finitely many terms involving in the product since we assume the order d is constant and so does the total number of community relations κd = |Kd | in d-hSBM. Though naı̈ve, we could still arrive at the same order as the minimax rate. By symmetry, it suffices to focus on the first term in the above equation. ) ( mr r 1 2   X (r2 ) (r1 ) ≥0 P Cr1 r2 Xu − Xu u=1 Here, we utilize a result from large deviation. Conseder i.i.d. random variables {Xi }ni=1 where each Xi ∼ X. We assume X is nondegenerate and that EX 2 eλX < ∞ (64) ′ for some λ > 0. The former condition ensures, for 0 < u ≤ λ, the existence of the functions m(u) , log LX (u) , σ 2 (u) , m′ (u) and Q(u) , um(u)−log LX (u) where LX (u) , EeuX is the Moment Generating Function (MGF) of the random variable X. Recall some known results: lim m(u) = m(0) = EX < ∞ u↓0 and sup (ux − log LX (u)) = Q(u∗ ) (65) 0<u≤λ for m(0) < x ≤ m(λ), where u∗ is the unique solution of the equation m(u) = x (66) Note that it is the sup-achieving condition in (65). The main theorem goes as follows. Theorem 6.1 (Theorem 1 in [29]): ∀x such that m(0) < x ≤ m(λ) and ∀n ≥ 1, the relation ) ( n  √  X ∗ −nQ(u∗ )−c 1+ nQ(u∗ ) −nQ(u ) Xi ≥ nx ≥ e e ≥P i=1 holds, where the constant c does not depend on x and n. The first inequality is essentially the Chernoff Bound, while here we use the second one, i.e. the lower bound result. (r ) (r ) First, we identify that X = Cr1 r2 (Xu 2 − Xu 1 ) and n = mr1 r2 for our problem. Besides, since X < ∞, we can take λ large enough so that (64) holds. The MGF now becomes   (r1 )  (r2 )  · E e−uCr1 r2 Xu LX (u) = EeuX = E euCr1 r2 Xu Also, since m(0) = EX < 0, we make a trick here to take x = 0. The corresponding optimalilty condition (66) becomes m(u) = x = 0 ⇔ L′X (u) =0 LX (u) ⇔ L′X (u) = 0 February 6, 2018 DRAFT 39 It can be shown that u∗ = 1 2 and the supremum achieved is Q(u∗ ) = sup (ux − log LX (u)) 0<u≤λ = − log LX (u∗ ) = Ip1 p2 Combining the expressions for each Cri rj corresponding to a (ri , rj ) ∈ Nd , we can conclude that ) ( mri rj  X X  Xu(rj ) − Xu(ri ) ≥ 0 P i<j:(ri ,rj )∈Nd u=1 ≥ ≥ Y i<j:(ri ,rj )∈Nd Y ) ( mri rj  X  (rj ) (ri ) Xu − Xu ≥0 P u=1 e  √  −mri rj Ipi pj −cri rj 1+ mri rj Ipi pj i<j:(ri ,rj )∈Nd = exp ≥ exp − − X i<j:(ri ,rj )∈Nd X i<j:(ri ,rj )∈Nd  mri rj Ipi pj + cri rj q  1 + mri rj Ipi pj  s  mri rj Ipi pj + c κd + κd X ! mri rj Ipi pj i<j:(ri ,rj )∈Nd where c = maxi<j:(ri ,rj )∈Nd {cri rj } is independent of n′ . Finally, since we assume that P !  i<j:(ri ,rj )∈Nd mri rj Ipi pj goes to infinity as n becomes large, the second term with the constant c in the above equation would be dominated by the first term. We have the desired asymtotic result consequently. February 6, 2018 DRAFT
10math.ST
Jordan-like Characterization of Automorphism Groups of Planar Graphs∗ Pavel Klavı́k1 , Roman Nedela2 , and Peter Zeman3 1 Computer Science Institute, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. E-mail: [email protected] 2 European Centre of Excellence NTIS, University of West Bohemia, Pilsen, Czech Republic, and Institute of Mathematics and Computer Science SAS, Slovak Republic. E-mail: [email protected] 3 arXiv:1506.06488v3 [math.CO] 29 Apr 2017 Department of Applied Mathematics, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. E-mail: [email protected] Abstract. In 1975, Babai characterized which abstract groups can be realized as the automorphism groups of planar graphs. In this paper, we give a more detailed and understandable description of these groups. We describe stabilizers of vertices in connected planar graphs as the class of groups closed under the direct product and semidirect products with symmetric, dihedral and cyclic groups. The automorphism group of a connected planar graph is then obtained as a semidirect product of a direct product of these stabilizers with a spherical group. The formulation of the main result is new and original. Moreover, it gives a deeper in the structure of the groups. As a consequence, automorphism groups of several subclasses of planar graphs, including 2-connected planar, outerplanar, and series-parallel graphs, are characterized. Our approach translates into a quadratic-time algorithm for computing the automorphism group of a planar graph which is the first such algorithm described in detail. Keywords: planar graphs, automorphism groups, group products, Jordan’s characterization, 3-connected reduction. Diagram: For a dynamic structural diagram of our results, see the following website (supported Firefox and Google Chrome): http://pavel.klavik.cz/orgpad/geom_aut_groups.html 1 2 3 4 5 6 7 8 9 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Preliminaries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Reduction to 3-connected Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Automorphism Groups of Polyhedral Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1 Automorphism Groups of Planar Primitive Graphs and Atoms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Jordan-like Characterization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1 Characterization by Semidirect Product Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2 Fixer of the Boundary of an Expanded Atom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.3 Composition of Spherical groups with Fixers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Applications of Jordan-like Characterization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1 Automorphism Groups of 2-connected Planar Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2 Automorphism Groups of Outerplanar Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.3 Automorphism Groups of Series-Parallel Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Comparison with Babai’s Characterization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Quadratic-time Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1 4 5 10 11 12 12 13 20 23 23 24 25 26 28 29 Introduction A permutation of the vertices and the edges of a graph is an automorphism if it preserves the incidences. In this paper, we investigate which abstract groups can be realized as the automorphism groups of planar graphs (PLANAR). Restricted Classes of Graphs. Frucht’s Theorem [15] states that for every finite abstract group Ψ , there exists a graph G such that Aut(G) ∼ = Ψ ; so automorphism groups of graphs are universal. We ask which abstract groups can be realized by restricted graph classes:  Definition 1.1. For a graph class C, let Aut(C) = Ψ : ∃G ∈ C, Aut(G) ∼ = Ψ . We call C universal if every finite abstract group is in Aut(C), and non-universal otherwise. ∗ The authors are supported by CE-ITI (P202/12/G061 of GAČR) and by Charles University as GAUK 1334217. The second one is also supported by the Ministry of Education of the Slovak Republic, the grant VEGA 1/0150/14, by Project LO1506 of the Czech Ministry of Education and by the project APVV-15-0220. In 1869, Jordan [24] characterized the automorphism groups of trees (TREE): Theorem 1.2 ([24]). The class Aut(TREE) is defined inductively as follows: (a) {1} ∈ Aut(TREE). (b) If Ψ1 , Ψ2 ∈ Aut(TREE), then Ψ1 × Ψ2 ∈ Aut(TREE). (c) If Ψ ∈ Aut(TREE), then Ψ o Sn ∈ Aut(TREE). Recently, the automorphism groups of several classes of graphs were characterized; see Fig. 1. It was proved that interval graphs have the same automorphism groups as trees [29], and unit interval graphs have the same automorphism groups as disjoint unions of caterpillars [29]. For permutation graphs and circle graphs [30], there are similar inductive descriptions as in Theorem 1.2. Comparability and function graphs can realize all abstract groups even for the order dimension at most four [30]. Understanding the structure of Aut(C) may lead to an effective algorithm for computation of generators of Aut(G) for a graph G ∈ C. There are two related problems of algorithmic nature which can be considered for a class C, in particular if C is the class of planar graphs. Graph Isomorphism. This famous problem asks, whether two given graphs G and H are isomorphic (the same up to a labeling). This problem clearly belongs to NP and it is a prime candidate for an intermediate problem between P and NP-complete. The graph isomorphism problem is related to computing automorphism groups. Suppose that G and H are connected. If we know permutation generators of Aut(G ∪˙ H), then G ∼ =H if and only if some generator swaps G and H. Mathon [33] proved that generators of the automorphism group can be computed using O(n3 ) instances of graph isomorphism. For a survey, see [27]. Regular Covering Testing. In [11,13], there was introduced a problem called regular graph covering testing which generalizes both graph isomorphism and Cayley graph testing. The input gives two graphs G and H. The problem asks whether there exists a semiregular subgroup Γ of Aut(G) such that G/Γ ∼ = H. The general complexity of this problem is open, no NP-hardness reduction is known. It is shown in [11,13] that the problem can be solved in FPT time with respect to the size of H when G is planar. For this algorithm, the structure of all semiregular subgroups of Aut(G) is described. In this paper, we extend this approach to describe the entire automorphism group Aut(G). Babai’s Characterization. The automorphism groups of planar graphs were first described by Babai [1, Corollary 8.12] in 1973; see Section 7 for the exact statement. The automorphism groups of 3-connected planar graphs can be easily described geometrically, they are so called spherical groups, since they correspond to the discrete groups of symmetries of the sphere. More details are given in Section 4 and in [2]. The automorphism groups of k-connected planar graphs, where k < 3, are constructed by wreath products of the automorphism groups of (k + 1)-connected planar graphs and of stabilizers of k-connected graphs. Babai’s characterization has several disadvantages. The statement is very long, separated into multiple cases and subcases. More importantly, is not clear precisely which abstract groups belong to Aut(PLANAR). The used language is complicated, very difficult for non-experts in permutation group theory and in graph symmetries. In [2, p. 1457–1459], Babai gives a more understandable overview of two key ideas (automorphism groups of 3-connected planar graphs, and 3-connected reduction), with his characterization only sketched as “a description of the automorphism groups of planar graphs in terms of generalized wreath products of symmetric groups and polyhedral groups.” Babai also states an easy consequence: Theorem 1.3 (Babai [2]). If G is planar, then the group Aut(G) has a subnormal chain Aut(G) = Ψ0 . Ψ1 . · · · . Ψm = {1} PLANAR IFA FUN SERIES-PARALLEL CIRCLE CHOR co-4-DIM OUTERPLANAR universal TRAPEZOID PERM PSEUDOFOREST TREE non-universal BIP PERM INT CATERPILLAR UNIT INT CLAW-FREE co-BIP Fig. 1. Hasse diagram of graph classes with understood automorphism groups. Characterization for the graph classes depicted in gray is described in this paper. 2 such that each quotient group Ψi−1 /Ψi is either cyclic or symmetric or A5 . This theorem describes Aut(G) only very roughly, by stating its building blocks. For comparison, an easy consequence of our characterization (Theorem 1.4) describes these building blocks more precisely and also states how they are “put together” in Aut(G). In particular, the composition of the action of a spherical group Σ with a stabilizer of a vertex in a planar graph depends on the action of Σ on vertices and edges of the associated 3-connected planar graph. To describe it in detail is not an easy task; see Table 1. Our characterization also describes “geometry” of the automorphism groups in terms of actions on planar graphs and around every 1-cut and 2-cut. See Section 7 for more details. The class of planar graphs is of great importance, and thus we are convinced that a more detailed and transparent description of their symmetries is of an interest. These reasons led us to write this paper which describes Aut(PLANAR) more understandably, and in more details. Our Characterization. Let G be a planar graph. If it is disconnected, then Aut(G) can be constructed from the automorphism groups of its connected components (Theorem 2.1). Therefore, in the rest of the paper, we assume that G is connected. In Section 3, we describe a reduction process which decomposes G into 3-connected components. It was used in [11,12] to study the behaviour of semiregular subgroups of Aut(G) with respect to 1-cuts and 2cuts. This natural idea of the reduction was first introduced in a seminal paper by Trakhtenbrot [38] and further extended in [22,20,6,39]. This reduction can be represented by a tree whose nodes are 3-connected graphs, and this tree is known in the literature mostly under the name SPQR tree [7,8,9,16]. The main difference, compared to our approach, is that the reduction applies only to 2-connected graphs, but we use it to reduce simultaneously parts separated by 1-cuts and 2-cuts. This allows to describe the geometry of symmetries, arising from articulations in G. Further, the reduction process is done in a way that the essential information on the symmetries is preserved (using colored and directed edges), so that the reconstruction of the automorphism group is possible. The reduction proceeds as follows. In each step, called reduction, we replace all atoms of the considered graph G by colored (possibly directed) edges, where atoms are certain inclusion minimal subgraphs of G. This gives a reduction series consisting of graphs G = G0 , . . . , Gr , where Gi+1 is created from Gi by replacing all of its atoms with some edges. The final graph Gr contains no proper atoms and is called primitive. It follows that Gr is either 3-connected, or a cycle, or K2 , or K1 . We can consider Gr as an associated skeleton: the graph G is obtained from Gr by attaching the expanded atoms to its vertices and edges. In Section 5, we characterize Aut(connected PLANAR). If G is planar, then all its atoms and Gr are planar graphs. Moreover, they are either very simple, or 3-connected. It is interesting that our characterization describes the automorphism groups of planar graphs without referring to planarity explicitly, as a simple recursive process which builds them from a few basic groups. A short version of our main result reads as follows: Theorem 1.4. Let G be a connected planar graph with the reduction series G = G0 , . . . , Gr . Then Aut(Gr ) is a spherical group and Aut(Gi ) ∼ = Ψi o Aut(Gi+1 ), where Ψi is a direct product of symmetric, cyclic and dihedral groups. We characterize Aut(connected PLANAR) in two steps. First, similarly as in Theorem 1.2, we give in Theorem 5.1 an inductive characterization of stabilizers of vertices of planar graphs, denoted Fix(PLANAR). It is the class of groups closed under the direct product, the wreath product with symmetric and cyclic groups and semidirect products with dihedral groups. In Theorem 5.10, we describe Aut(connected PLANAR) precisely as the class of groups (Ψ1m1 × · · · × Ψ`m` ) o Aut(H), where Ψi ∈ Fix(PLANAR) and H is a 3-connected planar graph with colored vertices and colored, possibly oriented, edges. The group Aut(H) acts on the factors of the direct product Ψ1m1 × · · · × Ψ`m` in the natural way, permuting the isomorphic factors, following the action of H on the vertices and edges of H; for more details, see Section 5. In Section 6, we apply Jordan-like characterization to describe automorphism groups of 2-connected planar graphs and of the following subclasses of planar graphs. Outerplanar graphs (OUTERPLANAR) are planar graphs having an embedding such that all vertices belong to the outer face. Pseudoforests (PSEUDOFOREST) are planar graphs such that each connected component contains at most one cycle, i.e., it is a pseudotree (PSEUDOTREE). Series-parallel graphs (SERIES-PARALLEL) are planar graphs created by two operations, see Section 6.3 for a detailed definition. Quadratic-time Algorithm. Graph isomorphism of planar graphs was attacked in papers [22,23]. Finally, linear-time algorithms were described by Hopcroft and Wong [21], and by Fontet [14]. As we explain in Section 8, the fundamental difficulty is deciding isomorphism of 3-connected (colored) planar graphs in linear time. The idea in [21] is to modify both graphs by a series of reductions ending with colored platonic solids, cycles, or K2 . This is a seminal paper used by many other computer science algorithms as a black box; e.g., [31,34,26,25]. Unfortunately, full versions of [14,21] were never published. 3 Colbourn and Booth [4] propose the idea to modify the algorithm of [21] for computing the automorphism groups of planar graphs in linear time. The following is stated in [4]: “Necessarily we will only be able to sketch our procedure. A more complete description and a proof of correctness would require a more thorough analysis of the Hopcroft-Wong algorithm than has yet appeared in the literature.” To the best of our knowledge, no such algorithm was ever described in detail. We note that it is not possible to use the result of [21] as a black box for computing generators of the automorphism group, since one has to check carefully that the applied reductions preserve the automorphism group. (Or that the change of the automorphism group is under control, similarly as in Proposition 3.7.) By combining the results of [14,21] and [33], the best previously known polynomial-time algorithm computing generators the automorphism group of a planar graph runs in time O(n4 ). In Section 8, we describe a quadratic-time algorithm based on our structural description of the automorphism groups of planar graphs. Theorem 1.5. There exists a quadratic-time algorithm which computes generators of Aut(G) of an input planar graph G in terms of group products of symmetric and spherical groups and of permutation generators. Visualization of Symmetries. As one of the applications of graph symmetries, drawing of planar graphs maximizing the symmetries of the picture were studied in [10,19,17,18]. Disadvantage of this approach is that even though the automorphism group Aut(G) of a planar graph G might be huge, it is possible to highlight only a small fraction of its symmetries; usually just a dihedral or cyclic subgroup. Even if we would consider drawing on the sphere, one can only visualize a spherical subgroup of Aut(G). Based on our structural decomposition of Aut(G), we propose in Conclusions a different spatial visualization which allows to capture the entire automorphism group, and thus visualize our characterization. 2 Preliminaries In this paper, we work with an extended model of graph which is formally described in [12]. A multigraph G is a pair (V (G), E(G)) where V (G) is a set of vertices and E(G) is a multiset of edges. We denote |V (G)| by v(G) = |G| and |E(G)| by e(G). The graph can possibly contain parallel edges and loops, and each loop at u is incident twice with the vertex u. Each edge e = uv gives rise to two half-edges, one attached to u and the other to v. We denote by H(G) the collection of all half-edges. We denote |H(G)| by h(G), clearly h(G) = 2e(G). In the reductions, we obtain pendant edges, each consisting of two half-edges, lone attached to some vertex u, the other attached to no vertex. Unless the graph is K2 , we remove all vertices of degree 1 while keeping both half-edges of the incident edge. A pendant edge attached to v is called a single pendant edge if it is the only pendant edge attached to v. We consider graphs with colored edges and also with both directed and undirected edges. It might seem strange to consider such general graphs. But when we apply reductions, we replace some parts of the graph by edges and the colors are used to encode the isomorphism classes of the replaced parts. This allows the algorithm to work with smaller reduced graphs while preserving important information about the structure of the original large graph. Thus, even if the planar graph is simple, more complicated multigraphs are naturally constructed. Equivariance. Suppose that a group Σ acts on two sets A and B. We say that the actions are equivariant if there exists an equivariant map ϕ : A → B which is a bijection and for every π ∈ Σ, we have ϕ(π(x)) = π(ϕ(x)). Equivariance defines an equivalence relation on orbits of the action of Σ, consisting of equivalent classes of equivariant orbits. Automorphisms. Let G be a graph. An automorphism π of G is fully described by a permutation πh : H(G) → H(G) of the half-edges, preserving edges and the incidence relation between the half-edges and the vertices. It follows that πh induces two permutations πv : V (G) → V (G) and πe : E(G) → E(G) connected together by a natural property: πe (uv) = πv (u)πv (v), for every uv ∈ E(G). We often omit the subscripts and simply write π(u) or π(uv). In addition, we require that an automorphism preserves the colors of edges and the orientation of directed edges. Similarly as in the definition of an automorphism, two graphs G and H are isomorphic, denoted G ∼ = H, if there exists an isomorphism from G to H satisfying the aforementioned conditions. Automorphism Groups. We denote the group of all automorphisms of a graph G by Aut(G). Each element π ∈ Aut(G) acts on G, permutes its vertices and edges while it preserves the incidences. Let Ψ ≤ Aut(G). The orbit [v] of a vertex v ∈ V (G) is the set of all vertices {π(v) | π ∈ Ψ }, and the orbit [e] of an edge e ∈ E(G) is defined similarly as {π(e) | π ∈ Ψ }. The stabilizer of x is the subgroup of all automorphisms which fix x. Groups. In what follows, we recall some standard notation for particular permutation groups of degree n. We use Sn for the symmetric group, Cn for the cyclic group, Dn for the dihedral group (|Dn | = 2n), and An for the alternating group. We note that D1 ∼ = C2 and D2 ∼ = C22 . 4 3 4 1 2 1 2 3 3 4 1 2 3 4 4 G 2 1 1 2 3 4 1 2 4 3 2 1 4 3 2 1 2 1 4 3 4 3 Aut(G) Fig. 2. On the left, the graph G consisting of two copies of K2 , together with the action of three generators of Aut(G). On the right, the Cayley diagram of Aut(G) ∼ = C22 o C2 ∼ = C2 o S2 . It is not C32 since applying the white generator exchanges the roles of the black and gray generators. Given two groups Ψ and Σ, and a group homomorphism ϕ : Σ → Aut(Ψ ), the semidirect product Ψ oϕ Σ is defined as follows. The base set is the Cartesian product Ψ × Σ, and the operation is defined by the rule (ψ1 , σ1 ) · (ψ2 , σ2 ) = (ψ1 · ϕ(σ1 )(ψ2 ), σ1 · σ2 ). If the homomorphism ϕ is clear from the context, we omit it to simplify the notation. Suppose that Σ acts on {1, . . . , n}. The wreath product Ψ o Σ is a shorthand for the semidirect product Ψ n oϕ Σ, where ϕ is defined by setting ϕ(σ) = (ψ1 , . . . , ψn ) 7→ (ψσ(1) , . . . , ψσ(n) ). In what follows, we usually have Σ = Sn , Σ = Dn , or Σ = Zn with the natural action the index set {1, . . . , n}. For more details, see [3,36]. We note that when both Ψ and Σ are given in terms of permutation generators and also the image ϕ(Σ) of Σ is given, we can output permutation generators of Ψ oϕ Σ. Jordan described how to compute automorphism groups of graphs from automorphism groups of their connected components. We state it together with a proof since a similar argument is used in the proof of Proposition 3.7. Theorem 2.1 (Jordan [24]). If G1 , . . . , Gn are pairwise non-isomorphic connected graphs and G is the disjoint union of ki copies of each Gi , then Aut(G) ∼ = Aut(G1 ) o Sk1 × · · · × Aut(Gn ) o Skn . Proof. Since the action of Aut(G) is independent on non-isomorphic components, it is clearly the direct product of factors, each corresponding to the automorphism group of one isomorphism class of components. It remains to show that if G consists of k isomorphic components H1 , . . . , Hk of a connected graph H, then Aut(G) ∼ = Aut(H) o Sk . An example is given in Fig. 2. For i > 1, let σ1,i be an arbitrarily chosen isomorphism from H1 to Hi , and we put σ1,1 = id and σi,j = −1 σ1,j σ1,i . Observe that each isomorphism from Hi to Hj can be decomposed into σi,j and some automorphism of Hj . Let π ∈ Aut(G). It can be decomposed into a composition µ · σ of two automorphisms. The automorphism σ permutes the components as in π, so when π(Hi ) = Hj , then σ|Hi = σi,j . The automorphism µ maps each −1 component Hi to itself, so µ|Hi = π|Hi · σi,j . We have π = µ · σ since −1 µ|Hi · σ|Hi = π|Hi · σi,j σi,j = π|Hi . The automorphisms µ can be bijectively identified with the elements of Aut(H)k and the automorphisms σ with the elements of Sk . Let π, π 0 ∈ Aut(G). Consider the composition µ · σ · µ0 · σ 0 , we want to swap σ with µ0 and rewrite this as a composition µ · µ̂ · σ̂ · σ. Clearly the components are permuted in π · π 0 exactly as in σ · σ 0 , so σ̂ = σ. On the other hand, µ̂ is not necessarily equal µ0 . Let µ0 be identified with the vector (µ01 , . . . , µ0k ) ∈ Aut(H)k . Since µ0 is applied after σ, it acts on the components permuted according to σ. Therefore µ̂ is constructed from µ0 by permuting the coordinates of its vector by σ: µ̂ = (µ0σ(1) , . . . , µ0σ(k) ). This is precisely the definition of the wreath product, so Aut(G) ∼ = Aut(H) o Sk . 3 t u Reduction to 3-connected Components In this section, we describe a modified reduction procedure, introduced in [11,12]. We show that under certain conditions, the reduction procedure allows to reconstruct Aut(G) from simpler graphs. 5 block atoms proper atoms dipoles Fig. 3. An example of a graph with denoted atoms. The white vertices belong to the boundary of some atom, possibly several of them. Block-tree and Central Block. The block-tree T of G is a tree defined as follows. Consider all articulations in G and all maximal 2-connected subgraphs which we call blocks (with bridge-edges also counted as blocks). The block-tree T is the incidence graph between the articulations and the blocks. It is well-known that the automorphisms of Aut(G) induces automorphisms of Aut(T ). Recall that for a tree, its center is either the central vertex or the central edge of a longest path, depending on the parity of its length. Every automorphism of a tree preserves its center. For a block-tree, there is always a central vertex. Therefore, every automorphism π ∈ Aut(G) preserves the central block or the central articulation. We orient the edges of the block-tree T towards the central vertex; so the block-tree becomes rooted. A (rooted) subtree of the block-tree is defined by any vertex different from the centrum acting as root and by all its descendants. Definition of Atoms. Let B be one block of G, so B is a 2-connected graph. Two vertices u and v form a 2-cut U = {u, v} if B \ U is disconnected. We say that a 2-cut U is non-trivial if deg(u) ≥ 3 and deg(v) ≥ 3. We first define a set P of subgraphs of G called parts which are candidates for atoms: – A block part is a subgraph non-isomorphic to a pendant edge induced by the blocks of a subtree of the block-tree. – A proper part is a subgraph S of G defined by a non-trivial 2-cut U of a block B. The subgraph S consists of a connected component C of G \ U together with u and v and all edges between {u, v} and C. In addition, we require that S does not contain the central block/articulation; so it only contains some block of the subtree of the block-tree given by B. – A dipole part is any dipole which is defined as follows. Let u and v be two distinct vertices of degree at least three joined by at least two parallel edges. Then the subgraph induced by u and v is called a dipole. The inclusion-minimal elements of P are called atoms. We distinguish block atoms, proper atoms and dipoles according to the type of the defining part. Block atoms are either pendant stars called star block atoms, or pendant blocks possibly with single pendant edges attached to them called non-star block atoms. Also each proper atom is a subgraph of a block, together with some single pendant edges attached to it. Notice that a dipole part is by definition always inclusion-minimal, and therefore it is an atom. For an example, see Fig. 3. We use the topological notation to denote the boundary ∂A and the interior Å of an atom A. If A is a dipole, we set ∂A = V (A). If A is a proper or block atom, we put ∂A equal to the set of vertices of A which are incident with an edge not contained in A. For the interior, we use the standard topological definition Å = A \ ∂A where we only remove the vertices ∂A, the edges adjacent to ∂A are kept in Å. Lemma 3.1 ([12], Lemma 3.3). For atoms A 6= A0 , we have A ∩ A0 = ∂A ∩ ∂A0 . Note that |∂A| = 1 for a block atom A, and |∂A| = 2 for a proper atom or dipole A. The interior of a dipole is a set of free edges. We note that dipoles are exactly the atoms with no vertices in their interiors. Observe for a proper atom A that the vertices of ∂A are exactly the vertices {u, v} of the non-trivial 2-cut used in the definition of proper parts. Also the vertices of ∂A of a proper atom are never adjacent in A, but may be adjacent in G. Further, no block or proper atom contains parallel edges; otherwise a dipole would be its subgraph, so it would not be inclusion minimal. Lemma 3.2 ([12], Lemma 3.8). Let A be an atom and let π ∈ Aut(G). Then the image π(A) is an atom isomorphic to A, π(∂A) = ∂π(A), π(Å) = π̊(A). 6 u u v u v ′ A v u A v Fig. 4. A symmetric proper atom A and an asymmetric proper atom A0 . In the reductions, explained later, they are replaced by undirected and directed edges, respectively. Structure of Atoms. We call a graph essentially 3-connected if it is a 3-connected graph with possibly some single pendant edges attached to it. Similarly, a graph is called essentially a cycle if it is a cycle with possibly some single pendant edges attached to it. For a proper atom A with ∂A = {u, v}, we define A+ as A with the additional edge uv. Lemma 3.3 ([12], Lemma 3.5). Every non-star block atom A is either K2 with an attached single pendant edge, essentially a cycle, or essentially 3-connected. Lemma 3.4 ([12], Lemma 3.6). For every proper atoms A, the extended proper atom A+ is either essentially a cycle, or essentially 3-connected. Also, single pendant edges are always attached to Å. Symmetry Types of Atoms. For an atom A, we denote by Aut∂A (A) the set-wise stabilizer of ∂A in Aut(A), and by Fix(∂A) the point-wise stabilizer of ∂A in Aut(A). Let A be a proper atom or dipole with ∂A = {u, v}. We distinguish the following two symmetry types, see Fig. 4: – The symmetric atom. There exits an automorphism τ ∈ Aut∂A (A) which exchanges u and v. – The asymmetric atom. There is no such automorphism in Aut∂A (A). In Fig. 5, the dipoles are symmetric but the proper atoms are asymmetric. If A is a block atom, then it is by definition symmetric. For instance a dipole A with ∂A = {u, v} is symmetric, if and only if it has the same number of directed edges going from u to v as from v to u. For a block atom or an asymmetric atom, we have Fix(∂A) = Aut∂A (A), but not for a symmetric proper atom or dipole. Reduction. The reduction produces a series of graphs G = G0 , . . . , Gr . To construct Gi+1 from Gi , we find the collection of all atoms A. Two atoms A and A0 are isomorphic if there exists an isomorphism which maps ∂A to ∂A0 . We obtain isomorphism classes for A, and to each isomorphism class, we assign one new color not yet used in the graphs G0 , . . . , Gi . We replace a block atom A by a pendant edge of the assigned color based at u where ∂A = {u}, and a proper atom or a dipole A with ∂A = {u, v} by a new edge uv of the assigned color. If A is symmetric, the edge uv is undirected. If A is asymmetric, the edge uv is directed and we consistently choose one orientation for the entire isomorphism class. According to Lemma 3.1, the replaced interiors of the atoms of A are pairwise disjoint, so the reduction is well defined. We repeatedly apply reductions and we stop in the step r when Gr contains no atoms, and we call such Gr a primitive graph. For an example of the reduction, see Fig. 5. We note the following detail. Replacing proper atoms and dipoles by edges preserves the block structure. Replacing block atoms with pendant edges removes leaves from the block tree. The central block/vertex is preserved by the reductions, so we define the atoms A of Gi with respect to the central block/vertex of G0 (which may not be central in Gi ). red. G0 G1 Fig. 5. On the left, the graph G0 has three isomorphism classes of atoms, one of each type. We reduce G0 to G1 which is an eight cycle with single pendant edges, with four black halvable edges replacing the dipoles, four gray undirected edges replacing the block atoms, and four white directed edges replacing the proper atoms. The reduction series ends with G1 since it is primitive. 7 Lemma 3.5 ([12], Lemma 3.4). Let G be a primitive graph. If G has a central block, then it is a 3-connected graph, a cycle Cn for n ≥ 2, or K2 , or can be obtained from these graphs by attaching single pendant edges to at least two vertices. If G has a central articulation, then it is K1 , possible with a single pendant edge attached. Reduction Tree. For every graph G, the reduction series determines the reduction tree which is a rooted tree defined as follows. The root is the primitive graph Gr , and the other nodes are the atoms obtained during the reductions. If a node contains a colored edge, it has the corresponding atom as a child. Therefore, the leaves are the atoms of G0 , after removing them, the new leaves are the atoms of G1 , and so on. For an example, see Fig. 6. Reduction Epimorphism. The algebraic properties of the reductions, in particular how the groups Aut(Gi ) and Aut(Gi+1 ) are related, are captured by a natural G1 mapping Φi : Aut(Gi ) → Aut(Gi+1 ) called the reduction epimorphism which we define as follows. Let π ∈ Aut(Gi ). For the common vertices and edges of Gi and Gi+1 , we define Φi (π) equal to π. If A is an atom of Gi , then according to Lemma 3.2a, π(A) is an atom isomorphic to A. In Gi+1 , we replace the interiors of both A and π(A) by the edges eA and eπ(A) of the same Fig. 6. The reduction tree for the reduction series in type and color. We define Φi (π)(eA ) = eπ(A) . In the Fig. 5. The root is the primitive graph G1 and leaves same way, the action of Φi (π) is defined for half-edges. are atoms of G0 . Since π(∂A) = ∂(π(A)), we have Φi (π) ∈ Aut(Gi+1 ). It is proved in [12, Proposition 4.2] that the mapping Φi is a group epimorphism, in particular, it is surjective. By Homomorphism Theorem, we know that Aut(Gi ) is an extension of Aut(Gi+1 ) by Ker(Φi ) and Aut(Gi+1 ) ∼ = Aut(Gi )/Ker(Φi ). Lemma 3.6 ([12], Lemma 4.4). Ker(Φi ) ∼ = Q A∈A Fix(∂A). Our aim is to investigate when Aut(Gi ) ∼ = Ker(Φi ) o Aut(Gi+1 ). (1) Let A be an atom with ∂A = {u, v}. If A is symmetric, there exists some automorphism of A exchanging u and v. If A is a symmetric dipole, one can always find an involution exchanging u and v. This is not true when Φi π′ e1 e2 u A u (b) Ψ e5 e4 id π2 v e3 (a) Φ i) Ker( e6 π′ π ′ Φ−1 i (π ) Gi+1 Aut(Gi+1 ) ∼ = D6 Aut(Gi ) v Fig. 7. (a) An example of a symmetric proper atom A with no involution exchanging u and v. There are two automorphisms which exchange u and v, one rotates the four-cycle formed white directed edges by one clockwise, the other one counterclockwise. The set-wise stabilizer of u and v is C4 . (b) On the left, the graph Gi+1 having colored edges e1 , . . . , e6 corresponding to copies A1 , . . . , A6 of A. On the right, the groups Aut(Gi ) and Aut(Gi+1 ) ∼ = D6 with the homomorphism Φi . While the rotations in Aut(Gi+1 ) can be easily extended, consider the depicted reflection π 0 . Let π ∈ Aut(Gi ) such that Φi (π) = π 0 . The automorphism π|A1 is one of the two automorphisms of A exchanging u and v described in (a), and similarly π|A4 . Therefore, π 2 6= id (since π 2 |A1 6= id and π 2 |A4 6= id) while (π 0 )2 = id, and only π 4 = id. Therefore, no complementary subgroup Ψ ≤ Aut(Gi ) exists and Aut(Gi ) cannot be constructed using the semidirect product (1). 8 A is a symmetric proper atom. Figure 7a gives an example of a symmetric proper atom with no involution exchanging the two vertices of the boundary. When all symmetric proper atoms have such involutions, we derive (1). Figure 7b explains that this assumption is necessary. Proposition 3.7. Suppose that every symmetric proper atom A of Gi with ∂A = {u, v} has an involutory automorphism τ exchanging u and v. Then the following holds: (a) There exists Ψ ≤ Aut(Gi ) such that Φi (Ψ ) = Aut(Gi+1 ) and Φi |Ψ is an isomorphism. (b) Aut(Gi ) ∼ = Ker(Φi ) o Aut(Gi+1 ). Proof. (a) Let π 0 ∈ Aut(Gi+1 ), we want to extend π 0 to π ∈ Aut(Gi ) such that Φi (π) = π 0 . We just describe this extension on a single edge e = uv. If e is an original edge of G, there is nothing to extend. Suppose that e was created in Gi+1 from an atom A in Gi . Then ê = π 0 (e) is an edge of the same color and the same type as e, and therefore ê is constructed from an isomorphic atom  of the same symmetry type. The automorphism π 0 prescribes the action on the boundary ∂A. We need to show that it is possible to define an action on Å consistently: – A is a block atom: The edges e and ê are pendant, attached by articulations u and u0 . We define π by an isomorphism σ from A to  which takes ∂A to ∂ Â. – A is an asymmetric proper atom or dipole: By the definition, the orientation of e and ê is consistent with respect to π 0 . Since Å is isomorphic to the interior of Â, we define π on Å according to one such isomorphism σ. – A is a symmetric or a halvable proper atom or a dipole: Let σ be an isomorphism of A and Â. Either σ maps ∂A exactly as π 0 , and then we can use σ for defining π. Or we compose σ with an automorphism of A exchanging the two vertices of ∂A. (We know that such an automorphism exists since A is not antisymmetric.) To establish (a), we need to do this consistently, in such a way that these extensions form a subgroup Ψ which is isomorphic to Aut(Gi+1 ). Let e1 , . . . , e` be colored edges of one orbit of the action of Aut(Gi+1 ) such that these edges replace isomorphic atoms A1 , . . . , A` in Gi ; see Fig. 8 for an overview. We divide the argument into three cases: Case 1: The atom A1 is a block atom: Let u1 , . . . , u` be the articulations such that ∂Ai = {ui }. Choose −1 arbitrarily isomorphisms σ1,i from A1 to Ai such that σ1,i (u1 ) = ui , and put σ1,1 = id and σi,j = σ1,j σ1,i . If 0 π (ei ) = ej , we set π|Åi = σi,j |Åi . Since σi,k = σj,k σi,j , ∀i, j, k, (2) the composition of the extensions π1 and π2 of π10 and π20 is defined on the interiors of A1 , . . . , A` exactly as 0 · · · π10 = id is extended to an identity. the extension of π20 π10 . Also, by (2), an identity πk0 πk−1 Case 2: The atom A1 is an asymmetric proper atom or dipole: Let ei = ui vi . We approach it exactly as in Case 1, just we require that σ1,i (u1 ) = ui and σ1,i (v1 ) = vi . Case 3: The atom A1 is a symmetric proper atom or a dipole: For each ei , we arbitrarily choose one endpoint as ui and one as vi . Again, we arbitrarily choose isomorphisms σ1,i from A1 to Ai such that −1 σ1,i (u1 ) = ui and σ1,i (v1 ) = vi , and define σi,j = σ1,j σ1,i . We further consider an involution τ1 of A1 which exchanges u1 and v1 . (Such an involution exists for symmetric proper atoms by the assumptions, and for symmetric dipoles by the definition.) Then τ1 defines −1 an involution of Ai by conjugation as τi = σ1,i τ1 σ1,i . It follows that −1 τj = σi,j τi σi,j , and consequently σi,j τi = τj σi,j , τ1 σ1,2 σ1,1 = id u2 A1 u1 ∀i, j. u1 A2 v1 A1 σ1,2 u3 σ̂1,2 u2 v2 A2 A3 σ1,3 Fig. 8. Case 1 is demonstrated on the left for ` = 3, the respective block atoms are A1 , A2 and A3 . Case 3 is demonstrated on the right for ` = 2. The additional semiregular involution τ1 ∈ Fix(∂A1 ) transposes u1 and v1 . 9 We put σ̂i,j = σi,j τi = τj σi,j which is an isomorphism mapping Ai to Aj such that σ̂i,j (ui ) = vj and 0 σ̂i,j (vi ) = uj . In the extension, we put π|Åi = σi,j |Åi if π 0 (ui ) = uj , and π|Åi = σi,j |Åi if π 0 (ui ) = vj . Aside (2), we get the following additional identities: σ̂i,k = σj,k σ̂i,j , σ̂i,k = σ̂j,k σi,j , and σi,k = σ̂j,k σ̂i,j , ∀i, j, k. (3) We just argue the last identity: σ̂j,k σ̂i,j = τk (σj,k σi,j )τi = τk σi,k τi = τk τk σi,k = σi,k , where the last equality holds since τk is an involution. It follows that the composition π2 π1 is correctly defined as above, and it maps identities to identities. We have described how to extend the elements of Aut(Gi+1 ) on one edge-orbit, and we apply this process repeatedly to all edge-orbits. The set Ψ ≤ Aut(Gi ) consists of all these extensions π from every π 0 ∈ Aut(Gi+1 ). It is a subgroup by (2) and (3), and since the extension π 0 7→ π is injective, Ψ ∼ = Aut(Gi+1 ). (b) By (a), we know that Ker(Φi ) E Aut(Gi ) has a complement Ψ isomorphic to Aut(Gi+1 ). Actually, this already proves that Aut(Gi ) has the structure of the internal semidirect product. We give more insight into its structure by describing it as an external semidirect product. Each element of Aut(Gi ) can be written as a pair (π 0 , σ) where π 0 ∈ Aut(Gi+1 ) and σ ∈ Ker(Φi ). We first apply the extension π ∈ Ψ of π 0 and permute Gi , mapping interiors of the atoms as blocks. Then σ permutes the interiors of the atoms, preserving the remainder of Gi . It remains to understand how composition of two automorphisms (π 0 , σ) and (π̂ 0 , σ̂) works. We get this as a composition of four automorphisms σ̂ ◦ π̂ ◦ σ ◦ π, which we want to write as a pair (τ, ρ). Therefore, we need to swap π̂ with σ. This clearly preserves π̂, since the action σ̂ on the interiors does not influence it; so we get τ = π̂ ◦ π. But σ is changed by this swapping. According to Lemma 3.6, we get σ = (σ1 , . . . , σs ) where each σi ∈ Fix(∂Ai )mi . Since π preserves the isomorphism classes of atoms, it acts on each σi independently and permutes the isomorphic copies of Ai . Suppose that A and A0 are two isomorphic copies of Ai and π(A) = A0 . Then the action of σi on the interior of A corresponds after the swapping to the same action on the interior of A0 = π(A). This can be described using the semidirect product, since each π defines an automorphism of Ker(Φi ) which permutes the coordinates of each Fix(∂Ai )mi , following the action of π 0 on the colored edges of Gi+1 . t u 4 Automorphism Groups of Polyhedral Graphs In this section, we review geometric properties of automorphism groups of 3-connected planar graphs. They are based on Whitney’s Theorem [40] stating that 3-connected planar graphs have unique embeddings onto the sphere. Using these properties, we describe possible automorphism groups of planar atoms and primitive graphs. Spherical Groups. A group is spherical if it is the group of the isometries of a tiling of the sphere. The first class of spherical groups are the subgroups of the automorphism groups of the platonic solids. Their automorphism groups are S4 for the tetrahedron, S4 × C2 for the cube and the octahedron, and A5 × C2 for the dodecahedron and the icosahedron; see Fig. 9. The second class of spherical groups is formed by four infinite families, namely Cn , Dn , Cn × C2 , and Dn × C2 , n ≥ 2. They act as groups of automorphism of n-sided prisms. Maps. A (spherical) map M is a 2-cell decomposition of the sphere S. A map is usually defined by a 2-cell embedding of a connected graph i : G ,→ S. The connected components of S \ i(G) are called faces of M. An automorphism of a map is an automorphism of the graph preserving the incidences between vertices, edges, and faces. Clearly, Aut(M) is one of the spherical groups and with the exception of paths and cycles, it is a subgroup of Aut(G). As a consequence of Whitney’s theorem [40] we have the following. S4 C2 × S 4 C2 × A5 Fig. 9. The five platonic solids together with their automorphism groups. 10 Theorem 4.1. Let M be the map given by the unique 2-cell embedding of a 3-connected graph into the sphere. Then Aut(G) ∼ t u = Aut(M ). Geometry of Automorphisms. Mani [32] gives the following insight into geometry of Aut(G) of a 3connected planar graph G. There exists a polyhedron P such that Aut(G) coincides with the group of isometries of P . Figure 9 gives examples of such polyhedra associated to the graphs of platonic solids. Also, the polyhedron P can be placed in the center of a sphere and projected onto it, so that each isometry of P correspond to some isometry of the sphere. Therefore, every automorphism in Aut(G) can be geometrically viewed as an isometry of the sphere with G drawn onto it, and this is essential for the Jordan-like characterization in for Section 5. In particular, we have: Theorem 4.2. Let G be a 3-connected graph. Then Aut(G) is isomorphic to one of the spherical groups. We recall some basic definitions from geometry [37,35]. An automorphism of a 3-connected planar graph G is called orientation preserving, if the respective isometry preserves the global orientation of the sphere. It is called orientation reversing if it changes the global orientation of the sphere. A subgroup of Aut(G) is called orientation preserving if all its automorphisms are orientation preserving, and orientation reversing otherwise. We note that every orientation reversing subgroup contains an orientation preserving subgroup of index two. (The reason is that the composition of two orientation reversing automorphisms is an orientation preserving automorphism.) Stabilizers. Let u ∈ V (G). The stabilizer of u in Aut(G) is a subgroup of a dihedral group and it has the following description in the language of isometries. If Stab(u) ∼ = Cn , for n ≥ 3, it is generated by a rotation of order n that fixes u and the opposite point of the sphere, and fixing no other point of the sphere. The opposite point of the sphere may be another vertex or a center of a face. If Stab(u) ∼ = Dn , it consists of rotations and reflections fixing a circle passing through u and the opposite point of the sphere. Each reflection always fixes either a center of some edge, or another vertex. When Stab(u) ∼ = D1 ∼ = C2 , it is generated either by a 180◦ rotation or by a reflection. Let e ∈ E(G). The stabilizer of e in Aut(G) is a subgroup of C22 . When Stab(e) ∼ = C22 , it contains the ◦ following three non-trivial isometries. First, the 180 rotation around the center of e and the opposite point of the sphere that is a vertex, center of an edge, or center of an even face. Next, two reflections orthogonal to each other which fix circles through u and the opposite point of the sphere. When Aut(G) ∼ = C2 , it is generated by only one of these three isometries. 4.1 Automorphism Groups of Planar Primitive Graphs and Atoms Theorem 4.2 allows us to describe possible automorphism groups of planar atoms and primitive graphs which appear in the reduction tree for a planar graph G. First, we describe the automorphism groups of planar primitive graphs. Lemma 4.3. The automorphism group Aut(G) of a planar primitive graph G is a spherical group. Proof. Recall that a graph is essentially 3-connected if it is a 3-connected graph with attached single pendant edges to some of its vertices. If G is essentially 3-connected, then Aut(G) is a spherical group from Theorem 4.2. Since the family of spherical groups is closed under taking subgroups, the subgroup of color- and orientationpreserving automorphism is spherical as well. If G is K1 , K2 or Cn with attached single pendant edges, then Aut(G) is a subgroup of C2 or Dn . t u Next, we deal with the automorphism groups of planar atoms. Let A be a planar atom. Recall that Aut∂A (A) is the set-wise stabilizer of ∂A, and Fix(∂A) is the point-wise stabilizer of ∂A. The following lemma determines Aut∂A (A); see Fig. 10 for examples. Lemma 4.4 ([12], Lemma 5.3). Let A be a planar atom. (a) If A is a star block atom, then Aut∂A (A) = Fix(∂A) which is a direct product of symmetric groups. (b) If A is a non-star block atom, then Aut∂A (A) = Fix(∂A) and it is a subgroup of a dihedral group. (c) If A is a proper atom, then Aut∂A (A) is a subgroup of C22 and Fix(∂A) is a subgroup of C2 . (d) If A is a dipole, then Fix(∂A) is a direct product of symmetric groups. If A is symmetric, then Aut∂A (A) = Fix(∂A) o C2 . If A is asymmetric, then Aut∂A (A) = Fix(∂A). Proof. (a) The edges of each color class of the star block atom A can be arbitrarily permuted, so Aut∂A (A) = Fix(∂A) which is a direct product of symmetric groups. (b) For the non-star block atom A, the boundary ∂A = {u} is stabilized. We have one vertex in both Aut∂A (A) and Fix(∂A) fixed, thus the groups are the same. By Lemma 3.3, we have that A is either a 11 A u A v A u Fix(∂A) ∼ = S2 × S3 Aut∂A (A) ∼ = S2 × S3 u Fix(∂A) ∼ = D6 Aut∂A (A) ∼ = D6 Fix(∂A) ∼ = C2 Aut(A)∂A ∼ = C2 2 u A v Fix(∂A) ∼ = S22 Aut(A)∂A ∼ = S 2 ⋊ C2 2 Fig. 10. An atom A together with its groups Fix(∂A) and Aut∂A (A). From left to right, a star block atom, a non-star block atom, a proper atom, and a dipole. essentially a cycle, K2 with attached single pendant edges, or essentially 3-connected, so Aut∂A (A) is a subgroup of Dn where n is the degree of u. (c) Let A be a proper atom with ∂A = {u, v}. By Lemma 3.4, A+ is either essentially a cycle, or essentially 3-connected. The first case is trivial, so we deal with the latter case. Since Aut∂A (A) preserves ∂A, we have Aut∂A (A) = Aut∂A+ (A+ ), and Aut∂A+ (A+ ) fixes in addition the edge uv. Because A+ is essentially 3connected, Aut∂A+ (A+ ) corresponds to the stabilizer of uv in Aut(M) for a map M of A+ . But such a stabilizer is a subgroup of C22 . Since Fix(∂A) stabilizes the vertices of ∂A, it is a subgroup of C2 . (d) For an asymmetric dipole, we have Aut∂A (A) = Fix(∂A) which is a direct product of symmetric groups. For a symmetric dipole, we can permute the vertices in ∂A, so we get the semidirect product with C2 . t u Last, we argue that every planar symmetric atom A has an involutory automorphism exchanging ∂A, so the assumptions of Proposition 3.7 are always satisfied for planar graphs. Lemma 4.5. For every planar symmetric proper atom A with ∂A = {u, v}, there exists an involutory automorphism exchanging u and v. Proof. Since Aut∂A (A) is a subgroup of C22 , all elements are involutions. 5 t u The Jordan-like Characterization The automorphism groups of planar graphs are constructed using Theorem 2.1 from the automorphism groups of its connected components. It remains to deal with the automorphism groups of connected planar graphs. We describe them in this section, using the results of Sections 3 and 4, thus proving the main result of this paper. We show that Aut(connected PLANAR) can be described by a semidirect product series composed from few basic groups. In Subsection 5.1, we prove Theorems 1.3 and 1.4 as an easy consequence of our previous results. In Subsection 5.2, we give a Jordan-like characterization of all point-wise stabilizers of a vertex, or of a pair of vertices, in the automorphism groups of connected planar graphs. In Subsection 5.3, we describe all possible compositions of actions of spherical groups with the stabilizers described in Subsection 5.2. 5.1 Characterization by Semidirect Product Series First, we prove Theorems 1.3 and 1.4 which can be viewed as a rough approximation of the main result. Proof (Proof of Theorem 1.3). We define an epimorphism Θi : Aut(G) → Aut(Gi ) by Θi = Φ0 ◦ · · · ◦ Φi−1 , for i = 1, . . . , r −1. We have Ker(Θr−i ) > Ker(Θr−i−1 ) and since all the Ker(Θr−i ) are normal in Ker(Θr ), we can write Ker(Θr−i ) B Ker(Θr−i−1 ). By definition, Θr−i = Θr−i−1 ◦ Φr−i . Therefore, Ker(Θr−i )/Ker(Θr−i−1 ) ∼ = Ker(Φr−i ), for i = 1, . . . , r − 1. By Lemmas 3.5 and 4.4, Ker(Φr−i ) is isomorphic to a direct product of symmetric, cyclic, and dihedral groups. Moreover, Aut(G)/Ker(Θr−1 ) ∼ = Aut(Gr ). By Lemma 4.3 Aut(Gr ) is isomorphic to a spherical group. We have a subnormal chain Aut(G) = Ψ0 B Ψ1 B · · · B Ψr−1 = 1, where Ψi = Ker(Θr−i ) such that Ψi /Ψi+1 is a product of the required groups. By Jordan-Hölder theorem there exists a refinement satisfying the statement of the above subnormal chain. t u Proof (Proof of Theorem 1.4). The primitive graph Gr has Aut(Gr ) isomorphic to a spherical group by Lemma 4.3. By Lemma 4.5, we can apply Proposition 3.7 and Aut(Gi ) ∼ = Ker(Φi )oAut(Gi+1 ). By Lemma 3.6, the kernel Ker(Φi ) is the direct product of the groups Fix(∂A) for all atoms A in Gi . Each of these groups is isomorphic to either to a cyclic, or to a dihedral group, or to a direct product of symmetric groups. t u 12 Theorems 1.3 and 1.4 impose some necessary conditions fulfilled by the automorphism groups of a planar graph. On the other hand, not every abstract group satisfying these conditions is isomorphic to the automorphism group of some planar graph. First, Aut(Gi+1 ) admits an induced action on the groups Fix(∂A), where A ranges through all atoms of Gi . In particular, the sizes of orbits of Aut(Gi+1 ) are reflected in Aut(Gi ), since an orbit of length m gives rise to m copies of Fix(∂A), for some atom A. For instance, if Aut(Gr ) ∼ = Cn , then every orbit is of size 1, or n. Therefore, the possible powers of Fix(∂A) in Ker(Φr−1 ) are restricted. Applying Theorem 1.4 repeatedly, we can construct Aut(G) recursively, starting in the root of the reduction tree and terminating its leaves. In the remainder of this section, we revert the approach and construct a Jordan-like characterization of the automorphism groups of planar graphs from the leaves to the root of reduction trees. 5.2 Fixer of the Boundary of an Expanded Atom Consider the reduction tree of a planar connected graph G. For an atom A in Gi , let A∗ denote the subgraph of G corresponding to the node A and all its descendants in the reduction tree. In other words, A∗ is the fully expanded atom A. Let Fix(∂A∗ ) be the point-wise stabilizer of ∂A∗ = ∂A in Aut∂A∗ (A∗ ).  Fix(connected PLANAR) = Fix(∂A∗ ) : A is an atom of the reduction tree of a planar graph . Equivalently, Fix(connected PLANAR) consists of all point-wise stabilizers of a vertex, or of a pair of vertices, in the automorphism groups of connected planar graphs. Theorem 5.1. The class Fix(connected PLANAR) is defined inductively as follows: (a) {1} ∈ Fix(connected PLANAR). (b) If Ψ1 , Ψ2 ∈ Fix(connected PLANAR), then Ψ1 × Ψ2 ∈ Fix(connected PLANAR). (c) If Ψ ∈ Fix(connected PLANAR), then Ψ o Sn , Ψ o Cn ∈ Fix(connected PLANAR). (d) If Ψ1 , Ψ2 , Ψ3 ∈ Fix(connected PLANAR), then (Ψ12n × Ψ2n × Ψ3n ) o Dn ∈ Fix(connected PLANAR), ∀n odd. (e) If Ψ1 , Ψ2 , Ψ3 , Ψ4 , Ψ5 ∈ Fix(connected PLANAR), then (Ψ12n × Ψ2n × Ψ3n × Ψ4n × Ψ5n ) o Dn ∈ Fix(connected PLANAR), ∀n ≥ 4, even. (f ) If Ψ1 , Ψ2 , Ψ3 , Ψ4 , Ψ5 , Ψ6 ∈ Fix(connected PLANAR), then (Ψ14 × Ψ22 × Ψ32 × Ψ42 × Ψ52 × Ψ6 ) o C22 ∈ Fix(connected PLANAR). We prove this theorem in a series of lemmas below. We note that the homomorphisms defining the semidirect products in the operations (d), (e), and (f) are specified in the proofs of Lemmas 5.4, 5.7, 5.8, and 5.9. Lemma 5.2. The class Fix(connected PLANAR) is closed under operations (a)–(f ). Further, every such group can be realized by a block atom, by a proper atom, or by a dipole, in arbitrarily many non-isomorphic ways. Proof. It is clear for (a) and Fig. 11 shows the constructions for the operations (b)–(f). Concerning the second part, for every group Ψ , arbitrarily many non-isomorphic atoms A such that Ψ ∼ = Fix(∂A) can be constructed. For instance, we can do it by replacing edges of a realization of Ψ by suitable rigid planar graphs (having no non-trivial automorphisms) consistently with the action of Ψ . Similarly, if some group can be realized by, say block atom, we can attach the corresponding pendant edge to some, say, rigid proper atom which preserves the group. t u In the rest of this section, we prove that each group in Fix(connected PLANAR) arises by using operations (b)–(f) repeatedly. We prove this by induction according to the depth of the reduction tree. Let A be an atom in Gi+1 , with each colored edge corresponding to some atom  in Gi which is expanded to Â∗ . The expanded atom A∗ is constructed from A by replacing all colored edges with expanded atoms Â∗ . By induction hypothesis, we assume that the groups Fix(∂ Â∗ ) can be constructed using (a)–(f). We relate Fix(∂A) and Fix(∂A∗ ) similarly as in Proposition 3.7. Let Φ : Fix(∂A∗ ) → Fix(∂A) be the reduction epimorphism Φ : π ∗ 7→ π defined as follows. For π ∗ ∈ Fix(∂A∗ ), the automorphism π = Φ(π ∗ ) maps the common parts of A and A∗ the same while π maps the colored edges in A as π ∗ maps the expanded atoms in A∗ . Note that ΦQ is Θi = Φ0 ◦ Φ1 ◦ · · · ◦ Φi restricted to Fix(∂A∗ ). Similarly as in the proof of Lemma 3.6, ∼ we have Ker(Φ) = Fix(∂ Â∗ ). Lemma 4.4 describes the group Fix(∂A), depending on the type of the atom A. Also, Lemma 4.5 generalizes to planar symmetric expanded atoms Â∗ . Therefore, every planar symmetric atom  has an involution τ̂ ∗ ∈ Aut∂ Â∗ (Â∗ ) swapping the boundary ∂A∗ . Exactly as in Proposition 3.7b, we can prove that Fix(∂A∗ ) ∼ (4) = Ker(Φ) o Fix(∂A). 13 Ψ Ψ Ψ1 u A Ψ1 Ψ2 v u A Ψ2 Ψ3 v A A u 4 Ψ1 × Ψ2 (b) u (Ψ10 1 6 Ψ ⋊ S4 Ψ ⋊ C6 (c) × × Ψ53 ) ⋊ D5 (d) Ψ52 Ψ2 Ψ2 Ψ4 Ψ1 Ψ5 Ψ3 Ψ5 A A u × Ψ62 × Ψ6 Ψ1 Ψ3 (Ψ12 1 Ψ4 Ψ63 × (e) u Ψ64 × Ψ65 ) (Ψ41 ⋊ D6 × Ψ22 × Ψ23 × Ψ24 × Ψ25 × Ψ6 ) ⋊ C22 (f) Fig. 11. Constructions for the operations (b)–(f), every colored edge corresponds to an atom  with Fix(∂ Â) isomorphic to the denoted group. In (d), we have three equivariant classes of edge-orbits in the action of Dn when n is odd. In (e), we have two further equivariant classes of edge-orbits in the action of Dn when n ≥ 4 is even. In (f), there is one extra equivariant class consisting of one edge-orbit in the action of D2 = C22 , generated by two reflections. We describe the semidirect product in (4) in more detail. The group Ker(Φ) consists of all automorphisms which fix A and only act non-trivially on interiors of all expanded atoms Â∗ . Each automorphism π ∗ ∈ Fix(A∗ ) can be written as a composition σ · π 0 of two automorphisms. First, the automorphism σ ∈ Ker(Φ) acts on interiors of all Â∗ . Then, the automorphism π 0 acts on A∗ as π ∈ Fix(A) acts on A, and π 0 maps interiors of Â∗ exactly as π maps the corresponding colored edges. When we compose σ1 · π10 · σ2 · π20 , we want to swap π10 with σ2 to write the resulting automorphism in the form σ · π 0 , which is done by the semidirect product. In the proof of Proposition 3.7a, we explain how to define the correspondence π 7→ π 0 consistently. Below, we divide the proof into several lemmas, according to the type of A, and further simplify (4) to get the operations (b) to (f). Suppose that two edge-orbits of A, corresponding to expanded atoms Â∗1 and Â∗2 , respectively, are equivariant in Fix(∂A). Then using (b), we can construct Fix(∂ Â∗1 ) × Fix(∂ Â∗2 ) and work with it, using distributivity, as with one group in (4). Therefore, we need to identity all equivariance classes of edge-orbits in Fix(∂A). The following two types of edge-orbits are considered. An edge-orbit of size k is called fixed, denoted k, if the corresponding half-edges form two orbits of size k. An edge-orbit of size k is called reflected, denoted k↔ , if the corresponding half-edges form one orbit of size 2k. We distinguish different geometric actions on the set of half-edges H(A), so a fixed edge-orbit of size k is non-equivariant with a reflected orbit of size k. Dipoles and Star Block Atoms. Lemma 5.3. Let A be a star block atom or a dipole. Then Fix(∂A∗ ) can be constructed from the groups Fix(∂ Â∗ ), using operations (b) and operations (c) for symmetric groups, where  ranges through all atoms corresponding to colored edges in A. Proof. The edges of the same type (for dipoles, we have undirected, directed in one way, directed in the other way) and color can be arbitrarily permuted. By Lemma 4.4, the action of Fix(∂A) has ` orbits, each consisting of all colored edges of one color and of the same type and orientation. These orbits have sizes m1 , . . . , m` , so Fix(∂A) ∼ = Sm1 × · · · × Sm` . Colored edges in these orbits correspond to atoms Â1 , . . . , Â` . Since Fix(∂A∗ ) acts independently on the atoms corresponding to each orbit of colored edges in Fix(∂A), each orbit contributes by one factor and Fix(∂A∗ ) is the direct product of these factors. The atoms corresponding to each orbit can be arbitrarily permuted, thus each factor is isomorphic to Fix(∂A∗i ) o Smi . t u 14 Proper Atoms. Lemma 5.4. Let A be a proper atom. Then Fix(∂A∗ ) can be constructed from the groups Fix(∂ Â∗ ), using operations (b) and operations (d) for D1 ∼ = C2 , where  ranges through all atoms corresponding to colored edges in A. Proof. By Lemma 4.4, we know that Fix(∂A) is a subgroup of C2 . If Fix(∂A) ∼ = C1 , then Fix(∂A∗ ) can be ∼ easily constructed only using (b). Otherwise, Fix(∂A) = C2 . Then the non-trivial automorphism π ∈ Fix(∂A) corresponds to a reflection through ∂A. Therefore, Fix(∂A) has some edge-orbits of colored edges of size two, and at most two types of edge-orbits of colored edges of size one, as depicted in Fig. 12: – Edge-orbits of type 2. We have `1 equivariant edge-orbits of size two, whose edges are reflected to each other by π. The colored edges in these orbits correspond to atoms A1 , . . . , A`1 . – Edge-orbits of type 1. We have `2 equivariant edge-orbits of size one, in which both half-edges forming each edge are fixed by π, together with the incident vertices. The colored edges in these orbits correspond to atoms B1 , . . . , B`2 . – Edge-orbits of type 1↔ . We have `3 equivariant edge-orbits of size one, in which the half-edges forming each edge are exchanged by π. Therefore, these half-edges belong to one orbit, the incident vertices also belong to one orbit and the corresponding edges are reflected by π. The colored edges in these orbits correspond to (necessarily) symmetric atoms C1 , . . . , C`3 . Let τ ∈ Aut∂C1 (C1 ) × · · · × Aut∂C`3 (C`3 ) be an involution which exchanges the boundaries of each of these atoms (ensured by Lemma 4.5), and τ ∗ be a corresponding involution in Aut∂C1∗ (C1∗ ) × · · · × Aut∂C`∗ (C`∗3 ). 3 We need to distinguish two equivariant classes of edge-orbits of size one since the reflection π behaves differently with respect to them. For size one, fixed, two half-edges also form orbits of size one. On the other hand, for size one, reflected, both half-edges belong to the same orbit of size one. In π ∗ , the boundaries of Bi∗ are fixed, but the boundaries of Ci∗ are swapped, by applying τ ∗ on Ci∗ . To be able to distinguish these two cases in A, it is important to consider automorphisms on half-edges instead of edges. To construct Fix(∂A∗ ), we put Ψ1 = `1 Y Fix(∂A∗i ), Ψ2 = `2 Y Fix(∂Bi∗ ), Ψ3 = Fix(∂Ci∗ ) i=1 i=1 i=1 `3 Y using (b). Then it easily follows that Fix(∂A∗ ) ∼ = (Ψ12 × Ψ2 × Ψ3 ) oϕ C2 , (5) where ϕ is the homomorphism defined as ϕ(1) = (α1 , α10 , α2 , α3 ) 7→ (α10 , α1 , α2 , τ ∗ · α3 ), ϕ(0) = id, α1 ∈ Ψ1 , α10 ∈ Ψ10 ∼ = Ψ1 , α2 ∈ Ψ2 , and α3 ∈ Ψ3 . So Fix(∂A∗ ) can be constructed using (b) and (d) (since ∼ D1 = C2 ). t u We note that semidirect product in (5) can be further simplified into (Ψ12 × Ψ3 ) oϕ C2 × Ψ2 since ϕ acts trivially on the coordinate corresponding to Ψ2 . So the operation (d) for D1 ∼ = C2 could be simplified. We use this simplification in Section 6. A2 A1 π B1 A1 A4 A5 C1 C2 A4 A5 A3 C1∗ B2 C2∗ τ∗ A3 A2 Fig. 12. On the left, the action of Fix(∂A) is generated by the reflection π. Observe that π acts differently on the edges corresponding to B1 and B2 (π fixes them) than on the edges corresponding to C1 and C2 (π reflects them). Therefore, in Fix(∂A∗ ), we compose π with an involution τ ∗ reflecting C1∗ and C2∗ , depicted on the right. 15 60◦ A2 A2 A2 A2 A2 A1 (a) B A1 A2 72◦ C2 A1 A 1 A1 D A1 C1 v A1 A1 C2 (b) A A1 C1 A1 B1 C1 A1 A u u B1 B1 C2 A1 A1 B1 C 1 B1 A1 C 2 C1 A1 A1 C2 Fig. 13. (a) An example of a non-star block atom A with Fix(∂A) ∼ = C6 generated by the 60◦ rotation through u and v. We have two orbits of colored edges of size 6, whose edges correspond to atoms A1 and A2 . Further, the vertex v has attached a single pendant edge, corresponding to a block atom B. (b) On the left, an example of a non-star block atom A with Fix(∂A) ∼ = D5 consisting of five rotations by multiples of 72◦ and five depicted reflections. On the right, the view from above, with colored edges labeled by the corresponding atoms. Different types of edge-orbits are depicted with different types of edges. We have `1 = `2 = 1 and `3 = 2. Non-star Block Atoms. Now, we deal with non-star block atoms A which are the most involved. By Lemma 4.4, we know that Fix(∂A) is a subgroup of a dihedral group, so it is isomorphic either to Cn , or to Dn . By Lemma 3.3, A is either K2 with an attached pendant edge, essentially a cycle, or essentially 3connected. In the first two cases, Fix(∂A) is a subgroup of C2 . If Fix(∂A) is not isomorphic to a subgroup of C2 , then A is necessarily an essentially 3-connected graph. Lemma 5.5. Let A be a non-star block atom with Fix(∂A) ∼ = Cn . Then Fix(∂A∗ ) can be constructed from ∗ the groups Fix(∂  ), using operations (b), operations (c) for Cn , and operations (d) for D1 ∼ = C2 , where  ranges through all atoms corresponding to colored edges in A. Proof. When Fix(∂A) ∼ = C1 , it has no non-trivial automorphism and Fix(∂A∗ ) can be constructed using only ∼ (b). When Fix(∂A) = C2 , it has a single non-trivial automorphism π which is either a reflection or a 180◦ rotation around ∂A. In the case of the 180◦ rotation, there is at most one edge-orbit of size 1 which is either fixed (for a pendant edge), or reflected (for a normal edge). Further, we proceed similarly as in the case of a proper atom in Lemma 5.4 to prove that Fix(∂A∗ ) can be constructed using (b) and (d). Suppose that Fix(∂A) ∼ = Cn for some n ≥ 3. Recall that A is essentially 3-connected. The situation is depicted in Fig. 13a. The group Fix(∂A) is the stabilizer of the unique vertex u in ∂A. Recall from Section 4 that in the language of isometries its action is generated by a rotation around u and the opposite point of the sphere. Therefore, every edge-orbit of Fix(∂A) is of size one or n. All the edge-orbits of size n are equivariant. Suppose that the action of Fix(∂A) consists of ` equivariant edge-orbits of colored edges of size n. The colored edges in these edge-orbits correspond to atoms A1 , . . . , A` . The opposite point of the sphere is a vertex v or the center of a face. (Since n ≥ 3, it cannot contain the center of an edge.) In the former case, there might be an edge-orbit of size one consisting of a single pendant edge attached to v, and suppose that this pendant edge corresponds to a block atom B. In the later case, there is no edge-orbit of size one. Let Ψ = Fix(∂A∗1 ) × · · · × Fix(∂A∗` ), we can construct it using (b). Then we get Fix(∂A∗ ) ∼ = Ψ o Cn × Fix(∂B ∗ ), where Fix(∂B ∗ ) = {1} if no edge-orbit of size one exists. So we construct Fix(∂A∗ ) using (b) and (c). t u It remains to deal with dihedral groups. First, we determine the possible counts of equivariant classes of edge-orbits. Lemma 5.6. Let A be a non-star block atom with Fix(∂A) ∼ = Dn . – If n is odd, then all edge-orbits of type n are equivariant and all edge-orbits of type n↔ are equivariant. – If n is even, then there are at most two equivariant classes of edge-orbits of types n and n↔ . 16 Proof. The statement clearly holds for n = 1, so in what follows, we assume n ≥ 2. Recall from Section 4 that in the language of isometries the action of Fix(∂A) consists of n rotations and n reflections. Each rotation fixes only ∂A and the opposite point of the sphere, and each reflection fixes a circle containing ∂A and the opposite point. Let r be the rotation by 360◦ /n, then all rotations are id, r, r2 , . . . , rn−1 . Let f1 , f2 , . . . , fn be the reflections as their planes are ordered cyclically, perpendicular to the axis of the rotations; see Fig. 14. These reflections are cyclically linked by the conjugation fi+2 = r−1 fi r. The key distinction is that for n odd, all reflections are conjugate of each other, but for n even, we get two conjugacy classes f1 , f3 , . . . , fn−1 and f2 , f4 , . . . , fn . Let e be an edge belonging to a fixed/reflected edge-orbit [e] of size n. The rotation r does not stabilize any edge in [e], so each edge is stabilized by some reflection. From the geometry, [e] = {e, r · e, r2 · e, . . . , rn−1 e}. Suppose that e is stabilized by fi . Then r · e is stabilized by fi+2 , r2 · e by fi+4 , and so on. When n is odd, each reflection stabilizes exactly one edge in [e]; see Fig.14 on the left. Therefore, two edge-orbits [e] and [e0 ] of size n, both fixed or reflected, are equivariant: the edges in [e] and [e0 ] having the same stabilizer can be matched. When n is even, only one conjugacy class of reflections stabilizes edges in [e], each stabilizing ri · e and i+n/2 r · e. When two edge-orbits [e] and [e0 ] of size n, both fixed or reflected, are stabilized by the same conjugacy class of reflections, they are equivariant. Therefore, we get at most two equivariant classes of both fixed and reflected edge-orbits of size n. t u To specify the semidirect products in (d) and (e), we describe the action of Dn on an edge-orbit [e] of size n. The rotation r maps rk · e to rk+1 · e. When the reflection fi stabilizes e0 ∈ [e], then it swaps r · e0 with r−1 · e0 , r2 · e0 with r−2 · e0 , and so on; it fixes e0 and for n even also rn/2 · e0 . The reflection fi+1 swaps r · e0 with e0 , r2 · e0 with r−1 · e0 , r3 · e0 with r−2 · e0 , and so on. As stated, the reflection fi+2 stabilizes r2 · e0 , and so on. Let h and h0 be the half-edges corresponding to e. Consider 2n half-edges corresponding to edges in [e]. In the action of hri, they form two orbits {h, r · h, r2 · h, . . . , rn−1 · h} and {h0 , r · h0 , r2 · h0 , . . . , rn−1 · h0 } of size n. When [e] is fixed, these two orbits are preserved in the action of Dn . When [e] is reflected, each reflection fk swaping ri · e with rj · e swaps ri · h with rj · h0 and ri · h0 with rj · h, so we get one orbit of half-edges of size 2n in the action of Dn . We note that the action of Dn on an edge-orbit of size 2n is the same as the action on the half-edges corresponding to n↔ . When Fix(∂A) ∼ = D1 ∼ = C2 , we use Lemma 5.5. We start with an easier case of Fix(∂A) ∼ = Dn , for n ≥ 3, odd. Lemma 5.7. Let A be a non-star block atom with Fix(∂A) ∼ = Dn for n ≥ 3 and odd. Then Fix(∂A∗ ) can be ∗ constructed from the groups Fix(∂  ), using operations (b), and operations (d), where  ranges through all atoms corresponding to colored edges in A. Proof. As it is described in the proof of Lemma 5.6, the group Fix(∂A) ∼ = Dn consists of n rotations and n reflections; see Fig. 13b. It acts semiregularly on the angles of the map and all edge-orbits are of size one, n, or 2n. By Lemma 5.6, all fixed/reflected edge-orbits of size n are equivariant and Fix(∂A) acts on them as described below Lemma 5.6. – Edge-orbits of type 1. The opposite point of the sphere either contains a vertex v, or the center of a face. In the former case, there might be at most one edge-orbit of size one, consisting of a single pendant edge attached to v corresponding to a block atom D. In the latter case, no edge-orbit of size one exists. f4 f3 r f5 r r f5 f4 f3 r f2 f6 f2 r f1 f1 r f1 f1 r r f2 f5 f2 f3 r f6 r f3 f4 f4 r f5 Fig. 14. Two block atoms A with Fix(∂A) ∼ = Dn in the view from above, with n = 5 on the left and n = 6 on the right. The rotation r and the reflections f1 , . . . , fn are denoted. On the left, each edge of an edge-orbit of size n is stabilized by exactly one reflection. On the right, each pair of opposite edges of an edge-orbit of size n is stabilized by exactly one reflection from one of the conjugacy classes f1 , f3 , . . . , fn−1 and f2 , f4 , . . . , fn . 17 60◦ C1 D1 C1 A1 E1 B 1 E1 A1 B1 B1 A1 E1 B1 B1 A1 A F C1 A1 E1 A1 D1 D1 A1 D1 A1 B1 A1 C1 u E1 A1 D1 E1 A1 D1 A1 C1 C1 Fig. 15. On the left, an example of a non-star block atom A with Fix(∂A) ∼ = D6 consisting of 6 rotations by multiples of 60◦ and six depicted reflections. On the right, the view from above, with colored edges labeled by the corresponding atoms. Different types of edge-orbits are depicted with different types of edges. We have `1 = `2 = `3 = `4 = `5 = 1. – Edge-orbits of type n. We have `2 equivariant fixed edge-orbits of colored edges of size n, corresponding to atoms B1 , . . . , B`2 . – Edge-orbits of type n↔ . We have `3 equivariant reflected edge-orbits of colored edges of size n, corresponding to necessarily symmetric atoms C1 , . . . , C`3 . Let τi∗ ∈ Aut∂Ci∗ (Ci∗ ) be an involution exchaning ∂Ci∗ , ensured by Lemma 4.5. – Edge-orbits of type 2n. We have `1 equivariant edge-orbits of colored edges of size 2n, corresponding to atoms A1 , . . . , A`1 . We put Ψ1 = `1 Y i=1 Fix(∂A∗i ), Ψ2 = `2 Y Fix(∂Bi∗ ), i=1 Ψ3 = `3 Y Fix(∂Ci∗ ). i=1 It follows that Fix(∂A∗ ) ∼ = (Ψ12n × Ψ2n × Ψ3n ) oϕ D2n × Fix(∂D∗ ), where Fix(∂D∗ ) = {1} if there is no edge-orbit of size one. The homomorphism ϕ is defined based on the description of the action of D2n below Lemma 5.6. It permutes the coordinates of Ψ12n regularly as D2n acts on half-edges of a reflected edge-orbit of size n. It permutes the coordinates in Ψ2n and Ψ3n following the action on the edges of fixed and reflected edge-orbits of size n, respectively. For the edges of reflected edge-orbits corresponding to Ci∗ , when half-edges are swapped by an element π ∈ Fix(∂A), the involution τi∗ is used in the action of π ∗ ∈ Fix(∂A∗ ) on the corresponding atoms Ci∗ . Therefore, Fix(∂A∗ ) can be constructed using (b) and (d). t u Next, we deal with the case Fix(∂A) ∼ = Dn , for n ≥ 4 and even. Lemma 5.8. Let A be a non-star block atom with Fix(∂A) ∼ = Dn for n ≥ 4, even. Then Fix(∂A∗ ) can be ∗ constructed from the groups Fix(∂  ), using operations (b), and operations (e), where  ranges through all atoms corresponding to colored edges in A. Proof. As it is described in the proof of Lemma 5.6, the group Fix(∂A) ∼ = Dn consists of n rotations and n reflections; see Fig. 15. It acts semiregularly on the angles of the map and all edge-orbits are of size one, n, or 2n. By Lemma 5.6, there are at most two equivariant classes of fixed/reflected edge-orbits of size n and Fix(∂A) acts on them as described below Lemma 5.6. – Edge-orbits of type 1. Exactly as in the proof of Lemma 5.7, there is at most one edge-orbit of size one, consisting of a single pendant edge corresponding to a block atom F . – Edge-orbits of type n. We have two equivariant classes of `2 and `4 fixed edge-orbits of colored edges of size n, corresponding to atoms B1 , . . . , B`2 and D1 , . . . , D`4 , respectively. 18 (1, 0) (1, 0) (0, 1) (1, 1) A3 E2 C1 A1 E1 A1 A2 E1 E2 F A1 A A3 C2 A2 D1 B1 A1 C1 A2 D1 (0, 1) C2 A2 A u A3 B1 A3 180◦ Fig. 16. On the left, an example of a non-star block atom A with Fix(∂A) ∼ = C22 generated by two depicted reflections. On the right, the view from above, with colored edges labeled by the corresponding atoms, the central edge corresponds to an atom F . Different types of edge-orbits are depicted with different types of edges. We have `1 = 3, `2 = `4 = 1 and `3 = `5 = 2. – Edge-orbits of type n↔ . We have two equivariance classes of `3 and `5 reflected edge-orbits of colored edges of size n, corresponding to necessarily symmetric atoms C1 , . . . , C`3 and E1 , . . . , E`5 . Let τi∗ ∈ Aut∂Ci∗ (Ci∗ ) be an involution exchanging ∂Ci∗ and let τ̂i∗ ∈ Aut∂Ei∗ (Ei∗ ) be an involution exchanging ∂Ei∗ , ensured by Lemma 4.5. – Edge-orbits of type 2n. We have `1 equivariant edge-orbits of colored edges of size 2n, corresponding to atoms A1 , . . . , A`1 . We put Ψ1 = `1 Y Fix(∂A∗i ), i=1 It follows that Ψ2 = `2 Y i=1 Fix(∂Bi∗ ), Ψ3 = `3 Y Fix(∂Ci∗ ), i=1 Ψ4 = `4 Y Fix(∂Di∗ ), i=1 Ψ5 = `5 Y Fix(∂Ei∗ ). i=1 Fix(∂A∗ ) ∼ = (Ψ12n × Ψ2n × Ψ3n × Ψ4n × Ψ5n ) oϕ D2n × Fix(∂F ∗ ), where Fix(∂F ∗ ) = {1} if there is no edge-orbit of size one. The homomorphism ϕ is defined based on the description of the action of D2n below Lemma 5.6. It permutes the coordinates of Ψ12n regularly following the action of D2n on half-edges of a reflected edge-orbit of size n. It permutes the coordinates in Ψ2n , Ψ3n , Ψ4n , and Ψ5n in the same way as the edges of two equivariance classes of fixed and reflected edge-orbits of size n, respectively. For the edges of reflected edge-orbits corresponding to Ci∗ and Ei∗ , when half-edges are swapped by an element π ∈ Fix(∂A), the involutions τi∗ and τ̂i∗ are used in the action of π ∗ ∈ Fix(∂A∗ ) on the corresponding atoms Ci∗ and Ei∗ , respectively. Therefore, Fix(∂A∗ ) can be constructed using (b) and (e). t u It remains to deal with the last case of Fix(∂A) ∼ = D2 ∼ = C22 which may have the most involved structure of edge-orbits. Lemma 5.9. Let A be a non-star block atom with Fix(∂A) ∼ = D2 ∼ = C22 . Then Fix(∂A∗ ) can be constructed ∗ from the groups Fix(∂  ), using operations (b) and (f ), where  ranges through all atoms corresponding to colored edges in A. Proof. As it is described in the proof of Lemma 5.6, the group Fix(∂A) ∼ = D2 ∼ = C22 is generated by two reflections (1, 0) and (0, 1) through ∂A, orthogonal to each other. Composition of these two reflections forms the 180◦ rotation (1, 1) through ∂A and the opposite point of the sphere. (We identified the geometric transformations with the elements of the elementary abelian group of order 4.) Therefore, every edge-orbit of Fix(∂A) is of size one, two, or four, and we describe them below; see Fig. 16 for an example. – Edge-orbits of type 1 and of type 1↔ . The rotation (1, 1) and the reflections (1, 0) and (0, 1) stabilize, aside ∂A, the opposite point of the sphere which contains either a vertex, or the center of an edge, or the center of a face. 19 • If they stabilize the center of a face, there is no edge-orbit of size 1. • If they stabilize a vertex v, there might be a fixed edge-orbit of size 1 consisting of a single pendant edge attached at v. We deal with it using (b) as in the proofs of Lemmas 5.5, 5.7 and 5.8, and we put Ψ6 = {1} and τ6∗ = id. • If they stabilize the center of an edge e, then [e] is a reflected edge-orbit of size 1. Let F be a symmetric atom corresponding to the colored edge e and we put Ψ6 = Fix(∂F ∗ ). By Lemma 4.5, there exists an involution τ6 exchanging ∂F , and let τ6∗ be a corresponding involution in Aut∂F ∗ (F ∗ ). – Edge-orbits of type 2 and of type 2↔ . By Lemma 5.6, there are at most two equivariant classes of fixed/reflected edge-orbits of size 2, one class stabilized by (1, 0) and the other one by (0, 1). • There are `2 equivariant edge-orbits of colored edges fixed by the reflection (1, 0). These colored edges correspond to atoms B1 , . . . , B`2 . • There are `3 equivariant edge-orbits of colored edges reflected by (1, 0). These colored edges correspond to symmetric atoms C1 , . . . , C`3 . Let τ3∗ ∈ Fix(∂C1∗ ) × · · · × Fix(∂C`∗3 ) be an involution exchanging their boundaries. • There are `4 equivariant edge-orbits of colored edges fixed by the reflection (0, 1). These colored edges correspond to atoms D1 , . . . , D`4 . • There are `5 equivariant edge-orbits of colored edges reflected by (0, 1). These colored edges correspond to symmetric atoms E1 , . . . , E`3 . Let τ5∗ ∈ Fix(∂E1∗ ) × · · · × Fix(∂E`∗5 ) be an involution exchanging their boundaries. – Edge-orbits of type 4. The group Fix(∂A) acts regularly on edge-orbits of size four. Suppose we have `1 equivariant edge-orbits of colored edges of size four, and these colored edges correspond to atoms A1 , . . . , A ` 1 . We put Ψ1 = `1 Y Fix(∂A∗i ), i=1 Ψ2 = `2 Y i=1 It easily follows that Fix(∂Bi∗ ), Ψ3 = `3 Y Fix(∂Ci∗ ), Ψ4 = i=1 `4 Y Fix(∂Di∗ ), Ψ5 = i=1 `5 Y Fix(∂Ei∗ ). i=1 Fix(∂A∗ ) ∼ = (Ψ14 × Ψ22 × Ψ32 × Ψ42 × Ψ52 × Ψ6 ) oϕ C22 . Assuming that (1, 0) reverses the edge e6 , the homomorphism ϕ is defined by ϕ(1, 0) = (π1 , π10 , π100 , π1000 , π2 , π20 , π3 , π30 , π4 , π40 , π5 , π50 , π6 ) 7→ (π10 , π1 , π1000 , π100 , π2 , π20 , τ3∗ · π3 , τ3∗ · π30 , π40 , π4 , π50 , π5 , τ6∗ · π6 ), ϕ(0, 1) = (π1 , π10 , π100 , π1000 , π2 , π20 , π3 , π30 , π4 , π40 , π5 , π50 , π6 ) 7→ (π100 , π1000 , π1 , π10 , π20 , π2 , π30 , π3 , π4 , π40 , τ5∗ · π5 , τ5∗ · π50 , π6 ), where τ6∗ = id if e6 does not exist. Therefore, Fix(∂A∗ ) can be constructed using (b) and (f). t u Now, we are ready to prove the Jordan-like characterization of Fix(connected PLANAR). Proof (Theorem 5.1). Lemma 5.2 describes constructions. We prove the opposite implication by induction according to the depth of the subtree of a reduction tree. Let A be an atom and suppose that the subtrees rooted at all its children can be realized by (b) to (f). By Lemmas 5.3, 5.4, 5.5, 5.7, 5.8, and 5.9, also Fix(∂A∗ ) can be realized by (b) to (f). t u 5.3 Composition of Spherical groups with Fixers It remains to deal with the root of the reduction tree, corresponding to the primitive graph Gr . In comparison with atoms, Aut(Gr ) does not have to stabilize any vertex or edge, unlike Fix(∂A) which stabilizes ∂A. Therefore, all spherical groups are available for Aut(Gr ). Now, we are ready to prove the main result of this paper, classifying Aut(connected PLANAR). Theorem 5.10. Let H be a planar graph with colored vertices and colored (possibly oriented) edges, which is either 3-connected, or K1 , or K2 , or a cycle Cn . Let m1 , . . . , m` be the sizes of the vertex- and edge-orbits of the action of Aut(H). Then for all choices Ψ1 , . . . , Ψ` ∈ Fix(connected PLANAR), we have (Ψ1m1 × · · · × Ψ`m` ) o Aut(H) ∈ Aut(connected PLANAR), where Aut(H) permutes the factors of Ψ1m1 × · · · × Ψ`m` following the action on the vertices and edges of H. On the other hand, every group of Aut(connected PLANAR) can be constructed in the above way as (Ψ1m1 × · · · × Ψ`m` ) o Σ, where Ψ1 , . . . , Ψ` ∈ Fix(connected PLANAR) and Σ is a spherical group. 20 Ψ3 Ψ3 Ψ2 Ψ2 Ψ1 Ψ4 Ψ1 Ψ4 H H Fig. 17. On the left, a 3-connected planar graph H obtained from the cube, with only three front faces depicted. We have Aut(H) ∼ = C2 × S4 and its action *432 in Table 1. Different orbits are shown in different colors: there are two vertex-orbits (of sizes 8 and 6) and two edge-orbits (of sizes 24 and 12). On the right, H is modified by attaching single pendant edges of different colors for each vertex-orbit. For arbitrary choices of Ψ1 , Ψ2 , Ψ3 , Ψ4 ∈ Fix(connected PLANAR), we can expand H to H ∗ with Aut(H ∗ ) ∼ = (Ψ124 × Ψ212 × Ψ38 × Ψ46 ) o (C2 × S4 ). Notice that some automorphisms of Aut(H) reflect some white edges and the corresponding automorphism in Aut(H ∗ ) reflect the expanded atoms corresponding to these edges by τ2∗ . Proof. Let H be a graph satisfying the assumptions; for an example, see Fig. 17. First, we replace colors of the vertices of H with colored single pendant edges attached to them. Using Lemma 5.2, we choose arbitrary pairwise non-isomorphic extended atoms A∗1 , . . . , A∗` such that Fix(∂A∗i ) ∼ = Ψi , and we replace the corresponding colored edges with them. If the edge-orbit replaced by A∗i consists of undirected edges, we assume that A∗i are symmetric atoms, and let τi∗ ∈ Aut∂A∗i (A∗i ) be an involution exchanging ∂A∗i . If it consists of directed edges, we assume that A∗i are asymmetric atoms placed consistently with the orientation. We denote this modified planar graph by H ∗ . Exactly as in the proof of Proposition 3.7b, we get that m Aut(H ∗ ) ∼ = (Ψ1m1 × · · · × Ψ` ` ) oϕ Aut(H). An automorphism π ∗ ∈ Aut(H ∗ ) permutes the extended atoms exactly as π ∈ Aut(H) permutes the colored edges. If π reflects an edge representing a symmetric atom A∗i , then π ∗ reflects A∗i using τi∗ . For the other implication, let G be a planar graph. We apply the reduction series and obtain a primitive graph Gr . By Lemma 4.3, we know that Aut(Gr ) is a spherical group. Suppose that we have ` edge-orbits of colored edges in the action of Aut(Gr ). Suppose that their sizes are m1 , . . . , m` and their colored edges correspond to expanded atoms A∗1 , . . . , A∗` . By Theorem 5.1, we know that Fix(∂A∗i ) ∈ Fix(connected PLANAR). Further, for symmetric expanded atoms A∗i , by Lemma 4.5, there exists an involution τi∗ exchanging ∂A∗i . We proceed exactly as in the proof of Proposition 3.7 and we obtain  Aut(G) ∼ = Fix(∂A∗1 )m1 × · · · × Fix(∂A∗` )m` oϕ Aut(Gr ). t u Possible Lengths of Orbits. To describe the groups realizable as automorphism groups of connected planar graphs, we need to understand what are the possible restrictions on sizes mi of the orbits of Aut(G) in a 3-connected planar graph G. (When G is K1 , K2 or a cycle Cn , we get more restricted orbits than in the case of 3-connected planar graphs G. For instance, the wheel Wn is 3-connected and contains all orbits of Cn .) We investigate possible actions of spherical groups Σ realized as groups of isometries of polytopes projected onto the sphere. In [28], the following characterization of possible equivariance classes of orbits given in Table 1 is proved. Table 1 is organized as follows. Each row of the table corresponds to a distinguished (parametrized) spherical group Σ described using the notation of Conway and Thurston [5]. There are fourteen types of actions, several small special cases are discussed separately. The second column describes Σ as an abstract group and the third column gives the order of Σ. The fourth column gives the numbers of equivariance classes of point-orbits of Σ. By c · ab , we denote that there are c equivariance classes of point-orbits of size a, each class of size b. For instance, in the second row, the fourth entry contains 48∞ , 3·24∞ , 121 , 81 , 61 . This means that there are infinitely many mutually equivariant point-orbits of size 48, three infinite equivariant classes of point-orbits of size 24, and single point-orbits of sizes 12, 8, and 6. 21 |Σ| Action Σ Vertex-orbits Edge-orbits *532 A5 × C2 120 120∞ , 3 · 60∞ , 301 , 201 , 121 120, 3 · 60, 30, 20, 12 120, 3 · 60, −, 20, 12 120, 3 · 60, 3 · 60↔ , −↔ 120, 3 · 60, 3 · 60↔ , 30↔ *432 S4 × C2 48 48∞ , 3 · 24∞ , 121 , 81 , 61 48, 3 · 24, 12, 8, 6 48, 3 · 24, −, 8, 6 48, 3 · 24, 3 · 24↔ , −↔ 48, 3 · 24, 3 · 24↔ , 12↔ *332 S4 24 24∞ , 2 · 12∞ , 61 , 42 24, 2 · 12, 6, 4 24, 2 · 12, −, 4 24, 2 · 12, 2 · 12↔ , −↔ 24, 2 · 12, 2 · 12↔ , 6↔ *22n Dn × C2 , n ≥ 3, odd 4n (4n)∞ , 2 · (2n)∞ , n2 , 21 4n, 2 · 2n, n, 2 4n, 2 · 2n, 2 · 2n↔ , n↔ *22n Dn × C2 , n ≥ 4, even 4n (4n)∞ , 3 · (2n)∞ , 2 · n1 , 21 4n, 3 · 2n, 2 · n, 2 4n, 3 · 2n, n, 2 4n, 3 · 2n, −, 2 4n, 3 · 2n, 3 · 2n↔ , −↔ 4n, 3 · 2n, 3 · 2n↔ , n↔ 4n, 3 · 2n, 3 · 2n↔ , 2 · n↔ *222 D2 × C2 = C32 8 8 ,3 · 4 ,3 · 2 532 A5 60 60∞ , 301 , 201 , 121 60, 30, 20, 12 60, −, 20, 12 60, −↔ 60, 30↔ 432 S4 24 24∞ , 121 , 81 , 61 24, 12, 8, 6 24, −, 8, 6 24, −↔ 24, 12↔ 332 A4 12 12∞ , 61 , 42 12, 6, 4 12, 6, 4 12, −↔ 12, 6↔ 22n Dn , n ≥ 3, odd 2n (2n)∞ , n2 , 21 2n, n, 2 2n↔ , n↔ 22n Dn , n ≥ 4, even (2n) , 2 · n , 2 2n, 2 · n, 2 2n, n, 2 2n, −, 2 2n, −↔ 2n, n↔ 2n, 2 · n↔ 4, −↔ 4, 2↔ 4, 2 · 2↔ 4, 3 · 2↔ 2n Point-orbits ∞ ∞ ∞ 8, 8, 8, 8, 1 1 1 3 · 4, 3 · 2 3 · 4, 2 · 2 3 · 4, 2 3 · 4, − 8, 8, 8, 8, 3 · 4, 3 · 4, 3 · 4, 3 · 4, 3 · 4↔ , −↔ 3 · 4↔ , 2↔ 3 · 4↔ , 2 · 2↔ 3 · 4↔ , 3 · 2↔ 222 D2 = C22 4 4∞ , 3 · 21 4, 3 · 2 4, 2 · 2 4, 2 4, − 3*2 A4 × C2 24 24∞ , 12∞ , 81 , 61 24, 12, 8, 6 24, 12, 8, − 24, 12, 12↔ , −↔ 24, 12, 12↔ , 6↔ 2*n D2n , n ≥ 3 4n (4n)∞ , (2n)∞ , (2n)1 , 21 4n, 2 · 2n, 2 4n, 2n, 2 4n, 2n, 2n↔ 4n, 2n, 2 · 2n↔ 2*2 D4 8 8∞ , 4∞ , 41 , 21 8, 2 · 4, 2 8, 4, 2 8, 2 · 4, − 8, 4, − *nn Dn , n ≥ 3, odd 2n (2n)∞ , n∞ , 12 2n, n, 1 2n, n, n↔ *nn Dn , n ≥ 4, even 2n (2n)∞ , 2 · n∞ , 12 2n, 2 · n, 1 2n, 2 · n, 2 · n↔ *22 D2 = C22 4 4∞ , 2 · 2∞ , 12 4, 2 · 2, 1 4, 2 · 2, 2 · 2↔ , 1↔ nn Cn , n ≥ 3 n n∞ , 12 n, 1 n 22 C2 n 2∞ , 12 2, 1 2, 1↔ nx C2n , n ≥ 3 2n (2n)∞ , 21 2n, 2 2n 4, −↔ 4, 2↔ 8, 8, 8, 8, 4, 4↔ , 4, 2 · 4↔ , 4, 4↔ , 4, 2 · 4↔ , −↔ −↔ 2↔ 2↔ 2x C4 4 4∞ , 21 4, 2 4, − n* Cn × C2 , n≥3 2n (2n)∞ , n∞ , 21 2n, n, 2 2n, n, n↔ 2* C2 × C2 4 4∞ , 2∞ , 21 4, 2 · 2 4, 2 4, 2, 2↔ 4, 2, 2 · 2↔ Table 1. The list of all possible types of lengths of orbits in Theorem 5.10. 22 The fifth and sixth columns describe equivariance classes of vertex- and edge-orbits of Σ, respectively. In the second row, there are two options for sequences of possible vertex- and edge-orbits: either or 48, 3 · 24, 12, 8, 6 48, 3 · 24, −, 8, 6 and and 48, 3 · 24, 3 · 24↔ , −↔ , 48, 3 · 24, 3 · 24↔ , 12↔ . The multiplicity of orbits in equivariance classes is not displayed. The difference between the two cases comes from the fact that the unique point-orbit of size 12 is either a vertex-orbit or an edge-orbit. The subscript ↔ means that the edge-orbit is reflexive. Similarly as in the proofs in Section 5.2, we distinguish edge-orbits which are fixed (the corresponding half-edges form two orbits of the same size), depicted as c · a, and which are reflected, denoted as c · a↔ (the corresponding half-edges form one orbit of the double size). 6 Applications of Jordan-like Characterization In this section, we apply the Jordan-like characterization of Theorems 5.1 and 5.10 to describe automorphism groups of several important subclasses of planar graphs. First, we determine possible atoms, and primitive graphs and their automorphism groups. Then we determine possible stabilizers similarly as in the proof of Theorem 5.1, however, only some of the group products appear. Lastly, we combine these stabilizers together with spherical groups which are representable by primitive graphs, again only some of the (possibly restricted) cases of Table 1 may happen. In what follows, for a subclass C of planar graphs, we set  Fix(C) = Fix(∂A∗ ) : A is an atom of the reduction tree of a graph in C . For instance, consider the class of all trees (TREE). The only primitive graph is K1 (with a single pendant edge attached), so its automorphism group is trivial. All atoms are block atoms (either star block atoms or K2 with a single pendant edge attached). Therefore, the stabilizers are determined by Lemma 5.3. The class is closed under the direct product and the wreath product with symmetric groups. Since K1 has the trivial automorphism group, we get that the automorphism groups of trees are same as are the vertex-stabilizers of trees, so we get the Jordan’s characterization; see Theorem 1.2. 6.1 Automorphism Groups of 2-connected Planar Graphs Denote the class of 2-connected planar graphs by 2-connected PLANAR. Consider the reduction tree of a 2-connected planar graph. There are no block atoms since all the atoms are proper or dipoles. Note that Fix(2-connected PLANAR) consists of all point-wise stabilizers of edges in 2-connected planar graphs. The reason is that for a proper atom/dipole A with ∂A = {u, v}, we may consider the extended atom A+ constructed from A by adding the edge uv, and the corresponding expanded extended atom (A+ )∗ . Then Fix(∂A∗ ) is the point-wise stabilizer of the edge uv in Aut∂(A+ )∗ ((A+ )∗ ). Lemma 6.1. The class Fix(2-connected PLANAR) is defined inductively as follows: (a) {1} ∈ 2-Fix(2-connected PLANAR). (b) If Ψ1 , Ψ2 ∈ Fix(2-connected PLANAR), then Ψ1 × Ψ2 ∈ Fix(2-connected PLANAR). (c) If Ψ ∈ Fix(2-connected PLANAR), then Ψ o Sn ∈ Fix(2-connected PLANAR). (d) If Ψ1 , Ψ2 , Ψ3 ∈ Fix(2-connected PLANAR), then (Ψ12 × Ψ2 ) o C2 ∈ Fix(2-connected PLANAR). Proof. The constructions are explained in Fig. 11b, c, d. For the other implication, we argue exactly as in the proof of Theorem 5.1. We apply induction according to the depth of the reduction tree. Let A be an atom with colored edges corresponding to proper atoms/dipoles Â. We assume that Fix(∂ Â∗ ) can be constructed using the operations (a)–(d). Since A is a proper atom or a dipole, only Lemmas 5.3 and 5.4 apply, so the operations (b), (c), (d) are sufficient. For (d), we use the simplification described below the proof of Lemma 5.4. t u Notice that the operations (c) and (d) are restrictions of (c) and (d) from Theorem 5.1 to Sn and D1 ∼ = C2 , respectively. Also, the class Fix(2-connected PLANAR) is more rich than the class Aut(TREE), characterized by Jordan (Theorem 1.2) employing the operations (a)–(c). Therefore, Aut(TREE) ( Fix(2-connected PLANAR) ( Fix(connected PLANAR). Finally, we deal with a primitive graph in the root of the reduction tree. We easily modify the characterization in Theorem 5.10. There are two key differences. First, we use the class Fix(2-connected PLANAR) instead of Fix(connected PLANAR). Second, we only consider edge-orbits since there are no single pendant edges in primitive graphs, i.e., no expanded block atoms attached to their vertices. 23 Theorem 6.2. The class Aut(2-connected PLANAR) consists of the following groups. Let H be a planar graph with colored (possibly oriented) edges, which is either 3-connected, or K2 , or a cycle Cn . Let m1 , . . . , m` be the sizes of the edge-orbits of the action of Aut(H). Then for all choices Ψ1 , . . . , Ψ` ∈ Fix(2-connected PLANAR), we have (Ψ1m1 × · · · × Ψ`m` ) o Aut(H) ∈ Aut(2-connected PLANAR), where Aut(H) permutes the factors of Ψ1m1 × · · · × Ψ`m` following the action on the edges of H. On the other hand, every group of Aut(2-connected PLANAR) can be constructed in the above way as (Ψ1m1 × · · · × Ψ`m` ) o Σ, where Ψ1 , . . . , Ψ` ∈ Fix(2-connected PLANAR) and Σ is a spherical group. Proof. The reduction tree of a 2-connected planar graph contains only proper atoms and dipoles, and the primitive graph cannot be K1 . The proof proceeds as in Theorem 5.10, the only difference is that we use Lemma 6.1 instead of Theorem 5.1. t u 6.2 Automorphism Groups of Outerplanar Graphs Let G be a connected outerplanar graph with the reduction series G = G0 , . . . , Gr . All graphs Gi are outerplanar. Since no 3-connected planar graph is outerplanar, Gr is by Lemma 3.5 either K1 , K2 , or a cycle Cn (possibly with a single pendant edge attached). So, Aut(Gr ) is a subgroup of a dihedral group. Next, we describe possible atoms encountered in the reduction: – Star block atoms. We have arbitrary star block atoms. – Non-star block atoms. Each non-star block atom A is outerplanar. By Lemma 3.3, A is either K2 or Cn with single pendant edges attached. Therefore, Fix(∂A) is a subgroup of C2 . – Proper atoms. For a proper atom A with ∂A = {u, v}, the extended proper atom A+ is an outerplanar graph having an embedding with the edge uv in the outer face. Therefore, by Lemma 3.4, A is a non-trivial path, so Fix(∂A) ∼ = C1 . – Dipoles. For a dipole A with ∂A = {u, v}, the extended dipole A+ (with the edge uv) has an embedding such that the edge uv belong to the outer face. Therefore, assuming that G contains no parallel edges, A consists of exactly two edges, one corresponding to an edge of G, and the other to a proper atom. Again, Fix(∂A) ∼ = C1 . Lemma 6.3. Fix(connected OUTERPLANAR) = Aut(TREE). Proof. By induction, when A is a proper atom or a dipole, we get that Fix(∂A∗ ) is the direct product of Fix(∂ Â∗ ) of the attached extended block atoms. Alternatively, it can be argued that each 2-connected outerplanar graph G has Aut(G) a subgroup of Dn . Unless G is a cycle, Aut(G) stabilizes the outer face. We use the same approach as in the proof of Theorem 5.1. Only Lemmas 5.3, 3.4 for C1 , and 5.5 for subgroups of C2 apply. For a block atom A with Fix(∂A) ∼ = C2 , there might be either an edge-orbit of type 1 consisting of a pendant edge corresponding to a block-atom B, or an edge-orbit of type 1↔ consisting of an edge corresponding to a proper atom or a dipole C. In the latter case, Fix(∂C ∗ ) is just the direct product of extended block atoms attached in C ∗ , so the reflection in Fix(∂A) just swaps them, while at most one is fixed. Therefore, Fix(connected OUTERPLANAR) is defined inductively by the operations (a)–(c) from Theorem 1.2. t u By adapting the proof of Theorem 5.10, we get the following: Theorem 6.4. The class Aut(connected OUTERPLANAR) consists of the following groups: (i) If Ψ ∈ Fix(connected OUTERPLANAR), then Ψ o Cn ∈ Aut(connected OUTERPLANAR). (ii) If Ψ1 , Ψ2 ∈ Fix(connected OUTERPLANAR), then (Ψ12n × Ψ2n ) o Dn ∈ Aut(connected OUTERPLANAR), ∀n odd. (iii) If Ψ1 , Ψ2 , Ψ3 ∈ Fix(connected OUTERPLANAR), then (Ψ12n × Ψ2n × Ψ3n ) o Dn ∈ Aut(connected OUTERPLANAR), Moreover, Aut(connected OUTERPLANAR) = Aut(PSEUDOTREE). 24 ∀n even. T (i) T T T1 T1 T1 T T T2 T1 (ii) T2 T2 T1 T1 T1 T1 T2 T3 T1 T1 T2 T2 T1 T1 T2 T1 T3 T1 T1 T2 (iii) T1 T3 T3 T1 T2 T1 Fig. 18. Construction of the automorphism groups from Theorem 6.4, for Fix(∂T ) ∼ = Ψ and Fix(∂Ti ) ∼ = Ψi . Proof. We have PSEUDOTREE ( connected OUTERPLANAR and all these automorphism groups are already realized by pseudotrees, see Fig. 18. It follows that Aut(connected OUTERPLANAR) = Aut(PSEUDOTREE). For the other direction, consider the primitive graph Gr associated to G. We assume that Gr is a cycle, otherwise it is trivial. We get three cases leading to different automorphism groups from the statement: (i) Aut(Gr ) ∼ = Cn , for n 6= 2, (ii) Aut(Gr ) ∼ = Dn , for n odd, (iii) Aut(Gr ) ∼ = Dn , for n even. In the case (i), we have only edge-orbits of type n corresponding to block atoms A1 , . . . , A` , so Ψ = Fix(∂A∗1 ) × · · · × Fix(∂A∗` ) and Aut(Gr ) ∼ = Ψ o Cn . In the case (ii), we have edge-orbits of types 2n, n, n↔ , each forming one equivariant class of orbits; see Lemma 5.6. We define Ψ1 , Ψ2 , and Ψ3 exactly as in the proof of Lemma 5.7. However, since Fix(∂A∗ ) of a proper atom or a dipole A is the direct product of Fix(∂ Â∗ ) of the attached extended block atoms Â∗ , we can place these factors into Ψ1 and Ψ2 . Therefore, Aut(Gr ) ∼ = (Ψ12n × Ψ2n ) o Dn . In the case (iii), the argument is similar as in (ii), but we have two equivariance classes of edge-orbits of type n and of type n↔ . Thus we adapt the proof of Lemma 5.8 instead. t u We get Aut(OUTERPLANAR) = Aut(PSEUDOFOREST), and their characterization follows from from Theorem 2.1, 6.3 Automorphism Groups of Series-Parallel Graphs Series-parallel graphs are defined inductively as follows. Each series-parallel graph contains a pair of terminal vertices (s, t). The graph K2 with the vertices (s, t) is series-parallel. For two series-parallel graphs G1 (s1 , t1 ) and G2 (s2 , t2 ), we can construct a series-parallel graph on the vertices V (G1 )∪V (G2 ) by using two operations. The parallel operation identifies s1 = s2 and t1 = t2 and has the terminal vertices (s1 , t1 ). The series operation identifies t1 = s2 and has the terminal vertices (s1 , t2 ). The class of all generalized series-parallel graphs (or just series-parallel graphs) consists of all graphs having each block a series-parallel graph, we denote this class by SERIES-PARALLEL. Clearly, OUTERPLANAR ( SERIES-PARALLEL. Let G be a connected series-parallel graph with the reduction series G = G0 , . . . , Gr . All graphs the graphs Gi remain series-parallel since each 1-cut and 2-cut is introduced in the composition of the graph using one or the other operation. The only exception is Gr , where we allow Gr = K1 . Since no 3-connected planar graph is series-parallel, Gr is by Lemma 3.5 again either K1 , K2 , or a cycle Cn , with attached single pendant edges. So, Aut(Gr ) is a subgroup of a dihedral group. Next, we describe possible atoms encountered in the reduction: – Star block atoms. Star block atoms may be arbitrary. – Non-star block atoms. Each non-star block atom A is a series-parallel graph. By Lemma 3.3, we get that A is either K2 or a cycle with attached single pendant edges, so Fix(∂A) is again a subgroup of C2 . – Proper atoms. For a proper atom A, the extended proper atom A+ is a series-parallel graph. Therefore, by Lemma 3.4, A is a path, so Fix(∂A) ∼ = C1 . – Dipoles. Dipoles may be arbitrary. Lemma 6.5. Fix(connected SERIES-PARALLEL) = Fix(2-connected PLANAR). Proof. We use the same approach as in the proof of Theorem 5.1. Since the groups Fix(∂A) of encountered atoms A are restricted, by Lemmas 5.3, 5.4, and 5.5, the groups Fix(∂A∗ ) can be constructed using (a)–(d) of Lemma 6.1. We note that each non-star block atom A with Fix(∂A) ∼ = C2 has at most one edge-orbit of size 1, which is either of type 1, or of type 1↔ . t u By adapting the proof of Theorem 5.10, we get the following: 25 Ψ2 Ψ3 Ψ3 Ψ Ψ1 (i) (ii) Ψ2 Ψ3 Ψ2 Ψ1 Ψ1 Ψ2 Ψ1 Ψ3 (iii) Fig. 19. Construction of the automorphism groups from Theorem 6.6. We get three possible combinations of edge-orbits in (iii), leading to different semidirect products with Dn . Theorem 6.6. The class Aut(connected SERIES-PARALLEL) consists of the following groups: (i) If Ψ ∈ Fix(connected SERIES-PARALLEL), then Ψ o Cn ∈ Aut(connected SERIES-PARALLEL). (ii) If Ψ1 , Ψ2 , Ψ3 ∈ Fix(connected SERIES-PARALLEL), then (Ψ12n × Ψ2n × Ψ3n ) o Dn ∈ Aut(connected SERIES-PARALLEL), ∀n odd. (iii) If Ψ1 , Ψ2 , Ψ3 ∈ Fix(connected SERIES-PARALLEL), then (Ψ12n × Ψ2n × Ψ3n ) o Dn ∈ Aut(connected SERIES-PARALLEL), ∀n even. We note that the semidirect products in (ii) and (iii) are different, see the proof for details. Proof. Fig. 19 depicts the constructions. For the other direction, we deal with the case that the primitive graph Gr is a cycle Ck with attached single pendant edges, otherwise it is trivial. As in the proof of Theorem 6.4, we get three cases leading to different automorphism groups from the statement: (i) Aut(Gr ) ∼ = Cn , for n 6= 2, (ii) Aut(Gr ) ∼ = Dn , for n odd, (iii) Aut(Gr ) ∼ = Dn , for n even. The case (i) is exactly the same as in Theorem 6.4. In the cases (ii) and (iii), we have edge-orbits of types 2n, n, and n↔ . The group Aut(Gr ) acts on the edge-orbits of type 2n regularly, exactly as in the proofs of Lemmas 5.7 and 5.8. We argue that the edge-orbits of types n and n↔ are more restricted. In the case (ii), we have exactly one conjugacy class of reflections fi , recall the notation from the proof of Lemma 5.6. Each of the reflections either stabilizes two edges of the cycle or two vertices if n is even; or a vertex and an edge if n is odd. In the first case, we get two equivariant edge-orbits of type n↔ . In the second case, we get at most two equivariant edge-orbits of type n consisting of pendant-edges attached to stabilized vertices. In the last case, we get an edge-orbit of type n↔ and at most one edge-orbit of type n consisting of pendant-edges. The group Aut(G) can be constructed by the operation (ii) in the same way as in the case (d) in the proof of Lemma 5.7. In the case (iii), we have two conjugacy classes of reflections. Each reflection stabilizes either two edges of the cycle, or two vertices, belonging to the same orbit; and this is same for each conjugacy class. Therefore, each conjugacy class defines either an edge-orbit of type n of attached single pendant edges, or an edge-orbit of type n↔ , non-equivariant to the edge-orbit defined by the other class. In total, we get three possibilities: two non-equivariant orbits of type n, one edge-orbit of type n and one edge-orbit of type n↔ , or two nonequivariant edge-orbits of type n↔ . These three possibilities lead to different semidirect products in (iii) which are created by restrictions of the operations (e) from the proof of Lemma 5.8. t u 7 Comparison with Babai’s Characterization In this section, we compare our characterization of automorphism groups of planar graphs with Babai’s characterization [1]. Statement of Babai’s Characterization. We include the full statement of Babai’s characterization of Aut(PLANAR), copied from [1] with an adapted notation. Theorem 7.1 (Babai [1], 8.12 The Main Corollary). Let Ψ be a finite group. All graphs below are assumed to be finite. (A) Ψ is representable by a planar graph if and only if Ψ∼ = Ψ1 o Sn1 × · · · × Ψt o Snt for some t, n1 , . . . , nt where the groups Ψi are representable by connected planar graphs. 26 (6) (A’) Ψ is representable by a planar graph with a fixed point if and only if Ψ is representable by a planar graph. (A”) Ψ is representable by a planar fixed-point free graph if and only if a (6) decomposition exists with all groups Ψi possessing planar connected fixed-point-free graph representation. (B) For |Ψ | ≥ 3, Ψ is representable by a connected planar graph if and only if Ψ∼ = (Ψ1 o Sk ) o (Ψ2 |K ) (7) for some positive integer k, where Ψ1 should be representable by a connected graph having a fixed point; and either Ψ2 is representable by a 2-connected planar graph G2 , or k ≥ 2 and |Ψ2 | = 1. In the former case, Ψ2 |K denotes the not necessarily effective permutation group, acting on some orbit K of Aut(G2 ). (B’) Ψ is representable by a connected planar graph having a fixed point if and only if a (7) decomposition exists as described under (B) with either |Ψ2 | = 1 or G2 a 2-connected planar graph with a fixed point. (B”) Ψ is representable by a connected fixed-point-free planar graph if and only if a (7) decomposition exists with |Ψ2 | = 6 1, G2 fixed-point free (hence |K| ≥ 2). (C) Ψ is representable by a 2-connected planar graph if and only if Ψ∼ = (Ψ1 o Sk ) o (Ψ2 |K ) (8) where |Ψ1 | ≤ 2; Ψ2 is representable by some 2-connected planar graph G2 . If |Ψ1 | = k = 1, G2 should be 3-connected. Ψ2 |K denotes the action of Ψ2 ∼ = Aut(G2 ), as a not necessarily effective permutation group, on K, an orbit of either an ordered pair (a, b) or of an unordered pair {a, b} of adjacent vertices a, b ∈ V (G2 ). (C’) Ψ is representable by a 2-connected planar graph with a fixed point or with an invariant edge if and only if a (8) decomposition exists such that G2 has a fixed point or an invariant edge. (C”) Ψ is representable by a 2-connected planar fixed-point-free graph if and only if a (8) decomposition exists with G2 fixed-point-free. (D) Ψ is representable by a 3-connected planar graph if and only if Ψ is isomorphic to one of the finite symmetry groups of the 3-space: Cn , Dn , Cn × C2 , A4 , S4 , Dn × C2 , A5 , A4 × C2 , S4 × C2 , A5 × C2 . (9) (D’) Ψ is representable by a 3-connected planar graph with a fixed point if and only if Ψ is a cyclic or a dihedral group. (D”) Ψ is representable by a 3-connected planar fixed-point-free graph if and only if |Ψ | ≥ 2 and Ψ is one of the groups listed under (9). The characterization is very long and hard to understand, but it works in a nutshell as follows. The automorphism group of a k-connected planar graph (k ≤ 2) is constructed by combining automorphism groups of smaller k-connected planar graphs with stabilizers of k-connected planar graphs and automorphism groups of (k + 1)-connected graphs. The part (A) corresponds to Jordan’s Theorem 2.1. The automorphism groups listed in the part (D) are the spherical groups described in Section 4 and are based on the classical results from geometry. Therefore, the novel parts are (B) and (C). Unfortunately, it is not clear which groups are Ψ2 |K , used in (7) and (8). In principle, it would be possible to derive Theorem 7.1 from the described Jordan-like characterization of Theorems 5.1 and 5.10, and the reader can work out further details. The opposite is not possible because Jordan-like characterization contains more information about automorphism groups of planar graphs; for instance the one given in Table 1. We note that Jordan-like characterizations for all parts of Theorem 7.1 exist. For example, the characterization of Aut(2-connected PLANAR) in Section 6.1, corresponds to the part (C) of Theorem 7.1. Group Products Instead of Group Extensions. We explain why the simple version of our characterization given in Theorem 1.4 already describes the structure more accurately than Theorem 1.3. The following idea was invented by Jordan. If H is a normal subgroup of G, then we can understand G by studying two smaller groups: the subgroup H and the quotient group G/H. We repeat the same idea on both of these groups, till they cannot be further simplified, and such groups are called simple groups. We obtain a composition series G = H0 . H1 . · · · . Hm = {1}, such that each quotient group Hi−1 /Hi is simple. We can imagine these simple quotient groups as building blocks which construct G; they play the role of prime numbers for groups. A consequence of Babai’s characterization (Theorem 1.3) describes these building blocks for the automorphism groups of planar graphs. 27 G′ G Fig. 20. Planar graphs G and G0 with Aut(G) ∼ = Aut(G0 ) ∼ = C22 , having different actions. For G, we get independent reflections/rotations for each of the blocks. For G0 , the group Aut(G0 ) is generated by two reflections. The celebrated classification of finite simple groups describes all building blocks for finite groups. Therefore, it describes the structure of all finite groups. But this description gives just a part of information, since it is not clear how these building blocks are “put together” to form more complex groups. This is called the group extension problem. The problem to describe all extensions of a group H by G/H is in general a hard problem. In particular, Theorem 1.3 does not describe how the building blocks for automorphism groups of planar graphs are put together. In certain special cases, the structure of G can be described from H and G/H by semidirect products. This happens exactly when there exists a complement subgroup K ≤ G isomorphic to G/H such that K ∩ H = {1} and hK ∪ Hi = G. Then we can build G using the semidirect product: G∼ =H oK ∼ = H o G/H. A simple version of our characterization (Theorem 1.4) states that the automorphism groups of planar graphs can be build from standard building blocks using a series of semidirect product, so it describes the structure more accurately than Theorem 1.3. In Theorems 5.1 and 5.10, we describe these semidirect products in more detail. As far as we understand Babai’s approach, he uses generalized wreath products instead of semidirect products. More important difference between ours and Babai’s approach consists in the fact that we deal with the 1- and 2-connected case together. This allows us to apply recursion in a more compact way, thus deriving the Jordan-like characterization of stabilizers of 1-cuts and 2-cuts, established in Theorem 5.1. A group of symmetries of a graph is not fully described just by characterizing it as an abstract group. Figure 20 shows two simple graphs with isomorphic abstract automorphism groups, realized by different group actions on the graphs. From Babai’s characterization, the structure of this action is not very clear. On the other hand, Theorems 5.1 and 5.10 reveal the actions of automorphism groups on planar graphs, by describing them with respect to each 1-cut and 2-cut (Theorem 5.1), and with respect to the primitive graph (Theorem 5.10). 8 Quadratic-time Algorithm In this section, we describe a quadratic-time algorithm which computes the automorphism groups of planar graphs. Lemma 8.1. Let G be an essentially 3-connected planar graph with colored edges. There exists a quadratictime algorithm which computes a generating set of Aut(G) or of the stabilizer of a vertex. Proof. Consider the unique embedding of G into the sphere. Let n be the number of vertices of G. We work with colored pendant edges as with colored vertices. Let (v, e, e0 ) be an arbitrary angle. For every other angle (v̂, ê, ê0 ) there exists at most one automorphism π ∈ Aut(M ) which maps (v, e, e0 ) to (v̂, ê, ê0 ). We introduce three involutions ρ, λ, τ on the set of oriented angles by setting: – ρ(v, e, e0 ) = (v, e0 , e), – λ(v, e, e0 ) = (v 0 , e00 , e0 ), where v 0 is the other vertex incident to e0 and the angles (v, e, e0 ) and (v 0 , e00 , e0 ) lie on the same side of e0 , and – τ (v, e, e0 ) = (v, e, e00 ), where (v, e, e00 ) is the other angle incident to v and e. The procedure checking whether the mapping π : (v, e, e0 ) 7→ (v̂, ê, ê0 ) extends to an automorphism is based on the observation that an automorphism of G commutes with ρ, λ, and τ . It follows that in time O(n), we can check whether the mapping π : (v, e, e0 ) 7→ (v̂, ê, ê0 ) extends to an automorphism or not. In the positive case, we get the automorphism π as a byproduct. Moreover, we can easily verify whether the automorphism preserves colors. Therefore, Aut(G) is computed in time O(n2 ) and the algorithm can easily identify which of the abstract spherical groups is isomorphic to Aut(G). Note that the number of edges of G is O(n). For the stabilizer, we just compute the automorphisms which map (v, e, e0 ) to (v, ê, ê0 ). t u Notice that by the above algorithm, we can compute Fix(∂A) of a non-star block atom A. 28 Lemma 8.2. There is a linear-time algorithm which computes a generating set of Fix(∂A) and Aut∂A (A) of a proper atom, dipole, or a star block atom A with colored edges. Proof. If A is a dipole or a star block atom, we get Fix(∂A) as the direct product of symmetric groups, one for each type and color class of edges. Further, if A is a dipole, it is symmetric if and only if it has the same number of directed edges of each color class in both directions, and then Aut(A) ∼ = Fix(∂A) o C2 ; otherwise Aut∂A (A) = Fix(∂A). Let A be a proper atom with ∂A = {u, v}. Since A+ is essentially 3-connected, the reasoning from Lemma 8.1 applies. We know that both Aut∂A (A) and Fix(∂A) are generated by automorphisms which maps the two angles containing u and uv and the two angles containing v and uv between each other. We can easily test in time O(n) which of these mappings are automorphisms. t u Proof (Proof of Theorem 1.5). Hopcroft and Tarjan [20] give a linear-time algorithm which computes the decomposition to 3-connected components, and it can be easily modified to our definition to output the reduction tree T of G. In the beginning, all nodes of T are unmarked. We process the tree from the leaves to the root, dealing with the nodes which have all children marked, and marking these nodes after. We compute colors and symmetry types of the considered atoms, the groups Fix(∂A) and for symmetric atoms also involutions τ exchanging the vertices in the boundaries. Let the colors be integers. Suppose that in some step, we process several atoms whose edges are colored and have computed symmetry types. Dipoles and star block atoms. To each dipole/star block atom with n edges, we assign the vector v = (t, c1 , . . . , cm ) where t is the type of the atom and c1 , . . . , cm is the sorted list of colors. By lexicographic sorting of these vectors for all dipoles/star block atoms, we can compute isomorphism classes and assign new colors to them. This runs in linear time. Non-star block atoms. Let A be a non-star block atom with ∂A = {u}. We work with single pendant edges as with colors of vertices. Let n be the number of its vertices and m the number of its edges. Consider a map of A. For each choice of an angle (u, e, e0 ), we compute labellings 1, . . . , n of the vertices and 1, . . . , m of the edges as they appear in BFS of the map. Starting with u, we visit all its neighbors, from the one incident with e following the rotational scheme. From each neighbor, we visit their unvisited neighbors, and so on.  For a labeling, we compute the vector v = c1 , . . . , cn , (x1 , y1 , c01 ), . . . , (xm , ym , c0m ) where ci is the color of the i-th vertex, and xj < yj are the endpoints and c0j the color of the j-th edge. We compute at most 2n of these vectors for all possible choices of (u, e, e0 ) and we choose the one which is lexicographically smallest. Notice that two atoms are isomorphic if and only if their associated vectors are identical. So, by sorting the chosen vectors for all non-star block atoms lexicographically, we compute isomorphism classes and assign new colors to them. This runs in quadratic time since we compute 2n vectors for each atom. Proper atoms. We approach A+ similarly as a non-star block atom, but we just need to consider the labellings starting from an angle containing uv and either u, or v. We have four choices for each vector, so it runs in linear time. For each considered atom A, we apply one of the algorithms described in Lemmas 8.1 and 8.2, and we compute Fix(∂A). If A is a dipole or a proper atom, we also compute its type, and if A is symmetric, we construct an involution τ ∈ Aut∂A (A) exchanging the vertices of ∂A. Following the proof of Theorem 5.1, we can compute in quadratic time also Fix(∂A∗ ) and τ ∗ for every node which is a child of the root node. By Theorem 5.10, we can compute Aut(G) as the semidirect product of these groups Fix(∂A∗ ) with Aut(H) computed by Lemma 8.1. We can output the automorphism groups in terms of permutation generators, or by assigning the computed groups Fix(∂A), τ and Aut(H) to the corresponding nodes of T . t u 9 Conclusions D5 Let G be a connected planar graph. We propose the following way of imagining the action of Aut(G) geometrically, which can be used in a dynamic visualization in 3-space. Suppose that the reduction tree T of G is computed together with the corresponding parts of Aut(G), assigned to the nodes. For each 2-connected block, we have some 3-connected colored primitive graph which can be visualized by a symmetric polytope, and these polytopes are connected by articulations as in the block tree; see Fig. 21. Onto each polytope, we attach a hierarchical structure of colored atoms given by the decomposition. For a dipole A with ∂A = {u, v}, we know that independent color classes can be 29 S4 τ π Fig. 21. The bold edges are symmetric proper atoms A with Fix(∂A) ∼ = C2 , generated by π. We visualize the automorphism group (D45 × C62 ) o S4 . arbitrarily permuted, so we assign symmetric groups to them. For a proper atom A with ∂A = {u, v}, the non-trivial element of Fix(∂A) (if it exists) is the reflection through u and v, and we represent it. These symmetries generate the subgroup of Aut(G) which fixes all polytopes. Further, for an edge uv representing a symmetric atom A, we also add an involution τ ∈ Aut∂A (A) exchanging u and v, which is geometrically a reflection through uv in A+ , if τ is used in Aut(G). The central block is preserved by Aut(G), so it is transformed by a spherical group Aut(H), permuting also the attached polytopes. Multiple polytopes attached at an articulation correspond to a star block atom. So isomorphic subtrees of blocks can be arbitrarily permuted and we assign symmetric groups to them. Consider a polytope attached by the articulation u to its parent in the block tree. Since Fix(∂A) of a non-star block atom is either a dihedral or a cyclic group, the polytope can be only rotated/reflected around u. Problem 9.1. For a planar graph G, is it possible to compute a generating set of Aut(G) in a linear time? Our algorithm has two bottlenecks which need to be improved to get a linear-time algorithm: (i) the algorithm of Lemma 8.1, (ii) the procedure of finding lexicographically smallest vectors of non-star block atoms. Both of these can likely be solved by modifying the algorithm of [21]. References 1. L. Babai. Automorphism groups of planar graphs II. In Infinite and finite sets (Proc. Conf. Keszthely, Hungary, 1973) Bolyai-North-Holland, pages 29–84, 1975. 2. L. Babai. Automorphism groups, isomorphism, reconstruction. In Handbook of combinatorics (vol. 2), pages 1447–1540. MIT Press, 1996. 3. N. Carter. Visual group theory. MAA, 2009. 4. C. J. Colbourn and K. S. Booth. Linear time automorphism algorithms for trees, interval graphs, and planar graphs. SIAM J. Comput., 10(1):203–225, 1981. 5. J. H. Conway, H. Burgiel, and C. Goodman-Strauss. The symmetries of things. CRC Press, 2016. 6. W.H. Cuningham and J. Edmonds. A combinatorial decomposition theory. Canad. J. Math., 32:734–765, 1980. 7. G. Di Battista and R. Tamassia. Incremental planarity testing. In Foundations of Computer Science, 1989., 30th Annual Symposium on, pages 436–441. IEEE, 1989. 8. G. Di Battista and R. Tamassia. On-line graph algorithms with spqr-trees. In International Colloquium on Automata, Languages, and Programming, pages 598–611. Springer, 1990. 9. G. Di Battista and R. Tamassia. On-line planarity testing. SIAM Journal on Computing, 25(5):956–997, 1996. 10. P. Eades and X. Lin. Spring algorithms and symmetry. Theor. Comput. Sci., 240(2):379–405, 2000. 11. J. Fiala, P. Klavı́k, J. Kratochvı́l, and R. Nedela. Algorithmic aspects of regular graph covers with applications to planar graphs. In Automata, Languages, and Programming, 41st International Colloquium, ICALP 2014, volume 8572 of Lecture Notes in Computer Science, pages 489–501, 2014. 12. J. Fiala, P. Klavı́k, J. Kratochvı́l, and R. Nedela. 3-connected reduction for regular graph covers. CoRR, abs/1503.06556, 2016. 13. J. Fiala, P. Klavı́k, J. Kratochvı́l, and R. Nedela. Algorithmic aspects of regular graph covers. CoRR, abs/1609.03013, 2016. 14. M. Fontet. Linear algorithms for testing isomorphism of planar graphs. In Proceedings Third Colloquium on Automata, Languages, and Programming, pages 411–423, 1976. 15. R. Frucht. Herstellung von graphen mit vorgegebener abstrakter gruppe. Compositio Mathematica, 6:239–250, 1939. 16. C. Gutwenger and P. Mutzel. A linear time implementation of spqr-trees. In International Symposium on Graph Drawing, pages 77–90. Springer, 2000. 17. S. Hong and P. Eades. Drawing planar graphs symmetrically, II: Biconnected planar graphs. Algorithmica, 42(2):159–197, 2005. 18. S. Hong and P. Eades. Drawing planar graphs symmetrically, III: Oneconnected planar graphs. Algorithmica, 44(1):67–100, 2006. 19. S. Hong, B. McKay, and P. Eades. Symmetric drawings of triconnected planar graphs. In Proceedings of the thirteenth annual ACM-SIAM symposium on Discrete algorithms, pages 356–365, 2002. 20. J. E. Hopcroft and R. E. Tarjan. Dividing a graph into triconnected components. SIAM Journal on Computing, 2(3):135–158, 1973. 21. J. E. Hopcroft and J. Wong. Linear time algorithm for isomorphism of planar graphs (preliminary report). In Proceedings of the sixth annual ACM symposium on Theory of computing, pages 172–184. ACM, 1974. 22. J.E. Hopcroft and R.E. Tarjan. A V 2 algorithm for determining isomorphism of planar graphs. Information Processing Letters, 1(1):32–34, 1971. 23. J.E. Hopcroft and R.E. Tarjan. A V log V algorithm for isomorphism of triconnected planar graphs. Journal of Computer and System Sciences, 7(3):323–331, 1973. 24. C. Jordan. Sur les assemblages de lignes. Journal für die reine und angewandte Mathematik, 70:185–190, 1869. 25. K. Kawarabayashi. Graph isomorphism for bounded genus graphs in linear time. CoRR, abs/1511.02460, 2015. 30 26. K. Kawarabayashi and B. Mohar. Graph and map isomorphism and all polyhedral embeddings in linear time. In Proceedings of the Fortieth Annual ACM Symposium on Theory of Computing, STOC ’08, pages 471–480, 2008. 27. P. Klavı́k, D. Knop, and P. Zeman. Graph isomorphism restricted by lists. CoRR, abs/1607.03918, 2016. 28. P. Klavı́k, R. Nedela, and P. Zeman. On orbits of isometry groups of polyhedra. 2017. 29. P. Klavı́k and P. Zeman. Automorphism groups of geometrically represented graphs. In STACS 2015, volume 30 of LIPIcs, pages 540–553, 2015. 30. P. Klavı́k and P. Zeman. Automorphism groups of geometrically represented graphs. CoRR, 1407.2136, 2015. 31. D. Lichtenstein. Isomorphism for graphs embeddable on the projective plane. In ACM Symposium on Theory of Computing, STOC ’80, pages 218–224, 1980. 32. P. Mani. Automorphismen von polyedrischen graphen. Mathematische Annalen, 192(4):279–303, 1971. 33. R. Mathon. A note on the graph isomorphism counting problem. Information Processing Letters, 8(3):131–136, 1979. 34. G. Miller. Isomorphism testing for graphs of bounded genus. In ACM Symposium on Theory of Computing, STOC ’80, pages 225–235, 1980. 35. T. Needham. Visual complex analysis. Oxford University Press, 1998. 36. J.J. Rotman. An Introduction to the Theory of Groups. Graduate Texts in Mathematics. Springer, 1994. 37. J. Stillwell. Geometry of surfaces. Springer, 1992. 38. B.A. Trakhtenbrot. Towards a theory of non-repeating contact schemes. Trudi Mat. Inst. Akad. Nauk SSSR, 51:226–269, 1958. 39. T.R.S. Walsh. Counting unlabeled three-connected and homeomorphically irreducible two-connected graphs. J. Combin. Theory B, 32:12–32, 1982. 40. H. Whitney. Nonseparable and planar graphs. Trans. Amer. Math. Soc., 34:339–362, 1932. 31
4math.GR
Rollercoasters and Caterpillars Therese Biedl∗ Ahmad Biniaz∗ Florin Manea† Robert Cummings∗ Dirk Nowotka† Anna Lubiw∗ Jeffrey Shallit∗ arXiv:1801.08565v1 [cs.CG] 25 Jan 2018 January 29, 2018 Abstract A rollercoaster is a sequence of real numbers for which every maximal contiguous subsequence, that is increasing or decreasing, has length at least three. By translating this sequence to a set of points in the plane, a rollercoaster can be defined as a polygonal path for which every maximal sub-path, with positive- or negative-slope edges, has at least three points. Given a sequence of distinct real numbers, the rollercoaster problem asks for a maximum-length (not necessarily contiguous) subsequence that is a rollercoaster. It was conjectured that every sequence of n distinct real numbers contains a rollercoaster of length at least dn/2e for n > 7, while the best known lower bound is Ω(n/ log n). In this paper we prove this conjecture. Our proof is constructive and implies a linear-time algorithm for computing a rollercoaster of this length. Extending the O(n log n)-time algorithm for computing a longest increasing subsequence, we show how to compute a maximum-length rollercoaster within the same time bound. A maximumlength rollercoaster in a permutation of {1, . . . , n} can be computed in O(n log log n) time. The search for rollercoasters was motivated by orthogeodesic point-set embedding of caterpillars. A caterpillar is a tree such that deleting the leaves gives a path, called the spine. A top-view caterpillar is one of degree 4 such that the two leaves adjacent to each vertex lie on opposite sides of the spine. As an application of our result on rollercoasters, we are able to find a planar drawing of every n-node top-view caterpillar on every set of 25 3 n points in the plane, such that each edge is an orthogonal path with one bend. This improves the previous best known upper bound on the number of required points, which is O(n log n). We also show that such a drawing can be obtained in linear time, provided that the points are given in sorted order. 1 Introduction A run in a sequence of real numbers is a maximal contiguous subsequence that is increasing or decreasing. A rollercoaster is a sequence of real numbers such that every run has length at least three. For example the sequence (8, 5, 1, 3, 4, 7, 6, 2) is a rollercoaster with runs (8, 5, 1), (1, 3, 4, 7), (7, 6, 2), which have lengths 3, 4, 3, respectively. The sequence (8, 5, 1, 7, 6, 2, 3, 4) is not a rollercoaster because its run (1, 7) has length 2. Given a sequence S = (s1 , s2 , . . . , sn ) of n distinct real numbers, the rollercoaster problem is to find a maximum-size set of indices i1 < i2 < · · · < ik such that (si1 , si2 , . . . , sik ) is a rollercoaster. In other words, this problem asks for a longest rollercoaster in S, i.e., a longest subsequence of S that is a rollercoaster. ∗ † Cheriton School of Computer Science, University of Waterloo, Department of Computer Science, Kiel University. 1 One can interpret S as a set P of points in the plane by translating each number si ∈ S to a point pi = (i, si ). With this translation, a rollercoaster in S translates to a “rollercoaster” in P , which is a polygonal path whose vertices are points of P and such that every maximal sub-path, with positive- or negative-slope edges, has at least three points. See Figure 1(a). Conversely, for any point set in the plane, the y-coordinates of the points, ordered by their x-coordinates, forms a sequence of numbers. Therefore, any rollercoaster in P translates to a rollercoaster of the same length in S. 8 7 6 5 4 3 2 1 1 2 3 4 5 6 7 8 (a) (b) Figure 1: (a) Translating the sequence (8, 5, 1, 3, 4, 7, 6, 2) to a set of points. (b) A planar L-shaped drawing of a top-view caterpillar. The best known lower bound on the length of a longest rollercoaster is Ω(n/ log n) due to Biedl et al. [2]. They conjectured that Conjecture 1. Every sequence of n > 7 distinct real numbers contains a rollercoaster of length at least dn/2e. Conjecture 1 can be viewed as a statement about patterns in permutations, a topic with a long history, and the subject of much current research. For example, the Eulerian polynomials, introduced by Euler in 1749, are the generating function for the number of descents in permutations. For surveys of recent work, see, for example, Linton et al. [11] and Kitaev [10]. Specifically, Conjecture 1 is related to the following seminal result of Erdős and Szekeres [5] in the sense that √ they prove the existence of an increasing or a decreasing subsequence of length at least n + 1 for n = ab + 1, which is essentially a rollercoaster with one run. Theorem 1 (Erdős and Szekeres, 1935). Every sequence of ab + 1 distinct real numbers contains an increasing subsequence of length at least a + 1 or a decreasing subsequence of length at least b + 1. Hammersley [9] gave an elegant proof of the Erdős-Szekeres theorem that is short, simple, and based on the pigeonhole principle. The Erdős-Szekeres theorem also follows from the well-known decomposition of Dilworth (see [15]). The following is a restatement of Dilworth’s decomposition for sequences of numbers. Theorem 2 (Dilworth, 1950). Any finite sequence S of distinct real numbers can be partitioned into k ascending sequences where k is the maximum length of a descending sequence in S. 2 Besides its inherent interest, the study of rollercoasters is motivated by point-set embedding of caterpillars [2]. A caterpillar is a tree such that deleting the leaves gives a path, called the spine. An ordered caterpillar is a caterpillar in which the cyclic order of edges incident to each vertex is specified. A top-view caterpillar is an ordered caterpillar where all vertices have degree 4 or 1 such that the two leaves adjacent to each vertex lie on opposite sides of the spine. Planar orthogonal drawings of trees on a fixed set of points in the plane have been explored recently, see e.g., [2, 8, 13]; in these drawings every edge is drawn as an orthogonal path between two points, and the edges are non-intersecting. A planar L-shaped drawing is a simple type of planar orthogonal drawing in which every edge is an orthogonal path of exactly two segments. Such a path is called an L-shaped edge. For example see the top-view caterpillar in Figure 1(b) together with a planar L-shaped drawing on a given point set. Biedl et al. [2] proved that every top-view caterpillar on n vertices has a planar L-shaped drawing on every set of O(n log n) points in the plane that is in general orthogonal position, meaning that no two points have the same x- or y-coordinate. 1.1 Our Contributions In Section 2 we study rollercoasters and prove Conjecture 1. In fact we prove something stronger: every sequence of n distinct numbers contains two rollercoasters of total length n. Our proof is constructive and yields a linear-time algorithm for computing such rollercoasters. We also extend our result to rollercoasters whose runs are of length at least k, for k > 3. Then we present an O(n log n)-time algorithm for computing a longest rollercoaster, extending the classical algorithm for computing a longest increasing subsequence. This algorithm can be implemented in O(n log log n) time if each number in the input sequence is an integer that fits in a constant number of memory words. Then we give an estimate on the number of permutations of {1, . . . , n} that are rollercoasters. In Section 3 we prove, by using Conjecture 1, that every n-node top-view caterpillar has a planar L-shaped drawing on every set of 25 3 n points in the plane in general orthogonal position. 2 Rollercoasters In this section we investigate lower bounds for the length of a longest rollercoaster in a sequence of numbers. We also study algorithmic aspects of computing such rollercoasters. First we prove Conjecture 1: any sequence of n distinct real numbers contains a rollercoaster of length at least dn/2e. Observe that the length 4 sequence (3, 4, 1, 2) has no rollercoaster, so we will restrict to n > 5 in the remainder of this section. Also, due to the following proposition we assume that n > 8. Proposition 1. Every sequence of n ∈ {5, 6, 7} distinct real numbers contains a rollercoaster of length at least 3. This bound is tight in the worst case. Proof. By applying Theorem 1 with a = b = 2 we get that every sequence of at least ab+1 = 5 distinct numbers contains an increasing or a decreasing subsequence of length at least a+1 = 3. This subsequence is a rollercoaster of length at least 3. For the tightness of this bound, consider the sequence (5, 2, 6, 3, 7, 1, 4), depicted in the adjacent figure. It has length 7 and its longest rollercoaster has length 3. 3 7 6 5 4 3 2 1 1 2 3 4 5 6 7 We refer to a polygonal path as a chain. We define an ascent (resp., a descent) as an increasing (resp., a decreasing) sequence. We define a k-ascent (resp., a k-descent) as an ascent (resp., a descent) with at least k elements. We also use k-ascent and k-descent to refer to increasing and decreasing chains with at least k points, respectively. With this definition, a rollercoaster is a sequence in which every run is either a 3-ascent or a 3-descent. We refer to the rightmost run of a rollercoaster as its last run. 2.1 A Proof of Conjecture 1 In this section we prove the following theorem, which is a restatement of Conjecture 1. Our proof is constructive, and yields a linear-time algorithm for finding such a rollercoaster. Theorem 3. Every sequence of n > 8 distinct real numbers contains a rollercoaster of length at least dn/2e; such a rollercoaster can be computed in linear time. The lower bound of dn/2e is tight in the worst case. Consider a sequence with n > 8 distinct real numbers, and let P be its point-set translation with points p1 , . . . , pn that are ordered from left to right. We define a pseudo-rollercoaster as a sequence in which every run is a 3-ascent or a 3-descent, except possibly the first run. We present an algorithm that computes two pseudo-rollercoasters R1 and R2 in P such that |R1 | + |R2 | > n; the length of the longer one is at least dn/2e. Then with a more involved proof we show how to extend this longer pseudo-rollercoaster to obtain a rollercoaster of length at least dn/2e; this will prove the lower bound. 2.1.1 An Algorithm First we provide a high-level description of our algorithm as depicted in Figure 2. Our algorithm is iterative, and proceeds by sweeping the plane by a vertical line ` from left to right. We maintain the following invariant: Invariant. At the beginning of every iteration we have two pseudo-rollercoasters whose union is the set of all points to the left of ` and such that the last run of one of them is an ascent and the last run of the other one is a descent. Furthermore, these two last runs have a point in common. a RD ` RA d Figure 2: One iteration of algorithm: Constructing two pseudo-rollercoasters. During every iteration we move ` forward and try to extend the current pseudo-rollercoasters. If this is not immediately possible with the next point, then we move ` farther and stop as soon as 4 we are able to split all the new points into two chains that can be appended to the current pseudorollercoasters to obtain two new pseudo-rollercoasters that satisfy the invariant. See Figure 2. Now we present our iterative algorithm in detail. The First Iteration: We take the leftmost point p1 , and initialize each of the two pseudorollercoasters by p1 alone. We may consider one of the pseudo-rollercoasters to end in an ascent and the other pseudo-rollercoaster to end in a descent. The two runs have a point in common. An Intermediate Iteration: By the above invariant we have two pseudo-rollercoasters RA and RD whose union is the set of all points to the left of ` and such that the last run of one of them, say RA , is an ascent and the last run of RD is a descent. Furthermore, the last run of RA and the last run of RD have a point in common. During the current iteration we make sure that every swept point will be added to RA or RD or both. We also make sure that at the end of this iteration the invariant will hold for the next iteration. Let a and d denote the rightmost points of RA and RD , respectively; see Figure 2. Let pi be the first point to the right of `. If pi is above a, we add pi to RA to complete this iteration. Similarly, if pi is below d, we add pi to RD to complete this iteration. In either case we get two pseudo-rollercoasters that satisfy the invariant for the next iteration. Thus we may assume that pi lies below a and above d. In particular, this means that a lies above d. Consider the next point pi+1 . (If there is no such point, go to the last iteration.) Suppose without loss of generality that pi+1 lies above pi as depicted in Figure 3. Then d, pi , pi+1 forms a 3-ascent. Continue considering points pi+2 , . . . , pk until for the first time, there is a 3-descent in a, pi , . . . , pk . In other words, k is the smallest index for which a, pi , . . . , pk contains a descending chain of length 3. (If we run out of points before finding a 3-descent, then go to the last iteration.) pred(pk0 , A1 ) pk00 A001 A01 pi+2 a RD pk 0 pk pi+1 A2 pi RA d Figure 3: Illustration of an intermediate iteration of the algorithm. Without pk there is no descending chain of length 3. Thus the longest descending chain has two points, and by Theorem 2, the sequence P 0 = a, pi , pi+1 , . . . , pk−1 is the union of two ascending chains. We give an algorithm to find two such chains A1 and A2 with A1 starting at a and A2 starting at pi . The algorithm also finds the 3-descent ending with pk . For every point q ∈ A2 we define its A1 -predecessor to be the rightmost point of A1 that is to the left of q. We denote the A1 -predecessor of q by pred(q, A1 ). The algorithm is as follows: While moving ` forward, we denote by r1 and r2 the rightmost points of A1 and A2 , respectively; at the beginning r1 = a, r2 = pi , and pred(pi , A1 ) = a. Let p be the next point to be considered. If p is above r1 then we add p to A1 . If p is below r1 and above 5 r2 , then we add p to A2 and set pred(p, A1 ) = r1 . If p is below r2 , then we find our desired first 3-descent formed by (in backwards order) pk = p, pk0 = r2 , and pk00 = pred(r2 , A1 ). See Figure 3. This algorithm runs in time O(k − i), which is proportional to the number of swept points. We add point d to the start of chain A2 . The resulting chains A1 and A2 are shaded in Figure 3. Observe that A2 ends at pk0 . Also, all points of P 0 that are to the right of pk0 (if there are any) belong to A1 , and lie to the right of pk00 , and form an ascending chain. Let A001 be this ascending chain. Let A01 be the sub-chain of A1 up to pk00 ; see Figure 3. Now we form one pseudo-rollercoaster (shown in red) consisting of RA followed by A01 and then by the descending chain pk00 , pk0 , pk . We form another pseudo-rollercoaster (shown in blue) consisting of RD followed by A2 and then by A001 . We need to verify that the ascending chain added after d has length at least 3. This chain contains d, pi and pk0 . This gives a chain of length at least 3 unless k 0 = i, but in this case pk00 = a, so pi+1 is part of A001 and consequently part of this ascending chain. Thus we have constructed two longer pseudo-rollercoasters whose union is the set of all points up to point pk , one ending with a 3-ascent and one with a 3-descent and such that the last two runs share the point pk0 . Figure 4(a) shows an intermediate iteration. The Last Iteration: If there are no points left, then we terminate the algorithm. Otherwise, let pi be the first point to the right of `. Let a and d be the endpoints of the two pseudo-rollercoasters obtained so far, such that a is the endpoint of an ascent and d is the endpoint of a descent. Notice that pi is below a and above d, because otherwise this iteration would be an intermediate one. For the same reason, the remaining points pi , . . . , pn do not contain a 3-ascent together with a 3-descent. If pi is the last point, i.e., i = n, then we discard this point and terminate this iteration. Assume that i 6= n, and suppose without loss of generality that the next point pi+1 lies above pi . In this setting, by Theorem 2 and as described in an intermediate iteration, with the remaining points, we can get two ascending chains A1 and A2 such that A2 contains at least two points. By connecting A1 to a and A2 to d we get two pseudo-rollercoasters whose union is all the points (in this iteration we do not need to maintain the invariant). a = pk00 pi+1 = pk0 R1 p1 p1 pk d pn R2 pi (a) (b) Figure 4: (a) An intermediate iteration. (b) A point set for which any rollercoaster of length at least n/4 + 3 does not contain p1 and pn . The green (dashed) rollercoaster, which contains p1 , has length n/4 + 2. The red (solid) and blue (dash-dotted) chains are the two rollercoasters returned by our algorithm, where blue is a longest possible one. Final Refinement: At the end of algorithm, we obtain two pseudo-rollercoasters R1 and R2 that share p1 and such that their union contains all points of P , except possibly pn . Thus, |R1 |+|R2 | > n, 6   and the length of the longer one is at least n2 . Recall that every run of pseudo-rollercoasters R1 and R2 is a 3-ascent or a 3-descent, except possibly the first run. If the first run of R1 (resp., R2 ) contains only two points, then we remove p1 to obtain a rollercoaster R1 (resp., R2 ). Therefore, we obtain two rollercoasters whose union contains all points, except possibly p1 and pn . This is the end of our algorithm. In the next section we analyze the length of the resulting rollercoaster, the tightness of the claimed lower bound, and the running time of the algorithm. 2.1.2 Length and Running-Time Analysis Our algorithm computes two rollercoasters R1 and R2 consisting of all points of P , except possibly p1 and pn . Thus, thetotal length of these rollercoasters is at least n − 2, and the length of the longer one is at least n−2 . In Appendix A we improve this bound to n2 by revisiting the first 2 and last iterations of our algorithm with some case analysis. We note that there are point sets, with n points, for which every rollercoaster of length at least n/4 + 3 does not contain any of p1 and pn ; see e.g., the point set in Figure 4(b). This example shows also the tightness of the dn/2e lower bound on the length of a longest rollercoaster; the blue rollercoaster is a longest possible and contains dn/2e points. By removing the point pn−1 an example for odd n is obtained. To verify the running time, notice that the first iteration and final refinement take constant time, and the last iteration is essentially similar to an intermediate iteration. As described in an intermediate iteration the time complexity to find a 3-ascent and a 3-descent for the first time together with the time complexity to compute chains A01 , A001 , and A2 is O(k − i), which is linear in the number of swept points pi , . . . , pk . Based on this and the fact that every point is considered only in one iteration, our algorithm runs in O(n) time. 2.2 An Extension In this section we extend our result to k-rollercoasters. A k-rollercoaster is a sequence of real numbers in which every run is either a k-ascent or a k-descent. Theorem 4. Let k > 4 be an integer. Then every sequence of n > (k −1)2 +1 distinct real numbers n contains a k-rollercoaster of length at least 2(k−1) − 3k 2 . Proof. Our proof follows the same iterative approach of the proof of Theorem 3. Consider a sequence of n distinct real numbers and its point-set translation p1 , . . . , pn . We sweep the plane by a line `, and maintain two k-rollercoasters RA and RD to the left of ` such that the last run of RA is an ascent and the last run of RD is descent. In each iteration we move ` forward and stop as soon as we see a k-ascent A and a k-descent D. Then we attach D to RA , and A to RD . To achieve the claimed lower bound, we make sure that the total length of A and D is at least 1/(k − 1) times the number of swept points. Consider an intermediate iteration. Let m be the number of swept points in this iteration and let P 0 = (pi , pi+1 . . . , pi+m−2 , pi+m−1 ) be the sequence of these points. Our strategy for stopping ` ensures that P 0 contains a k-ascent and a k-descent, while P 00 = (pi , . . . , pi+m−2 ) may contain only one of them but not both. Without loss of generality assume that P 00 does not contain a k-descent. Let α be the integer for which (α − 1)(k − 1) < m − 1 6 α(k − 1). 7 (1) The left-hand side of Inequality (1) implies that P 00 has at least (α − 1)(k − 1) + 1 points. Having this and our assumption that P 00 does not contain a k-descent, Theorem 1 implies that P 00 contains an increasing subsequence of length at least α. We take the longest increasing and the longest decreasing subsequences in P 0 as A and D, respectively. Observe that |A| > max{k, α} and |D| = k. This and the right-hand side of Inequality (1) imply that |A| + |D| > α + k > m−1 m +k > , k−1 k−1 which means that the total length of A and D is at least 1/(k − 1) times the number of swept points. In the last iteration if we sweep at most (k − 1)2 points then we discard all of them. But if we sweep more than (k − 1)2 points then by an argument similar to the one above there exists an integer α, with α > m/(k − 1), for which we get either an α-ascent or an α-descent, which contains at least 1/(k − 1) fraction of the swept points. The first iteration is similar to the one in the proof of Theorem 3: we assume the existence of an ascent and a descent that end at the first point. At the end of algorithm if the first run of any of RA and RD contains k 0 points, for some k 0 < k, then by removing k 0 − 1(6 k − 2) points from its first run we get a valid k-rollercoaster. The total length of the resulting two k-rollercoasters is |RA | + |RD | > n − (k − 1)2 − 2(k − 2), k−1 where the length of the longer one is at least n − (k − 1)2 n 3(k − 1) − (k − 2) > − . 2(k − 1) 2(k − 1) 2 2.3 Algorithms for a Longest Rollercoaster In this section we study algorithmic aspects of computing a longest rollercoaster in a given sequence S of n distinct real numbers. By R1 Theorem 3 we can compute a rollercoaster of length at least dn/2e in O(n) time. However this rollercoaster may not necessarily be a R longest one. If we run our algorithm of Section 2.1.1 on the point set in the figure to the right, then it returns two rollercoasters R1 and R2 each of length at most d n2 e while the longest rollercoaster R R2 has length n. In this section, first we adapt the existing O(n log n)time algorithm for computing a longest increasing subsequence in S to compute a longest rollercoaster in S within the same time bound. Then we show that if S is a permutation of {1, . . . , n}, then we can compute a longest rollercoaster in O(n log log n) time. First we recall Fredman’s version of the O(n log n)-time algorithm for computing a longest increasing subsequence [7]; for more information about longest increasing subsequence, see Romik [12]. We maintain an array R[i], which initially has R[1] = S[1] and is empty otherwise. Then as i proceeds from 2 to n, we find the largest l for which R[l] < S[i], and set R[l + 1] = S[i]. This insertion ensures that every element R[l] stores the smallest element of S[1..i] in which an increasing subsequence of length l ends. After all elements of S have been processed, the index of the last non-empty element of R is the largest length of an increasing sequence; the corresponding sequence can also be retrieved from R. Notice that R is always sorted during the above process. 8 So, the proper location of S[i] in R can be computed in O(log n) time by a predecessor search, which can be implemented as a binary search. Therefore, this algorithm runs in O(n log n) time. To compute a longest rollercoaster we need to extend this approach. We maintain six arrays R(w, h) with w ∈ {inc, dec} and h ∈ {2, 3+ , 30+ } where inc stands for “increasing”, dec stands for “decreasing”, and 3+ stands for any integer that is at least 3. We define a w-h-rollercoaster to be a rollercoaster whose last run has h points and is increasing if w = inc and decreasing if w = dec. We insert S[i] into arrays R(inc, h) such that after this insertion the following hold: • R(inc, 2)[l] stores the smallest element of S[1..i] in which an inc-2-rollercoaster of length l ends. R(dec, 2)[l] stores the largest element of S[1..i] in which a dec-2-rollercoaster of length l ends. • R(inc, 3+ )[l] stores the smallest element of S[1..i] in which an inc-3+ -rollercoaster of length l ends. R(dec, 3+ )[l] stores the largest element of S[1..i] in which an dec-3+ -rollercoaster of length l ends. • R(inc, 30+ )[l] stores the largest element of S[1..i] in which an inc-3+ -rollercoaster of length l ends. R(dec, 30+ )[l] stores the smallest element of S[1..i] in which a dec-3+ -rollercoaster of length l ends. These arrays will be used when the last run of the current rollercoaster changes from an ascent to a descent, and vice versa. We insert S[i] into arrays R(dec, h) so that analogous constraints hold. To achieve these constraints we insert S[i] as follows: • R(inc, 2): Find the largest index l such that R(dec, 30+ )[l] < S[i]. If S[i] < R(inc, 2)[l + 1] then update R(inc, 2)[l + 1] = S[i]. • R(inc, 3+ ): Find the largest indices l1 and l2 such that R(inc, 2)[l1 ] < S[i] and R(inc, 3+ )[l2 ] < S[i]. Let l = max{l1 , l2 }. If S[i] < R(inc, 3+ )[l + 1] then update R(inc, 3+ )[l + 1] = S[i]. • R(inc, 30+ ): Find the largest index l1 and l2 such that R(inc, 2)[l1 ] < S[i] and R(inc, 30+ )[l2 ] < S[i]. Let l = max{l1 , l2 }. If S[i] > R(inc, 30+ )[l + 1] then update R(inc, 30+ )[l + 1] = S[i]. • The arrays R(dec, h) are updated in a similar fashion. Since our arrays R(w, h) are not necessarily sorted, we cannot perform a predecessor search to find proper locations of S[i]. To insert S[i] we need to find the largest index l such that R(w, h)[l] is smaller (or, alternatively, larger) than S[i] for some w and h, and also need to update contents of these arrays. Thereby, if A is an R(w, h) array, we need to perform the following two operations on A: • FindMax(A, S[i]): Find the largest index l such that A[l] > S[i] (or A[l] < S[i]). • Update(A, l, S[i]): Set A[l] = S[i]. We implement each R(w, h) as a Fenwick tree [6], which supports FindMax and Update in O(log n) time. Thus, the total running time of our algorithm is O(n log n). After all elements of S have been processed, the largest length of a rollercoaster is the largest value l for which R(w, 3+ )[l] or R(w, 30+ )[l] is not empty; the corresponding rollercoaster can also be retrieved from 9 arrays R(w, h), by keeping the history of the way the elements of these arrays were computed, and then rolling back the computation. A Longest Rollercoaster in Permutations: Here we consider a special case where our input sequence S consists of n distinct integers, each of which can be represented using at most c memory words for some constant c > 1, in a RAM model with logarithmic word size. In linear time, we can sort S, using Radix Sort, and then hash it to a permutation of {1, . . . , n}. This reduces the problem to finding a longest rollercoaster in a permutation of {1, . . . , n}. The longest increasing subsequence of such a sequence can be computed in O(n log log n) time by using a van Emde Boas tree [16], which supports predecessor search and updates in O(log log n) time.1 To compute a longest rollercoaster in the same time, we need a data structures that supports FindMax and Update in permutations in O(log log n) time. In Appendix B we show how to obtain such a data structure by using van Emde Boas trees combined with some other structures. Lemma 1. Let A be an array with n elements from the set {0, 1, . . . , n} such that each non-zero number occurs at most once in A. We can construct, in linear time, a data structure that performs FindMax and Update operations in O(log log n) amortized time. With Lemma 1 in hand, we can compute a longest rollercoaster in S in O(n log log n) time. We note that this algorithm can also compute a longest increasing subsequence by maintaining only the array R(inc, 3+ ). 2.4 Counting Rollercoaster Permutations In this section we estimate the number r(n) of permutations of {1, 2, . . . , n} that are rollercoasters. A brief table follows: n 1 2 3 4 5 6 7 8 9 10 11 12 13 14 r(n) 1 0 2 2 14 42 244 1208 7930 52710 40580 3310702 29742388 285103536 This is sequence A277556 in the On-Line Encyclopedia of Integer Sequences [14]. The first step is to rephrase the condition that a permutation is a rollercoaster in the language of ascents and descents. Given a length-n permutation π = π1 π2 · · · πn , its descent word u(π) is defined to be u1 u2 · · · un−1 where ui = a if πi < πi+1 and b otherwise. The set of all descent words for rollercoaster permutations is therefore given by the expression (bbb∗ + )(aaa∗ bbb∗ )(aaa∗ + ), which specifies that every increasing run and every decreasing run must contains at least three elements. Since this description is a regular expression, one can, in principle, obtain the asymptotic behavior of r(n) using the techniques of [1], but the calculations appear to be formidable. Instead, we follow the approach of Ehrenborg and Jung [4]. This is based on specifying sets of permutations through pattern avoidance. We say a word w avoids a set of words S if no contiguous subword of w belongs to S. Although rollercoasters are not specifiable in terms of a finite set of avoidable patterns, they “almost are”. Consider the patterns {aba, bab}. Every descent word of 1 We note that a longest increasing subsequence of a permutation can also be computed in O(n log log k) time (see √ [3]) where k is the largest length of an increasing sequence, which is Ω( n). However, in our case, the largest length of a rollercoaster is Ω(n). 10 a rollercoaster must avoid both these patterns, and every word avoiding these patterns that also begins and ends with either aa or bb is the descent word of some rollercoaster. Let s(n) be the number of permutations of length n whose descent word avoids {aba, bab}. Then r(n) = Θ(s(n)). . From [4, Prop. 5.2] we know that s(n) ∼ c · n! · λn−3 where λ = 0.6869765032 · · · is the root of a certain equation. It follows that r(n) ∼ c0 · n! · λn−3 where c0 is a constant, approximately 0.204. 3 Caterpillars In this section we study the problem of drawing a top-view caterpillar, with L-shaped edges, on a set of points in the plane that is in general orthogonal position. Recall that a top-view caterpillar is an ordered caterpillar of degree 4 such that the two leaves adjacent to each vertex lie on opposite sides of the spine; see Figure 1(b) for an example. The best known upper bound on the number of required points for a planar L-shaped drawing of every n-vertex top-view caterpillar is O(n log n); this bound is due to Biedl et al. [2]. We use Theorem 3 and improve this bound to 25 3 n+O(1). In every planar L-shaped drawing of a top-view caterpillar, every node of the spine, except for the two endpoints, must have its two incident spine edges aligned either horizontally or vertically. Such a drawing of the spine (which is essentially a path) is called a straight-through drawing. It has been proved in [2] that every n-vertex path has an x-monotone straight-through drawing on any set of at least c · n log n points, for some constant c. The following theorem improves this bound. Theorem 5. Any path of n vertices has an x-monotone straight-through drawing on any set of at least 3n−3 points in the plane that is in general orthogonal position. Proof. Fix an arbitrary set of 3n−3 points. As in the proof of Theorem 3, find two pseudorollercoasters that together cover all but the last point and that both contain the first point. Append the last point to both sets; we hence obtain two subsequences R1 , R2 with |R1 | + |R2 | ≥ 3n−1 and for which all but the first and last run have length at least 3. We may assume |R1 | ≥ 23 n − 12 , and will find the straight-through drawing within it. To do so, consider any run r of R1 that is neither the first nor the last run, and that has even length (hence length at least 4). By removing from r one point that is not shared with an adjacent run, we turn it into a run of odd length. Let R0 be the subsequence that results after applying this to every such run of R1 ; then R0 satisfies that every run except the first and last one has odd length. Observe that we can find an x-monotone straight-through drawing of length |R0 | on this, see e.g. the black path in Figure 5 that is drawn on the black points. It remains to argue that |R0 | ≥ n. Let r1 , . . . , r` be the runs of R1 , and assign to each run ri all but the last point of ri (the last point of ri is counted with ri+1 , or not counted at all if i = `). Therefore |r1 | + · · · + |r` | = |R1 |−1 ≥ 23 n − 32 . For each ri with 2 ≤ i ≤ `−1, wePremove a point only if |ri | ≥ 3, hence we keep at least 23 |ri | points. Therefore |R0 | ≥ |r1 | + |r` | + 2≤i≤`−1 23 |ri | ≥ P 2 1 2 3 3 1 1≤i≤` 3 |ri | + 3 (|r1 | + |r` |) ≥ 3 · ( 2 n − 2 ) + 3 (2 + 1) = n as desired. To draw top-view caterpillars, we essentially use Theorem 5 and place the spine on the resulting straight-through x-monotone path. But we will get a slightly better factor if we analyze the number of points directly. Theorem 6. Any top-view caterpillar of n vertices has a planar L-shaped drawing on any set of 25 3 (n+4) points in the plane that is in general orthogonal position. 11 Proof. Fix any 25 3 (n+4) points P in general orthogonal position. Partition P , by vertical lines, into 53 (n+4) sets, each of them containing five points. We call every such set a 5-set. Let P 0 be the set of the mid-points (with respect to y-coordinates) of every 5-set. We have |P 0 | ≥ 53 (n+4), so by Theorem 3 it contains a rollercoaster R of length at least 65 (n+4). Let s1 , . . . , sN (for N ≥ 65 (n+4)) be the points of R, ordered from left to right. For every i ∈ {1, . . . , N }, consider the 5-set containing si and let its other points be ai , bi , ci , di from top to bottom; we call these the reserved points. The main idea is to draw the spine of the caterpillar along R and the leaves at reserved points, though we will deviate from this occasionally. Let the spine consist of vertices v1 , v2 , . . . , v` , where v1 and v` are leaves while v2 , v3 , . . . are vertices of degree 4. We process the vertices the following invariant: a1 a2 b2 b1 s2 s1 c1 c2 s3 sN d2 d1 Figure 5: An x-monotone straightthrough drawing of an n0 -vertex path. Red (lighter shade) points are reserved. in order along the spine, and maintain Invariant. At time k ≥ 1, vertex v2k is drawn on a point si that is in the middle of a run of R. Edge (v2k , v2k−1 ) attaches vertically at v2k . All vertices v1 , . . . , v2k−1 , all their incident leaves, and one incident leaf of v2k are drawn on points to the left of si . To initiate this process, we draw v1 on s1 , v2 on s2 , and one leaf incident to s2 on b1 . See Figure 5. Clearly the invariant holds for v2 . Now assume that vertex v2k has been placed at si , and we want to place v2k+1 and v2k+2 next. We know that si is in the middle of some run of R; up to symmetry we may assume that it is an ascending run. Let sj be the last point of this run of R; by the invariant j > i. We distinguish cases: Case 1: j ≤ i + 4. See Figure 6(a). We will completely ignore the 5-sets containing si+1 , . . . , sj−1 . Recall that there are two reserved points aj and bj above sj . We place v2k+1 at bj and v2k+2 at sj+1 . We connect leaves as follows: The leaves incident to v2k+1 are placed at aj and sj . To place one leaf each incident to v2k and v2k+2 , we use the two points cj and dj , using the one farther left for v2k . Clearly the invariant holds. Observe that there are at most five 5-sets (corresponding to si+1 , . . . , sj+1 ) that were parsed, and we have used two for placing spine-vertices. Therefore, we have used at least 52 th of the parsed 5-sets. Case 2: j > i + 4. See Figure 6(b). We ignore the reserved points corresponding to si+1 and si+3 . We place v2k+1 at si+2 and v2k+2 at si+4 . Note that by case-assumption si+4 is not the end of the run, so this satisfies the invariant. We connect, as leaves, si+1 to v2k (at si ), and si+3 to v2k+2 (at si+4 ). The two leaves of v2k+1 can be placed in the 5-set of si+2 . We have used four 5-sets and placed two spine-vertices, and have therefore used half of the parsed 5-sets. This is the end of one iteration. In every iteration, we have used at least 25 th of the parsed 5-sets. Since there were 65 (n+4) 5-sets, we hence can place 13 (n+4) spine-vertices. Since the spine of every n-vertex top-view caterpillar has 13 (n+4) vertices, our claim follows. The algorithm in the proof of Theorem 6 runs in linear time, provided that the input points are given in sorted order, since we can find the rollercoaster in linear time and then do one scan of the points. 12 aj bj sj bi+2 si+4 cj si+1 sj+1 si si+3 si+2 si ci+2 dj (a) (b) Figure 6: Placing the next two spine-vertices. (a) j ≤ i + 4. (b) j > i + 4. The dashed line indicates R, the solid line is the spine. References [1] N. Basset. Counting and generating permutations in regular classes. Algorithmica, 76(4):989– 1034, 2016. [2] T. Biedl, T. M. Chan, M. Derka, K. Jain, and A. Lubiw. Improved bounds for drawing trees on fixed points with L-shaped edges. CoRR, abs/1709.01456, 2017. Also to appear in Proceedings of GD, 2017. [3] M. Crochemore and E. Porat. Fast computation of a longest increasing subsequence and application. Information and Computation, 208(9):1054–1059, 2010. [4] R. Ehrenborg and J. Jung. Descent pattern avoidance. Advances in Applied Mathematics, 49:375–390, 2012. [5] P. Erdős and G. Szekeres. A combinatorial problem in geometry. Compositio Mathematica, 2:463–470, 1935. [6] P. M. Fenwick. A new data structure for cumulative frequency tables. Software—Practice and Experience, 24(3):327–336, 1994. [7] M. L. Fredman. On computing the length of longest increasing subsequences. Discrete Mathematics, 11(1):29–35, 1975. [8] E. D. Giacomo, F. Frati, R. Fulek, L. Grilli, and M. Krug. Orthogeodesic point-set embedding of trees. Computational Geometry: Theory and Applications, 46(8):929–944, 2013. [9] J. M. Hammersley. A few seedlings of research. In Proceedings of the 6th Berkeley Symposium on Mathematical Statistics and Probability, pages 345–394. University of California Press, 1972. [10] S. Kitaev. Patterns in Permutations and Words. Springer, 2011. [11] S. Linton, N. Ruškuc, and V. Vatter, editors. Permutation Patterns. London Mathematical Society Lecture Note Series, vol. 376, Cambridge, 2010. 13 [12] D. Romik. The Surprising Mathematics of Longest Increasing Subsequences. Cambridge, 2015. [13] M. Scheucher. Orthogeodesic point set embeddings of outerplanar graphs. Master’s thesis, Graz University of Technology, 2015. [14] N. J. A. Sloane et al. The On-Line Encylopedia of Integer Sequences, available at https: //oeis.org. [15] J. M. Steele. Variations on the monotone subsequence theme of Erdös and Szekeres. In D. Aldous, P. Diaconis, J. Spencer, and J. M. Steele, editors, Discrete Probability and Algorithms, pages 111–131. Springer New York, 1995. [16] P. van Emde Boas. Preserving order in a forest in less than logarithmic time and linear space. Information Processing Letters, 6(3):80–82, 1977. 14 A Detailed Length Analysis Let R1 and R2 be the two rollercoasters computed by our algorithm. Recall that R1 ∪ R2 contains all points of P , except possibly p1 and pn which might be discarded in the first and last iterations, respectively.  the total length of R 1 and R2 is at least n − 2, and the length of the longer one  Thus n . To get the length this includes some is at least n−2 2 2 we revisit the first and last iterations;  n case analysis. For brevity, we call a rollercoaster of length at least 2 a suitable rollercoaster. If one of R1 and R2 is empty, then the other one is suitable. Assume that none of them is empty, and thus, each contains at least three points (because they are valid rollercoasters). Observations 1 and 2 follow from the intermediate and last iterations. Observation 1. If p1 is not in R1 ∪R2 , then we removed p1 from R1 and R2 in the final refinement at the end of the algorithm. Thus the first run of R1 is an increasing chain with two points, say p1 , p2 without loss of generality, and the first run of R2 is a decreasing chain with two points, say p1 , p3 . This means that point p4 must lie between p2 and p3 and must start the main case of the intermediate iteration, and this iteration must complete by finding a 3-ascent and 3-descent that share a common point. (In particular, we cannot go directly to the final iteration otherwise one of R1 , R2 would be longer.) Observation 2. If pn is not in R1 ∪ R2 , then the last run of one of them is an ascent ending at a point u and the last run of the other one is a descent ending at a point v such that u lies above v, and pn lies between them. Depending on whether p1 is missing from R1 ∪ R2 or pn is missing from R1 ∪ R2 , or both, we consider three cases. • p1 6∈ R1 ∪ R2 , pn ∈ R1 ∪ R2 . By Observation 1 there is a common point in R1 and R2 . Then |R1 | + |R2 | > n and we are done. • p1 ∈ R1 ∪ R2 , pn 6∈ R1 ∪ R2 . We apply Observation 2. Suppose the last run of R1 is a descent and the last run of R2 is an ascent. Then at the end of the algorithm the last run of R1 is a descent and the last run of R2 is an ascent and, by the invariant, they must have a common point. If that common point is not p1 then |R1 | + |R2 | > n and we are done. So suppose the common point is p1 . The only danger is that we might remove p1 from one of them, say R1 . But this would imply that the last and only run of R1 has length less than 3, which is impossible. Thus p1 is common to R1 and R2 , so |R1 | + |R2 | > n and we are done. • p1 6∈ R1 ∪ R2 , pn 6∈ R1 ∪ R2 . By Observation 1 there is a common point p in R1 and R2 . If there were two or more common points then |R1 | + |R2 | > n and we would be done. Thus we may assume that there is only one common point p, which means that the main case of the intermediate iteration only happened once. By Observation 2 the last run of R1 , say, is a descent ending below pn and the last run of R2 is an ascent ending above pn . Because there is only one common point, these must be the only runs in R1 and R2 and we have the situation depicted in Figure 7.   We have |R1| + |R2 | > n − 1, and thus the length of the longer rollercoaster is at least n−1 , 2 which is n2 if n is an even number. Assume that n is an odd number, and thus n > 9. If    one of R1 and R2 contains less than n−1 points, then the other one contains at least n2 2 15   points, which is at least 4 points. Let points. Assume that each of R1 and R2 contains n−1 2 0 0 R1 and R2 be the sub-chains of R1 and R2 , respectively, that are to the left of p. Similarly define sub-chains R001 and R002 to the right of p. Assume without loss of generality that |R01 | 6 |R02 |. We consider two cases: 1. |R01 | < |R02 |. Then |R001 | > |R002 | and |R02 | > 3. Then the concatenation of R02 , p, and R001 is a suitable rollercoaster. 2. |R01 | = |R02 |.Then |R001 | = |R002 |. By reversing the sequences if necessary, we may assume that |R01 | > |R001 |, and thus |R01 | > 3. Let R1 = (a1 , a2 , a3 , a4 , . . . ) and R2 = (b1 , b2 , b3 , b4 , . . . ). If a2 is to the right of the vertical line through b2 , then as depicted in Figure 7 the rollercoaster (b1 , b2 , a2 , a3 , a4 , . . . ) is suitable, otherwise (a1 , a2 , b2 , b3 , b4 , . . . ) is suitable. a1 R01 a2 p1 p b1 R02 R002 pn R001 b2 Figure 7: Illustration of the case where p1 , pn ∈ / R1 ∪ R2 . B Data Structure for FindMax and Update Recall from Section 2.3 that we have an array A containing distinct elements from {1, . . . , n}, and we want to perform the following two operations on A in O(log log n) time: • FindMax(A, x): Find the largest index l such that A[l] > x. • Update(A, l, x): Set A[l] = x. Lemma 2. Let B be an array with n elements from the set {0, 1, . . . , n} such that each non-zero number occurs at most once in B. We can construct, in linear time, a data structure that, in O(log log n) amortized time, performs the operations Suffix Maximum Query (SMQ) and Update defined as follows: • SMQ(l): Return the position of the largest element in B[l..n], and • Update(B, l, x): Set B[l] = x, assuming that x ∈ {1, . . . , n} is not currently in B. Proof. In linear time, we construct a doubly linked list L (by indices of B) as follows. Set M = n and initialize L by M . For i from n − 1 to 1 we do the following: if B[i] > B[M ], we add the 16 index i to the front of L and then set M = i. After this, L contains indices i1 , i2 , . . . , ik , where i1 < i2 < · · · < ik = n, and ( B[1..n] for j = 1 B[ij ] = largest element in B[(ij−1 + 1)..n] for all 1 < j 6 k This means that every position that will be returned by SMQ queries on B belongs to L. More precisely, for every l ∈ {1, . . . , n} we have SMQ(l) = ij where ij is the smallest index in L that is not smaller than l. Then in linear time we construct a van Emde Boas tree T with the elements of L; this tree allows us to perform predecessor search, successor search, insert, and delete in O(log log n) time. To answer an SMQ(l) query, we report the smallest element ij in L such that ij > l. This can be done in O(log log n) time by reporting the successor of l in T . We implement the Update(B, l, x) operation as follows. Notice that this operation will not change the answer to SMQ(t) queries for any t > l. Thus, we only need to update L and T such that SMQ(t) reports a correct position when t 6 l. We find in L the largest index ih such that ih 6 l; this can be done is done in O(log log n) time by a predecessor search in T . If B[ih+1 ] > x then we don’t do anything as the position of x will not be reported by any SMQ query. Assume that B[ih+1 ] < t. Then we insert l in L, between ih and ih+1 , and also in T . Then we remove from L and T every index ij , with j 6 h, for which B[ij ] < x. This can be done in O(r log log n) where r is the number of elements we that remove. Since every index of B is inserted at most once in L, and also deleted once, the amortized running time of this operation is O(log log n). A data structure similar to that of Lemma 2 can be obtained for Prefix Maximum Queries PMQ(l), which ask for the position of the largest element inf B[1..l]. Now we prove Lemma 1, which is restated below. Lemma 1. Let A be an array with n elements from the set {0, 1, . . . , n} such that each non-zero number occurs at most once in A. We can construct, in linear time, a data structure that performs FindMax and Update operations in O(log log n) amortized time. Proof. We construct a van Emde Boas tree T for A (we maintain links between every element of T and its occurrence in A). We construct an array B where B[i] = j if and only if A[j] = i. Then we preprocess B as in the proof of Lemma 2. To answer a FindMax(A, x) query we proceed as follows. We describe the case where we look for the largest index l such that A[l] > x; the description of the case where A[l] < x is analogous. We first compute the successor A[j] of x in A, i.e., the smallest element in A that is greater than x. This can be done by a successor search in T . Since A[j] > x, we have FindMax(A, x) > j and A[FindMax(A, x)] > A[j]. Hence, to retrieve FindMax(A, x) we need to find the largest index k, with k > j, such that A[k] > A[j]. This index k is the maximum element in B[A[j]..n], which is SMQ(B, A[j]). By Lemma 2 this can be done in O(log log n) time. Therefore, in O(log log n) time, we can answer FindMax(A, x). To perform Update(A, l, x), we set A[l] = x, update T (by deleting the old value A[l] and inserting x), and execute Update(B, x, l). These operations take O(log log n) amortized time. 17
8cs.DS
Accepted final version. This paper is a postprint of a paper submitted to and accepted for publication in IET Control Theory & Applications and is subject to Institution of Engineering and Technology Copyright. The copy of record is available at the IET Digital Library. (doi: 10.1049/iet-cta.2016.1021) Event-based State Estimation: An Emulation-based Approach Sebastian Trimpe1* 1 arXiv:1703.08342v1 [cs.SY] 24 Mar 2017 Autonomous Motion Department, Max Planck Institute for Intelligent Systems, Spemannstr. 38, 72076 Tübingen, Germany * [email protected] Abstract: An event-based state estimation approach for reducing communication in a networked control system is proposed. Multiple distributed sensor agents observe a dynamic process and sporadically transmit their measurements to estimator agents over a shared bus network. Local event-triggering protocols ensure that data is transmitted only when necessary to meet a desired estimation accuracy. The event-based design is shown to emulate the performance of a centralized state observer design up to guaranteed bounds, but with reduced communication. The stability results for state estimation are extended to the distributed control system that results when the local estimates are used for feedback control. Results from numerical simulations and hardware experiments illustrate the effectiveness of the proposed approach in reducing network communication. 1. Introduction In almost all control systems today, data is processed and transferred between the system’s components periodically. While periodic system design is often convenient and well understood, it involves an inherent limitation: data is processed and transmitted at predetermined time instants, irrespective of the current state of the system or the information content of the data. That is, system resources are used regardless of whether there is any need for processing and communication or not. This becomes prohibitive when resources are scarce, such as in networked or cyber-physical systems, where multiple agents share a communication medium. Owing to the limitations of traditional design methodologies for resource-constrained problems, aperiodic or event-based strategies have recently received a lot of attention [1, 2]. With eventbased methods, data is transmitted or processed only when certain events indicate that an update is required, for example, to meet some control or estimation specification. Thus, resources are used only when required and saved otherwise. In this article, a novel event-based scheme for distributed state estimation is proposed. We consider the system shown in Fig. 1, where multiple sensors observe a dynamic system and transmit data to estimator agents over a common bus. Each estimator agent shall estimate the full state of the dynamic system, for example, for the purpose of monitoring or control. In order to limit network traffic, local event triggers on each sensor ensure that updates are sent only when needed. The common bus ensures that transmitted data reaches all agents in the network, which will allow for efficient triggering decisions and the availability of full state information on all agents. The proposed approach for distributed event-based estimation emulates a classic discrete-time state observer design up to guaranteed bounds, but with limited communication. Emulation-based design is one common approach in event-based control literature (see [2]), where an event-based 1 Dynamic system (state x) y1 Sensor 1 y2 Sensor 2 yNsen Estimator 1 Common bus network Sensor Nsen Estimator 2 Estimator Nest Fig. 1. Distributed state estimation problem. Multiple distributed sensors make observations yi of a dynamic system and communicate to estimator nodes via a common bus network. The development of an event-based scheme allowing all estimators to estimate the full system state x, but with limited inter-agent communication, is the objective of this article. control system is designed so as to emulate the behavior of a given continuous or periodic control system. However, to the best of the author’s knowledge, emulation-based design has not been considered for state estimation. While the focus of this article is on state estimation, we also show stability of the event-based control system resulting when local estimates are used for feedback control. In particular, this articles makes the following main contributions: (i) First emulation-based design for distributed event-based state estimation replicating a centralized discrete-time linear observer. (ii) Stability proofs for the resulting distributed and switching estimator dynamics under generic communication or computation imperfections (bounded disturbances). (iii) Extension to distributed event-based control, where local estimates are used for feedback. (iv) Experimental validation on an unstable networked control system. Preliminary results of those herein were presented in the conference papers [3, 4]; this article has been completely rewritten and new results added. 1.1. Related work Early work on event-based state estimation (EBSE) concerned problems with a single sensor and estimator node (see [1] and references therein). Typically, the optimal triggering strategies have time-varying thresholds for finite-horizon problems, and constant thresholds for infinite-horizon problems, [1, p. 340]. Because long-term behavior (stability) is of primary interest herein, we consider constant thresholds. Different types of stationary triggering policies have been suggested in literature. With the send-on-delta (SoD) protocol [5], transmissions are triggered based on the difference of the current and last-transmitted measurement. Innovation-based triggering [6] places a threshold on the measurement innovation; that is, the difference of the current measurement and its prediction based on a process model. Wu et al. [7] use the same trigger, but apply a transformation to decorrelate the innovation. Considering the variance of the innovation instead yields variance-based triggering [8]. Marck and Sijs [9] proposed relevant sampling, where the relative entropy of prior and 2 posterior state distribution is employed as a measure of information gain. We use innovation-based triggers herein, which have been shown to be effective for EBSE, [10]. Different estimation algorithms have been proposed for EBSE, with particular emphasis on how to (approximately) incorporate information contained in ‘negative’ events (instants when no data is transmitted), [11–13]. If one ignores the extra information from negative events in favor of a straightforward implementation, a time-varying Kalman filter (KF) can be used (e.g. [6]). Herein, we use the same structure as the standard KF, but with pre-computed switching gains, thus achieving the lowest computational complexity of all mentioned algorithms. To the best of the author’s knowledge, distributed EBSE with multiple sensor/estimator nodes and general coupled dynamics was first studied in [6]. While Yook et al. [14] had previously proposed the use of state estimators for the purpose of saving communication, they do not employ state estimation in the usual sense. Instead of fusing model-based predictions with incoming data, they reset parts of the state vector. Later results on distributed EBSE include [13, 15–19]. In contrast to the scenario herein, they consider either a centralized fusion node, or simpler SoDtype triggers, which are less effective for estimation, [10]. None of the mentioned references treats the problem of emulating a centralized observer design with a distributed and event-triggered implementation. When the event-based state estimators are connected to state-feedback controllers (discussed in Section 5), this represents a distributed event-based control system. Wang et al. [20] and Mazo Jr et al. [21] were among the first to discuss distributed or decentralized event-based control. In contrast to these works, we neither assume perfect state measurements, nor a centralized controller as in [21], nor have a restriction on the dynamic couplings [20], but we rely on a common bus network supporting all-to-all communication. 1.2. Notation The terms state observer and state estimator are used synonymously in this article. R, N, and NN denote real numbers, positive integers, and the set {1, 2, . . . , N }, respectively. Where convenient, vectors are expressed as tuples (v1 , v2 , . . . ), where vi may be vectors themselves, with dimension and stacking clear from context. For a vector v and matrix A, kvk denotes some vector Hölder norm [22, p. 344], and kAk the induced matrix norm. For a sequence v = {v(0), v(1), . . . }, kvk∞ denotes the `∞ norm kvk∞ := supk≥0 kv(k)k. For an estimate of x(k) computed from measurement data until time ` ≤ k, we write x̂(k|`); and use x̂(k) = x̂(k|k). A matrix is called stable if all its eigenvalues have magnitude strictly less than one. Expectation is denoted by E[·]. 2. Problem statement: distributed state estimation with reduced communication We introduce the considered networked dynamic system and state the estimation problem addressed in this article. 2.1. Networked dynamic system We consider the networked estimation scenario in Fig. 1. The dynamic system is described by linear discrete-time dynamics x(k) = Ax(k − 1) + Bu(k − 1) + v(k − 1) y(k) = Cx(k) + w(k) 3 (1) (2) with sampling time Ts , state x(k) ∈ Rn , control input u(k) ∈ Rq , measurement y(k) ∈ Rp , disturbances v(k) ∈ Rn , w(k) ∈ Rp , and all matrices of corresponding dimensions. We assume that (A, B) is stabilizable and (A, C) is detectable. No specific assumptions on the characteristics of the disturbances v(k) and w(k) are made; they can be random variables or deterministic disturbances. Each of the Nsen sensor agents (cf. Fig. 1) observes part of the dynamic process through measurements yi (k) ∈ Rpi , i ∈ NNsen . The vector y(k) thus represents the collective measurements of all Nsen agents, y(k) = (y1 (k), y2 (k), . . . , yNsen (k)) yi (k) = Ci x(k) + wi (k) ∀ i ∈ NNsen (3) (4) with Ci ∈ Rpi ×n and wi (k) ∈ Rpi . Agents can be heterogeneous with different types and dimensions of measurements, and no local observability assumption is made (i.e. (A, Ci ) can be not detectable). Each of the Nest estimator agents (cf. Fig. 1) shall reconstruct the full state for the purpose of, for example, having full information at different monitoring stations, distributed optimal decision making, or local state-feedback control. Overall, there are N = Nsen + Nest agents, and we use i = 1, . . . , Nsen to index the sensor agents, and i = 1 + Nsen , . . . , Nest + Nsen for the estimator agents. While the primary concern is the development of an event-based approach to the distributed state estimation problem in Fig. 1, we shall also address distributed control when the local estimates are used for feedback. For this, we consider the control input decomposed as u(k) = (u1 (k), u2 (k), . . . , uNest (k)) (5) with ui (k) ∈ Rqi the input computed on estimator agent i + Nsen . All agents are connected over a common-bus network; that is, if one agent communicates, all agents will receive the data. We assume that the network bandwidth is such that, in the worst case, all agents can communicate in one time step Ts , and contention is resolved via low-level protocols. Moreover, agents are assumed to be synchronized in time, and network communication is abstracted as instantaneous. Remark 1. The common bus is a key component of the developed event-based approach. It will allow the agents to compute consistent estimates and use these for effective triggering decisions (while inconsistencies can still happen due to data loss or delay). Wired networks with a shared bus architecture such as Controller Area Network (CAN) or other fieldbus systems are common in industry [23]. Recently, Ferrari et al. [24] have proposed a common bus concept also for multi-hop low-power wireless networks. 2.2. Reference design We assume that a centralized, discrete-time state estimator design is given, which we seek to emulate with the event-based design to be developed herein: x̂c (k|k − 1) = Ax̂c (k − 1|k − 1) + Bu(k − 1)  x̂c (k|k) = x̂c (k|k − 1) + L y(k) − C x̂c (k|k − 1) (6) (7) where the estimator gain L ∈ Rn×p has been designed to achieve desired estimation performance, and the estimator is initialized with some x̂c (0) = x̂c (0|0). For example, (6), (7) can be a Kalman 4 filter representing the optimal Bayesian estimator for Gaussian noise, or a Luenberger observer designed via pole placement to achieve a desired dynamic response. At any rate, a reasonable observer design will ensure stable estimation error dynamics c (k) := x(k) − x̂c (k) = (I −LC)Ac (k−1) + (I −LC)v(k−1) − Lw(k). (8) We thus assume that (I − LC)A is stable, which is always possible since (A, C) is detectable. It follows [25, p. 212–213] that there exist mc > 0 and ρc ∈ [0, 1) such that k((I − LC)A)k k ≤ mc ρkc . 2.3. (9) Problem statement The main objective of this article is an EBSE design that approximates the reference design of Section 2.2 with guaranteed bounds: Problem 1. Develop a distributed EBSE design for the scenario in Fig. 1, where each estimator agent (i = Nsen , . . . , Nsen + Nest ) locally computes an estimate x̂i (k) of the state x(k), and each sensor agent (i = 1, . . . , Nsen ) makes individual transmit decisions for its local measurements yi (k). The design shall emulate the centralized estimator (6), (7) bounding the difference kx̂c (k) − x̂i (k)k, but with reduced communication of sensor measurements. Furthermore, we address distributed control based on the EBSE design: Problem 2. Design distributed control laws for computing control inputs ui (k) (cf. (5)) locally from the event-based estimates x̂i (k) so as to achieve stable closed-loop dynamics (bounded x). For state estimation in general, both the measurement signal y and the control input u must be known (cf. (6), (7)). For simplicity, we first focus on the reduction of sensor measurements and assume Assumption 1. The input u is known by all agents. This is the case, for example, when estimating a process without control input (i.e. u = 0), when u is an a-priori known reference signal, or when u is broadcast periodically over the shared bus. In particular, if the components ui (k) are computed by different agents as in Problem 2, Assumption 1 requires the agents to exchange their inputs over the bus at every step k. Reducing measurement communication, but periodically exchanging inputs may be a viable solution when there are more measurements than control inputs (as is the case for the experiment presented in Section 6.2). Later, in Section 5, an extension of the results is presented, which does not require Assumption 1 and periodic exchange of inputs by employing event-triggering protocols also for the inputs. 3. Event-based state estimation with a single sensor-estimator link In order to develop the main ideas of the EBSE approach, we first consider Problem 1 for the simpler, but relevant special case with Nsen = Nest = 1; that is, a single sensor transmits data over a network link to a remote estimator (also considered in [1, 7, 9–11], for instance). For the purpose of this section, we make the simplifying assumption of a prefect communication link: Assumption 2. Transmission from sensor to estimator is instantaneous and no data is lost. 5 Dynamic system Sensor agent Event Trigger (state x) State Estimator y Remote estimator Network link State Estimator x̂ (a) Single sensor/estimator agent Dynamic system Sensor 1 Event Trigger (state x) d1 State Estimator Estimator 1 d1+Nsen Y(k) Y(k) State Estimator x̂1+Nsen y1 Common bus network Sensor Nsen dNsen Event Trigger State Estimator Estimator 2 d2+Nsen Y(k) State Estimator x̂2+Nsen Y(k) Estimator Nest dNest +Nsen yNsen Y(k) State Estimator x̂Nest +Nsen (b) Multiple sensor/estimator agents Fig. 2. Proposed event-based state estimation architectures. Dashed arrows indicate event-based communication, while solid ones indicate periodic communication. (a) Single sensor/estimator case: The sensor agent implements a copy of the remote State Estimator to trigger a data transmission (Event Trigger) whenever an update is needed at the remote agent. (b) Multiple sensor/estimator case: Each agent implements a copy of the State Estimator for making transmit decisions (Sensors) or having full state information available (Estimators). The common bus supports data exchange between all agents; Y(k) denotes the set of measurements communicated at time k. Disturbances di model differences in the agents’ estimates, e.g. from imperfect communication. For a sufficiently fast network link, this may be ensured by low-level protocols using acknowledgments and re-transmissions. However, this assumption is made for the sake of simplicity in this section, and omitted again in the later sections. We propose the event-based architecture depicted in Fig. 2(a). The key idea is to replicate the remote state estimator at the sensor; the sensor agents then knows what the estimator knows, and thus also when the estimator is in need of new data. The State Estimator and Event Trigger, which together form the EBSE algorithm, are explained next. 3.1. State estimator Both sensor and remote agent implement the state estimator (cf. Fig. 2(a)). The estimator recursively computes an estimate x̂i (k) = x̂i (k|k) of the system state x(k) from the available measurements: x̂i (k|k − 1) = Ax̂i (k − 1|k − 1) + Bu(k − 1) 6 (10)  x̂i (k|k) = x̂i (k|k − 1) + γ(k)L y(k) − C x̂i (k|k − 1) (11) with i = 1 for the sensor, i = 2 for the estimator, L as in (7), and γ(k) ∈ {0, 1} denoting the sensor’s decision of transmitting y(k) (γ(k) = 1), or not (γ(k) = 0). By Assumption 2, both estimators have the same input data. If, in addition, they are initialized identically, both estimates are identical, i.e. x̂1 (k) = x̂2 (k) for all k. Hence, the sensor has knowledge about the estimator and can exploit this for the triggering decision. 3.2. Event trigger The sensor transmits a measurement if, and only if, the remote estimator cannot predict the measurement accurately enough based on its state prediction. Specifically, y(k) is transmitted when the remote prediction ŷ(k) = C x̂2 (k|k − 1) deviates from y(k) by more than a tolerable threshold δ est ≥ 0. Since x̂1 (k|k − 1) = x̂2 (k|k − 1), the sensor can make this decision without requiring communication from the remote estimator: transmit y(k) ⇔ γ(k) = 1 ⇔ ky(k) − C x̂1 (k|k − 1)k ≥ δ est . (12) Tuning δ est allows the designer to trade off the sensor’s frequency of events (and, hence, the communication rate) for estimation performance. This choice of the trigger will be instrumental in bounding the difference between the event-based and the centralized estimator, as will be seen in the subsequent stability analysis. The trigger is also called innovation-based trigger and was previously proposed in different contexts in [6, 7, 14]. The innovation trigger (12) can also be realized without the local state estimator on the sensor by periodically communicating estimates from the remote estimator to the sensor. However, the proposed architecture avoids this additional communication. 3.3. Stability analysis The estimator update equations (10), (11) and the triggering rule (12) together constitute the proposed event-based state estimator. The estimator (10), (11) is a switching observer, whose switching modes are governed by the event trigger (12). For arbitrary switching, stability of the switching observer is not implied by stability of the centralized design (see e.g. [26]). Hence, proving stability is an essential, non-trivial requirement for the event-based design. 3.3.1. Difference to centralized estimator: Addressing Problem 1, we first prove a bounded difference to the centralized reference estimator x̂c (k). Using (6), (7), (10), and (11), the difference ei (k) = x̂c (k) − x̂i (k) can be written as   ei (k) = Aei (k−1) + L y(k) − C x̂c (k|k−1) − γ(k)L y(k) − C x̂i (k|k − 1)  = (I − LC)Aei (k − 1) + (1 − γ(k))L y(k) − C x̂i (k|k − 1) (13) where the last equation was obtained by adding and subtracting L(y(k) − C x̂i (k|k−1)). The error ei (k) is governed by the stable centralized estimator dynamics (I −LC)A with an extra input term, which is bounded by the choice of the event-trigger (12): for γ(k) = 0, L(y(k) − C x̂i (k|k − 1)) is bounded by (12), and for γ(k) = 1, the extra term vanishes. We thus have the following result: Theorem 1. Let Assumptions 1 and 2 be satisfied, (I − LC)A be stable, and x̂1 (0) = x̂2 (0) = x0 for some x0 ∈ Rn . Then, the difference ei (k) between the centralized estimator and the EBSE 7 (10), (11), and (12) is bounded by kei k∞ ≤ mc kei (0)k + mc kLkδ est =: emax i . 1 − ρc (14) Proof. From the assumptions, it follows that x̂1 (k) = x̂2 (k) and x̂1 (k|k − 1) = x̂2 (k|k − 1). From the previous argument, we have  k(1 − γ(k))L y(k) − C x̂i (k|k − 1) k ≤ kLkδ est . (15) The bound (14) then follows from [25, p. 218, Thm. 75] and exponential stability of ei (k) = (I − LC)Aei (k − 1) (cf. (9)). The first term in (14), mc kei (0)k, is due to possibly different initial conditions between the EBSE and the centralized estimator, and mc kLkδ est /(1 − ρc ) represents the asymptotic bound. Choosing δ est small enough, ei (k) can hence be made arbitrarily small as k → ∞, and, for δ est = 0, the performance of the centralized estimator is recovered. The bound (14) holds irrespective of the nature of the disturbances v and w in (1), (2) (no assumption on v, w is made in Theorem 1). In particular, it also holds for the case of unbounded disturbances such as Gaussian noise. 3.3.2. Estimation error: The actual estimation error i of agent i is i (k) := x(k) − x̂i (k) = c (k) + ei (k). (16) Theorem 1 can be used to deduce properties of the estimation error i from properties of the centralized estimator. We exemplify this for the case of bounded, as well as stochastic disturbances v and w. be bounded, and (I − LC)A be Corollary 1. Let kvk∞ ≤ v max , kwk∞ ≤ wmax , kei k∞ ≤ emax i stable. Then, the event-based estimation error (16) is bounded by ki k∞ ≤ max + emax c i with max := mc kc (0)k + c mc (kI 1−ρc (17) − LCkv max + kLkwmax ). Proof. The bound max on the centralized estimation error c (k) follows directly from (8), expoc nential stability (9), and [25, p. 218, Thm. 75]. The result (17) is then immediate from (16). Corollary 2. Let v, w, x(0) be random variables with E[v(k)] = 0, E[w(k)] = 0, E[x(0)] = x0 , and the centralized estimator be initialized with x̂c (0) = x0 . Let kei k∞ ≤ emax be bounded, and i (I − LC)A be stable. Then, the expected event-based estimation error (16) is bounded by kE[i (k)]k ≤ emax i ∀k. (18) Proof. From (8), it follows E[c (k)] = (I − LC)AE[c (k − 1)], and thus E[c (k)] = 0 by recursion from E[c (0)] = E[x(0)] − x0 = 0. Therefore, kE[i (k)]k = kE[ei (k)]k ≤ E[kei (k)k] ≤ emax i where the first inequality follows from Jensen’s inequality, and the last from kei (k)k ≤ emax i . 8 (19) 4. Event-based state estimation with multiple agents We extend the ideas of the previous section to the general multi-agent case in Problem 1. While the assumption of perfect communication (Assumption 2) may possibly be realizable for few agents, it becomes unrealistic as the number of agents increases. Thus, we generalize the stability analysis to the case where agents’ estimates can differ. 4.1. Architecture We propose the distributed event-based architecture depicted in Fig. 2(b) for the multi-agent problem. Adopting the key idea of the single agent case (cf. Fig. 2(a)), each agent implements a copy of the state estimator for making transmit decisions. The common bus network ensures that, if a measurement is transmitted, it is broadcast to all other units. For the estimators to be consistent, the sensor agents also listen to the measurement data Y(k) broadcast by other units. The proposed EBSE scheme is distributed in the sense that data from distributed sensors is required for stable state estimation, and that transmit decisions are made locally by each agent. 4.2. Event trigger In analogy to the single agent case (12), each agent i, i ∈ NNsen , uses the following event triggering rule: transmit yi (k) ⇔ kyi (k) − Ci x̂i (k|k − 1)k ≥ δiest . (20) The prediction ŷi (k) = Ci x̂i (k|k−1) computed by agent i is representative also for all other agents’ predictions of the same measurement, ŷij (k) = Ci x̂j (k|k −1), as long as x̂i (k|k −1) ≈ x̂j (k|k −1), which is to be established in the stability analysis below. Being able to approximately represent the other agents’ knowledge is the basis for making effective transmit decisions in the proposed approach. est For later reference, we introduce δ est := (δ1est , . . . , δN ) and the index sets of transmitting and sen not-transmitting agents: I(k) := {i ∈ NNsen | kyi (k) − Ci x̂i (k|k−1)k ≥ δiest } I c (k) := {i ∈ NNsen | kyi (k) − Ci x̂i (k|k−1)k < δiest } = NNsen \ I(k). 4.3. (21) (22) State estimator Extending the event-based estimator (10), (11) to the multi sensor case, we propose the following estimator update for all agents (i ∈ NN ): x̂i (k|k − 1) = Ax̂i (k − 1|k − 1) + Bu(k − 1) X  x̂i (k|k) = x̂i (k|k − 1) + L` y` (k) − C` x̂i (k|k − 1) (23) (24) `∈I(k) where L` ∈ Rn×p` is the submatrix of the centralized gain L = [L1 , L2 , . . . , LNsen ] corresponding to y` . Rewriting (7) as X  L` y` (k) − C` x̂c (k|k − 1) (25) x̂c (k|k) = x̂c (k|k − 1) + `∈NNsen 9 we see that (24) is the same as the centralized update, but only updating with a subset I(k) ⊂ NNsen of all measurements. If, at time k, no measurement is transmitted (i.e. I(k) = ∅), then the summation in (24) vanishes; that is, x̂i (k|k) = x̂i (k|k − 1). To account for differences in any two agents’ estimates, e.g. from unequal initialization, different computation accuracy, or imperfect communication, we introduce a generic disturbance signal di acting on each estimator (cf. Fig. 2(b)). For the stability analysis, we thus replace (24) with X  x̂i (k|k) = x̂i (k|k−1)+ L` y` (k) − C` x̂i (k|k−1) + di (k). (26) `∈I(k) The disturbances are assumed to be bounded: Assumption 3. For all i ∈ NN , kdi k∞ ≤ dmax i . This assumption is realistic, when di represent imperfect initialization or different computation accuracy, for example. Even though the assumption may not hold for modeling packet drops in general, the developed method was found to be effective also for this case in the example of Section 6.1. 4.4. Stability analysis We discuss stability of the distributed EBSE system given by the process (1), (4), the (disturbed) estimators (23), (26), and the triggering rule (20). We first consider the difference between the centralized and event-based estimate, ei (k) = x̂c (k) − x̂i (k). By straightforward manipulation using (6), (23), (25), and (26), we obtain X  X  L` y` (k) − C` x̂c (k|k−1) − L` y` (k) − C` x̂i (k|k − 1) −di (k) ei (k) = Aei (k−1) + `∈NNsen `∈I(k) | = (I − LC)Aei (k − 1) + X P {z P L` ( ... ) `∈NN sen −  L` y` (k) − C` x̂i (k|k − 1) − di (k) `∈I c (k) L` ( ... ) } (27) `∈I c (k) = (I − LC)Aei (k − 1) X X  + L` y` (k) − C` x̂` (k|k − 1) − di (k) − Lj Cj Aeij (k − 1) `∈I c (k) (28) j∈I c (k) where eij (k) := x̂i (k) − x̂j (k) is the inter-agent error, and we used x̂i (k|k − 1) − x̂` (k|k − 1) = Aei` (k −1). The error dynamics (28) P are governed by stable dynamics ei (k) = (I −LC)Aei (k −1) with three input terms. The term `∈I c (k) L` (y` (k) − C` x̂` (k|k − 1)) is analogous to the last term in (13) and bounded by the event triggering (20) (cf. (22)). The last two terms are due to the disturbance di and resulting inter-agent differences eij . To bound ei , eij must also be bounded, which is established next. 4.4.1. Inter-agent error: The inter-agent error can be written as eij (k) = x̂i (k) − x̂j (k) = Aeij (k − 1) X  + L` y` (k) − C` x̂i (k|k − 1) + di (k) `∈I(k) 10 − X `∈I(k)  L` y` (k) − C` x̂j (k|k − 1) − dj (k) = ÃI(k) eij (k − 1) + di (k) − dj (k) where ÃJ is defined for some subset J ⊆ NNsen by X ÃJ := (I − L` C` )A. (29) (30) `∈J Hence, the inter-agent error eij (k) is governed by the time-varying dynamics eij (k) = ÃI(k) eij (k − 1). Unfortunately, one cannot, in general, infer stability of the inter-agent error (and thus the eventbased estimation error (28)) from stability of the centralized design. A counterexample is presented in [4]. A sufficiency result for stability of the inter-agent error can be obtained by considering the dynamics (29) under arbitrary switching; that is, with ÃJ for all subsets J ⊆ NNsen . The following result is adapted from [27, Lemma 3.1]. Lemma 1. Let Assumption 3 hold, and let the matrix inequality ÃTJ P ÃJ − P < 0 (31) be satisfied for some positive definite P ∈ Rn×n and for all subsets J ⊆ NNsen . Then, for given initial errors eij (0) (i, j ∈ NN ), there exists emax ∈ R, emax ≥ 0, such that keij k∞ ≤ emax , for all i, j ∈ NN and the Euclidean norm k.k. (32) Proof. Under (31), the error dynamics (29) are input-to-state stable (ISS) following the proof of [27, Lemma 3.1] (Acl (J) replaced with ÃJ ). With Assumption 3, ISS guarantees boundedness of the inter-agent error eij and thus the existence of emax ij ≥ 0 (possibly dependent on the initial error eij (0)) such that keij k∞ ≤ emax (33) ij . Finally, (32) is obtained by taking the maximum over all emax ij . The stability test is conservative because the event trigger (20) will generally not permit arbitrary switching. Since J ⊆ NNsen also includes the empty set (i.e. Ã∅ = A), the test can only be used for open-loop stable dynamics (1). In Section 4.4.3, we present an alternative approach to obtained bounded eij for arbitrary systems. 4.4.2. Difference to centralized estimator: boundedness of the estimation error (28). With the preceding lemma, we can now establish Theorem 2. Let Assumptions 1 and 3 and the conditions of Lemma 1 be satisfied, and let (I − LC)A be stable. Then, the difference ei (k) between the centralized estimator and the EBSE (20), (23), (26) is bounded by  mc max kLkkδ est k + dmax + m̄N e =: emax (34) kei k∞ ≤ mc kei (0)k + sen i i 1 − ρc with mc , ρc as in (9), and m̄ := maxj∈NNsen kLj Cj Ak. 11 Proof. We can establish the following bounds (for all k) X  (22) L` y` (k) − C` x̂` (k|k − 1) ≤ kLkkδ est k (35) `∈I c (k) Ass. 3 kdi (k)k ≤ dmax i X X Lemma 1 Lj Cj Aeij (k − 1) ≤ kLj Cj Akkeij (k − 1)k ≤ m̄Nsen emax . j∈I c (k) (36) (37) j∈I c (k) The result (34) then follows from (28), stability of (I − LC)A, and [25, p. 218, Thm. 75]. 4.4.3. Synchronous estimator resets: We present a straightforward extension of the eventbased communication scheme, which guarantees stability even if the inter-agent error dynamics (29) cannot be shown to be stable (e.g., if Lemma 1 does not apply). Since the inter-agent error eij (k) is the difference between the state estimates by agent i and j, we can make it zero by resetting the two agents’ state estimates to the same value, for example, their average. Therefore, a straightforward way to guarantee bounded inter-agent errors is to periodically reset all agents’ estimates to their joint average. Clearly, this strategy increases the communication load on the network. If, however, the disturbances di are small or only occur rarely, the required resetting period can typically be large relative to the underlying sampling time Ts . We assume that the resetting happens after all agents have made their estimator updates (26). Let x̂i (k−) and x̂i (k+) denote agent i’s estimate at time k before and after resetting, and let K ∈ N be the fixed resetting period. Each agent i implements the following synchronous averaging: If k a multiple of K: transmit x̂i (k−); receive x̂j (k−), j ∈ NN \{i}; set x̂i (k+) = N X (38) x̂j (k−). j=1 We assume that the network capacity is such that the mutual exchange of the estimates can happen in one time step, and no data is lost in the transfer. In other scenarios, one could take several time steps to exchange all estimates, at the expense of a delayed reset. The synchronous averaging period K can be chosen from simulations assuming a model for the inter-agent disturbances di (e.g. packet drops). We have the following stability result for EBSE with synchronous averaging (38). Theorem 3. Let Assumptions 1 and 3 be satisfied and (I − LC)A be stable. Then, the difference ei (k) between the centralized estimator and the EBSE with synchronous averaging given by (20), (23), (26), and (38) is bounded. Proof. Since the agent error (28) is affected by the resetting (38), we first rewrite ei (k) in terms P of the average estimate x̄(k) := avg(x̂i (k)) := N1 N i=1 x̂i (k). Defining ē(k) := x̂c (k) − x̄(k) and ēi (k) := x̄(k) − x̂i (k), we have ei (k) = ē(k) + ēi (k) and will establish the claim by showing boundedness of ēi (k) and ē(k) separately. For the average estimate x̄(k), we obtain from (23), (26), x̄(k|k − 1) = Ax̄(k − 1) + Bu(k − 1) 12 x̄(k) = x̄(k|k−1) + X  ¯ L` y` (k) − C` x̄(k|k−1) + d(k) `∈I(k) ¯ := avg(di (k)). The dynamics of the error ēi (k) where x̄(k|k − 1) := avg(x̂i (k|k − 1)) and d(k) are described by ¯ − di (k) ēi (k) = ÃI(k) ēi (k − 1) + d(k) ēi (k+) = 0, for k = κK with some κ ∈ N (39) (40) where (39) is obtained by direct calculation analogous to (29), and (40) follows from (38). Since ¯ d(k), di (k), and ÃI(k) are all bounded, boundedness of ēi for all i ∈ NN follows. Since ē(k) = avgi (ei (k)), we obtain from (28) ē(k) = (I − LC)Aē(k − 1) X  ¯ + L` y` (k) − C` x̂` (k|k − 1) − d(k) `∈I c (k) − X Lj Cj Aēj (k − 1) (41) j∈I c (k) where we used avgi (eij (k)) = avgi (x̂i (k) − x̂j (k)) = x̄(k) − x̂j (k) = ēj (k). Note that (41) fully describes the evolution of ē(k). In particular, the resetting (38) does not affect ē(k) because, at k = κK, it holds N 1 X x̂j (k+) ē(k+) = x̂c (k) − N j=1 N N  1 X 1 X x̂` (k−) = x̂c (k) − N j=1 N `=1 N 1 X = x̂c (k) − x̂` (k−) = ē(k−). N `=1 (42) P All input terms in (41) are bounded: d¯ by Assumption 3, `∈I c (k) L` (y` (k) − C` x̂` (k|k − 1)) by (22), and ēj by the previous argument. The claim then follows from stability of (I − LC)A. 4.4.4. Estimation error: By means of (16) with Theorem 2 or Theorem 3, properties about the agent’s estimation error i (k) = x(k) − x̂i (k) can be derived given properties of the disturbances v, w, and the centralized estimator. For example, Corollaries 1 and 2 apply analogously also for the multi-agent case. 5. Distributed control In this section, we address Problem 2; that is, the scenario where the local estimates x̂i on the Nest estimators are used for feedback control. 13 Recall the decomposition (5) of the control input, where ui (k) is the input computed on estimator agent i + Nsen . Assume a centralized state-feedback design is given u(k) = F x(k) (43) with controller gain F ∈ Rq×n such that A + BF is stable. We propose the distributed statefeedback control law ui (k) = Fi x̂i+Nsen (k), i ∈ NNest (44) where Fi ∈ Rqi ×n is the part of the gain matrix F in (43) corresponding to the local input ui . Same as for the emulation-based estimator design in previous sections, the feedback gains do not need to be specifically designed, but can simply be taken from the centralized design (43). 5.1. Closed-loop stability analysis Using (16) and (44), the state equation (1) can be rewritten as X Bi Fi i+Nsen (k − 1) + v(k − 1) x(k) = (A + BF )x(k − 1) − (45) i∈NNest where i+Nsen (k − 1) are the estimation errors of the estimator agents (cf. Section 4.4.4). Closedloop stability can then be deduced leveraging the results of Section 4. Theorem 4. Let the assumptions of either Theorem 2 or Theorem 3 be satisfied, A+BF be stable, and v and w bounded. Then, the state of the closed-loop control system given by (1), (2), (20), (23), (26), (44), and (possibly) (38) is bounded. Proof. Since (I − LC)A is stable and v, w bounded, it follows from (8) that the estimation error c (k) of the centralized observer is also bounded. Thus, (16) and Theorem 2 or 3 imply that all i , i ∈ NN , are bounded. Hence, it follows from (45), stability of A + BF , and bounded v that x is also bounded. Satisfying Assumption 1 for the above result requires the periodic communication of all inputs over the bus. While this increases the network load, it can be a viable option if the number of inputs is comparably small. Next, we briefly present an alternative scheme, where the communication of inputs is reduced also by means of event-based protocols. 5.2. Event-based communication of inputs Each estimator agent computes ui (k) according to (44) and broadcasts an update to the other agents whenever there has been a significant change: transmit ui (k) ⇔ kui (k) − ui,last (k)k ≥ δictrl (46) where δictrl ≥ 0 is a tuning parameter, and ui,last (k) is the last input that was broadcast by agent i. Each agent i maintains an estimate ûi (k) ∈ Rq of the complete input vector u(k); agent i’s estimate of agent j’s input is ( uj (k) if (46) triggered ûij (k) = (47) i ûj (k − 1) otherwise. 14 Table 1 States and inputs of the thermo-fluid process. States x1 (k) x2 (k) x3 (k) x4 (k) Inputs u11 (k) u12 (k) u21 (k) u22 (k) level tank 1 temperature tank 1 level tank 2 temperature tank 2 inflow tank 1 cooling tank 1 inflow tank 2 heating tank 2 Unit m K m K Unit 1 (normalized) 1 (normalized) 1 (normalized) 1 (normalized) The agent then uses ûi (k − 1) = (ûi1 (k − 1), ûi2 (k − 1), . . . , ûN (k − 1)) instead of the true input u(k − 1) for the estimator update (23). Since the error ũi (k) := u(k) − ûi (k) from making this approximate update is bounded by the event trigger (46), the stability results presented in Section 4 can be extended to this case. The details are omitted, but can be found in [28]. 6. Experiments To illustrate the proposed approach for event-based state estimation, we present numerical simulations of a benchmark problem [29] and summarize experimental results from [3]. Both are examples of the multi-agent case where local estimates are used for control. 6.1. Numerical simulation of a thermo-fluid benchmark process We consider distributed event-based control of a thermo-fluid process, which has been proposed as a benchmark problem in [29, 30]. Matlab files to run the simulation example are provided as supplementary material (http://tiny.cc/DEBSEsuppl). The process has two tanks containing fluids, whose level and temperature are to be regulated by controlling the tanks’ inflows, as well as heating and cooling units. Both tanks are subject to step-like disturbances, and their dynamics are coupled through cross-flows between the tanks. Each tank is associated with a control agent responsible for computing commands to the respective actuators. Each agent can sense the temperature and level of its tank. For details on the process, refer to [29, 30]. 6.1.1. System description: The discrete-time linear model (1), (2) is obtained by zero-order hold discretization with Ts = 0.2 s of the continuous-time model given in [29, Sec. 5.8]. The process dynamics are stable. The states and inputs of the system are summarized in Table 1. Noisy state measurements y(k) = x(k) + w(k) are available, where w(k) is uniformly distributed. The numerical parameters of the model are available in the supplementary files. Similar to the distributed architecture in [30], we consider two agents (one for each tank) exchanging data with each other over a network link, see Fig. 3 (with N = 2) and Table 2 for inputs/output definitions. Each agents combines the functions of sensing, estimation, and control. 15 Table 2 Agents in the thermo-fluid example. Agent 1 measures y1 = (y11 , y12 ) (level and temperature) of its tank and is responsible for controlling u1 = (u11 , u12 ) (inflow and cooling); and Agent 2 accordingly. Agent # Actuator Sensors Dynamic system u1 1 2 u1 = (u11 , u12 ) u2 = (u21 , u22 ) y1 = (y11 , y12 ) y2 = (y21 , y22 ) Agent 1 Control d1 (state x) Event Trigger State Estimator Y(k) y1 Common bus network uN Agent N Control dN Event Trigger State Estimator Y(k) yN Fig. 3. Distributed, event-based control architecture in the experiments of Section 6. N spatially distributed agents observe and control a dynamic system and exchange data with each other via a common bus. Compared to Fig. 2(b), the agents combine the functions of sensing/triggering, estimation, and additionally feedback control. The State Estimator serves both for making the triggering decision and for feedback control. To save computational resources, an agent runs a single estimator and uses it for both event triggering (20) and feedback control (44) (see [6] for an alternative architecture with two estimators). In order to study the effect of imperfect communication, we simulate random packet drops such that a transmitted measurement yi (k) is lost with probability 0.05, independent of previous drops. Packet drops can be represented by the disturbance di (k) in (26) as follows: if y` (k), ` ∈ I(k) is a measurement not received at agent i, then di (k) = −L` (y` (k) − C` x̂i (k|k − 1)) accounts for the lost packet. For simplicity, we assume that communicated inputs are never lost. 6.1.2. Event-based design: Each agent implements the event triggers (20) and (46), the estimator (23), (24), and the distributed control (44). Triggering decisions are made individually for the two sensors of each agent, but jointly for both inputs (cf. Table 2). For the design of the centralized observer (6), (7), we chose L = diag(0.1, 0.05, 0.1, 0.05) as observer gain, leading to stable (I − LC)A. For this design, the inter-agent error dynamics (29) are also stable: by direct calculation, one can verify that (31) is satisfied with P = diag(500, 1, 500, 1) for all subsets J ⊆ {1, 2, 3, 4} (cf. supplementary material). Lemma 1 thus guarantees that (29) is stable, and synchronous resetting (38) not necessary. The state-feedback gain F is obtained from an LQR design, which involves full couplings between all states in contrast to the decentralized design in [30]. The triggering thresholds are set 16 Level x1 (m) 0.02 0 Temp. x2 (K) −0.02 500 1000 1500 2000 0 500 1000 1500 2000 0 500 1000 1500 2000 0 500 1000 Time (s) 1500 2000 1 0.5 0 −0.5 Level x3 (m) 0 1.5 0.02 0 Temp. x4 (K) −0.02 1.5 1 0.5 0 −0.5 Fig. 4. State trajectories for the thermo-fluid simulation example. Black (dashed): the actual states x; black (solid): event-based estimate x̂1 by Agent 1; gray: centralized estimate x̂c . The centralized estimate is shown for comparison and not available on any of the agents. The gray shaded areas indicate periods where step-wise process disturbances are active. est est est est = 0.2 K, and δ1ctrl = δ2ctrl = 0.02. = δ22 = 0.01 m, δ12 = δ21 to δ11 6.1.3. Simulation results: The state trajectories of a 2000 s simulation run under event-based communication are shown in Fig. 4. Step-wise disturbances v (gray shaded areas) with comparable magnitudes as in [30] cause the states to deviate from zero. Especially at times when disturbances are active, the event-based estimate is slightly inferior to the centralized one, as is expected due to the reduced number of measurements. The average communication rates for event-based input and sensor transmissions are given in Fig. 5. Clearly, communication rates increase in the periods where the disturbances are active, albeit not the same for all sensors and inputs. At times when there is no disturbance, communication rates are very low. Figure 6 shows the inter-agent error e12 . Jumps in the error signals are caused by dropped packets, with decay afterward due to stable dynamics (29). 6.2. Experiments on the Balancing Cube The proposed emulation-based approach to event-based estimation was applied in [3] for stabilizing the Balancing Cube [31] (see Fig. 7). In this section, we summarize the main results from the experimental study reported in [3]. For details, we refer to these citations. 17 Comm. Agent 1 Comm. Agent 2 0.4 0.2 0 0 500 1000 1500 2000 0 500 1000 Time (s) 1500 2000 0.4 0.2 0 ×10−5 0 −10 −20 0 500 1000 1500 2000 0 ×10−4 500 1000 1500 2000 500 1000 1500 2000 500 1000 Time (s) 1500 2000 0.04 0.02 0 0 −10 −20 Temp. e12,4 (K) Level e12,3 (m) Temp. e12,2 (K) Level e12,1 (m) Fig. 5. Event-based communication rates for the thermo-fluid simulation example: communication of level measurements y11 and y21 in black (dotted), for temperature measurements y12 and y22 in black (solid), and for the inputs u1 and u2 in gray. Communication rates are computed as the moving average over 100 steps (0.0 meaning no communication and 1.0 full communication). 0 ×10−3 20 10 0 0 Fig. 6. Inter-agent error e12 for the thermo-fluid example. Jumps in error are caused by packet drops, and the decay afterward is due to stable inter-agent dynamics (29) as ensured by Lemma 1. 18 Fig. 7. The Balancing Cube [31] can balance autonomously one any one of its corners or edges. Six rotating arms, which constitute the control agents, collaboratively keep the system in balance. Here, the cube is shown while balancing on an edge, which was the configuration used for the experiments in [3]. (Photo: Carolina Flores, IDSC, ETH Zurich; c 2012 IEEE. Reprinted, with permission, from [31].) 6.2.1. System description: The cube is stabilized through six rotating arms on its rigid structure (see Fig. 7). Each arm constitutes a control agent equipped with sensors (angle encoder and rate gyroscopes), a DC motor, and a computer. The computers are connected over a CAN bus, which supports the exchange of sensor data between all agents (including the worst case of all agents communicating within one sampling time Ts = 1/60 s). Each agent thus combines the functions sensing, triggering, estimation, and control as in Fig. 3 (N = 6). 6.2.2. Event-based design: A model (1), (2) representing linearized dynamics about the equilibrium configuration shown in Fig. 7 is used for designing the centralized observer (6), (7) (as a steady-state Kalman filter) and the controller (43) (linear quadratic regulator). Each agent makes individual triggering decisions for its angle sensor and for its rate gyroscope with thresholds δ ang = 0.008 rad and δ gyro = 0.004 rad/s, respectively. In the experiments, control inputs ui were communicated periodically between all agents. Synchronous resetting (38) was not applied, even though stability of the inter-agent error (29) cannot be shown using Lemma 1 because of unstable open-loop dynamics. Despite the absence of a formal proof, the system was found to be stable in balancing experiments. 6.2.3. Experimental results: Figure 8 shows typical communication rates for some sensors during balancing. The desired behavior of event-based communication is well visible: feedback happens only when necessary (e.g. instability or disturbances). Overall, the network traffic could be reduced by about 78% at only a mild decrease in estimation performance. 7. Concluding remarks Simplicity of design and implementation are key features of the emulation-based approach to event-based state estimation developed herein. The approach directly builds on a classic centralized, linear, discrete-time state observer design. Essentially, only the even triggers (20) and 19 0.15 Gyro Sensor Comm. Angle Sensor Comm. 0.2 Agent 1 Agent 2 Agent 4 0.1 0.05 0 0 5 10 0 5 10 15 20 25 30 15 20 25 30 0.6 0.5 0.4 0.3 0.2 Time (s) Fig. 8. Experimental communication rates on the Balancing Cube (reproduced from [3]). The communication rates (between 0 and 1) are computed as moving average over the last 100 time steps. The rate gyroscopes generally transmit at higher rates than the angle sensors since they observe the unstable mode of the system. The angle measurements can be predicted well from the process model; thus only little communication is necessary (e.g. Agent 4 does not transmit over 30 s). Caused by an external disturbance applied at 10 s on Agent 1 (pushing the arm), the communication rate of Agent 1 goes up temporarily. (46), and (for some problems) synchronous resetting (38) must be added. The estimator structure, as well as the transmitted quantities remain unchanged, and no redesign of gains is necessary. The performance of the periodic design can be recovered by choosing small enough triggering thresholds, which simplifies tuning in practice. Thus, implementation of the event-based system requires minimal extra effort, and virtually no additional design knowledge. With the proposed event-based method, the average communication load in a networked control system can be significantly reduced, as demonstrated in the simulations and experiment in this article. 8. Acknowledgment This work was supported in part by the Swiss National Science Foundation, the Max Planck Society, and the Max Planck ETH Center for Learning Systems. 9. References [1] Lemmon, M. ‘Event-triggered feedback in control, estimation, and optimization’. In: Networked Control Systems. (Springer, 2010. pp. 293–358 [2] Lunze, J. ‘Event-based control: Introduction and survey’. In: Event-based Control and Signal Processing. (CRC Press, 2016. pp. 3–20 [3] Trimpe, S. ‘Event-based state estimation with switching static-gain observers’. In: IFAC Workshop on Distributed Estimation and Control in Networked Systems. (Santa Barbara, USA, 2012. pp. 91–96 [4] Trimpe, S. ‘Stability analysis of distributed event-based state estimation’. In: IEEE Conference on Decision and Control. (Los Angeles, USA, 2014. pp. 2013–2019 20 [5] Miskowicz, M.: ‘Send-on-delta concept: an event-based data reporting strategy’, Sensors, 2006, 6, (1), pp. 49–63 [6] Trimpe, S., D’Andrea, R. ‘An experimental demonstration of a distributed and event-based state estimation algorithm’. In: IFAC World Congress. (Milan, Italy, 2011. pp. 8811–8818 [7] Wu, J., Jia, Q.S., Johansson, K.H., Shi, L.: ‘Event-based sensor data scheduling: Trade-off between communication rate and estimation quality’, IEEE Transactions on Automatic Control, 2013, 58, (4), pp. 1041–1046 [8] Trimpe, S., D’Andrea, R.: ‘Event-based state estimation with variance-based triggering’, IEEE Transaction on Automatic Control, 2014, 59, (12), pp. 3266–3281 [9] Marck, J.W., Sijs, J. ‘Relevant sampling applied to event-based state-estimation’. In: Int. Conf. on Sensor Technologies and Applications. (Venice, Italy, 2010. pp. 618–624 [10] Trimpe, S., Campi, M. ‘On the choice of the event trigger in event-based estimation’. In: Int. Conf. on Event-based Control, Communication, and Signal Processing. (Krakow, Poland, 2015. pp. 1–8 [11] Sijs, J., Lazar, M.: ‘Event based state estimation with time synchronous updates’, IEEE Transactions on Automatic Control, 2012, 57, (10), pp. 2650–2655 [12] Sijs, J., Noack, B., Hanebeck, U.D. ‘Event-based state estimation with negative information’. In: Int. Conf. on Information Fusion. (Istanbul, Turkey, 2013. pp. 2192–2199 [13] Shi, D., Chen, T., Shi, L.: ‘On set-valued Kalman filtering and its application to event-based state estimation’, IEEE Transactions on Automatic Control, 2015, 60, (5), pp. 1275–1290 [14] Yook, J.K., Tilbury, D.M., Soparkar, N.R.: ‘Trading computation for bandwidth: reducing communication in distributed control systems using state estimators’, IEEE Transactions on Control Systems Technology, 2002, 10, (4), pp. 503–518 [15] Battistelli, G., Benavoli, A., Chisci, L.: ‘Data-driven communication for state estimation with sensor networks’, Automatica, 2012, 48, (5), pp. 926–935 [16] Shi, D., Chen, T., Shi, L.: ‘An event-triggered approach to state estimation with multiple point- and set-valued measurements’, Automatica, 2014, 50, (6), pp. 1641–1648 [17] Yan, L., Zhang, X., Zhang, Z., Yang, Y.: ‘Distributed state estimation in sensor networks with event-triggered communication’, Nonlinear Dynamics, 2014, 76, pp. 169–181 [18] Liu, Q., Wang, Z., He, X., Zhou, D.H.: ‘Event-based recursive distributed filtering over wireless sensor networks’, IEEE Transactions on Automatic Control, 2015, 60, (9), pp. 2470–2475 [19] Weerakkody, S., Mo, Y., Sinopoli, B., et al.: ‘Multi-sensor scheduling for state estimation with event-based, stochastic triggers’, IEEE Transactions on Automatic Control, 2016, 61, (9), pp. 2695–2701 [20] Wang, X., Lemmon, M.D.: ‘Event-triggering in distributed networked control systems’, IEEE Transactions on Automatic Control, 2011, 56, (3), pp. 586–601 [21] Mazo Jr, M., Tabuada, P.: ‘Decentralized event-triggered control over wireless sensor/actuator networks’, IEEE Transactions on Automatic Control, 2011, 56, (10), pp. 2456–2461 [22] Bernstein, D.S.: ‘Matrix mathematics’. (Princeton University Press, 2005) [23] Thomesse, J.P.: ‘Fieldbus technology in industrial automation’, Proceedings of the IEEE, 2005, 93, (6), pp. 1073–1101 [24] Ferrari, F., Zimmerling, M., Mottola, L., Thiele, L. ‘Low-power wireless bus’. In: ACM Conference on Embedded Network Sensor Systems. (Toronto, Canada, 2012. pp. 1–14 [25] Callier, F.M., Desoer, C.A.: ‘Linear System Theory’. (Springer, 1991) [26] Böker, G., Lunze, J.: ‘Stability and performance of switching Kalman filters’, International Journal of Control, 2002, 75, (16/17), pp. 1269–1281 [27] Muehlebach, M., Trimpe, S. ‘LMI-based synthesis for distributed event-based state estimation’. In: American Control Conference. (Chicago, USA, 2015. pp. 4060–4067 [28] Trimpe, S.: ‘Distributed event-based state estimation’, Technical Report, 2015, arXiv:1511.05223. Available from: http: //arxiv.org/abs/1511.05223 [29] Grüne, L., Hirche, S., Junge, O., et al. ‘Event-based control’. In: Control Theory of Digitally Networked Dynamic Systems. (Springer, 2014. pp. 169–261 [30] Sigurani, M., Stöcker, C., Grüne, L., Lunze, J.: ‘Experimental evaluation of two complementary decentralized event-based control methods’, Control Engineering Practice, 2015, 35, pp. 22–34 [31] Trimpe, S., D’Andrea, R.: ‘The Balancing Cube: A dynamic sculpture as test bed for distributed estimation and control’, IEEE Control Systems Magazine, 2012, 32, (6), pp. 48–75 21
3cs.SY
arXiv:1409.0121v4 [cs.IT] 31 Aug 2017 On Solving A Generalized Chinese Remainder Theorem in the Presence of Remainder Errors Guangwu Xu∗ Abstract In estimating frequencies given that the signal waveforms are undersampled multiple times, Xia et. al. proposed to use a generalized version of Chinese remainder Theorem (CRT), where the moduli are M1 , M2 , · · · , Mk which are not necessarily pairwise coprime. If the errors of the corrupted remainders are within gcd(Mi , Mj ) , their schemes can be used to construct an approximaτ = max min 1≤i≤k 1≤j≤k 4 j6=i tion of the solution to the generalized CRT with an error smaller than τ . Accurately finding the quotients is a critical ingredient in their approach. In this paper, we shall start with a faithful historical account of the generalized CRT. We then present two treatments of the problem of solving generalized CRT with erroneous remainders. The first treatment follows the route of Wang and Xia to find the quotients, but with a simplified process. The second treatment considers a simplified model of generalized CRT and takes a different approach by working on the corrupted remainders directly. This approach also reveals some useful information about the remainders by inspecting extreme values of the erroneous remainders modulo 4τ . Both of our treatments produce efficient algorithms with essentially optimal performance. Finally, this paper constructs a counterexample to prove the sharpness of the error bound τ . Keywords: Chinese Remainder Theorem, remainder errors, reconstruction, sharp bound Department of EE & CS, University of Wisconsin-Milwaukee, Milwaukee, WI 53211, USA; e-mail: [email protected]. Research supported in part by the National 973 Project of China (No. 2013CB834205). ∗ 1 1 Introduction The usual Chinese Remainder Theorem (CRT) concerns reconstructing an integer given its remainders with respect to a set of coprime moduli. More precisely, let M = {m1 , m2 , . . . , mk } k Y be a set of pairwise coprime positive integers and M = mi . For a set of integers r1 , r2 , . . . , rk with 0 ≤ ri < mi , the Chinese congruences   x ≡ r1    x ≡ r2  ···    x≡r k i=1 Remainder Theorem says that the system of (mod m1 ) (mod m2 ) (1) (mod mk ) has a unique solution 0 ≤ x < M. In fact, using the extended Euclidean algorithm (Aryabhattiya algorithm), one finds integers u1, u2 , · · · , uk such that k X ui i=1 M = 1. mi This implies that for any integer N, we have N = (2) k X Nui i=1 (mod mi ) for i = 1, 2, · · · , k, then N= k X i=1 ri u i M mi (mod M) M . In particular, if N ≡ ri mi (3) i.e., the right hand side gives us the desired solution. For a greater efficiency, one can also use a randomized algorithm by Cooperman, Feisel, von zur Gathen, and Havasin in [1] to get the coefficients {ui : i = 1, · · · , k} of (2), see [2] for a concrete description. The Chinese Remainder Theorem is a classical tool that is of both theoretical and practical interests. A solution of the number theoretic version of CRT was given by Jiushao Qin (aka Ch’in Chiu-shao) [6] under the name of “method of DaiYan aggregation”. The key subroutine in this method is the “method of DaYan deriving one” (which is exactly the method of finding modulo inverse). We would like to remark that the CRT discussed in [6] is actually in a general form, namely, the moduli are not assumed to be pairwise coprime ( and the book did describe a way of reducing the general case to the case of pairwise coprime moduli ), see also [5, 8, 15]. A form that is similar to (2) was discussed in [6] as well. It is also interesting to note that the proof of the ring theoretic version of CRT (which contains the finite discrete Fourier transform as a special case) uses the similar idea as that from [6]. 2 One of the natural applications of CRT is in parallel computing, as CRT can be interpreted as an isomorphism between a ring (of bigger size) and a direct product of rings (of smaller sizes). Since arithmetic operations on those smaller rings are closed and independent, an operation in the bigger ring may be decomposed into operations in those smaller rings in parallel [2, 14]. Applications of CRT in fast computation can be found in cryptography [7], e.g., fast decryption in RSA, solving the discrete logarithm with a composite modulus, and the fast point counting method for elliptic curves . In a series of work by Xia and his collaborators, a generalized CRT (the so called Robust CRT) has been used to solve problems of estimating frequencies given that the signal waveforms are undersampled multiple times, [3, 9, 12]. For example, in [9], Wang and Xia discussed the following form of CRT, which is to construct an approximation to the solution of the system of congruences   x ≡ r1 (mod dm1 )    x ≡ r2 (mod dm2 ) (4)  ···    x ≡ r (mod dm ) k k given that the remainders are corrupted. They design a nice scheme to solve the problem by i first finding the quotients qi = x−r . They proved that if the remainder errors are bounded mi d by 4 , the quotients can be computed exactly. Recently, Xiao, Xia and Wang [13] proposed a new robust CRT that accommodates more general situation where the great common divisors of the pairs of moduli {M1 , M2 , · · · , Mk } are not necessarily the same. In the case, gcd(Mi , Mj ) . We note that the multi-stage the error bound is changed to τ = max min 1≤i≤k 1≤j≤k 4 j6=i use of robust CRT proposed in [13] provides an interesting way of lifting some restriction on error bound. In this paper, we shall start with a faithful interpretation of the work of Qin [6] concerning CRT. In our discussion of “method of DaYan aggregation”, we will describe an exact translation of Qin’s “method of DaYan deriving one” into using modern pseudo-code [15]. Compared with those appeared in literature, our description reflected Qin’s original idea. The second part of the paper studies the problem of recovering solution of generalized CRT under the presence of noisy remainders by giving alternative solutions and more efficient computational procedures. We shall mainly work with the simple model (4), as the general case can be dealt with essentially by one of the approaches in our discussion. We present two treatments to solve this problem. The first treatment follows the route of Wang and Xia to find the quotients, but with a simplified process. The second treatment takes a different approach by working on the corrupted remainders directly. This approach also reveals some useful information about the remainders by inspecting extreme values of the erroneous remainders modulo d. The technical difficulties mentioned in [9] have been successfully avoided by the method proposed in our second treatment. Both of our treatments produce efficient algorithms that invoke CRT only once, and they are essentially optimal 3 in this sense. We remark that our first treatment can handle the case with more general moduli. It is a natural question to ask whether the remainder error bound d4 is sharp. We provide an affirmative answer to this question by constructing a simple counterexample. The rest of our discussion will be divided into three sections. After introducing Qin’s “DaYan aggregation” method with some discussions and comments in Section 2, the Section 3 describes the problem setup and provides solutions. Section 4 is the conclusion. 2 On Qin’s methods of “DaYan Aggregation” and “DaYan Deriving One” In his book “The Mathematical Treatise in Nine Sections” [6] (published in 1247), Qin described “DaYan aggregation” method which is a generalized version of the Chinese Remainder Theorem. This method is aimed at solving system of congruence equations of the following form   x ≡ r1 (mod M1 )    x ≡ r2 (mod M2 ) (5)  ···    x ≡ r (mod M ) k k without assuming that the moduli are pairwise coprime, but requiring gcd(Mi , Mj )|ri − rj . Qin’s outlined an efficient procedure that reduces (5) to the following form (the usual Chinese remainder representation):   x ≡ r1 (mod c1 )    x ≡ r2 (mod c2 ) (6)  ···    x ≡ r (mod c ) k k with a suitable set {c1 , c2 , · · · , ck } of pairwise coprime positive integers such that ci |Mi and lcm(M1 , M2 , · · · , Mk ) = c1 c1 · · · ck . The main technical component of “DaYan aggregation” is “DaYan deriving one”, which is Qin’s method of computing modulo inverse: given positive integers m > a > 1, compute a−1 (mod m). The “DaYan deriving one” states (see also [4] 1 ): 1 The interpretation from [4] (page 331) contains some error. 4 DaYan deriving one: • Set up the number a at the right hand above, the number m at the right hand below. Set 1 at the left hand above. • First divide the ‘right below’ by the ‘right above’, and the quotient obtained, multiply it by the 1 of ‘left above’ and add it to ‘left below’. • After this, in the ‘upper’ and ‘lower’ of the right column, divide larger number by smaller one. Transmit and divide them by each other. Next bring over the quotient obtained and [cross-] multiply with each other. Add the ‘upper’ and the ‘lower’ of the left column. • One has to go until the last remainder of the ‘right above’ is 1 and then one can stop. Then you examine the result of ‘left above’; take it as the modulo inverse. This ancient procedure is very close toa modern pseudo-code. It keepsa state of  left-above righ-above x11 x12 four variables in a form of 2 × 2 matrix: , left-below right-below x21 x22   1 a and the initial state is . Then the procedure executes steps which are exactly a 0 m while-loop. The termination condition of the while-loop is “until the last remainder of the ‘right above’ is 1”. This termination condition seems not to have been interpreted correctly (see several papers in [11]). In literature, the usual (positive) integer division   c c= d+r d is used and the remainder r is the least nonnegative residue modulo b, i.e., 0 ≤ r < b. With this division, it may happen that ‘right below’ becomes 1 first which makes “until the last remainder of the ‘right above’ is 1” (i.e. x21 = 1) to be unachievable. The existing research papers from [11] and the book [4] suggested that one should modify Qin’s procedure when x22 = 1 is seen, in order to make x21 = 1. However, we believe that Qin made no mistake in his termination condition, namely, after an even number of steps (this is another interesting fact of Qin’s design), x21 = 1 can always be achieved. In [15], a detailed explanation has been given. We shall make a brief account here: in ancient China, another form of division could be used. Such a setting takes the remainder to be the least positive residue modulo the divisor. As an example, a divination method using “I Ching” (Book of Change, 1000-400 BC) is to generate a hexagram by the manipulation of 5 50 yarrow stalks. In this process, division by 4 is used and the remainder must belong to {1, 2, 3, 4}. It should be noted that Qin also described this divination method in his book [6]. This division can be expressed as: for positive integers c and d, there is a unique r with 1 ≤ r ≤ d, such that   c−1 c= d + r. d The remainder r is the least positive residue modulo d. This sort of division is also mentioned in [10]. This kind of division enables us to formulate Qin’s algorithm in modern language which is faithful to his original idea; in particular, x21 = 1 can always be achieved [15]. Qin’s Algorithm: DaYan Deriving One Input: a, m with 1 < a < m, gcd(a, m) = 1, Output: positive integer u such ua ≡ 1 (mod m).     1 a x11 x12 ; ← 0 m x21 x22 while (x12 > 1) do if ( x22 > x12 ) −1 q ← ⌊ x22 ⌋; x12 r ← x22 − qx12 ; x21 ← qx11 + x21 ; x22 ← r; if ( x12 > x22 ) −1 ⌋; q ← ⌊ x12 x22 r ← x12 − qx22 ; x11 ← qx21 + x11 ; x12 ← r; u ← x11 ; We have the following remarks on this formulation of Qin’s algorithm. 1. Notice that when x22 > x12 , the variable x12 will not be updated. As we start with m > a, the value of x12 can only be updated at an even numbered step. In particular, we see a very interesting fact: x12 = 1 will be reached in an even number of steps. 2. If at an odd numbered step, x22 = 1, then x12 > x22 must hold. In this case q = x12 − 1, r = 1. So the next step gives x12 = 1. 3. Set v = − ua−1 , we get the Bézout identity: ua + vm = 1. m 6 4. Another important observation of Qin’s algorithm is that the permanent of the state   x11 x12 is an invariant: x21 x22 x11 x22 + x12 x21 = m. Qin used his method of “DaYan deriving one” to solve the generalized CRT (5). We would like to remark that Qin paid a special attention to the following relation −1 k  X M i=1 ci (mod ci )  M = 1 + gM, ci (7) where M = c1 · · · ck and g is a positive integer. This also leads to a direct formula of CRT as that we did in (3). 3 Problem Setup and Solutions Our discussion will be mainly for the simple model (4). Namely, we will discuss solving the problem of following generalized CRT   x ≡ r1 (mod dm1 )    x ≡ r2 (mod dm2 ) (8)  ···    x ≡ r (mod dm ) k k in the presence of remainder errors. We will give two different solutions to the problem, and one of them can be easily adopted to dealing with the general case. It is clear that when d > 1, the existence of a solution 0 ≤ x < dM is equivalent to ri − rj ≡ 0 (mod d) for all i, j. Moreover, as mentioned in [9] the solution N of (4) satisfies N = dN0 + a (9) where a = r1 (mod d) and 0 ≤ N0 < M is the solution of the CRT system   y ≡ γ1 (mod m1 )    y ≡ γ2 (mod m2 )  ···    y ≡ γ (mod m ) k k where γi = ri −a , d i = 1, 2, · · · , k. 7 As discussed at the beginning, the solution of (8) can also be written as N= k X i=1 k Y k X ri u i M mi (mod dM), M = 1 is the relation (2). However, the solution of the mi i=1 i=1 form (9) is of certain interest because it reveals the fact that the parameter d introduces redundancy. Small changes of ri ’s will not affect the integral part of rid−a for most cases. It is noted that a is another important parameter, and prior knowledge or estimation of this number may be useful in getting a better approximation of N. We shall call a = r1 (mod d)2 the common remainder modulo d. where M = mi and ui Given a corrupt set of remainders r1 , · · · , rk 3 with errors ∆ri = ri − ri , our task is to find a good approximation N to the solution N of (8). We shall assume |∆ri | < d4 for all i = 1, 2, · · · , k. 3.1 Reconstruction by finding the quotients A nice observation by Wang and Xia [9] is that if |∆ri | < d4 for all i = 1, · · · , k, then one is able to reconstruct an approximation N of the solution N such that d |N − N | < . 4   N N − ri The interesting strategy used in [9] is to consider the quotients qi = = and mi mi prove that they are invariants when the remainder errors are bounded by d4 . The procedure in [9] is summarized as Table 1: Algorithm of [9] Step 1. For each i = 2, · · · , k find Γi,1 = m−1 i (mod m1 ); 1 compute ξ i,1 = ri −r Γi,1 (mod mi ). d Step 2. Use CRT to find the solution q 1 : Continued on next page 2 Throughout this paper, the expression g = h (mod m) means that g is the least nonnegative remainder of h modulo m, i.e., m|(g − h) and 0 ≤ g < m. 3 We assume that each of these observed remainder satisfies 0 ≤ r i < dmi . Otherwise, errors can be reduced by simply setting r i = dmi − 1 ( or r i = 0) if ri ≥ dmi ( or r i < 0). 8 Table 1 – Continued from previous page   q 1 ≡ ξ 2,1 (mod m2 ) ···  q 1 ≡ ξ k,1 (mod mk ) Step 3. For each i = 2,· · · , k 1 q 1 mi − ri −r d qi = . mi Step 4. For each i = 1, 2, · · · , k compute N(i) dmi + r ii; h = Pk 1 Compute N = k i=1 N(i) . Here [x] denotes the rounding integer, i.e., x − 1 2 ≤ [x] < x + 21 .   ri −r1 1 Remark. Under the conditions |∆ri | < d4 , one has ri −r = d and hence q i = qi . It is d also remarked that the computation in step 1 is equivalent to an invocation of CRT. Thus, the above algorithm uses two invocations of solving CRT. The main purpose of this subsection is to present a concise approach to this problem. N −r M . From (2) ( For each 1 ≤ j ≤ k, recall that the quotient qj is qj = dmjj . Denote Mj = m j Pk M i.e., i=1 ui mi = 1 ), we have k qj = qj u1 X ri − rj M M M + · · · + qj uk ≡ ui m1 mk d mi mj i=1 (mod M) i6=j = k X i=1 ri − rj Mj ui d mi (mod Mj ). (10) i6=j Note that qj can be uniquely specified because 0 ≤ qj < Mj . Since  ri −r1  d = ri −r1 d for i = 2, · · · , k, the following is true by (10) q1 = q 1 =  k  X ri − r 1 i=2 d ui Mj mi (mod M1 ). Therefore, we get the following procedure by replacing steps 1 and 2 of the algorithm in [9] with the above discussion. 9 Table 2: Algorithm 1 Step 1. Use the extended Euclidean algorithm to get ui such that k X M = 1. ui mi i=1 Step 2. Compute q 1 :  k  X ri − r 1 M1 ui (mod M1 ) q1 = d mi i=2 Step 3. For each i = 2, · · · , k 1 q 1 m1 − ri −r d qi = . mi Step 4. For each i = 1, 2, · · · , k compute N (i) q i dmi + ir i ; h = Pk 1 Compute N = k i=1 N (i) . Remark. 1. Steps 1 and 2 are equivalent to an invocation of CRT. In step 3, qi may be computed via (10). One computation of CRT is saved compared to the corresponding algorithm of [9]. Remark. 2. Recently Xiao, Xia, and Wang [13] extended the problem to approximate the solution N of the general Chinese remainder system (5):   x ≡ r1 (mod M1 )    x ≡ r2 (mod M2 )  ···    x ≡ r (mod M ) k k from erroneous remainders r 1 , · · · , rk . Where dij = gcd(Mi , Mj ) can be arbitrary, and dij . Notice that (5) has a solution the remainder errors are bounded by τ = max min 1≤i≤k 1≤j≤k 4 j6=i if and only if dij |ri − rj for all i, j. We remark that the procedure we just described can d be adopted to this problem without much difficulty. In fact, assuming τ = min2≤j≤k 41j without loss of generality, we can recover the quotient q1 = NM−r1 1 . To this end, we let M M M = lcm{M1 , · · · , Mk }. Since gcd( M ,··· , M ) = 1, we get integers v1 , · · · , vk such that 1 k k k X X M M = 1. This yields q1 vi = q1 . A routine manipulation gives vi Mi Mi i=1 i=1 q1 = rk − r1 d1k M r2 − r1 d12 M v2 +···+ vk d12 M1 M2 d12 M1 Mk 10 (mod M ). M1 r −r Since jd1j 1 = remainders. 3.2 h rj −r 1 d1j i for j = 2, · · · , k, q1 can be computed exactly from the corrupted Extreme values of the erroneous remainders modulo d In this subsection, we will take a different approach to solve the problem under the simple model (8). We will use corrupted remainders directly in solving CRT. The main points we would like to make include 1. The extreme values such as max{ri (mod d)} and min{r i (mod d)} should be inspected to reveal useful information about the errors. 2. The common remainder a maybe shifted so that more accurate estimation can be made. 3. The ideas developed in this subsection naturally lead to a proof of the sharpness of the error bound. Let a = r1 (mod d) be the common remainder of r1 , · · · , rk modulo d. We define α = max{ri (mod d) : i = 1, 2, · · · , k} β = min{ri (mod d) : i = 1, 2, · · · , k} µ = min{ri (mod d) : r i ν = max{r i (mod d) : r i d (mod d) > } 2 d (mod d) < } 2 The numbers µ, ν are defined only when the corresponding sets are nonempty. Since |∆ri | < cases: d 4 for all i = 1, 2, · · · , k, we have the following five mutually exclusive (a) For all i = 1, 2, · · · , k, a + ∆ri < 0. In this case, α − β < d4 . We also have a < d4 . (b) For all i = 1, 2, · · · , k, a + ∆ri ≥ d. In this case, α − β < d4 . (c) For all i = 1, 2, · · · , k, 0 ≤ a + ∆ri < d. In this case, α − β < d2 . 11 (d) There are i1 and j1 such that a + ∆ri1 < 0 and a + ∆rj1 ≥ 0. In this case, we must have a < d4 , α − β ≥ µ − ν > d2 (e) There are i1 and j1 such that a + ∆ri1 < d and a + ∆rj1 ≥ d. In this case, α − β ≥ µ − ν > d2 . We also have a > 3d 4 We note that even though these five cases cannot be checked individually (due to the unknown parameters ∆ri and a), we can still divide them into two verifiable situations. In fact, it is easy to see that the condition α − β < d2 covers cases (a), (b) and (c), while the condition α − β > d2 covers cases (d) and (e). We shall first get good approximations of γi = Proposition 1 For i = 1, 2, · · · , k, set   ri  γ i =  rdi +d−µ  d ri −a d based on these conditions. if α − β < d2 , if α − β ≥ d2 . Then we have 1. For case (a), γ i = γi − 1 holds for all i = 1, 2, · · · , k. 2. For cases (c) and (d), γ i = γi holds for all i = 1, 2, · · · , k. 3. For cases (b) and (e), γ i = γi + 1 holds for all i = 1, 2, · · · , k. Proof. The verification is fairly straightforward. We just consider the cases (b) and (e) here. We recall that ri = γi d + a. For case (b), since a + ∆ri ≥ d for all i, so     γi d + a + ∆ri ri γi = = = γi + 1. d d For case (e), we know that if r i (mod d) < d2 , then a + ∆ri ≥ d. This implies that d ≤ a + ∆ri + d − µ < 2d. If r j (mod d) ≥ d2 , then a + ∆rj < d and r j (mod d) = a + ∆rj . This, together with the minimality of µ, implies that d ≤ a + ∆rj + d − µ < 2d. 12 Therefore,    ri + d − µ γi d + a + ∆ri + d − µ = = γi + 1. γi = d d  Now let us present an algorithm to get an approximation N of N, based on the above discussion. Table 3: Algorithm 2 Step 1. Step 2. Step 3. Step 4. Compute α, β and µ / / (if µ exists ) For each i = 2, · · · , k, compute ( r  d i k if α − β < 2 , jd γi = r i +d−µ if α − β ≥ d2 . d UseCRT to find the solution N 0 :  N 0 ≡ γ 1 (mod m1 )    N ≡ γ (mod m ) 0 2 2  · · ·    N 0 ≡ γ k (mod mk ) If α − β < d2 j Pk k i=1 (r i (mod d)) N = dN 0 + k Else / / (i.e., α − β ≥ d2 ) N = dN 0 . Again, this is an efficient way of finding an approximation of N as only one CRT computation is required. What left to show is that this approximation is indeed a good one. Proposition 2 Let N be the solution of (8) and N be the output of Algorithm 2, we have d |N − N | < . 4 Proof. Let N0 be the solution of (1), then we know that N = dN0 + a. For case (a). In this case, N 0 = N0 − 1. Since all a + ∆ri < 0, we must have r i (mod d) = d + a + ∆ri and − d4 < a + ∆ri < 0. Thus $P % $P % k k (r (d + a + ∆r ) (mod d)) i i i=1 i=1 N = dN 0 + = dN0 − d + k k 13 $ Pk i=1 ∆ri k = dN0 − d + d + a + % =N+ $P k i=1 k ∆ri % . For case (b). In this case, N 0 = N0 + 1. Since all a + ∆ri ≥ 0, we must have r i (mod d) = a + ∆ri − d and 0 ≤ a + ∆ri − d < d4 . Thus $P % $P % k k (mod d)) i=1 (r i i=1 (a + ∆ri − d) N = dN 0 + = dN0 + d + k k % $P % $ Pk k i=1 ∆ri i=1 ∆ri =N+ . = dN0 + d + a − d + k k For case (c). In this case, N 0 = N0 . We know that in this case r i (mod d) = a + ∆ri , so % $P % $P k k (mod d)) (a + ∆r ) (r i i i=1 i=1 = dN0 + N = dN 0 + k k % $ % $ Pk Pk i=1 ∆ri i=1 ∆ri =N+ = dN0 + a + k k So in these three cases, |N − N | < d 4 holds. For case (d). In this case, N 0 = N0 , and N = dN0 . We know that in this case a < d4 , so d |N − N | = a < . 4 For case (e). In this case, N 0 = N0 + 1 , and N = dN0 + d. We know that in this case a > 3d , so 4 d |N − N| = d − a < . 4 3.3 The sharpness of the condition max1≤i≤k |∆ri| ≤ d 4 . In this subsection, we shall discuss some issues about the error bound. It is easy to see     that if we are given a = d2 , then the case where the error bound is as big as d2 can be handled. However, we have no prior knowledge about a in general. To the best of our knowledge, d4 is the largest error bound available in literature. It is thus interesting to ask whether the bound d4 can be improved. Recall that in our algorithm 2, we need to deal with the cases α − β < d2 and α − β > d2 differently. This is very suggestive. Pushing 14 this consideration further, we see that if an error is at least d4 in magnitude, then such distinction is no longer available. In fact, we are able to show that the bound d4 cannot be improved in general (i.e., it is a sharp bound) by the following simple counterexample. Example. Let p, q be distinct primes, and d be a positive integer divisible by 4. We consider solving the system of congruence equations  x ≡ r1 (mod dp) (11) x ≡ r2 (mod dq) in the presence of remainder errors. Assume that the remainder errors are allowed to be |∆r1 | ≤ d4 and |∆r2 | ≤ d4 (these are equivalent to |∆ri | < d4 + 1). We will show that for some corrupted remainders, it is impossible determine an approximation of the true solution. To this end, suppose we have corrupted remainders 3d r 1 = d, r 2 = . 2 First, we consider the system (11) with r1 = ). We get the corresponding solution a = 3d 4 N1 = dvp + 3d , 4 r2 = 7d 4 = d+ 3d 4 (i.e., in this case 3d 4 where v = p−1 (mod q). Since r 1 = r1 + d4 , r2 = r2 − d4 , the erroneous remainders r 1 , r 2 are legitimate for this case. Next, we consider the system (11) with r1 = r2 = We get the corresponding solution N2 = 5d 4 =d+ d 4 (i.e., in this case a = d4 ). d 5d =d+ . 4 4 Since r 1 = r1 − d4 , r 2 = r2 + d4 , the erroneous remainders r1 , r2 are legitimate for this case too. If we choose p to be large, then N1 , N2 are far apart. Therefore, no approximation based on r 1 , r 2 can be close to both of them. In other words, if the error bound is bigger than d , the problem of solving (11) with erroneous remainders is not identifiable in general. We 4 also note that the equality α − β = d2 holds in both cases. 15 4 Conclusion The generalized Chinese Remainder Theorem has been used by Xia et. al. to model some signal processing problems. In this paper we fist present a faithful historical account of the work of Jiushao Qin concerning generalized CRT. Efficient procedures of constructing an approximate solution for the generalized CRT (simplified vmodel) based on corrupted remainders are proposed in this paper. These two procedures improve that of Xia et. al. in that we only need one computation of CRT. They are asymptotically optimal since at least one CRT is required. Our first procedure can be adopted to the general CRT model. The ideas in our treatment of the second procedure might be of some independent interest. We also provide a proof of the sharpness for the error bound d4 . Acknowledgement The author would like to thank Drs. Ian Blake and Kumar Murty for their constructive comments. References [1] G. Cooperman, S. Feisel, J. von zur Gathen and G. Havas, GCD of many integers (Extended abstract), COCOON’99, LNCS vol. 1627, pp. 310-317 (1999). [2] G. Davida, B. Litow , and G. Xu, Fast arithmetics using Chinese Remaindering, Information Processing Letters, 109(2009), 660-662. [3] X. W. Li, H. Liang, and X.-G. Xia, A robust Chinese Remainder Theorem with its applications in frequency estimation from undersampled waveforms, IEEE Trans. Signal Process., 57(2009), 4314-4322. [4] U. Libbrect, Chinese Mathematics in the Thirteenth Century, Dover Publications, 2005. [5] O. Ore, The general Chinese Remainder Theorem, Amer. Math. Monthly, 59(1952), 365- 370. [6] J. Qin, Mathematical Treatise in Nine Sections, 1247. [7] D. Stinson, Cryptography: Theory and Practice, CRC Press, 2006. 16 [8] D. Striuk, On ancient Chinese mathematics, Mathematics Teacher, 56 (1963), 424-31. [9] W. Wang and X.-G. Xia, A closed-form Robust Chinese Remainder Theorem and its performance analysis, IEEE Transactions on Signal Processing, 58(2010) 5655-5666. [10] X. Wang, G. Xu, M. Wang, and X. Meng, Mathematical Foundations of Public Key Cryptography, CRC Press, October 2015. [11] W. Wu (edited), Qin JiuShao and hShuShu JiuZhangi (in Chinese), Beijing Normal University Press, 1987. [12] X.-G. Xia and G. Wang, Phase unwrapping and a robust Chinese Remainder Theorem, IEEE Signal Process. Lett., 14 (2007), 247-250. [13] L. Xiao, X.-G. Xia, and G. Wang, Multi-stage robust Chinese Remainder Theorem, IEEE Transactions on Signal Processing, September, 2014. [14] G. Xu, The Computational Significance of the Chinese Remainder Theorem, Seminar talk at IAS of Tsinghua University, China, July, 2007. [15] G. Xu and B. Li, On the Algorithmic Significance and Analysis of the Method of DaYan Deriving One (Chinese), https://arxiv.org/abs/1610.01175. 17
7cs.IT
Max flow vitality in general and planar graphs arXiv:1710.01965v2 [cs.DS] 2 Nov 2017 Giorgio Ausiello∗ Paolo G. Franciosa† Isabella Lari‡ Andrea Ribichini§ Abstract The vitality of an arc/node of a graph with respect to the maximum flow between two fixed nodes is defined as the reduction of the maximum flow caused by the removal of that arc/node. In this paper we address the issue of determining the vitality of arcs and/or nodes for the network flow problem over various classes of graphs and digraphs. First of all we show how to compute the vitality of all arcs in a general undirected graph by solving n − 1 max flow instances, i.e., in worst case time O(n·MF(n, m)), where MF(n, m) is the time needed to solve a max-flow instance. In st-planar graphs (directed or undirected) we can compute the vitality of all arcs and all nodes in O(n) worst case time. Moreover, after determining the vitality of arcs and/or nodes, and given a planar embedding of the graph, we can determine the vitality of a “contiguous” (w.r.t. that embedding) set of arcs/nodes in time proportional to the size of the set. In the case of general undirected planar graphs, the vitality of all nodes/arcs is computed in O(n log n) worst case time, while for the directed planar case we solve the same problem in O(np), where p is the number of arcs in a path from s∗ to t∗ in the dual graph. 1 Introduction Given a graph with capacities associated to arcs, and given two special nodes s and t, the problem of determining the maximum flow that can be transferred from s to t has been deeply studied since the 1950’s. Here we present algorithms for computing how the maximum flow can be influenced by the removal of any single arc, or any single node, or in some cases by the simultaneous removal of a set of arcs/nodes. This is a special case of the vitality concept: given a real-valued function f (G) of a graph G, the vitality of a resource x of the graph is usually defined as the value |f (G) − f (G \ x)|, where G \ x denotes the graph after the removal of resource x. Vitality can be seen as a special case of a centrality index, as defined in [21]. The vitality of arcs and nodes in a graph has been studied with respect to the distance between two fixed nodes x, y in a graph [7, 22, 23, 24, 26, 27, 32, 33]. In this case, the vitality of an arc measures the distance increase between x and y when the arc is removed, and obviously only arcs on a shortest path from x to y may have positive vitality. In [4], the problem of determining a spanner of a graph with the additional constraint of preserving the vitality of arcs has been addressed. The problem of computing the vitality of arcs with respect to max-flow has been studied since 1963, only a few years after the seminal paper by Ford and Fulkerson in 1956. Wollmer [34] presented a method for determining the most vital link (i.e., the arc with maximum vitality) in a railway network. A more general problem has been studied in [30], where an algorithm is proposed for finding the k arcs whose simultaneous removal causes the largest decrease in max-flow, based on an enumerative approach. Wood [35] has shown that this problem is NP-hard in the strong ∗ Dipartimento di Ingegneria Informatica, Automatica e Gestionale, Università di Roma “La Sapienza”, via Ariosto 25, 00185 Roma, Italy. Email: [email protected]. † Dipartimento di Scienze Statistiche, Università di Roma “La Sapienza”, piazzale Aldo Moro 5, 00185 Roma, Italy. Email: [email protected]. ‡ Dipartimento di Scienze Statistiche, Università di Roma “La Sapienza”, piazzale Aldo Moro 5, 00185 Roma, Italy. Email: [email protected]. § Dipartimento di Fisica, Università di Roma “La Sapienza”, piazzale Aldo Moro 5, 00185 Roma, Italy. E-mail: [email protected]. 1 sense, while its approximability has been studied in [2]. The same problem can be solved in O(n3 k) on planar graphs [29]. Corley and Chang [8] have shown that removing nodes can be reduced to removing arcs in a transformed network. A slightly different problem consists in determining a “robust” flow assignment, i.e., a flow assignment in which the flow loss due to the removal of one arc is minimized. In this setting, flow is not “re-routed” due to the arc removal. Aneja, Chandrasekaran and Nair [3] propose a strongly polynomial solution based on LP, while the extension of this problem to the removal of k arcs has been shown to be NP-hard in [9], even for k = 2. Recently, the most vital arc or set of k arcs in a flow network which carries flow over time has been studied in [25]. Despite the abundant literature on most vital arcs, the problem of efficiently determining the vitality of all arcs or all nodes has not been addressed yet. For the following classes of graphs we obtain the following results (n is the number of nodes, m is the number of arcs): general undirected: vitality of all arcs in O(n · MF(n, m)) time, where MF(n, m) is the time needed to solve a max-flow instance on an undirected graph with n nodes and m arcs; st-planar, both undirected and directed: vitality of all nodes and all arcs in O(n) time. Fixing an st-planar embedding, after O(n) preprocessing time and using O(n) space, we retrieve the vitality of a contiguous set of k arcs in O(k) time; planar undirected: vitality of all nodes and all arcs in O(n log n) time; planar directed: vitality of all nodes and all arcs in O(np), where p is the number of arcs in a path from face s∗ to face t∗ in the dual of an arbitrary planar embedding of the graph. 2 Definitions and preliminaries We are given a weighted directed graph G = (N, A, c), where N is a set of n nodes, A ⊆ N × N is a set of m arcs, and c : A → IR+ is a strictly positive function that assigns capacities to arcs. We fix two special nodes: s, the source, and t, the sink, and we assume G is connected—i.e., the underlying undirected graph is connected. A feasible flow assignment from s to t is a function f : A → IR+ such that: • 0 ≤ f (e) ≤ c(e) for each e ∈ A (capacity constraint), P P • x∈N − (v) f ((x, v)) = y∈N + (v) f ((v, y)), for each v ∈ N \ {s, t} (conservation constraint), where N − (v) (resp., N + (v)) is the set of nodes {x ∈ N ) |(x, v) ∈ A} (resp., {x ∈ N |(v, x) ∈ A}). The capacity constraint ensures that the flow on each arc does not exceed its capacity, while the conservation constraint ensures that for each node, other than s or t, the flow entering the node equals the flow leaving flow from s to t under a feasible flow assignment P the node. The P f is defined as F (f ) = y∈N + (s) f ((s, y)) − x∈N − (s) f ((x, s)). A maximum flow from s to t is the maximum value of F (f ) over all feasible flow assignments f . A flow assignment giving a maximum flow is called a maximum flow assignment. Since s and t are usually fixed, we omit to specify “from s to t” in the sequel, and we denote the maximum flow on G from s to t simply by maxFlow(G). In an undirected graph G = (N, A, c) (we adopt the same notation for directed and undirected graphs, as in [1]), a feasible flow assignment fu can be defined by considering a feasible flow assignment f on the directed graph obtained by substituting each undirected arc (x, y) ∈ A by a pair of directed arcs (x, y) and (y, x), both having the same capacity. The flow value fu (x, y) from x to y on the undirected arc (x, y) is defined as fu (x, y) = f ((x, y)) − f ((y, x)). Note that the flow is “directed”, so that fu (x, y) = −fu (y, x). An st-cut of a connected graph is a partition of nodes into two subsets S, T such that s ∈ S and t ∈ T . A cut is also identified by the set of arcs between S and T , i.e., the set A ∩ ((S × T ) ∪ (T × S)). Given a cut C = (S, T ) and an arc e ∈ A∩((S × T ) ∪ (T × S)), we say that e 2 P crosses C, and C crosses e, as well. The capacity of a cut is defined as c(S, T ) = e∈(A∩(S×T )) c(e), and a minimum st-cut is an st-cut having minimum capacity. Note that the capacity is oriented, so that in general c(A, B) 6= c(B, A). Since nodes s and t are fixed, we denote a minimum st-cut in graph G as minCut(G). The well known Min-Cut Max-Flow theorem [11] shows that maxFlow(G) = c(minCut(G)), for any weighted graph G. Given an arc e = (x, y), by minCute (G) we denote a minimum capacity cut among all st-cuts of G that cross (x, y). Obviously, minCute (G) is not necessarily a minimum cut, so c(minCute (G)) ≥ c(minCut(G)), and c(minCute (G)) = c(minCut(G)) if and only if e belongs to some minimum cut. In what follows, given an arc e ∈ A, we shortly denote the graph G = (N, A \ {e}, c) by G − e and, given a node v ∈ N , we denote the subgraph induced by N \{v} by G−v. The same notations are extended to sets of arcs or nodes, thus G − A0 , with A0 ⊆ A, is the graph (N, A \ A0 , c) and G − N 0 , with N 0 ⊆ N , is the subgraph induced by N \ N 0 . The vitality of a resource R with respect to maximum flow, according to the general concept of vitality in [21], is defined as flowVit(R) = maxFlow(G) − maxFlow(G − R), where R can be a single arc/node, or a set of arcs/nodes. Given a planar embedded directed graph G, its dual graph G∗ is defined as a directed weighted multigraph, thus possibly having multiple arcs, whose nodes correspond to faces of G and such that for each arc e = (x, y) in G there is an arc e∗ = (f, g) in G∗ , where f corresponds to the face to the left of e in G and g corresponds to the face to the right of e in G. The length of e∗ equals the capacity of e. For each arc e we also include in G∗ a reverse arc, i.e., arc (g, f ), whose length is set to 0. We also say that G is the primal graph of G∗ . The dual graph of a planar embedded undirected graph is a planar undirected multigraph, and is defined analogously (reverse arcs are not needed). It is easy to see that G∗ is a planar graph, and that duality also maps each node v in G to a face v ∗ in G∗ , and each face f in G to a node f ∗ in G∗ . The distance distG (x, y) from node x to node y is the length of a shortest path in G from x to y. We extend the definition of distance to pairs of node sets, so that distG (A, B) = minu∈A,v∈B distG (u, v) for any sets A, B of nodes. In particular, the distance from a node v to an arc e = (x, y) is distG (v, e) = distG ({v}, {x, y}). An st-planar graph is a planar graph that admits an st-planar embedding, i.e., a planar embedding with nodes s and t on the same face. W.l.o.g., we assume s and t are on the outer face. An st-planar embedding of an st-planar graph can be found in O(n) worst-case time. Given an st-planar embedded graph, in which s is placed to the left and t is placed to the right (see the left part of Figure 1), we draw two semi-infinite lines from s to the left and from t to the right, splitting the outer face into an upper face U and a lower face L, thus U ∗ and L∗ will be two special nodes in G∗ . We denote by G∗e the graph obtained from G∗ by contracting arc e∗ (see the right part of Figure 1). Since arc lengths are not negative, it follows that distG∗e (x, y) ≤ distG∗ (x, y), for any arc e and any pair of nodes x, y. With respect to distances, contracting arc e = (x, y) corresponds to adding a reverse arc er (y, x) and to setting the length of e and er to zero. Given an st-planar embedded graph G, we say a set S of arcs is contiguous if the set of dual arcs S ∗ defines a connected component in G∗ . Note that the contiguity property depends on the embedding of the graph. 2.1 A simple general consideration All our algorithms rely on the following consideration: Lemma 1 For each arc e, flowVit(e) = max {0, c(minCut(G)) − (c(minCute (G)) − c(e))} Proof. By the Min-Cut Max-Flow theorem, flowVit(e) = c(minCut(G)) − c(minCut(G − e)). Obviously, c(minCut(G − e)) ≤ c(minCut(G)). Let us first assume that c(minCut(G − e)) < c(minCut(G)). In this case, flowVit(e) = c(minCut(G)) − c(minCut(G − e)) > 0, and minCut(G − e) ∪ {e} is the minimum capacity cut 3 U∗ U∗ f2 e f f1 s s t t G and G∗ ∗ ∗ G − e and G∗e L L Figure 1: st-planar embedded graphs G and G − e (solid) and their dual graphs G∗ and G∗e (dotted). Removing arc e, faces f1 and f2 in G are merged, yielding face f in G − e. The dual graph includes reverse arcs, with 0 length, for each dotted arc drawn in the picture. among all cuts crossing arc e. Hence, minCute (G) \ {e} is a minimum cut in G − e, and its capacity is c(minCute (G)) − c(e). Otherwise, let c(minCut(G − e)) = c(minCut(G)). In this case, by definition, flowVit(e) = 0 and c(minCute (G)) − c(e) ≥ c(minCut(G)), thus giving the thesis.  3 General undirected graphs The vitality of each arc e can be computed, by definition, by solving a max-flow problem on G − e, thus we can compute the vitality of all arcs by m calls to a max-flow routine. We show here that it is possible to solve the same problem by only n − 1 calls to a max-flow routine. Lemma 1 shows that, in order to compute flowVit(e) for any given arc e = (x, y) in a general undirected graph, it is sufficient to compute c(minCute (G)). Let (C, C) be any st-cut that crosses e, then either: (1) {x, s} ⊆ C and {y, t} ⊆ C or (2) {y, s} ⊆ C and {x, t} ⊆ C. Therefore, we can find the minimum capacity cut by comparing the best cut of type (1) and the best cut of type (2). A minimum capacity cut of type (1) can be found by applying a standard min-cut algorithm to a graph G0 obtained from G by adding two arcs (x, s) and (y, t) with very high capacities (e.g., greater than the sum of all the capacities in the graph). Obviously, a minimum st-cut in G0 cannot separate x from s, nor can it separate y from t, thus it necessarily crosses arc e. The same argument can be applied to compute minimum capacity cuts of type (2). Gomory and Hu [12] showed that in any undirected graph a set C of at most n − 1 cuts exists so that for each pair of nodes x, y a minimum xy-cut can be found in C. This means that the n2 pairs of nodes in G can be separated by using only n − 1 different minimum cuts. Moreover, these cuts can be implicitly represented by a cut tree: Definition 1 A cut tree T = (N, AT , w) of a weighted undirected graph G = (N, A, c) is a tree with real weighted arcs that represents minimum capacity cuts for all pairs of nodes in N . More precisely, for any two nodes x, y ∈ N , let e be a minimum weight arc in the unique path joining x and y in T : then T is a cut tree of G if and only if (i) w(e) equals the capacity of a minimum xy-cut in G, and 4 (ii) e splits T into two connected components with nodes X and Y so that (X, Y ) is a minimum capacity xy-cut in G. A first algorithm for computing a cut tree has been proposed in [12], and a simpler approach is shown in [13]. A flow tree differs from a cut tree in the fact that property (ii) is not required. Hence, a flow tree only represents the capacities of the minimum cuts, not the cuts themselves, for all pairs of nodes. A very simple algorithm for computing a flow tree is given in [13]. All the algorithms in [12, 13] require n − 1 maximum flow computations. The concept of flow tree has been generalized by Cheng and Hu in [6]. In their more general setting, an arbitrary real function f is defined on the set of cuts (i.e., node bipartitions) and, given any two nodes x, y, an xy-cut that minimizes f has to be computed. Definition 2 Given an undirected graph G = (N, A) and a real function f defined on the set of all bipartitions of N , an ancestor tree Tf is a binary tree with leaves N such that each internal node v of Tf represents a minimum cut (w.r.t. f ) separating each leaf in the left subtree of v from each leaf in the right subtree of v. The minimum (w.r.t. f ) cut separating two nodes x and y in G can be found by looking at the lowest common ancestor of x and y in Tf . For example, we can define f so that balanced bipartions are preferred, or impose any other arbitrary constraint and/or cost function to cuts. As a special case, f can be the sum of the capacities of arcs crossing the cut, as in the classical max-flow problem. Cheng and Hu showed that for any directed graph G and any cost function f it is always possible to compute an ancestor tree Tf . Assuming that, given a pair x, y, a routine is available for computing a minimum xy-cut in G according to the cost function f , building an ancestor tree requires n − 1 calls to that routine—plus overall O(n2 ) worst case time restructuring operations. Note that, while an ancestor tree exists for any cost function f , it is not always possible to define a cut tree according to f . For example, let us define f as in the classical min cut problem, with the exception that partitions in which one side contains only one node have cost +∞: a cut tree should have at least one leaf v, and the cut defined by the arc incident on v in the cut tree would define a partition in which one side contains only node v. We are now ready to describe our algorithm for computing arc vitalities for general undirected graphs. We first compute c(minCut(G)), and then we build an ancestor tree Tst according to cost function fst defined as follows: ( +∞ if {s, t} ⊆ C or {s, t} ⊆ C fst (C, C) = c(C, C) otherwise For each arc e = (x, y) in G, we find on Tst the capacity of a minimum xy-cut that also separates s from t. Minimizing the cost function fst gives minCute (G), for each e, and, by Lemma 1, allows us to compute flowVit(e) in constant time. Theorem 2 Given an undirected weighted graph G = (N, A, c) and two nodes s, t, we can compute flowVit(e), for all e ∈ A, in O(n · MF(n, m) + m · n) worst-case time, where MF(n, m) is the time needed to compute a maximum flow. Proof. Building the ancestor tree Tst requires n − 1 calls to a routine that, given two nodes x, y, computes a minimum cut that separates both x from y and s from t. As described in the beginning of this section, such a cut can be found by solving two standard max-flow instances, namely, on a graph G0 obtained from G by adding two arcs (x, s) and (y, t) with very high capacities and on a graph G00 obtained from G by adding two arcs (x, t) and (y, s) with very high capacities. For each arc e = (x, y), the value flowVit(e) can be computed by Lemma 1, where c(minCute (G)) is found on Tst by searching for the lowest common ancestor of x, y. This trivially1 requires O(n) for each arc, leading to an overall O(m · n) additional worst-case time.  1 Lowest common ancestors could be found more efficiently, but in our case this is not the dominant asymptotic cost 5 By applying the currently fastest algorithms for max-flow in general graphs, i.e., King, Rao and Tarjan’s algorithm [20] for m = Ω(n1+ε ) with ε > 0, and Orlin’s algorithm [28] for sparse graphs, we can state the following result. Corollary 3 For any undirected graph G = (N, A, c), we can compute flowVit(e), for all e ∈ A, in O(n2 · m) worst-case time. 4 Max flow algorithms for planar graphs Algorithms for finding the maximum flow in a planar graph vary according to whether the input graph is directed or undirected, and whether it is st-planar (i.e., it can be drawn on a plane with s and t on the same face) or not. The first algorithm proposed for directed st-planar graphs is due to Ford and Fulkerson [11] and consists in repeatedly saturating the uppermost path of a planar embedding of the graph. Itai and Shiloach [17] proposed an O(n log n) implementation of this procedure, by using a priority queue for finding the saturating arc of each uppermost path. Later, Hassin [14] proved that, if G is st-planar and G∗ is the dual of an st-planar embedding of G, a minimum st-cut in G corresponds to a shortest path in G∗ and the maximum flow can be computed in linear time starting from a single source shortest path (SSSP) tree. Using the algorithm by Henzinger et al. [16] for the SSSP tree problem in planar graphs, the minimum st-cut in G and the corresponding maximum flow can be found in O(n) time. If G is undirected and planar, but not st-planar, the best approach currently known is due to Reif [31], and it is based on the fact that a minimum st-cut of G corresponds to a minimum cycle in the dual graph G∗ separating a chosen face s∗ adjacent to s from a chosen face t∗ adjacent to t, and viceversa (see [17]). Applying a divide and conquer technique, Reif’s algorithm computes a minimum cut in O(n log2 n). By plugging in the SSSP tree algorithm for planar graphs by Henzinger et al. [16], this bound can be improved to O(n log n). Reif’s algorithm thus provide the maximum flow value, without computing a maximum flow assignment. Hassin et al. proposed [15] an O(n log2 n) worst case time for computing a maximum flow assignment, still solving a planar SSSP tree problem. Thus, also in this case, the worst case time bound can be improved to O(n log n) by applying the algorithm in [16]. If G is directed and planar, the divide and conquer approach by Reif for the undirected case cannot be applied. For this case, Borradaile and Klein [5] presented an O(n log n) time algorithm, based on a repeated search of left-most circulations. 5 5.1 Vitality in directed or undirected st-planar graphs Vitality of arcs We first refer to directed graphs. Exploiting the strong correspondence for st-planar graphs between flows in G and distances from U ∗ to L∗ in G∗ , the definition of flowVit gives for each arc e: flowVit(e) = distG∗ (U ∗ , L∗ ) − distG∗e (U ∗ , L∗ ) (1) Obviously, distG∗e (U ∗ , L∗ ) ≤ distG∗ (U ∗ , L∗ ). Fixing an st-planar embedding of G, we can state the same equality using only distances in G∗ . Lemma 4 Given an st-planar embedded directed graph G and an arc e ∈ G, we have:   0, flowVit(e) = max distG∗ (U ∗ , L∗ ) − (distG∗ (U ∗ , e∗ ) + distG∗ (e∗ , L∗ )) Proof. Graph G∗e derives from G∗ after contracting arc e∗ = (f1∗ , f2∗ ), where f1 and f2 are the faces respectively to the left and to the right of e. This also corresponds, in the primal 6 graph, to merging faces f1 and f2 into a single face f (see Figure 1). Obviously, distG∗e (U ∗ , L∗ ) ≤ distG∗ (U ∗ , L∗ ). Due to (1), we only need to show that if distG∗e (U ∗ , L∗ ) < distG∗ (U ∗ , L∗ ) then distG∗e (U ∗ , L∗ ) = distG∗ (U ∗ , e∗ ) + distG∗ (e∗ , L∗ ) If distG∗e (U ∗ , L∗ ) < distG∗ (U ∗ , L∗ ), then the shortest path πe from U ∗ to L∗ in G∗e necessarily passes through f ∗ . Path πe from U ∗ to L∗ is composed by a shortest path in G∗ from U ∗ to one among f1∗ and f2∗ , concatenated to a shortest path in G∗ from one among f1∗ and f2∗ to L∗ , thus giving the thesis.  Theorem 5 Given a directed or undirected st-planar weighted graph, we can compute flowVit(e), for all e ∈ A, in O(n) worst-case time. Proof. Let us first consider the directed case. Lemma 4 only uses graph G∗ , thus it is possible to compute the vitality of each arc e without explicitly computing G∗e . It suffices to store, for each node f ∗ in G∗ , the pair of distances distG∗ (U ∗ , f ∗ ) and distG∗ (f ∗ , L∗ ). These can be computed by means of two single-source shortest path trees, the first in G∗ from U ∗ to each other node and the second in the reversal of G∗ from L∗ to each other node. Shortest path trees can be found in planar graphs in O(n) worst case time using the technique in [16]. The same approach can be applied to the undirected case.  5.2 Extension to contiguous arc failures and node failures Let F be a set of contiguous arcs in an st-planar embedding of an st-planar graph G. We recall that the set of the dual arcs F ∗ defines a connected subgraph in G∗ . In particular, in case F is the set of all arcs incident on a same node v, then F is contiguous in any st-planar embedding of G. By definition, flowVit(F ) = maxFlow(G) − maxFlow(G − F ) and, thanks to the Min-Cut MaxFlow theorem and the result in [11], flowVit(F ) = distG∗ (U ∗ , L∗ ) − dist(G−F )∗ (U ∗ , L∗ ). The dual graph (G − F )∗ is obtained from G∗ by contracting all arcs in F ∗ or, equivalently, setting to 0 the length of all arcs in F . Let K ∗ be the set of endpoints of all arcs in F ∗ : since F ∗ is connected, each node in K ∗ has the same distance from U ∗ . Thus, dist(G−F )∗ (U ∗ , x∗ ) = minv∗ ∈K ∗ (distG (U ∗ , v ∗ )), for each x∗ ∈ K ∗ . It follows that flowVit(F ) can be obtained again using only distances in G∗ . In fact,   distG∗ (U ∗ , L∗ ) ∗ ∗ dist(G−F )∗ (U , L ) = min (2) distG∗ (U ∗ , K ∗ ) + distG∗ (K ∗ , L∗ ) since the portion of any path in (G − F )∗ inside K ∗ has zero length. By definition, distG∗ (U ∗ , K ∗ ) and distG∗ (K ∗ , L∗ ) can be computed in O(|K|) time as mina∗ ∈K ∗ {distG∗ (U ∗ , a∗ )} and minb∗ ∈K ∗ {distG∗ (b∗ , L∗ )}, respectively. The above argument yields the following theorem: Theorem 6 Given an st-planar embedding of a directed or undirected st-planar graph G, it is possible to preprocess G in O(n) worst case time so that, for any set of contiguous arcs F , flowVit(F ) can be answered in O(|F |) worst-case time. The arguments leading to Theorem 6 can be specialized in order to compute the vitality of nodes. Deleting a node v corresponds to deleting the set of all arcs incident on v, and this set of arcs is contiguous in any planar embedding of G. Thanks to equation (2), dist(G−v)∗ (U ∗ , L∗ ) can be derived by computing distG∗ (U ∗ , F (v)∗ ), where F (v) is the set of faces adjacent to v. This is the minimum among distances (in the dual graph G∗ ) from U ∗ to all nodes corresponding to faces surrounding v, and similarly from all these nodes to L∗ . Thus, after the two spanning trees from U ∗ and to L∗ have been computed in O(n) time as in [16], we can associate to each node v the values of dist∗G (U ∗ , F (v)∗ ) and distG∗ (F (v)∗ , L∗ ), still in overall O(n) worst case time. 7 Theorem 7 Given an st-planar embedding of a directed or undirected st-planar graph G, it is possible to compute flowVit(v), for all nodes v, in O(n) worst case time. 6 General planar graphs We saw that in the case of st-planar graphs the same techniques yield efficient solutions for the max-flow problem both for undirected and directed graphs, and also the vitality problem for undirected and directed st-planar graphs can be solved by the same algorithm. This is not true for general planar graphs, therefore we consider separately the undirected and the directed cases. In fact, also for the max-flow problem, the O(n log2 n) algorithm proposed by Reif [31] for undirected planar graphs, which can be improved to O(n log n) by applying the SSSP algorithm in [16] (and further improved to O(n log log n) by applying the results of Italiano et al. [18]), does not apply to the directed case, where a more complex approach is required, as it is shown in [5] and [10]. In the following we propose an O(n log n) algorithm for computing the vitaliy of all arcs and all nodes for the case of general undirected planar graphs, while for general directed planar graphs we need O(n · p) time, where p is the number of arcs in a path from s∗ to t∗ in the dual graph. Efficient algorithms for computing a max-flow in general planar graphs (directed or undirected) are based on the following property of the dual graph G∗ . We assume a planar embedding of the graph is fixed: Property 1 (see Property 1 in [31]) A minimum cut in G corresponds to a minimum cycle in G∗ that separates face s∗ from face t∗ . A cycle in the dual graph G∗ that separates face s∗ from face t∗ is called an st-separating cycle. Property 2 (see [31]) Choose an arbitrary face fs adjacent to s and an arbitrary face ft adjacent to t, and let π be a shortest path from fs∗ to ft∗ in G∗ . Any shortest st-separating cycle γ crosses π exactly once. Due to Property 2, the length of γ can be found as c(γ) = min {c(γf )} ∗ f ∈π (3) where γf is a minimum st-separating cycle that contains node f ∗ . 6.1 Vitality in planar undirected graphs We briefly recall Reif’s algorithm. Reif “cuts” G∗ along a shortest path π defined as in Property 2, obtaining graph Gc (see Figure 2): each node f ∗ in π is split into two nodes fu∗ and f`∗ , arcs incident on f ∗ above π are moved to fu∗ and arcs incident on f ∗ below π are moved to f`∗ . Arcs on π are copied both on fu∗ and on f`∗ , so that path π is doubled. Then the median node f ∗ in π is found and a shortest cycle γf among all the st-separating cycles containing f ∗ (i.e., a shortest path in Gc from fu∗ to f`∗ ) is computed by a SSSP algorithm starting from fu∗ . Cycle γf divides Gc in a left part Gc` and a right part Gcr (assuming s is drawn to the left of t), where the boundary γf belongs to both Gc` and Gcr . The same technique is applied recursively to Gc` and Gcr . This gives rise to a recursion tree with depth O(log n), where the sum of the sizes of all instances on a same level is O(n). Thus, the overall worst case time to find the shortest st-separating cycle in G∗ is O(SSSP(n) · log n), where SSSP(n) is the time needed to compute a SSSP tree in a planar graph. The complexity of Reif’s algorithm is O(n log n) if shortest path trees are computed in O(n) time as in [16]. Our algorithm for computing vitalities in undirected planar graphs is based on Lemma 1 and an extension of Property 1. More in detail, we can compute flowVit(e) for each arc e = (x, y) by computing a minimum cycle in G∗ that separates both x∗ from y ∗ and s∗ from t∗ . If we denote 8 γf γf 0 ∗ fsu ∗ fs` Gcr fu∗ Gc` fu0∗ π f`∗ f`0∗ ∗ ftu ∗ ft` Figure 2: Reif’s divide and conquer technique. Graph Gc is split by γf into Gc` and Gcr . A shortest st-separating cycle γf 0 can be found in Gc` . a b γf γf 0 ,e e x y ∗ fsu ∗ fs` Gcr fu∗ Gc` fu0∗ f`∗ f`0∗ π ∗ ftu ∗ ft` Figure 3: Illustrating Property 3. A shortest st-separating cycle γf 0 ,e that also separates x from y (i.e., that separates face x∗ from face y ∗ in the dual graph) can be found in Gc` . by γf,e a shortest cycle in G∗ that separates s∗ from t∗ and contains both f ∗ and e∗ , we can state that minCute (G) = min {c(γf,e )} (4) ∗ f ∈π Exploiting (4), we can compute flowVit(e) by computing minf ∗ ∈π {c(γf,e }. Let us concentrate on evaluating c(γf,e ) for a single f ∗ ∈ π and for all e in G. We build a SSSP tree on Gc starting from fu∗ and a SSSP tree on the reversal of Gc starting from f`∗ , where fu∗ and f`∗ are the two nodes in which f ∗ is split in Gc (see Figure 3). We can now evaluate c(γf,e ) for all e, analogously to Lemma 4, as c(γf,e ) = distGc (fu∗ , e∗ ) + distGc (e∗ , f`∗ ) (5) If we trivially apply the above procedure to each f ∗ ∈ π, working each time on the whole graph G and computing SSSP trees as in [16], we obtain an O(n · p) algorithm, where p is the number of arcs in π. We show now that the divide and conquer technique in [31] can also be applied for computing minf ∗ ∈π {c(γf,e )}. We exploit the following property. c Property 3 For any f ∗ ∈ π, let Gc` and Gcr be the left and right portions of Gc defined by γf , where both Gc` and Gcr include cycle γf : for any f 0∗ that precedes (resp., follows) f ∗ in π, and for any arc e∗ in Gc` (resp., Gcr ), cycle γf 0 ,e can be found in Gc` (resp., Gcr ). Property 3 can be proved as in [31]. We give here some intuition: as depicted in Figure 3, if a minimum cycle separating s∗ from t∗ and x∗ from y ∗ crosses γf , then another minimum cycle 9 with the same property exists in Gc` . In fact, since γf is a shortest cycle containing f ∗ , then the portion a − b of γf,e that lies out of Gc` has the same length as the dotted shortest path joining a and b. We are now ready to describe our algorithm for undirected planar graphs. Let f ∗ be the median node in π, that is split into fu∗ and f`∗ . We compute a SSSP tree from fu∗ to each other node in Gc and a SSSP tree from f`∗ to each other node in the reversal of Gc . We set an initial value for minCute (G) as we do for st-planar graphs using Lemma 4. Thanks to Property 3, any possible improvement to minCute (G), for each e ∈ Gc` , is found by a recursive call to the same procedure on G∗` , and analogously for each e ∈ Gcr . The complexity analysis of our algorithm proceeds as in [31]. Computing SSSP trees in linear time, as in [16], we have that: Theorem 8 Given an undirected planar weighted graph G = (N, A), we can compute flowVit(e), for all e ∈ A, in O(n log n) worst-case time. A similar approach allows us to compute the vitality of nodes in a general undirected planar graph. Fixing an arbitrary embedding of the graph, let F (x) be the set of faces adjacent to node x. Removing from G all arcs incident to x corresponds to merging all the faces in F (x) into a single face, and contracting nodes F ∗ (x) into a single node in G∗ . Let us denote this contracted dual graph by G∗x . The vitality of node x ∈ G can be evaluated by computing the length of the shortest st-separating cycle γ x in G∗x , which is given by c(γ x ) = min {distGc (fu∗ , x∗ ) + distGc (f`∗ , x∗ )} ∗ f ∈π (6) where fu∗ and f`∗ are the upper and lower copies of f ∗ in Gc . Theorem 9 Given an undirected planar weighted graph G = (N, A), we can compute flowVit(x), for all x ∈ N , in O(n log n) worst-case time. Proof. Given a node x in G, we have   0, flowVit(x) = max c(γ) − minf ∗ ∈π {distGc (fu∗ , x∗ ) + distGc (f`∗ , x∗ )} where γ is the shortest st-separating cycle in G∗ . The value of distGc (fu∗ , x∗ ) and distGc (f`∗ , x∗ ) can be found by a recursive algorithm that splits π on the median node f ∗ and computes a SSSP trees in Gc (resp., in the reversal of Gc ) starting from fu∗ (resp., from f`∗ ). After computing a SSSP tree from f`∗ (resp., fu∗ ), the value distGc (f`∗ , x∗ ) (resp., distGc (fu∗ , x∗ )) is computed in linear time for all faces x∗ by taking the minimum among distances from fu∗ (resp., from f`∗ ) to nodes in F (x)∗ . If SSSP trees are computed as in [16], the overall worst-case time is O(n log n).  6.2 Vitality in directed planar graphs The approach we used for undirected planar graphs does not apply to the directed case. In fact (see [19]), known attempts to apply Reif’s recursion to computing max-flow in general directed planar graphs contain flaws, due to the fact that in the directed case Property 2 does not hold and, more in general, it is not always possible to find shortest cycles that do not cross each other. We compute the vitality of all arcs in general directed planar graphs as follows (see Figure 4). We define a path π, as described in Property 2. Next, for each node f ∗ ∈ π, we compute a SSSP tree Tf rooted at f ∗ and, after reversing all arcs in G∗ , a second SSSP Tfr , still rooted at f ∗ . For each arc e in the input graph, we can now possibly update the length of c(γf,a ), in a manner similar to the general planar undirected case. However, since shortest cycles may cross π more than once 10 π fs∗ f∗ ft∗ e∗ Figure 4: Finding a shortest st-separating cycle through f ∗ in a general directed planar graph. The solid portion of the cycle belongs to Tf , while the dashed portion belongs to Tfr . in the directed case, special care must be taken when combining distances from Tf with distances from Tfr . In particular, it must be ensured that each considered cycle actually separates s∗ from t∗ . This may be achieved by slightly modifying the shortest path algorithm used to compute Tf and Tfr , so that two distances are kept for each node, one with an even, and another with an odd number of crossings of π. Moreover, portions of paths approaching π must be appropriately managed. When combining distances in order to evaluate c(γf,e ), it suffices to ensure that the resulting cycle contains an even number of crossings, to guarantee that it separates s∗ from t∗ . Since in the directed case shortest cycles may cross one another, Reif’s recursion technique does not apply and, after selecting a node f ∗ ∈ π and finding Tf and Tfr , we cannot in general restrict successive computations, for different nodes of π, to subgraphs of G∗ . This implies that, for each arc f ∗ of π, our algorithm computes a constant number of SSSP trees over the entire graph. If Dijkstra’s algorithm is used (slightly modified, in order to propagate for each node distances with an even and an odd number of crossings of π, as stated above, we get an O(p · n log n) worst-case running time, where p denotes the number of arcs in π. If, instead, a modification of the shortest paths algorithm for planar graphs of Henzinger et al. [16] is used (Henzinger’s algorithm is based on recursively dividing the input graph, and applying Dijkstra-like steps on small enough regions, and may therefore be modified similarly to Dijkstra’s algorithm), this bound is improved by a log factor. The above arguments lead to the following theorem: Theorem 10 Given a directed planar weighted graph G = (N, A), we can compute flowVit(e), for all e ∈ A, in O(n · p) worst-case time, where p is the number of arcs in a path from s∗ to t∗ in the dual graph. 7 Conclusions and further work In this paper we have shown how to solve the problem of computing vitality of all arcs and all nodes for several classes of graphs. In several cases the performance of our algorithms is optimal. Some questions are left open: • is it possible to find non-trivial solutions, i.e., better then O(m · MF(m, n)) worst-case time, for computing vitalities of all arcs in general directed graphs? • is it possible to adapt the algorithm of Borradaile and Klein [5] to the computation of all arc vitalities for planar directed graphs (not st-planar)? References [1] R. K. Ahuja, T. L. Magnanti, and J. B. Orlin. Network flows - theory, algorithms and applications. Prentice Hall, 1993. 11 [2] D. S. Altner, Ö. Ergun, and N. A. Uhan. The maximum flow network interdiction problem: Valid inequalities, integrality gaps, and approximability. Oper. Res. Lett., 38(1):33–38, January 2010. [3] Y. P. Aneja, R. Chandrasekaran, and K. Nair. Maximizing residual flow under an arc destruction. Networks, 38(4):194–198, 2001. [4] G. Ausiello, P. G. Franciosa, G. F. Italiano, and A. Ribichini. On resilient graph spanners. Algorithmica, 74(4):1363–1385, 2016. [5] G. Borradaile and P. Klein. An O(n log n) algorithm for maximum st-flow in a directed planar graph. J. ACM, 56(2):9:1–9:30, April 2009. [6] C. K. Cheng and T. C. Hu. Ancestor tree for arbitrary multi-terminal cut functions. Annals of Operations Research, 33(3):199–213, 1991. [7] H.W. Corley and D. Y. Sha. Most vital links and nodes in weighted networks. Oper. Res. Lett., 1(4):157–160, September 1982. [8] H. W. Corley, Jr. and H. Chang. Finding the n most vital nodes in a flow network. Management Science, 21(3):362–364, 1974. [9] D. Du and R. Chandrasekaran. The maximum residual flow problem: NP-hardness with two-arc destruction. Networks, 50(3):181–182, 2007. [10] J. Erickson. Maximum flows and parametric shortest paths in planar graphs. In Proceedings of the Twenty-first Annual ACM-SIAM Symposium on Discrete Algorithms, SODA ’10, pages 794–804, Philadelphia, PA, USA, 2010. Society for Industrial and Applied Mathematics. [11] L. R. Ford, Jr. and D. R. Fulkerson. Maximal flow through a network. Canadian Journal of Mathematics, 8:399–404, 1956. [12] R. E. Gomory and T. C. Hu. Multi–terminal network flows. Journal of the Society for Industrial and Applied Mathematics, 9(4):551–570, 1961. [13] D. Gusfield. Very simple methods for all pairs network flow analysis. SIAM Journal on Computing, 19(1):143–155, 1990. [14] R. Hassin. Maximum flow in (s, t) planar networks. Inf. Process. Lett., 13(3):107, 1981. [15] R. Hassin and D. B. Johnson. An O(n log2 n) algorithm for maximum flow in undirected planar networks. SIAM Journal on Computing, 14(3):612–624, 1985. [16] M. R. Henzinger, P. Klein, S. Rao, and S. Subramanian. Faster shortest-path algorithms for planar graphs. Journal of Computer and System Sciences, 55(1):3–23, 1997. [17] A. Itai and Y. Shiloach. Maximum flow in planar networks. SIAM Journal on Computing, 8(2):135–150, 1979. [18] G. F. Italiano, Y. Nussbaum, P. Sankowski, and C. Wulff-Nilsen. Improved algorithms for min cut and max flow in undirected planar graphs. In Proceedings of the Forty-third Annual ACM Symposium on Theory of Computing, STOC ’11, pages 313–322, New York, NY, USA, 2011. ACM. [19] H. Kaplan and Y. Nussbaum. Minimum s-t cut in undirected planar graphs when the source and the sink are close. In 28th International Symposium on Theoretical Aspects of Computer Science, STACS 2011, March 10-12, 2011, Dortmund, Germany, pages 117–128, 2011. [20] V. King, S. Rao, and R. Tarjan. A faster deterministic maximum flow algorithm. Journal of Algorithms, 17(3):447–474, 1994. 12 [21] D. Koschützki, K. A. Lehmann, L. Peeters, S. Richter, D. Tenfelde-Podehl, and O. Zlotowski. Centrality Indices, pages 16–61. Springer Berlin Heidelberg, Berlin, Heidelberg, 2005. [22] K.-C. Lin and M.-S. Chern. The fuzzy shortest path problem and its most vital arcs. Fuzzy Sets and Systems, 58(3):343–353, 1993. [23] K. Malik, A. K. Mittal, and S. K. Gupta. The k most vital arcs in the shortest path problem. Operations Research Letters, 9(4):223–227, 1989. [24] A. W. McMasters and T. M. Mustin. Optimal interdiction of a supply network. Naval Research Logistics Quarterly, 17(3):261–268, 1970. [25] S. Morowati-Shalilvand and J. Mehri-Tekmeh. Finding most vital links over time in a flow network. An International Journal of Optimization and Control: Theories & Applications (IJOCTA), 2(2):173–186, 2012. [26] E. Nardelli, G. Proietti, and P. Widmayer. A faster computation of the most vital edge of a shortest path. Inf. Process. Lett., 79(2):81–85, 2001. [27] E. Nardelli, G. Proietti, and P. Widmayer. Finding the most vital node of a shortest path. Theor. Comput. Sci., 296(1):167–177, 2003. [28] J. B. Orlin. Max flows in O(nm) time, or better. In Proceedings of the Forty-fifth Annual ACM Symposium on Theory of Computing, STOC ’13, pages 765–774, New York, NY, USA, 2013. ACM. [29] C. A. Phillips. The network inhibition problem. In Proceedings of the Twenty-Fifth Annual ACM Symposium on Theory of Computing, May 16-18, 1993, San Diego, CA, USA, pages 776–785, 1993. [30] H. D. Ratliff, G. T. Sicilia, and S. H. Lubore. Finding the n most vital links in flow networks. Management Science, 21(5):531–539, 1975. [31] J. H. Reif. Minimum s − t cut of a planar undirected network in O(n log2 (n)) time. SIAM Journal on Computing, 12(1):71–81, 1983. [32] B. Schieber, A. Bar-Noy, and S. Khuller. The complexity of finding most vital arcs and nodes. Technical report, College Park, MD, USA, 1995. [33] M. Stahlberg. Finding the most vital edges for shortest paths - algorithms and complexity for special graph classes, 2016. Bachelor Thesis, Technische Universität Berlin. [34] R. D. Wollmer. Some methods for determining the most vital link in a railway network. Technical report, RAND Corporation, 1963. [35] R. K. Wood. Deterministic network interdiction. Math. Comput. Model., 17(2):1–18, January 1993. 13
8cs.DS
Pattern Matching and Consensus Problems on Weighted Sequences and Profiles∗ Tomasz Kociumaka1 , Solon P. Pissis2 , and Jakub Radoszewski† ,1,2 arXiv:1604.07581v2 [cs.DS] 11 Jul 2016 1 Institute of Informatics, University of Warsaw, Warsaw, Poland, [kociumaka,jrad]@mimuw.edu.pl 2 Department of Informatics, King’s College London, London, UK, [email protected] Abstract We study pattern matching problems on two major representations of uncertain sequences used in molecular biology: weighted sequences (also known as position weight matrices, PWM) and profiles (i.e., scoring matrices). In the simple version, in which only the pattern or only the text is uncertain, we obtain efficient algorithms with theoretically-provable running times using a variation of the lookahead scoring technique. We also consider a general variant of the pattern matching problems in which both the pattern and the text are uncertain. Central to our solution is a special case where the sequences have equal length, called the consensus problem. We propose algorithms for the consensus problem parameterized by the number of strings that match one of the sequences. As our basic approach, a careful adaptation of the classic meet-in-the-middle algorithm for the knapsack problem is used. On the lower bound side, we prove that our dependence on the parameter is optimal up to lower-order terms conditioned on the optimality of the original algorithm for the knapsack problem. 1 Introduction We study two well-known representations of uncertain texts: weighted sequences and profiles. A weighted sequence (also known as uncertain sequence or position weight matrix, PWM) for every position and every letter of the alphabet specifies the probability of occurrence of this letter at this position; see Fig. 1 for an example. A weighted sequence represents many different strings, each with the probability of occurrence equal to the product of probabilities of its letters at subsequent positions of the weighted sequence. Usually a threshold z1 is specified, and one considers only strings that match the weighted sequence with probability at least z1 . A scoring matrix (or a profile) of length m is an m × σ matrix. The score of a string of length m is the sum of scores in the scoring matrix of the subsequent letters of the string at the respective positions. A string is said to match a scoring matrix if its matching score is above a specified threshold Z. X[1] (X) π1 (a) (X) π1 (b) = 1/2 = 1/2 X[2] (X) π2 (a) (X) π2 (b) X[3] (X) π3 (a) (X) π3 (b) =1 =0 = 3/4 = 1/4 X[4] (X) π4 (a) (X) π4 (b) =0 =1 Figure 1: A weighted sequence X of length 4 over the alphabet Σ = {a, b} ∗ Work supported by the Polish Ministry of Science and Higher Education under the ‘Iuventus Plus’ program in 2015-2016 grant no 0392/IP3/2015/73. † The author is a Newton International Fellow. 1 Weighted Pattern Matching and Profile Matching First of all, we study the standard variants of pattern matching problems on weighted sequences and profiles, in which only the pattern or the text is an uncertain sequence. In the best-known formulation of the Weighted Pattern Matching problem, we are given a weighted sequence of length n, called a text, a solid (standard) string of length m, called a pattern, both over an alphabet of size σ, and a threshold probability z1 . We are asked to find all positions in the text where the fragment of length m represents the pattern with probability at least 1z . Each such position is called an occurrence of the pattern in the text; we also say that the fragment of the text and the pattern match. The Weighted Pattern Matching problem can be solved in O(σn log m) time via the Fast Fourier Transform [5]. In a more general indexing variant of the problem, considered in [1, 12], one can preprocess a weighted text in O(nz 2 log z) time to report all occ occurrences of a given solid pattern of length m in O(m + occ) time. (A similar indexing data structure, which assumes z = O(1), was presented in [4].) Very recently, the index construction time was reduced to O(nz) for constant-sized alphabets [2]. In the classic Profile Matching problem, the pattern is an m × σ profile, the text is a solid string of length n, and our task is to find all positions in the text where the fragment of length m has a score above a specified threshold Z. A naive approach to the Profile Matching problem works in O(nm + mσ) time. A broad spectrum of heuristics improving this algorithm in practice is known; for a survey see [16]. One of the principal techniques, coming in different flavours, is lookahead scoring that consists in checking if a partial match could possibly be completed by the following highest scoring letters in the scoring matrix and, if not, pruning the naive search. The Profile Matching problem can also be solved in O(σn log m) time via the Fast Fourier Transform [17]. Weighted Consensus and Profile Consensus As our most involved contribution, we study a general variant of pattern matching on weighted sequences and the consensus problems on uncertain sequences, which are closely related to the Multichoice Knapsack problem. In the Weighted Consensus problem, given two weighted sequences of the same length, we are to check if there is a string that matches each of them with probability at least z1 . A routine to compare user-entered weighted sequences with existing weighted sequences in the database is used, e.g., in JASPAR, a well-known database of PWMs [19]. In the General Weighted Pattern Matching (GWPM) problem, both the pattern and the text are weighted. In the most common definition of the problem (see [3, 12]), we are to find all fragments of the text that give a positive answer to the Weighted Consensus problem with the pattern. The authors of [3] proposed an algorithm for the GWPM problem based on the weighted prefix table that works in O(nz 2 log z + nσ) time. In an analogous way to the Weighted Consensus problem, we define the Profile Consensus problem. Here we are to check for the existence of a string that matches both the scoring matrices above threshold Z. The Profile Consensus problem is actually a special case of the well-known (especially in practice) Multichoice Knapsack problem (also known as the Multiple Choice Knapsack problem). In this problem, we are given n classes C1 , . . . , Cn of at most λ items each—N items in total—each item c characterized by a value v(c) and a weight v(c). The goal is to select one item from each class so that the sums of values and of weights of the items are below two specified thresholds, V and W . (In the more intuitive formulation of the problem, we require the sum of values to be above a specified threshold, but here we consider an equivalent variant in which both parameters are symmetric.) The Multichoice Knapsack problem is widely used in practice, but most research concerns approximation or heuristic solutions; see [14] and references therein. As far as exact solutions are concerned, the classic meet-in-the middle approach by Horowitz and Sahni [11], originally designed for the (binary) Knapsack problem, immediately generalizes n to an O∗ (λ⌈ 2 ⌉ )-time1 solution for Multichoice Knapsack. Several important problems can be expressed as special cases of the Multichoice Knapsack problem using folklore reductions (see [14]). This includes the Subset Sum problem, which for a set of n integers asks whether there is a subset summing up to a given integer Q, and the k-Sum problem which, for k = O(1) classes of λ integers, asks to choose one element from each class so that the selected integers sum up to zero. These reductions give immediate hardness results for the Multichoice Knapsack problem, and they can be adjusted to yield the same consequences for Profile Consensus. For the Subset Sum problem, as 1 The O ∗ notation suppresses factors polynomial with respect to the instance size (encoded in binary). 2 shown in [7, 10], the existence of an O∗ (2εn )-time solution for every ε > 0 would violate the Exponential Time Hypothesis (ETH) [13, 15]. Moreover, the O∗ (2n/2 ) running time, achieved in [11], has not been improved yet despite much effort. The 3-Sum conjecture [9] and the more general k-Sum conjecture state k that the 3-Sum and k-Sum problems cannot be solved in O(λ2−ε ) time and O(λ⌈ 2 ⌉(1−ε) ) time, respectively, for any ε > 0. Our Results As the first result, we show how the lookahead scoring technique combined with a data structure for answering longest common prefix queries in a string can be applied to obtain simple and efficient algorithms for the standard pattern matching problems on uncertain sequences. For a weighted sequence, by R we denote the size of its list representation, and by λ the maximal number of letters with score at least 1 z at a single position (thus λ ≤ min(σ, z)). In the Profile Matching problem, we set M as the number of strings that match the scoring matrix with score above Z. In general M ≤ σ m , however, we may assume that for practical data this number is actually much smaller. We obtain the following running times: • O(mσ + n log M ) for Profile Matching; • O(R log2 log λ+n log z) deterministic and O(R+n log z) randomized (Las Vegas, failure with probability R−c for any given constant c) for Weighted Pattern Matching. The more complex part of our study is related to the consensus problems and to the GWPM problem. Instead of considering Profile Consensus, we study the more general Multichoice Knapsack. We introduce parameters based P on the number of solutions with feasible weight or value: AV = |{(c1 , . . . , cn ) : ci ∈ Ci for all i = 1, . . . , n, i v(ci ) ≤ V }|, that is, the number of choices of one element P from each class that satisfy the value threshold; AW = |{(c1 , . . . , cn ) : ci ∈ Ci for all i = 1, . . . , n, i w(ci ) ≤ W }|; A = max(AV , AW ), and a = min(AV , AW ). We obtain algorithms with the following complexities: √ • O(N + aλ log A) for Multichoice Knapsack; √ √ • O(R + zλ(log log z + log λ)) for Weighted Consensus and O(n zλ(log log z + log λ)) for General Weighted Pattern Matching. Since a ≤ A ≤ λn , our running time for Multichoice Knapsack in the worst case matches (up to lower order terms) the time complexities of the fastest known solutions for both Subset Sum (also binary Knapsack) and 3-Sum. The main novel part of our algorithm for Multichoice Knapsack is an appropriate (yet intuitive) notion of ranks of partial solutions. We also provide a simple reduction from Multichoice Knapsack to Weighted Consensus, which lets us transfer the negative results to the GWPM problem. • The existence of an O∗ (z ε )-time solution for Weighted Consensus for every ε > 0 would violate the Exponential Time Hypothesis. • For every ε > 0, an O∗ (z 0.5−ε )-time solution for Weighted Consensus would imply an O∗ (2(0.5−ε)n )time algorithm for Subset Sum. • For every ε > 0, an Õ(R + z 0.5 λ0.5−ε )-time2 solution for Weighted Consensus would imply an Õ(λ2−ε )-time algorithm for 3-Sum. For the higher-order terms our complexities match the conditional lower bounds; therefore, we put significant effort to keep the lower order terms of the complexities as small as possible. 2 The Õ notation ignores factors polylogarithmic with respect to the input size. 3 Model of Computations For problems on weighted sequences, we assume the word RAM model with word size w = Ω(log n + log z) and σ = nO(1) . We consider the log-probability model of representations of weighted sequences, that is, we assume that probabilities in the weighted sequences and the threshold p probability z1 are all of the form c 2dw , where c and d are constants and p is an integer that fits in a constant number of machine words. Additionally, the probability 0 has a special representation. The only operations on probabilities in our algorithms are multiplications and divisions, which can be performed exactly in O(1) time in this model. Our solutions to the Multichoice Knapsack problem only assume the word RAM model with word size w = Ω(log S + log a), where S is the sum of integers in the input instance; this does not affect the O∗ running time. Structure of the Paper We start with Preliminaries, where we formally introduce the problems and the main notions used throughout the paper. The following three sections describe our algorithms: in Section 3 for Profile Matching and Weighted Pattern Matching; in Section 4 for Profile Consensus; and in Section 5 for Weighted Consensus and General Weighted Pattern Matching. A tailor-made, yet more efficient algorithm for General Weighted Pattern Matching is presented in Section 6. We conclude with Section 7, where we introduce faster algorithms and matching lower bounds for Multichoice Knapsack and GWPM in the case that λ is large. 2 Preliminaries Let Σ = {s1 , s2 , . . . , sσ } be an alphabet of size σ. A string S over Σ is a finite sequence of letters from Σ. We denote the length of S by |S| and, for 1 ≤ i ≤ |S|, the i-th letter of S by S[i]. By S[i..j] we denote the string S[i] . . . S[j] called a factor of S (if i > j, then the factor is an empty string). A factor is called a prefix if i = 1 and a suffix if j = |S|. For two strings S and T , we denote their concatenation by S · T (ST in short). For a string S of length n, by lcp(i, j) we denote the length of the longest common prefix of factors S[i..n] and S[j..n]. The following fact specifies a known efficient data structure answering such queries. It consists of the suffix array with its inverse, the LCP table and a data structure for range minimum queries on the LCP table; see [6] for details. Fact 2.1. Let S be a string of length n over alphabet of size σ = nO(1) . After O(n)-time preprocessing, given indices i and j (1 ≤ i, j ≤ n) one can compute lcp(i, j) in O(1) time. The Hamming distance between two strings X and Y of the same length, denoted by dH (X, Y ), is the number of positions where the strings have different letters. 2.1 Profiles In the Profile Matching problem, we consider a scoring matrix (a profile) P of size m × σ. For i ∈ {1, . . . , m} and j ∈ {1, . . . , σ}, we denote the integer score of the letter sj at the position i by P [i, sj ]. The matching score of a string S of length m with the matrix P is Score(S, P ) = m X P [i, S[i]]. i=1 If Score(S, P ) ≥ Z for an integer threshold Z, then we say that the string S matches the matrix P with threshold Z. We denote the number of strings S that math P with threshold Z by NumStringsZ (P ). For a string T and a scoring matrix P , we say that P occurs in T at position i with threshold Z if T [i..i + m − 1] matches P with threshold Z. We denote the set of all positions where P occurs in T by Occ Z (P, T ). These notions let us define the Profile Matching problem: 4 Profile Matching Problem Input: A string T of length n, a scoring matrix P of size m × σ, and a threshold Z. Output: The set Occ Z (P, T ). Parameters: M = NumStringsZ (P ). 2.2 Weighted Sequences A weighted sequence X = X[1] . . . X[n] of length |X| = n over alphabet Σ = {s1 , s2 , . . . , sσ } is a sequence of sets of pairs of the form: (X) X[i] = {(sj , πi (sj )) : j ∈ {1, 2, . . . , σ}}. (X) Here, πi (sj ) is the occurrence probability of the letter sj at the position i ∈ {1, . . . , n}. These values are non-negative and sum up to 1 for a given i. For all our algorithms, it is sufficient that the probabilities sum up to at most 1 for each position. Also, the algorithms sometimes produce auxiliary weighted sequences with sum of probabilities being smaller than 1 on some positions. We denote the maximum number of letters occurring at a single position of the weighted sequence (with non-zero probability) by λ and the total size of the representation of a weighted sequence by R. The standard representation consists of n lists with up to λ elements each, so R = O(nλ). However, the lists can be shorter in general. Also, if the threshold probability 1z is specified, at each position of a weighted sequence it suffices to store letters with probability at least z1 , and clearly there are at most z such letters for each position. This reduction can be performed in linear time, so we shall always assume that λ ≤ z. The probability of matching of a string S with a weighted sequence X, |S| = |X| = m, is P(S, X) = m Y (X) πi (S[i]). i=1 We say that a string S matches a weighted sequence X with probability at least z1 , denoted by S ≈ z1 X, if P(S, X) ≥ z1 . Given a weighted sequence T , by T [i..j] we denote weighted sequence, called a factor of T , equal to T [i] . . . T [j] (if i > j, then the factor is empty). We then say that a string P occurs in T at position i if P matches the factor T [i..i + m − 1]. We also say that P is a z1 -solid factor of T at position i (a 1z -solid prefix if i = 1 and a z1 -solid suffix if j = n). We denote the set of all positions where P occurs in T by Occ z1 (P, T ). Weighted Pattern Matching Problem Input: A string P of length m and a weighted sequence T of length n with at most λ letters at each position and R in total, and a threshold probability z1 . Output: The set Occ z1 (P, T ). 3 Profile Matching and Weighted Pattern Matching In this section we present a solution to the Profile Matching problem. Afterwards, we show that it can be applied for Weighted Pattern Matching as well. For a scoring matrix P , the heavy string of P , denoted H(P ), is constructed by choosing at each position the heaviest letter, that is, the letter with the maximum score (breaking ties arbitrarily). Intuitively, H(P ) is a string that matches P with the maximum score. Observation 3.1. If we have Score(S, P ) ≥ Z for a string S of length m and an m × σ scoring matrix P , then dH (H(P ), S) ≤ ⌊log M ⌋ where M = NumStringsZ (P ). 5 Proof. Let d = dH (H(P ), S). We can construct 2d strings of length |S| that match P with a score above Z by taking either of the letters S[j] or H(P )[j] at each position j such that S[j] 6= H(P )[j]. Hence, 2d ≤ M , which concludes the proof. Our solution for the Profile Matching problem works as follows. We first construct P ′ = H(P ) and the data structure for finding lcp values between suffixes of P ′ and T . Let the variable s store the matching score of P ′ . In the p-th step, we calculate the matching score of T [p..p + m − 1] by iterating through subsequent mismatches between P ′ and T [p..p + m − 1] and making adequate updates in the matching score s′ , which starts at s′ = s. The mismatches are found using lcp-queries. This process terminates when the score s′ drops below Z or when all the mismatches have been found. In the end, we include p in Occ Z (P, T ) if s′ ≥ Z. A pseudocode of this approach is given below for completeness. Theorem 3.2. Profile Matching problem can be solved in O(mσ + n log M ) time. Proof. Let us bound the time complexity of the presented algorithm. The heavy string P ′ can be computed in O(mσ) time. The data structure for lcp-queries in P ′ T can be constructed in O(n + m) time by Fact 2.1. Each query for lcp(P ′ [i..m], T [j..n]) can then be answered in constant time by a corresponding lcp-query in P ′ T , potentially truncated to the end of P ′ . Finally, for each position p in the text T we will consider at most ⌊log M ⌋ + 1 mismatches between P ′ and T , as afterwards the score s′ drops below Z due to Observation 3.1. Procedure ProfileMatching(P , T , Z) m := |P |; n := |T |; Occ := ∅; P ′ := H(P ); Compute structure for lcp-queries in P ′ T ; Pm the data ′ s := j=1 P [j, P [j]]; for p := 1 to n − m + 1 do s′ := s; i := 1; j := p; while s′ ≥ Z and i ≤ m do ∆ := lcp(P ′ [i..m], T [j..n]); i := i + ∆ + 1; j := j + ∆ + 1; if i ≤ m + 1 then s′ := s′ + P [i − 1, T [j − 1]] − P [i − 1, P ′ [i − 1]]; ′ if s ≥ Z then insert p to Occ return Occ; Basically the same approach can be used for Weighted Pattern Matching. In a natural way, we extend the notion of a heavy string to weighted sequences. Now we can restate Observation 3.1 in the language of probabilities instead of scores: Observation 3.3. If a string P matches a weighted sequence X of the same length with probability at least 1 z , then dH (H(X), P ) ≤ ⌊log z⌋. Comparing to the solution to Profile Matching, we compute the heavy string of the text instead of the pattern. An auxiliary variable α stores the matching probability between a factor of H(T ) and the corresponding factor of T ; it needs to be updated when we move to the next position of the text. In the implementation, we perform the following operations on a weighted sequence: • computing the probability of a given letter at a given position, • finding the letter with the maximum probability at a given position. 6 Procedure WeightedPatternMatching(P , T , 1z ) m := |P |; n := |T |; Occ := ∅; T ′ := H(T ); Compute the data structure for lcp-queries in P T ′ ; Qm (T ) α := j=1 πj (T ′ [j]); for p := 1 to n − m + 1 do α′ := α; i := 1; j := p; while α′ ≥ z1 and i ≤ m do ∆ := lcp(P [i..m], T ′ [j..n]); i := i + ∆ + 1; j := j + ∆ + 1; if i ≤ m + 1 then (T ) (T ) α′ := α′ · πj−1 (P [i − 1]) / πj−1 (T ′ [j − 1]); 1 if α′ ≥ z then insert p to Occ if p ≤ n − m then (T ) (T ) α := α · πp+m (T ′ [p + m]) / πp (T ′ [p]); return Occ; In the standard list representation, the latter can be performed on a single weighted sequence in O(1) time after O(R)-time preprocessing. We can perform the former in constant time if, in addition to the list representation, we store the letter probabilities in a dictionary implemented using perfect hashing [8]. This way, we can implement the algorithm in O(n log z + R) time w.h.p. Alternatively, a deterministic dictionary [18] can be used to obtain a deterministic solution in O(R log2 log λ + n log z) time. We arrive at the following result. Theorem 3.4. Weighted Pattern Matching can be solved in O(R + n log z) time with high probability by a Las-Vegas algorithm or in O(R log2 log λ + n log z) time deterministically. Remark 3.5. In the same complexity one can solve the GWPM problem with a solid text. 4 Profile Consensus as Multichoice Knapsack Let us start with a precise statement of the Multichoice Knapsack problem. Multichoice Knapsack Problem Input: A set C of N items partitioned into n disjoint classes Ci , each of size at most λ, two integers v(c) and w(c) for each item c ∈ C, and two thresholds V and W . Question: Does there P P exist a choice S (a set S ⊆ C such that |S ∩ Ci | = 1 for each i) satisfying both v(c) ≤ V and c∈S c∈S w(c) ≤ W ? P P Parameters: AV and AW : the number of choices S satisfying c∈S v(c) ≤ V and c∈S w(c) ≤ W , respectively, as well as A = max(AV , AW ) and a = min(AV , AW ). Indeed we see that the Profile Consensus problem reduces to the Multichoice Knapsack problem. For two m × σ scoring matrices, we construct n = m classes of λ = σ items each, with values equal to the scores of the letters in the first matrix and weights equal to the scores in the second matrix; both thresholds V and W are equal to Z. For a fixed instance of Multichoice Knapsack, we say that S is a partial choice if |S ∩ Ci | ≤P 1 for each class. The setPD = {i : |S ∩ Ci | = 1} is called its domain. For a partial choice S, we define v(S) = c∈S v(c) and w(S) = c∈S w(c). The classic O(2n/2 )-time solution to the Knapsack problem [11] partitions D = {1, . . . , n} into two domains Di of size roughly n/2, and for each Di it generates all partial choices S ordered by v(S). Hence, 7 it reduces the problem to an instance of Multichoice Knapsack with 2 classes. It is solved using the following lemma, proved below for completeness. Lemma 4.1. The Multichoice Knapsack problem can be solved in O(N ) time if n = 2 and the elements c of C1 and C2 are sorted by v(c). Proof. Since the items of C1 and C2 are sorted by v(c), a single scan through these items lets us remove all irrelevant elements, that is, elements dominated by other elements in their class. Next, for each c1 ∈ C1 we compute c2 ∈ C2 such that v(c2 ) ≤ V − v(c1 ) but otherwise v(c2 ) is largest possible. As we have removed irrelevant elements from C2 , this item also minimizes w(c2 ) among all elements satisfying v(c2 ) ≤ V − v(c1 ). Hence, if there is a feasible solution containing c1 , then {c1 , c2 } is feasible. If we process elements c1 by non-decreasing values v(c1 ), the values v(c2 ) do not increase, and thus the items c2 can be computed in O(N ) time in total. The same approach generalizes to Multichoice Knapsack. The partition is chosen √ to balance the number of partial choices in each domain, and the worst-case time complexity is O( Qλ), where Q = Qn |C | is the number of choices. i i=1 Our aim in this section is√to replace Q with the parameter a (which never exceeds Q). The overall running time is going to be O(N + aλ log A): an overhead of O(log A) appears. Two challenges arise once we adapt the meet-in-the-middle approach: how to restrict the set of partial choices to be generated so that a feasible solution is not missed, and how to define a partition D = D1 ∪ D2 to balance the number of partial choices generated for D1 and D2 . A natural idea to deal with the first issue is to consider only partial choices with small values v(S) or w(S). This is close to our actual solution, which is based on the notion of ranks of partial choices. Our approach to the second problem is to consider multiple partitions: those of the form D = {1, . . . , j} ∪ {j + 1, . . . , n} for 1 ≤ j ≤ n. This results in an extra O(n) factor in the time complexity. However, in Section 4.1 we introduce preprocessing that lets us assume A that n = O( log log λ ). While dealing with these two issues, some further effort is required to avoid few other extra terms in the running time. In case of our algorithm, this is only O(log λ), which stems from the fact that we need to keep partial solutions ordered by v(S). For a partial choice S, we define rankV (S) as the number of partial choices S ′ with the same domain for which v(S ′ ) ≤ v(S). We symmetrically define rankW (S). Ranks are introduced as an analogue of probabilities in weighted sequences. Probabilities are multiplicative, while for ranks we have submultiplicativity: Fact 4.2. Assume that S = S1 ∪ S2 is a decomposition of a partial choice S into two disjoint subsets. Then rankV (S1 ) rankV (S2 ) ≤ rankV (S) (and same for rankW ). Proof. Let D1 and D2 be the domains of S1 and S2 , respectively. For every partial choices S1′ over D1 and S2′ over D2 such that v(S1′ ) ≤ v(S1 ) and v(S2′ ) ≤ v(S2 ), we have v(S1′ ∪ S2′ ) = v(S1′ ) + v(S2′ ) ≤ v(S). Hence, S1′ ∪ S2′ must be counted while determining rankV (S). For 0 ≤ j ≤ n, let Lj be the list of partial choices with domain {1, . . . , j} ordered by value v(S), and for (ℓ) ℓ > 0 let VLj be the value v(S) of ℓ-th element of Lj (∞ if ℓ > |Lj |). Analogously, for 1 ≤ j ≤ n + 1, we (r) define Rj as the list of partial choices over {j, . . . , n} ordered by v(S), and for r > 0, VRj as the value of the r-th element of Rj (∞ if r > |Rj |). The following two observations yield a decomposition of each choice into a single item and two partial solutions of a small rank. In particular, we do not need to know AV in order to check if the ranks are sufficiently large. (ℓ) (r) Lemma 4.3. Let ℓ and r be positive integers such that VLj + VRj+1 > V for each 0 ≤ j ≤ n. For every choice S with v(S) ≤ V , there is an index j ∈ {1, . . . , n} and a decomposition S = L ∪ {c} ∪ R such that (r) (ℓ) v(L) < VLj−1 , c ∈ Cj , and v(R) < VRj+1 . 8 (ℓ) Proof. Let S = {c1 , . . . , cn } with ci ∈ Ci and, for 0 ≤ i ≤ n, let Si = {c1 , . . . , ci }. If v(Sn−1 ) < VLn−1 , we set L = Sn−1 , c = cn , and R = ∅, satisfying the claimed conditions. (ℓ) Otherwise, we define j as the smallest index i such that v(Si ) ≥ VLi , and we set L = Sj−1 , c = cj , (ℓ) (ℓ) and R = S \ Sj . The definition of j implies v(L) < VLj−1 and v(L ∪ {c}) ≥ VLj . Moreover, we have (ℓ) (r) (r) v(L ∪ {c}) + v(R) = v(S) ≤ V < VLj + VRj+1 , and thus v(R) < VRj+1 . (ℓ) (r) Fact 4.4. Let ℓ, r > 0. If VLj + VRj+1 ≤ V for some j ∈ {0, . . . , n}, then ℓ · r ≤ AV . Proof. Let L and R be the ℓ-th and r-th entry in Lj and Rj+1 , respectively. Note that v(L ∪ R) ≤ V implies rankV (L ∪ R) ≤ AV by definition of AV . Moreover, rankV (L) ≥ ℓ and rankV (R) ≥ r (the equalities may be sharp due to draws). Now, Fact 4.2 yields the claimed bound. Note that Lj can be obtained by interleaving |Cj | copies of Lj−1 , where each copy corresponds to extending the choices from Lj−1 with a different item. If we were to construct Lj having access to the whole Lj−1 , we could proceed as follows. For each c ∈ Cj , we maintain an iterator on Lj−1 pointing to the first element S on Lj−1 for which S ∪ {c} has not yet been added to Lj . The associated value is v(S ∪ {c}). All iterators initially point at the first element of Lj−1 . Then the next element to append to Lj is always S ∪ {c} corresponding to the iterator with minimum value. Having processed this partial choice, we advance the pointer (or remove it, once it has already scanned the whole Lj−1 ). This process can be implemented using a binary heap Hj as a priority queue, so that initialization requires O(|Cj |) time and outputting a single element takes O(log |Cj |) time. (r) (r) For all r ≥ 0, let Lj be the prefix of Lj of length min(r, |Lj |) and Rj be the prefix of Rj of length min(r, |Rj |). A technical transformation of the procedure stated above leads to an online algorithm that (r) (r) constructs the prefixes Lj and Rj . Along with each reported partial choice S, the algorithm also computes w(S). (i) (i) Lemma 4.5. After O(N )-time initialization, one can construct L1 , . . . , Ln online for i = 0, 1, . . ., spending (i) (i) O(n log λ) time per each step. Symmetrically, one can construct R1 , . . . , Rn in the same time complexity. (r) Proof. Our online algorithm is going to use the same approach as the offline computation of lists Lj . The order of computations is going to be changed, though. (i−1) with a single element (unless the whole Lj has At each step, for j = 1 to n we shall extend lists Lj been already generated) from the top of the heap Hj . Note that this way each iterator in Hj always points (i−1) to an element that is already in Lj−1 or to the first element that has not been yet added to Lj−1 , which is represented by the top of the heap Hj−1 . We initialize the heaps as follows: we introduce H0 which represents the empty choice ∅ with v(∅) = 0. Next, for j = 1, . . . , n we build the heap Hj representing |Cj | iterators initially pointing to the top of Hj−1 . The initialization takes O(N ) time in total since a binary heap can be constructed in time linear in its size. (i−1) (i−1) are extended for consecutive values j from 1 to n. Since Lj−1 is extended At each step, the lists Lj (i−1) before Lj (i) (i) , all iterators in Hj point to the elements of Lj−1 while we compute Lj . We take the top of (i) Hj and move it to Lj . Next, we advance the corresponding iterator and update its position in the heap Hj . After this operation, the iterator might point to the top of Hj−1 . If Hj−1 is empty, this means that the whole list Lj−1 has already been generated and traversed by the iterator. In this case, we remove the iterator. It is not hard to see that this way we indeed simulate the previous P offline solution. A single phase makes O(1) operations on each heap Hj . The running time is bounded by O( j log |Cj |) = O(n log λ) at each step of the algorithm. The reduction of the following lemma is presented in Section 4.1. Note that we may always assume that λ ≤ a ≤ A. Indeed, if we order the items c ∈ Ci according to v(c), then only the first AV of them might belong to a choice S with v(S) ≤ V . 9 Lemma 4.6. Given an instance I of the Multichoice Knapsack problem, one can compute in O(N + A λ log A) time an equivalent instance I ′ with A′V ≤ AV , A′W ≤ AW , λ′ ≤ λ, and n′ = O( log log λ ). √ Theorem 4.7. Multichoice Knapsack can be solved in O(N + aλ log A) time. √ Proof. Below, we give an algorithm in O(N + AV λ log A) time. The final solution runs it in parallel on the original instance and on the instance with v and V swapped with w and W , waiting until at least one of them terminates.   (r) (ℓ) We increment an integer r starting from 1, maintaining ℓ = λr and the lists Lj and Rj+1 for 0 ≤ j ≤ n, (r) (ℓ) as long as VLj + VRj+1 ≤ V for some j (or until all the lists have been completely generated). By Fact 4.4, √ A we stop at r = O( AV λ). Lemma 4.6 lets us assume that n = O( log log λ ), so the running time of this phase √ is O(N + AV λ log A) due to Lemma 4.5. (ℓ) Due to Lemma 4.3, every feasible solution S admits a decomposition S = L ∪ {c} ∪ R with L ∈ Lj−1 , (r) c ∈ Cj , and R ∈ Rj+1 for some index j. We consider all possibilities for j. For each of them we will reduce √ searching for S to an instance of the Multichoice √ Knapsack problem with N ′ = O( AV λ) and n′ = 2. √ A By Lemma 4.1, these instances can be solved in O(n AV λ) = O( AV λ log log λ ) time in total. (ℓ) (r) (ℓ) The items of the j-th instance are going to belong to classes Lj−1 ⊙ Cj and Rj+1 , where Lj−1 ⊙ Cj = (ℓ) (ℓ) {L∪{c} : L ∈ Lj−1 , c ∈ Cj }. The set Lj−1 ⊙Cj can be constructed by merging |Cj | ≤ λ sorted lists each of size p √ √ A ℓ = O( AV /λ), i.e., in O( AV λ log λ) time. Summing up over all indices j, this gives O( AV λ log λ log log λ ) = √ O( AV λ log A) time. Clearly, each feasible solution of the constructed instances represents a feasible solution of the initial instance, and by Lemma 4.3, every feasible solution of the initial instance has its counterpart in one of the constructed instances. 4.1 Proof of Lemma 4.6 Our reduction consists of two steps. Its implementation uses the following notions: For each class Ci , let Pn vmin (i) = min{v(c) : c ∈ Ci }. Also, let Vmin = i=1 vmin (i); note that Vmin is the smallest possible value v(S) of a choice S. We symmetrically define wmin (i) and Wmin . First, we make sure that n = O(log A). Lemma 4.8. Given an instance I of the Multichoice Knapsack problem, one can compute in linear time an equivalent instance I ′ with N ′ ≤ N , A′V ≤ AV , A′W ≤ AW , λ′ ≤ λ, and n′ ≤ 2 log A. Proof. Observe that if some class Ci contains a single item c for which both v(c) = vmin (i) and w(c) = wmin (i), then we can greedily include it in the solution S. Hence, we can remove such a class, setting V := V − vmin (i) and W := W − wmin (i). We execute this reduction rule exhaustively, which clearly takes O(N ) time in total and may only decrease the parameters AV and AW . After the reduction, each class contains at least two items. We shall prove that now we can either find out that A ≥ 2n/2 or that we are dealing with a NO-instance. To decide which case holds, let us define ∆V (i) as the difference between the second smallest value in the n smallest values ∆V (i) for 1 ≤ i ≤ n; multiset {v(c) : c ∈ Ci } and vmin (i). We set ∆mid as the sum of the V 2 analogously we define ∆mid . W n/2 Claim. If Vmin + ∆mid ≤ V , then AV ≥ 2n/2 ; if Wmin + ∆mid ; otherwise, we are V W ≤ W , then AW ≥ 2 dealing with a NO-instance. Proof. First, assume that Vmin + ∆mid ≤ V . This means that there is a choice S with v(S) ≤ V containing V at least n2 items c such that rankV (c) ≥ 2. Fact 4.2 yields rankV (S) ≥ 2⌈n/2⌉ and consequently AV ≥ 2n/2 , n/2 as claimed. Symmetrically, if Wmin + ∆mid . W ≤ W , then AW ≥ 2 Now, suppose that there is a feasible solution S. As no class contains a single item minimizing both v(c)     and w(c), there are at least n2 classes for which S contains an item not minimizing v(c), or at least n2 10 classes for which S contains an item not minimizing w(c). Without loss of generality, we assume that the   former holds. Let D be the set of at least n2 classes i satisfying the condition. If c ∈ Ci does not minimize P v(c), then v(c) ≥ vmin (i) + ∆V (i). Consequently, V ≥ v(S) = Vmin + i∈D ∆V (i). However, observe that P mid mid i∈D ∆V (i) ≥ ∆V , so V ≥ Vmin + ∆V , as claimed. The conditions from the claim can be verified in O(N ) time using a linear-time selection algorithm to compute ∆mid and ∆mid V W . If any of the first two conditions holds, we return the instance obtained using our reduction. Otherwise, we output a dummy NO-instance. Before we proceed with the second reduction, let us introduce an auxiliary notion. An item c ∈ Cj is irrelevant if there is another item c′ ∈ Cj that dominates c, i.e., such that v(c) > v(c′ ) and w(c) > w(c′ ). Removing irrelevant items leads to an equivalent instance of the Multichoice Knapsack problem, and it may only decrease the parameters. Lemma 4.9. Consider a class of items in an instance of the Multichoice Knapsack problem. In linear time, we can remove some irrelevant items from the class so that the resulting class C satisfies max(rankV (c), rankW (c)) > 13 |C| for each item c ∈ C. Proof. First, note that using a linear-time selection algorithm, we can determine for each item c whether rankV (c) ≤ 13 |C| and whether rankW (c) ≤ 13 |C|. If there is no item satisfying both conditions, we keep C unaltered. Otherwise, we have an item which dominates at least |C| − rankV (c) − rankW (c) ≥ 31 |C| other items. We scan through all items in C and remove those dominated by c. Next, we repeat the algorithm. The running time of a single phase is clearly linear, and since |C| decreases geometrically, the total running time is also linear. A straightforward way to decrease the number of classes is to replace two distinct classes Ci , Cj with their Cartesian product Ci × Cj , assuming that the weight of a pair (ci , cj ) is the sum of weights of ci and cj . This clearly leads to an equivalent instance of the Multichoice Knapsack problem, does not alter the parameters AV , AW , and decreases n. On the other hand N and λ may increase; the latter happens only if |Ci | · |Cj | > λ. These two reduction rules let us implement our reduction procedure which constitutes the proof of Lemma 4.6. Proof. First, we apply Lemma 4.8 to make sure that n ≤ 2 log A and N = O(λ log A). We may now assume A that λ ≥ 36 , as otherwise we already have n = O( log log λ ). √ Throughout the algorithm, whenever there are distinct classes of size at most λ, we shall replace them with their Cartesian product. This may happen only n − 1 times, and a single execution takes O(λ) time, so the total running time needed for this part is O(λ log A). Furthermore, for every class that we get in the input instance or obtain as a Cartesian product, we apply Lemma 4.9. The total running time spent on this is also O(λ log A). exhaustively applied these reduction rules, we are guaranteed that max(rankV (c), rankW (c)) > √ Having 1 1 3 for items c from all but one class. Without loss of generality, we assume that the classes satisfying λ ≥ λ 3 this condition are C1 , . . . , Ck . Recall that vmin (i) and wmin (i) are defined as minimum values and weights of items in class Ci and that V between the min  1  and Wmin are their sums over all classes. For 1 ≤ i ≤ k, we define ∆V (i) as the difference as the sum of the λ 3 -th smallest value in the multiset {v(c) : c ∈ Ci } and vmin (i). Next, we define ∆mid V k mid smallest values ∆ (i). Symmetrically, we define ∆ (i) and ∆ . We shall prove a claim analogous to V W W 2 that in the proof of Lemma 4.8. 1 1 6 k ; otherwise, we are Claim. If Vmin + ∆mid ≤ V , then AV ≥ λ 6 k ; if Wmin + ∆mid W ≤ W , then AW ≥ λ V dealing with a NO-instance. 11 Proof. First, suppose that Vmin + ∆mid ≤ V . This means that there is a choice S with v(S) ≤ V which V 1 1 contains at least k2 items c with rankV (c) ≥ λ 3 . By Fact 4.2, the rank of this choice is at least λ 6 k , so 1 AV ≥ λ 6 k , as claimed. The proof of the second case is analogous. 1 Now, suppose that there is a feasible solution S = {c1 , . . . , cn }. For 1≤ i ≤ k, we have rankV (ci ) ≥ λ 3 1 1 1 or rankW (ci ) ≥ λ 3 . Consequently, rankV (ci ) ≥ λ 3 holds for at least k2 classes or rankW (ci ) ≥ λ 3 holds   for at least k2 classes. Without loss of generality, we assume that the former holds. Let D be the set of (at   least k2 ) classes i satisfying the condition. For each i ∈ D, we clearly have v(c Pi ) ≥ vmin (i) + ∆V (i), while for each i ∈ / D, we have v(ci ) ≥ vmin (i). Consequently, V ≥ v(S) ≥ Vmin + i∈D ∆V (i) ≥ Vmin + ∆mid V . , which concludes the proof. Hence, V ≥ Vmin + ∆mid V The condition from the claim can be verified using a linear-time selection algorithm: first, we apply it for each class to compute ∆V (i) and ∆W (i), and then, globally, to determine ∆mid and ∆mid V W . If one of the 1 first two conditions hold, we return the instance obtained through the reduction. It satisfies A ≥ λ 6 k , i.e., log A n ≤ 1 + k ≤ 1 + 6 log λ . Otherwise, we construct a dummy NO-instance. 5 Weighted Consensus and General Weighted Pattern Matching The Weighted Consensus problem is formally defined as follows. Weighted Consensus Problem Input: Two weighted sequences X and Y of length n with at most λ letters at each position and R in total, and a threshold probability z1 . Output: A string S such that S ≈ z1 X and S ≈ z1 Y or NONE if no such string exists. If two weighted sequences satisfy the consensus, we write X ≈ z1 Y and say that X matches Y with probability z1 . With this definition of a match, we extend the notion of an occurrence and the notation Occ z1 (P, T ) to arbitrary weighted sequences. General Weighted Pattern Matching (GWPM) Problem Input: Two weighted sequences P and T of length m and n, respectively, with at most λ letters at each position and R in total, and a threshold probability 1z . Output: The set Occ z1 (P, T ). In the case of the GWPM problem, it is more useful to provide an oracle that finds solid factors that correspond to particular occurrences of the pattern. Such an oracle, given i ∈ Occ z1 (P, T ), computes a string that matches both P and T [i..i + m − 1]. We say that a string P is a maximal 1z -solid prefix of a weighted sequence X if P is a z1 -solid prefix of X and no string P ′ = P s, for s ∈ Σ, is a z1 -solid prefix of X. Our algorithms rely on the following simple combinatorial observation, originally due to Amir et al. [1]. Fact 5.1 ([1]). A weighted sequence has at most z different maximal 1 z -solid prefixes. The Weighted Consensus problem is actually a special case of Multichoice Knapsack. Namely, given an instance of the former, we can create an instance of the latter with n classes Ci , each containing an item ci,s for every letter s which has non-zero probability at position i in both X and Y . We set (Y ) (X) v(ci,s ) = − log πi (s) and w(ci,s ) = − log πi (s) for this item, whereas the thresholds are V = W = log z. It is easy to see that this reduction indeed yields an equivalent instance and that it can be implemented in linear time. By Fact 5.1, we have A ≤ z for this instance, so Theorem 4.7 yields the following result: √ Corollary 5.2. Weighted Consensus problem can be solved in O(R + zλ log z) time. 12 The GWPM problem√can be clearly reduced to n + m − 1 instances of Weighted Consensus. This leads to a naive O(nR+ n zλ log z)-time algorithm. Below, we remove the first term in this complexity. Our solution applies the approach used in Section 3 for Weighted Pattern Matching and uses an observation analogous to Observation 3.3. Observation 5.3. If X and Y are weighted sequences that match with threshold z1 , then dH (H(X), H(Y )) ≤ 2 ⌊log z⌋. Moreover there exists a consensus string S such that S[i] = H(X)[i] = H(Y )[i] unless H(X)[i] 6= H(Y )[i]. Our algorithm starts by computing P ′ = H(P ) and T ′ = H(T ) and the data structure for lcp-queries in P T ′ . We try to match P with every factor T [p..p + m − 1] of the text. Following Observation 5.3, we check if dH (T ′ [p..p + m − 1], P ′ ) ≤ 2 ⌊log z⌋ . If not, then we know that no match is possible. Otherwise, let D be the Q (T ) ′ set of positions of mismatches between T ′ [p..p+m−1] and P ′ . Assume that we store α = m j=1 πp+j−1 (T [p+ Q Qm (P ) ′ (T ) ′ j − 1]) and β = j=1 πj (P [j]). Then, in O(|D|) time we can compute α′ = j ∈D / πp+j−1 (T [p + j − 1]) Q (P ) ′ and β ′ = j ∈D / πj (P [j]). Now, we only need to check what happens at the positions in D. If D = ∅, then it suffices to check if α ≥ z1 and β ≥ z1 . Otherwise, we construct two weighted sequences X and Y by selecting only the positions from D in T [p..p + m − 1] and in P . We multiply the probabilities of all letters at the first position in X by α′ and in Y by β ′ . It is clear that X ≈ z1 Y if and only if T [p..p + m − 1] ≈ z1 P . Thus, we reduced the GWPM problem to at most n−m+1 instances of the Weighted Consensus prob√ lem√for strings of length O(log z). By Corollary 5.2, solving such an instance takes O(λ log z + zλ log z) = O( zλ log z) time. Our reduction √ requires O(R log2 log λ) time to preprocess the input (as in Theorem 3.4), but this is dominated by the O(n zλ log z) total time of solving the Weighted Consensus instances. If we memorize the solutions to all those instances together with the sets of mismatches D that lead to those instances, then we can also implement the oracle for the GWPM problem with O(m)-time queries. In Section 6, we design a tailor-made solution to replace the generic algorithm for the Multichoice Knapsack problem, which lets us improve the log z factor to log log z + log λ. The following reduction from Multichoice Knapsack to Weighted Consensus immediately yields that any significant improvement in the dependence on z and λ in the running time of our algorithm would lead to breaking long-standing barriers for special cases of Multichoice Knapsack. ′ Lemma 5.4. Given an instance I of the Multichoice Knapsack problem with n classes of size λ, linear Qin n time one can construct an equivalent instance of the Weighted Consensus problem with z = O( i=1 |Ci |) and sequences of length O(n) over alphabet of size λ. Proof. We construct a pair of weighted sequences X, Y of length n over alphabet Σ = {1, . . . , λ}. Intuitively, choosing letter j at position i will correspond to taking the j-th element of Ci to the solution S, which we denote as ci,j . Without loss of generality, we assume that weights and values are non-negative. Otherwise, we may subtract vmin (i) from v(ci,j ) and wmin (i) from w(ci,j ) for each item ci,j , as well Vmin from V and Wmin from W . (X) (X) We set M to the smallest power of two such that M ≥ max(n, V, W ). Let pi (j) = log πi (j) and (Y ) (Y ) pi (j) = log πi (j) for j ∈ Σ. For j ∈ {1, . . . , |Ci |}, we set: ⌈M log |Ci |⌉ + w(ci,j ) ⌈M log |Ci |⌉ + v(ci,j ) (Y ) , pi (j) = − . M M P|Ci | p(Y ) (j) ≤ 1 and j=1 2 i ≤ 1. Moreover, we set (X) pi Clearly, P|Ci | j=1 (X) 2pi log zX (j) (j) = − 1 = M V + n X i=1 ⌈M log |Ci |⌉ ! and 1 1 log zY = M By the choice of M , we have max(zX , zY ) ≤ 2 M (max(V,W )+n) 13 Qn i=1 W+ |Ci | ≤ 4 n X i=1 Qn i=1 ! ⌈M log |Ci |⌉ . |Ci |. This way, for a string P of length n, we have 1 log P(P, X) = − M and 1 log P(P, Y ) = − M n X i=1 n X i=1 ⌈M log |Ci |⌉ + ⌈M log |Ci |⌉ + n X ! ≥ − log zX ⇐⇒ ! ≥ − log zY ⇐⇒ v(ci,P [i] ) i=1 n X w(ci,P [i] ) i=1 n X i=1 n X i=1 v(ci,P [i] ) ≤ V w(ci,P [i] ) ≤ W. Thus, P is a solution to the constructed instance of the Weighted Consensus problem with two threshold probabilities, z1X and z1Y , if and only if S = {ci,j : P [i] = j} is a solution to the underlying instance of the Multichoice Knapsack problem. To have a single threshold z = max(zX , zY ), we append (X) (Y ) an additional position n + 1 with symbol 1 only, with pn+1 (1) = 0 and pn+1 (1) = log zY − log zX provided that zX ≥ zY , and symmetrically otherwise. If one wants to make sure that the probabilities at each position sum up to exactly one, two further letters can be introduced, one of which gathers the remaining probability in X and has probability 0 in Y , and the other gathers the remaining probability in Y , and has probability 0 in X. Theorem 5.5. Weighted Consensus problem is NP-hard and cannot be solved in: 1. O∗ (z o(1) ) time unless the Exponential Time Hypothesis (ETH) fails; 2. O∗ (z 0.5−ε ) time for some ε > 0, unless there is an O∗ (2(0.5−ε)n )-time algorithm for the Subset Sum problem; 3. Õ(R + z 0.5λ0.5−ε ) time for some ε > 0 and for n = O(1), unless there is an O(λ2(1−ε) )-time algorithm for 3-Sum. Proof. We use Lemma 5.4 to derive algorithms for the Multichoice Knapsack problem based on hypothetical solutionsQfor Weighted Consensus. Subset Sum is a special case of Multichoice Knapsack with λ = 2, i.e., i |Ci | = 2n . Hence, an O∗ (z o(1) )-time solution for Weighted Consensus would yield an O∗ (2o(n) )-time algorithm for Subset Sum, which contradicts ETH by the results of Etscheid et al. [7] and Gurari [10]. Similarly, an O∗ (z 0.5−ε )-time solution for Weighted Consensus would yield an O∗ (2(0.5−ε)n )time algorithm for Subset Sum. Moreover, k-Sum is a special case of Multichoice Knapsack with Q n = k = O(1), i.e., i |Ci | = λk . Hence, an Õ(R + z 0.5 λ0.5−ε )-time solution for Weighted Consensus yields an O(λ + λ1.5+0.5−ε ) = O(λ2−ε )-time algorithm for 3-Sum. Nevertheless, it might still be possible to improve the dependence on n in the GWPM problem. For example, one may hope to achieve Õ(nz 0.5−ε + z 0.5 ) time for λ = O(1). 6 Faster GWPM via Short Dissimilar Weighted Consensus This section provides a faster solution for the General Weighted Pattern Matching problem. The key ingredient is an improved solution for the following Short Dissimilar Weighted Consensus problem: Short Dissimilar Weighted Consensus (SDWC) Problem Input: A threshold probability z1 and two weighted sequences X and Y of length n ≤ 2 ⌊log z⌋ with at most λ ≤ z letters at each position and such that H(X) and H(Y ) are dissimilar, i.e., H(X)[i] 6= H(Y )[i] for each position i. Output: A string S such that S ≈ z1 X and S ≈ z1 Y or NONE if no such string exists. 14 Note that the instances of the Weighted Consensus problem produced by the reduction of Section 5 are√actually instances of the SDWC problem. Our tailor-made solution for the SDWC problem works in O( zλ(log log z + log λ)) time. It assumes that the letters at each position of the weighted sequences are sorted according to probabilities (in addition to storing the dictionary of letters and probabilities). This can be achieved in O(λ log λ) time for each position. We have just proved: Lemma 6.1. The GWPM problem and the computation of its oracle can be reduced in O(nλ log λ) time to at most n − m + 1 instances of the SDWC problem. 6.1 Combinatorial Prerequisites Our improvement upon the algorithm of Theorem 4.7 is based on Fact 5.1, whose analogue does not hold for Multichoice Knapsack in general. Technically, instead of the notion of maximal z1 -solid prefixes, the algorithm relies on light 1z -solid prefixes defined as follows: We say that a string P of length k is a light 1 1 z -solid prefix of a weighted sequence X if k = 0 or P is a z -solid prefix of X such that P [k] 6= H(X)[k]. We 1 symmetrically define light z -solid suffixes of X. Fact 5.1 lets us bound the number of light solid prefixes. Fact 6.2. A weighted sequence has at most z different light 1 z -solid prefixes. Proof. We show a pair of inverse mappings between the set of maximal 1z -solid prefixes of a weighted sequence X and the set of light z1 -solid prefixes of X. If P is a maximal z1 -solid prefix of X, then we obtain a light 1 z -solid prefix by removing all trailing letters of P that are heavy letters at the corresponding positions in X. For the inverse mapping, we extend each light z1 -solid prefix by heavy letters as long as the prefix is 1 z -solid. We use the notions of light 1z -solid prefixes and light 1z -solid suffixes to express a result that we will use instead of Lemma 4.3 and Fact 4.4. Lemma 6.3. Consider an instance of the SDWC problem, and let zℓ , zr ≥ 1 be real numbers such that zℓ · zr ≥ z. Every consensus string S can be decomposed into S = L · c · C · R such that the following conditions hold for some U, V ∈ {X, Y }: • L is a light 1 zℓ -solid prefix of U , • c is a single letter, • all characters of C are heavy in V , • R is a light 1 zr -solid suffix of V . Proof. We set L as the longest proper prefix of S which is a z1ℓ -solid prefix of both X and Y , and we define k := |L|. Note that L is a light z1ℓ -solid prefix of X or Y , because H(X) and H(Y ) are dissimilar. If k = n−1, we conclude the proof setting c = S[n] and C = R to empty strings. Otherwise, we have P(S[1..k + 1], V [1..k + 1]) < z1ℓ for V = X or V = Y . Since P(S, V ) ≥ z1 and zℓ · zr ≥ z, this implies P(S[k + 2..n], V [k + 2..n]) ≥ z1r , i.e., that C · R = S[k + 2..n] is a z1r -solid suffix of V . We set C as the longest prefix of S[k + 2..n] composed of letters heavy in V . This way R is clearly a light 1 zr -solid suffix of V . 6.2 Computing Light Solid Prefixes We say that a string P is a common 1z -solid prefix (suffix) of X and Y if it is a z1 -solid prefix (suffix) of both X and Y . A standard representation of a common 1z -solid prefix P of length k of X and Y is a triple (P, p1 , p2 ) such that p1 and p2 are the probabilities p1 = P(P, X[1..k]) and p2 = P(P, Y [1..k]). The string P is written using variable-length encoding so that a letter that occurs at a given position with probability p in X or Y has a representation that consists of O(log p1 ) bits. For every position i, the encoding can be 15 (X) (Y ) constructed as follows: we sort letters c according to max(πi (c), πi (c)) and assign subsequent integer identifiers according to this order. This lets us store a z1 -solid factor using O(log z) bits: we concatenate the variable-length representations of its letters and we store a bit mask of size O(log z) that stores the delimiters between the representations of single letters. An analogous representation can be applied also to common 1 z -solid suffixes. Our assumptions on the model of computations imply that the standard representation takes constant space. Moreover, constant time is sufficient to extend a common z1 -solid prefix by a given letter. The following observation describes longer light solid prefixes in terms of shorter ones. Observation 6.4. Let P be a non-empty light z1 -solid prefix of X. If one removes its last letter and then removes all the trailing letters which are heavy at the respective positions in X, then a shorter light 1z -solid prefix of X is obtained. We build upon Observation 6.4 to derive an efficient algorithm constructing light solid prefixes. Lemma 6.5. Let (X, Y, z1 ) be an instance of the SDWC problem and let z ′ ≤ z. All common z1 -solid prefixes of X and Y being light z1′ -solid prefixes of X, sorted first by their length and then by the probabilities in X, can be generated in O(z ′ (log log z + log λ) + log2 z) time. Proof. For k ∈ {0, . . . , n}, let Bk be a list P of the requested solid prefixes of length k sorted by their proban bilities p1 in X. Fact 6.2 guarantees that k=0 |Bk | ≤ z ′ . We compute the lists Bk for subsequent lengths k. We start with B0 containing the empty string with its probabilities p1 = p2 = 1. To compute Bk for k > 0, we use Observation 6.4. We consider all candidates i = k − 1, . . . , 0 for the length of the shorter light z1′ -solid prefix, and then all letters s 6= H(X)[k] to put at position k of the new light z1′ -solid prefix. For a given i, we iterate over all elements (P, p1 , p2 ) of Bi ordered by the non-increasing probabilities p1 , and try to extend each of them by the heavy letters in X at positions i + 1, . . . , k − 1 and by the letter s (X) at position k. We process the letters s ordered by πk (s), ignoring the first one (H(X)[k]) and stopping as soon as we do not get a z1′ -solid prefix of X. More precisely, with X ′ = H(X), we compute p′1 := p1 · p′1 1 z′ k−1 Y j=i+1 1 z, (X) πj (X) (X ′ [j]) · πk (s) and p′2 := p2 · j=i+1 (Y ) πj (Y ) (X ′ [j]) · πk (s), check if ≥ and, if so, insert (P · X [i + 1..k − 1] · s, p′1 , p′2 ) at the beginning of a new list and ≥ Li,s , indexed both by the letter s and by the length i of the shorter light z1′ -solid prefix. When we encounter an element (P, p1 , p2 ) of Bi and a letter s for which p′1 < z1′ , we proceed to the next element of Bi . If this happens for the heaviest letter s 6= H(X)[k], we stop considering the current list Bi and proceed to Bi−1 . The final step consists in merging all the kλ lists Li,s in the order of probabilities in X; the result is Bk . Let us analyse the time complexity of the k-th step of the algorithm. If an element (P, p1 , p2 ) and letter s that we consider satisfy p′1 ≥ z1′ , this accounts for a new light z1′ -solid prefix of X. Hence, in total (over all steps) we consider O(z ′ ) such elements. Note that some of these elements may be discarded due to the condition on p′2 . For each inspected element (P, p1 , p2 ), we also consider at most one letter s for which p′1 is not sufficiently large. If this is not the only letter considered for this element, such candidates can be charged to the previous class. The opposite situation may happen once for each list Bi , which may give O(k) additional operations in the k-th step, O(log2 z) in total. Qk−1 (X) Thanks to the order in which the lists are considered, the products of probabilities j=i+1 πj (X ′ [j]), Qk−1 (Y ) ′ ′ j=i+1 πj (X [j]) and factors X [i + 1..k − 1] can be stored so that the representation of each subsequent 1 light √z -solid prefix of length k is computed in O(1) time. Finally, the merging step in the k-th phase takes O(|Bk | log(kλ)) = O(|Bk |(log log z + log λ)) time if a binary heap Pnis used. The time complexity of the whole algorithm is O(log2 z + k=1 |Bk |(log log z + log λ)). By the already mentioned Fact 6.2, this is O(log2 z + z ′ (log log z + log λ)). p′2 ′ k−1 Y 16 6.3 Merge-in-the-Middle Implementation In this section we apply Lemma 6.3 to solve the SDWC problem. We use Lemma 6.5 to generate all candidates for L · c and R, and we apply a divide-and-conquer procedure to fill this with C. Our procedure works for fixed U, V ∈ {X, Y }; the algorithm repeats it for all four choices. √ Let Li denote a list of all common z1 -solid prefixes of X and Y obtained by extending a light √λz -solid prefix of U of length i − 1 by a single letter s at position i, and let Ri denote a list of all common 1z -solid suffixes of X and Y of length n − i + 1 that are light √1zλ -solid suffixes of V . We assume that the lists Li and Ri are sorted according to the probabilities in U and V , respectively. √ Lemma 6.6. The lists √ Li and Ri for i ∈ {1, . . . , n + 1} can be computed in O( zλ(log log z + log λ)) time. Their total size is O( zλ). √ Proof. O( zλ(log log z + log λ))-time computation of the lists Ri is directly due to Lemma 6.5. As for the √ √ lists Li , we first compute in O( √λz (log log z + log λ)) time the lists of all light √λz -solid prefixes of U , sorted by the lengths of strings and then by the probabilities in U , again using Lemma 6.5. Then for each length i − 1 and for each letter s at the i-th position, we extend all these prefixes by a single letter. This way we obtain λ lists for a given i − 1 that can be merged according to the probabilities in U to form the list Li . √ √ Generation of the auxiliary lists takes O( √λz · λ) = O( zλ) time in total, and merging them using a binary √ √ heap takes O( zλ log λ) time. This way we obtain an O( zλ(log log z + log λ))-time algorithm. Let L∗a,b be a list of common 1z -solid prefixes of X and Y of length b obtained by taking a common z1 solid prefix from Li for some i ∈ {a, . . . , b} and extending it by b − i letters that are heavy at the respective positions in V . Similarly, R∗a,b is a list of common 1z -solid suffixes of length n − a + 1 obtained by taking a common z1 -solid suffix from Ri for some i ∈ {a, . . . , b} and prepending it by i − a letters that are heavy in V . Again, we assume that each of the lists L∗a,b and R∗a,b is sorted according to the probabilities in U and V , respectively. A basic interval is an interval [a, b] represented by its endpoints 1 ≤ a ≤ b ≤ n + 1 such that 2j | a − 1 and b = min(n + 1, a + 2j − 1) for some integer j called the layer of the interval. For every j = 0, . . . , ⌈log n⌉, there are Θ( 2nj ) basic intervals and they are pairwise disjoint. Example 6.7. For n = 7, the basic intervals are [1, 1], . . . , [8, 8], [1, 2], [3, 4], [5, 6], [7, 8], [1, 4], [5, 8], [1, 8]. √ Lemma 6.8. The lists L∗a,b and R∗a,b for all basic intervals [a, b] use O( zλ log log z) space and can be √ constructed in O( zλ(log log z + log λ)) time. Proof. We compute all the lists L∗a,b and R∗a,b for consecutive layers j = 0, . . . , ⌈log n⌉ of basic intervals [a, b]. For j = 0, we have L∗a,a = La and R∗a,a = Ra . Suppose that we wish to compute L∗a,b for a < b at layer j (the computation of R∗a,b is symmetric). Take c = a + 2j−1 − 1. Let us iterate through all the elements (P, p1 , p2 ) of the list L∗a,c , extend each string P by H(V )[c + 1..b], and multiply the probabilities p1 and p2 by b b Y Y (Y ) (X) πi (H(V )[i]), πi (H(V )[i]) and i=c+1 i=c+1 common 1z -solid prefix is obtained, it is inserted merged with L∗c+1,b according to the probabilities compute L∗a,b in time proportional to the sum of respectively. If a at the end of an auxiliary list L. The resulting list L is in U ; the result is L∗a,b . Thus, we can lengths of L∗a,c and L∗c+1,b . (Note that the necessary products of probabilities can be computed in O(n) = O(log z) total time.) For every j = 1, . . . , ⌈log n⌉, the total length of the lists from the j-th layer does not exceed√the total length of the lists from the (j − 1)-th layer. By Lemma 6.6, the lists at the 0-th layer have size O( zλ). The conclusion follows from the fact that log n = O(log log z). Next, we provide an analogue of Lemma 4.1. 17 Lemma 6.9. Let L and R be lists containing, for some k ∈ {0, . . . , n}, standard representations of common 1 1 z -solid prefixes of length k and common z -solid suffixes of length n − k of X and Y . If the elements of each list are sorted according to non-decreasing probabilities in X or Y , one can check in O(|L| + |R|) time whether the concatenation of any z1 -solid prefix from L and z1 -solid suffix from R yields a string S such that S ≈ z1 X and S ≈ z1 Y . Proof. First, we filter out dominated elements of the lists, i.e., elements (P, p1 , p2 ) such that there exists another element (P ′ , p′1 , p′2 ) with p′1 > p1 and p′2 > p2 . After this operation, we make sure that both lists are sorted with respect to the non-decreasing probabilities in X; this might require reversing the list. For every element (P, p1 , p2 ) of L, we compute the first (leftmost) element (P ′ , p′1 , p′2 ) of R such that ′ p1 p1 ≥ 1z . This element maximizes p′2 among all elements satisfying the latter condition. Hence, it suffices to check if p2 p′2 ≥ z1 , and if so, report the result S = P P ′ . As the lists are ordered by p1 and p′1 , respectively, all such elements can be computed in O(|L| + |R|) total time. Finally, we are ready to apply a divide-and-conquer approach to the SDWC problem: √ Lemma 6.10. The SDWC problem can be solved in O( zλ(log log z + log λ)) time. Proof. The algorithm goes along Lemma 6.3, considering all choices of U and V . For each of them, we proceed as follows: First, we compute the lists Li , Ri and L∗a,b , R∗a,b for all basic intervals. By Lemmas 6.6 and 6.8, this takes √ O( zλ(log log z + log λ)) time. In order to find out if there is a feasible solution, it suffices to attempt joining a common 1z -solid prefix from Lj with a common z1 -solid suffix from Rk for some indices 1 ≤ j < k ≤ n + 1 by heavy letters of V at positions j + 1, . . . , k − 1. We use a recursive routine to find such a pair of indices j, k in a basic interval [a, b] which has positive length and therefore can be decomposed into two basic subintervals [a, c] and [c+1, b]. Then either j ≤ c < k, or both indices j, k belong to the same interval [a, c] or [c + 1, b]. To check the former case, we apply the algorithm of Lemma 6.9 to L = L∗a,c and R = R∗c+1,b . The two latter cases are solved by recursive calls for the subintervals. The recursive routine is called first for the basic interval [1, n + 1]. The computations performed by the routine for the basic intervals at the j-th level take at most the time proportional to the total size of lists L∗a,b , √ R∗a,b at the (j − 1)-th level. Lemma 6.8 shows that the total size of the lists at all levels is O( zλ log log z). √ Consequently, the whole procedure works in O( zλ(log log z + log λ)) time. Lemma 6.10 combined with Lemma 6.1 provides an efficient implementation of the General Weighted Pattern Matching. √ Theorem 6.11. The GWPM problem can be solved in O(n zλ(log log z + log λ)) time. An oracle for the GWPM problem using O(n log z) space and supporting queries in O(m) time can be computed within the same time complexity. 7 Faster Algorithms for Large λ In this section we analyse the running times of algorithms for the Multichoice Knapsack problem expressed as O(nO(1) · T (a, λ)) for some function T monotone with respect to both arguments. The algorithm √ of Theorem 4.7 proves that achieving T (a, λ) = aλ is possible. On the other hand, if we assume that Subset Sum does not admit an O∗ (2(0.5−ε)n )-time solution, then we immediately get that we cannot have T (a, 2) = O(a0.5−ε ) for any ε ≥ 0. Similarly, the 3-Sum conjecture implies that T (λ3 , λ) = O(λ2−ε ) is impossible. While this already refutes the possibility of having T (a, λ) = O(a0.5 λ0.5−ε ) across all arguments (a, λ), such a bound may still hold for some special cases covering an infinite number of arguments. For example, we may potentially achieve T (a, λ) = O((aλ)0.5−ε ) = O(λ1.5−ε ) for a = λ2 . Before we prove that this is indeed possible, let us see the consequences of the hardness of 3-Sum and, in general, (2k − 1)-Sum. For a non-negative integer k, the (2k − 1)-Sum conjecture refutes T (λ2k−1 , λ) = 18 O(λk−ε ). By monotonicity of T with respect to the first argument, we conclude that T (λc , λ) = O(λk−ε ) is impossible for c ≥ 2k − 1. On the other hand, monotonicity with respect to the second argument shows k that T (λc , λ) = O(λc 2k−1 −ε ) is impossible for c ≤ 2k − 1. The lower bounds following from (2k − 1)-Sum 1 and (2k + 1)-Sum turn out to meet at c = 2k − 1 + k+1 ; see Fig. 2. 4 3 2 1 c 1 2 3 4 5 6 7 Figure 2: Illustration of the upper bound (dotted) and lower bound (solid) on logλ T (λc , λ). √ Consequently, we have some room between the lower and the upper bound of aλ. In the aforementioned 4 3 case of a = λ2 , the upper bound is λ 2 , compared to the lower bound of λ 3 −ε . Below, we show that the upper bound can be improved to meet the lower bound. More precisely, we show an algorithm whose running time k+1 k+1 k+1 is O(N + (a 2k+1 + λk ) log λ · nk ) for every positive integer k. Note that a 2k+1 + λk = λc 2k+1 + λk , so for 2k − 1 ≤ c ≤ 2k + 1 the running time indeed matches the lower bounds up to the nk term. A k Due to Lemma 4.6, the extra nk term reduces to O(( log log λ ) ), and if we measure the running time using A instead of a, it becomes a constant (k O(k) ). In particular, this lets us prove that the GWPM problem can k+1 be solved in O(n(z 2k+1 + λk ) log λ) time for any integer k = O(1), improving upon the solution of Section 5 unless z = λω(1) or z = λc±o(1) for an odd integer c. 7.1 Algorithm for Multichoice Knapsack Let us start by discussing the bottleneck of the algorithm of Theorem 4.7 for large λ. The problem is that the√size of the classes does not let us partition every choice S into a prefix L and a suffix R with ranks both O( AV ). Lemma 4.3 leaves us with an extra letter c between L and R, and in the algorithm we append it (ℓ) to the prefix (while generating Lj−1 ⊙ Cj ). We provide a workaround based on reordering of classes. Our goal is to make sure that items with large rank appear only in a few leftmost classes. For this, we guess the classes of the k items with largest rank (in a feasible solution) and  move them to the front. Since this depends on the sought feasible solution, we shall actually verify all nk possibilities. 1 Now, our solution considers two cases: For j > k, the reordering lets us assume rankV (c) ≤ ℓ k , so we do not need to consider all items from Cj . For j ≤ k, on the other hand, we exploit the fact that (ℓ) |Lj−1 ⊙ Cj | ≤ λj , which at most λk . Combinatorial foundation of this intuition is formalized as a variant of Lemma 4.3: (ℓ) (r) Lemma 7.1. Let ℓ and r be positive integers such that VLj + VRj+1 > V for every 0 ≤ j ≤ n. Let k ∈ {1, . . . , n} and suppose that S is a choice with v(S) ≤ V such that rankV (S ∩ Ci ) ≥ rankV (S ∩ Cj ) for (ℓ) i ≤ k < j. There is an index j ∈ {1, . . . , n} and a decomposition S = L ∪ {c} ∪ R such that L ∈ Lj−1 , (r) 1 R ∈ Rj+1 , c ∈ Cj , and either rankV (c) ≤ ℓ k or j ≤ k. 19 Proof. We claim that the decomposition constructed in the proof of Lemma 4.3 satisfies the extra rankV (c) ≤ 1 ℓ k condition if j > k. Let S = {c1 , . . . , cn } and Si = {c1 , . . . , ci }. Obviously rankV (ci ) ≥ 1 for k < i < j and, by the extra assumption, rankV (ci ) ≥ rankV (c) for 1 ≤ i ≤ k. Hence, Fact 4.2 yields rankV (Sj−1 ) ≥ (ℓ) rankV (c)k . Simultaneously, we have v(Sj−1 ) < VLj , so rankV (Sj−1 ) < ℓ. Combining these inequalities, we immediately get the claimed bound. Theorem 7.2. For every positive integer k = O(1), the Multichoice Knapsack problem can be solved in k+1 A k O(N + (a 2k+1 + λk ) log A( log log λ ) ) time. Proof. As in the proof of Theorem 4.7, we actually provide an algorithm whose running time depends on A AV rather than a. Moreover, Lemma 4.6 lets us assume that n = O( log log λ ). We first guess the k positions where items with ranks rankV are present in the solution S and  largest A k move these positions to the front. This gives nk = O(( log log λ ) ) possible selections. For each of them, we proceed as follows.  k  (r) (ℓ) We increment an integer r starting from 1, maintaining ℓ = r k+1 and all the lists Lj and Rj+1 for (ℓ) k+1 (r) 0 ≤ j ≤ n, as long as VLj + VRj+1 ≤ V for some j. By Fact 4.4, we stop with r = O(AV2k+1 ) and thus the k+1 total time of this phase is O(AV2k+1 log A) due to the online procedure of Lemma 4.5. By Lemma 7.1, every feasible solution S admits a decomposition S = L ∪ {c} ∪ R for some j; we shall consider all possibilities for j. For each of them, we reduce searching for S to an instance of the Multichoice k+1 Knapsack problem with N ′ = O(AV2k+1 + λk ) and n′ = 2. By Lemma 4.1, these instances can be solved in k+1 A O((AV2k+1 + λk ) log log λ ) time in total. (ℓ) (r) For j ≤ k, the items of the j-th instance are going to belong to classes Lj−1 ⊙ Cj and Rj+1 , where (ℓ) (ℓ) (ℓ) Lj−1 ⊙ Cj = {L ∪ {c} : L ∈ Lj−1 , c ∈ Cj }. The set Lj−1 ⊙ Cj can be sorted by merging |Cj | sorted lists of size at most λj−1 each, i.e., in O(λk log λ) time. On the other hand, for j > k, we take {L ∪ {c} : L ∈ 1 1 1 (r) (ℓ) Lj−1 , c ∈ Cj , rankV (c) ≤ ℓ k } and Rj+1 . The former set can be constructed by merging ℓ k = O(r k+1 ) sorted k+1 k lists of size O(r k+1 ) each, i.e., in O(r log λ) = O(AV2k+1 log λ) time. k+1 Summing up over all indices j, this gives O((AV2k+1 +λk ) log A) time for a single selection of the k positions k+1 A k with largest ranks, and O((AV2k+1 + λk ) log A( log log λ ) ) in total. Clearly, each solution of the constructed instances represents a solution of the initial instance, and by Lemma 7.1, every feasible solution of the initial instance has its counterpart in one of the constructed instances. Before we conclude the proof, let us note that the optimal k does not need to be known in advance. To deal with this issue, we try consecutive integers k and stop the procedure if Fact 4.4 yields that AV > λ2k+1 , i.e., if r is incremented beyond λk+1 . If the same happens for the other instance of the algorithm (operating on rankW instead of rankV ), we conclude that a > λ2k+1 , and thus we shall better use larger k. The A k k+1 running time until this point is O(λk+1 log λ( log , the log λ ) ) due to Lemma 4.5. On the other hand, if r ≤ λ A k algorithm behaves as if a ≤ λ2k+1 , i.e., runs in O(λk+1 log λ( log log λ ) ) time. This workaround (considering all A k−1 smaller values k) adds extra O(λk log λ( log ) to the time complexity for the optimal value k, which is log λ ) less than the upper bound on the running time we have for this value k. If we are to bound the complexity in terms of A only, the running time becomes k+1 O(N + (A 2k+1 + λk ) log A( log A k ) ). log λ A k Assumptions that A ≤ λ2k+1 and k = O(1) let us get rid of the ( log log λ ) term, which can be bounded by (2k + 1)k = O(1). If one of these assumptions is not satisfied, we can improve the bound on the running time anyway: using Theorem 7.2 with increased k if A > λ2k+1 , and using Theorem 4.7 if k = ω(1). 20 Corollary 7.3. Let k = O(1) be a positive integer such that A ≤ λ2k+1 . The Multichoice Knapsack k+1 problem can be solved in O(N + (A 2k+1 + λk ) log λ) time. This leads to the following results for weighted pattern matching: Theorem 7.4. Suppose that λ2k−1 ≤ z ≤ λ2k+1 for some positive integer k = O(1). Then the SDWC k+1 k+1 problem can be solved in O((z 2k+1 + λk ) log λ) time, and the GWPM problem can be solved in O(n(z 2k+1 + λk ) log λ) time. As we noted at the beginning of this section, Lemma 5.4 implies that any improvement of the dependence of the running time on z or λ by z ε (equivalently, by λε ) would contradict the k-Sum conjecture. 8 Final Remarks In Section 4, we gave an O(N + a0.5 λ0.5 log A)-time algorithm for the Multichoice Knapsack problem. Improvement of either exponent to 0.5 − ε would result in a breakthrough for the Subset Sum and 3Sum problems, respectively. Nevertheless, this does not refute the existence of faster algorithms for some particular values (a, λ) other than those emerging from instances of Subset Sum or 3-Sum. In Section 7, log a we show an algorithm that is superior if log λ is a constant other than an odd integer. We also prove it to be optimal (up to lower order terms) for every constant log a log λ unless the k-Sum conjecture fails. References [1] Amihood Amir, Eran Chencinski, Costas S. Iliopoulos, Tsvi Kopelowitz, and Hui Zhang. Property matching and weighted matching. Theor. Comput. Sci., 395(2-3):298–310, April 2008. [2] Carl Barton, Tomasz Kociumaka, Jakub Radoszewski, and Solon P. Pissis. Efficient index for weighted sequences, 2016. Accepted to Combinatorial Pattern Matching, CPM 2016. [3] Carl Barton and Solon P. Pissis. Linear-time computation of prefix table for weighted strings. In Florin Manea and Dirk Nowotka, editors, Combinatorics on Words, WORDS 2015, volume 9304 of LNCS, pages 73–84. Springer, 2015. [4] Sudip Biswas, Manish Patil, Sharma V. Thankachan, and Rahul Shah. Probabilistic threshold indexing for uncertain strings. In Evaggelia Pitoura, Sofian Maabout, Georgia Koutrika, Amélie Marian, Letizia Tanca, Ioana Manolescu, and Kostas Stefanidis, editors, 19th International Conference on Extending Database Technology, EDBT 2016, pages 401–412. OpenProceedings.org, 2016. [5] Manolis Christodoulakis, Costas S. Iliopoulos, Laurent Mouchard, and Kostas Tsichlas. Pattern matching on weighted sequences. In Algorithms and Computational Methods for Biochemical and Evolutionary Networks, CompBioNets 2004, KCL publications, 2004. [6] Maxime Crochemore, Christophe Hancart, and Thierry Lecroq. Algorithms on Strings. Cambridge University Press, New York, NY, USA, 2007. [7] Michael Etscheid, Stefan Kratsch, Matthias Mnich, and Heiko Röglin. Polynomial kernels for weighted problems. In Giuseppe F. Italiano, Giovanni Pighizzini, and Donald Sannella, editors, Mathematical Foundations of Computer Science, MFCS 2015, Part II, volume 9235 of LNCS, pages 287–298. Springer, 2015. [8] Michael L. Fredman, János Komlós, and Endre Szemerédi. Storing a sparse table with O(1) worst case access time. J. ACM, 31(3):538–544, 1984. 21 [9] Anka Gajentaan and Mark H. Overmars. On a class of O(n2 ) problems in computational geometry. Comput. Geom., 5:165–185, 1995. [10] Eitan M. Gurari. Introduction to the theory of computation. Computer Science Press, 1989. [11] Ellis Horowitz and Sartaj Sahni. Computing partitions with applications to the knapsack problem. J. ACM, 21(2):277–292, 1974. [12] Costas S. Iliopoulos, Christos Makris, Yannis Panagis, Katerina Perdikuri, Evangelos Theodoridis, and Athanasios K. Tsakalidis. The weighted suffix tree: An efficient data structure for handling molecular weighted sequences and its applications. Fundam. Inform., 71(2-3):259–277, 2006. [13] Russell Impagliazzo and Ramamohan Paturi. On the complexity of k-SAT. J. Comput. Syst. Sci., 62(2):367–375, 2001. [14] Hans Kellerer, Ulrich Pferschy, and David Pisinger. Knapsack problems. Springer, 2004. [15] Daniel Lokshtanov, Dániel Marx, and Saket Saurabh. Lower bounds based on the Exponential Time Hypothesis. Bulletin of the EATCS, 105:41–72, 2011. [16] Cinzia Pizzi and Esko Ukkonen. Fast profile matching algorithms - A survey. Theor. Comput. Sci., 395(2-3):137–157, 2008. [17] Sanguthevar Rajasekaran, X. Jin, and John L. Spouge. The efficient computation of position-specific match scores with the fast Fourier transform. J. Comp. Biol., 9(1):23–33, 2002. [18] Milan Ruzic. Constructing efficient dictionaries in close to sorting time. In Luca Aceto, Ivan Damgård, Leslie Ann Goldberg, Magnús M. Halldórsson, Anna Ingólfsdóttir, and Igor Walukiewicz, editors, Automata, Languages and Programming, ICALP 2008, Part I, volume 5125 of LNCS, pages 84–95. Springer, 2008. [19] Albin Sandelin, Wynand Alkema, Pär Engström, Wyeth W. Wasserman, and Boris Lenhard. JASPAR: an open-access database for eukaryotic transcription factor binding profiles. Nucl. Acids Res., 32(1):D91– D94, 2004. 22
8cs.DS
ON SUBLINEAR BILIPSCHITZ EQUIVALENCE OF GROUPS arXiv:1702.06618v2 [math.GR] 31 Mar 2018 YVES CORNULIER Abstract. We discuss the notion of sublinearly bilipschitz equivalences (SBE), which generalize quasi-isometries, allowing some additional terms that behave sublinearly with respect to the distance from the origin. Such maps were originally motivated by the fact they induce bilipschitz homeomorphisms between asymptotic cones. We prove here that for hyperbolic groups, they also induce Hölder homeomorphisms between the boundaries. This yields many basic examples of hyperbolic groups that are pairwise non-SBE. Besides, we check that subexponential growth is an SBE-invariant. The central part of the paper addresses nilpotent groups. While classification up to sublinearly bilipschitz equivalence is known in this case as a consequence of Pansu’s theorems, its quantitative version is not. We introduce a computable algebraic invariant e = eG < 1 for every such group G, and check that G is O(re )-bilipschitz equivalent to its associated Carnot group. Here r 7→ re is a quantitive sublinear bound. Finally, we define the notion of large-scale contractable and large-scale homothetic metric spaces. We check that these notions imply polynomial growth under general hypotheses, and formulate conjectures about groups with these properties. 1. Introduction 1.A. Sublinearly Lipschitz maps. We consider here some functions between metric spaces, generalizing large-scale Lipschitz maps and quasi-isometries. Let v be a real-valued function on R+ . For our purposes, typical examples of v are v(r) = r α for some α ∈ [0, 1], or v(r) = log(r). See §2 for precise (mild) hypotheses. We assume here v ≥ 1, up to replacing v with max(v, 1) if necessary. We say that a map f : X → Y between metric spaces is O(v)-Lipschitz if it satisfies d(f (x), f (x′ )) ≤ Cd(x, x′ ) + C ′ v(|x| + |x′ |), ∀x, x′ ∈ X, for some constants C, C ′ > 0. Here, |x| denotes the distance from x to some base-point of X (fixed once and for all, but whose choice does not matter). We also say that f is o(v)-Lipschitz if it is O(v ′)-Lipschitz for some v ′ = o(v); in Date: March 20, 2018. 2000 Mathematics Subject Classification. Primary 17B30; Secondary 17B70, 20F18, 20F67, 20F69, 22E25, 22E40. Partially supported by ANR Project ANR-14-CE25-0004 GAMME. 1 2 YVES CORNULIER particular, for v(r) = r, we call o(r)-Lipschitz maps sublinearly Lipschitz maps; they were introduced in [Cor2] under the name “cone-Lipschitz maps”. For instance, O(1)-Lipschitz maps are known as large-scale Lipschitz maps, and occur naturally in the large-scale category, whose isomorphisms are quasiisometries; see for instance [CH, Chap. 3]. We are especially interested in O(v)-Lipschitz maps when v(r) = o(r) (that is, sublinearly Lipschitz maps). Indeed, for instance O(r)-Lipschitz maps are just maps with a radial control |f (x)| ≤ C|x| + C ′ and are thus of limited interest. There is a natural equivalence relation in the set of O(v)-Lipschitz maps X → Y , called O(v)-closeness. Namely, f, f ′ are O(v)-close if d(f (x), f ′(x)) ≤ C ′′ v(|x|) for all x ∈ X, and some C ′′ > 0. Similarly, f, f ′ are o(v)-close if they are O(v ′ )close for some v ′ = o(v). The sublinearly Lipschitz category, consists in metric spaces as objects, with the set of arrows X → Y being the set of o(r)-Lipschitz maps up to o(r)equivalence. This category was introduced in [Cor2] with the following motivation: taking asymptotic cones (with respect to a given scaling sequence and ultrafilter) yields a functor from this category to the category of metric spaces with Lipschitz maps. Moreover, this is, in a precise sense [Cor2, Prop. 2.9], the largest setting for which such functors can be defined. Isomorphisms in this category are called sublinearly Lipschitz equivalences, or SBE maps (“cone-bilipschitz equivalences” in [Cor2]). A simple verification shows that a map f : X → Y is an SBE if and only there exists a (locally bounded above) function v = o(r) such that it satisfies the following three conditions: • f is O(v)-Lipschitz: there exist constants c, C > 0 such that for all x, x′ ∈ X one has d(f (x), f (x′)) ≤ cd(x, x′ ) + Cv(|x| + |x′ |); • f is O(v)-expansive: there exist constants c′ , C ′ > 0 such that for all x, x′ ∈ X one has c′ d(x, x′ ) − C ′ v(|x| + |x′ |) ≤ d(f (x), f (x′)); • f is O(v)-surjective: there exist a constant C ′′ > 0 such that, for all y ∈ Y , one has d(y, f (X)) ≤ C ′′ v(|y|). Note that multiplying v by a scalar (depending on f ) allows to get rid of the constants C, C ′, C ′′ . Example 1.1. 1) If π is any sublinear function R → R, then x 7→ x + π(x) is an SBE R → R (being o(r)-close to the identity map). √ 2) Let X be the set of square integers in R+ and let f be the map x 7→ ⌊ x⌋2 from R+ to X. Then f is an SBE, but is not o(r)-close to any large-scale Lipschitz map: indeed by a simple geodesic argument, every large-scale Lipschitz map R+ → X is bounded and in particular X and R+ are not quasi-isometric. ON SUBLINEAR BILIPSCHITZ EQUIVALENCE OF GROUPS 3 There are more elaborate examples, which are important in geometric group theory. For simply connected nilpotent Lie groups, the classification up to quasiisometry is conjectural: it is expected that quasi-isometric implies isomorphic. Nevertheless, Pansu obtained the first non-trivial quasi-isometric rigidity results by proving important theorems about their asymptotic cones in the eighties, which can be restated in terms of SBEs. Namely every simply connected nilpotent Lie group is SBE to a Carnot group (called its associated Carnot-graded group) [Pa1], and any two SBE Carnot groups are isomorphic [Pa2]. Later, Shalom [Sha] proved, with unrelated methods, that the Betti numbers of the Lie algebra of a simply connected nilpotent Lie group are quasi-isometry invariants, while taking associated Carnot-graded group does not always preserves the Betti numbers. Thus there exist simply connected nilpotent Lie groups (with lattices) that are SBE but not quasi-isometric. SBEs allow to restate Pansu’s theorems with no reference to asymptotic cones (the asymptotic cone theorems, also related to Goodman’s earlier work [Goo], being corollaries), but also yields other interpretations. We come back to this topic in §1.F. One can naturally generalize the sublinearly Lipschitz category and define, in a similar way, the O(v)-Lipschitz category and the o(v)-Lipschitz category. In particular, the O(1)-Lipschitz category is known as the large-scale Lipschitz category. Thus these interpolate between the large-scale category and the sublinearly Lipschitz category. There are obvious inclusion functors from the O(v)-category to the O(v ′ )-category whenever v = O(v ′ ) (this is usually not faithful, because of the equivalence relation). Isomorphisms in the O(v)-Lipschitz or o(v)-Lipschitz category are called O(v)-SBE or o(v)-SBE (assuming that v = o(r)). For instance, it is established in [Cor2] that every connected Lie group is O(log r)-SBE to a Lie group of the form G = N ⋊ E with both N, E simply connected nilpotent Lie groups, N being exponentially distorted in G and E acting in a diagonalizable way on the Lie algebra of N. 1.B. SBEs and growth. In §3, we prove the following: Theorem 1.2. 1) Subexponential growth is SBE-invariant among connected graphs of bounded valency, and in particular among compactly generated locally compact groups. 2) (Folklore up to the formulation) Polynomial growth is SBE-invariant among compactly generated locally compact groups. In spite of their similarity, these results are very different in nature. The first, about subexponential growth, is very general and the proof is direct. The second is not true in the graph setting (it is very easy to check that Z is SBE to a connected graph of valency ≤ 3 and growth greater than any polynomial. However, for groups, polynomial growth can be characterized by a large-scale doubling property and this gives the result. Note that this is equivalent to the 4 YVES CORNULIER result that groups polynomial growth are precisely those with all their asymptotic cones proper; a fact which is known to experts. It would be natural to wonder about SBE-invariance of growth and amenability among groups; I have included some open questions in §3. 1.C. SBE and ends. Given a geodesic metric space X, there is a natural way to define its end space E(X), using discrete paths going to infinity (in the metric sense); see §4.A. When X is proper (or quasi-isometric to a proper space), E(X) is a compact space. We say that f : X → Y is radially expansive if there exist constants C, C ′ > 0 such that |f (x)| ≥ C|x| − C ′ for all x (this does not depend on the choice of base-points; if X = ∅ we agree that f is radially expansive). Theorem 1.3. Every radially expansive sublinearly lipschitz map f : X → Y between connected graphs naturally induces a Hölder continuous map f∗ : E(X) → E(Y ). This assignment is functorial from the subcategory of the sublinearly Lipschitz category, where objects are connected graphs and maps are radially expansive maps up to sublinear closeness, to the category of metric spaces and Hölder continuous maps. In the subcategory described in the theorem, it is clear that the isomorphisms are the SBEs. Therefore we obtain: Corollary 1.4. Any SBE X → Y between connected graphs induces a homeomorphism E(X) → E(Y ), which is Hölder. Example 1.5. A non-abelian free group F and a surface group S (of a surface with negative Euler characteristic) are not SBE, although they have isometric asymptotic cones. Indeed, E(F ) is a Cantor set while E(S) is a singleton. 1.D. SBE of hyperbolic groups. If X is a geodesic metric space, then X is Gromov-hyperbolic if and only if all its asymptotic cones are real trees, for every choice of sequence of base-points; this is due to Gromov [Gro, §2.A], with a more complete proof given by Drutu [Dru, Prop. 3.4.1]. Under sufficient homogeneity assumptions, this can be reduced to asymptotic cones with a fixed base-point, and thus this implies (see Proposition 4.3): Proposition 1.6. Gromov-hyperbolicity is an SBE-invariant among compactly generated locally compact groups (and in particular among finitely generated groups). In the setting of connected graphs (which is more general, since we treat these groups using their Cayley graphs with respect to a compact generating subset), easy counterexamples show that this does not hold without homogeneity assumptions (Example 4.1). In contrast to nilpotent groups, hyperbolic groups essentially all share the same asymptotic cone and thus the latter is of no further help in the SBE classification. Example 1.5, based on Corollary 1.4 shows that, however, the SBE-classification ON SUBLINEAR BILIPSCHITZ EQUIVALENCE OF GROUPS 5 of non-elementary hyperbolic groups is non-trivial. Still, we cannot expect much more from Corollary 1.4 since the space of ends of a non-elementary group is either a point or a Cantor set. Here we refine Corollary 1.4 to show that the whole boundary is an SBE-invariant. Theorem 1.7. Let f : X → Y be a radially expansive (see §1.C) sublinearly Lipschitz map between proper geodesic Gromov-hyperbolic spaces. Then, f induces a Hölder map (∂X, dµ ) → (∂Y, dµ ) between the visual boundaries. In particular, if f is an SBE, then it induces a Hölder homeomorphism between visual boundaries. Here µ > 0 is a parameter appearing in the classical definition of the metric on the visual boundary; it has to be sufficiently small, in terms of the hyperbolicity constants of X and Y . Corollary 1.8. If hyperbolic groups have non-homeomorphic boundaries, then they are not SBE. Example 1.9. We retrieve the fact (Example 1.5) that free group and a (closed) surface group are not SBE, as their boundaries are homeomorphic to a Cantor set, and a circle respectively. Corollary 1.8 also distinguishes between 1-ended groups: a surface group is not SBE to a cocompact lattice in PSL2 (C), and also between ∞-ended groups: for instance a free group and a free product of two surface groups are not SBE. The latter fact is also a consequence of Corollary 1.10 below, proved in §4.B. Corollary 1.10. 1) A compactly generated locally compact group is SBE to a free group if and only it admits a geometric (=proper cocompact continuous) action on a tree of finite valency. In particular, in the discrete case this characterizes virtually free groups. 2) A compactly generated locally compact group is SBE to a surface group if and only it admits a geometric action on the hyperbolic plane. In both cases, the corollary follows from the fact that these particular groups are characterized by the topology of their boundary. Note that this is very specific. If the Cannon conjecture holds (asserting that every discrete hyperbolic group whose boundary is homeomorphic to the 2-sphere acts geometrically on the hyperbolic 3-space), then this could be extended to locally compact groups SBE to the hyperbolic 3-space. Nevertheless, this simplified argument would fail in higher dimension; for instance SU(2, 1) and its cocompact lattices admit no geometric action on the hyperbolic 4-space although they admit a homeomorphic copy of the 3-sphere as boundary. Remark 1.11. SBE spaces were called cone-bilipschitz equivalent spaces in [Cor2]. But a free group and a surface group have bilipschitz-equivalent asymptotic cones but are not SBE (Example 1.5): this is why we avoid this misleading terminology: bilipschitz maps between the asymptotic cones are not induced by maps between the groups. Note that in [Cor2], it was established that given any two metric 6 YVES CORNULIER spaces, X, Y any map X → Y inducing a bilipschitz homeomorphism between all asymptotic cones is an SBE. Corollary 1.8 motivates the following questions, where by hyperbolic group we mean a locally compact group that is Gromov-hyperbolic for the word metric with respect to a compact generating subset. The two main popular examples are the case of finitely generated groups, and the case of Lie groups with a left-invariant negatively curved Riemannian metric. Question 1.12. Does there exist any two hyperbolic groups with homeomorphic, but not Hölder-homeomorphic boundaries? Let us point out that the boundary of a simply connected negatively curved d-dimensional manifold with a cocompact isometry group (discrete or not) is Hölder-homeomorphic to a round (d − 1)-dimensional sphere. In particular, connected Lie groups will not provide examples for Question 1.12 (although the quasi-isometric classification therein is a rich problem, see [Cor4]). Question 1.13. Does there exist any two hyperbolic groups that are not SBE but whose boundaries are homeomorphic? Hölder-homeomorphic? [Update: see Remark 1.17.] Example 1.14 (SBE Lie groups that are not QI). For a ∈ {0, 1}, let Ga be the semidirect product R2 ⋊ R, where the action is given by t · (x, y) = et (x + aty, y). Then Ga admits a left-invariant negatively curved Riemannian metric. For a = 0, it can be chosen to be of constant curvature −1; in particular G0 is quasi-isometric to the real hyperbolic 3-space. It was proved by Xie [Xie] that G1 is not quasiisometric to G0 . Nevertheless, G1 and G0 are SBE (and actually O(log r)-SBE), see [Cor2, Theorem 4.4]. The group G1 has no lattice and is actually not quasi-isometric to any finitely generated group (this follows from the same result of Xie [Xie], see the discussion in [Cor4, §6]). Therefore we can ask the question in the discrete case: Question 1.15. Does there exist any two discrete hyperbolic groups that are SBE but not quasi-isometric? The last question concerns some particular important examples. Question 1.16. (1) Consider the semidirect product Gα = R2 ⋊ R, where t ∈ R acts through the diagonal matrix (et , eαt ). Are the Gα , for α ≥ 1, pairwise non-SBE? (2) (Suggested by C. Druţu.) Are H4R and H2C non-SBE? The question can be extended to all pairs of non-homothetic negatively curved symmetric spaces of the same dimension. [Update: see Remark 1.17.] Remark 1.17. Gabriel Pallier [Pal] has announced a positive answer to Druţu’s question (in its extended version), thereby answering positively Question 1.13. ON SUBLINEAR BILIPSCHITZ EQUIVALENCE OF GROUPS 7 1.E. On finite presentability. Among finitely generated groups, finite presentability is a quasi-isometry invariant. More generally, among compactly generated locally compact groups, compact presentability is a quasi-isometry invariant. Indeed, it can be characterized as large-scale simple connectedness, a purely metric notion (see for instance [CH, Chap. 8]). Unsuccessful attempts suggest that it has no reason to be an SBE invariant in general. However there exists a stronger version of finite presentability that is SBE-invariant, namely the linear isodiametric filling property (LID). We define it precisely in §5; it roughly means that loops of length n can be filled within a ball of radius O(n). Many reasonable groups are known to be LID: combable and 3-manifold groups [Ge], central-by-hyperbolic groups [Con], virtually connected Lie groups (and hence their cocompact lattices, e.g., polycyclic groups) [CT, Theorem 3.B.1 and Remark 3.B.4]. It is also very likely that the geometric proofs that non-cocompact lattices in connected Lie groups are finitely presented with at most exponential Dehn function, also imply that they are LID. However, Gersten [Ge] proved that there exist 1-relator groups that are not LID (actually, with iterated exponential y as isodiametric function), for instance the Baumslag-Gersten group hx, y | xx = x2 i. Theorem 1.18. Among compactly generated locally compact groups, being LID is SBE-invariant. This implies that groups SBE to most known finitely/compactly presented groups are also finitely/compactly presented. For instance, we deduce: Corollary 1.19. Every finitely generated group SBE to a connected Lie group (or a cocompact lattice therein) is finitely presented. More generally, every compactly generated locally compact SBE to a connected Lie group is compactly presented. The corollary was already clear in case the group has all its asymptotic cones simply connected, because this property passes to SBEs and implies compact presentability. However, it is new, for instance, in the case of the group SOL, which has the same asymptotic cones as the (infinitely presented) lamplighter group [Cor1, §9]. The theorem holds in some further generality for metric spaces, under a QIhomogeneity assumption, but not in general, as it is easy to show that Z is SBE to a graph of valency ≤ 3 that is not LID (and even not large-scale simply connected, see Example 4.1). The questions remain open for groups: Question 1.20. 1) Does there exist a finitely presented group G that is SBE to an infinitely presented (finitely generated) group? 2) What if G is the Baumslag-Gertsen group (defined above)? More generally, can a 1-relator group be SBE to an infinitely presented group? 8 YVES CORNULIER 1.F. SBE of nilpotent groups. This part is the core of the paper. Its purpose is to use our notion of SBE to formulate and improve Goodman’s and Pansu’s theorems [Goo, Pa1]. Every finitely generated nilpotent group, or more generally any compactly generated, locally compact group has a proper homomorphism with cocompact image into a simply connected nilpotent Lie group, called its real Maltsev completion. Since the completion homomorphism is a quasi-isometry, it is enough to discuss only simply connected nilpotent Lie groups. Recall that a Carnot group is a simply connected nilpotent Lie group whose Lie algebra is Carnot. A nilpotent Lie algebra is called Carnot if it admits a Carnot grading, which means a grading by positive integers such that the first layer generates the Lie algebra. Let G be a simply connected nilpotent Lie group and g its Lie algebra. L i The associated Carnot-graded Lie algebra g∞ of g is the graded Lie algebra g /gi+1 , i i i+1 j where (g )i≥1 is the lower central series, and where the bracket g /g ×g /gj+1 → gi+j /gi+j+1 is induced by the restriction of the bracket gi × gj → gi+j . The corresponding simply connected nilpotent Lie group is denoted by G∞ , and called associated Carnot Lie group. To every finite-dimensional nilpotent Lie algebra g, we associate a numerical invariant eg ∈ [0, 1[, which is practically computable (by solving some linear systems of equations). It satisfies eg = 0 if and only if g is Carnot. For a cstep nilpotent non-Carnot Lie algebra, eg ∈ {i/j : 2 ≤ i < j ≤ c} (and all these values can be achieved, see Proposition 6.13). In particular, eg belongs to {0} ∪ [2c−1 , 1 − c−1 ]. We write eG = eg . Theorem 1.21. Let G be a simply connected nilpotent Lie group with associated Carnot Lie group G∞ , and e = eG . Then G is O(r e)-SBE to G∞ . −1 Remark 1.22. Let c be the nilpotency length of G. That G is O(r 1−c ) -SBE to G∞ was observed by the author in [Cor2, Proposition A.14]1, relying on computations performed in a 2007 preprint version of [Bre]; it turns out that the computation already appeared in Goodman’s 1977 article [Goo] (which was written before asymptotic cones were defined by Gromov); the exponent is not explicit in the statement of Goodman’s theorem but the proof makes clear that it is ≤ 1 − c−1 . The pioneer reference [Goo] is missing in [Pa1, Bre, Cor2, BrLD]. The main step towards Theorem 1.21 is on the one hand the preliminary algebraic work of §6.C, and on the other hand the estimate of Lemma 6.17. Goodman [Goo, Theorem 1] established Lemma 6.17 with the exponent replaced with e = 1−c−1 , in which case the preliminary algebraic work is unnecessary. It is easy to see that this lemma, for a given exponent e < 1, implies Theorem 1.21 for the same exponent e: see the proof of Theorem 6.16. From this and Guivarch’s earlier 1It appears as Proposition A.9 in the arXiv (v2) version of [Cor2], due to a weird shift of numbering in the published version of the appendix of [Cor2]. ON SUBLINEAR BILIPSCHITZ EQUIVALENCE OF GROUPS 9 estimates for the distance to the origin, it is easy to conclude that the asymptotic cone of G is bilipschitz equivalent to G∞ endowed with a Carnot-Caratheodory metric. This latter step follows conveniently from the SBE language, since the SBE map G → G∞ induces a bilipschitz map between asymptotic cones, while it is straightforward that G∞ endowed with a Carnot-Caratheodory metric is isometric to its asymptotic cones. Pansu in [Pa1] was not aware of [Goo] and reproduced a computation akin to that leading to [Goo, Theorem 1], but more involved. Indeed, it relies on sharper estimates for the distance to the origin, notably resulting in a description of the asymptotic cone up to isometry and not only up to bilipschitz homeomorphism as above. The latter remark also applies to the generalization of Pansu’s results in the sub-Finsler case by Breuillard and Le Donne [BrLD]. Besides, let us mention that while here we improve the exponent in many cases, the same exponent 1 − c−1 appears in a related finer statement of Breuillard and Le Donne, namely [BrLD, Proposition 3]2, for which the exponent 1 − c−1 = 1/2 in some 2-nilpotent cases is sharp, so that in their statement the exponent 1 −c−1 cannot be replaced by eg . This raises the question about the converse: Question 1.23. Given a function r 7→ f (r) ≥ 1, is it true that G is O(f (r))-SBE to G∞ if and only if r e = O(f (r))? In particular, is it true that G is O(r α)-SBE to G∞ if and only if α ≥ eG ? For f (r) = 1, a positive answer to the question is equivalent to asking whether being Carnot is a quasi-isometry invariant, or equivalently whether whenever G is non-Carnot, it is not quasi-isometric to G∞ . This is the only case where we have a partial answer, as Shalom [Sha] provided a 7-dimensional example of G such that G is not quasi-isometric to G∞ , proving quasi-isometry invariance of the Betti numbers. It was observed in [Cor4, §6.F] that Sauer’s quasi-isometry invariance of the real cohomology algebra [Sau]3, provides further examples, including one in dimension 5 (which is the smallest dimension where non-Carnot G occur). However, even in these examples, we do not know whether, say, G and G∞ are O(log(r))-SBE, which sounds very unlikely (see Question 6.20). 2Proposition 3.1 in the current arXiv version (v1) of [BrLD]. assertion is that whenever G1 , G2 are quasi-isometric simply connected nilpotent Lie groups with Lie algebras g1 , g2 , then the cohomology algebras H ∗ (g1 ) and H ∗ (g2 ) are isomorphic as graded real algebras. Technically speaking, [Sau] applies only when G1 , G2 admit lattices. To work without restricting to G1 , G2 admitting lattices, the main missing point was to have a “uniform measure equivalence” for G1 and G2 . This was established in [KKR, Theorem 5.14], elaborating on [BR, Theorem 1], which provides a topological coupling for any two coarsely equivalent second countable locally compact groups. This being granted, Roman Sauer explained to me that the proof works, with some care in the use of continuous cohomology. 3The 10 YVES CORNULIER These results are obtained in §6. The algebraic §6.C introduces in detail the Lie algebra conditions necessary to describe eg , and we hope that its contents will prove relevant in other contexts. 1.G. Large-scale contractions and similarities. In §7, we introduce notions which, unlike the previous ones, are new concepts even in the quasi-isometric setting. Namely, we define a metric space to be large-scale contractable if it admits a self-quasi-isometry in which the large-scale Lipschitz upper bound has multiplicative constant < 1. We show that this class is quasi-isometrically closed (Proposition 7.5); we show that, for connected graphs of bounded valency, it implies polynomial growth (Proposition 7.6). For compactly generated locally compact group, the study thus reduces to simply connected nilpotent Lie groups. Which such groups G are large-scale contractable? Those G with a contracting automorphisms are large-scale contractable; such G can be characterized as those whose Lie algebra admits a grading by positive integers. Are these the only ones? (This is Question 7.9, see there for a little more context.) We extend in §7.B this notion to the sublinearly bilipschitz setting, defining the more general notion of O(u)-sublinearly contractible metric space. Understanding for which u a given simply connected nilpotent Lie group is O(u)-sublinearly contractible is a challenging problem. An illustrating example, for which partial results can be obtained, is given in Proposition 7.10. Finally, in §7.C, we introduce the more subtle notion of large-scale similarity. Let us describe it informally. Given a metric space and a self-map with a contracting behavior, we map a pair (x, x′ ) of points to the number of steps necessary for them to become at distance ≤ t. This yields a function Λt (x, x′ ). Under reasonable assumption, the class of Λt modulo addition of a bounded function, does not depend on the choice of large enough t. We then say that a self-quasi-isometry is a large-scale b-similarity (b < 1) if this function differs by a bounded function ′ to log+ b−1 (d(x, x )). We say that a metric space is large-scale homothetic if it admits a large-scale b-similarity for some b < 1. Somewhat surprisingly, this definition is robust enough to be a quasi-isometry invariant (Corollary 7.18). Among simply connected nilpotent Lie groups, examples are given by Carnot groups. Indeed, the automorphisms arising from a Carnot grading act by similarities for the CarnotCaratheodory metric, which is (large-scale) equivalent to the left-invariant Riemannian metrics. It is natural to wonder whether these are the only cases (Question 7.19). Acknowledgement. I warmly thank Enrico Le Donne for many corrections to a previous version. I am indebted to Gabriel Pallier for his interest to the questions formulated here and for pointing out [Goo]. ON SUBLINEAR BILIPSCHITZ EQUIVALENCE OF GROUPS 11 Contents 2. Sublinearly Lipschitz maps 3. Growth 4. Ends and Hyperbolicity 5. SBE and spaces with linear isodiametric function 6. Lie algebras and SBEs of nilpotent groups 7. Large-scale contractions and similarities References 11 13 16 20 22 37 43 2. Sublinearly Lipschitz maps Here, all asymptotic behaviors are meant when r → ∞. The functions v we consider when defining the O(r)-category or o(r)-category are assumed to satisfy the following: Definition 2.1. We say that a function v : R+ → R is admissible if it satisfies: • • • • v v v v is non-decreasing; grows at most linearly: lim supr→∞ v(r)/r < ∞; is doubling: v(tr)/v(r) is bounded above for all t > 0; ≥ 1. However, it is often convenient to work with functions that fail to satisfy one of these hypotheses (or even to be defined) for some small values (e.g., v(r) = log(r)2 or v(r) = log log r). Then it should be understood that v is replaced by some function coinciding with v for large r and satisfying the previous assumptions. Note that v(t + c)/v(t) is also bounded above for all c, because t + c ≤ 2t for large t and the doubling assumption. Proposition 2.2. Let v be an admissible map. A composition of O(v)-Lipschitz maps is O(v)-Lipschitz. Moreover, composition is compatible with O(v)-closeness. The same assertions hold with o(v) instead of O(v). Proof. Suppose that f : X → Y and g : Y → Z are O(v)-Lipschitz, say with constants C, C ′ in the metric upper bound; also we multiply v by a constant if necessary to remove the other constant and assume v ≥ 1. Then, denoting by x0 the fixed base-point, we have |f (x)| ≤ C|x| + v(|x|) for all x. Also there exists M, µ such that v(r) ≤ µr + M for all r. So |f (x)| ≤ (C + µ)|x| + M. d(g ◦ f (x), g ◦ f (x′ )) ≤C ′ d(f (x), f (x′)) + v(|f (x)| + |f (x′ )|) ≤C ′ Cd(x, x′ ) + C ′ v(|x| + |x′ |) + v((C + µ)(|x| + |x′ |) + 2M) 12 YVES CORNULIER There exists λ > 0 such that v((C + µ)r + 2M) ≤ λv(r) for all r. Therefore, for all x, x′ ∈ X, d(g ◦ f (x), g ◦ f (x′ )) ≤ C ′ Cd(x, x′ ) + (C ′ + λ)v(|x| + |x′ |). Thus g ◦ f is O(v)-Lipschitz (with Lipschitz constant CC ′ ). Let us now prove the second assertion. Assume that g, g ′ are O(v)-close, say d(g(y), g ′(y)) ≤ v(|y|) and let us show that g ◦ f and g ′ ◦ f are O(v)-close. Then d(g ◦ f (x), g ′ ◦ f (x)) ≤ v(|f (x)|) ≤ v((C + µ)|x| + M) ≤ λv(|x|) Now assume that f, f ′ : X → Y are O(v)-close, say d(f (x), f ′ (x)) ≤ v(|x|) (as we can assume multiplying v by a positive constant if necessary), and let us show that g ◦ f and g ◦ f ′ are O(v)-close. Then d(g ◦ f (x), g ◦ f ′ (x)) ≤C ′ d(f (x), f ′ (x)) + v(|f (x)| + |f ′ (x)|) ≤C ′ v(|x|) + v(2(C + µ)|x| + 2M) ≤ (C ′ + λ′ )v(|x|), where λ′ is chosen so that v(2(C + µ)r + 2M) ≤ λ′ v(r) for all r. The statements for o(v) follow immediately.  Definition 2.3. Let v be an admissible map. We say that a map f : X → Y is • O(v)-expansive if there exist constants C, C ′ > 0 such that d(f (x), f (x′ )) ≥ Cd(x, x′ ) − C ′ v(|x| + |x′ |) for all x, x′ ∈ X; • O(v)-surjective if there exists a constant C ′′ > 0 such that d(y, f (X)) ≤ C ′′ v(|y|) for all y ∈ Y . • o(v)-expansive, respectively o(v)-surjective if there exists u = o(v) such that f is O(u)-expansive, resp. O(u)-surjective. (By convention, f is O(v)-expansive and o(v)-expansive if X = ∅, and the map ∅ → Y is O(v)-surjective, resp. o(v)-surjective, if and only if Y = ∅.) Proposition 2.4. Let v be an admissible map. A map f : X → Y induces an isomorphism in the O(v)-category if and only if it satisfies: • f is O(v)-Lipschitz; • f is O(v)-expansive; • f is O(v)-surjective. The same statement holds with O(v) replaced with o(v). Proof. If f induces an isomorphism in the O(v)-category, with inverse induced by g : Y → X, all conditions are straightforward to check. Conversely, suppose that f satisfies all these conditions. Leaving the trivial case X = ∅ to the reader, we assume the contrary, so Y 6= ∅ as well. Besides, we can suppose v ≥ 1, C ′′ = 1/2 and C ′ = 1, up to changing v to max(v, 1) and then multiplying v by a constant ≥ 1. For each y ∈ Y , choose g(y) ∈ X such that d(f (g(y)), y) ≤ v(|y|). ON SUBLINEAR BILIPSCHITZ EQUIVALENCE OF GROUPS 13 By the second condition, we have |f (x)| ≥ C|x| − v(|x|) for all x ∈ X. There exists a constant k such that Cr − v(r) ≥ Cr/2 − k for all r. Hence |f (g(y)| ≥ C|g(y)|/2 − k, that is, C|g(y)|/2 ≤ k + |f (g(y)| ≤ k + |y| + v(|y|). Hence |g(y)| ≤ c|y| + k ′ for suitable constants c, k ′ > 0 and all y ∈ Y ; in turn there exists a constant c′ > 0 such that v(2cr + 2k ′ ) ≤ c′ v(r) for all r. Again by the second condition, for all y, y ′ ∈ Y we have So d(f (g(y)), f (g(y ′))) ≥ Cd(g(y), g(y ′)) − v(|g(y)| + |g(y ′)|). Cd(g(y), g(y ′)) ≤d(f (g(y)), f (g(y ′))) + v(2c|y| + 2k ′ ) ≤d(y, y ′) + v(|y|) + v(|y ′|) + v(2c|y| + 2k ′ ) ≤d(y, y ′) + 3v(|y| + |y ′|). This shows that g is O(v)-Lipschitz. It is clear by construction that f ◦ g is O(r)-close to the identity of Y . By the second condition, d(f (g(f (x))), f (x)) ≥ Cd(g(f (x)), x) − v(|x| + |g(f (x))|) In addition, we have d(f (g(f (x))), f (x)) ≤ v(|f (x)|) ≤ c′′ v(|x|) for some suitable constant c′′ , and |g(f (x))| = O(|x|) as well, se we can deduce that Cd(g(f (x)), x) = O(v(|x|)). The o(v)-case follows (from the O(v ′)-case for all v ′ ).  Definition 2.5. An O(v)-Lipschitz map g : Y → X is an O(v)-retract if it is a retract in the O(v)-category, that is, there exists an O(v)-Lipschitz map f : X → Y such that g ◦f is O(v)-close to the identity of X. Similarly one defines o(v)-retract, and o(r)-retract is also referred to sublinearly Lipschitz retract. Example 2.6. Let G be a simply connected solvable Lie group, and E its exponential radical (the set of exponentially distorted elements in G). Then G/E is an SBE-retract of G, by [Cor2, Theorem 4.4]; in substance this was the main argument in the dimension estimate of the preceding paper [Cor1]. Note that this is only interesting in the non-split case, since G/E is indeed a Lipschitz retract when G ∼ E ⋊ (G/E). 3. Growth Let us say that a metric space is uniformly locally finite (ULF) if the supremum of all cardinals of n-balls in X is bounded. This is a mild reasonable assumption to consider growth and amenability conditions. Connected graphs of bounded degree are ULF. Example 3.1. In a reasonable generality (e.g., connected graphs of bounded valency), the asymptotics of growth and amenability are quasi-isometric invariants. We begin with two simple counterexamples to discard naive generalizations to the SBE-setting and motivate the sequel. Fix any sublinear function u. 14 YVES CORNULIER (1) For connected graphs of bounded valency, polynomial growth is not a SBE-invariant: for instance, construct a tree T from a ray R = {xn : n ≥ 0} by attaching to each xn a rooted 2-tree Tn of depth u(n). The map retracting T to R mapping Tn to xn is an SBE (an O(u)-SBE) T → R and R has polynomial (linear) growth. If limn→∞ u(n)/ log(n) = ∞, then 2u(n) grows superpolynomially and hence Tn does not have polynomially bounded growth: it can have arbitrary large subexponential growth. (2) For connected graphs of bounded valency, amenability is not an SBEinvariant. Perform a very similar construction as in (1), but instead of attaching bushy small trees to a infinite thin tree, we attach filiform trees to a infinite bushy tree. Precisely, we perform the same construction, but start with an infinite rooted tree R′ of valency 3, and attaching at every vertex of height n a ray of length u(n). Then the resulting tree T ′ is amenable, its obvious retraction to R′ is an SBE (an O(u)-SBE), and R′ is not amenable. Let us say that a pointed metric space is doubling at large scale if there exists M and R0 such that for every R ≥ R0 every closed centered 2R-ball is contained in the union of M closed R-balls. I expect the following fact to be well-known: Proposition 3.2. A pointed metric space is doubling at large scale if and only if all its asymptotic cones (on the basepoint) are proper. Proof. In the definition, say that the pointed metric space (X, d) (d being the distance) is (R0 , M)-doubling. If so, this implies that (X, n1 d) is (R0 /n, M)doubling. It follows that every asymptotic cone of X is (ε, M) doubling for every ε, which is the definition of being doubling (as a pointed metric space). A complete doubling pointed metric space is proper: this follows from the fact that a complete metric space is compact if and only if for every ε > 0 it can be covered by finitely many ε-balls [Bou, §2.7, Prop. 10]. Since asymptotic cones are complete, this proves one implication. Conversely suppose that X is not large-scale doubling as a pointed metric space. Then for all n there exists some centered ball of arbitrary large radius, say of radius 2Rn ≥ n, that cannot be covered by less that n balls of radius Rn . Hence in (X, R1n d), the centered 2-ball cannot be covered by less that n balls of radius 1. Thus it contains n points at pairwise distance ≥ 1. It follows that for any non-principal ultrafilter, the cone for the scaling sequence (1/Rn ) over this ultrafilter, has infinitely (actually at least continuum) many points that are at pairwise distance ≥ 1; hence it is not proper.  Since SBE spaces have bilipschitz equivalent asymptotic cones, the following corollary follows. Corollary 3.3. Being large-scale doubling (as pointed metric spaces) is an SBEinvariant. ON SUBLINEAR BILIPSCHITZ EQUIVALENCE OF GROUPS 15 Remark 3.4. For a uniformly locally finite space (or more generally, a uniformly coarsely proper metric space, with a suitable notion of growth, see [CH, §3.D]), large-scale doubling (as pointed metric space) implies polynomially bounded growth. The converse is not true in general. For instance, consider a rooted 2 2 tree in which the vertices in the k-sphere have 2 successors for 2n − n < k < 2n and all integers n, while all others vertices have a single successor. Then it has polynomially bounded growth, but is not large-scale doubling. However a compactly generated, locally compact group is large-scale doubling if and only if it has polynomially bounded growth (the forward implication is immediate but the reverse implication makes use of deep theorems, including Gromov’s polynomial growth). So we deduce: Corollary 3.5. Among compactly generated locally compact groups, and hence among finitely generated groups or transitive connected locally finite graphs, polynomial growth is an SBE-invariant. Given a pointed metric space X, let bX (n) be the cardinal of the closed centered ball of radius n, and buX (n) the supremum of cardinals of all closed balls of radius n. We say that X has uniform exponentially bounded (UEB) growth if limbuX (n)1/n = 1. This is a mild assumption, as this holds if X is a connected graph of bounded valency. Proposition 3.6. Let X, Y be metric spaces with basepoints. Let u be a nondecreasing sublinear function and f : X → Y be a map such that for some R0 , C > 0, we have |f (x)| ≤ max(|x|, R0 ), d(f (x), f (x′ )) ≥ Cd(x, x′ ) − u(|x| ∨ |x′ |), ∀x, x′ ∈ X. Then for all n ≥ R0 we have bY (n) ≥ bX (n)/bX (u(n)/C). In particular, if X has UEB growth and Y has subexponential growth, then X also has subexponential growth. In particular, among UEB growth metric spaces (e.g., connected graphs of bounded valency), having subexponential growth is an SBE-invariant. Proof. Fix n ≥ R0 . Then the n-ball of X maps into the n-ball of Y . If x, x′ belong to the n-ball and have the same image, then the second inequality implies that Cd(x, x′ ) ≤ u(n). In particular, f (x) = f (x′ ) implies that x′ belongs to the ball of radius u(n)/C around x. So the cardinal of the fibers of f contained in the n-ball is ≤ buX (u(n)/C). Thus the cardinal of the image of the n-ball is ≥ bX (n)/buX (u(n)/C). If X has UEB growth, write buX (n) ≤ exp(αn) (say for n ≥ R1 ≥ R0 ). Then we deduce that bX (n) ≤ exp(αu(n)/C)bY (n), where the right-hand term grows subexponentially.  Corollary 3.7. For finitely generated groups (and more generally, compactly generated locally compact groups) subexponential growth is an SBE-invariant.  16 YVES CORNULIER Question 3.8. Does there exist two SBE finitely generated groups (or, more generally, compactly generated locally compact groups) that have non-equivalent growth? Such groups would necessarily be of intermediate growth. Proposition 3.6 also yields some quantitative statements: Corollary 3.9. 1) The class of UEB growth metric spaces of polynomial growth is O(log r)-SBE-invariant. 2) For every α > 1, the class of UEB growth metric spaces (and hence of groups) whose growth is O(exp(r α )) is O(r α)-SBE-invariant. In particular, the union of all these classes (for α < 1) is O(r 1−ε )-SBE-invariant for all ε > 1.  Amenability is not an SBE-invariant, nor even an O(u)-SBE invariant of connected graphs of bounded degree, for any function u tending to infinity. Question 3.10. Is amenability a SBE-invariant of finitely generated groups (and more generally unimodular compactly generated locally compact groups)? (Recall that in the nondiscrete case, the good setting is that of amenable unimodular groups, also called metrically amenable groups, see [CH, §3.D].) In case of a negative answer to Question 3.10 one can wonder whether there are strengthenings of amenability that hold for natural instances (e.g., all amenable unimodular connected Lie groups) that are SBE-invariants. A partial answer is given by the class of groups with subexponential growth. But it would be interesting to have a result encompassing some amenable groups of exponential growth such as polycyclic groups, which have good quantitative amenability properties. 4. Ends and Hyperbolicity 4.A. Ends of spaces. Fix a geodesic metric space X. Assuming that X is nonempty, fix a base-point. We consider the set of proper paths (xt ) in X. Here proper means that |xt |, the distance of xt to the base-point, tends to infinity, and path just means that xt depends continuously on t. The forking between two such paths (xt ) and (x′t ) is the number φ((xt ), (x′t )) ∈ R+ ∪{∞} defined as the supremum of r such that for all large t, there exists a path from xt to x′t avoiding the open r-ball (“for all large” can be replaced with “for arbitrary large” without modifying the definition). It satisfies the ultrametric-like inequality φ(c, c′′ ) ≥ min(φ(c, c′ ), φ(c′, c′′ )) for all proper paths c, c′ , c′′ . Thus the ′ function δ(c, c′ ) = 2−φ(c,c ) is an ultrametric pseudo-distance on proper Lipschitz paths. The Hausdorff quotient is an ultrametric space, called space of ends of X and denoted by E(X). It is easy to see that its distance depends on the choice of base-point only up to bilipschitz. If X is proper, E(X) is a compact space. When X is empty, we define E(X) to be empty, although the empty space will play an empty role here! Note that in particular if two proper paths (xt ) and (x′t ) coincide arbitrary far (the set of (t, t′ ) such that xt = x′t′ is unbounded) then they define the same element of E(X). ON SUBLINEAR BILIPSCHITZ EQUIVALENCE OF GROUPS 17 Proof of Theorem 1.3. Consider f : X → Y as in the theorem, satisfying d(f (x), f (x′ )) ≤ Cd(x, x′ ) + v(|x| + |x′ |) for all x, x′ , and |x| ≤ |f (x)| ≤ C|x| for all x. The latter (instead of C ′ |x| − C ′′ ≤ |f (x)| ≤ C|x| + C ′′′ ) is a mild additional assumption in order to ease reading the proof; the reader can easily adapt to the general case. We also assume that v ≥ 1 and v is non-decreasing. Let (xt ) be a proper path in X. Let (tn ) be a sequence tending to infinity (called discretization) such that d(xtn , xt ) ≤ 1 for all t ∈ [tn , tn+1 ] and all n. Define yn = f (xtn ); then d(yn , yn+1) ≤ C + v(2|xn |) ≪ |yn |. Thus if we interpolate, using geodesic segment, (yn ) to a path (zt ), then (zt ) is proper, and its class in E(Y ) does not depend on the choice of interpolation. Furthermore, if we use a finer discretization, then the class in E(Y ) of the resulting path remains the same. So we have a well-defined map from the set of proper paths to E(Y ). There exists R0 such that v(r) ≤ r/2 for all r ≥ R0 . Fix R ≥ R0 . Let (xt ) and (x′t ) be proper paths with φ((xt ), (x′t )) ≥ 4R. Define (yt′ ) and (zt′ ) in the same way as above. Use a discretization (tn ) working for both paths. There exists t0 such that for all t ≥ t0 , there exists a path from xt to x′t outside the open 2R-ball of X. Fix t ≥ t0 and such a path γt . We can assume that γt is defined on an interval [0, m] with m an integer, and that d(γt, γu ) ≤ 1 for all t, u such that |t − u| ≤ 1. Define, for n ∈ {0, . . . , m}, µn = f (γn ). Then |µn | ≥ |γn | ≥ 2R, and we have d(µn , µn+1 ) ≤ C + v(|γn | + |γn+1 |) ≤ C + v(2|γn | + 1) ≤ C + v(4R + 1) ≤ R. Thus |µn | − d(µn , µn+1) ≥ 2R − R = R. So, if we interpolate (µn ) to a path (µt ) using geodesic segments, we have |µt | ≥ R for all R, and this joins yt to yt′ outside the open R-ball. Thus ϕ((zt ), (zt′ )) ≥ R. This shows that whenever r ≤ 2−R0 , we have δ((xt ), (x′t )) ≤ r 4 implies δ((zt ), (zt′ )) ≤ r. This shows that the map (xt ) 7→ (zt ) factors through a Hölder continuous map E(X) → E(Y ). (Note however that the Hölder exponent 1/4 is an artifact of the assumption |f (x)| ≥ |x| and we cannot expect it to be bounded away from 0 in general.)  4.B. Hyperbolic spaces. Gromov-hyperbolicity is defined for arbitrary metric spaces; see the definition below in the proof of Lemma 4.5. A fundamental property is its quasi-isometry invariance among geodesic metric spaces [GH, §5.2], where it is also observed that there exists a (non-geodesic) metric space quasiisometric to Z but not Gromov-hyperbolic. Example 4.1. Let u be any sublinear function, say mapping positive integers to positive integers. Decorate the graph Z by adding for all n, between 2n and 2n + u(n), a second branch of size u(n); let X be the resulting graph. Then the embedding Z → X is an isometric SBE, but X is not Gromov-hyperbolic (nor even large-scale simply connected). 18 YVES CORNULIER This shows that among geodesic metric spaces, Gromov-hyperbolicity is not an SBE-invariant. However, by the argument explained in §1.D, SBE-invariance of Gromov-hyperbolicity holds under a homogeneity assumption: Definition 4.2. A metric space is quasi-isometrically homogeneous (or QI-homogeneous) if quasi-isometries with uniform constants act transitively. Namely, this means that there exist C ≥ 0 and c ≥ 1 such that for any x0 , x ∈ X, there exists f : X → X such that f (x) = x0 and f is a quasi-isometry for the constants c, C: d(f (x), f (x′ )) is in the interval [c−1 d(x, x′ ) − C, cd(x, x′ ) + C] for all x, x′ ∈ X and supy∈X d(y, f (X)) ≤ C. Proposition 4.3. Among QI-homogeneous (Definition 4.2) geodesic metric spaces, Gromov-hyperbolicity is an SBE-invariant.  We now turn to Theorem 1.7. We restate it slightly more precisely: Theorem 4.4. Let f : X → Y be a sublinearly Lipschitz map between proper geodesic δ-hyperbolic spaces. Assume f is radially expansive with multiplicative constant c > 0, in the sense that |f (x)| ≥ c|x| − c′ for some c′ ∈ R and all x ∈ X. Then, for every µ ∈ ]0, 21/2δ ], every ε > 0, the map f induces a (c−ε)-Hölder map (∂X, dµ ) → (∂Y, dµ ) on the visual boundaries. In particular, any SBE X → Y induces a Hölder homeomorphism between the boundaries. Here dµ is the metric on the boundary, depending on the parameter µ ∈ ]0, 21/2δ ] (its definition is recalled in the proof below). Note that the Hölder exponent c − ε does not depend on the constants and function involved in the definition of being sublinearly Lipschitz, but only on the “radial” expansion c. Write R+ = [0, ∞[. Let X be a set and ρ : X × X → R+ be a function (this is called a kernel on X). We say that ρ is subadditive if ρ(x, z) ≤ ρ(x, y)+ρ(y, z) for all x, y, z. For every kernel there is a largest subadditive kernel ρ̂ : X × X → R+ bounded above by ρ;Pρ̂(x, y) is the infimum over all n and all sequences x = x0 , x1 , . . . , xn = y of ni=1 ρ(xi−1 , xi ). Of course ρ̂ ≤ ρ; if ρ is symmetric then so is ρ̂, and if ρ vanishes on the diagonal then so does ρ̂. Lemma 4.5 √ (Ghys-Harpe). Let ρ : X × X → R+ be a kernel. Suppose that for some λ ∈ [1, 2] we have, for all x, y, z, ρ(x, z) ≤ λ max(ρ(x, y), ρ(y, z)). Then (3 − 2λ)ρ ≤ ρ̂. On the proof. The statement is originally stated in a more specific context with the change of variables λ = 1 + ε′ . It is proved in [GH, Chap 7,§3] and the statement and proof is almost textually rewritten in [BH, Chap III.H, §3.21]; it provides with no change the above statement.  Let us now prove Theorem 4.4. We assume c′ = 0 since we can easily reduce to this case, or adapt the proof. ON SUBLINEAR BILIPSCHITZ EQUIVALENCE OF GROUPS 19 Let Y be a pointed metric space. Recall that the Gromov product is defined by 2(x|y) = |x| + |y| − d(x, y). The pointed4 metric space Y is δ-hyperbolic if (x|z) ≥ min{(x|y), (y|z)} − δ for all x, y, z. Let us briefly recall the definition of boundary. A sequence (xn ) in a geodesic Gromov-hyperbolic space Y is Cauchy-Gromov if it satisfies (xn |xm ) → ∞ when min(n, m) → ∞. Two Cauchy-Gromov sequences (xn ), (yn ) are asymptotic if (xn |yn ) → ∞ when n → ∞; this is an equivalence relation on the set of CauchyGromov sequences, and the quotient is called the boundary of Y , and denoted by ∂Y . If Y is proper, every Cauchy-Gromov sequence is asymptotic to a sequence forming a geodesic ray (an isometric embedding of N). For the moment however, we work within Y rather than its boundary. For µ > 0, define ρµ (x, y) = µ−(x|y) . If Y is δ-hyperbolic, then ρµ satisfies √ the δ δ inequality of Lemma 4.5 with λ = µ ; thus the lemma applies as soon as µ ≤ 2. Actually, we will assume (to simplify constants) that 3 − 2λ ≥ 1/2, that is, λ ≤ 5/4, which means µ ≤ (5/4)1/δ . We set dµ = ρbµ , so that dµ ≤ ρµ ≤ 2dµ . Let (yn ) be a (possibly finite) sequence in Y such that |yn | ≥ cn; d(yn , yn+1 ) ≤ u(n), u(n) ≪ n, u non-decreasing. For every ε > 0, there exists kε such that u(n) ≤ 2εn for all n ≥ kε . Then, for kε ≤ i, we have 1 1 (yi |yi+1 ) = (|yi | + |yi+1| − d(yi , yi+1 )) ≥ ci − u(i) ≥ (c − ε)i. 2 2 Hence dµ (yi , yi+1 ) ≤ µ−(c−ε)i Then, for kε ≤ k ≤ n, denoting cε = c − ε, we have dµ (yk , yn ) ≤ and thus n−1 X i=k dµ (yi , yi+1) ≤ n−1 X i=k µ−cεi ≤ µ−cε k − µ−cε n µ−cεk ≤ , 1 − µ−cε 1 − µ−c (yk |yn ) = − logµ (ρµ (yk , yn )) ≥ − logµ (2dµ (yk , yn )) ≥ cε k − logµ (2/(1 − µ−c )) =: cε k − M(c, µ) Now let (yn ) and (yn′ ) be sequences satisfying the same conditions, as well as d(yj , yj′ ) ≤ u(j) for all j ≤ k, for some given k. For each ε such that k ≥ kε and n ≥ k, we have (yk |yn ), (yk′ |yn′ ) ≥ cε k − M(c, µ); in the same way we bounded below (yi |yi+1 ), we have (yk |yk′ ) ≥ cε k. 4One usually says that a metric space is δ-hyperbolic if the pointed metric space (Y, y) is δ-hyperbolic for every y. Actually, if (Y, y) is δ-hyperbolic, then Y is 2δ-hyperbolic [CDP, Chap. 1]. 20 YVES CORNULIER So (yn |yn′ ) ≥ min{(yn |yk ), (yk |yk′ ), (yk′ |yn′ )} − 2δ ≥ cε k − M(c, µ) − 2δ. Now let X, Y be δ-hyperbolic proper geodesic spaces, and f a map X → Y satisfying f (x) ≥ c|x|; d(x, x′ ) ≤ 2δ ⇒ d(f (x), f (x′ )) ≤ u(|x|) Let x, x′ be points in X. Join them with geodesics to the origin (xi )0≤i≤n , (x′i )0≤j≤m. Define k = ⌊(x|x′ )⌋. Then d(xj , x′j ) ≤ 2δ for all j ≤ k. Define yi = f (xi ), yi′ = f (x′i ). Then the previous argument shows that ′ (yn |ym ) ≥ cε k − M(c, µ) − 2δ, as soon as k ≥ kε . That is, ∀x, x′ , (x|x′ ) > kε ⇒ (f (x)|f (x′ )) ≥ cε (x|x′ ) − N(c, µ, δ), where N(c, µ, δ) = c/2 + M(c, µ) + 2δ. An immediate consequence is that f maps Cauchy-Gromov sequences to CauchyGromov sequences, and thus extends to a map f∗ between boundaries. This can be made more quantitative. Recall that the Gromov product extends to the boundary, with some finite additive ambiguity. Precisely, one can define [GH, §7.2], for ω, ω ′ ∈ ∂X, their Gromov product (ω|ω ′) as the supremum of lim inf i,j→∞ (xi |x′j ) where (xi ), (x′i ) range over all sequences representing ω and ω ′ respectively (i.e., converging to ω and ω ′). Let ω, ω ′ be boundary points. Choose geodesic rays (xn ), (x′n ) converging to them. Then lim inf(xn |x′n )−(ω|ω ′) ∈ [−2δ, 0] [GH, Chap 7.1], and lim inf(f (xn )|f (x′n ))− (f∗ (ω)|f∗ (ω ′)) ∈ [−2δ, 0]. Hence, if (ω|ω ′) > kε + 2δ, then (f∗ (ω)|f∗(ω ′)) ≥ cε (ω|ω ′) − 2δc − N(c, µ, δ) = cε (ω|ω ′) − N ′ (c, µ, δ) So for all ω, ω ′ such that dµ (ω, ω ′) < µ−kε −2δ /2, we have ρµ (f∗ (ω), f∗ (ω ′)) ≤ P (c, µ, δ)ρµ(ω, ω ′)cε , P = µN , so that dµ (f∗ (ω), f∗ (ω ′)) ≤ 2c P (c, µ, δ)dµ(ω, ω ′)cε . This shows that f∗ is c-Hölder. (If we define Q = min(2c P, (2µkε+2δ )c ), then the inequality dµ (f∗ (ω), f∗ (ω ′)) ≤ Qdµ (ω, ω ′)cε holds for all ω, ω ′.) 5. SBE and spaces with linear isodiametric function In an attempt to determine whether finite presentability is an SBE-invariant of finitely generated groups, it has been natural to focus on the more restricted class of groups with linear isodiametric function, which contains most interesting finitely presented groups. Here we define this notion in the general setting of connected graphs. ON SUBLINEAR BILIPSCHITZ EQUIVALENCE OF GROUPS 21 Definition 5.1. In a connected graph with base-point, we say that two combinatorial based loops are R-homotopic if they are homotopic as based loops in the 2-complex obtained by gluing k-gons to all loops of length k ≤ R. We say that a connected graph has the linear isodiametric filling property (abbreviated LID) if it satisfies the following: given a base-point, there exists R, C such that for every n, every loop of diameter ≤ n is R-homotopic to a trivial loop within a ball of radius ≤ Cn. (By convention the empty space is LID.) We say that a compactly generated locally compact group is LID if it quasiisometric to some LID connected graph. Note that the choice of base-point does not matter in the definition of LID. Also, we use the notion of QI-homogeneous from Definition 4.2. Proposition 5.2. Being LID is an SBE-invariant among QI-homogeneous graphs. More generally, suppose that there is a sublinearly Lipschitz retract between connected graphs Y → X, that X is QI-homogeneous and Y is LID. Then X is LID. Proof. Assume that f, g are O(u)-Lipschitz with u(r) = o(r), and that f ◦ g is O(u)-close to the identity (we multiply u by a constant if necessary to eliminate the constants multiplying u in the definition). Consider a combinatorial loop (xi ) in the n-ball of X. Then d(xi , g ◦ f (xi )) ≤ u(|xi |) ≤ u(n). Define yi = f (xi ). We can interpolate (yi ) to a path (zj ) in the Cn-ball, where ′ C only depends on f . Then since Y is LID (with constant C in the definition) we can homotope (zj ) to a trivial loop within the CC ′ -ball of Y . Here, homotope means that we can find a finite sequence of loops in the CC ′ -ball of Y , each of which differs from the next one by an R-gon. Now we can map this sequence of loops to X using g; we obtain a sequence of “paths” which can be interpolated using geodesic segments; moreover, any two of them differ by the “image of the R-gon”, which is a closed path of length ≤ Ru(CC ′ n). Finally, we can pass from (xi ) to the path interpolating (g ◦ f (xi )) by filling the “squares” with vertices xi , xi+1 , g ◦ f (xi ), g ◦ f (xi+1 )), which can are interpolated by gons of length 1 + 2u(n) + w, where w comes from interpolating in X the interpolated path in Y between f (xi ) and f (xi+1 ). In Y , this path (now i is fixed) has length ≤ u(n), and hence in X (with one more interpolation) it has length ≤ u(n)2 , which is somewhat a problem (unless u(n)2 = o(n)). But actually for every z in the interpolated path between f (xi ) and f (xi+1 ), we have d(z, f (xi )) ≤ u(n). So d(g(z), g(f (xi ))) ≤ (c + 1)u(n), where c is the Lipschitz constant in g. So we can fill our large gon using segment between g(f (xi ) and images of the interpolated gon in Y . We thus obtain u(n) “triangular” gons of length ≤ 2(c + 1)u(n) + u(n) = (2c + 3)u(n) (containing g(f (xi ), g(zj ), g(zj+1 ) for various j), and one “square” gon of length ≤ 3u(n) + (c + 1)u(n) = (c + 4)u(n) (containing xi , xi+1 , g(f (xi )), g(f (xi+1))). 22 YVES CORNULIER First assume for simplicity that X is homogeneous under isometries. Then it follows from the previous argument, assuming that max((2c+4)u(n), Ru(CC ′n)) < n, which holds, say for n ≥ n0 , we can fill every based loop in the n-ball with loops of smaller radius. These being translates of based loops, we can conclude by induction. In the QI-homogeneous case, there is some loss due to interpolation, but if we assume that max((2c + 4)u(n), Ru(CC ′n)) < εn with ε > 0 small enough, depending on the constants involved in QI-homogeneity of X, then we can conclude in the same way using easy interpolation arguments.  Corollary 5.3. Among compactly generated locally compact groups (and in particular among finitely generated groups), LID is an SBE-invariant property and more generally is inherited by sublinearly Lipschitz retracts. 6. Lie algebras and SBEs of nilpotent groups This section is more elaborate than the previous ones. While our goal is the study of SBE between nilpotent groups (§6.E), it is convenient to start with a solid algebraic preparatory work, in §6.C. This material is new and may also be of independent interest. To provide a warm-up and some motivation, we start with the particular cases of 3-step and 4-step nilpotent Lie groups and Lie algebras in §6.A and §6.B; these can also be omitted by the reader not looking for specific motivation. 6.A. The 3-step nilpotent case. Let G be a 3-step nilpotent simply connected Lie group and g its Lie algebra. The nilpotency condition means that g4 = 0. Taking complement subspaces, we write g = v1 ⊕ v2 ⊕ v3 , where v3 = g3 , v2 ⊕ v3 = g2 , and g = v1 ⊕ g2 . This “linear” grading can fail to be an algebra grading: we only have [vi , vj ] ⊂ L k≥i+j vk ; in this case, this says in particular that [v1 , v1 ] ⊂ v2 ⊕ v3 and this is the only possible obstruction to be an algebra grading. More precisely, we have an algebra grading if and only if [v1 , v1 ] ⊂ v2 , or equivalently if the projection [v1 , v1 ]3 of [v1 , v1 ] on v3 modulo v2 is zero. From this choice of linear grading, we can define a “corrected” bracket [·, ·]′ , namely defining, for xi ∈ vi , xj ∈ vj , [xi , xj ]′ as the projection of [xi , xj ] to vi+j (modulo gi+j+1 ). This defines a Lie algebra law on g, called the Carnot-graded associated Lie algebra Car(g). Let us emphasize that while the isomorphism type of Car(g) only depends on g, the homeomorphism g → Car(g), given here as the identity map, is sensitive to choice of linear grading. For instance, g might admit a Carnot grading but the chosen linear grading is not one. We can view G as g endowed with the Baker-Campbell-Hausdorff (BCH) law: 1 1 x ∗ y = x + y + [x, y] + ([x, [x, y]] + [y, [y, x]]), 2 12 ON SUBLINEAR BILIPSCHITZ EQUIVALENCE OF GROUPS 23 which is truncated by the 3-nilpotency condition. Then the BCH law, using the graded bracket [·, ·]′ , defines another group law ∗′ , and the identity map thus defines a homeomorphism between the two Lie groups G = (g, ∗) and Car(G) = (g, ∗′ ). If the linear grading is a grading, this is an isomorphism, and hence a quasi-isometry. But otherwise it is not likely to be a quasi-isometry; yet it is an SBE. This follows from computing x ∗ y − x ∗′ y, where x = x1 + x2 + x3 , y = y1 + y2 + y3 are the decompositions in the linear grading and [u1 , v1 ]k , for u1 , v1 ∈ v1 , is the projection of the bracket in vk : 1 x ∗ y − x ∗′ y = [x1 , y1 ]3 . 2 To check the metric properties, we fix a norm on g such that the bracket [·, ·]3 is submultiplicative and use the Guivarch norm: ⌊u⌋ = ku1 k + ku2 k1/2 + ku3k1/3 . Then from we obtain the estimate   1 1 ′ [x1 , y1 ]3 ⌊x ∗ y − x ∗ y⌋ = [x1 , y1 ]3 = 2 2 1/3 2 2 ≤ (⌊x1 ⌋⌊y1 ⌋) 3 ≤ max(⌊x⌋, ⌊y⌋) 3 . Then for any distances d, d′ induced by left-invariant Riemannian metrics on G and Car(G), this is a good approximation of the length, in the sense that there exist constants C ≥ 1, C ′ ≥ 0 such that for all u   d(1, u), d′ (1, u) ∈ C −1 ⌊u⌋ − C ′ , C⌊u⌋ + C ′ , abridged as ≅ ⌊u⌋ Hence d′ (x, y) = d′ (1, (−x) ∗′ y) ≅ ⌊(−x) ∗′ y⌋, and, by subadditivity of the Guivarch norm, ⌊(−x) ∗′ y⌋ ≤ ⌊(−x) ∗ y⌋ + ⌊(−x) ∗′ y − (−x) ∗ y⌋ ≤ ⌊(−x) ∗ y⌋ + max(⌊x⌋, ⌊y⌋)2/3 . Therefore we obtain  d′ (x, y) ≤ C 2 d(x, y) + O (d(1, x) + d(1, y))2/3 , as well as the same inequality with d and d′ switched. This means that the identity map (g, ∗) → (g, ∗′ ) is an O(r 2/3 )-SBE. 6.B. On the 4-step nilpotent case. We can work in a similar fashion in general; in the 4-step nilpotent case, let us also compute x ∗′ y − x ∗ y; note that it only involves terms of degree ≤ 3 in the BCH formula, because terms of degree 4 will cancel, for the same reason as terms of degree 3 canceled in the previous computation. 24 YVES CORNULIER 1 1 1 x ∗′ y − x ∗ y = [x1 , y1]3 + [x1 , y1]4 + ([x1 , y2]4 + [x2 , y1 ]4 ) 2 2 2 1 + ([x1 , [x1 , y1 ]3 ] + [y1 , [y1, y1 ]3 ] + [x1 , [x1 , y1 ]2 ]4 + [y1 , [y1, x1 ]2 ]4 ). 12 This is a sum of four terms (as gathered in parentheses), say M1 +M2 +M3 +M4 , which metrically behave differently. For r = max(⌊x⌋, ⌊y⌋), we have ⌊M1 ⌋ ≤ r 2/3 , ⌊M2 ⌋ ≤ r 1/2 , ⌊M3 ⌋ ≤ r 3/4 , ⌊M4 ⌋ ≤ r 3/4 . Therefore the same argument shows that the identity map is an O(r 3/4 )-SBE and it is not hard to check in general, in the c-step nilpotent case, that we obtain −1 an O(r 1−c )-SBE. However, this can be improved, because it can happen that some of the above terms vanish. For instance, if M2 = M3 = M4 = 0; in this case we obtain an O(r 1/2 )-SBE. This occurs if and only if the linear grading satisfies [v1 , v1 ] ⊂ v2 ⊕ v4 and [v1 , v2 ] ⊂ v3 . This motivates to develop some set-up, so as to express properties asserting that a linear grading satisfies some partial algebra grading conditions. Then one has to wonder whether a nilpotent Lie algebra admits a grading with such conditions. Actually, to avoid idle formalism, we need to introduce conditions that are computably checkable, which will be expressed in terms of higher derivations and will then be reflected as grading conditions. We will come back to the 4-step nilpotent case to illustrate the general definitions. 6.C. Weak derivation conditions. Let us begin by some motivation. A Lie algebra, say finite-dimensional over a field of characteristic zero, is Carnot if it admits a grading such that the Lie algebra is generated by elements of degree 1. It is convenient to observe that this is equivalent to be a nilpotent Lie algebra possessing a derivation inducing the identity map modulo the derived subalgebra. A useful observation is that the latter condition can be viewed as the existence of a solution to some (affine) system of linear equations. We are going to introduce similar weaker notions, which will prove relevant to the study of SBEs between nilpotent groups. 6.C.1. Compatible linear gradings and grading operators. Let g be a Lie algebra over a field K. Let (gi ) be the lower central series of g. L A compatible linear grading of g is a linear decomposition g = vi such that L i g = j≥i vj for all i. Let L▽ (g) be the subalgebra of L(g) of those linear endomorphisms stabilizing gi for all i; we call its elements pregrading operators of g. We define D(g) as the affine subspace of those D ∈ L▽ (g) inducing multiplication by i on gi /gi+1 for all i. We call elements of D(g) grading operators of g. ON SUBLINEAR BILIPSCHITZ EQUIVALENCE OF GROUPS 25 There is a canonical bijection between the set of compatible linear gradings and the space of grading operators, written precisely in the following proposition, whose proof is immediate: Proposition 6.1. Assume that g is nilpotent and that the ground field has characteristic zero (or some p greater than the nilpotency length). Then there is a canonical bijection between the set D(g) of grading operators and the set of compatible linear gradings. Namely, every compatible linear grading comes from a grading operator D, defined to be multiplication by i on gi . Conversely, for a grading L operator D ∈ D(g), define vi = vi (D) as the kernel of D − i. Then g= vi is a compatible linear grading.  The interest of encoding compatible linear gradings as elements of D(g) is that the latter is an affine space. Remark 6.2. A grading operator can also be encoded in the one-parameter group of linear automorphisms (δt )t∈K ∗ it generates; here δt acts by multiplication by ti on vi (D). The usefulness of such subgroups (called one-parameter groups of dilations) was made clear by Breuillard’s interpretation of Guivarch’s and Pansu’s results [Bre] (as well as Goodman’s, although Breuillard was not aware of [Goo]). Here we prefer the equivalent data of grading operators, because we will take advantage of the structure of affine space of the set of grading operators. 6.C.2. ∆n and n-derivations. Denote by [x1 , . . . , xn ] the (left) iterated bracket [x1 , [x2 , . . . , [xn−1 , xn ] · · · ]]. Let Ln (g) be the space of K-multilinear maps gn → g (for n = 1, this is the algebra of linear endomorphisms of g and we simply denote it by L(g)). For n ≥ 2, define a linear operator ∆n from L(g) to Ln (g) by (∆n D)(x1 , . . . , xn ) = D[x1 , . . . , xn ]− ([Dx1 , x2 , . . . , xn ] + [x1 , Dx2 , x3 , . . . , xn ] + · · · + [x1 , . . . , xn−1 , Dxn ]). Note that ∆n D is alternating in the last two variables (xn−1 , xn ). By definition, D is a derivation if ∆2 D = 0. As a generalization, elements of the kernel of ∆n are called n-derivations (as introduced in [Abd], although the notion of 3-derivation, or triple derivation, occurred much earlier in [Lis]). Note that every derivation is an n-derivation for all n ≥ 2. In the sequel, it will be convenient to deal with ∆n and not only with its kernel. 6.C.3. Weak Carnot conditions. We generalize the notion of being an n-derivation in two ways. Being an n-derivation for D ∈ L▽ (g) can be rewritten as (∆n D)(g, . . . , g) = 0. First, we allow this to hold modulo some term of the lower central series; second, we restrict the variables to belong to some given terms of the lower central series. Namely, fix n ≥ 2 and an n-tuple of integers ℘ = (℘1 , . . . , ℘n ) with each ℘k ≥ 1 P and j ≥ 1; write |℘| = k ℘k . Then define Lj(℘1 ,...,℘n) (g) as the linear subspace of 26 YVES CORNULIER L(g) consisting of those pregrading operators D ∈ L▽ (g) such that ∆n D(g℘1 , . . . , g℘n ) ⊂ gj+1 . In particular, for ℘ = (1, . . . , 1) (n times), this is the space of elements of L▽ (g) inducing an n-derivation of g/gj+1 . Also it is immediate that Lj(℘1 ,...,℘n ) (g) = L▽ (g) as soon as j ≤ |℘|. Also, if g is c-step nilpotent, Lj(℘1 ,...,℘n ) (g) = Lc(℘1 ,...,℘n) (g) for all j ≥ c. Accordingly, it is no restriction to consider only those (℘1 , . . . , ℘n ) and j when 3 ≤ j ≤ c, 2 ≤ n < j, ℘k ≥ 1, |℘| < j, ℘n−1 ≤ ℘n . For given j, write Tj as the set of such n-tuples. Thus T2 = ∅; T3 = {(1, 1)}; T4 = {(1, 1), (1, 2), (1, 1, 1)}, T5 = T4 ∪ {(1, 3), (2, 2), (1, 1, 2), (2, 1, 1), (1, 1, 1, 1)} . . . Let Sc denote the set of pairs (℘|j) where j ranges over {3, . . . , c} and ℘ ranges over Tj , and S the union of all Sc . Here the sign | just replaces a comma for the sake of readability: an element of S will be denoted as (℘1 , . . . , ℘n |j) rather than ((℘1 , . . . , ℘n ), j). Definition 6.3. Let g be a Lie algebra, and denote D℘j (g) = D(g)∩Lj℘ (g). Given any subset A ⊂ S, we say that g is A-derivable if \ D A (g) := D℘j (g) 6= ∅; (℘|j)∈A we call such D an A-derivation. Note that we assumed nothing about g or the ground field, although this definition is (so far) only by the study of nilpotent Lie algebras. Actually, T motivated ∞ n if we define g = n g , then it follows from the definition that g is A-derivable if and only if g/g∞ is A-derivable. Let us clarify the intuition that it is enough to consider A ⊂ Sc for c-step nilpotent Lie algebras. Namely, given any A ⊂ S, define Ac as the “projection” of A on Sc , that is, the set of (i| min(j, c)) ∈ Sc when (i|j) ranges over A (if c ≤ 2, just define Ac = ∅). Then it is immediate that a c-step nilpotent Lie algebra is A-derivable if and only if it is Ac -derivable. In particular, for given c, this gives only finitely many definitions. Let us emphasize two particular cases: • Every Lie algebra g is ∅-derivable. • A c-step nilpotent Lie algebra g over a field of characteristic zero is Sderivable if and only if it is {(1, 1|c)}-derivable, if and only if it is Carnot. Indeed, Carnot is then easily seen to be equivalent to the existence of a derivation inducing the identity on the abelianization [Cor3, Lemma 3.10]. ON SUBLINEAR BILIPSCHITZ EQUIVALENCE OF GROUPS 27 Thus, for a nilpotent Lie algebra, the various conditions of being A-derivable are weakenings of being Carnot. S3 is reduced to {(1, 1|3)}; the first new notions appear for c = 4, where S4 = {(1, 1|3), (1, 1|4), (1, 2|4), (1, 1, 1|4).} This yields in principle 24 notions, but wiping obvious redundancies simplifies the picture. If A contains (1, 1|4), A-derivable just means Carnot (and other elements of A become redundant). Also, one easily shows the inclusion 4 3 4 D(1,1,1) (g) ⊂ D(1,1) (g) ∩ D(1,2) (g). In particular, when A contains both (1, 1|3) and (1, 2|4), then (1, 1, 1|4) is redundant. Remark 6.4. A naive expectation would be that g is A-derivable if and only if it is {α}-derivable for every α ∈ A. If it were true, as small-dimensional example seem to illustrate, this would reduce to the study of A-derivability when A is a singleton. However, this is not true: there is an 11-dimensional 4-step nilpotent Lie complex algebra (defined over the rationals) that is both {(1, 1|3)}derivable and {(1, 2|4)}-derivable, but not {(1, 1|3), (1, 2|4)}-derivable; see §6.D. This shows that beyond the Carnot case, there is, in general, no “best” linear compatible grading. Proposition 6.5. For finite-dimensional Lie algebras g and A ⊂ S, the property of being A-derivable is invariant under extensions of scalars. Namely, for any extension field L of K, write gL = L ⊗K g; viewed it as a Lie algebra over L. Then g is A-derivable if and only if gL is A-derivable. Proof. The condition can be written as a system of (affine) linear equations with coefficients in K; in particular it has a solution in L if and only if it has a solution in K.  Remark 6.6. That being A-derivable is given by a system of linear equations also means that it can be checked computationally (if we can input the Lie algebra constants). 6.C.4. Interpretation in terms of linear gradings. Let g be a nilpotent Lie L algebra over a field of characteristic zero. Any D ∈PD(g) defines a grading g = vi as in §6.C.1. For ℘ = (℘1 , . . . , ℘n ), write |℘| = ℘k . Then for all xk ∈ v℘k , we have ∆n D(x1 , . . . , xn ) = D([x1 , . . . , xn ]) − |℘|[x1 , . . . , xn ]. Decompose the bracket according to this grading: for each given ℘ and all xk ∈ v℘k , write X [x1 , . . . , xn ] = [x1 , . . . , xn ]j . j≥|℘| Then ∆n D(x1 , . . . , xn ) = X (j − |℘|)[x1 , . . . , xn ]j . j>|℘| 28 YVES CORNULIER For g c-step nilpotent and ℘ = (℘1 , . . . , ℘n ) the condition D ∈ D℘c (g) means that ∆n D(v℘′1 , . . . , v℘′n ) = 0 for all ℘′ ≥ ℘ (that is, all ℘′1 ≥ ℘1 . . . ℘′n ≥ ℘n ), which thus means that [v℘′1 , . . . , v℘′n ]j = 0 for all ℘′ ≥ ℘ with |℘′ | < c and all j such that |℘′ | < j ≤ c. In general, this means that this condition holds modulo gc+1 . Let us write, for record Proposition 6.7. Assume that the field has characteristic zero and g is nilpotent. For any ℘, j, and any D ∈ D(g) defining a linear grading (vi ), the condition D ∈ D℘j (g) means that [v℘′1 , . . . , v℘′n ]ℓ = 0 for all ℘′ ≥ ℘ and all ℓ such that |℘′ | < ℓ ≤ j.  For instance, for c = 4, i ∈ {(1, 1), (1, 2), (1, 1, 1)}. Then 4 • D ∈ D(1,1) (g) means that D is a Carnot grading (or equivalently satisfies [v1 , v1 ] ⊂ v2 , [v1 , v2 ] ⊂ v3 ; 4 • D ∈ D(1,2) (g) means that [v1 , v2 ] ⊂ v3 ; 4 • D ∈ D(1,1,1) (g) means that that [v1 , [v1 , v1 ]] ⊂ v3 . 3 • In addition, D ∈ D(1,1) (g) means that [v1 , v1 ] ⊂ v2 ⊕ v4 . Thus, being an A-derivation encodes some of the conditions involved in being a Lie algebra grading. Remark 6.8. Not all possible partial conditions are encoded in this way; for instance, for c = 4 the condition [v1 , v1 ] ⊂ v2 does not appear in such a way, so Proposition 6.5 does not apply to the existence of such a grading. More precisely, in a 4-step nilpotent Lie algebra g, the set of grading operators for which the corresponding grading satisfies [v1 , v1 ] ⊂ v2 is not always affine subspace of D(g). For instance, let g be the standard filiform 5-dimensional Lie algebra, with basis (ei )1≤i≤5 and nonzero brackets [e1 , ei ] = ei+1 , i = 2, 3, 4. Consider the 1-dimensional affine subspace V of D(g) consisting of those operators Dx for x in the ground field, where dx is defined by e1 7→ e1 , e2 7→ e2 + xe3 + e4 , e3 7→ 2e3 + xe4 , e4 7→ 3e4 , e5 7→ 4e5 . Then if (vi ) is the corresponding grading (for a given x), a basis of v1 is (e1 , e′2 (x)), where e′2 (x) = e2 − xe3 + 12 (x2 − 1)e4 . Then computation yields Dx [e1 , e′2 (x)] − 2[e1 , e′x ] = (x2 − 1)e5 . So [v1 , v1 ] ⊂ v2 if and only if x2 = 1. This means that the set of grading operators whose grading satisfies [v1 , v1 ] ⊂ v2 does not intersect V in an affine subspace, so is not an affine subspace. 6.C.5. The e-invariant. We now focus on certain particular subsets A of S. Namely, for r ∈ R, define [r] = {(℘|j) : |℘|/j > r}. Here ℘ ranges over all n-tuples (℘1 , . . . , ℘n ) with all ℘k ≥P1 such that |℘| < j and n ranges over {2, . . . , j − 1}. (Recall that |℘| means k ℘k , and (℘|j) is just one way to write (℘, j)). ON SUBLINEAR BILIPSCHITZ EQUIVALENCE OF GROUPS 29 Since ℘′ ≥ ℘ implies |℘′ |/j ≥ |℘|/j, Proposition 6.7 implies the following. Proposition 6.9. Assume that the field has characteristic zero and g is nilpotent. A grading operator D ∈ D(g) is an [r]-derivation if and only if, considering the corresponding linear grading (vi ), for all ℘ and j such that |℘|/j > r, we have [v℘1 , . . . , v℘n ] ⊂ v|℘| ⊕ gj+1. Definition 6.10. For a nilpotent Lie algebra g over a field of characteristic zero, define eg = inf D∈D(g) eD , where, for a given D ∈ D(g), eD = inf{r ≥ 0 : D is a [r]-derivation}. Thus eg is also the infimum of r ≥ 0 such that g is [r]-derivable. Note that eD = 0 means that D is a derivation, so eg = 0 means that g is Carnot. Define Jc = {0} ∪ {i/j : 2 ≤ i < j ≤ c}. So       2 1 2 3 2 1 3 2 3 4 J2 = {0}, J3 = 0, , J4 = 0, , , , J5 = 0, , , , , , ,... 3 2 3 4 5 2 5 3 4 5 Suppose that g is c-nilpotent. For r ∈ [0, 1], let s be the largest number ≤ r in Jc . Then D is an [r]-derivation if and only if g is an [s]-derivation. It follows that the infimums in Definition 6.10 are attained and belong to Jc . It particular, they are ≤ 1 − c−1 . We will see in Proposition 6.13 that all values of Jc can be achieved by some finite-dimensional c-step nilpotent Lie algebra, which can be chosen to be defined over Q. Corollary 6.11. Assume that the field has characteristic zero and g is nilpotent. For every grading operator D ∈ D(g), We have [v℘1 , . . . , v℘n ] ⊂ v|℘| ⊕ g⌈|℘|/eD ⌉ .  6.C.6. Example and miscellaneous facts on the e-invariant. For a 3-step nilpotent Lie algebra, we have eg ∈ {0, 2/3}, and it is 0 if and only if it is Carnot. In general, it is always true that eg/gj ≤ eg for all j. Thus, eg < 2/3 implies that g/g4 is Carnot. For a 4-step nilpotent Lie algebra, we more precisely have eg ∈ {0, 1/2, 2/3, 3/4} and is determined by the following three facts, stated in terms of gradings and of derivations: (1) eg = 0 ⇔ g is Carnot ⇔ there exists a derivation in D(g); (2) eg ∈ {0, 1/2} ⇔ there exists a linear grading such that [v1 , v1 ] ⊂ v2 ⊕ v4 and [v1 , v2 ] ⊂ v3 ⇔ there exists D ∈ D(g) such that ∆2 D maps into g4 and maps g1 × g2 to zero; (3) eg ∈ {0, 1/2, 2/3} ⇔ there exists a linear grading such that [v1 , [v1 , v1 ]] ⊂ v3 and [v1 , v2 ] ⊂ v3 ⇔ there exists D ∈ D(g) such that ∆2 D maps g1 × g2 to zero and ∆3 D maps g1 × g1 × g1 to zero. 30 YVES CORNULIER Let us provide a comprehensive description for nilpotent Lie algebras of dimension ≤ 6 in characteristic zero, where all the previous cases actually occur. By Proposition 6.5, it is enough to consider Lie algebras over an algebraically closed field, where the classification is simpler. In the table below, the first line concerns the Carnot case. The second line concerns the case of all non-Carnot 3-step nilpotent Lie algebras g: up to isomorphism and for an algebraically closed field, there is one such Lie algebra in dimension 5, and 5 in dimension 6, including the product of the 5-dimensional one with a 1-dimensional abelian one. Then we list the remaining ones, namely those of nilpotency length ≥ 4. We mention both the notation in De Graaf [Gra] and Magnin [Mag] (Li,j refers to [Gra] and gi,j to [Mag]). In each case we write the law, writing only nonzero brackets, and shortening such a notation as [ei , ej ] = ek to “ij : k” for a choice of basis (e1 , . . . ). The columns τ gives the sequence of nonzero dimensions (gi /gi+1 ): the number of terms gives the nilpotency length c and the sum of terms gives the dimension d; for τ , we abbreviate, for instance, (2, 1, 1) into 211. The column “failure” gives a set A (here, always a singleton) for which g fails to be A-derivable and yielding the lower bound for eg . Lie algebra τ d c eg failure any Carnot 0 − any 3-step, non-Carnot 3 2/3 {11|3} g5,5 = L6,7 : 12:3, 13:4, 14:5, 23:5 2111 5 4 3/4 {12|4} g6,11 = L6,12 : 12:4, 14:5, 15:6, 23:6 3111 6 4 1/2 {11|4} g6,12 = L6,11 : 12:4, 14:5, 15:6, 23:6, 24:6 3111 6 4 3/4 {12|4} g6,13 = L6,13 : 12:4, 14:5, 15:6, 23:5, 43:6 3111 6 4 3/4 {12|4} g6,17 = L6,17 : 12:3, 13:4, 14:5, 15:6, 23:6 21111 6 5 3/5 {12|5} g6,19 = L6,15 : 12:3, 13:4, 14:5, 15:6, 23:5, 24:6 21111 6 5 4/5 {13|5} g6,20 = L6,14 : 12:3, 13:4, 14:5, 25:6, 23:5, 43:6 21111 6 5 4/5 {13|5} It is easy to see that taking the direct product with an abelian Lie algebra does not affect the notion of A-derivability (in either direction), and hence does not the value of e. So the product of g5,5 with a 1-dimensional Lie algebra was omitted in this table (it has e = 3/4). Let us illustrate the proof (of the value of eg ) in only the case of g = g6,11 , since all others are similar: denoting by (vi )1≤i≤6 basis, the linear compatible grading for which the basis elements v1 , v2 , v3 have degree 1, v4 has degree 2, v5 has degree 3 and v6 has degree 4, satisfies all algebra grading conditions except for [v1 , v1 ], which is contained in v2 ⊕ v4 . Thus it defines a [r]-derivation for all r > 1/2, and hence eg ≤ 1/2. But there is no grading defining a [1/2]-derivation. Indeed, the corresponding new grading should satisfy [v1 , v1 ] ⊂ v2 . But there should be some elements v2 + w, v3 + x of degree 1 with w, x in the derived subalgebra g2 . Then, since both v2 and v3 centralize the derived subalgebra which is abelian, we obtain [v2 + w, v3 + x] = v6 , a contradiction, showing eg ≥ 1/2. Another explicit case where we will perform such a verification is given in §6.D. ON SUBLINEAR BILIPSCHITZ EQUIVALENCE OF GROUPS 31 Remark 6.12. It would have been tempting to restrict all this discussion to the case of ℘ of length 2, that is, ignore n-derivations for n ≥ 3. But although this is not visible in the above table, this would affect the value of eg , including in the 4-step nilpotent case. Indeed, consider the 7-dimensional Lie algebra denoted by g7,1,2(i1 ) in [Mag]. With the above conventions, its law can be written as 12:4, 14:5, 24:6, 15:7, 26:7, 13:6, 23:5. Then this Lie algebra is {(1, 2|4)}-derivable but not {(1, 1, 1|4)}-derivable (in particular eg = 3/4). The more complicated example of §6.D also satisfies this, but unlike this one, is also {(1, 1|3)}-derivable. Proposition 6.13. For every c ≥ 3, all 3 ≤ j ≤ c and all i ∈ {2, . . . , j −1}, there exists a finite-dimensional c-step nilpotent Lie algebra (defined over Q) such that eg = i/j. Proof. Consider the Lie algebra with basis X, Y1 , . . . , Yi−1 , U, V1, . . . , Vj and nonzero brackets [X, Yp ] = Yp+1, 1 ≤ p ≤ i − 2, [X, Yi−1 ] = Vj , [U, Vq ] = Vq+1 , 1 ≤ q ≤ j − 1. (This is a central product of two standard filiform Lie algebras, of dimension i + 1 and j + 1.) Consider the compatible linear grading for which X, U have degree 1, Yp has degree p and Vq has degree q. Then it is immediate that it belongs to D℘k for all (℘|k) such that either k < j or |℘| = 6 i. In particular, eg ≤ eD ≤ i/j, where D is the corresponding grading operator. j To prove that eg ≥ i/j, it is enough to show that D(1,i−1) (g) = ∅. Indeed, if E belongs to it, then E(Vj ) = jYj , and also, defining N = E − D, we have E(Vj ) = E([X, Yi−1 ]) = [EX, Yi−1 ] + [X, EYi−1 ] = iVj + [NX, Yi−1 ] + [X, NYi−1 ]. Since NX is a linear combination of the Yp and Zq , and NYi−1 is a linear combination of the Vq , we see that both brackets vanish and thus jVj = E(Vj ) = iVj . This is a contradiction and thus E cannot exist. Thus eg = i/j.  6.D. A counterexample. Here we give the example illustrating Remark 6.4; we write in a separate subsection because of the length of the proof, and because the reader can skip it in a first reading if not specifically interested. Consider the 11-dimensional Lie algebra with basis (a1 , a2 , b1 , b2 , c1 , c2 , c3 , d1, d2 , e1 , e2 ) and nonzero products (we omit the brackets) a1 a2 = b2 , a1 b1 = c1 , b1 a2 = c2 , a1 b2 = c3 , a1 c1 = d1 , a1 c2 = b1 b2 = d2 ; b1 c1 = b2 c1 = a1 d1 = d1 a2 = e1 , a1 d2 = e2 , b1 c3 = e1 + e2 . This is a priori an algebra with alternating product. We have to show that the Jacobi form, which is alternating trilinear, vanishes on triples of distinct basis elements. 32 YVES CORNULIER Note that this algebra has a grading in {1, . . . , 5} for which ai has degree 1, bi degree 2, etc. (This already shows that it is nilpotent.) So to check the Jacobi identity, it is enough to consider triples of distinct basis elements with total weight ≤ 5. The only 3-element subsets of the basis involving a2 and from which we can form at least one nonzero triple product are {a1 , a2 , b1 } and {a1 , a2 , c1 }. In both cases, the Jacobi form vanishes anyway: [a1 , [a2 , b1 ]] + [a2 , [b1 , a1 ]] + [b1 , [a1 , a2 ]] = −[a1 , c2 ] − [a2 , c1 ] + [b1 , b2 ] = −d2 + 0 + d2 = 0; [a1 , [a2 , c1 ]] + [a2 , [c1 , a1 ]] + [c1 , [a1 , a2 ]] = 0 − [a2 , d1 ] + [c1 , b2 ] = 0 + e1 − e1 = 0. The only remaining 3-element subset of the basis with total weight ≤ 5 is {a1 , b1 , b2 }, and we have [a1 , [b1 , b2 ]] + [b1 , [b2 , a1 ]] + [b2 , [a1 , b1 ]] = [a1 , d2 ] − [b1 , c3 ] + [b2 , c1 ] = e2 − (e1 + e2 ) + e1 = 0. Hence this is indeed a Lie algebra. Proposition 6.14. The above Lie algebra is both {(1, 1|3)}-derivable and {(1, 2|4)}derivable, but not {(1, 1|3), (1, 2|4)}-derivable. Actually, it is not {(1, 1, 1|4)}derivable. Proof. It is straightforward that a compatible linear grading is obtained by taking a1 , a2 , b1 to be of degree 1, b2 , c1 , c2 of degree 2, c3 , d1 , d2 of degree 3, and e1 , e2 of degree 4. In particular, the nilpotency length is 4. The only basis relation not preserving this grading is [b1 , c1 ] = e1 , which has the form “1 + 2 = 4”. In particular, the quotient by the fourth term of the central series is Carnot, and thus the Lie algebra is {(1, 1|3)}-derivable. We can now change the basis, by replacing b1 by b′1 = b1 −b2 . We obtain another compatible linear grading by replacing b1 with b′1 in the previous description, L which we now denote as 4i=1 vi . Then we see that the latter defines a (1, 2|4)derivation, or equivalently that [v1 , v2 ] ⊂ v3 . Indeed, in this new basis, the nonzero brackets are a1 a2 = b2 , a1 b′1 = c1 − c3 , b′1 a2 = c2 , a1 b2 = c3 , a1 c1 = d1 , a1 c2 = b′1 b2 = d2 ; b2 c1 = a1 d1 = d1 a2 = e1 , a1 d2 = e2 , b′1 c3 = e1 + e2 . We see now that the only basis relation not preserving the new linear grading is [a1 , b′1 ] = c1 − c3 ; in particular, [v1 , v2 ] ⊂ v3 . Thus g is {(1, 2|3)}-derivable. (Note that if we replace c1 by c′1 = c1 −c3 , then we obtain the new basis relation ′ [b1 , c′1 ] = −e1 − e2 , and again the resulting grading operator, albeit being again a {(1, 1|3)}-derivation, fails to define a {(1, 2|3)}-derivation.) ON SUBLINEAR BILIPSCHITZ EQUIVALENCE OF GROUPS 33 L4 Let us actually prove by contradiction that there is no grading g = i=1 vi whose associated grading operator is a {(1, 1|3), (1, 2|4)}-derivation. This means that [v1 , v1 ] ⊂ v2 ⊕ v4 and [v1 , v2 ] ⊂ v3 . This implies [v1 , [v1 , v1 ]] ⊂ v3 , i.e., there is a {(1, 1, 1|4)}-derivation; we are going to deduce a contradiction. Under this contradictory assumption, v1 contains two elements of the form a = a1 + w and b = b1 + x, with both x, w in [g, g]. Then [b, [a, b]] = [b, a, b] has to be of degree 3. Now we compute: [b, a, b] = [b1 , a1 , b1 ] + [b1 , w, b1 ] + [x, a1 , b1 ] + [b1 , a1 , x] + (. . . ), where (. . . ) is a sum of brackets involving two terms of the derived subalgebra and an additional term, and thus belong to the fifth term of the lower central series, and hence vanishes. Also for the ordinary Lie algebra grading, [b1 , w, b1 ] has to be a sum of terms of degree ≥ 6 and hence vanishes; for the same Lie algebra grading, we see that if we write x = λb2 + x′ with x′ a sum of terms of degree ≥ 3, then the terms involving x′ will also vanish. So we have [b, a, b] = [b1 , a1 , b1 ] + λ([b2 , a1 , b1 ] + [b1 , a1 , b2 ]) = e1 + λ(e1 + (e1 + e2 )). Since the latter has to be of degree 3 and is also of degree 4, it vanishes, whence (2λ + 1) = λ = 0, a contradiction.  6.E. SBE of nilpotent groups. If G is a simply connected nilpotent Lie group, we write eG = eg , where g is the Lie algebra of G, and eg is introduced in Definition 6.10. The following theorem, when e = 1 − c−1 , is a quantitative version of Pansu’s theorem describing the asymptotic cone [Pa1]. The contribution here is the formulation of the result in the context of SBEs, as well as the improvement of the exponent. Theorem 6.15. Let G be a simply connected nilpotent Lie group and G∞ the associated Carnot Lie group, and e = eG . Then G is O(r e )-SBE to G∞ . This follows from a more precise result. Let G be a simply connected nilpotent Lie group, g its Lie algebra. Let D be a grading operator on g (see §6.C.1), and (vi ) the corresponding linear grading. For x ∈ vi , y ∈ vj , define [x, y]∞ as the projection of [x, y] on vi+j modulo gi+j+1 ; extend it by bilinearity to g; this is a Lie bracket. This is the standard way to construct the associated graded Carnot algebra. Let us emphasize (since this is a frequent point of confusion) that although (g, [·, ·]∞ ), up to graded Lie algebra isomorphism, does not depend on the choice of D, the linear isomorphism given by the identity (g, [·, ·]) → (g, [·, ·]∞ ) is very sensitive to it. At the level of Lie groups, it induces a homeomorphism ΦD from G onto G∞ . Since eg = minD eD , the following theorem entails Theorem 6.15. 34 YVES CORNULIER Theorem 6.16. Let G be a simply connected nilpotent Lie group and G∞ the associated Carnot Lie group. For every grading operator D, the homeomorphism ΦD : G → G∞ is an O(r eD )-SBE. Define a binary law on g by x ∗ y = log(exp(x) exp(y)): this is the group law, transported to g through the exponential map. If instead we perform this using the g endowed with the bracket [·, ·]∞ , we define another group law ∗∞ on g (depending on the original bracket and on D). P Fix a norm on each vi and define, for x = xi ∈ g (with xi ∈ vi ), the Guivarch norm ⌊x⌋ = max kxi k1/i . The main lemma underlying Theorem 6.16 consists in proving the following: Lemma 6.17 (Goodman-type inequality). Under the assumptions of Theorem 6.16, there exists a positive constant C such that for all z1 , z2 in g, we have ⌊(z1 ∗ z2 ) − (z1 ∗∞ z2 )⌋ ≤ C max(1, ⌊z1 ⌋eD , ⌊z2 ⌋eD ). Goodman [Goo, Theorem 1] established this lemma with eD replaced with 1 − c−1 , where c is the nilpotency length. He just stated it with a constant γ < 1 instead, but in his proof the definition of γ makes it clear that it is ≤ 1 − c−1 . Proof of Lemma 6.17. Write e = eD . Note that ⌊·⌋ is subadditive. For any n and ℘ = (℘1 , . . . , ℘n ), we have, for all xi ∈ v℘i , using the notation of §6.C.4, X [x1 , . . . , xn ] − [x1 , . . . , xn ]∞ = [x1 , . . . , xn ]j j>|℘| By Corollary 6.11, this can be rewritten as [x1 , . . . , xn ] − [x1 , . . . , xn ]∞ = X [x1 , . . . , xn ]j j≥|℘|/e (for the trivial case e = 0, the latter sum is over j ≥ +∞, thus is an empty sum, thus is zero). Then for all xi ∈ v℘i , ⌊[x1 , . . . , xn ] − [x1 , . . . , xn ]∞ ⌋ ≤ max ⌊[x1 , . . . , xn ]j ⌋ = max k[x1 , . . . , xn ]j k1/j . j≥|℘|/e j≥|℘|/e There exists a constant C(℘,j) (depending only on g and the choices of norms) Q such that k[x1 , . . . , xn ]j k ≤ C(℘,j) ni=1 kxi k for all xi ∈ ℘i . Then, denoting 1/j C = max|℘|<j≤c C(℘,j) (where c is the nilpotency length of g), we have, for all xi ∈ v℘i !1/j n Y ⌊[x1 , . . . , xn ] − [x1 , . . . , xn ]∞ ⌋ ≤ C kxi k =C n Y i=1 ⌊xi ⌋℘i !1/j i=1  n |℘|/j ≤ C max⌊xi ⌋ i=1 ON SUBLINEAR BILIPSCHITZ EQUIVALENCE OF GROUPS 35 Thus for all xi ∈ v℘i , we have   n e  ⌊[x1 , . . . , xn ] − [x1 , . . . , xn ]∞ ⌋ ≤ C max 1, max⌊xi ⌋ (1) i=1 Now write the Baker-Campbell-Hausdorff series as X X B(z1 , z2 ) = z1 + z2 + bn,q [zq1 , . . . , zqn ]. n≥2 q∈{0,1}n The Baker-Campbell-Hausdorff formula says, in particular, that in a nilpotent Lie algebra, B(z1 , z2 ) = log(exp(z1 ) exp(z2 )). Here we have to beware that we consider two Lie algebras brackets, and therefore also have two group structures. Identifying the simply connected Lie group to its Lie algebra through the exponential, we obtain the two group structures ∗ and ∗∞ given by the Baker-Campbell-Hausdorff series computed on the one hand with [·, ·], and on the other hand with [·, ·]∞ . Thus c X X (z1 ∗ z2 ) − (z1 ∗∞ z2 ) = bn,q ([zq1 , . . . , zqn ] − [zq1 , . . . , zqn ]∞ ). n=2 q∈{0,1}n P L We now need to write zk = ci=1 zik in the decomposition g = vi . Then for any multilinear function f on n variables, we have X f (zpq11 , . . . , zpqnn ) f (zq1 , . . . , zqn ) = p∈{1,...,c}{1,...,n} Hence, writing {1, . . . , c}{1,...,n} = [c][n] we have (z1 ∗ z2 ) − (z1 ∗∞ z2 ) = c X X X bn,q ([zpq11 , . . . , zpqnn ] − [zpq11 , . . . , zpqnn ]∞ ), c X X X |bn,q |⌊[zpq11 , . . . , zpqnn ] − [zpq11 , . . . , zpqnn ]∞ ⌋. n=2 q∈{0,1}n p∈[c][n] whence ⌊(z1 ∗ z2 ) − (z1 ∗∞ z2 )⌋ ≤ n=2 q∈{0,1}n p∈[c][n] By (1), we deduce ⌊(z1 ∗ z2 ) − (z1 ∗∞ z2 )⌋ ≤ C c X X X n=2 q∈{0,1}n p∈[c][n] n |bn,q | max(1, max⌊zpqii ⌋e ). i=1 P P P Then, denoting C ′ = C cn=2 q∈{0,1}n p∈[c][n] |bn,q |, since ⌊zq ⌋ = maxi ⌊ziq ⌋, we have ⌊(z1 ∗ z2 ) − (z1 ∗∞ z2 )⌋ ≤ C ′ max(1, ⌊z1 ⌋e , ⌊z2 ⌋e ).  Proof of Theorem 6.16. The inverse law of both group laws is given by z −1 = −z. Denote by d and d∞ proper left-invariant geodesic distances on G and G∞ . We both view them as distances on g. Then, by Guivarch’s estimates [Gui], there 36 YVES CORNULIER exists a constant M ≥ 1 such that for all z ∈ g, both d(0, z) and d∞ (0, z) belong to [M −1 ⌊z⌋, M⌊z⌋]. Then, writing −z1 ∗ z2 for (−z1 ) ∗ z2 and using Lemma 6.17, d(z1 , z2 ) =d(−z1 ∗ z2 , 0) ≤ M⌊−z1 ∗ z2 ⌋ ≤M⌊−z1 ∗∞ z2 ⌋ + M⌊(−z1 ∗ z2 ) − (−z1 ∗∞ z2 )⌋ ≤M 2 d∞ (z1 , z2 ) + MC max(1, ⌊z1 ⌋eD , ⌊z2 ⌋eD ), and exactly the same reasoning works exchanging d and d∞ . Therefore the identity map (g, d) → (g, d∞ ) is O(r eD )-Lipschitz as well as its inverse. Therefore it is an O(r eD )-SBE.  Let us elaborate on Question 1.23. Every grading operator D on g yields an SBE ΦD : G → G∞ , well-defined up to composition by an automorphism of G∞ . The question can be split into two parts. Question 6.18. Given an admissible function r 7→ f (r) ≥ 1, (1) is it true that r e = O(f (r)) if and only if there exists a grading operator D such that ΦD is an O(f (r))-SBE? (2) is it true that G is O(f (r))-SBE to G∞ if and only if there exists a grading operator D such that ΦD is an O(f (r))-SBE? Question 6.18(1) might have a negative answer because of some unexpected simplification in the computation involving the Baker-Hausdorff formula (computer assistance might help finding such a putative counterexample); this is why I have not conjectured a positive answer to Conjecture 1.23. In case of such a negative answer, Question 6.18(2) sounds like a replacement, saying that the “best” SBE between one simply connected Lie group and its Lie algebra should be found among the ΦD . Example 6.19. Consider the 6-dimensional nilpotent real Lie algebra g defined as central product of a 4-dimensional and a 3-dimensional filiform Lie algebra. It can be described by its nonzero brackets: [e1 , e2 ] = e5 , [e1 , e5 ] = [e3 , e4 ] = e6 . (This is g6,2 in [Mag] and L6,10 in [Gra].) This Lie algebra is not Carnot: the associated Carnot Lie algebra g∞ has the same brackets except that [e3 , e4 ] = 0, and has 3-dimensional center while g has 1-dimensional center. Also, they have distinct Betti numbers: b2 (g′ ) = 7 while b2 (g) = 6. This implies that they are not quasi-isometric, by Shalom’s theorem [Sha]. More precisely, under the Carnot grading, g′ has 1-dimensional 2-homology in degree 4, which corresponds to a central extension of nilpotency length equal to 4, while g has no such central extension (every element of Λ2 g of the form x ∧ z, (x, z) ∈ g × g3 is a boundary). Let G, G′ be the corresponding simply connected Lie groups; we have eG = 2/3. For which α are G and G′ O(r α )-SBE? The reason we insist on this example is that we expect that it might be possible to obtain nontrivial lower bounds on such α using the Dehn function, see Question 6.20. ON SUBLINEAR BILIPSCHITZ EQUIVALENCE OF GROUPS 37 Question 6.20. Continue with the notation of Example 6.19. Is it true that G has Dehn function in o(r 4 )? The existence of a 4-nilpotent central extension of g′ implies, by standard arguments, that G′ has Dehn function ≃ r 4 . Thus a positive answer to Question 6.20 would provide the first example of a nilpotent group with Dehn function not equivalent to that of its associated Carnot group. Furthermore, a positive answer with a reasonably explicit upper bound and description of the homotopy might imply a positive lower bound on the set of α such that G and G′ are SBE, which would be the first known results improving the bare fact that they are not quasi-isometric. 7. Large-scale contractions and similarities 7.A. Large-scale contractions in the quasi-isometric setting. In metric spaces, a c-Lipschitz self-map for c < 1 has very simple dynamical properties. We extend this here to the large-scale setting, so as to obtain a reasonable definition of large-scale contractable metric space. Definition 7.1. Let X, Y be metric spaces and f : X → Y . We say that f is (c, C)-Lipschitz’ if d(f (x), f (x′ )) ≤ max(cd(x, x′ ), C) for all x, x′ ∈ X. We say that f is c-LS-Lipschitz’ if it is (c, C)-Lipschitz’ for some C. Remark 7.2. There is a more usual closely related variant: say that f is (c, C)Lipschitz if d(f (x), f (x′ )) ≤ cd(x, x′ ) + C for all x, x′ ∈ X. Then if f is (c, C)Lipschitz’, then it is (c, C)-Lipschitz. Conversely, if f is (c, C)-Lipschitz, then it is (c′ , C ′ )-Lipschitz’ for every c′ > c and C ′ ≥ C/(1 − c/c′ ). In particular, if f is c-LS-Lipschitz’ then it is c-LS-Lipschitz, and if f is c-LSLipschitz, then it is c′ -LS-Lipschitz’ for all c′ > c. As a consequence, if g : X → Y is at bounded distance of a c-LS-Lipschitz’ map, then it is a c′ -LS-Lipschitz’ map for all c′ > c (indeed, g is clearly c-LS-Lipschitz). Lemma 7.3. Let f : X → Y be a (c, C)-Lipschitz’ map and let g : Y → Z be a (c′ , C ′ )-Lipschitz’ map. Then g ◦ f is (cc′ , max(c′ C, C ′ ))-Lipschitz’. In particular, • if f is c-LS-Lipschitz’ and g is c′ -LS-Lipschitz’ then g ◦ f is cc′ -LSLipschitz’; • f is c-LS-Lipschitz’, n ≥ 0 implies that f n is cn -LS-Lipschitz’; • f is (c, C)-Lipschitz’ with c ≤ 1, n ≥ 0 implies that f n is (cn , C)Lipschitz’. Proof. We have the inequality d(g ◦ f (x), g ◦ f (x′ )) ≤ max(c′ d(f (x), f (x′ )), C ′ ) ≤ max(c′ max(cd(x, x′ ), C), C ′ ) = max(cc′ d(x, x′ ), max(c′ C, C ′)). All three consequences are immediate.  38 YVES CORNULIER Definition 7.4. We say that X is LS-contractable if it admits a LS-contraction, i.e., a self-quasi-isometry that is c-LS-Lipschitz’ for some c < 1. Taking powers and using Lemma 7.3, we see that this implies that X admits self-quasi-isometries that are (c, C)-LS-Lipschitz’ for c arbitrary close to 0 and C uniform. Proposition 7.5. To be LS-contractable is a QI-invariant. Proof. Let X be a LS-contractable metric space. Let Y be metric space, and let u : X → Y and v : Y → X be quasi-isometries, say both λ-LS-Lipschitz’ for some λ > 0. Consider a c-LS-Lipschitz’ self-quasi-isometry f of X for c < λ−2 . Then u ◦ f ◦ v is a cλ2 -LS-Lipschitz’ self-quasi-isometry of Y , and cλ2 < 1.  Proposition 7.6. Let X be a nonempty connected graph of bounded degree. Suppose that X is LS-contractable. Then X has polynomial growth. Proof. Let f be a (c, C)-Lipschitz’ self-quasi-isometry of X (we can suppose that C > 0); suppose that X has degree ≤ δ. It follows that the fibers of f have cardinal at most k, for some integer k. For n ≥ 0, define Zn = {x ∈ X : d(x, f (x)) ≤ c−n C}. We see that Z0 ⊂ Z1 ⊂ . . . , and, for every n ≥ 1, f (Zn ) ⊂ Zn−1 , i.e., Zn ⊂ f −1 (Zn−1 ). This implies that #(Zn ) ≤ k n #(Z0 ) for all n. Suppose z, z ′ ∈ Z0 with d(z, z ′ ) ≥ c−1 C. Then d(f (z), f (z ′ )) ≤ cd(z, z ′ ) ≤ cd(z, f (z)) + cd(f (z), f (z ′ )) + cd(z ′ , f (z ′ )) whence ≤ 2cC + cd(f (z), f (z ′ )), 2cC ; 1−c there exists c′′ such that for all x, x′ ∈ X, d(f (x), f (x′)) ≤ 2cC implies d(x, x′ ) ≤ 1−c c′′ . Hence the diameter of Z is ≤ max(c−1 C, c′′ ); in particular Z0 is bounded, hence finite. Fix x0 ∈ Z0 . If d(x, x0 ) ≥ c−1 C, then d(f (z), f (z ′ )) ≤ d(x, f (x)) ≤ d(x, x0 ) + d(x0 , f (x0 )) + d(f (x), f (x0 )) ≤ (1 + 2c)d(x, x0 ); hence, denoting by B(r) the closed r-ball around x0 , we have B((1 + 2c)c−n C) r B(c−1 C) ⊂ Zn ; hence #B((1 + 2c)c−n C) ≤ #B(c−1 C) + k n #(Z0 ) for all n ≥ 0, and hence X has polynomial growth (of degree ≤ logc−1 (k)).  ON SUBLINEAR BILIPSCHITZ EQUIVALENCE OF GROUPS 39 Remark 7.7. The proof works more generally in any uniformly discrete metric space, which means a metric space such that balls of radius r have cardinal ≤ u(r) for some function u (see [CH, §3.D]). Corollary 7.8. If a compactly generated, locally compact group G is LS-contractable, then it has polynomial volume growth. Proof. Indeed G is quasi-isometric to some connected, bounded degree graph (see [CH, §3.B] if necessary), which has to be LS-contractable, hence of polynomial growth.  Therefore the characterization of compactly generated locally compact groups that are LS-contractable reduces to the case of simply connected nilpotent Lie groups. If such a group admits a contracting automorphism, then it is coarsely contractable. Question 7.9. Conversely, if a simply connected nilpotent Lie group is LS-contractable, does it admit a contracting automorphism? We rather expect a positive answer, although we do not know a single example of a simply connected nilpotent Lie group that is not LS-contractable (while many simply connected nilpotent Lie groups in dimension 7 and higher, have no contracting automorphisms). A simply connected nilpotent Lie group has a contracting automorphism if and only if its algebra has one, which is equivalent to having a grading in positive integers (not necessarily Carnot). 7.B. Sublinearly contractable. We can define, more generally, a O(u)-contraction to be a (c, O(u))-Lipschitz’ and O(u)-SBE map for some c < 1, and an o(u)contraction to be an O(v)-contraction for some v = o(u). We say that a space is O(u)-contractable, respectively o(u)-contractable, if it admits an O(u)-contraction, resp. o(u)-contraction. Denoting as we do here the variable by r, we write “sublinearly contractable” for o(r)-contractable. Arguing as in the large-scale case (that is, O(1)-contractibility), this is a O(u)-SBE (resp. o(u)-SBE) invariant. Beware that, in constast to Proposition 7.6, a sublinearly contractable bounded degree graph need not be of polynomial growth: indeed, the trees of superpolynomial growth of Example 3.1(1) are SBE to a geodesic ray, and hence sublinearly contractable. In particular, every compactly generated locally compact group with polynomial group being SBE to a Carnot group, it is sublinearly contractable. More precisely, every simply connected nilpotent Lie group G with e = eG is O(r e )contractable. But this is not always optimal. Indeed, it can happen that G is contractable (i.e., admits a positive grading) and hence is O(1)-contractable (although not always being quasi-isometric to a Carnot group). This applies to the 5-dimensional 3-step nilpotent non-Carnot case. 40 YVES CORNULIER It can also happen that G is not contractable, but is known to be O(r α )contractable for some α < eG , as is given by the following proposition. Proposition 7.10. The following characteristically nilpotent Lie algebra g, denoted g7,0,8 in [Mag], with basis (ei )1≤i≤7 and nonzero brackets (writing ij|k for [ei , ej ] = ek ) 12|4, 14|5, 15|6, 26|7, 54|7, 13|7, 23|6, 24|6, has eg = 3/4, but the corresponding simply connected (7-dimensional real) Lie group is O(r 2/5 )-contractable. More precisely, it is O(r 2/5 )-SBE to a contractable Lie group (i.e., whose Lie algebra admits a positive grading). Proof. The nilpotency length of g is 5, and the quotient g/g5 is isomorphic to g6,12 , which has e = 3/4 (see §6.C.6). In particular eg ≥ 3/4. Let D be the grading operator corresponding to the grading for which e1 , e2 , e3 have degree 1 and ei has degree i − 2 for i = 4, 5, 6, 7. Then among the brackets above, only the last three fail to respect the degree. It readily follows that quadruple brackets respect the degree. In particular, D ∈ D℘6 (g) for all ℘ such that |℘| = 4. Since for 2 ≤ i < j ≤ 5 and i ≤ 3 we have i/j ≤ 3/4, we deduce eg ≤ 3/4. Again using the nomenclature in [Mag], the Lie algebra h = g7,1,21 is defined exactly with the same brackets, except that [e1 , e3 ] = 0. This Lie algebra admits a positive Lie algebra grading (for which e1 has degree 1, e2 has degree 2, e3 , e4 have degree 3, e5 has degree 4, e6 has degree 5, and e7 has degree 6). So, identifying the Lie algebras with their exponentials, it is enough to show that the identity map between the two group laws is an O(r 2/5 )-SBE. Denote by B ′ the bracket in g and B the bracket in h. Then the alternating bilinear form B ′ − B maps e1 ∧ e3 to e7 and other basis elements to 0. As for brackets, write iterated brackets as B(x, B(y, z)) = B(x, y, z), etc. Since its image of B ′ −B is central (for both brackets), any iterated bracket B ′ (x1 , . . . , xn ) is equal to B ′ (x1 , B(x2 , . . . , xn )). Since moreover B ′ − B vanishes on g × g2 , we deduce that for n ≥ 3, B ′ (x1 , . . . , xn ) = B(x1 , . . . , xn ) for all n. Therefore, denoting by ∗ and ∗′ the corresponding laws given by the Baker-Hausdorff formula, only terms of degree 2 remain when computing: 1 (x ∗′ y) − (x ∗ y) = (B ′ (x, y) − B(x, y)), 2 ∀x, y ∈ g. Decomposing x and y along the basis (ei ), we get 1 (x ∗′ y) − (x ∗ y) = (x1 y3 − x3 y1 )e7 . 2 Since ⌊x⌋ is equal to max(|x1 |, |x2 |, |x3 |, |x4 |1/2 , |x5 |1/3 , |x6 |1/4 , |x7 |1/5 ) (after some choice of submultiplicative norm), this implies an equality of the form ⌊(x ∗′ y) − (x ∗ y)⌋ ≤ C max(⌊x⌋, ⌊y⌋)2/5 . We can then end the proof exactly as in the proof of Theorem 6.16.  ON SUBLINEAR BILIPSCHITZ EQUIVALENCE OF GROUPS 41 7.C. Large-scale similarities. A similarity of a metric space is a self-map that pulls back the distance to a multiple of itself. We define here the large-scale analogue of this notion. Write log+ (x) = max(0, log x). Definition 7.11. Let f be a (c, C)-Lipschitz’ self-map of X with c < 1 (in the sense of Definition 7.1). For t ≥ C, define Λt = Λft by Λt (x, x′ ) = min{n ∈ N : d(f n (x), f n (x′ )) ≤ t}. Note that Λt − ΛC is bounded on X × X (if t ≤ c−n C for some n ≥ 0, then it is bounded by n). Given b ∈ ]0, 1[, we say that f is a b-LS-similarity if Λt − log+ b−1 d is bounded on X × X for some/any t ≥ C. Example 7.12. (1) Let R be endowed with the usual metric and f (x) = bx, with 0 < b < 1. ′ Then for any t > 0 and x, x′ ∈ R we have Λt (x, x′ ) = ⌈log+ b−1 (|x − x |/t)⌉. ′ In particular Λft (x, x′ ) = log+ b−1 (|x − x |) + O(1) (in the sense that the difference is bounded is, for given t > 0, a bounded function of (x, x′ )). (2) Let R2 be endowed with the sup norm, and g(x, y) = (x/2, y/3). Then + ′ ′ Λgt ((x, y), (x′, y ′)) = ⌈max(log+ 2 (|x − x |/t), log3 (|y − y |/t))⌉. In particular, + ′ ′ Λgt ((x, y), (x′, y ′ )) = max(log+ 2 (|x − x |), log3 (|y − y |)) + O(1). (3) Let R2 be endowed with any norm, fix 0 < b < 1 and h(x, y) = b−1 (x + y, y). Then for any t > 0, ′ Λht ((x, 0), (x′ , 0)) = log+ b−1 (|x − x |) + O(1), and + + ′ ′ Λht ((0, y), (0, y ′)) = log+ b−1 (|y − y |) + logb−1 (logb−1 (|y − y |)) + O(1). Remark 7.13. If X is unbounded, then   1 1 + + logb−1 d − logb′ −1 d = log+ d − log(b−1 ) log(b′−1 ) is unbounded as soon as b 6= b′ , and it follows that f is a b-LS-similarity for at most one value of b. (If X is bounded, then every map f : X → X is obviously a b-LS-similarity for every b.) Lemma 7.14. Let f be a c-LS-Lipschitz’ self-map of X with c < 1. Let w : X → X have bounded distance to the identity map of X. Then for large t we have |Λft − Λtf ◦w | bounded. In particular, if f is a b-LS-similarity for b < 1 then f ◦ w is a b-LS-similarity. 42 YVES CORNULIER Proof. We already know from Remark 7.2 that f ◦ w, being at bounded distance to f , is c′ -LS-Lipschitz’ for any c′ ∈ ]c, 1[. Let w have displacement ≤ k; we can suppose k ≥ c−1 C. Then d(f n (x), (f ◦ w)n (x)) ≤ (c + · · · + cn )k for all n. Proof by induction (we write f w for f ◦ w): trivially true for n = 0, and:   n+1 n+1 n n d(f (x), (f w) (x)) ≤ max C, cd f (x), w(f w) (x)    ≤ max C, cd f n (x), (f w)n (x) + cd (f w)n (x), w(f w)n (x)  ≤ max C, c(c + · · · + cn )k + ck) = (c + · · · + cn+1 )k P Thus if c∞ = n≥1 cn = c/(1 − c), then d(f n (x), (f w)n (x)) ≤ c∞ k, ∀n ≥ 0 w Thus Λft+2c ≤ Λft and Λft+2c∞ k ≤ Λft w . Hence Λft − Λft w is bounded for large ∞k t (say t ≥ C + 2c∞ k).  Warning 7.15. In the Euclidean plane R2 , let f be the diagonal matrix (1/2, 1/3) and u be the flip of coordinates. Then Λf −Λuf u is unbounded. Thus, conjugating by a bijective quasi-isometry does not preserve the class of Λf modulo bounded functions. Proposition 7.16. Let f be a b-LS-similarity of X, and u : X → Y , v : Y → X be inverse quasi-isometries, and define g = uf v : Y → Y . Then g is a b-LSsimilarity of Y . Proof. For the moment, only assume that f is (c, C)-Lipschitz’. Again by Remark 7.2, g is c′ -LS-Lipschitz’ for any c′ ∈ ]c, 1[. Writing w = vu. Letting k be such that w has displacement ≤ k, and let m, m′ be such that d(ux, ux′) ≤ max(m′ d(x, x′ ), m′ ) for all y, y ′ ∈ Y . Then we have, on the one hand  d((uf v)n (y), (uf v)n(y ′)) = d u(f w)n−1(f vy), u(f w)n−1(f vy ′)   ≤ max m′ , md (f w)n−1(f vy), (f w)n−1(f vy ′) ; since d((f w)n−1, f n−1) ≤ c∞ k by the previous proof, we have   d((uf v)n (y), (uf v)n(y ′ )) ≤ max m′ , 2mc∞ k + md f n vy, f nvy ′) . Now specify this to n = n0 = ΛfC (vy, vy ′). Then we obtain   d((uf v)n0 (y), (uf v)n0 (y ′)) ≤ M = max m′ , 2mc∞ k + mC . v f ′ ′ Hence Λuf M (y, y ) ≤ n = ΛC (vy, vy ). ON SUBLINEAR BILIPSCHITZ EQUIVALENCE OF GROUPS 43 On the other hand, assuming d(f v(y), f v(y ′)) ≤ max(m′1 , m1 d(y, y ′)) for all y, y ′, and letting again n be arbitrary, d((f vu)n(x), (f vu)n (x′ )) = d f v(uf v)n−1u(x), f v(uf v)n−1u(x′ )   ≤ max m′1 , m1 d (uf v)n−1u(x), (uf v)n−1u(x′ )  v ′ Fix t (large enough), and set n = Λuf t (u(x), u(x )) + 1. Then   d((f vu)n(x), (f vu)n (x′ )) ≤ M ′ = max m′1 , m1 t . v ′ Hence ΛfMvu′ (x, x′ ) ≤ n = Λuf t (u(x), u(x )) + 1 If t′ ≥ M ′ is large enough so that Λft′vu − Λft′ is bounded, then we deduce that v v f ◦ (u × u) is upper bounded, as well as Λuf Λft′ − Λuf t M − ΛC ◦ (v × v). f f If we assume that f is a b-LS-similarity, then ΛC − ΛC ◦ (v × v) is bounded. v f f f Hence Λuf M − ΛC is upper bounded. Also Λt′ − Λt′ ◦ (u × u) is bounded, whence v f uf v (Λft′ − Λuf t ) ◦ (u × u) is upper bounded, and hence (Λt′ − Λt ) is upper bounded v as well. Hence (Λft′ − Λuf  t ) is bounded. So uf v is a b-LS-similarity. Note that if f is an LS-similarity, then it is coarsely proper. In particular, if f is an essentially surjective LS-similarity and X is large-scale geodesic, then f is a self-quasi-isometry. Definition 7.17. We say that X is large-scale homothetic (LSH) if it admits, for some b ∈ ]0, 1[, a b-LS-similarity that is a self-quasi-isometry. Corollary 7.18. Being large-scale homothetic is a quasi-isometry invariant.  Note that this implies that X is LS-contractable. An easy instance of a space n that is LS-contractable but not LSH is the set of 22 when n ranges over positive integers. If a simply connected nilpotent Lie group is Carnot, then it is LSH, since for a good choice of metric equivalent to the word length (Carnot-Caratheodory), it admits non-isometric self-similarities. Question 7.19. Conversely, if a simply connected nilpotent Lie group is LSH, is it Carnot? References [Abd] [BH] [Bou] [BR] I.Z. Abdullaev, n-Lie derivations on von Neumann algebras, Uzbek. Mat. Zh. 5–6 (1992) 3–9. M. Bridson, A. Haefliger. “Metric spaces of non-positive curvature”. Springer-Verlag, Berlin, 1999. N. Bourbaki. Éléments de mathématique. Topologie générale. Actualités Scientifiques et Industrielles, No. 1045 Hermann, Paris 1958. U. Bader, C. Rosendal. Coarse equivalence and topological couplings of locally compact groups. To appear in Geom. Dedicata. ArXiv:1610.03004v1, 2016. 44 [Bre] [BrLD] [CDP] [CH] [Con] [Cor1] [Cor2] [Cor3] [Cor4] [CT] [Dru] [Ge] [GH] [Goo] [Gra] [Gro] [Gui] [KKR] [Lis] [Mag] [Pa1] [Pa2] YVES CORNULIER E. Breuillard. Geometry of locally compact groups of polynomial growth and shape of large balls. Groups Geom. Dyn. 8 (2014), no. 3, 669–732. E. Breuillard and E. Le Donne. On the rate of convergence to the asymptotic cone for nilpotent groups and subFinsler geometry. Proc. Natl. Acad. Sci. USA 110 (2013), no. 48, 19220–19226. M. Coornaert, T. Delzant, A. Papadopoulos. Géométrie et théorie des groupes. Les groupes hyperboliques de Gromov. Lect. Notes in Math. 1441. Springer-Verlag, Berlin, 1990. Y. Cornulier, P. de la Harpe. Metric geometry of locally compact groups. EMS Tracts in Mathematics Vol. 25, European Math. Society, 2016. G. Conner. Central extensions of word hyperbolic groups satisfy a quadratic isoperimetric inequality. Arch. Math. (Basel) 65 (1995), no. 6, 465–470. Y. Cornulier. Dimension of asymptotic cones of Lie groups. J. Topology 1(2), 343–361, 2008. Y. Cornulier. Asymptotic cones of Lie groups and cone equivalences. Illinois J. Math. 55(1) (2011), 237–259. Y. Cornulier. Gradings on Lie algebras, systolic growth, and cohopfian properties of nilpotent groups. Bull. Soc. Math. France 144(4) (2016) 693–744. Y. Cornulier. On the quasi-isometric classification of locally compact groups. In “New horizon in locally compact groups”. P.E. Caprace, N. Monod (edts). London Math. Soc. Lecture Notes Series, Cambridge Univ. Press, Cambridge, 2018. Y. Cornulier, R. Tessera. Geometric presentations of Lie groups and their Dehn functions. Publ. Math. IHES 125 (2017), 79–219. C. Drutu. Quasi-isometry invariants and asymptotic cones. Int. J. Alg. Comp. 12 (2002), 99–135. S. Gersten. Isoperimetric and isodiametric functions of finite presentations. Geometric group theory, Vol. 1 (Sussex, 1991), 79–96, London Math. Soc. Lecture Note Ser., 181, Cambridge Univ. Press, Cambridge, 1993. Étienne Ghys and Pierre de la Harpe, Sur les groupes hyperboliques d’après Mikhael Gromov. Progr. Math., 83, Birkhäuser, Boston 1990. R. Goodman. Filtrations and asymptotic automorphisms on nilpotent Lie groups. J. Differential Geometry 12 (1977), no. 2, 183?196. W. de Graaf. Classification of 6-dimensional nilpotent Lie algebras over fields of characteristic not 2. Journal of Algebra 309 (2007) 640–653. M. Gromov. Asymptotic invariants of infinite groups. Geometric Group Theory, London Math. Soc. Lecture Note Ser. (G. Niblo and M. Roller, eds.), no. 182, 1993. Y. Guivarch. Croissance polynomiale et périodes des fonctions harmoniques. Bull. Soc. Math. France 101, 333-379, 1973. J Koivisto, D. Kyed, S. Raum. Measure equivalence and coarse equivalence for unimodular locally compact groups. ArXiv:1703:08121v3, 2017. W. Lister. A structure theory of Lie triple systems. Trans. Amer. Math. Soc. 72, (1952) 217–242. L. Magnin. Determination of 7-dimensional indecomposable nilpotent complex Lie algebras by adjoining a derivation to 6-dimensional Lie algebras Algebras and Representation Theory, vol.13, Number 6, p. 723–753, 2010. P. Pansu. Croissance des boules et des géodésiques fermées dans les nilvariétés. Ergodic Theory Dynam. Systems 3 (1983), no. 3, 415–445. P. Pansu. Métriques de Carnot-Carathéodory et quasiisométries des espaces symétriques de rang un. Ann. of Math. (2) 129(1), 1989, 1–60. ON SUBLINEAR BILIPSCHITZ EQUIVALENCE OF GROUPS [Pal] [Sau] [Sha] [Xie] 45 G. Pallier. Large-scale sublinearly Lipschitz geometry of hyperbolic spaces. ArXiv 1801.05163, 2018. R. Sauer. Homological invariants and quasi-isometry Geom. Funct. Anal. 16(2) (2006) 476–515. Y. Shalom. Harmonic analysis, cohomology, and the large-scale geometry of amenable groups. Acta Math., 192 (2004), 119–185. Xiangdong Xie. Large scale geometry of negatively curved Rn ⋊ R. Geom. Topol. 18 (2014) 831–872. CNRS and Univ Lyon, Univ Claude Bernard Lyon 1, Institut Camille Jordan, 43 blvd. du 11 novembre 1918, F-69622 Villeurbanne E-mail address: [email protected]
4math.GR
arXiv:1212.6213v2 [math.LO] 17 Apr 2013 GROUPS AND FIELDS WITH NTP2 ARTEM CHERNIKOV, ITAY KAPLAN AND PIERRE SIMON Abstract. NTP2 is a large class of first-order theories defined by Shelah and generalizing simple and NIP theories. Algebraic examples of NTP2 structures are given by ultra-products of p-adics and certain valued difference fields (such as a non-standard Frobenius automorphism living on an algebraically closed valued field of characteristic 0). In this note we present some results on groups and fields definable in NTP2 structures. Most importantly, we isolate a chain condition for definable normal subgroups and use it to show that any NTP2 field has only finitely many Artin-Schreier extensions. We also discuss a stronger chain condition coming from imposing bounds on burden of the theory (an appropriate analogue of weight), and show that every strongly dependent valued field is Kaplansky. 1. Introduction The class of NTP2 theories (i.e. theories without the tree property of the second kind) was introduced by Shelah [She80, She90]. It generalizes both simple and NIP theories and turns out to be a good context for the study of forking and dividing, even if one is only interested in NIP theories: in [CK12, Che12, BC12] it is demonstrated that the theory of forking in simple theories [Kim96] can be viewed as a special case of the theory of forking in NTP2 theories over an extension base. What are the known algebraic examples of NTP2 theories? Fact 1.1. [Che12]Let K̄ = (K, Γ, k, v, ac) be a Henselian valued field of equicharacteristic 0 in the Denef-Pas language. Assume that k is NTP2 (respectively, Γ and k are strong, of finite burden — see Section 4). Then K̄ is NTP2 (respectively strong, of finite burden). Example 1.2. Let U be a non-principal ultra-filter on the set of prime numbers P . Then: Q (1) K̄ = p∈P Qp /U is NTP2 . This follows from Fact 1.1 because: • The residue field is pseudo-finite, so of burden 1 (as burden is bounded by weight in a simple theory by [Adl07]). • The value group is a Z-group, thus dp-minimal, and burden equals dp-rank in NIP theories by [Adl07]. We remark that, while Qp is dp-minimal for each p by [DGL11], the field K̄ is neither simple nor NIP even in the pure ring language (as the valuation ring is definable by [Ax65]). The first author was partially supported by the [European Community’s] Seventh Framework Programme [FP7/2007-2013] under grant agreement n° 238381. The second author was supported by SFB 878. 1 GROUPS AND FIELDS WITH NTP2 2 Q (2) K̄ = p∈P Fp ((t)) /U is NTP2 , of finite burden, as it has the same theory as the previous example by [AK65] (while each of Fp ((t)) has TP2 by Corollary 3.3). Fact 1.3. [CH12] Let K̄ = (K, Γ, k, v, ac, σ) be a σ-Henselian contractive valued difference field of equicharacteristic 0, i.e. σ is an automorphism of the field K such that for all x ∈ K with v (x) > 0 we have v (σ (x)) > n · v (x) for all n ∈ ω (see [Azg10]). Assume that both (K, σ) and (Γ, σ), with the naturally induced automorphisms, are NTP2 . Then K̄ is NTP2 . Example 1.4. Let (Fp , Γ, k, v, σ) be an algebraically closed valued field Q of characteristic p with σ interpreted as the Frobenius automorphism. Then p∈P Fp /U is NTP2 . This case was studied by Hrushovski [Hru] and later by Durhan [Azg10]. It follows from [Hru] that the reduct to the field language is a model of ACFA, hence simple but not NIP. On the other hand this theory is not simple as the valuation group is definable. Moreover, certain valued difference fields with a value preserving automorphism are NTP2 . Of course, any simple or NIP field is NTP2 , and there are further conjectural examples of pure NTP2 fields such as bounded pseudo real closed or pseudo p-adically closed fields (see Section 5.1). But what does knowing that a theory is NTP2 tell us about properties of algebraic structures definable in it? In this note we show some initial implications. In Section 2 we isolate a chain condition for normal subgroups uniformly definable in an NTP2 theory. In Section 3 we use it to demonstrate that every field definable in an NTP2 theory has only finitely many Artin-Schreier extensions, generalizing some of the results of [KSW11]. In Section 4 we impose bounds on the burden, a quantitative refinement of NTP2 similar to SU-rank in simple theories, and observe that some results for type-definable groups existing in the literature actually go through with a weaker assumption of bounded burden, e.g. every strong field is perfect, and every strongly dependent valued field is Kaplansky. The final section contains a discussion around the topics of the paper: we pose several conjectures about new possible examples (and non-examples) of NTP2 fields and about definable envelopes of nilpotent/soluble groups in NTP2 theories. We also remark how the stabilizer theorem of Hrushovski from [Hru12] could be combined with properties of forking established in [CK12] and [BC12] in the NTP2 context. We would like to thank Arno Fehm for his comments on Section 5.1 and Example 5.5. We would also like to that the anonymous referee for many useful remarks. Preliminaries. Our notation is standard. As usual, we will be working in a monster model C of the theory under consideration. Let G be a group, and H a subgroup of G. We write [G : H] < ∞ to denote that the index of H in G is bounded, which in the case of definable groups means finite. We assume that all groups (and fields) are finitary — contained in some finite Cartesian product of the monster. Definition 1.5. We recall that a formula ϕ (x, y) has TP2 if there are tuples (ai,j )i,j∈ω and k ∈ ω such that: •  {ϕ (x, ai,j ) | j < ω } is k-inconsistent, for each i ∈ ω, • ϕ x, ai,f (i) | i < ω is consistent for each f : ω → ω. GROUPS AND FIELDS WITH NTP2 3 A formula is NTP2 otherwise, and a theory is called NTP2 if no formula has TP2 . Fact 1.6. [Che12] T is NTP2 if and only if every formula ϕ (x, y) with |x| = 1 is NTP2 . We note that every simple or NIP formula is NTP2 . See [Che12] for more on NTP2 theories. 2. Chain conditions for groups with NTP2 Lemma 2.1. Let T be NTP2 , G a definable group and (Hi )i∈ω a uniformly T definable family of normal subgroups of G, with H = ϕ (x, a ). Let H = i i i∈ω Hi and T H6=j = i∈ω\{j} Hi . Then there is some i∗ ∈ ω such that [H6=i∗ : H] is finite. Proof. Let (Hi )i∈ω be given and assume that the conclusion fails. Then for each i ∈ ω we can find (bi,j )j∈ω with bi,j ∈ H6=i and such that (bi,j H)j∈ω are pairwise different cosets in H6=i . We have: • bi,j Hi ∩ bi,k Hi = ∅ for j 6= k ∈ ω and every i. T • For every f : ω → ω, the intersection i∈ω bi,f (i) THi is non-empty. Indeed, fix f , by compactness it is enough to check that i≤n bi,f (i) Hi 6= ∅ for every Q n ∈ ω. Take b = i≤n bi,f (i) (the order of the product does not matter). As bi,f (i) ∈ Hj for all i 6= j, it follows by normality that b ∈ bi,f (i) Hi for all i ≤ n. But then ψ (x; y, z) = ∃w (ϕ (w, y) ∧ x = z · w) has TP2 as witnessed by the array (ci,j )i,j∈ω with ci,j = aiˆbi,j .  Problem 2.2. Is the same result true without the normality assumption? See also Theorem 4.12. Corollary 2.3. Let T be NTP2 and suppose that G is a definable group. Then for every ϕ (x, y) there are kϕ , nϕ ∈ ω such that: • If (ϕ (x, ai ))i<K is a family of normal subgroups of G and kϕ ≤ K i then hT T ∗ there is some i < K such that i<K ϕ (x, ai ) < nϕ . i<K,i6=i∗ ϕ (x, ai ) : Proof. Follows from Lemma 2.1 and compactness.  Theorem 2.4. Let G be NTP2 and {ϕ (x, a) | a ∈ C } be a family of normal subgroups of G. Then there is some k ∈ ω (depending only on ϕ) such that for every finite C ′ ⊆ C there is some C0 ⊆ C ′ with |C0 | ≤ k and such that " # \ \ ϕ (x, a) : ϕ (x, a) < ∞. a∈C0 a∈C ′ ′ Proof. Let kϕ be as given hT by Corollary 2.3. IfT|C | > kϕ , byi Corollary 2.3 we find ′ some a0 ∈ C ′ such that a∈C ′ ϕ (x, a) < ∞. If |C \ {a0 }| > a∈C ′ \{a0 } ϕ (x, a) : kϕ , by Corollary 2.3 again we find some a1 ∈ C ′ \ {a0 } such that   \ \  ϕ (x, a) < ∞. ϕ (x, a) : a∈C ′ \{a0 ,a1 } a∈C ′ \{a0 } GROUPS AND FIELDS WITH NTP2 Continuing in this way we end up with a0 , . . . , am ∈ C ′ such that for all i < m,   \ \  ϕ (x, a) < ∞, ϕ (x, a) : 4 a∈C ′ \{a0 ,...,ai } a∈C ′ \{a0 ,...,ai+1 } and, letting C0 = C ′ \ {a0 , . . . , am }, we have that |C0 | ≤ kϕ .  Corollary 2.5. Let G be a torsion-free group with NTP2 and assume that ϕ(x, y) defines a divisible normal subgroup for every y. Then ϕ(x, y) is NIP. Proof. Assume that ϕ(x, y) has IP and let ā = (ai )i∈Z be an indiscernible sequence T witnessing this. Taking Hi = ϕ(C, ai ), H6=0 \ H0 6= ∅ . Let H = i∈Z Hi , so it is divisible (here we used the assumption that G is torsion-free) as is H6=0 . But then H6=0 /H is a divisible non-trivial group, so infinite. By indiscernibility [H6=i : H] = ∞ for all i — contradicting Lemma 2.1.  3. Fields with NTP2 Let K be a field of characteristic p > 0. Recall that a field extension L/K is called an Artin-Schreier extension if L = K (α) for some α ∈ L \ K such that αp − α ∈ K. L/K is an Artin-Schreier extension if and only if it is Galois and cyclic of degree p. Theorem 3.1. Let K be an infinite field definable in an NTP2 theory. Then it has only finitely many Artin-Schreier extensions. Proof. We follow the proof of the fact that dependent fields have no Artin-Schreier extensions in [KSW11]. T n ∞ We may assume that K is ℵ0 -saturated, and we put k = K p = n∈ω K p , a type-definable perfect sub-field which is infinite by saturation (all contained in an algebraically closed K). For a tuple ā = (a0 , . . . , an−1 ), let  Gā = (t, x0 , . . . , xn−1 ) ∈ K n+1 : t = ai · ̺ (xi ) for i < n , where ̺ (x) = xp −x is the Artin-Schreier polynomial. We consider it as an algebraic  group (a subgroup of Kn+1 , + ). As such, by [KSW11, Lemma 2.8], when the elements of ā are algebraically independent it is connected. If in addition ā belong to some perfect field k, then Gā is isomorphic by an algebraic isomorphism over k to (K, +) by [KSW11, Corollary 2.9]. By Theorem 2.4, there is some n < ω, an (n+ 1)-tuple T algebraically independent T ā ∈ k and an n-subtuple ā′ , such that a · ̺ (K) : a · ̺ (K) < ∞. It ′ a∈ā a∈ā follows that the image of the projection map π : Gā (K) → Gā′ (K) has finite index in Gā′ (K). We have algebraic isomorphisms Gā → (K, +) and Gā′ → (K, +) over k. Hence we can find an algebraic map ρ over k (i.e. a polynomial) which makes the following diagram commute: π / Gā′ Gā  (K, +) ρ  / (K, +) GROUPS AND FIELDS WITH NTP2 5 As all groups and maps are defined over k ⊆ K, we can restrict to K. We saw that [Gā′ : π (Gā (K))] < ∞ so [K : ρ (K)] < ∞ as well (in the group (K, +)). In the proof of [KSW11, Theorem 4.3], it is shown that there is some c ∈ K such that, letting ρ′ (x) = ρ (c · x), ρ′ has the form a · ̺ (x) for some a ∈ K × . The way it is done there is by choosing any 0 6= c ∈ ker (ρ) ⊆ k, and then since ρ′ is additive with kernel Fp and degree p (as this is the degree of π), there exists such an a ∈ k. Since ρ′ (K) = ρ (K) has finite index in K, so does the image of ̺ = a−1 ρ′ . By [KSW11, Remark 2.3], this index is finite if and only if the number of ArtinSchreier extensions is finite.  Proposition 3.2. Suppose (K, v, Γ) is a valued field of characteristic p > 0 that has finitely many Artin-Schreier extensions. Then the valuation group Γ is p-divisible. Proof. (This proof is similar to the proof of [KSW11, Proposition 5.4].) Recall that ̺ is the Artin-Schreier polynomial. By Artin-Schreier theory (this is explained in [KSW11, Remark 2.3]), the index [K : ̺ (K)] in the additive group (K, +) is finite. Suppose {ai | i < l } are representatives for the cosets of ̺ (K) in (K, +). Let α ∈ Γ be smaller than α0 = min {v (ai ) | i < l } ∪ {0}. Suppose v (x) = α for x ∈ K. But then there is some i < l such that x − ai ∈ ̺ (K), and since v (x) = v (x − ai ), we may assume that x ∈ ̺ (K), so there is some y such that y p − y = x. But then, v (y) < 0, so v (y p ) = p · v (y) < v (y), so α = v (x) = v (y p − y) = v (y p ) = p · v (y) . So α is p-divisible. Take any negative β ∈ Γ, then β + p · α0 is p-divisible, so β is also p-divisible. Since this is true for all negative values, Γ is p-divisible.  Corollary 3.3. Fp ((t)) is not NTP2 . Proof. Follows from Theorem 3.1 and Proposition 3.2.  4. Strong theories and bounded burden In this section we are going to consider groups and fields whose theories satisfy quantitative refinements of NTP2 in terms of a bound on its burden (similar to the bounds on the rank in simple theories). For notational convenience we consider an extension Card* of the linear order on cardinals by adding a new maximal element ∞ and replacing every limit cardinal κ by two new elements κ− and κ+ . The standard embedding of cardinals into Card* identifies κ with κ+ . In the following, whenever we take a supremum of a set of cardinals, we will be computing it in Card* . Definition 4.1. Let T be a complete theory. (1) An inp-pattern of depth κ consists of (āα , ϕα (x, yα ), kα )α∈κ with āα = (aα,i )i∈ω and kα ∈ ω such that: •  {ϕα (x, aα,i ) | i < ω } is kα -inconsistent for every α ∈ κ, • ϕα x, aα,f (α) | α < κ is consistent for every f : κ → ω. (2) An inp2 -pattern of depth κ consists S of (āα , bα , φα (x, yα , zα ))α<κ , where φα ∈ L, āα = (aα,i )i<ω , and bα ⊆ {āβ | β < α }, such that: • (āα )α<κ are mutually indiscernible. • {φα (x, aα,i , bα ) | i < ω } is inconsistent for every α, • {φα (x, aα,0 , bα ) | α < κ } is consistent. GROUPS AND FIELDS WITH NTP2 6 (3) The burden (burden2 ) of T is the supremum (in Card∗ ) of the depths of inp-patterns (resp. inp2 -patterns) with x a singleton. (4) It is easy to see by compactness that T is NTP2 if and only if its burden + is < ∞, equivalently < |T | . The same is true for burden2 , see [BC12, Proposition 5.5(viii)]. (5) A theory T is called strong (strong2 ) if its burden ≤ (ℵ0 )− (resp. burden2 ≤ (ℵ0 )− ). Strong theories were introduced by Adler [Adl07] based on the notion of inppatterns of Shelah [She90, Ch. III], and were further studied in [Che12] where it was shown that burden is “sub-multiplicative”. Strong2 theories were introduced in [BC12] as a generalization of Shelah’s strongly2 dependent theories. Of course, every strong2 theory is strong, and every strong theory is NTP2 . Fact 4.2. [Che12]Burden is “sub-multiplicative”: if there is an inp-pattern of depth κn with |x| = n then there is an inp-pattern of depth κ with |x| = 1. In particular, in a strong theory there are no inp-patterns of infinite depth with x of arbitrary finite length (while the definition only requires this for |x| = 1). Problem 4.3. Does the same hold for inp2 -patterns? Remark 4.4. (1) For T simple, being strong corresponds to the fact that every finitary type has finite weight [Adl07]. Also, every supersimple theory is strong2 [BC12, Section 5]. (2) In [She09], Shelah introduced strongly and strongly2 dependent theories. For strong dependence, the definition is very similar to the one given: one asks that there is no pattern (āα , ϕα (x, yα ))α<ω as above such that for every n o if β=f (α) function f : ω → ω, ϕα (x, aα,β ) | α < κ is consistent. One can easily show that T is strongly dependent if and only if it is strong and NIP. (3) The definition of strongly2 dependent is again similar to the definition of strong2 , allowing parameters from other rows in the definition of strong dependence. For T dependent, being strong2 is the same as being strongly2 dependent (sometimes called strongly+ dependent)[BC12, Section 5]. (4) There are stable strong theories which are not strong2 and there are stable strong2 theories which are not superstable [BC12, Section 5]. 4.1. Strong groups and fields. The following are taken from [KS11, Proposition 3.11, Corollary 3.12] with some easy modifications: Proposition 4.5. Let G be a type-definable group and Gi ≤ G type-definable normal subgroups for i < ω. i hT T < ∞. G G : (1) If T is strong, then there is some i0 such that i i i<ω i6=i0 (2) If hTT is of finiteTburden,i then there is some n ∈ ω and i0 < n such that i<n Gi < ∞. i6=i0 ,i<n Gi : Proof. (1) Assume not. Then, for each i < ω, we have an indiscernible sequence T (ai,j )j<ω (over the parameters defining all the groups) such that ai,j ∈ k6=i Gk and for j1 < j2 < ω, a−1 / Gi . By compactness there is a formula ψi (x) i,j1 · ai,j2 ∈  in the type defining Gi such that ¬ψi a−1 i,j1 · ai,j2 holds (by indiscernibility it is the same for all j1 < j2 ). We may assume, applying Ramsey, that the sequences GROUPS AND FIELDS WITH NTP2 7 D E (ai,j )j<ω | i < ω are mutually indiscernible. Let ψi′ be another formula in the type   defining Gi such that ψi′ (x) ∧ ψi′ (y) ⊢ ψi x−1 · y . Let ϕi (x, y) = ψi′ x−1 · y . Now we check that the set {ϕi (x, ai,0 ) | i < n } is consistent for each n < ω. Let c = a0,0 · . . . · an−1,0 (the order does not really matter, but for the proof it is easier −1 −1 to fix one). So ϕi (c, ai,0 ) holds if and only if ψi′ a−1 n−1,0 · . . . · ai,0 · . . . · a0,0 · ai,0 −1 holds. But since Gi is normal, a−1 i,0 · . . . · a0,0 · ai,0 ∈ Gi , so the entire product is in Gi , so ϕi (c, ai,0 ) holds. On the other hand, if for some c′ , ϕi (c′ , ai,0 ) ∧ ϕi (c′ , ai,1 ) holds, then ψi a−1 i,0 · ai,1 holds — contradiction. So the rows are inconsistent which contradicts strength. (2) Follows from the proof of (1) using Fact 4.2.  Corollary 4.6. If G is an abelian group type-definable in a strong theory and S ⊆ ω is an infinite set of pairwise co-prime numbers, then for almost all (i.e. for all but finitely many) n ∈ S, [G : Gn ] < ∞. In particular, if K is a definable field in a  p strong theory, then for almost all primes p, K × : (K × ) < ∞. Proof. Let K ⊆ S be the set of n ∈ S such that [G : Gn ] < ∞. If S\K is infinite, we replace S with S\K. For i ∈ S, let Gi h= Gi (so it is type-definable). By Proposition 4.5, there i T T is some n such that i∈S Gi < ∞. Now it is enough to show that i6=n Gi : T T T ∼ Gi / Gi = G/Gn . For this we show that the natural map Gi → i6=n i∈S i6=n G/GQ n is onto. To show that, we may assume by compactness that S is finite. Let r = S\ {n}, then since r and n are co-prime, there are some a, b ∈ Z such that ar + bn = 1 so for any g ∈ G, g ar ≡ g (mod Gn ), and we are done.  The proof of the following proposition is taken from [KP11, Proposition 2.3] so we observe that it goes through in larger generality. Proposition 4.7. Any infinite strong field is perfect. Proof. Let K be of characteristic p > 0, and suppose that K p 6= K. Then there are b1 , b2 ∈ K linearly independent over K p . Let hai : i ∈ Qi be an indiscernible non-constant sequence over b1 , b2 . By compactness we can find a and (ci )i<ω from K such that c0 = a and ci = b1 cpi+1 +b2 api . Since b1 , b2 are linearly independent over K p , we get that ai ∈ dcl (b1 b2 a) for every i < ω. For eachVi < ω, let ϕi (y, b1 , b2 , a) be a formula defining ai . We may assume that ∀x, y1 , y2 j=1,2 ϕi (yj , b1 , b2 , x) → y1 = y2 . So: • The sequences Ii = (aj )i−1/2<j<i+1/2 where i < ω are mutually indiscernible over b1 , b2 . • {ϕi (aj , b1 , b2 , x) | i − 1/2 < j < i + 1/2 } is 2-inconsistent. • {ϕi (ai , b1 , b2 , x) | i < ω } is consistent (realized by a). Which contradicts strength.  Definition 4.8. A valued field (K, v) of characteristic p > 0 is Kaplansky if it satisfies: (1) The valuation group Γ is p-divisible. (2) The residue field k is perfect, and does not admit a finite separable extension whose degree is divisible by p. Corollary 4.9. Every strongly dependent valued field is Kaplansky. GROUPS AND FIELDS WITH NTP2 8 Proof. Combining Proposition 4.7, Proposition 3.2 and [KSW11, Corollary 4.4].  4.2. Strong2 theories. The following is just a repetition of [KS11, Proposition 2.5]: Proposition 4.10. Suppose T is strong2 , then it is impossible to have a sequence of type-definable groups hGi | i < ω i such that Gi+1 ≤ Gi and [Gi : Gi+1 ] = ∞. Proof. Without loss of generality, we shall assume that all groups are type-definable over ∅. Suppose there is such a sequence hGi | i < ω i. Let hāi | i < ω i be mutually indiscernible, where āi = hai,j | j < ω i, such that for i < ω, the sequence −1 hai,j | j < ω i is a sequence from Gi (in C) such that ai,j / Gi+1 for all ′ · ai,j ∈ j < j ′ < ω. We can find such an array because of our assumption and  Ramsey.  −1 For each i < ω, let ψi (x) be in the type defining Gi+1 such that ¬ψi ai,j ′ · ai,j ′ for j < j. By compactness, there is a formula ξi (x) in  the type defining Gi+1 such that for all a, b ∈ C, if ξi (a) ∧ ξi (b) then ψi a · b−1 holds. Let ϕi (x, y, z) = ξi y −1 · z −1 · x . For i < ω, let bi = a0,0 · . . . · ai−1,0 (so b0 = 1). Let us check that the set {ϕi (x, ai,0 , bi ) | i < ω } is consistent. Let i0 < ω, and let c = bi0 . Then for i < i0 , ϕi (c, ai,0 , bi ) holds if and only if ξi (ai+1,0 · . . . · ai0 −1,0 ) holds, but the product ai+1,0 · . . . · ai0 −1,0 is an element of Gi+1 and ξi is in the type ′ ′ defining Gi+1 , so ϕi (c, ai,0 , bi) holds. Now, if ϕ  i (c , ai,0 , bi ) ∧ ϕi (c−1, ai,0, bi ) holds −1 −1 ′ −1 −1 ′ ′ for some c , then ξi ai,0 bi c and ξi ai,1 bi c hold, so also ψi ai,0 ai,1 holds — a contradiction. So the rows are inconsistent, contradicting strength2 .  We also get (exactly as [KS11, Proposition 2.6]): Corollary 4.11. Assume T is strong2 . If G is a type-definable group and h is a definable homomorphism h : G → G with finite kernel then h is almost onto G, i.e., the index [G : h (G)] is bounded (i.e. < ∞). If G is definable, then the index must be finite. Theorem 2.4 holds for type-definable subgroups without the normality assumption. Theorem 4.12. Let G be strong2 and {ϕ (x, a) | a ∈ C } be a family of definable subgroups of G. Then there is some k ∈ ω such that for every finite C ′ ⊆ C there is some C0 ⊆ C ′ with |C0 | ≤ k and such that " # \ \ ϕ (x, a) : ϕ (x, a) < ∞. a∈C0 a∈C ′ Proof. The proof of Theorem 2.4 relied on Proposition 2.1. So we only need to show T that this proposition goes   Let Hi = ϕ (x, ai ) for  i < ω.  through. T Consider ′ < ∞. But then also H6=j : i<ω Hi < Hi′ = j<i Hj . At some point Hj′ : Hj+1 ∞.  5. Questions, conjectures and further research directions 5.1. More pure NTP2 fields. Recall that a field is pseudo algebraically closed (or PAC) if every absolutely irreducible variety defined over it has a point in it. It is well-known [Cha99] that the theory of a PAC field is simple if and only if it is bounded (i.e. for any integer n it has only finitely many Galois extensions of degree GROUPS AND FIELDS WITH NTP2 9 n). Moreover, if a PAC field is unbounded, then it has TP2 [Cha08, Section 3.5]. On the other had, the following fields were studied extensively: (1) Pseudo real closed (or PRC) fields: a field F is PRC if every absolutely irreducible variety defined over F that has a rational point in every real closure of F , has an F -rational point [Pre90, Pre81, Pre85]. (2) Pseudo p-adically closed (or PpC) fields: a field F is PpC if every absolutely irreducible variety defined over F that has a rational point in every p-adic closure of F , has an F -rational point [Kün89a, Kün89b, Efr91, HJ88]. Conjecture 5.1. A PRC field is NTP2 if and only if it is bounded. Similarly, a PpC field is NTP2 if and only if it is bounded. We remark that if K is an PRC field then it has TP2 . Indeed, since  √ unbounded K is PRC then L = K −1 is PAC (because every finite extension of a PRC field is PRC and L has no real closures at all). By [FJ05, Remark 16.10.3(b)] L is unbounded. And of course, L is interpretable in K. But by the result of Chatzidakis cited above L has TP2 , thus K also has TP2 . 5.2. More valued fields with NTP2 . Is there an analogue of Fact 1.1 in positive characteristic? A similar result for NIP was established in [Bél99, Corollaire 7.6]. Conjecture 5.2. Let (K, v) be a valued field of characteristic p > 0, Kaplansky and algebraically maximal. Then (K, v) is NTP2 (strong) if and only if k is NTP2 (resp. strong). The following is demonstrated in [KSW11, Proposition 5.3]. Fact 5.3. Let (K, v) be an NIP valued field of characteristic p > 0. Then the residue field contains Falg p (so in particular is infinite). Hrushovski asked if the following is true: Problem 5.4. Assume that (K, v) is an NTP2 (Henselian) valued field of positive characteristic. Does it follow that the residue field is infinite? We remark that the finite number of Artin-Schreier extensions alone is not sufficient to conclude that the residue field is infinite: Example 5.5. (Due to Arno Fehm) Let Ω = (Fp ((t)))sep , so the  restriction map  alg /F Gal (Ω/Fp ((t))) → Gal Fp /Fp is onto. Let σ ∈ Gal Falg p be the Frobenius p alg automorphism, and let τ ∈ Gal (Ω/Fp ((t))) be such that τ ↾ Fp = σ. Let F be the fixed field of τ . Then F has exactly one Artin-Schreier extension (as Gal (Ω/F ) is pro-cyclic and F is a regular extension of Fp ). Since Fp ((t)) is an Henselian valued field, its usual valuation extends uniquely to an Henselian valuation on F . Since every element of Falg p \Fp is moved by σ, one can see that the residue field must be Fp . Example 5.6.(Due to the anonymous referee) P i Let Ω be the generalized power Q t — the field of formal sums ai t with well-ordered support where series Falg p alg i ∈ Q and ai ∈ Fp . This field is algebraically closed. Let τ ∈ Aut (Ω) be the map  P i P p i ai t 7→ ai t . Let F be the fixed field of τ , so F = Fp tQ . Then F is Henselian with residue field Fp and (as in Example 5.5) has exactly one ArtinSchreier extension. GROUPS AND FIELDS WITH NTP2 10 5.3. Definable envelopes. Assume that we are given a subgroup of an NTP2 group. Is it possible to find a definable subgroup which is close to the subgroup we started with and satisfies similar properties? Fact 5.7. (1) [She09, Ald] If G is a group definable in an NIP theory and H is a subgroup which is abelian (nilpotent of class n; normal and soluble of derived length n) then there is a definable group containing H which is also abelian (resp. nilpotent of class n; normal and soluble of derived length n). (2) [Mil] Let G be a group definable in a simple theory and let H be a subgroup of G. (a) If H is nilpotent of class n, then there is a definable (with parameters from H) nilpotent group of class at most 2n, finitely many translates of which cover H. If H is in addition normal, then there is a definable normal nilpotent group of class at most 3n containing H. (b) If H is a soluble of class n, then there is a definable (with parameters from H) soluble group of derived length at most 2n, finitely many translates of which cover H. If H is in addition normal, then there is a definable normal soluble group of derived length at most 3n containing H. Thus it seems very natural to make the following conjecture. Conjecture 5.8. Let G be an NTP2 group and assume that H is a subgroup. If H is nilpotent (soluble), then there is a definable nilpotent (resp. soluble) group finitely many translates of which cover H. If H is in addition normal, then there is a definable normal nilpotent (resp. soluble) group containing H. 5.4. Hrushovski’s stabilizer theorem. Let I be an ideal in the Boolean algebra of definable sets in a fixed variable x, with parameters from the monster model (i.e. ∅ ∈ I;φ (x, a) ⊢ ψ (x, b) and ψ (x, b) ∈ I imply φ (x, a) ∈ I;φ (x, a) ∈ I and ψ (x, b) ∈ I imply φ (x, a) ∨ ψ (x, b) ∈ I). An ideal I is invariant over a set A if φ (x, a) ∈ I and a ≡A b implies φ (x, b) ∈ I. An A-invariant ideal is called S1 if for every sequence (ai )i∈ω indiscernible over A, φ (x, a0 ) ∧ φ (x, a1 ) ∈ I implies φ (x, a0 ) ∈ I. A partial type q (x) over A is called wide (or I-wide) if it implies no formula in I. In the following, G̃ is a subgroup of some definable group, generated by some definable set X. Fact 5.9. [Hru12, Theorem 3.5] Let M be a model, µ an M -invariant S1 ideal on e invariant under (left or right) translations by elements of definable subsets of G, e e Assume: G. Let q be a wide type over M (contained in G). (F ) There exist two realizations a, b of q such that tp (b/M a) does not fork over M and tp (a/M b) does not fork over M . 2 Then there is a wide type-definable over M subgroup S of G. We have S = q −1 q ; e and S \ q −1 q is contained the set qq −1 q is a coset of S. Moreover, S is normal in G, in a union of non-wide M -definable sets. In [CK12] it is proved that if M is a model of an NTP2 theory and q ∈ S (M ), then it has a global strictly invariant extension p ∈ S (C) (meaning that p is an M -invariant type and for every N ⊇ M and a |= p|N we have tp (N/M a) does not fork over M ). It thus follows that the assumption (F ) is always satisfied in NTP2 GROUPS AND FIELDS WITH NTP2 11 theories. In [BC12, Section 2 + discussion before Proposition 3.5] it is proved that in an NTP2 theory, the ideal of formulas forking over a model M is S1. However, in general the ideal of forking formulas is not invariant under the action of the definable group. By [Hru12, Theorem 3.5, Remark (4)] the assumption of invariance under e can be replaced by the existence of an f -generic extension of q. the action of G It seems interesting to find a right version of this result generalizing the theory of stabilizers in simple theories [Pil98]. References [Adl07] [AK65] Hans Adler. Strong theories, burden, and weight. preprint, 2007. J. Ax and S. Kochen. Diophantine problems over local fields i. American Journal of Mathematics, 87(3):605–630, 1965. [Ald] Ricardo de Aldama. A result on definable groups without the independence property. Bulletin of Symbolic Logic, to appear. [Ax65] James Ax. On the undecidability of power series fields. Proc. Amer. Math. Soc., 16:846, 1965. [Azg10] Salih Azgin. Valued fields with contractive automorphism and Kaplansky fields. J. Algebra, 324(10):2757–2785, 2010. [BC12] Itaï Ben Yaacov and Artem Chernikov. An independence theorem for NTP2 theories. arXiv:1207.0289, 2012. [Bél99] Luc Bélair. Types dans les corps valués munis d’applications coefficients. Illinois J. Math., 43(2):410–425, 1999. [CH12] Artem Chernikov and Martin Hils. Valued difference fields and N T P2 . preprint, 2012. [Cha99] Zoé Chatzidakis. Simplicity and independence for pseudo-algebraically closed fields. In Models and computability (Leeds, 1997), volume 259 of London Math. Soc. Lecture Note Ser., pages 41–61. Cambridge Univ. Press, Cambridge, 1999. [Cha08] Zoé Chatzidakis. Independence in (unbounded) PAC fields, and imaginaries. http://www.logique.jussieu.fr/ zoe/papiers/Leeds08.pdf, 2008. [Che12] Artem Chernikov. Theories without the tree property of the second kind. arXiv:1204.0832, 04 2012. [CK12] Artem Chernikov and Itay Kaplan. Forking and dividing in N T P2 theories. J. Symbolic Logic, 77(1):1–20, 2012. [DGL11] Alfred Dolich, John Goodrick, and David Lippel. Dp-minimality: basic facts and examples. Notre Dame J. Form. Log., 52(3):267–288, 2011. [Efr91] Ido Efrat. The elementary theory of free pseudo p-adically closed fields of finite corank. J. Symbolic Logic, 56(2):484–496, 1991. [FJ05] Michael D. Fried and Moshe Jarden. Field arithmetic, volume 11 of Ergebnisse der Mathematik und ihrer Grenzgebiete. 3. Folge. A Series of Modern Surveys in Mathematics [Results in Mathematics and Related Areas. 3rd Series. A Series of Modern Surveys in Mathematics]. Springer-Verlag, Berlin, second edition, 2005. [HJ88] Dan Haran and Moshe Jarden. The absolute Galois group of a pseudo p-adically closed field. J. Reine Angew. Math., 383:147–206, 1988. [Hru] Ehud Hrushovski. The elementary theory of the Frobenius automorphisms. arXiv:math/0406514. [Hru12] Ehud Hrushovski. Stable group theory and approximate subgroups. J. Amer. Math. Soc., 25(1):189–243, 2012. [Kim96] Byunghan Kim. Simple first order theories. ProQuest LLC, Ann Arbor, MI, 1996. Thesis (Ph.D.)–University of Notre Dame. [KP11] Krzysztof Krupiński and Anand Pillay. On stable fields and weight. J. Inst. Math. Jussieu, 10(2):349–358, 2011. [KS11] Itay Kaplan and Saharon Shelah. Chain conditions in dependent groups. arXiv:1112.0807, 12 2011. [KSW11] Itay Kaplan, Thomas Scanlon, and Frank O. Wagner. Artin-Schreier extensions in NIP and simple fields. Israel J. Math., 185:141–153, 2011. [Kün89a] Urs-Martin Künzi. Corps multiplement pseudo-p-adiquement clos. C. R. Acad. Sci. Paris Sér. I Math., 309(4):205–208, 1989. GROUPS AND FIELDS WITH NTP2 12 [Kün89b] Urs-Martin Künzi. Decidable theories of pseudo-p-adically closed fields. Algebra i Logika, 28(6):643–669, 743, 1989. [Mil] Cédric Milliet. Definable envelopes in groups with simple theory. http://hal.archivesouvertes.fr/hal-00657716/fr/. [Pil98] Anand Pillay. Definability and definable groups in simple theories. J. Symbolic Logic, 63(3):788–796, 1998. [Pre81] Alexander Prestel. Pseudo real closed fields. In Set theory and model theory (Bonn, 1979), volume 872 of Lecture Notes in Math., pages 127–156. Springer, Berlin, 1981. [Pre85] Alexander Prestel. On the axiomatization of PRC-fields. In Methods in mathematical logic (Caracas, 1983), volume 1130 of Lecture Notes in Math., pages 351–359. Springer, Berlin, 1985. [Pre90] Alexander Prestel. Pseudo real closed fields. In Séminaire sur les Structures Algébriques Ordonnées, Vol. I, volume 32 of Publ. Math. Univ. Paris VII, pages 33–35. Univ. Paris VII, Paris, 1990. [She80] Saharon Shelah. Simple unstable theories. Ann. Math. Logic, 19(3):177–203, 1980. [She90] S. Shelah. Classification theory and the number of nonisomorphic models, volume 92 of Studies in Logic and the Foundations of Mathematics. North-Holland Publishing Co., Amsterdam, second edition, 1990. [She09] Saharon Shelah. Dependent first order theories, continued. Israel J. Math., 173:1–60, 2009.
0math.AC
arXiv:1712.07206v1 [cs.DC] 19 Dec 2017 Accelerating the computation of FLAPW methods on heterogeneous architectures Davor Davidović2, Diego Fabregat-Traver1, Markus Höhnerbach1 , and Edoardo di Napoli1,3 1 Aachen Institute for Advanced Study in Computational Engineering Science, RWTH Aachen, 52062 Aachen, Germany 2 Ruđer Bošković Institute, 10000 Zagreb, Croatia 3 Jülich Supercomuting Center and JARA,Jülich, Germany December 21, 2017 Abstract Legacy codes in computational science and engineering have been very successful in providing essential functionality to researchers. However, they are not capable of exploiting the massive parallelism provided by emerging heterogeneous architectures. The lack of portable performance and scalability puts them at high risk: either they evolve or they are doomed to disappear. One example of legacy code which would heavily benefit from a modern design is FLEUR, a software for electronic structure calculations. In previous work, the computational bottleneck of FLEUR was partially re-engineered to have a modular design that relies on standard building blocks, namely BLAS and LAPACK. In this paper, we demonstrate how the initial redesign enables the portability to heterogeneous architectures. More specifically, we study different approaches to port the code to architectures consisting of multi-core CPUs equipped with one or more coprocessors such as Nvidia GPUs and Intel Xeon Phis. Our final code attains over 70% of the architectures’ peak performance, and outperforms Nvidia’s and Intel’s libraries. Finally, on JURECA, the supercomputer where FLEUR is often executed, the code takes advantage of the full power of the computing nodes, attaining 5× speedup over the sole use of the CPUs. 1 1 Introduction Modern software is typically developed with modularity, portability and scalability in mind, while older codes often rely on a direct implementation of mathematical formulas. The latter approach limits the reuse of the code on emerging computing architectures and constitutes a substantial portability challenge: each of these formulas must be rewritten and optimized for each new architecture. One such example is FLEUR, a software for electronic structure calculations developed during the last three decades at the Forschungszentrum Jülich (Germany) [1]. Today, in a context where massively-parallel heterogeneous architectures have become ubiquitous, legacy code must be re-engineered and adapted to make an efficient use of these architectures. A critical insight in writing long-lasting scientific code is to have a modular design where, at the bottom layers, the computational bottlenecks are written in terms of kernels. Examples of such kernels are fast Fourier transforms, matrix products, and eigensolvers, provided by a number of commercial as well as academic libraries, such as Intel MKL [2], MAGMA [14], cuBLAS [3], cuFFT, and ELPA [4, 10]. Over time, standardized libraries implement highly-optimized routines for the most critical kernels on various computing architectures, from which applications can benefit automatically, without the need to change the code. The most outstanding example is the Basic Linear Algebra Subproblems (BLAS) library. In reality, the BLAS is an interface that defines a number of common building blocks (including matrix products and linear systems), which was born after the realization that standardization was critical to increase productivity and portability. Today, the BLAS is the first library ported and optimized for each new architecture, and is used as a building block for many other higher-level libraries. Therefore, writing software on top of the BLAS is a guarantee for performance portability and scalability. In order to demonstrate the benefits of modern engineering and portability, Di Napoli et al. underwent a major effort to rework one of the computational bottlenecks of FLEUR [5]: the construction of the so-called Hamiltonian and Overlap matrices. The concepts of abstraction and encapsulation were lacking in the original code, and the different modules were tightly coupled. Therefore, the authors rewrote the code from scratch. At this point, they decided to analyze the mathematics behind the code and rewrite the formulas at a higher level, resulting in a series of matrix operations. These matrix operations were then cast to kernels provided by the BLAS and LAPACK libraries. The new algorithm (HSDLA) attains speedups ranging from 1.5× to 2.5× with respect to the corresponding FLEUR code on multi-core CPUs. More importantly, the new code enables performance portability with limited programming effort which was demonstrated in our previous work [6]. We analyzed the performance portability of the HSDLA code on heterogeneous architectures consisting of multi-core shared-memory CPUs and one or more Graphical Processing Units (GPUs). In particular, we showed that the HSDLA code can be ported to emerging architectures with minor or relatively straightforward code changes by employing highly-optimized libraries such as NVIDIA’s CUBLASXT or Intel’s MKL. However, this approach attained only up to 69% of the theoretical system’s peak performance, thus still significantly underutilizing the available resources. In this paper we close the gaps still open in the previous work to demonstrate that the ini1 tial effort striving for modularity and portability indeed facilitates quick performance portability to complex heterogeneous architectures comprising multi-core shared-memory CPUs and either GPUs or Phi coprocessors. We first attempt a (almost) plug-and-play solution and quantify the benefits and limitations to make the best of these architectures. Then, we study alternative approaches to leverage existing optimized BLAS kernels for each component to obtain efficient hybrid routines. Finally, we identify scalability bottlenecks in sequential or poorly-scalable sections of the algorithm and propose solutions to limit their impact in the overall scalability. As our experimental results obtained on a number of architectures illustrate, the resulting code makes an efficient use of the computing resources and provides the expected boost to the application code. Contributions We make the following key contributions. First, we perform a portability study of the code, once it has been rewritten in terms of a standardized interface, and point out the remaining issues for a successful port to heterogeneous architectures. We then analyze different approaches to overcome these limitations, implement them and quantify the improvements. Finally, we contribute a high-performance and scalable implementation to compute the Hamiltonian and Overlap matrices, a computational bottleneck in FLAPW methods. Organization of the paper The remainder of the paper is organized as follows. Section 2 provides the background on Density Functional Theory and the math behind the computation to generate the Hamiltonian and Overlap matrices. Section 3 gives an overview of the HSDLA algorithm for the generation of these matrices and Section 4 provides overview of the related work. The improvements of the HSDLA algorithm as well as our implementation on the heterogeneous architectures, are described in Section 5. Section 6 presents experimental results for a collection of test cases and hybrid architectures. Finally, Sec. 7 draws conclusion and discusses future research directions. 2 Computing the Hamiltonian and Overlap matrices in FLEUR FLEUR is a scientific computing code, well-known in the community of condensed matter physicists, for calculating ground-state and excited-state properties of solids. This is one of few Density Functional Theory (DFT) which computes the electron structure of an atomic compound using the Full-potential Linearized Augmented Plane Wave (FLAPW) discretization approach. In this section we give a brief introduction of the fundamental mathematical aspects of DFT, and its practical realization by the FLAPW method. The material presented does not require a special background knowledge in quantum physics and allows the nonspecialist to understand the origin of one of the most computational intensive parts of the FLEUR code, the construction of the Hamiltonian and Overlap matrices. 2 2.1 DFT and the FLAPW method In the last two decades, Density Functional Theory (DFT) [11, 12] has become the “standard model” in Materials Science. Within the DFT framework, it is possible to simulate the physical properties of complex quantum mechanical systems made of few dozens up to few hundreds of atoms. The core of the method relies on the simultaneous solution of a set of partial differential equations. These equations are determined by a Hamiltonian operator Ĥ containing a so-called effective potential V0 [n], where n(r) is a function of the radial coordinate r known as the one-particle electron density. In turn, the solutions of the equations ψi (r) determine the one-particle electron density n(r) used in calculating the effective potential V0 . Because of the dependence of the Hamiltonian on the set of ψi (r) through n(r), the governing equations are highly non-linear and cannot be solved directly.  2  ~ 2 Ĥψi (r) = − 2m ∇ + V0 (r) ψi (r) = ǫi ψi (r) ; ǫ1 ≤ ǫ2 ≤ . . . (1) P 2 f |ψ (r)| n(r) = N i i i In practice, the equations above, also known as Kohn-Sham (KS) [9], are solved by selfconsistent iteration; an initial guess for n0 (r) is used to calculate the effective potential V0 which, in turn, is inserted in Eq. (1) whose solutions, ψi (r), are used to compute a new charge density n1 (r). Convergence is checked by comparing the new density to the starting one. When convergence is not reached, an opportune mixing of the two densities is selected as a new guess, and the process is repeated. In principle, the theory only requires as input the quantum numbers and the positions of the atoms that are part of the investigated system. In practice, there is a plethora of DFT methods which depends on the discretization used to parameterize the KS equations. The discretization in the Full-potential Linearized Augmented Plane Wave (FLAPW) method [16, 8] is based on a plane wave expansion of ψk,ν (r), where the momentum vector k and P the band index ν replace the generic index i. The k-point wave function G ψk,ν (r) = |G+k|≤Kmax ck,ν ϕG (k, r) is expanded in terms of a finite basis set ϕG (k, r) indexed by the vectors G lying in the lattice reciprocal to configuration space up to a chosen cut-off value Kmax . In FLAPW, the physical (configuration) space of the simulation cell is divided into spherical regions, called Muffin-Tin (MT) spheres, centered around atomic nuclei, and interstitial areas between the MT spheres. The basis set ϕG (k, r) takes a different expression depending on the region  i(k+G)r e h Interstitial  X i a,G a,G (2) ϕG (k, r) ∝ ath Muffin Tin Al ,m (k)ual (r) + Bl ,m (k)u̇al (r) Yl ,m (r̂a )  l ,m a,G where the coefficients Aa,G l ,m (k) and Bl ,m (k) are determined by imposing continuity of ϕG (k, r) and its derivative at the boundary of the MTs. Due to this P expansion the KS equations natu′ rally translate to a set of generalized eigenvalue problems G′ [HG,G′ (k) − λkν SG,G′ (k)] cG k,ν = ′ 0 for the coefficients of the expansion cG k,ν where the Hamiltonian and Overlap matrices H 3 and S are given by multiple integrals and sums X ZZ ϕ∗G (k, r){Ĥ, I}ϕG′ (k, r)dr. {H(k), S(k)}G,G′ = (3) a Since the set of basis functions in Eq. (2) is implicitly labeled by the values the variable k takes in the Brillouin zone, there are multiple Hamiltonian and Overlap matrices, one for each independent k-point. 2.2 Building H and S Without loss of generality, we can abstract from the k-point index and recover an explicit formulation of the HG,G′ and SG,G′ matrices by substituting Eq. (2) in Eq. (3) and carrying out the multiple integration. The computation is particularly complex within the MT regions where the initialization of the Hamiltonian and Overlap matrices is by far the most computationally intensive task. By exploiting the properties of the basis functions, the H and S matrices are directly expressed as functions of the set of A and B coefficients. (S)G′ ,G = NA X  X Aa,G l ,m a=1 l ,m (H)G′ ,G ′ ∗ ∗  a,G′ a 2 Aa,G + B Bla,G l ,m ,m ku̇l k l ,m (4) NA X     ∗  X ′ ∗ [AA] [AB] a,G′ a,G a,G = Aa,G + A T A T B ′ ′ ′ ′ L L L ,L;a L L ,L;a L a=1 L′ ,L +     ∗  ′ ∗ [BA] [BB] a,G′ a,G BLa,G TL′ ,L;a Aa,G + B B T . ′ ′ ′ L L L ,L;a L (5) Notice that in Eq. (5) for convenience we have compacted the indexes l , m into L, and expressed the range of the index a over all the distinct atom types NA . The new matrices [... ] TL′ ,L;a ∈ CNL ×NL are dense and their computation involves multiple integrals between the basis functions and the non-spherical part of the potential V0 (See [5, Appendix A.2] for details). Due to the non-orthornormality of the basis function set (2), the matrix S is non-diagonal, dense, and generically positive definite with the exception of having few very small singular values. On the opposite, H is always non-definite and both matrices are either complex Hermitian or real symmetric. 3 The HSDLA algorithm In the original FLEUR code the construction of matrices H and S was a direct implementation of mathematical formulae with the focus on the functionality rather than scalability. The performance scalability was significantly improved in the HSDLA algorithm [5], in which the authors reformulated Eqs. (4) and (5) in terms of the coefficients A and B. As a result, the entire construction of matrices H and S is now cast in terms of matrix operands, as shown in Eqs. (6) and (7), 4 H= NA X a=1 S= NA X AH T [AA] A + AH T [AB] Ba + BaH T [BA] Aa + BaH T [BB] Ba | a {z }a | a {z } (6) H H AH a Aa + Ba Ua Ua Ba , (7) HAA HAB+BA+BB a=1 [...] where Aa and Ba ∈ CNL ×NG , Ta ∈ CNL ×NL , H and S ∈ CNG ×NG are Hermitian, and U ∈ CNL ×NL is a diagonal matrix. Typical values for the matrix sizes are NA ∼ O(100), NG ∼ O(1000) to O(10000), and NL ∼ O(100). The HSDLA algorithm [5] takes advantage of the matrix formulation to cast the computation in terms of the highly optimized and portable BLAS and LAPACK libraries. The algorithm is illustrated in Algorithm 1. The main ideas behind it are: 1) exploiting the symmetries in the operations to reduce the computational cost, 2) casting the computation in terms of efficient BLAS and LAPACK kernels, and 3) combining multiple operations on small matrices together to increase performance and scalability. Although the algorithm exploits symmetry in matrices to reduce computational costs, extra flops are introduced compared to the original version. However, these are fast flops, run in highly-optimized BLAS-3 kernels, leading to significantly lower execution time when compared to the original code. For implementation purposes, the computation of H is split into two parts, HAB+BA+BB and HAA (Eq. 6), which can be cast completely in terms of BLAS-3 operations. The key idea behind the calculation of HAB+BA+BB (lines 3–9) is to rewrite the expression as NA X 1 1 [AB] BaH (T [BA] Aa ) + (AH )Ba + BaH (T [BB] Ba ) + (BaH T [BB] )Ba , a T 2 2 a=1 where T [BA] is the Hermitian transpose of T [AB] , and T [BB] is Hermitian. By doing so, the common expressions in parentheses can be grouped together and substituted with 1 Za = T [BA] Aa + T [BB] Ba , 2 for each atom a (lines 3–5). The matrices Za and Ba are then stacked together into larger matrices A and B (lines 6–7), allowing the remaining computation NA X BaH Za + ZaH Ba a=1 to be performed as one single large matrix product (line 9), as depicted in Fig. 1. To compute the second part of the matrix H (lines 16–28), the algorithm again takes advantage of the existing symmetries in HAA . Since the T [AA] matrix is Hermitian positive definite (HPD), HSDLA first attempts to compute the Cholesky factorization of T [AA] (Ca CaH = T [AA] ) (line 18), which is then substituted in HAA yielding 5 Algorithm 1 : Computation of the H and S matrices in HSDLA. 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: Backup  = A, B̂ = B // HAB+BA+BB for a := 1 → NA do [BA] Za = Ta Aa [BB] Za = Za + 12 Ta Ba Stack Za to A Stack Ba to B end for H = AH B + B H A // S Restore A = Â, B = B̂ S = AH A B = UB S = S + BH B // HAA for a := 1 → NA do try: [AA] Ca = Cholesky(Ta ) success: Za = CaH Aa Stack Za to BT failure: [AA] Za = Ta Aa Stack Za to BB Stack Aa to A end for H = H + BTH BT H = H + AH BB HAA = NA X [AA] AH Aa a T ⊲ (zgemm: 8NL2 NG Flops) ⊲ (zhemm: 8NL2 NG Flops) ⊲ (zher2k: 8NA NL NG2 Flops) ⊲ (zherk: 4NA NL NG2 Flops) ⊲ (scaling: 2NA NL NG Flops) ⊲ (zherk: 4NA NL NG2 Flops) ⊲ (zpotrf: 4 3 N 3 L Flops) ⊲ (ztrmm: 4NL2 NG Flops) ⊲ (zhemm: 8NL2 NG Flops) ⊲ (zherk: 4NAHPD NL NG2 Flops) ⊲ (zgemm: 8NA¬HPD NL NG2 Flops) ⇒ a=1 NA X a=1 (CaH Aa )H (CaH Aa ). | {z } Za However, while in theory T [AA] is HPD, in practice, due to numerical considerations, the factorization may fail. The algorithm thus divides the computation of HAA in two parts. In case the factorization succeeds, the matrix Za is computed (line 20) and stacked at the top part of B (BT ) (line 21). If, on the other hand, the factorization fails, the matrix Za (line 23) is stacked at the bottom of matrix B (BB ), and the matrix Aa stacked in A. At the completion of the loop, H is updated with the operation BTH BT + AH BB (lines 27–28), where the first term (BTH BT ) exploits the symmetry and computes only half of the output via the BLAS routine herk, while the second term (AH BB ) is computed via the BLAS routine gemm, 6 Figure 1: Stacking of multiple small matrices Za and Ba into larger matrices A and B, respectively. As a result, multiple small matrix products are combined into a larger better performing product. which computes a full matrix. Finally, the computation of S (lines 12–14) is more straightforward. First, the product H A A is computed as one single large product. Then B is updated with the norms stored in U and then second large product B H B completes the computation of S. 4 Related work Today, a numerous optimized BLAS-like computational libraries exist. However, up to our knowledge, none of these libraries does not implement BLAS kernels capable for automatic redistribution of the computational flops between different computational units, such as CPU, GPU and/or Phi. The most popular multi-GPU commercial BLAS library, CUBLASXT, supports hybrid CPU-GPU computation, but so far, only gemm kernels are implemented as hybrid. The bottom-right part of the input matrix is offloaded to the CPU and the percentage (i.e. the number of rows/columns) that will be offload to CPU is set at the compile time. An academic alternative to CUBLASXT, called BLASX [15] requires minor changes to the calls to the BLAS routines and, similar to CUBLASXT library, takes care of data transfers between CPU and GPU transparently. Although the authors reported a significant speedup and the communication volume decrease compared to CUBLASXT, Magma and some other libraries and runtimes, again, only the dgemm routine is implemented in the hybrid fashion, i.e. with a possibility to schedule execution between CPUs and GPUs. The other kernels of interest for this work have CPU-only and multi-GPU-only implementations. Further research in hybridization of codes has been done in [7] in which authors developed a lightweight scheduler to offload tasks between different computational units inside a single compute node. The scheduler is based on task parallelism and, as was demonstrated in the case of Cholesky, the factorization tasks are executed on the CPU while updating is done on the GPUs. The authors also demonstrated the portability and the scalability of the their approach across different accelerators, including multi-GPU and multi-Phi systems. However, there is no report on hybrid BLAS-3 kernels required by HSDLA. At the time of writing this paper, only one research [13] reported on hybrid GPU-based algorithms for the generation of Hamiltonian and Overlap matrices in FLAPW methods. In 7 that work, the authors aimed at 1000+ atoms systems, too large to be executed on a single compute node thus a distributed block-cyclic setup and distribution of the Hamiltonian and Overlap matrices were implemented. However, the authors based the generation of H and S only on distributed versions of zgemm and did not exploit symmetries to decrease computational cost. In addition, the generation is a task-based heterogeneous implementation where particular tasks are scheduled between CPU and the GPUs. In our approach to heterogeneity, we aim at further exploiting data parallelism, not task parallelism. 5 HSDLA on Heterogeneous Architectures In this section, we concentrate on the behaviour of the algorithm when executed on hybrid architectures consisting of shared-memory CPUs and one or more graphic processor units (GPUs) or Intel Xeon Phi coprocessors. As discussed in [5], once HSDLA is cast in terms of BLAS and LAPACK routines, it attains high performance on multi-core architectures by simply linking to a multi-threaded implementation of these libraries. However, as we demonstrate in this section, attaining such performance levels on hybrid architectures is not straightforward. We first refine the original HSDLA algorithm, and significantly reduce its computational cost as well as its memory footprint. Then, we identify the limitations of a straightforward port to hybrid architectures and the shortcomings of the existing solutions, and study alternative approaches to attain satisfactory performance levels on such architectures. 5.1 HSDLA refined In the effort of exploiting symmetries from the problem, the designers of HSDLA overlooked the fact that matrix H is Hermitian and used the zgemm routine (general matrix-matrix product) in Algorithm 1 (line 28) instead of a routine that takes advantage of the symmetry and computes only one triangle of the output matrix. As a result, the algorithm performs 4¬HP D NA NL NG2 redundant flops for computing the upper triangle of the matrix. With that in mind, and given that some vendor libraries such as NVIDIA’s CUBLASXT and Intel’s MKL provide a specialized routine to compute only one half of a general matrix product, line 16 through 28 can be greatly simplified, avoiding the Cholesky factorization altogether, by replacing them with the computation in Algorithm 2. As a result, the total cost of computing HAA is significantly reduced and is dominated by the specialized routine with a cost of 4NA NL NG2 . By further examining Algorithm 1 one observes two sequential steps, a backup and a restore of matrices A and B, lines 1 and 11, respectively. Since A and B are overwritten (lines 3–9), one copy of each are stored in two additional storage spaces  and B̂ (line 1) and reused to compute S (lines 12–14) and the rest of H (HAA ) (lines 16–28). However, the need for additional storage spaces  and B̂ can be significantly reduced by simply reordering the execution flow as described in Algorithm 3. The computation of S, which only requires one temporary buffer, is moved to the beginning of the algorithm (lines 2–4); the result of computing UB is stored in the temporary buffer X, and the original values A and B and 8 Algorithm 2 : Refinement of the computation of HAA . 15: // HAA 16: for a := 1 → NA do [AA] 17: Xa = Ta Aa ⊲ (zhemm: 8NL2 NG Flops) 18: Stack Xa to X 19: Stack Aa to A 20: end for 21: H = H + AH X ⊲ (zherkx: 4NA NL NG2 Flops) are so far preserved. The buffer X is then reused as auxiliary storage in the computation of HAB+BA+BB for stacking Za (line 9); note that overwriting B now in line 10 is harmless since its original contents are not needed anymore. Finally, in the computation of HAA , the result of line 15 is also stacked in X, and A is compressed in the A buffer itself. Since all of A, B, and X are of size 16NA NL NG bytes (in the order of gigabytes), cutting this requirements in half has a major impact on the memory footprint of the entire algorithm. Algorithm 3 : The refined HSDLA without Cholesky and with only one temporary buffer. 1: // S 2: S = AH A ⊲ (zherk: 4NA NL NG2 Flops) 3: X = UB ⊲ (scaling: 2NA NL NG Flops) 4: S = S + X H X ⊲ (zherk: 4NA NL NG2 Flops) 5: // HAB+BA+BB 6: for a := 1 → NA do [BA] 7: Za = Ta Aa ⊲ (zgemm: 8NL2 NG Flops) [BB] 8: Za = Za + 21 Ta Ba ⊲ (zhemm: 8NL2 NG Flops) 9: Stack Za to X 10: Stack Ba to B 11: end for 12: H = X H B + B H X ⊲ (zher2k: 8NA NL NG2 Flops) 13: // HAA 14: for a := 1 → NA do [AA] 15: Xa = Ta Aa ⊲ (zhemm: 8NL2 NG Flops) 16: Stack Xa to X 17: Stack Aa to A 18: end for 19: H = H + AH X ⊲ (zherkx: 4NA NL NG2 Flops) 5.2 Limitations of the straightforward approach As we reported in our previous work [6], with very limited effort, HSDLA can be easily ported to various computing architectures such as multi-core and multi-GPU systems. To achieve 9 that goal, wrappers have to be implemented around calls to optimized architecture-specific libraries such as cuBLAS, CUBLASXT or Intel MKL, and function calls changed with those of the optimized libraries for a particular architecture. Although this straightforward approach can quickly bring reasonable performance, it cannot utilize the underlying computational system at their full potential. For example, if CUBLASXT is used on a multi-GPU system, most of the BLAS operations will be offloaded to the GPUs while the CPUs remain idle. Thus, simply using the existing optimized libraries cannot yield the performance increase that is expected by combining the power of all CPUs and GPUs of a system. In order to overcome this issue, we developed heterogeneous BLAS kernels for the routines zher2k, zherk, and zgemm/zherkx that can efficiently divide the workload between the CPUs and the accelerators (GPUs and Phis). In the rest of this section, we describe two different designs on how to implement the BLAS kernels on heterogeneous architectures, required by the refined HDSLA. We denoted these two approaches as: • Static - The computation between the CPUs and GPUs is divided by pre-computing the number of rows/columns that will be offloaded to the GPUs and then a highly-tuned multi-GPU library is used to compute it. • Dynamic - The computation is based on dynamic scheduling depending on available on-device memory to determine block size and per-device task queuing. 5.3 Static This approach targets hybrid architectures with one or more CUDA-based GPU devices, but can be easily extended to Intel Xeon Phi as well as other accelerators, as long as optimized BLAS libraries for these architectures exist. The key idea of this approach is to re-use the existing, highly optimized multi-GPU and multi-threaded libraries in building the hybrid code, with the goal to significantly reduce the programming effort. As such, the code can be quickly tuned for new and emerging GPU architectures, thus improving performance portability on different platforms, while at the same time explores concurrent execution on all available CPUs and GPUs of the system. For the sake of simplicity, only the zher2k routine will be described in details, while the same approach can be easily extended to the other two routines. The zher2k performs the Hermitian rank 2k update of the given matrix C in one of the following operations: C := αAB H + αBAH + βC, C := αAH B + αB H A + βC, where α and β are scalars, C ∈ Rn×n is a Hermitian matrix, and A and B are general matrices of size n × k in the first case and k × n in the second case. Hereafter, we will observe only the first case; the same algorithm applies for the second, but with A and B of transposed dimensions. Matrix C is split into four blocks and updated as described in Figure 2. The workload is divided such that the principal submatrix C00 with dimension ng × ng is updated on the 10 Figure 2: Rank 2k update of matrix C (zher2k). The blocks are statically split between the CPUs (dark grey) and GPUs (light grey). ng is the size of principal submatrix offloaded to the GPUs. GPU(s), while the blocks C10 and C11 (C01 is not required since C is Hermitian) are updated on the CPU. The entire update of C can then be performed with only 4 function calls: C00 = αA0 B0H + αB0 AH 0 + βC00 −→ zher2k (GPU) C11 = αA1 B1H + αB1 AH 1 + βC11 −→ zher2k (CPU) C10 = C10 = αB1 AH 0 αA1 B0H + βC10 −→ zgemm (CPU) + C10 −→ zgemm (CPU). Since these operations are independent from each other, they can be performed in parallel. For scheduling the workload between CPU and GPU devices, OpenMP with nested parallelism is used. Two OpenMP threads are created, one manages the computation on the CPU and invokes multi-threaded MKL kernels, the other manages the computation on the GPU and invokes CUBLASXT kernels on the GPU. Although this approach is simple, the main challenge that remains is how to optimally set the size of the principal submatrix that will be offloaded to the GPU. In the ideal case the CPU and GPU execution times should be completely overlapped. Thus, knowing that the total number of flops for zher2k is 8kn2 , with n the number of rows and columns of C and k number of columns of matrices A and B, ng , the size of the principal submatrix C00 , may be computed as: timegpu = timecpu flopsgpu flopscpu = Gflopsgpu Gflopscpu 8kn2g + 4 8k(n − ng )2 + 4 + 16kng (n − ng ) = Gflopsgpu Gflopscpu Note that the updating block C10 requires two additional calls to zgemm which adds extra Gflops flops to the count. If m = Gflopsgpu then the size of matrix offloaded to the GPU is: cpu n2g = mn2 + 4m . m+1 11 As we illustrate in Section 6, the optimal offload between CPU and GPU devices can be computed analytically using this approach or the performance ratio between CPU and GPU can be estimated on smaller problem sizes. 5.4 Dynamic While a static split of the matrices and a static assignment of blocks to devices leads to the lowest overheads and highest efficiency, it lacks the flexibility to adapt easily to new circumstances. An alternative is the use of a dynamic scheduling that queries the devices to determine the available on-device memory, calculates appropriate block sizes, and uses perdevice queues to distribute the work. To maximize portability, the implementation is split into a device-specific and a device-independent part. This allows the dynamic code to target both the Xeon Phi coprocessor and CUDA GPUs. The device-independent part contains all the workload distribution, scheduling, the BLAS operation and hybrid calculation logic. As for the device-dependent code, the Xeon Phi implementation builds on the hStreams library and MKL, while the GPU implementation relies on CUDA and cuBLAS. The device-independent logic works as follows. First, each matrix is split into square blocks. The block size is chosen to split the matrices evenly, fit multiple blocks into GPU memory, and follow vendor recommendations (e.g. for the first generation Xeon Phi accelerators the block size should be divisible by 64 but not 256). Next, the scheduler determines the individual operations to be performed on each of the submatrices, and schedules them to the devices in a round-robin fashion. Each block is packed into contiguous buffers and streamed to the devices; the results are unpacked once the calculation and the reverse transfer complete. The packing of the blocks is necessary for the Xeon Phi, since it lacks support for copies from 2D arrays, but it is avoided on GPUs. If the scheduler notices that a devices is not yet ready to accept work because its queue is full, it skips that devices. Once the memory of the devices are filled up, and the CPU is not needed to drive the devices, the CPU starts computing block operations using its own computational resources. The remaining challenge is to improve utilization at the very start of a calculation, and at the very end. There, it is desirable to reduce block sizes and sacrifice kernel efficiency for load balance. However, implementing such a scheme requires sophisticated models of transfer and compute efficiency, and it is left to future work. 6 Experimental Results We turn now our attention to experimental results. We compare the performance of the original multi-core (CPU only) HSDLA algorithm [5] against our refined CPU implementation from Section 5.1 and the two hybrid CPU-GPU implementations based on that refined algorithm. As mentioned in Section 5 these include an implementation that offloads large matrix-matrix products to the multi-GPU using CUBLASXT, an implementation using static work assignment (Section 5.3) and an implementation using dynamic work assignment (Section 5.4). Since the implementation using dynamic work assignment supports offloading to Intel Xeon Phi accelerators, we also present results on that platform. 12 As test cases we use three input systems that describe distinct physical systems. We refer to them as NaCl, AuAg and TiO2 , respectively. These systems represent a heterogeneous sample (including both insulators and conductors) with different physical properties. In our tests, the code generates the matrices H and S for one single k-point, and different Kmax values. The actual problem sizes, that is, the values for NA , NL , and NG for each case are given in Tab. 1. Test case NaCl AuAg TiO2 NA NL NG : 512 49 108 121 384 81 Kmax = 2.5 Kmax = 3.0 Kmax = 3.5 Kmax = 4.0 2 256 3 275 7 094 3 893 5 638 12 293 6 217 8 970 19 553 9 273 13 379 29 144 Table 1: Problem sizes for NaCl, AuAg, and TiO2 , for a variety of Kmax values. The value of NG varies with Kmax . 6.1 Experimental setup We ran our experiments on a range of compute nodes. We used two computed nodes hosted by the IT center of the RWTH Aachen University. One of these nodes (RWTH-GPU) consists of two eight-core Sandy Bridge E5-2680 processors, running at a frequency of 2.7 GHz. The node is equipped with 64 GBs of RAM and 2 Nvidia Tesla K20Xm GPUs. The peak performance of the 16 CPU cores in double precision is 345 GFlops/s, while the peak performance of each GPU is 1.3 TFlops/s, for a combined peak of almost 3.0 TFlops/s. The second RWTH node (RWTH-Phi) consists of two eight-core Sandy Bridge E5-2650 processors, running at a frequency of 2.0 GHz. The node is also equipped with 64 GBs of RAM and 2 Intel Xeon Phi 5110p accelerators (Knight’s Corner), The peak performance of the 16 CPU cores in double precision is 256 GFlops/s, while the peak performance of each Xeon Phi is (about) 1 TFlops/s, for a combined peak of 2.3 TFlops/s. We also ran experiments on the JURECA supercomputer at the Jülich Supercomputing Centre (JSC). More specifically, we used one JURECA node consisting of two twelve-core Haswell E5-2680v3 processors, running at a nominal frequency of 2.5 GHz, and 2 NVIDIA K80 GPUs (each of which consists of two GK210 devices). The node is equipped with 128 GBs of RAM. The combined peak performance for the 24 CPU cores in double precision is 960 GFlops/s, while the theoretical peak performance in double precision of each GPU device is about 1.45 TFlops/s, for a total of 6.7 TFlops/s. In the following subsections, when presenting efficiency of the achieved system with a varying number of accelerators, we take as reference value the peak performance corresponding to the same number of accelerators. For example, when presenting the results on JURECA with 1, 2 and 3 GPUs, the system peak performance is 2.4, 3.8, and 5.3 TFlops, respectively. We compare several different improved HSDLA versions. We refer to the base HSDLA algorithm, as implemented in [5], with original. Our algorithmically refined multiCPU HSDLA version is denoted as refined, while the same version but for multi-GPU system is named cuBlasXt. The accelerated versions, denoted as static and dynamic, are the version described 13 cuBlasXt Refined (CPU) 8 Dynamic Static 7 Speedup 6 5 4 3 2 1 101 102 TFLOPS Figure 3: Speedup on RWTH-GPU for all implementations, relative to original code. 2000 1750 Original (CPU) Refined (CPU) GFLOPs/s 1500 1250 cuBlasXt (1 GPU) cuBlasXt (2 GPUs) 1000 Dynamic (1 GPU) Dynamic (2 GPUs) 750 Static (1 GPU) 500 Static (2 GPUs) 250 2.5 3.0 3.5 4.0 Kmax Figure 4: Performance on RWTH-GPU for all implementations, for the AuAg test case. in Sections 5.3 and 5.4, respectively. In all cases, the code was linked to Intel MKL version 11.3.2 for the BLAS routines on the CPU and Xeon Phis; the GPU code was linked to NVIDIA CUBLASXT version 7.5 and 8.0 on the RWTH-GPU nodes and on the JURECA nodes, respectively. 6.2 RWTH-GPU We provide two experiments for the RWTH-GPU system. Figure 3 presents the speedup over the original HSDLA algorithm attained by the refined, cuBlasXt, dynamic, and static implementations, for each of the different test cases ordered by the amount of computation required by each of them. The results show an average speedup of 1.13 of the refined algorithm over the original, when run on the CPU only. That clearly demonstrates how small changes in 14 the code, such as exploiting symmetries and reordering of the execution flow (requiring limited programming effort), can lead to higher performance, even without using the accelerators. Also, the figure illustrates how the GPU code (cuBlasXt, static, and dynamic) achieves seizable speedups no matter how large the computation is. In most cases our custom hybrid implementations outperform the cuBlasXT, thanks to both better tuning of block sizes and especially a heavier usage of the host CPU computational power. The dip at the end for the dynamic code is due to TiO2 case run out of memory when 2 GPUs are used and instead result using 1 GPU is presented. Figure 4 showcases the total performance achieved by the different implementations for the AuAg test case and a range of values for Kmax . Again, the advantages of enabling the use of the entire compute nodes (CPU + GPUs) become apparent. There is a clear separation between CPU-only and accelerated code, and also between GPU-only cuBlasXt and the hybrid static and dynamic codes. Both our hybrid codes outperform GPU-only (cuBlasXt), for large enough problems, by more than 200 Gflops, which is very close to the peak performance of the CPU-only version, Table 2. This clearly demonstrates that the all CPUs are fully utilized in our hybrid approach. Furthermore, for large problems that allow for a reasonable utilization of the multiple GPUs, we achieve about 2 TFlops/s compared to a peak performance of 3 TFlops/s, i.e. 66% efficiency. The efficiency is even higher for larger problems such as TiO2 with Kmax = 4.0, where our code attains about 2.5 TFlops/s (83% of the peak). The presented results include timings from the CPU-only parts of the code (Algorithm 3 lines 6–11 and 14–18), during which the GPUs are in idle state, thus decreasing total performance and efficiency. The efficiency attained by our hybrid BLAS routines is even higher, as presented in Table 2. The attained efficiency of the BLAS-only kernels is up to 79% for AuAg case and slightly better for TiO2 case, up to 81% of the peak system performance. Table 2: GFlops/s and efficiency (in parentheses) for the AuAg test case and Kmax = 4.0. Results for the RWTH node using 2 GPUs. Implementation zherk zher2k zherkx/zgemmt CPU 358 (11.93%) 304 (10.13%) 343 (11.43%) cuBlasXt 2041 (68.30%) 2012 (67.06%) 2021 (67.07%) Dynamic 2332 (77.73%) 2367 (78.90%) 2302 (76.73%) Static 2337 (77.91%) 2315 (77.16%) 2315 (77.16%) 6.3 RWTH-Phi For the RWTH-Phi system, we again present a speedup plot (Fig. 5) and a performance plot (Fig. 6). In this case, we present results for the refined algorithm and the dynamic version of the hybrid code, which is the only one with current support for the Xeon Phi (through the hStreams API). While MKL can offload calculations automatically to the device, this is only true for the GEMM operation. Therefore, the automatic offload is not applicable to our algorithm, which is dominated by the zherk, zher2k and zherkx routines. Figure 5 shows how our hybrid code consistently achieves a speedup between 4 and 5 with respect to the original HSDLA algorithm. This is consistent with both the relative power of 15 the two accelerator cards and the CPU, as well as the expectation that the Phi accelerators do not get as close to their theoretical peak performance as GPUs do. In Figure 6, we illustrate the performance of the original, refined, and dynamic codes for AuAg test case. For the larger case (Kmax = 4.0), the dynamic versions attain about 700 GFlops/s, using one Phi, and 1200 GFlops/s, using two Phis, which correspond to 55% and 52% of the system peak performance, respectively. For the TiO2 test case we observed even higher performances of up to 950 GFlops/s (one Phi) and 1600 GFlops/s (two Phis) corresponding to an efficiency of 75% and 69%. Similarly to the previous experiments in the RWTH-GPU system, the larger the problem size, the larger the efficiency attained, which shows that even higher efficiency is to be expected when larger systems are simulated. Dynamic Refined (CPU) 5 Speedup 4 3 2 1 101 102 TFLOPS Figure 5: Speedup on RWTH-Phi for the refined and the hybrid dynamic implementations, relative to original code. 6.4 JURECA-GPU The JURECA-GPU nodes comprise two NVIDIA K80 GPUs, each of which consists of two devices. This allows us not only to not evaluate speedups (Fig. 7) and performance (Fig. 8), but also scalability of the different implementations (Fig. 9). Figure 7 illustrates the speedup of the various GPU implementations relative to the original HSDLA. The speedup ranges most of the times between 3.5 and 5.5 (starting from a maximum of about 7). The fact that the speedup of the dynamic code varies widely indicates that the scheduler struggles to fully utilize all four GPUs. With regards to the comparison among the three GPU-hybrid implementations, there is again a clear separation between the static code and the cuBlasXt implementation. The performance plot in Fig. 8 illustrates the flop rates achieved by each implementation. The clear separation between the static and the cuBlasXt implementation is again very pronounced. However, as observed in Fig. 7, the dynamic implementation struggles to utilize 16 1200 GFLOPs/s 1000 Original (CPU) 800 Refined (CPU) Dynamic (1 Phi) 600 Dynamic (2 Phis) 400 200 2.5 3.0 3.5 4.0 Kmax Figure 6: Performance on RWTH-Phi for the original, refined and dynamic implementations, for the AuAg test case. many GPUs. It seems like further improvements would be necessary to properly adapt it to this use case. Overall, our static implementation achieves up to 3.2 TFlops/s for the AuAg test case, that is, a 15% higher performance than the cuBlasXt implementation. Similar results are achieved for the TiO2 case, in which we observe a performance of up to 4.3 TFlops/s on 4 GPUs, resulting in 16% higher performance compared to the cuBlasXt implementation. As the system has a peak performance of 6.7 TFlops/s (4 GPU included), the results for AuAg and TiO2 cases correspond to 47% and 61% peak performance utilization, respectively. These much lower results compared to RWTH-GPU are the result of the surprisingly low performance of the CUBLASXT implementations (only 55% utilization) of the key BLAS-3 kernels, on which our accelerated HSDLA versions depend on. The plot in Fig. 9 captures the scalability behaviour of our code for the AuAg and TiO2 , Kmax = 3.5 case, for 1, 2, 3, and 4 GPUs. In this plot we focus solely on our hybrid implementation of the off-loaded BLAS routines, and consider only this part of the runtime. We extract three important messages from the graph: First, the measurements for static and dynamic code nearly coincide. This is not surprising, since both codes aim to achieve the same goal: hybrid execution. Second, the measurements for all three implementations roughly share the same slope. This indicates that all codes utilize the GPUs similarly well as additional devices are added. Third, there is a gap between the hybrid codes and the GPU-only code of almost 1 TFlop/s, which is roughly the computational power of the CPU. This reflects that not only the hybrid codes reach a utilization of the GPUs similar to the vendor optimized CUBLASXT, but they also fully utilize the CPU cores. This is particularly of interest because modern CPUs provide high computational power (e.g. 960 GFlops on JURECA per node), even when compared to that of the coprocessors, and thus should not be neglected nor underutilized. Table 3 shows that the performance gain of combining CPUs with GPUs in the BLAS-3 kernels in the HSDLA algorithm can improve performance up to 19% compared to the state-of-the-art cuBlasXt implementations using 4 GPUs. 17 Table 3: GFlops/s and speedup (in parentheses) for static and dynamic implementations compared to cuBlasXt for the TiO2 test case and Kmax = 3.5 on JURECA using 4 GPUs. Implementation zherk zher2k zherkx/zgemmt cuBlasXt 3439 3258 3257 Dynamic 3862 (1.12×) 3590 (1.11×) 3266 (1.01×) Static 4012 (1.19×) 3832 (1.19×) 3686 (1.13×) 7 Refined (CPU) cuBlasXt Dynamic Static 6 Speedup 5 4 3 2 1 101 102 TFLOPS Figure 7: Speedup on JURECA for all implementations, relative to original code. 7 Conclusions and Future Work In this paper we demonstrated how legacy codes, such as FLEUR code, can be modernized in order to exploit the massive parallelism of modern computing architectures, and to improve code performance, portability and scalability. The starting point of our work was the HSDLA algorithm. HSDLA encodes the computation of the Hamiltonian and Overlap matrices (H and S), one of the two computational bottlenecks of the FLEUR code, in terms of multidimensional operations that map well onto BLAS operations. However, the straightforward porting of these BLAS operations to heterogeneous architectures consisting of multi-core CPU and one or more GPUs or Phi accelerators, does not attain expected performances. The reason behind the limited performance is that vendor optimized BLAS libraries do not provide support for such hybrid architectures and exploit either the CPUs or the accelerators, but not both. We used the original BLAS-based HSDLA code as a starting point to explore both existing and custom implementations in order to take advantage of the accelerators. First, we improved the original HSDLA algorithm by introducing changes in the execution flow; the result was a much lower memory footprint, and a reduced computational cost. Then, we showed that custom hybrid implementations can boost performance compared to accelerator- 18 Original (CPU) Refined (CPU) cuBlasXt (1 GPU) 3000 cuBlasXt (2 GPUs) GFLOPs/s 2500 cuBlasXt (3 GPUs) cuBlasXt (4 GPUs) 2000 Dynamic (1 GPU) Dynamic (2 GPUs) 1500 Dynamic (3 GPUs) Dynamic (4 GPUs) 1000 Static (1 GPU) Static (2 GPUs) 500 Static (3 GPUs) 2.5 3.0 3.5 4.0 Static (4 GPUs) Kmax Figure 8: Performance on JURECA for all implementations, for the AuAg test case. Peak cuBlasXt Dynamic Static 6000 5000 4000 GFLOPs/ s GFLOPs/ s 5000 3000 4000 3000 2000 2000 1000 1000 0 1 Peak cuBlasXt Dynamic Static 6000 2 3 0 4 #GPUs 1 2 3 4 #GPUs a) b) Figure 9: Scalability of the hybrid BLAS routines on JURECA going from one to many GPUs, for both codes, for the AuAg a) and TiO2 b) 3.5 test case. only implementations, especially when CPUs themselves provide large computational power. We presented two approaches to implement hybrid BLAS: A dynamic approach that schedules chunks of calculation on the devices using buffers and queues, and a static approach that splits matrices based on prescribed ratios. The dynamic approach is more generic, as demonstrated by targeting both GPUs and Phis. Because the static code needs to be tuned through the ratios, it gives better control for tuning. Both implementation strategies considerably boost performance due to their hybrid nature. However, there is still room for improvement. By using mathematical equalities the objects A and B can be compressed into smaller objects, leading to less but more complex computations. More specifically, the compressed form of A and B leads to tensor contractions that do not naturally map onto gemm-like operations and require the development of specialized routines. If efficient mappings and implementations of new kernels are found, speedups of up to one order of magnitude may be achieved. Furthermore, in order to solve even larger problems (systems of up to 1000 atoms), the presented approaches present certain limitations such as the memory requirements and the limited size of the on-device memory. To efficiently solve larger problems new memory and communication-avoiding approaches on distributed multi-CPU and multi-GPU systems are required, including the redesign of the 19 most time-consuming kernels. Acknowledgements This work was partially funded by the Ministry of Science and Education of the Republic of Croatia and the Deutsche Akademische Austauschdienst (DAAD) from funds of the Bundesministeriums für Bildung und Forschung (BMBF) through project “PPP Kroatien” ID 57216700. Financial support from the Jülich Aachen Research Alliance-High Performance Computing and the Deutsche Forschungsgemeinschaft (DFG) through grant GSC 111 is also gratefully acknowledged. Furthermore, the authors thank the RWTH IT Center and the Jülich Supercomputing Centre for the computational resources. References [1] FLEUR. The Jülich FLAPW code family. http://www.flapw.de/pm/index.php [10 December 2017]. [2] Intel Math Kernel Library. https://software.intel.com/en-us/mkl [10 December 2017]. [3] NVIDIA cuBLAS. Dense Linear Algebra on GPUs. https://developer.nvidia.com/cublas [12 December 2017]. [4] Auckenthaler, T., Blum, V., Bungartz, H.-J., Huckle, T., Johanni, R., Krämer, L., Lang, B., Lederer, H., and Willems, P. R. Parallel solution of partial symmetric eigenvalue problems from electronic structure calculations. Parallel Computing 37, 12 (2011), 783–794. [5] Di Napoli, E., Peise, E., Hrywniak, M., and Bientinesi, P. High-performance generation of the Hamiltonian and Overlap matrices in FLAPW methods. Computer Physics Communications 211 (Feb. 2017), 61–72. DOI: 10.1016/j.cpc.2016.10.003. [6] Fabregat-Traver, D., Davidovic, D., Höhnerbach, M., and Napoli, E. D. Hybrid CPU-GPU Generation of the Hamiltonian and Overlap Matrices in FLAPW Methods. In JHPCS (2016), E. D. Napoli, M.-A. Hermanns, H. Iliev, A. Lintermann, and A. Peyser, Eds., vol. 10164 of Lecture Notes in Computer Science, Springer, pp. 200– 211. [7] Haidar, A., Cao, C., Yarkhan, A., Luszczek, P., Tomov, S., Kabir, K., and Dongarra, J. Unified Development for Mixed Multi-GPU and Multi-coprocessor Environments Using a Lightweight Runtime Environment. In Proceedings of the 2014 IEEE 28th International Parallel and Distributed Processing Symposium (Washington, DC, USA, 2014), IPDPS ’14, IEEE Computer Society, pp. 491–500. 20 [8] Jansen, H. J. F., and Freeman, A. J. Total-Energy Full-Potential Linearized Augmented-Plane-Wave Method for Bulk Solids - Electronic and Structural-Properties of Tungsten. Physical Review B 30, 2 (July 1984), 561–569. [9] Kohn, W., and Sham, L. J. Self-Consistent Equations Including Exchange and Correlation Effects. Phys.Rev. 140 (1965), A1133–A1138. [10] Marek, A., Blum, V., Johanni, R., Havu, V., Lang, B., Auckenthaler, T., Heinecke, A., Bungartz, H.-J., and Lederer, H. The ELPA library: scalable parallel eigenvalue solutions for electronic structure theory and computational science. Journal of Physics: Condensed Matter 26, 21 (2014), 213201. [11] Nogueira, F., Marques, M. A. L., and Fiolhais, C. A primer in density functional theory. Lecture Notes in Physics. Springer, Berlin, 2003. [12] Sholl, D., and Steckel, J. A. Density Functional Theory. A Practical Introduction. John Wiley & Sons, Sept. 2011. [13] Solcà, R., Kozhevnikov, A., Haidar, A., Tomov, S., Dongarra, J., and Schulthess, T. C. Efficient implementation of quantum materials simulations on distributed CPU-GPU systems. In Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis (2015), J. Kern and J. S. Vetter, Eds., ACM, pp. 10:1–10:12. [14] Tomov, S., Dongarra, J., and Baboulin, M. Towards dense linear algebra for hybrid GPU accelerated manycore systems. Parallel Computing 36, 5-6 (June 2010), 232–240. [15] Wang, L., Wu, W., Xu, Z., Xiao, J., and Yang, Y. BLASX: A High Performance Level-3 BLAS Library for Heterogeneous Multi-GPU Computing. In Proceedings of the 2016 International Conference on Supercomputing (New York, NY, USA, 2016), ICS ’16, ACM, pp. 20:1–20:11. [16] Wimmer, E., Krakauer, H., Weinert, M., and Freeman, A. J. FullPotential Self-Consistent Linearized-Augmented-Plane-Wave Method for Calculating the Electronic-Structure of Molecules and Surfaces - O2 Molecule. Physical Review B 24, 2 (July 1981), 864–875. 21
5cs.CE
The Right Way to Search Evolving Graphs arXiv:1601.08189v2 [cs.SI] 4 Mar 2016 Jiahao Chen Computer Science and Artificial Intelligence Laboratory, Massachusetts Institute of Technology, Cambridge, Massachusetts, 02139-4307, USA [email protected] Abstract—Evolving graphs arise in problems where interrelations between data change over time. We present a breadth first search (BFS) algorithm for evolving graphs that computes the most direct influences between nodes at two different times. Using simple examples, we show that naı̈ve unfoldings of adjacency matrices miscount the number of temporal paths. By mapping an evolving graph to an adjacency matrix of an equivalent static graph, we prove that our generalization of the BFS algorithm correctly accounts for paths that traverse both space and time. Finally, we demonstrate how the BFS over evolving graphs can be applied to mine citation networks. Keywords- Evolving graph; complex network; breadth first search; data mining. I. I NTRODUCTION Let’s imagine a game played by three people, numbered 1, 2, and 3, each of whom has a message, labeled a, b, and c respectively. At each turn, one particular player is allowed to talk to one other player, who must in turn convey all the messages in his or her possession. The goal of the game is to collect all the messages. Suppose 1 talks to 2 first, and 2 in turn talks to 3. Then, 3 can collect all the messages even without talking to 1 directly. However, if 2 talks to 3 before 1 talks to 2, then 3 can never get a. We can analyze the spread of information between the players using graph theory. In this process, the time ordering of events matters, and hence its graph representation G(t) = (V (t), E(t)) must be time dependent. Such a graph is called an “evolving graph” [1], [2], “evolving network” [3] or “temporal graph” [4]. Treatments of evolving graphs vary in their generality and focus. Kivelä et al. [5] treat time dependence as a special case of families of graphs with multiple interrelationships. Others like Flajolet et al. [1] use time to index the family of related graphs, but are not concerned with explicit time-dependent processes. Yet others focus on incremental updates to large graphs [2]. Here, we describe evolving graphs as a time-ordered sequence of graphs, similar to the study of metrized graphs by Tang and coworkers [4], [6]– [8] and of community dynamics by Grindrod, Higham and coworkers [9], [10]. The game described above can be encoded in an evolving graph. The spread of information to the winner can be Weijian Zhang School of Mathematics, University of Manchester, Manchester, M13 9PL, England, UK [email protected] described in terms of traversing this graph using discrete paths that step in both space and time. Traversals of an ordinary (static) graph may be computed using well known methods such as the breadth-first search (BFS). An informal description of BFS generalized to evolving graphs can be found in [4]. However, it turns out that naı̈ve extensions can lead to incorrect descriptions of the resulting graph traversals by accounting for traversals of edges in space, but not necessarily in time. A proper treatment requires the notions of node activeness to describe the set of paths that can only traverse time or edges, which we call temporal paths, as well as causal edges which connect active nodes with the same identity across different times. As a result, our treatment can be applied to any evolving graph, even those that are highly dynamic with arbitrary changes to the nodes and edges. It is well known that sparse matrix-vector product is equivalent to a one-step BFS on the corresponding (static) graph [11, Sec. 1.1]. In this paper, we demonstrate a correct corresponding result for an evolving graph by constructing a block triangular matrix representation of the graph that takes into account both static and causal connections between active nodes. In Section II, we explain how the BFS algorithm can be applied to an evolving graph to enumerate paths that traverse edges across time and space. Section II-A provides an example showing that considering only products of the time-dependent adjacency matrices fails to enumerate certain temporal paths. We present and demonstrate the BFS algorithm over evolving graphs in Section II-B, showing its formal equivalence to BFS over a particular static graph generated by adding causal edges that connect active nodes. This static graph generates an algebraic representation of the BFS as power iteration of its adjacency matrix to a starting search node, as shown in Section III-D. The algebraic formulation also demonstrates interesting connections between properties of the BFS algorithm and the adjacency matrix. We describe in Section IV an implementation of the algorithm in Julia. Finally in Section V, we explain how BFS on evolving graphs may be applied to study dynamical processes over citation networks. II. B READTH -F IRST S EARCH OVER E VOLVING G RAPHS 1 1 1 A. Temporal Paths over Active Nodes 2 1 1 1 2 2 2 3 3 3 2 t1 3 3 t1 2 t2 t3 3 t2 t3 Figure 1. An evolving directed graph with 3 time stamps t1 , t2 and t3 . At each time stamp, the evolving graph is represented as a graph. The green filled circles represent active nodes while the red circles represent inactive nodes. Directed edges are shown as black arrows. The key new idea in generalizing BFS to evolving graphs is to be able to compute paths that evolve forward in time and can only traverse the node space along existing edges. We call these paths temporal paths. Figure 1 shows a small example of an evolving directed graph, G3 = hG[1] , G[2] , G[3] i, consisting of a sequence of three graphs G[i] , each bearing a time stamp ti . There are directed edges 1 → 2 at time t1 , 1 → 3 at time t2 , and 2 → 3 at time t3 . Each edge exists only at a particular discrete time and the nodes connected by edges are considered active at that time. Temporal paths connect only active nodes in ways that respect time ordering. Thus the sequences h(1, t1 ), (1, t2 ), (3, t2 ), (3, t3 )i and h(1, t1 ), (2, t1 ), (2, t3 ), (3, t3 )i are both examples of temporal paths from (1, t1 ) to (3, t3 ), which are drawn as dotted lines with arrowheads in Figure 2. However, h(1, t1 ), (1, t2 ), (2, t2 ), (3, t2 ), (3, t3 )i is not a temporal path because node 2 is inactive at time t2 . The restriction that temporal paths may only traverse active nodes reflects underlying causal structure in many real world applications, such as analyzing the influence of nodes over social networks. We will also show later in Section III-A that the resulting structure of allowable temporal paths leads to nontrivial subtleties in the generalization of algorithms and concepts from ordinary (static) graphs. B. Breadth-First Traversal Over Temporal Paths The example presented above in Section II-A demonstrates how active nodes restrict the set of temporal paths that need to be considered when traversing an evolving graph. We now give a general description of the BFS algorithm over evolving graphs, both directed and undirected, which correctly takes into account the structure of temporal paths. Our notation generalizes that for static graphs presented in [11], [12]. 1 1 1 2 2 3 2 3 t1 3 t2 t3 Figure 2. The two temporal paths of length 4 from (1, t1 ) to (3, t3 ) on the evolving graph shown in Figure 1, shown in black dashed lines. The paths traverse only active nodes along edges, and are allowed to advance between the same node if it is active at different times. Definition 1. An evolving graph Gn is a sequence of (static) graphs Gn = hG[1] , G[2] , . . . , G[n] i with associated time labels t1 , t2 , . . . , tn respectively. Each G[t] = (V [t] , E [t] ) represents a (static) graph labeled by a time t. Intuitively, an evolving graph is some discretization of the continuous-time family G(t): G[2] 1 2 G[6] 3 5 6 n We assume no particular relation between the node and edge sets for each static graph G[t] = (V [t] , E [t] ). In particular, we allow the node sets to change over time, so that each V [t] may be different. Changing node sets happen naturally in citation networks, where nodes may appear or disappear from the citation network over time. The addition, removal, or relabeling of nodes can be expressed in terms 0 0 of a map Π[t,t ] : V [t] → V [t ] that expresses the appropriate permutations and/or projections. Definition 2. A temporal node is a pair (v, t), where v ∈ V [t] is a node at a time t. Definition 3. A temporal node (v, t) is an active node if there exists at least one edge e ∈ E [t] that connects v ∈ V [t] to another node w ∈ V [t] , w 6= v. An inactive node is a temporal node that is not an active node. In Figure 1, the temporal nodes (1, t1 ) and (2, t2 ) are active nodes, whereas the temporal node (3, t1 ) is an inactive node. node (v, t) there exists some finite integer k for which (w, s) is a k-forward neighbor of (v, t). Definition 4. A temporal path of length m on an evolving graph Gn from temporal node (v1 , t1 ) to temporal node (vm , tm ) is a time-ordered sequence of active nodes, h(v1 , t1 ), (v2 , t2 ), . . . , (vm , tm )i. Here, time ordering means that t1 ≤ t2 ≤ · · · ≤ tm and vi = vj iff ti 6= tj . The BFS on evolving graphs is described in Algorithm 1. Algorithm 1 is identical to the BFS on static graphs except for line 8, where we visit the forward neighbors of a given temporal node in both space and time. Given an evolving graph Gn and a root (v1 , t1 ), Algorithm 1 returns all temporal notes reachable from the root and their distances from the root. reached is a dictionary from temporal nodes to integers whose key set represents all visited temporal nodes and whose value set are the corresponding distances from the root. The BFS constructs a tree inductively by discovering all k-forward neighbors of the root before proceeding to all (k+ 1)-forward neighbors of the root. Within the outermost loop, the algorithm iterates over f rontier, a list of all temporal nodes of distance k from the root. The nextf rontier list is populated with all temporal nodes that are forward neighbors of any temporal node in the f rontier list which have not yet been reached by the algorithm. This definition of a temporal path differs from that of the dynamic walk in [9], [10] in that causal edges, i.e. sequences of the form h(v, t), (v, t0)i are included explicitly in temporal paths but are only implicitly included in dynamic walks and are not counted toward the length of dynamic walks. Our definition implies that if either or both end points of a temporal path are inactive, then the entire temporal path must be the empty sequence hi. Keeping track explicitly of the time labels of each temporal node allows greater generality to cases where the node sets change over time. Furthermore, we shall show later in Sec. III-A that the explicit bookkeeping of the time labels is essential for correctly generalizing the BFS to evolving graphs. The following definition of forward neighbors generalizes the notion of neighbors and reachability in static graphs. Definition 5. The k-forward neighbors of a temporal node (v, t) are the temporal nodes that are the (k + 1)st temporal node in every temporal path of length k + 1 starting from (v, t). The forward neighbors of a temporal node (v, t) are its 1-forward neighbors. In Figure 1, the forward neighbors of (1, t1 ) are (2, t1 ) and (1, t2 ) and the only forward neighbor of (2, t1 ) is (2, t3 ). The 2-forward neighbors of (1, t1 ) are (2, t1 ), (1, t2 ), (2, t2 ) and (3, t2 ). By construction, time stamp of every forward neighbor of an active node (v, t) must be no earlier than t. Definition 6. The distance from a temporal node (v, t) to a temporal node (w, s) is the k for which (w, s) is a k-forward neighbor of (v, t). Our definition of distance, again, differs from the definition of distance in the formulation of [9], [10] in that we explicitly count causal edges toward the distance. It also differs from the notion of temporal distance in the work of Tang and coworkers [8], which is the number of time steps between t and s (inclusive). In this respect, our formulation of the BFS on evolving graphs differs from these other works by minimizing a different notion of distance over an evolving graph. Note that this notion of distance is not a metric, since the distance from (v, t) to (w, s) will in general differ from the distance of (v, t) from (w, s) owing to time ordering. Definition 7. A temporal node (w, s) is reachable from a temporal node (v, t) if the distance to (w, s) from a temporal C. Description of the BFS algorithm As a simple example, consider the BFS on the example graph in Figure 1 starting from the root (1, t2 ). The procedure is shown in Figure 3. The f rontier list is first initialized to {(1, t2 )}. Since the only forward neighbor of (1, t2 ) is (3, t2 ), iteration k = 1 produces reached[(3, t2 )] = 1 and nextf rontier = {(3, t2 )}. In the next iteration k = 2, the only forward neighbor of (3, t2 ) is (3, t3 ), so reached[(3, t3 )] = 2 and nextf rontier = {(3, t3 )}. The algorithm terminates after k = 3 after verifying that (3, t3 ) has no forward neighbors. The preceding example illustrates the fact that G[1] plays no part in the BFS traversal of Gn starting from (1, t2 ). In general, all G[t] with time stamps t < t0 for a starting node (v, t0 ) are irrelevant to the BFS traversal. Hence without loss of generality we may assume that BFS is always computed with a root at time t1 , the earliest time stamp in Gn . Theorem 1 (Correctness of the evolving graph BFS). Let Gn be an evolving graph and (v1 , t1 ) be an active node of Gn . Then Algorithm 1 discovers every active node that is reachable from the root (v1 , t1 ), and reached[(v, t)] is the distance from (v1 , t1 ) to (v, t). Proof: Let’s first consider the case when Gn is directed. [t] Define the set of temporal nodes ṼL = {(v1 , t)|(v1 , v2 ) ∈ E [t] }, which consists of the active nodes at time t which [t] participate on the left side of an edge. Similarly, ṼR = {(v2 , t)|(v1 , v2 ) ∈ E [t] } contains the corresponding active [t] [t] nodes on the right side of an edge. Then Ṽ [t] S = ṼL ∪ ṼR [t] is the set of active nodes at time t, and V = t Ṽ is the set of all active nodes in Gn . 1 k=1 1 1 2 3 2 3 3 t1 t2 1 k=2 t3 1 1 2 3 2 3 t2 1 1 2 3 t1 t3 1 2 3 2 3 t1 k=3 2 2 3 t2 Algorithm 1: Breadth-first search (BFS) on an evolving graph Gn starting from a root (v1 , t1 ). The return value, reached, is a dictionary mapping all reachable temporal notes from the root to their distances from the root. At the end of each iteration k, the f rontier set contains all temporal nodes of distance k from the root. 1 function BFS(Gn , (v1 , t1 )) 2 reached[(v1 , t1 )] = 0 3 f rontier = {(v1 , t1 )} 4 k=1 5 while f rontier 6= ∅ 6 nextf rontier = ∅ 7 for (v, t) ∈ f rontier 8 for (v 0 , t0 ) ∈forwardneighbors((v, t)) 9 if (v 0 , t0 ) ∈ / reached 10 reached[(v 0 , t0 )] = k 11 nextf rontier = nextf rontier ∪ {(v 0 , t0 )} 12 end 13 end 14 end 15 f rontier = nextf rontier 16 k =k+1 17 end 18 return reached 19 end t3 Figure 3. Breadth-first search (BFS) on the evolving graph shown in Figure 1 starting from the root (1, t2 ) at iteration k = 1, 2, 3. Note that the time t1 does not participate in the BFS. Black circles indicate the active nodes forming the f rontier and nextf rontier sets in Algorithm 1, connected by the dotted black lines. Similarly, define the set of causal edges E 0 = {(us , vt )|us = (u, s) ∈ V, vt = (v, t) ∈ V, v = u, s < t}, which consists of temporal nodes that connect active nodes sharing the same node at different times. Each edge in E 0 is then in 1-1 correspondence with a temporal path of length 2, h(v, s), (v, t)i. Define also the set of static edges at time t, Ẽ [t] = {(e, t)|e ∈ E [t] }, which are simply the edge sets in Gn with time labels, and the S set of static edges Ẽ, being simply the union over all times, t Ẽ [t] . Then E = Ẽ ∪E 0 is the set of all edges representing all allowed temporal paths of length 2. The node set V and edge set E now define a static directed graph G = (V, E) that is in 1-1 correspondence with the evolving graph Gn . The node set V of G is in 1-1 correspondence with active nodes of Gn while the edge set E is in 1-1 correspondence with all temporal paths of length 2 on Gn . We now establish a similar 1-1 correspondence of forward neighbors of an active node with a subset of G. By induction, all new nodes populated into the key set of reached at iteration k are of distance k from the root. By definition, the forward neighbors of some active node (v, t) ∈ Gn are active nodes of either the form (v, t0 ) for some t0 > t or (u, t) for some u 6= v. In other words, they are connected either by a causal edge or a static edge. Clearly, the former are elements of E 0 ⊆ E while the latter are elements of Ẽ ⊆ E. Thus each forward neighbor of an active node (v, t) ∈ Gn is in 1-1 correspondence with a node in V that is a neighbor of vt ∈ V . When Gn is undirected, every edge in Ẽ [t] can be [t] represented by two edges in G: from an active node in ṼL [t] to an active node in ṼR and the reverse. Every edge in E 0 is in 1-1 correspondence with an edge in G by causality. Therefore, the forward neighbors of an active node is in 1-1 correspondence with a subset of G and the analysis above follows. The correctness of BFS on the evolving graph Gn now follows from the correctness of BFS on the static graph G, since we have also established a 1-1 correspondence for every intermediate quantity in Algorithm 1. As presented, the BFS over evolving graphs makes no assumptions about how the evolving graph Gn is represented. Suppose it is represented by a collection of adjacency lists, one for each active node in Gn . Then we have that the asymptotic complexity of BFS on Gn is the same as that for BFS on G, using the 1-1 construction of G from Gn . Theorem 2 (Computational complexity of the evolving graph BFS). Let Gn be an evolving graph represented using adjacency lists, (v1 , t1 ) be an active node of Gn , and G = (V, E) be the static graph constructed from Gn using the 1-1 correspondences defined in the proof of Theorem 1. Then the asymptotic computational complexity of Algorithm 1 is O(|E| + |V |). Proof: Any edge in any edge set of Gn can be accessed in constant time in random access memory. By construction, BFS on Gn is in 1-1 correspondence with BFS on the static graph G. The number of operations of BFS on G is O(|E|+ |V |), and so the result follows. Note that in the theorems in this section construct an equivalent static graph G corresponding to the evolving graph Gn . However, G contains more edges than the union of all the static parts of Gn , as we also add causal edges E 0 . To our knowledge, our formulation of the BFS represents the first attempt to include these edges explicitly in the treatment of evolving graphs. III. F ORMULATING THE E VOLVING G RAPH BFS WITH L INEAR A LGEBRA A. The importance of causal edges For each static graph G[t] = (V [t] , E [t] ) that constitutes the evolving graph Gn , define its corresponding V [t] × V [t] one-sided adjacency matrix with elements ( 1 if (i, j) ∈ E [t] , [t] Aij = (1) 0 otherwise. We can then represent Gn using a sequence of adjacency matrices An = hA[1] , A[2] , . . . , An] i. The example in Figure 1 can be represented as *0 1 0 0 0 1 0 0 0+ 0 0 0 0 0 , 0 0 0 0 0 0 , 0 0 0 0 0 1 . 0 For a static graph G with adjacency matrix A, (Ak )ij counts the number of paths of length k between node i and node j. Naı̈vely, one might want to generalize this result to evolving graphs by postulating that the (i, j)th entry of the discrete path sum X S [tn ] = A[t1 ] A[tn ] + A[t1 ] A[t] A[tn ] + · · · t1 ≤t≤tn + X t1 ≤t≤t0 ≤···≤tn 0 A[t1 ] A[t] A[t ] · · · A[tn ] (2) counts the number of temporal paths from (i, t1 ) to (j, tn ). However, this postulate is incorrect. In the example of Figure 1,   (S [t3 ] )13 = A[t1 ] A[t2 ] A[t3 ] + A[t1 ] A[t3 ] =1 13 even though there are clearly two temporal paths from (1, t1 ) to (3, t3 ) as shown in Figure 2. The first term in the sum S [t3 ] vanishes since A[t1 ] A[t2 ] = 0. Furthermore, the vanishing of S [t2 ] = A[t1 ] A[t2 ] itself reflects the absence of any temporal path from t1 to t2 that goes through at least one edge at t1 . However, h(1, t1 ), (1, t2 ), (3, t2 )i (3) is a clearly a valid temporal path as shown in Figure 2 which cannot be expressed by a product of adjacency matrices. Sums S [t] of the form (2) produce an incorrect count of temporal paths because they do not capture temporal paths with causal edges, i.e. subpaths of the form h(v, s), (v, t)i, s < t. One might attempt to amend the sums S [t] in (2) by redefining the adjacency matrices to include ones along the diagonal, hence allowing paths containing the sequence h(i, t1 ), (i, t2 )i. However, the resulting sum is still incorrect, as it counts paths with subsequences h(3, t1 ), (3, t2 )i and are hence not temporal paths. Instead, the temporal path (3) is counted by the matrix product M [t1 ,t2 ] A[t2 ] , where   1 0 0 M [t1 ,t2 ] = 0 0 0 . (4) 0 0 0 M [t1 ,t2 ] describes the forward time propagation of temporal nodes that are active at both times t1 and t2 , i.e. it counts temporal paths that contain subsequences h(i, t1 ), (i, t2 )i, and both (i, t1 ) and (i, t2 ) are active nodes. The simple example of Figure 1 demonstrates why sums over products of adjacency matrices of the form (2) do not count temporal paths correctly: they neglect the combinatorics associated with the causal edge set E 0 . In the next section, we show how to account for these causal edges by introducing a new matrix–vector product . B. Defining forward neighbors algebraically The algebraic representation of evolving graphs presented in Section III-A allows us to exploit a graphical interpretation of matrix–vector products involving the adjacency matrix [11]. If A is the adjacency matrix of a (static) graph G and ek is the kth elementary unit vector, then the nonzero entries of AT ek have indices that are neighbors of k. The algebraic formulation of BFS on evolving graphs follows similarly, but requires a new kind of matrix–vector product, , defined by ( b if AT b 6= 0 or Ab 6= 0, T A b= 0 otherwise. The condition AT b 6= 0 ensures that the product is nonzero [t] in components involving left active nodes ∪t ṼL , and the condition Ab 6= 0 is the analogue for right active nodes [t] ∪t ṼR . The forward neighbors of a temporal node (k, t1 ) in An can then be determined from the indices and time stamps of the nonzero elements in the sequence (A[1] )T ek , (A[2] )T ek , . . . (A[n] )T ek . (5) The nonzero entries of the first vector represent forward neighbors that are on the same time stamp t1 , whereas nonzero entries of the other vectors represent forward neighbors that are advanced in time but remain on the same node k. The quantity (5) therefore encodes a BFS tree of depth 2, as its nonzero entries are labeled by all temporal nodes of distance 1 from (k, t1 ). Referring back to the example of Figure 1, the forward neighbors of node (1, t1 ) can be computed by          + *0 0 0 1 0 0 0 1 0 0 0 1 1 0 0 0 0, 0 0 0 0 1 0 0 0 0, 0 0 0 0 *  0 = 1 , 0 0 0 0 1 0 0    + 0 1 0 , 0 0 0 From this computation, we can deduce that (2, t1 ) and (1, t2 ) are the forward neighbors of (1, t1 ). C. Evolving graphs as a blocked adjacency matrix The proof of Theorem 1 provides a construction for representing an evolving graph Gn by a static graph G with nodes corresponding to active nodes of Gn . It turns out that the block structure of G is useful for understanding the nature of the operation. Consider the second iteration of BFS on Gn with root (k, t1 ), which requires computing the sequences (A[1] )T c1 , (A[2] )T c1 (6a) (A[2] )T c2 , . . . , (A[n] )T c2 (6b) ... (6c) (A ) cn (1, t1 ) (1, t2 ) (2, t1 ) c1 , . . . , (A[n] )T [n] T The adjacency matrix blocks A[t] encode the static edge set Ẽ, whereas the off-diagonal blocks M [ti ,tj ] together encode the causal edge set E 0 , which capture temporal paths with subsequences of the form h(v, ti ), (v, tj )i. Then Mn is the adjacency matrix of the graph (∪t V [t] , E), which is the graph G together with all the inactive nodes. From the definition, Mn has nonzero entries only in rows and columns that correspond to active nodes V , and so retaining only these rows and columns corresponding to V produces the adjacency matrix An of G = (V, E). The off-diagonal blocks M [ti ,tj ] provide an explicit matrix representation for the product in that (M [ti ,tj ] )T b = [ti ] T (A ) b. An example of such an off-diagonal block was already provided in (4). These off-diagonal blocks represent traversal between active notes with the same node space labels but are still separated by time, and are essential for the correct enumeration of temporal paths. The upper triangular structure of Mn (and hence An ) reflects the causal nature of temporal paths in that they cannot go backward in time. The BFS algorithm presented above can therefore be interpreted as computing the sequence of matrix–vector products b, ATn b, (ATn )2 b, ..., formed by applying successive monomials of ATn to the block vector bT = [bT , 0, · · · , 0] where bT encodes the root in the space of active nodes Ṽ [t1 ] . (6d) where c1 = (A[1] )T ek and ci = (A[i] )T ek for i > 1. Summing resultant vectors that share the same time stamp, we obtain vectors whose nonzero elements have indexes labeled by the forward neighbors of the nodes computed at step 1. Compare this with the matrix  [t ]  A 1 M [t1 ,t2 ] ... M [t1 ,tn ]  0 A[t2 ] ... M [t2 ,tn ]   Mn =    ... [tn ] 0 0 ... A where M [ti ,tj ] is the matrix whose rows are labeled by V [ti ] and columns are labeled by V [tj ] , and whose entries are ( 1 if (u, v) ∈ E 0 , [ti ,tj ] Muv = 0 otherwise. (3, t1 ) (1, t3 ) (2, t2 ) (3, t2 ) (2, t3 ) (3, t3 ) Figure 4. Static graphs corresponding to the evolving graph example of Figure 1. The green nodes are active nodes while the red nodes are inactive nodes. The black lines are edges in the static edge set Ẽ and are encoded algebraically in the diagonal blocks A[t] of the adjacency matrix A3 or M3 . The dotted lines are edges in the causal edge set E 0 and are encoded algebraically in the off-diagonal blocks M [ti ,tj ] . The static graph G constructed in the proof of Theorem 1 is formed by retaining all the edges shown and only the active nodes, and has the adjacency matrix A3 . The graph containing all the edges and temporal nodes shown has adjacency matrix M3 . For the example of Figure 1, we have V = {(1,t1 ), (2,t1 ), (1,t2 ), (3,t2 ), (2,t3 ), (3,t3 )}, Ẽ = {((1,t1 ), (2,t1 )), ((1,t2 ), (3,t2 )), ((2,t3 ), (3,t3 ))}, E 0 = {((1,t1 ), (1,t2 )), ((2,t2 ), (2,t3 )), ((3,t2 ), (3,t3 ))}. In the order specified for V , the adjacency matrix of G is then  0 0  0 A3 =  0  0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0  0 0  0  1  1 0 Starting from the vector b = e1 , the sequence of iterates is then           0 0 0 0 1          0 0 1 0 + *        0  0 1 0 0 0  , , , , ,... . 0 0 1 0 0           0 0 1 0 0 0 2 0 0 0 We see that (ATn )2 encodes all the products in (6a)-(6d), including both the ordinary matrix–vector product and the product. Furthermore, (AT3 )3 b correctly counts the two allowed temporal paths from (1, t1 ) to (3, t3 ), and that the 0 off-diagonal structure encoded in E 0 and the M [t,t ] blocks are critical to obtaining the correct count. Finally, we note that some results regarding the BFS on evolving graphs can be derived easily using properties of the block adjacency matrix An . For example, we can prove a simple lemma that the block adjacency matrix An is nilpotent whenever all the subgraphs G[t] of Gn are acyclic. Lemma 1 (Acyclicity implies nilpotence). Let Gn = hG[ti ] ini=1 be an evolving directed graph and let all the directed graphs G[t] be acyclic. Then An is nilpotent. Proof: Recall from the definition of the matrix An that it is block upper triangular, reflecting causality. Since each directed graph G[t] is acyclic, its corresponding adjacency matrix A[t] is strictly upper triangular. As a result, An must be upper triangular. Furthermore, none of the graphs G[t] can have any selfedges, i.e. edges of the form (u, u), and so all diagonal entries of A[t] must be zero. Therefore all the diagonal entries of An by construction must be zero also. We have now proven that An is an upper triangular matrix whose diagonal entries are all zero. Therefore, An is nilpotent. Lemma 1 also holds for acyclic undirected graphs so long as the corresponding adjacency matrix representation is encoded in an asymmetric fashion akin to (1). The blocked matrix structure of the adjacency matrices presented here provide interesting relationships between their matrix properties and the algorithmic properties of BFS, made possible because of the reformulation of BFS as repeated power iterations of the adjacency matrix in Algorithm 2. Note, however, that these matrices need never be instantiated for practical computations. Rather, since Algorithm 2 only requires the matrix–vector product involving the adjacency matrix, the formulation of Algorithm 1 provides an efficient way to exploit the block structure of An . The operation provides an efficient way to compute the action of the off-diagonal products. Representing the diagonal blocks A[t] as sparse matrices further reduces the cost of BFS by exploiting latent sparsity in graphs that show up in practical applications. D. The algebraic formulation of BFS on evolving graphs The blocked matrix–vector products introduced in the previous section allows us to write down an elegant algebraic formulation of BFS on evolving graphs, as presented in Algorithm 2. Algorithm 2: An algebraic formulation of BFS on evolving graphs. Given An , the adjacency matrix representation of Gn and (v1 , t1 ), a node of Gn , returns reached as defined in Algorithm 1. The function nonzeros(v) returns the nonzero indices of the vector v, and the function map(b) maps a block vector’s indices to their corresponding active nodes. 1 function ABFS(An , (v1 , t1 )) 2 Form ATn from An . 3 b v1 = 1 4 k=1 5 reached[(v1 , t1 )] = 0 6 while nonzeros(b) 6= ∅ 7 b = ATn b 8 for k ∈ nonzeros(b) 9 if activeNodes(k) ∈ reached 10 bk = 0 11 end 12 end 13 for node ∈activeNodes(b) 14 reached[node] = k 15 end 16 k =k+1 17 end 18 return reached 19 end Theorem 3. Algorithm 2 terminates. Proof: First, we prove that the BFS terminates in the case of acyclic evolving graphs. Recall from Lemma 1 that An is nilpotent, i.e. there exists some positive integer k for which Akn = 0. Hence, after iteration k, b is assigned the value Akn b = 0. Therefore, Algorithm 2 must terminate after iteration k. For evolving graphs with cycles, lines 9-11 of Algorithm 2 enforce that the BFS visits each active node at most once. Since the kth block of b is zeroed out if an active node has already been visited, the subgraph traversed in the BFS cannot have cycles. Thus all that is required is the previous result that the BFS on an acyclic graph terminates. Theorem 4. Algorithm 1 and Algorithm 2 are equivalent. Proof: The initialization steps are trivially equivalent. At the beginning of iteration k, the block vector b represents the frontier nodes encoding the f rontier set of Algorithm 1. The matrix–vector product ATn b encodes the forward neighbors of all the frontier nodes. Subsequently, active nodes that have already been visited in previous iterations are zeroed out of the new b. E. Computational complexity analysis of the algebraic BFS The complexity of the algebraic BFS of Algorithm 2 is significantly more complicated that that of Algorithm 1. While the latter uses the usual adjacency list representation for graphs, the computational cost of the former depends critically on the actual representation of the matrices. Furthermore, the average case analysis is complicated by the expected fill-in of the vector b, which influences the cost of the matrix-vector product on line 7 and the expected number of iterations of the while loop beginning on line 6. While a full complexity analysis is beyond the scope of this paper, it is straightforward to present worst-case results for dense and compressed sparse column (CSC) matrices. Lemma 2 (Number of iterations). In the worst case, the number of iterations in the while loop of Algorithm 2 is k = O(|E|). Proof: In the worst case, the BFS must traverse every active node, and only one new active node is discovered in each iteration. The number of active nodes is bounded above by the cardinality of the full edge set, |E|. The average case analysis for the number of iterations is considerably more complicated and is beyond the scope of this paper. Theorem 5 (Dense matrices). Suppose An is represented as a dense matrix. Then the computational complexity of Algorithm 2 is O(k|V |2 ), which in the worst case is O(|E||V |2 ). Proof: Since An is a |V |×|V | matrix, the matrix-vector product An b takes O(|V |2 ) operations to compute. Thus the cost of Algorithm 2 is O(k|V |2 ) = O(|E||V |2 ) in the worst case. It is clear that practical implementations of the BFS should never construct the full matrix An in memory. What happens if we use a sparse blocked representation? Theorem 6 (Block diagonal sparse matrices). Suppose An is represented by a collection of compressed sparse column matrices for each diagonal block A[t] . Then the computational complexity of Algorithm 2 is O(k(|Ẽ| + |V |)), which in the worst case is O(|E|(|Ẽ| + |V |)). Proof: The gaxpy operation for CSC matrices costs 2nnz flops, where nnz is the number of stored values in the matrix. The cost of each diagonal subblock calculation A[t] bt is therefore O(|E [t] |), since A[t] by construction has nonzero entries only when a static edge exists. The off-diagonal products M [t,t0] bt0 can be computed in O(|V [t] | + |E [t] |) time for all t0 ≥ t since it can be implemented by the · operation, which constructs either a zero vector or keeps the same vector. The cost of checking the condition (A[t] )T bt0 6= 0 is O(|E t |) in the worst case since all that is required is to check whether or not each column of A is empty. Similarly, checking the condition A[t] bt0 6= 0 reduces to checking if each row of A is empty, and thus is of cost O(|V t |). Thus, the cost of multiplying one block row of AT (for some time t) with b is O(|V [t] | + |E [t] |). Summing over all times yields the desired result. We can see that even implementing the BFS algebraically using CSC matrices is insufficient to reduce the running time to linear, which can be achieved for the adjacency list representation in Algorithm 1. This result strongly suggests that additional work is needed to produce true algorithmic equivalence at the computational level. IV. I MPLEMENTATION IN J ULIA To study evolving graphs and experiment with various graph types, we have developed EvolvingGraphs.jl [13], a software package for the creation, manipulation, and study of evolving graphs written in Julia [14]. It is freely available online at https://github.com/weijianzhang/EvolvingGraphs.jl and available with the MIT “Expat” license. The package contains an implementation of the evolving graph BFS of Algorithm 1. IntEvolvingGraph, a data type in EvolvingGraphs.jl, represents an evolving graph as adjacency lists. We now present some simple timing data to show that our implementation of Algorithm 1 is indeed linear scaling in computational cost. We generate a sequence of random (directed) IntEvolvingGraphs with 105 active nodes and 10 time stamps. The first IntEvolvingGraph in the sequence has about 108 static edges. We consecutively add new random static edges to this IntEvolvingGraph. For example, the second random IntEvolvingGraph in the sequence has about 1.5 × 108 static edges and the third has 1.8 × 108 static edges. Note that in this experiment, we do not have direct control over the full edge set E, only the static edge set Ẽ. When we add new static edges, new causal edges may be added as well (if the corresponding temporal nodes were not active before). However, the number of newly introduced causal edges for each active node is bounded by the number of time stamps, so it suffices to demonstrate linear scaling in |Ẽ|. Figure 5 shows the plots of number of edges against the computation time for running Algorithm 1 in Julia. All experiments are conducted on a single core of a Linux system with 1TB of RAM and 80 cores of Intel(R) Xeon(R) E7-8850s running at 2.00 GHz clock speed. The results show Algorithm 1 can be computed in linear time, which agrees with the result of Theorem 2. 50 45 Time (s) 40 35 30 25 20 15 1 2 3 4 |Ẽ| 5 ×108 Figure 5. Experimental run time of Algorithm 1 on a collection of random evolving graphs with 105 active nodes and 10 time stamps, showing linear scaling in |Ẽ|. The horizontal axis shows the number of edges (|Ẽ|, including only the static edges) of each evolving graph, while the vertical axis shows the corresponding computation time. V. A PPLICATION TO C ITATION N ETWORKS Evolving graphs have found many applications to analyzing networks that change over time [9], [10]. In this section, we focus specifically on citation networks, and show that evolving graph formalism presented above can be used to capture the dynamical structure of citation networks. Consider the evolving graph Gn = hG[t] it such that G[t] has node set corresponding to authors active at time t and directed edge set E [t] 3 (i, j) representing a citation of author j by author i in a publication at time t. Then given an author a at time t1 , the evolving graph BFS described above can compute T (a, t1 ), the set of all the authors that have been influenced by a’s work at time t1 . Define also a community to be a group of researchers that have been influenced by the same authors. For example, given a paper published by a at time t, we can determine a’s community by searching backward in time to find T −1 (a, t), the authors that influenced a at time t, and then searching forward to find T (l1 , t1 ) ∪ T (l1 , t2 ) ∪ · · · ∪ T (lk , tk ), where (l1 , t1 ), (l2 , t2 ), . . . , (lk , tk ) are the leaves of T −1 (a, t). The backward search in time follows straightforwardly from the forward time traversal presented above simply by reversing the time labels, e.g. by the transformation t → −t. We are currently investigating the use of our evolving graph BFS on citation networks. VI. C ONCLUSION The correct generalization of BFS to evolving graphs necessitates a careful enumeration of temporal paths. The structure associated with causal edges E 0 turns out to be of vital importance, and cannot be capture simply by products of successive adjacency matrices, which by construction can only capture the topologies of the static edges Ẽ. Only by considering both causal edges and static edges can we show that BFS over any evolving graph Gn computes the correct result for our notion of distance. The new concepts of activeness, temporal paths, and causal edges make possible a correct implementation of BFS to evolving graphs and we expect that these ideas will continue to provide powerful new insights into how similar graphical algorithms may be generalized correctly. Furthermore, we show that BFS on evolving graphs admits an algebraic formulation that easily provides nontrivial results, such as termination of the algorithm. However, our current understanding tells us that the BFS over evolving graphs is most efficiently computed in the adjacency list representation, thus never forming explicit matrix-vector products. Further work is needed to elucidate more efficient formulations of the algebraic BFS for evolving graphs. ACKNOWLEDGMENTS We thank N. J. Higham and V. S̆ego (Manchester) for helpful suggestions. W. Z. thanks the School of Mathematics at U. Manchester for research & travel funding and A. Edelman for arranging for a fruitful visit to MIT. R EFERENCES [1] P. Flajolet, D. E. Knuth, and B. Pittel, “The first cycles in an evolving graph,” Annals of Discrete Mathematics, vol. 43, pp. 167–215, 1989. [Online]. Available: http://www. sciencedirect.com/science/article/pii/S0167506008705752 [2] B. Bahmani, R. Kumar, M. Mahdian, and E. Upfal, “PageRank on an evolving graph,” in Proceedings of the 18th ACM SIGKDD international conference on Knowledge discovery and data mining. ACM, 2012, pp. 24–32. [Online]. Available: http://dl.acm.org/citation.cfm?id=2339539 [3] P. Borgnat, E. Fleury, J.-L. Guillaume, C. Magnien, C. Robardet, and A. Scherrer, “Evolving networks,” NATO ASI on Mining Massive Data Sets for Security, NATO Science for Peace and Security Series D: Information and Communication Security, pp. 198–204, 2008. [4] J. Tang, M. Musolesi, C. Mascolo, and V. Latora, “Temporal distance metrics for social network analysis,” in Proceedings of the 2nd ACM workshop on Online social networks. ACM, 2009, pp. 31–36. [Online]. Available: http://dl.acm.org/citation.cfm?id=1592674 [5] M. Kivelä, A. Arenas, M. Barthelemy, J. P. Gleeson, Y. Moreno, and M. A. Porter, “Multilayer networks,” Journal of Complex Networks, vol. 2, no. 3, pp. 203–271, 2014. [Online]. Available: http://comnet.oxfordjournals.org/content/ 2/3/203.short [6] V. Nicosia, J. Tang, C. Mascolo, M. Musolesi, G. Russo, and V. Latora, “Graph metrics for temporal networks,” in Temporal Networks. Springer, 2013, pp. 15–40. [Online]. Available: http://link.springer.com/chapter/10.1007/ 978-3-642-36461-7 2 [7] J. Tang, S. Scellato, M. Musolesi, C. Mascolo, and V. Latora, “Small-world behavior in time-varying graphs,” Physical Review E, vol. 81, no. 5, p. 055101(R), 2010. [Online]. Available: http://journals.aps.org/pre/abstract/ 10.1103/PhysRevE.81.055101 [8] J. Tang, M. Musolesi, C. Mascolo, V. Latora, and V. Nicosia, “Analysing information flows and key mediators through temporal centrality metrics,” in Proceedings of the 3rd Workshop on Social Network Systems. ACM, 2010, p. 3. [Online]. Available: http://dl.acm.org/citation.cfm?id= 1852661 [9] P. Grindrod, M. C. Parsons, D. J. Higham, and E. Estrada, “Communicability across evolving networks,” Physical Review E, vol. 83, no. 4, p. 046120, 2011. [Online]. Available: http://journals.aps.org/pre/abstract/10. 1103/PhysRevE.83.046120 [10] P. Grindrod and D. J. Higham, “A matrix iteration for dynamic network summaries,” SIAM Review, vol. 55, no. 1, pp. 118–128, 2013. [Online]. Available: http: //epubs.siam.org/doi/abs/10.1137/110855715 [11] J. Kepner and J. Gilbert, Eds., Graph Algorithms in the Language of Linear Algebra, ser. Software, Environments, Tools. Philadelphia, PA: SIAM, 2011. [Online]. Available: http://epubs.siam.org/doi/abs/10.1137/1.9780898719918 [12] S. Even and G. Even, Graph algorithms, 2nd ed. Cambridge, UK: Cambridge University Press, 2012. [13] W. Zhang, “Dynamic network analysis in Julia,” Manchester Institute for Mathematical Sciences, The University of Manchester, UK, Tech. Rep. 2015.83, Sep. 2015. [Online]. Available: http://eprints.ma.man.ac.uk/2376/ [14] J. Bezanson, S. Karpinski, V. B. Shah, and A. Edelman, “Julia: A fast dynamic language for technical computing,” ArXiv preprint 1209.5145, 2012. [Online]. Available: http://arxiv.org/abs/1209.5145
8cs.DS
Minimal and canonical images arXiv:1703.00197v2 [math.GR] 4 Dec 2017 Christopher Jefferson, Eliza Jonauskyte, Markus Pfeiffer University of St Andrews School of Computer Science North Haugh St Andrews KY16 9SX Scotland Rebecca Waldecker Martin-Luther-Universität Halle-Wittenberg Institut für Mathematik 06099 Halle Germany Abstract We describe a family of new algorithms for finding the canonical image of a set of points under the action of a permutation group. This family of algorithms makes use of the orbit structure of the group, and a chain of subgroups of the group, to efficiently reduce the amount of search that must be performed to find a canonical image. We present a formal proof of correctness of our algorithms and describe experiments on different permutation groups that compare our algorithms with the previous state of the art. Keywords: Minimal Images, Canonical Images, Computation, Group Email addresses: [email protected] (Christopher Jefferson), [email protected] (Eliza Jonauskyte), [email protected] (Markus Pfeiffer), [email protected] (Rebecca Waldecker) URL: http://caj.host.cs.st-andrews.ac.uk/ (Christopher Jefferson), https://www.morphism.de/~markusp/ (Markus Pfeiffer), http://conway1.mathematik.uni-halle.de/~waldecker/index-english.html (Rebecca Waldecker) Preprint submitted to Journal of Algebra December 5, 2017 Theory, Permutation Groups. 1. Background Many combinatorial and group theoretical problems [14, 4, 2] are equivalent to finding, given a group G that acts on a finite set Ω and a subset X Ď Ω, a partition of X into subsets that are in the same orbit of G. We can solve such problems by taking two elements of X and searching for an element of G that maps one to the other. However, this requires a possible Op|X|2q checks, if all elements of X are in different orbits. Given a group G acting on a set Ω, a canonical labelling function maps each element of Ω to a distinguished element of its orbit under G. Using a canonical labelling function we can check if two members of Ω are in the same orbit by applying the canonical labelling function to both and checking if the results are equal. More importantly, we can solve the problem of partitioning X into orbit-equivalent subsets by performing Op|X|q canonical image calculations. Once we have the canonical image of each element, we can organize the canonical images into equivalence classes by sorting in Op|X|logp|X|qq comparisons, or expected Op|X|q time by placing them into a hash table. This is because checking if two elements are in the same equivalence class is equivalent to checking if their canonical images are equal. The canonical image problem has a long history. Jeffrey Leon [9] discusses three types of problems on permutation groups – subgroup-type problems (finding the intersection of several groups), coset-type problems (deciding whether or not the intersection of a series of cosets is empty, and if not, finding their intersection) and canonical-representative-type problems. He claims to have an algorithm to efficiently solve the canonical-representative problem, but does not discuss it further. His comments have inspired mathematicians and computer scientists to work on questions related to minimal images and canonical images. One of the most well-studied canonical-image problems is the canonical graph problem. Current practical systems derive from partition refinement techniques, which were first practically used for graph automorphisms by McKay [11] in the Nauty system. There have been a series of improvements to 2 this technique, including Saucy [1], Bliss [8] and Traces [12]. A comparison of these systems can be found in [12]. We cannot, however, directly apply the existing work for graph isomorphism to finding canonical images in arbitrary groups. The reason is that McKay’s Graph Isomorphism algorithm only considers finding the canonical image of a graph under the action of the full symmetric group on the set of vertices. Many applications require finding canonical images under the action of subgroups of the full symmetric group. One example of a canonical labelling function is, given a total ordering on X, to map each value of X to the smallest element in its orbit under G. This Minimal image problem has been treated by Linton in [10]. Pech and Reichard [13] apply techniques similar to Linton’s to enumerate orbit representatives of subsets of Ω under the action of a permutation group on Ω. Linton gives a practical algorithm for finding the smallest image of a set under the action of a given permutation group. Our new algorithm, inspired by Linton’s work, is designed to find canonical images: we extend and generalize Linton’s technique using a new orbit-based counting technique. In this paper we first introduce some notation and explain the concepts that go into the algorithm, then we prove the necessary results and finish with experiments that demonstrate how this new algorithm is superior to the previously published techniques. 2. Minimal and Canonical Images Throughout this paper, Ω will be a finite set, G a subgroup of SympΩq, and Ω will be ordered by some (not necessarily total) order ď. If α P Ω, then we denote the orbit of α under G by αG . Simlarly, if A Ď Ω and g P G, then Ag :“ tag | a P Au and AG :“ tAg | g P Gu. In this paper, we want to efficiently solve the problem of deciding, given two subsets A, B Ď Ω, if A P B G . We do this by defining a canonical image: Definition 2.1. A canonical labelling function C for the action of G on a set Ω is a function C : PpΩq Ñ PpΩq such that, for all A Ď Ω, it is true that • CpAq P AG , and 3 • CpAg q “ CpAq for all g P G. In this situation we call CpAq the canonical image of A Ď Ω (with respect to G in this particular action). Further, we say that gA P G is a canonizing element for A if and only if AgA “ CpAq. A canonical image can be seen as a well-defined representative of a Gorbit on Ω with respect to the defined action. While in this paper we will only consider the action of G on a set of subsets of Ω, canonical images are defined similarly for any group and action. In practice we want to be able to find canonical images effectively and efficiently. In some situations we are interested in computing the canonizing element, which might not be uniquely determined. Our algorithms will always produce a canonizing element as a byproduct of search. We choose to make this explicit here to make the exposition clearer. Minimal images are a special type of canonical image. Remark 2.2. Suppose that ď is a partial order on Ω such that any two elements in the same orbit can be compared by ď. Let Minď denote the function that, for all ω P Ω, maps ω to the smallest element in its orbit. Then Minď is a canonical labelling function. In practical applications we are interested in more structure, namely in structures that G can act on naturally via the action on a given set Ω. These structures include subsets of Ω, graphs with vertex set Ω, sets of maps with domain or range Ω, and so on. In this paper, our main application will be finding canonical images when acting on a set of subsets of Ω. Definition 2.3. Suppose that ď is a total order of Ω. Then we introduce a total order ď on PpΩq as follows: We say that A is less than B and write A ď B if and only if A contains an element a such that a R B and a ď b for all b P BzA. Example 2.4. Let Ω :“ t1, 2, 3, 4, 5, 6, 7u with the natural order and let A :“ t1, 3, 4u, B :“ t3, 5, 7u, C :“ t3, 6, 7u, D :“ t1, 3u and E :“ t2u. 4 Now A ď B, because 1 P A, 1 R B and 1 is smaller than all the elements in B, in particular those not in A. Moreover A ď C for the same reason. Furthermore, B ď C, because 5 P B, 5 R C, and if we look at CzB, then this only contains the element 6 and 5 is smaller. Next we consider A and D. As 4 P AzD and DzA “ ∅, we see that A ď D. Also A ď E because 1 P AzE and 1 is smaller than all elements in EzA “ E. Finally E ď B because 2 P EzB “ E and 2 is smaller than all elements in BzE “ B. Remark 2.5. The example illustrates that this new order introduced above reduces to lexicographical order for sets of the same size. But for sets of different sizes, it might seem counter-intuitive. Our reason for choosing this different ordering is that it satisfies the following property: If n P N and if A and B are sets of integers, then A X t1, . . . , nu ă B X t1, . . . , nu implies A ă B. This means that, when building A and B incrementally, we know the order of A and B as soon as we find the first integer that is contained in one of the sets but not in the other. This is not true for lexicographic ordering of sets, as t1u ă t1, 2u but t1, 1000u ą t1, 2, 1000u. If G is a subgroup of SympΩq and ω P Ω, then we denote by Gω the point stabilizer of ω in G. For distinct elements x, y P Ω, we denote by GxÞÑy the set of all elements of G that map x to y. This set may be empty. We remark that the above information is readily available from a stabilizer chain for the group G, which can be calculated efficiently. For further details we refer the reader to [5]. We now introduce some notation and then prove a basic result about cosets. Definition 2.6. Let G be a permutation group acting on a totally ordered set pΩ, ďq, and let ď denote the induced ordering as explained in Definition 2.3. Let H be a subgroup of G and S Ď Ω. Then we define the minimal image of S under H to be the smallest element in the set tS h | h P Hu with respect to ď. In order to simplify notation, we will from now on write ď for the induced order and then we write MinpH, S, ďq for the minimal image of S under H. 5 Lemma 2.7. Let G be a permutation group acting on a totally ordered set pΩ, ďq, and let H be a subgroup of G and S Ď Ω. Then the following hold for all x, y P Ω: (i) For all σ P HxÞÑy it is true that σ ¨ Hy “ HxÞÑy “ Hx ¨ σ. (ii) If σ P HxÞÑy , then Minpσ ¨ H, S, ďq “ MinpH, S σ , ďq. Proof. If σ P HxÞÑy , then multiplication by σ from the right or left is a bijection on H, respectively. For all α P Hx we have that α ¨ σ maps x to y and for all β P Hy we see that σ ¨ β also maps x to y. This implies the first statement. For (ii) we just look at the definition: Minpσ¨H, S, ďq denotes the smallest element in the set tS σ¨h | h P Hu and MinpH, S σ , ďq denotes the smallest element in the set tpS σ qh | h P Hu, which is the same set. 2.1. Worked Example We will find minimal, and later canonical, images using similar techniques to Linton in [10]. This algorithm splits the problem into small sub-problems, by splitting a group into the cosets of a point stabilizer. We will begin by demonstrating this general technique with a worked example. Example 2.8. In the following example we will look at Ω “ t1, 2, 3, 4, 5, 6u, the subgroup G “ xp14qp23qp56q, p126qy ď S6 , and S “ t2, 3, 5u. We intend to find the minimal image MinpG, S, ďq, where the ordering on subsets of Ω is the induced ordering from ď on Ω as explained in Definition 2.3. We split our problem into pieces by looking at cosets of G1 “ xp3, 4, 5qy. The minimal image of S under G will be realized by an element contained in (at least) one of the cosets of G1 , so if we find the minimal image of S under elements in each coset, and then take the minimum of these, we will find the global minimum. Lemma 2.7 gives that, for all g P G, it holds that Minpg ¨ G1 , S, ďq “ MinpG1 , S g , ďq, and so we can change our problem from looking for the minimal image of S with respect to cosets of G1 to looking at images of S g under elements of G1 where g runs over a set of coset representatives of G1 in G. For each i P t1, . . . , 6u we need an element gi P GiÞÑ1 (where any exist), so that we can then consider S gi . 6 We choose the elements id, p162q, p146523q, p14qp23qp56q, p142365q and p126q and obtain six images of S: t2, 3, 5u, t1, 3, 5u, t3, 1, 2u, t3, 2, 6u, t3, 6, 1u, t6, 3, 5u. As we are looking at the images of these sets under G1 , we know that all images of a set containing 1 will contain 1, and all images of a set not containing 1 will not contain 1. From Definition 2.3, all subsets of t1, . . . , 6u containing 1 are smaller than all subsets not containing 1. This means that we can filter our list down to t1, 3, 5u, t3, 1, 2u and t3, 6, 1u. Furthermore, G1 fixes 2, so by the same argument we can filter our list of sets not containing 2, leaving only t3, 1, 2u. The minimal image of this under G1 is clearly t3, 1, 2u (in this particular case we could of course also have stopped as soon as we saw t3, 1, 2u, as this is the smallest possible set of size 3). Now, let us consider what would happen if the ordering of the integers was reversed, so we are looking for MinpG, S, ěq, again with the induced ordering. For the same reasons as above, we begin by calculating G6 “ xp3, 5, 4qy and by finding images of S for some element from each coset of G6 in G. An example of six images is t1, 5, 4u, t6, 5, 3u, t4, 6, 1u, t5, 1, 2u, t3, 2, 6u, t2, 3, 5u. We can ignore anything that does not contain 6, so we are left with: t6, 5, 3u, t4, 6, 1u, t3, 2, 6u. As 5 is not fixed by G6 , we can not reason about the presence or absence of 5 in our sets. There is an image of every set that contains 5, and there are even two distinct images of t6, 5, 3u that contain 5. Therefore we must continue our search by considering G6,5 . Application of an element from each coset of G6,5 to S generates nine sets, of which four contain the element 5. In fact we reach t6, 3, 5u, t6, 5, 4u from the set t6, 4, 3u, we reach t5, 6, 1u from the set t4, 6, 1u and we reach t5, 2, 6u from the set t3, 2, 6u. From these we extract the minimal image t6, 5, 4u. In this example, different orderings of t1, 2, 3, 4, 5, 6u produced different sized searches, with different numbers of levels of search required. 7 3. Minimal Images under alternative orderings of Ω As was demonstrated in Example 2.8, the choice of ordering of the set our group acts on influences the size of the search for a minimal image. In this section we will show how to create orderings of Ω that, on average, reduce the size of search for a minimal image. We begin by showing how large a difference different orderings can make. We do this by proving that, for any choice ď of ordering of Ω, group G and any input set S, we can construct a minimal image problem that is as hard as finding MinpG, S, ďq, but where reversing the ordering on Ω makes the problem trivial. We make this more precise: Given n P N, a permutation group G on t1, . . . , nu with some ordering ď and a subset S Ď t1, . . . , nu, we construct a group H and a set T such that MinpG, S, ďq “ MinpH, T, ďq X t1..nu, which shows that finding MinpH, T, ďq is at least as hard as finding MinpG, S, ďq. On the other hand, we will show that MinpH, T, ěq “ T and that this can be deduced without search. This is done in Lemma 3.5. An example along the way will illustrate the construction. Definition 3.1. We fix n P N and we let k P N. For all j P N we define qpjq P N (where q stands for “quotient”) and rpjq P t1, . . . , nu (where r stands for “remainder”) such that j “ qpjq ¨ n ` rpjq. Let ext : G Ñ Sk¨n be the following map: For all g P G and all j P t1, . . . , k ¨ nu, the element extpgq maps j to qpjq ¨ n ` rpjqg . Example 3.2. Let n “ 4 and G “ S4 . Then we extend the action of G to the set t1, . . . , 12u using the map ext. For example g “ p134q maps 4 to 1. We write 12 “ 2 ¨ 4 ` 4 and then it follows that extpgq maps 12 to 2 ¨ 4 ` 4g “ 8 ` 1 “ 9. In fact g acts simultaneously on the three tuples p1, 2, 3, 4q, p5, 6, 7, 8q and p9, 10, 11, 12q as it does on p1, 2, 3, 4q. Definition 3.3. Fixing n, k P N and a subgroup G of Sn , and using the map ext defined above, we say that H is the extension of G on t1, . . . , k ¨ nu if and only if H “ textpgq | g P Gu is the image of G under the map ext. 8 The extension H of G on a set t1, . . . , k ¨ nu is a subset of Sk¨n . We show now that even more is true: Lemma 3.4. Let n, k P N and G ď Sn . Then the extension of G onto t1, . . . , k ¨ nu is a subgroup of Sk¨n that is isomorphic to G. Proof. Let H :“ extpGq be the image of G under the map ext and let a, b P G be distinct. Then let j P t1, . . . , nu be such that j a ‰ j b . By definition extpaq and extpbq map j in the same way that a and b do, so we see that extpaq ‰ extpbq. Hence the map ext is injective. Therefore ext : G Ñ H is bijective. Next we let a, b P G be arbitrary and we let j P t1, . . . , k ¨ nu. Then the composition ab is mapped to extpabq, which maps j to qpjq ¨ n ` rpjqab . Now rpjqab “ prpjqa qb and therefore the composition extpaq extpbq P Sk¨n maps j to pqpjq ¨ n ` rpjqa qextpbq “ qpjq ¨ n ` prpjqa qb . This is because rpjqa P t1, . . . , nu. Hence extpabq “ extpaq extpbq. That implies ext is a group homomorphism and hence that G and its image are isomorphic. Lemma 3.5. Let n P N and G ď Sn . Let H denote the extension of G on t1, . . . , pn ` 1q ¨ nu and let S Ď t1, . . . , nu. Let T :“ S Y tl ¨ n ` l | l P t1..nuu, let ď denote the natural ordering of the integers, and let ě denote its reverse. For simplicity we use the same symbols for the ordering induced on PpΩq, respectively. Then • MinpH, T, ďq X t1, . . . , nu “ MinpG, S, ďq. • MinpH, T, ěq “ T . Proof. Let h P H. Then by construction h stabilizes the partition r1, . . . , n|n ` 1, . . . , 2n| . . . |n ¨ n, . . . , pn ` 1q ¨ ns. Moreover, for all i P t1, . . . , nu and g P G we have that ig “ iextpgq and so Lemma 3.4 implies that 9 MinpG, S, ďq “ mintS g | g P Gu X t1, . . . , nu ď “ mintS extpgq | g P Gu X t1, . . . , nu ď “ mintS h | h P Hu X t1, . . . , nu ď “ MinpH, T, ďq X t1, . . . , nu. This proves the first statement. For the second statement we notice that pn ` 1q ¨ n is now the smallest element of T , and it cannot be mapped to anything smaller, because it also is the smallest element available. So if we let h P H be such that T h “ MinpH, T, ěq, then h fixes the point npn ` 1q. By definition of the extension, it follows that h also fixes k ¨ n for all k P t1 . . . nu. The next point of T under the ordering is n2 ´ 1. It cannot be mapped by h to n2 , because n2 is already fixed, hence h has to fix n2 ´ 1, too. Arguing as above it follows that all points are fixed by h, thus in particular MinpH, T, ěq “ T , as stated. Furthermore, any algorithm that stepped through the elements of T in the order we describe would find this smallest element without having to perform a branching search, as at each step there is no choice on which element of T is the next smallest. 3.1. Comparing Minimal Images Cheaply We describe some important aspects of Linton’s algorithm for computing the minimal image of a subset of Ω. Definition 3.6. Suppose that pΩ, ďq is a totally ordered set and that G ď SympΩq. Then OrbpGq denotes the list of orbits of G on Ω. This list of orbits is ordered with respect to the smallest element in each orbit under ď. A G-orbit will be called a singleton if and only if it has size 1. If S Ď Ω, then we say that a G-orbit is empty in S if and only if it is disjoint from S as a set, and we say that it is full in S if and only if it is completely contained in S. Example 3.7. Let Ω :“ t1, . . . , 8u, with the natural ordering on the integers, let G :“ xp1, 4q, p2, 8q, p5, 6q, p7, 8qy and let S :“ t1, 3, 5, 6u. 10 Then OrbpGq “ rt1, 4u, t2, 7, 8u, t3u, t5, 6us because this list contains all the G-orbits and they are ordered by the smallest element in each orbit, namely 1 in the first, 2 in the second, 3 in the third, which is a singleton, and 5 in the last (because 4 is already in an earlier orbit). The orbits t3u and t5, 6u are full in S, the orbit t2, 7, 8u is empty in S and t1, 4u is neither. Lemma 3.8. Suppose that pΩ, ďq is a totally ordered finite set and that G ď SympΩq. If MinpG, S, ďq “ MinpG, T, ďq and ω P Ω, then ω G is empty in S if and only if it is empty in T , and ω G is full in S if and only if it is full in T . Proof. Let ω P Ω and suppose that ω G is empty in S. As ω G is closed under the action of G, and S0 :“ MinpG, S, ďq is an image of S under the action of G, we see that ω G is empty in S0 and hence in T0 :“ MinpG, T, ďq. Thus ω G is empty in T , which is an image of T under the action of G. The same arguments work vice versa. Next we suppose that ω G is full in S. Then it is full in S0 “ T0 and hence in T , and the same way we see the converse. We can now prove Theorem 3.9, which provides the main technique used to reduce search. This allows us to prove that the minimal image of some set S will be smaller than or equal to the minimal image of a set T , without explicitly calculating the minimal image of either S or T . Theorem 3.9. Suppose that G is a permutation group on a totally ordered finite set pΩ, ďq and that S and T are two subsets of Ω where |S| “ |T |. Suppose further that o is the first orbit in the list OrbpGq that is neither full in both S and T nor empty in both S and T . If o is empty in T , but not in S, then MinpG, S, ďq is strictly smaller than MinpG, T, ďq. Proof. Suppose that o is empty in T , but not in S. Then o is empty in T0 :“ MinpG, T, ďq, but not in S0 :“ MinpG, S, ďq, and in particular T0 and S0 are distinct, as we have seen in Lemma 3.8. Let α denote the minimum of the orbit o with respect to ď and let ω P Ω. If ω ă α, then ω R o, so the the orbit ω G appears in the list OrbpGq before o does. Then the choice of o implies that one of the following two cases holds: 11 (i) ω G is full in both S and T . In particular, for all g P G we have that ω P Sg X T g. (ii) ω G is empty in both S and T . In particular, for all g P G we have that ω G X S g “ ∅ and ω G X T g “ ∅. If S0 contains an element ω P Ω such that ω ă α, then Case (i) above holds and ω P T0 . So S0 X tω 1 P Ω | ω 1 ă αu “ T0 X tω 1 P Ω | ω ă αu. Since S0 and T0 are distinct, they must differ amongst the elements at least as large as α and, since they have the same cardinality, the smallest such element determines which of S0 and T0 is smaller. We recall that o “ αG is empty in T and non-empty in S, so there exists some g P G such that α P S g . Then S g “ S0 and α R T0 , so S0 is strictly smaller that T0 . Here is an example how to use Theorem 3.9. Example 3.10. Let Ω :“ t1, . . . , 10u with natural ordering, and let G :“ xp12q, p45q, p56q, p89qy. We consider the sets S :“ t3, 6, 7u and T :“ t3, 7, 9u and we want to calculate the smallest of MinpG, Sq and MinpG, T q. Hence, we want to know which one is smaller as cheaply as possible, to avoid superfluous calculations. We first list the orbits of G: rt1, 2u, t3u, t4, 5, 6u, t7u, t8, 9u, t10us. Going through the orbits as listed, we see that the first one is empty in S and T , the second one is full in S and T , and the third one gives a difference for the first time. It is empty in T , but not in S, so Theorem 3.9 yields that the minimal image of S is strictly smaller than that of T . 3.2. Static Orderings of Ω In this section we look at which total ordering of Ω should be used to minimize the amount of time taken to find minimal images of subsets of Ω. Given a group G we will choose an ordering on Ω such that orbits with few elements appear as early as possible. In particular, singleton orbits should appear first. This is justified by the fact that singleton orbits are always either full or empty. Also, we would expect smaller orbits to be more likely to be empty or full than larger orbits. This means that small orbits placed early in the 12 ordering of Ω are more likely to lead to Theorem 3.9 being applicable, leading to a reduction in search. Algorithm 1 heuristically chooses a new ordering for an ordered set Ω, only depending on the group G, under the assumption that the algorithm that computes minimal images will pick a point from a smallest non-singleton orbit to branch on. This will not always be true – in practice Linton’s algorithm branches on the first orbit which contains some point contained in one of the current candidates for minimal image. However, we will show that in Section 5 that Algorithm 1 produces substantially smaller, and therefore faster, searches in practice. It is not necessary in Line 8 of Algorithm 1 to choose the smallest element of Points, choosing an arbitrary element will, on average, perform just as well. By fixing which point is chosen, we ensure that independent implementations will produce the same ordering and therefore the same canonical image. Algorithm 1 FixedMinOrbit 1: procedure MinOrbitOrder(Ω, G) 2: Remain :“ Ω 3: Order :“ rs 4: H :“ G 5: while |Remain| ą 0 do ˇ ( ˇ o P OrbpHq, o X Remain ‰ H 6: OrbSize :“ Min |o| ˇ ( 7: Points :“ o ˇ o P OrbpHq, |o| “ OrbSize, o X Remain ‰ H 8: MinPoint :“ Min tx | o P Points, x P ou 9: Remain :“ RemainztMinPointu 10: AddpOrder, MinPointq 11: H :“ GMinPoint 12: return Order We will also consider one simple modification of Algorithm 1, namely FixedMaxOrbit (which is the same as FixedMinOrbit) with line 6 changed to pick orbits of maximum size. If our intuition about Theorem 3.9 is correct, then MaxOrbit should almost always produce a larger search than MinOrbit or a random ordering of Ω. 13 3.3. Implementing alternative orderings of Ω Having calculated an alternative Order using FixedMinOrbit or FixedMaxOrbit, we could create a version of MinimalImage which accepted an explicit ordering. However, rather than editing the algorithm, we can instead perform a pre-processing step, using Lemma 3.11. Lemma 3.11. Consider a group G that acts on Ω “ t1, . . . , nu and a permutation σ P SympΩq. We define an ordering ďσ on t1, . . . , nu, where for all x, y P Ω we have that x ďσ y if and only if xσ ď y σ . For the induced orderings ď and ďσ on subsets of Ω as in Definition 2.3 it holds that X ďσ Y ô X σ ď Y σ for all subsets X and Y of Ω, and hence (simplifying notation) ´1 MinpG, S, ďσ q “ MinpGσ , S σ , ďqσ . Proof. Following Definition 2.3, X ďσ Y if and only if there is an x P X such that x R Y and for all y P Y zX it holds that x ďσ y. By definition of ďσ , this is the case whenever xσ ď y σ , and since xσ P X σ and for all y σ in Y σ zX σ it holds that xσ ď y σ , it follows that X σ ď Y σ . σ Consider the map ϕσ : S G Ñ pS σ qG that maps sets X P S G to X σ P σ pS σ qG . This map is bijective, and by the above it respects the ordering, so the second claim follows. Lemma 3.11 gives an efficient method to calculate minimal images under different orderings without having to alter the underlying algorithm. The most expensive part of this algorithm is calculating Gσ , but this is still very efficiently implemented in systems such as GAP, and also can be cached so it only has to be calculated once for a given G and σ. 4. Dynamic Ordering of Ω In Section 3.2, we looked at methods for choosing an ordering for Ω that allows a minimal image algorithm to search more quickly. There is a major 14 limitation to this technique – it does not make use of the sets whose canonical image we wish to find. In this section, instead of producing an ordering ahead of time, we will incrementally define the ordering of Ω as the algorithm progresses. At each stage we will consider exactly which extension of our partially constructed ordering will lead to the smallest increase in the number of sets we must consider. We are not free to choose our ordering arbitrarily as we must still map two sets in the same orbit of G to the same canonical image. However, we can use different orderings for sets that are in different orbits of G. Firstly, we will explain how we build the orderings that our algorithm uses. 4.1. Orderings When building canonical images, we build orderings as the algorithm progresses. We represent these partially built orderings as ordered partitions. Definition 4.1. Let k P N and let P “ rX1 , . . . , Xk s be an ordered partition of PpΩq. Then, given two subsets S and T of Ω, we write S ăP T if and only if the cell that contains S occurs before the cell that contains T in P . We say that P is G-invariant if and only if for all i P t1, . . . , ku and g P G it holds that S P Xi if and only if S g P Xi . A refinement of an ordered partition rX1 , . . . , Xk s is an ordered partition rY1,1, Y1,2 , . . . , Yk,ls where l P N and such that, for all i P t1, . . . , ku and j P t1, . . . , lu, we have that Yi,j Ď Xi . A completion of an ordered partition X “ rX1 , . . . , Xk s is a refinement where every cell is of size one. Given an ordering for Ω, the standard completion of an ordered partition X orders the members of each cell of X using the ordering on sets from Definition 2.3. In our algorithm we need a completion of an ordered partition, but the exact completion is unimportant – it is only important that, given an ordered partition X, we always return the same completion. For this reason we define the standard completion of an ordered partition. 15 Example 4.2. Let G :“ xp12qy ď S3 and Ω :“ t1, 2, 3u. Moreover let P :“ rtu, t1u, t2u, t1, 3u, t2, 3u | t3u, t1, 2u, t1, 2, 3us be an ordered partition of PpΩq. The orbits of G on Ω are t1, 2u and t3u. In particular all elements of G stabilize the partition P . The ordered partition Q :“ rt1, 3u, t2u | tu, t1u, t2, 3u | t3u, t1, 2u, t1, 2, 3us is a refinement of P that is not G-invariant. To see this, we let g :“ p12q P G. We have that t1, 3u is in the first cell of Q, but t1, 3ug “ t2, 3u is not in the first cell. In Example 4.2 we only considered a very small group, because the size of PpΩq is 2|Ω| . In practice we will not explicitly create ordered partitions of PpΩq, but instead store a compact description of them from which we can deduce the cell that any particular set is in. In this paper, we will consider two methods of building and refining ordered partitions. We first define the orbit count of a set, which we will use when building refiners. Definition 4.3. Let G be a group acting on an ordered set Ω, and S Ď Ω. Define the orbit count of S in G, denoted OrbcountpG, Sq as follows: Given the list OrbpGq of orbits of G on Ω sorted by the their smallest member, the list OrbcountpG, Sq contains the size of the intersection |o X S| in place of o P OrbpGq. We will see the practical use of Orbcount in Lemma 5.1. Lemma 4.4. Suppose that pΩ, ďq is a totally ordered finite set and that G ď SympΩq. Suppose further that S, T Ď Ω and that there is some g P G such that S g “ T . Then OrbcountpG, Sq “ OrbcountpG, T q. Proof. Let o P OrbpGq and g P G with S g “ T . Then og “ o and α P po X Sq if and only if αg P po X Sqg , if and only if αg P pog X S g q “ po X T q. Definition 4.5. Let P be an ordered partition of PpΩq. • If α P Ω, then the point refinement of P by α is the ordered partition Q defined in the following way: Each cell Xi of P is split into two cells, 16 namely the cell tS | S P Xi , α P Su, and the cell tS | S P Xi , α R Su. If one of these sets is empty, then Xi is not split. • If G ď SympΩq and C “ OrbcountpG, T q for some set T Ď Ω, then the orbit refinement of P by C is the ordered partition Q defined as follows: Each cell Xi of P is split into two cells, namely tS | S P Xi , OrbcountpG, Sq “ Cu, and tS | S P Xi , OrbcountpG, Sq ‰ Cu. If one of these sets is empty, Xi is not split. 4.2. Algorithm We will now present our algorithm. First, we give a technical definition which will be used in proving the correctness of our algorithm. Definition 4.6. For all n P N we define Ln to be the set of lists of length n whose entries are non-empty subsets of Ω. If X P Ln , then as a convention we write X1 , . . . , Xn for the entries of the list X. If X P Ln and H ď G ď Sn is such that |G : H| “ k P N and Q “ tq1 , . . . , qk u is a set of coset representatives of H in G, then we define X Q to be the list whose first k entries are X1q1 , . . . , X1qk , followed by X2q1 , . . . , X2qk until the last k entries are Xnq1 , . . . , Xnqk . We note that X Q P Ln¨k . Let X, Y P Ln . We say that X and Y are G-equivalent if and only if there exist a permutation σ of t1, . . . , nu and group elements g1 , . . . , gn P G such that, for all i P t1, . . . , nu, it holds that Yi “ Xigσi . We now prove a series of three lemmas about coset representatives, which form the basis for the correctness proof of our algorithm. They are used to perform the recursive step, moving from a group to a subgroup. Lemma 4.7. Suppose that G is a permutation group on a set Ω, that H is a subgroup of G of index k P N and that T is a set of left coset representatives of H in G. Then the following are true: (i) |T | “ k. (ii) If T “ tt1 , . . . , tk u and g P G and if, for all i P t1, . . . , ku, we define qi :“ gti , then Q :“ tq1 , . . . , qk u is also a set of coset representatives of H in G. In particular there is a bijection from Q to any set of left coset representatives of H in G. 17 Proof. By definition the index of H in G is the number of (left or right) cosets of H in G. For the second statement we let i, j P t1, . . . , ku be such that qi H “ qj H, ´1 ´1 hence gti H “ gtj H. Then t´1 j ti “ tj g gti P H and hence ti H “ tj H. Hence i “ j because ti and tj are from a set of coset representatives. Lemma 4.8. Suppose that G is a permutation group on a set Ω and that S, T Ď Ω are such that the lists rSs and rT s are G-equivalent. Let H be a subgroup of G of index k P N and let P “ tp1 , . . . , pk u and Q :“ tq1 , . . . , qk u be sets of left coset representatives of H in G. Then rSsP and rT sQ are H-equivalent. Proof. As rSs and rT s are G-equivalent, we know that there exists a group element g P G such that S g “ T . We fix g, for all i P t1, . . . , ku we let ti :“ gqi and we consider the set T :“ tti | i P t1, . . . , kuu. Then T is also a set of left coset representatives of H in G, by Lemma 4.7. As P is also a set of left coset representatives, we know that T and P have the same size, so there is a bijection from P to T . This can be expressed in the following way: There is a permutation σ P Sk such that, for all i P t1, .., ku, it is true that piσ H “ ti H. That means there is a unique hi P H such that piσ hi “ ti . Let now Si :“ S pi and Ti :“ T qi for i P t1, . . . , ku, then Ti “ T qi “ pS g qqi “ S ti “ S piσ hi “ pS piσ qhi “ pSiσ qhi , hence rSsP and rT sQ are H-equivalent. Lemma 4.9. Suppose that G is a permutation group on a set Ω, that n P N and that X, Y P Ln are G-equivalent. Let H be a subgroup of G of index k P N and let P “ tp1 , . . . , pk u and Q :“ tq1 , . . . , qk u be sets of left coset representatives of H in G. Then X P and Y Q are H-equivalent. Proof. As X and Y are G-equivalent, we know that there exist a permutation σ P Sn and g1 , . . . , gn P G such that Yi “ Xigσi for all i P t1, . . . , nu. We fix this permutation σ. 18 If i P t1, . . . , nu, then rXiσ s and rYi s satisfy the hypothesis of Lemma 4.8, so it follows that rXiσ sP and rYi sQ are H-equivalent. So we find a permutation αi P Sk and group elements hi1 , . . . , hik P H p α such that pXiσj i qhij “ Yiqi for all j P t1, . . . , ku. Using σ and α1 , . . . , αk we define a permutation γ on 1, . . . , n ¨ k. First we express l P t1, . . . , n ¨ ku uniquely as l “ cl ¨ k ` rl where cl P t0, . . . , n ´ 1u and rl P t1, . . . , ku and we define αcl `1 lγ :“ pcl ` 1qσ ¨ k ` rl . This is well-defined because of the ranges of cl and rl and it is a permutation because of the uniqueness of the expression and because σ and α1 , . . . , αn are permutations. Then, for each l P t1, . . . , n ¨ ku, expressed as l “ cl ¨ k ` rl as we did p rl q rl above, we set h :“ hcl `1,rl , Xl1 :“ Xcl `1 and Yl1 :“ Ycl `1 . P 1 1 Q 1 1 Then X “ rX1, . . . , Xn¨k s and Y “ rY1 , . . . , Yn¨k s. If we set p :“ pracl `1 and q :“ qrl , then we have, for all l “ cl ¨ k ` rl , that l Xl1hγ “ pXpcp l `1qσ qh “ ppXcσl `1 qp qh “ Ycql `1 “ Yl1 . This is H-equivalence. We can now describe the algorithm we use to compute canonical images, and prove that it works correctly. Definition 4.10. Suppose that Ω is a finite set, that G is a permutation group on Ω, that L P Lk and that P is an ordered partition on PpΩq. • An Ω-selector is a function S such that – SpΩ, G, L, P q “ ω P Ω, where |ω G | ą 1; – SpΩ, G, L, P q “ SpΩ, G, M, P q whenever L and M from Lk are G-equivalent. • An Ordering refiner is a function O such that for all G-invariant partitions P of PpΩq – OpΩ, G, L, P q “ P 1 , where P 1 is a G-invariant refinement of P ; 19 – OpΩ, G, L, P q “ OpΩ, G, M, P q whenever L and M from Lk are G-equivalent. An ordering refiner cannot return a total ordering, unless G acts trivially, because the partial ordering cannot distinguish between values that are contained in the same orbit of G. Our method for finding canonical images is outlined in Algorithm 2. It recursively searches for the minimal image of a collection of lists, refining the ordering that is used as search progresses. Algorithm 2 CanImage Require: S is an Ω-selector, O is an ordering refiner 1: procedure CanImageRecurse(Ω, G, L, P ) 2: if |G| “ 1 then 3: P 1 :“ Standard completion of P 4: return Smallest member of L under P 1 5: H :“ GSpΩ,G,L,P q 6: Q :“ coset representatives of H in G 7: P 1 :“ OpΩ, H, LQ , P q 8: L1 :“ rS | S P LQ , ET P LQ .T ăP 1 Ss 9: return CanImageRecurse(Ω, H, L1 , P 1 ) procedure CanImageBase(Ω, InputG, InputS) 2: return CanImageRecurse(Ω, InputG, rInputSs, rPpΩqs) Theorem 4.11. Suppose that Ω is a finite set, that G is a permutation group on Ω, and that X Ď Ω. Then CanImageBasepΩ, G, Xq P X G . Proof. In every step of Algorithm 2 the list of considered sets is a list of elements of X G . Theorem 4.12. Let Ω be a finite set and G a permutation group on Ω. Let X, Y P Lk be G-equivalent, and let P be a G-invariant ordered partition of PpΩq. Then CanImagepΩ, G, X, P q “ CanImagepΩ, G, Y, P q. 20 Proof. We proceed by induction on the size of G. The base case is |G| “ 1. As X and Y are G-equivalent, X and Y contain the same sets, possibly in a different order. For a given P and Ω, there is only one standard completion of P that gives a complete ordering on PpΩq, and so X and Y have the same smallest element under the standard completion of P and so the claim follows. Consider now any non-trivial group G, and suppose for our induction hypothesis that the claim holds for all groups H where |H| ă |G|. Definition 4.10 and the fact that S is an Ω-selector imply that H “ GSpΩ,G,X,P q “ GSpΩ,G,Y,P q. Moreover, H is a proper subgroup of G. We take two sets Q1 and Q2 of coset representatives of H in G, which are not necessarily equal. Since O is an ordering refiner, it holds that P 1 “ OpΩ, H, X, P q “ OpΩ, H, Y, P q By Lemma 4.9, X Q1 and Y Q2 are H-equivalent, and by definition P 1 is Ginvariant. If we identify the cell Pi1 of P 1 that contains the smallest element of X Q1 , then L1X contains those elements of X Q1 that are in Pi1. Each of these elements is H-equivalent to an element of Y Q2 , and therefore L1X is H-equivalent to L1Y . Then the induction hypothesis yields that CanImagepΩ, H, X 1 , P q “ CanImagepΩ, G, Y 1 , P q, so the claim follows by induction. We see from Theorem 4.11 and 4.12 that CanImagepΩ, G, X, P q “ CanImagepΩ, G, Y, P q if and only if Y P X G . We note that Algorithm 2 can easily be adapted to return an element g of G such that X g “ CanImagepΩ, G, X, P q. This happens by attaching to each set, when it is created, the permutation that maps it to the original input S. We omit this addition for readability. 21 5. Experiments In this section, we will compare how well our new algorithms perform in comparison with the MinImage function of Linton’s. All of our experiments are performed in GAP [3] using code available in the Images package [7]. Where our algorithm requires it, we use the implementation of partition backtracking provided in the Ferret package [6]. We consider a selection of different canonical image algorithms and we analyze how they perform compared to each other, and compared to the traditional minimal image algorithm of Linton’s, which we will refer to as MinImage. The first three algorithms that we consider come from Section 3. They produce, given a group G on a set Ω, an ordering of Ω. This ordering is then used in MinImage. (i) FixedMinOrbit uses results from Section 3 to calculate an alternative ordering of Ω, choosing small orbits first. (ii) FixedMaxOrbit works similarly to FixedMinOrbit, choosing large orbits first. We also consider algorithms that dynamically choose which value to branch on as search progresses. We will use the following lemma for the proof of correctness for all our orderings. Lemma 5.1. Let Ω be a finite set, G a permutation group on Ω, and P an ordered partition of PpΩq. Let L P Ln , and Count “ rOrbcountpG, Sq | S P Ls. • Any function that accepts pΩ, G, L, P q and returns some ω P Ω with |ω G | ą 1 that is invariant under reordering the elements of Count, is an Ω-selector. • Any function that accepts pΩ, G, L, P q and returns either P or the point refinement of P by some ω G for ω P Ω, and is invariant under permutation of the elements of Count, is an ordering refiner. 22 • Any function that accepts pΩ, G, L, P q and returns either P or the orbit refiner of P by some member of Count and is invariant under permutation of the elements of Count, is an ordering refiner. Proof. The only thing we have to show is that, if L and M are G-equivalent, then any of the functions above yield the same result for inputs pΩ, G, L, P q and pΩ, G, M, P q. By Lemma 4.4, any G-equivalent lists L and M will produce the same list Count, up to reordering of elements, and hence the claim follows. Firstly we define a list of orderings. Each of these orderings chooses an orbit, or list of orbits, to branch on – we will then make an Ω-selector by choosing the smallest element in any of the orbits selected, to break ties (we could choose any point, as long as we picked it consistently). Each of these algorithms operates on a list L P Lk . In each case we look for an orbit, ignoring orbits of size one (as fixing a point that was already fixed leads to the same group). Firstly we will consider two algorithms that only consider the group, and not L: (i) MinOrbit Choose a point from a shortest non-trivial orbit that has a non-empty intersection with at least one element of L. (ii) MaxOrbit Choose a point from a longest non-trivial orbit that has a non-empty intersection with at least one element of L. We also consider four algorithms that consider both the group, and L. In the following, for an orbit o ř (i) RareOrbit minimises | s X o|, sPL ř (ii) CommonOrbit maximises | s X o|, sPL ř (iii) RareRatioOrbit minimises logp | s X o|q{|o|, sPL ř (iv) CommonRatioOrbit maximises logp | s X o|q{|o|. sPL The motivation for RareOrbit is that this is the branch which will lead to the smallest size of the next level of search – this exactly estimates the 23 size of the next level if our ordering refiner only fixed a point in orbit o. We therefore expect, conversely, CommonOrbit to perform badly and to produce very large searches. One limitation of RareOrbit is that it will favour smaller orbits – in general we want to minimize the size of the whole search. The idea here is that if we have two levels of search where we split on an orbit of size two, and each time create 10 times more sets is equivalent to splitting once on an orbit of size four, and creating 100 times more sets. RareRatioOrbit compensates for this. We expect that CommonRatioOrbit is the inverse of this, so we also expect it to perform badly. For each of these orderings, we use the ordering refiner that takes each fixed point of G in their order in Ω, and performs a point refinement by each recursively in turn. By repeated application of Lemma 4.4, this is a G-invariant ordering refiner. We also have a set of orderings which make use of orbit counting. To keep the number of experiments under control, we used the RareOrbit strategy in each case to choose which point to branch on next, and we also build an orbit refiner. Given an unordered list of orbit counts, (i) RareOrbitPlusMin chooses the lexicographically smallest one. (ii) RareOrbitPlusRare chooses the least frequently occurring orbit count list (using the lexicographically smallest to break ties). (iii) RareOrbitPlusCommon chooses the most frequently occurring orbit count list (using the lexicographically smallest to break ties). 5.1. Experiments In this section we perform a practical comparison of our algorithms, and the MinImage algorithm of Linton, for three different families of problems: grid groups, m-sets, and primitive groups. 5.2. Experimental Design We will consider three sets of benchmarks in our testing. In each experiment, given a permutation group that acts on t1, . . . , nu, we will run an 24 experiment with each of our orderings to find the canonical image of a set of X \ X \ X \ size n2 , n4 and n8 . We run our algorithms on a randomly chosen conjugate of each primitive group, to randomize the initial ordering of the integers the group is defined over. The same conjugate is used of each group in all experiments, and when choosing a random subset of size x from a set S, we always choose the same random subset. We use a timeout of five minutes for each experiment. We force GAP to build a stabilizer chain for each of our groups before we begin our algorithm, because this can in some cases take a long time. For each size of set and each ordering, we measure three things. The total number of problems solved, the total time taken to solve all problems, counting timeouts as 5 minutes, and the number of moved points of the largest group solved. Our experiments were all performed on an Intel(R) Xeon(R) CPU E5-2640 v4 running at 2.40GHz, with twenty cores. Each copy of GAP was allowed a maximum of 6GB of RAM. 5.2.1. Grid Groups In this experiment, we look for canonical images of sets in grid groups. Definition 5.2. Let n P N. The direct product Sn ˆ Sn acts on the set t1, . . . , nu ˆ t1, . . . , nu of pairs in the following way: For all pi, jq P t1, . . . , nu ˆ t1, . . . , nu and all pσ, τ q P Sn ˆ Sn we define pi, jqpσ,τ q :“ piσ , j τ q. The subgroup G ď Sympt1, . . . , nu ˆ t1, . . . , nuq defined by this action is called the n ˆ n grid group. We note that, while the construction of the grid group is done by starting with an n by n grid of points and permuting rows or columns independently of each other, we actually represent this group as a subgroup of Sn¨n , and we do not assume prior knowledge of the grid structure of the action. We ran experiments on the grid groups for grids of size 5 ˆ 5 to 100 ˆ 100. The results of this experiment are given in Table 1. The basic algorithm, MinImage, is only able to solve 22 problems within the timeout. FixedMinOrbit solves 43 problems, while being implemented 25 as a simple pre-processing step to MinImage. The dynamic MinOrbit is able to solve 55 problems, and the best orbit-based strategy, SingleMaxOrbit, solves 70 problems. However the advanced techniques, which filter by orbit lists, perform much better. Even ordering by the most common orbit list leads to solving over 185 problems, and the best strategy, RareOrbitPlusRare, solves 235 out of the total 288 problems. Furthermore, for these large groups, the algorithms are still performing very small searches: For example FixedMinOrbit, on its largest solved probX \ lem with size n2 sets and a grid of size 12 ˆ 12, generates 793, 124 search nodes, while RareOrbitPlusMin produces only 183, 579 search nodes on X \ its largest solved problem with n2 sets (65 ˆ 65). 5.2.2. M-Sets Linton [10] considers, given integers n and m, defining a permutation group on the set T of all subsets of size m of t1, . . . , nu under the action on T of Sn acting on the members of the m-sets. He then looks for minimal images of randomly chosen subsets of T of size k, under the standard lexicographic ordering on sets. We ran experiments for m “ 2 and n P t10, 15, . . . , 100u, for m “ 4 and n P t10, 15, . . . , 35u, for m “ 6 and n P t10, 15, 20u and finally m “ 8, n “ 10 as described in Section 5.2. We choose these 30 experiments as these were the problems that any of our techniques were able to solve in under 5 minutes. The results of our experiments are shown in Table 2. Similarly to our experiments on grid groups, we find that the standard MinImage algorithm is only able to solve a very small set of benchmarks. Some of the better algorithms, including FixedMinOrbit, are able to solve 9 problems. In particular, once again MinOrbit is not significantly better than FixedMinOrbit, although it is slightly faster on average over all problems. However, the orbit-based strategies do much better, solving all the problems which we set. In the case of sets that contain an eighth of all m-sets, the best technique is able to solve all problems any technique can solve, in under 5 minutes. The largest solved problem, which was instance n “ 35, m “ 4 for a set on an eighth of all m-sets, is solved in only 6, 594 search nodes by RareOrbitPlusMin, while the largest solved problem of MinImage, n “ 15, m “ 4 takes 631, 144 search nodes. 26 RareOrbitPlusRare RareOrbitPlusMin RareOrbitPlusCommon SingleMaxOrbit RareOrbit MinOrbit CommonRatioOrbit FixedMinOrbit FixedMinOrbit MinImage MinImage RareRatioOrbit MaxOrbit FixedMaxOrbit FixedMaxOrbit CommonOrbit Stab Search F F F F F F F T F F T F F F T F Xn\ Xn\ 2 # solved 56 54 30 11 8 8 7 8 8 4 4 3 3 3 3 3 largest 4,225 4,225 2,209 225 144 144 121 144 144 64 64 49 49 49 49 49 4 time # solved largest 12,549 88 8,464 13,207 89 9,604 19,306 65 5,476 24,671 27 961 24,763 17 625 24,739 16 400 24,990 15 400 24,796 13 361 24,786 13 361 25,819 8 144 25,822 7 144 26,126 5 81 26,123 5 81 26,120 5 81 26,113 5 81 26,131 5 81 Table 1: Finding canonical images in grid groups Xn\ 8 time # solved largest 10,474 91 9,216 10,546 90 9,025 15,408 90 9,216 25,795 52 3,136 27,213 34 4,096 27,735 31 1,521 28,255 29 1,296 28,619 22 841 28,573 21 841 30,039 10 196 29,962 10 196 30,379 8 144 30,373 8 144 30,374 8 144 30,381 8 144 30,396 8 144 time 13,663 13,484 14,009 23,532 25,979 26,706 27,322 28,841 28,859 31,851 31,829 32,804 32,771 32,725 32,450 32,826 RareOrbitPlusMin RareOrbitPlusRare RareOrbitPlusCommon MinOrbit RareOrbit FixedMinOrbit FixedMinOrbit CommonRatioOrbit MinImage MinImage SingleMaxOrbit FixedMaxOrbit RareRatioOrbit MaxOrbit FixedMaxOrbit CommonOrbit Stab Search F F F F F F T F F T F T F F F F Xn\ Xn\ 2 # solved 28 27 27 9 9 9 9 9 4 4 4 4 4 4 4 4 largest 27,405 12,650 12,650 1,365 1,365 1,365 1,365 1,365 210 210 210 210 210 210 210 210 Xn\ 4 time # solved 1,290 30 1,235 30 1,819 30 6,701 22 6,769 21 6,671 22 6,678 22 6,782 21 7,866 5 7,843 5 7,813 5 7,853 5 7,923 5 7,915 5 7,890 5 7,947 5 largest 52,360 52,360 52,360 6,435 6,435 6,435 6,435 6,435 210 210 210 210 210 210 210 210 Table 2: Finding canonical images in M-Set groups 8 time # solved 835 30 1,107 30 1,189 30 4,143 28 4,190 28 4,292 27 4,291 27 4,215 28 7,562 7 7,573 7 7,554 6 7,691 6 7,642 5 7,695 5 7,666 5 7,724 5 largest 52,360 52,360 52,360 27,405 27,405 12,650 12,650 27,405 1,365 1,365 1,365 210 210 210 210 210 time 251 322 335 1,203 1,276 1,765 1,766 1,348 7,033 7,037 7,325 7,569 7,500 7,500 7,500 7,500 5.2.3. Comparison to Graph Canonical Image A set of 2-sets can be viewed as an undirected graph, where the two sets represent the edges. The problem of finding the canonical image of this set of 2-sets is equivalent to the traditional problem of finding a canonical image of this graph. We can therefore perform a comparison between our technique and Nauty, for these problems. Nauty is able to a find canonical image for all our 2-set problems almost instantly. We investigated why Nauty was able to outperform us by such a large margin, and found three problems. We list the most important one first. • The central algorithm of Nauty makes use of properties of the form “vertices with i neighbors can only map to other vertices with i neighbors”. Our algorithm does not make use of this property, as it represents a much more complex condition when considered on m-sets. Further, while we could add a special case specifically for when the group we are considering is the symmetric group operating on m-sets, we would prefer to find a more general technique. • Our algorithm spends a large proportion of its time calculating stabilizer chains, and mapping sets through elements of the group. This is not required for the graphs. • Our algorithm is written in GAP rather than highly optimized C. The most important results to draw from this comparison is that our algorithms should not be viewed as a replacement for graph isomorphism algorithms. We are investigating how to close this performance gap, without special casing. 5.2.4. Primitive Groups In this experiment we look for canonical images of sets under the action of primitive groups which move between 2 and 1, 000 points. We remove the natural alternating and symmetric groups, as finding minimal and canonical images in these groups is trivial and can be easily special-cased. So we look at a total number of 5, 845 groups, each of which was successfully treated by at least one algorithm. 29 We perform the experiment as described in Section 5.2. The results are given in Table 3. All algorithms are able to solve a large number of problems. This is unsurprising as many primitive groups are quite small (for example the cyclic groups), so any technique is able to brute-force search many problems. HowX \ ever, we can still see that, for the hardest problems n2 , many algorithms outperform MinImage, and the techniques that use extra orbit-counting filtering solve 300 more problems, and they run much faster. X \ For the easiest set of problems, n8 , we see that the algorithm RareOrbitPlusMin, which usually performs best, solves slightly fewer problems. This is because there are a small number of groups where the extra filtering provides no search reduction, but still requires a small overhead in time. However, the total time taken is still much smaller, and the algorithm only fails to solve five problems. These five problems involve groups that are isomorphic to the affine general linear groups AGLp8, 2q, AGLp6, 3q and AGLp9, 2q, and the projective linear group PSLp9, 2q. This suggests that the linear groups may be a source of hard problems for canonical image algorithms in the future. 5.2.5. Experimental Conclusions Our experiments show that using FixedMinOrbit is almost always superior to MinImage. As implementing FixedMinOrbit requires a fairly small amount of code and time over MinImage, this suggests that any implementations of Linton’s algorithm should have FixedMinOrbit added, because this provides a substantial performance boost, for relatively little extra coding. Algorithms that dynamically order the underlying set, such as MinOrbit and RareOrbit provide only a small benefit over FixedMinOrbit. Algorithms which add orbit counting provide a much bigger gain, often allowing solving problems on groups many orders of magnitude larger than before, thereby greatly advancing the state of the art. 6. Conclusions We present a general framework and a new set of algorithms for finding the canonical image of a set under the action of a permutation group. Our 30 RareOrbitPlusMin RareOrbitPlusRare RareOrbitPlusCommon FixedMinOrbit FixedMinOrbit MinOrbit RareOrbit CommonRatioOrbit SingleMaxOrbit MinImage MinImage FixedMaxOrbit FixedMaxOrbit MaxOrbit RareRatioOrbit CommonOrbit Stab Search F F F T F F F F F T F F T F F F Xn\ 2 # solved 5,689 5,656 5,561 5,360 5,354 5,348 5,324 5,323 4,811 4,723 4,710 4,659 4,674 4,641 4,614 4,604 Xn\ 4 Xn\ 8 time # solved time # solved time 64,983 5,749 39,564 5,840 10,287 81,814 5,738 43,202 5,825 19,025 113,011 5,721 59,740 5,816 25,392 220,076 5,623 82,684 5,817 18,295 251,786 5,628 99,253 5,816 30,193 263,053 5,641 104,241 5,844 27,720 272,631 5,632 105,537 5,844 29,365 277,050 5,629 107,561 5,844 32,123 465,908 5,250 253,467 5,648 112,147 390,334 5,163 242,477 5,631 88,048 501,952 5,180 280,686 5,633 106,983 514,618 5,119 298,321 5,587 132,508 392,753 5,095 251,001 5,583 107,433 544,222 5,104 310,402 5,587 144,182 559,690 5,090 316,609 5,586 152,201 569,047 5,086 319,288 5,586 154,142 Table 3: Finding canonical images in Primitive groups experiments show that our new algorithms outperform the previous state of the art, often by orders of magnitude. Our basic framework runs on the concept of refiners and selectors and is not limited to finding only canonical images of subsets of Ω. In future work we will investigate families of refiners and selectors that allow finding canonical images for many other combinatorial objects. Acknowledgements. All authors thank the DFG (Wa 3089/6-1) and the EPSRC CCP CoDiMa (EP/M022641/1) for supporting this work. The first author would like to thank the Royal Society, and the EPSRC (EP/M003728/1). The third author would like to acknowledge support from the OpenDreamKit Horizon 2020 European Research Infrastructures Project (#676541). The first and third author thank the Algebra group at the Martin-Luther Universität Halle-Wittenberg for the hospitality and the inspiring environment. The fourth author wishes to thank the Computer Science Department of the University of St Andrews for its hospitality during numerous visits. References [1] P. T. Darga, K. A. Sakallah, and I. L. Markov. Faster symmetry discovery using sparsity of symmetries. In 2008 45th ACM/IEEE Design Automation Conference, pages 149–154, June 2008. [2] Andreas Distler, Chris Jefferson, Tom Kelsey, and Lars Kotthoff. The Semigroups of Order 10, pages 883–899. Springer Berlin Heidelberg, Berlin, Heidelberg, 2012. [3] The GAP Group. GAP – Groups, Algorithms, and Programming, Version 4.8.4, 2016. [4] Ian P Gent and Barbara M Smith. Symmetry breaking in constraint programming. In Proceedings of the 14th European conference on artificial intelligence, pages 599–603. IOS press, 2000. 32 [5] Derek F. Holt, Bettina Eick, and Eamonn A. O’Brien. Handbook of Computational Group Theory. Discrete Mathematics and its Applications. Chapman & Hall/CRC, Boca Raton, 2005. [6] Christopher Jefferson. Ferret - GAP Package, 2016. [7] Christopher Jefferson and Eliza Jonauskyte. Images - GAP Package, 2016. [8] Tommi Junttila and Petteri Kaski. Engineering an efficient canonical labeling tool for large and sparse graphs. In David Applegate, Gerth Stølting Brodal, Daniel Panario, and Robert Sedgewick, editors, Proceedings of the Ninth Workshop on Algorithm Engineering and Experiments and the Fourth Workshop on Analytic Algorithms and Combinatorics, pages 135–149. SIAM, 2007. [9] Jeffrey S. Leon. Permutation group algorithms based on partitions, I: Theory and algorithms. Journal of Symbolic Computation, 12(4):533– 583, 1991. [10] Steve Linton. Finding the smallest image of a set. In Proceedings of the 2004 International Symposium on Symbolic and Algebraic Computation, ISSAC ’04, pages 229–234, New York, NY, USA, 2004. ACM. [11] Brendan D. McKay. Practical graph isomorphism. Congr. Numer., (30):45–87, 1980. [12] Brendan D. McKay and Adolfo Piperno. Practical graph isomorphism, II. Journal of Symbolic Computation, 60:94–112, 2014. [13] Christian Pech and Sven Reichard. Enumerating Set Orbits, pages 137– 150. Springer Berlin Heidelberg, Berlin, Heidelberg, 2009. [14] Leonard H. Soicher. On the structure and classification of somas: Generalizations of mutually orthogonal latin squares. Electr. J. Comb., 6, 1999. 33
4math.GR
arXiv:1704.06654v1 [cs.AI] 21 Apr 2017 G OVERNING G OVERNANCE A F ORMAL F RAMEWORK FOR A NALYSING I NSTITUTIONAL D ESIGN AND E NACTMENT G OVERNANCE G OVERNING G OVERNANCE A F ORMAL F RAMEWORK FOR A NALYSING I NSTITUTIONAL D ESIGN AND E NACTMENT G OVERNANCE Proefschrift ter verkrijging van de graad van doctor aan de Technische Universiteit Delft, op gezag van de Rector Magnificus Prof. Ir. K.Ch.A.M. Luyben, voorzitter van het College voor Promoties, in het openbaar te verdedigen op donderdag 27 oktober 2016 om 10.00 uur door Thomas Christopher K ING Bachelor of Science in Computer Science from King’s College London, United Kingdom geboren te Londen, Verenigd Koningkrijk This dissertation has been approved by the promotors: Promotor: Prof. dr. C. M. Jonker Copromotor: Dr. M. V. Dignum Copromotor: Dr. M. B. van Riemsdijk Composition of the doctoral committee: Rector Magnificus, Prof. dr. C. M. Jonker, Dr. M. V. Dignum, Dr. M. B. van Riemsdijk, Independent members: Prof. dr. K. Atkinson, Prof. dr. F. Brazier, Prof. dr. J. Pitt, Prof. dr. L. van der Torre, Reserve: Prof. dr. C. Witteveen chairman Delft University of Technology, promotor Delft University of Technology, copromotor Delft University of Technology, copromotor University of Liverpool Delft University of Technology Imperial College London University of Luxembourg Delft University of Technology SIKS Dissertation Series No. 2016-41 The research reported in this thesis has been carried out under the auspices of SIKS, the Dutch Research School for Information and Knowledge Systems. The research reported in this thesis was funded by the SHINE project of TU Delft. Copyright © 2016 by Thomas C. King ISBN 978-94-6186-726-1 An electronic version of this dissertation is available at http://repository.tudelft.nl/ S UMMARY This dissertation is motivated by the need, in today’s globalist world, for a precise way to enable governments, organisations and other regulatory bodies to evaluate the constraints they place on themselves and others. An organisation’s modus operandi is enacting and fulfilling contracts between itself and its participants. Yet, organisational contracts should respect external laws, such as those setting out data privacy rights and liberties. Contracts can only be enacted by following contract law processes, which often require bilateral agreement and consideration. Governments need to legislate whilst understanding today’s context of national and international governance hierarchy where law makers shun isolationism and seek to influence one another. Governments should avoid punishment by respecting constraints from international treaties and human rights charters. Governments can only enact legislation by following their own, pre-existing, law making procedures. In other words, institutions, such as laws and contracts are designed and enacted under constraints. The common thread shared by these examples is that institution designers, such as organisations and governments, are constrained in two senses. They are loosely tied in how the institutions they enact should be designed and strongly tied in how and when they can enact institutional changes. We can clearly see such constraints exist in written form, even though we cannot physically see how the machinery that applies and tightens those constraints around the institutional designers works. It is consequently hard to grasp exactly how institution designers need to operate under these constraints. This dissertation addresses this issue by contributing a formal framework for analysing institutional design and enactment governance. Through formalisation, the framework provides a mathematically rigorous account of constraints placed on institutional designs and enacting institutional changes. Hence, the unseen constraints become seeable not as physical bindings, but as symbols on a page defining general institutional reasoning. From a conceptualisation standpoint, the main benefit is that we are able to understand the institutional constraints and identify any conceptual flaws. Or, in the words of Leibniz, “The only way to rectify our reasonings is to make them as tangible as those of the Mathematicians, so that we can find our error at a glance”. There are three main practical benefits. Firstly, the formal reasoning is disseminated in clear mathematical language. Institution designers and judiciaries apply exactly the same reasoning, making judgements predictable, providing they share the same legal rule bases. Moreover, citizens can have common knowledge of when regulatory changes are enacted by applying the same institutional reasoning. Secondly, the framework facilitates automation of otherwise cognitively difficult tasks in understanding the constraints placed on institution designers. Thirdly, the framework deals with the pragmatics with applications to real world case studies, in order to capture the meaning of institutional constraints as they are used. In summary, this dissertation introduces the PARAGon framework for Practical Automated Reasoning for Assessing Governance of institution design and change. Central to the PARAGon framework is Searle’s well known institutional constitutive i ii S UMMARY counts-as rules of the form “A counts-as B in context C”. For example, “a piece of paper with certain European Union symbols counts-as money in the context of the European Union”. These rules build a social reality from brute facts and regulate social reality change when the brute facts change. PARAGon makes three main contributions founded on countsas rules. PARAGon contributes formalised reasoning for a governance architecture called multilevel governance where institutions operate at different governance levels. The lowest-level institutions prescribe concrete regulations to govern societies (e.g. national legislation), whilst higher-level level institutions impose abstract regulations on the concrete regulatory outcomes of lower-level institutions (e.g. directives, human rights charters and supranational agreements). The PARAGon framework derives from counts-as rules whether concrete regulations at lower governance levels can be applied in social contexts such that they violate abstract regulations as set out in directives, human rights charters, etcetera. PARAGon contributes a computational mechanism for finding explanations for noncompliant institution designs used to rectify non-compliance. The explanations are minimal counts-as rule additions, deletions and modifications that ensure compliance. Moreover, the explanations keep institution designs as close as possible to designers’ original intentions. PARAGon formalises constraints called secondary legal rules, which define when institutions and institutional changes can be enacted. PARAGon formalises such secondary rules as rule-modifying counts-as rules, which ascribe rule change at various points in time. For example, a government voting for a rule change counts-as enacting a rule change. Determining rule change legality is difficult, since changing counts-as rules alters social contexts, which rule changes are conditional on. PARAGon contributes formal reasoning for determining when rule changes count-as legal rule changes. The PARAGon framework was developed under the SHINE (Sensing Heterogeneous Information Network Environment) project1 , which aims to form large-scale heterogeneous sensor networks, using existing sensors in the environment belonging to external stakeholders. PARAGon aims to support automated governance for large scale heterogeneous ‘SHINE’ sensor networks. Firstly, by automating the application of multi-level governance to forming SHINE sensor super-systems of sub-systems, comprising a thin SHINE institution layer abstractly governing the design of sub-system institutions towards coordinated regulations for collecting environmental data collection. Secondly, PARAGon supports sensor network stakeholders with automated institution re-design recommendations to ensure the institutions are designed compliantly. Thirdly, PARAGon supports automated reasoning for how and when sensor system regulations are changed over time as different governance needs arise (e.g. as the data needs change or as it emerges existing rules are inadequate). The PARAGon framework makes both formal and practical contributions. From the formal side, this dissertation aims to formalise previously informal notions provided by political science and legal philosophy. Particular attention is paid to understanding the new conceptualisations and testing them against a number of case studies to assess whether the formal contributions provide ‘correct’ inferences. From the practical side, the contributed reasoning is either coupled with an implementation or a computational characterisation of the formal concepts providing necessary details for implementation. This dissertation lies at the intersection of legal philosophy and symbolic artificial intelligence. 1 http://shine.tudelft.nl S AMENVATTING Ten grondslag aan deze dissertatie ligt de behoefte in de hedendaagse globalistische wereld aan een precieze methode om overheden, organisaties en andere regelgevende instanties in staat te stellen de beperkingen die ze opleggen aan zichzelf en anderen te evalueren. De modus operandi van een organisatie bestaat uit het instantiëren en uitvoeren van verbintenissen tussen zichzelf en haar deelnemers. Organisationele verbintenissen dienen echter wel de externe wetgeving te respecteren, zoals de wetgeving waarin de rechten en vrijheden op het gebied van gegevensbescherming zijn neergelegd. Verbintenissen kunnen alleen worden geïnstantieerd door verbintenissenrechtelijke processen te volgen, die vaak bilaterale overeenstemming en afweging vereisen. Overheden moeten wetten opstellen en daarnaast inzicht hebben in de hedendaagse context van nationale en internationale governancehiërarchie waarin wetgevers isolationisme uit de weg gaan en elkaar proberen te beïnvloeden. Overheden dienen sancties te voorkomen door zich te houden aan de beperkingen die zijn opgelegd via internationale verdragen en mensenrechtenhandvesten. Overheden kunnen wetten alleen maar instantiëren door hun eigen, reeds bestaande wetgevingsprocedures te volgen. Met andere woorden: het ontwerpen en instantiëren van instituties, zoals wetten en verbintenissen, is onderworpen aan beperkingen. De rode draad bij deze voorbeelden is dat ontwerpers van instituties, zoals organisaties en overheden, in twee opzichten beperkt zijn. Ze zijn lichtelijk gebonden in hoe de instituties die ze instantiëren moeten worden ontworpen, en sterk gebonden in hoe en wanneer ze institutionele veranderingen kunnen instantiëren. We zien duidelijk dat dergelijke beperkingen op schrift bestaan, ook al kunnen we niet fysiek zien hoe de machinerie werkt die de beperkingen toepast en ze rond de institutionele ontwerpers aantrekt. Derhalve is het moeilijk precies te begrijpen hoe ontwerpers van instituties moeten opereren te midden van deze beperkingen. Deze dissertatie gaat in op deze problematiek door een formeel raamwerk aan te reiken voor het analyseren van institutioneel ontwerp en instantiatie-governance. Door formalisering biedt het raamwerk een mathematisch rigoureus overzicht van de beperkingen die opgelegd zijn aan institutionele ontwerpen en instantiatie van institutionele veranderingen. Daarmee worden de onzichtbare beperkingen zichtbaar, niet in fysiek opzicht, maar als symbolen op een pagina waarop algemeen institutioneel redeneren wordt gedefinieerd. Vanuit het oogpunt van conceptualisatie is het grootste voordeel dat we in staat zijn de institutionele beperkingen te begrijpen en eventuele conceptuele tekortkomingen te identificeren. Oftewel, in de woorden van Leibniz, “De enige manier om onze redeneringen te corrigeren, is ze net zo tastbaar te maken als die van de Mathematici, zodat we een fout van ons in één oogopslag kunnen ontwaren”. Er zijn drie grote praktische voordelen. In de eerste plaats wordt formeel redeneren alom verspreid in heldere mathematische taal. Institutie-ontwerpers en rechters passen exact dezelfde redeneringen toe, waardoor uitspraken voorspelbaar worden, mits ze uitgaan van dezelfde juridische grondslagen. Bovendien kunnen burgers door toepassing van iii iv S AMENVATTING dezelfde institutionele redeneringen gemeenschappelijke kennis hebben van het moment waarop wijzigingen in regelgeving worden geïnstantieerd. In de tweede plaats faciliteert het raamwerk automatisering van anderszins cognitief lastige taken bij het begrijpen van de beperkingen die zijn opgelegd aan ontwerpers van instituties. In de derde plaats gaat het raamwerk in op de pragmatica middels toepassingen op casestudies uit de praktijk, om zo de betekenis van gehanteerde institutionele beperkingen te kunnen begrijpen. Samenvattend, introduceert deze dissertatie het PARAGon-raamwerk voor Practical Automated Reasoning for Assessing Governance met betrekking tot het ontwerpen en wijzigen van instituties. Een centrale plaats in het PARAGon-raamwerk wordt ingenomen door Searle’s welbekende institutionele constitutieve "geldt als"-regels in de vorm “A geldt in context C als B”. Voorbeeld: “een stuk papier met bepaalde aanduidingen van de Europese Unie geldt in de context van de Europese Unie als geld”. Deze regels bouwen een sociale realiteit van brute feiten op en reguleren veranderingen in de sociale realiteit wanneer de brute feiten veranderen. PARAGon levert drie hoofdbijdragen die gebaseerd zijn op geldt-alsregels. PARAGon biedt geformaliseerd redeneren voor een governance-architectuur, multilevel governance genaamd, waarbij instituten op meerdere governance-niveaus opereren. De instituties op het laagste niveau schrijven concrete reguleringen voor om samenlevingen te besturen (bijv. nationale wetgeving), terwijl instellingen op hoger niveau abstracte reguleringen opleggen met betrekking tot de concrete regulerende uitkomsten van lagere instituties (bijv. richtlijnen, mensenrechtenhandvesten en supranationale overeenkomsten). Het PARAGon-raamwerk leidt van geldt-als-regels af of concrete reguleringen op lagere governance-niveaus zodanig kunnen worden toegepast in sociale contexten dat ze een inbreuk vormen op abstracte reguleringen als neergelegd in richtlijnen, mensenrechtenhandvesten, enzovoort. PARAGon reikt een berekeningsmechanisme aan voor het vinden van verklaringen voor niet-compliante institutie-ontwerpen die gebruikt worden om non –compliantie te herstellen. De verklaringen zijn ten opzichte van geldt-als-regels minimale toevoegingen, verwijderingen en aanpassingen die zorgen voor compliantie. Verder houden de verklaringen de institutie-ontwerpen zo dicht mogelijk bij de oorspronkelijke bedoelingen van de ontwerpers. PARAGon formaliseert beperkingen, de zogenaamde secundaire rechtsregels, die definiëren wanneer instituties en institutionele wijzigingen geïnstantieerd kunnen worden. PARAGon formaliseert dergelijke secundaire regels als rule-modifying geldt-als-regels, die op verschillende momenten wijzigingen van regels toekennen. Een stemming in het parlement om een regel te wijzigen geldt bijvoorbeeld als het instantiëren van een regelwijziging. Het bepalen van de legaliteit van regelwijzigingen is lastig aangezien een verandering van geldt-als-regels leidt tot een verandering van sociale contexten, waar regelwijzigingen afhankelijk van zijn. PARAGon biedt een formele redenering voor het bepalen wanneer regelwijzigingen gelden als wijzigingen van rechtsregels. Het PARAGon-raamwerk is ontwikkeld in het kader van het project SHINE (Sensing Heterogeneous Information Network Environment)2 , dat beoogt grootschalige heterogene sensornetwerken te vormen met behulp van bestaande sensoren in de omgeving die toebehoort aan externe belanghebbenden. PARAGon beoogt ondersteuning van geautomatiseerde governance voor grootschalige heterogene SHINE-sensornetwerken. In de eerste 2 http://shine.tudelft.nl S AMENVATTING v plaats door automatisering van de toepassing van multi-level governance op de vorming van SHINE sensor-supersystemen van subsystemen, bestaande uit een dunne SHINE institutielaag die op abstracte wijze het ontwerp van subsysteem-instituties aanstuurt richting gecoördineerde regulering voor het verzamelen van milieugegevens. In de tweede plaats ondersteunt PARAGon belanghebbenden in het sensornetwerk met aanbevelingen voor het geautomatiseerd herontwerpen van instituties om zo te waarborgen dat de instituties op compliante wijze worden ontworpen. In de derde plaats ondersteunt PARAGon geautomatiseerde redenering voor hoe en wanneer regels van sensorsystemen in de loop der tijd worden gewijzigd naarmate andere governance-behoeften ontstaan (bijv. als de data gewijzigd moeten worden of als blijkt dat bestaande regels ontoereikend zijn). Het PARAGon-raamwerk levert zowel formele als praktische bijdragen. In formeel opzicht streeft deze dissertatie naar het formaliseren van voorheen informele noties die vanuit de politieke wetenschap en de rechtsfilosofie werden aangeleverd. Bijzondere aandacht wordt besteed aan het begrijpen van de nieuwe conceptualisaties en het toetsen ervan aan een aantal casestudies teneinde te beoordelen of de formele bijdragen resulteren in ‘correcte’ inferenties. In praktisch opzicht wordt de aangedragen redenering gekoppeld aan ofwel een implementatie ofwel een rekenkundige karakterisering van de formele concepten die de noodzakelijke details aanleveren voor implementatie. Deze dissertatie bevindt zich op het raakvlak van rechtsfilosofie en symbolische artificiële intelligentie. C ONTENTS Summary i Samenvatting iii List of Figures xi List of Tables xiii 1 2 3 Introduction 1.1 Research Questions. 1.2 Research Approach. 1.3 The SHINE Project . 1.4 Dissertation Outline 1.5 List of Publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 6 11 12 14 16 Background 2.1 Agents and Multi–agent Systems . . . . . . . . . . . . . . . . . 2.2 Governing Multi–Agent Systems . . . . . . . . . . . . . . . . . 2.2.1 Institutions . . . . . . . . . . . . . . . . . . . . . . . . 2.2.2 Norms . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.3 Governing Institutional Design and Enactment . . . . . . 2.3 Formal Foundations . . . . . . . . . . . . . . . . . . . . . . . 2.4 Formal Approaches. . . . . . . . . . . . . . . . . . . . . . . . 2.4.1 Standard Deontic Logic . . . . . . . . . . . . . . . . . 2.4.2 Anderson’s Reduction . . . . . . . . . . . . . . . . . . 2.4.3 Temporal Deontic Logics . . . . . . . . . . . . . . . . . 2.4.4 Seinsollen and Tunsollen: Ought–to–be and Ought–to–do. 2.5 Practical Formal Governance . . . . . . . . . . . . . . . . . . . 2.5.1 Organisational Frameworks. . . . . . . . . . . . . . . . 2.5.2 Institutional Frameworks . . . . . . . . . . . . . . . . . 2.6 Knowledge Gaps and Approach . . . . . . . . . . . . . . . . . 2.7 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 18 21 21 22 25 31 32 32 34 35 36 37 37 39 40 42 Formalising Compliance in Multi–level Governance 3.1 Approach. . . . . . . . . . . . . . . . . . . . . 3.2 Formal Representation . . . . . . . . . . . . . . 3.3 Case Study Formalisation. . . . . . . . . . . . . 3.4 Semantics . . . . . . . . . . . . . . . . . . . . 3.5 Related Work. . . . . . . . . . . . . . . . . . . 3.5.1 Hierarchical Governance . . . . . . . . . 3.5.2 Abstracting Norms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 48 52 58 63 77 77 79 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii C ONTENTS 3.6 4 5 6 7 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 Computational Multi–level Governance Compliance Checking 4.1 Preliminaries – Answer Set Programming. . . . . . . . . . . . 4.2 Approach. . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3 Computational Framework . . . . . . . . . . . . . . . . . . . 4.3.1 Multi–level Governance Institution ASP Representation 4.3.2 Deontological Counts–as ASP Representation . . . . . 4.3.3 Multi–level Governance Semantics ASP Representation 4.4 Executed Case Study . . . . . . . . . . . . . . . . . . . . . . 4.5 Computational Framework Soundness and Completeness . . . . 4.6 Related Work. . . . . . . . . . . . . . . . . . . . . . . . . . 4.7 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 85 87 90 90 92 97 99 104 107 110 Explanatory Rectifications for Non–compliant Institutions 5.1 Approach. . . . . . . . . . . . . . . . . . . . . . . . 5.1.1 Multi–tier Institutions . . . . . . . . . . . . . 5.1.2 Formal Representation . . . . . . . . . . . . . 5.1.3 Case Study . . . . . . . . . . . . . . . . . . . 5.1.4 Multi–Tier Institution Operationalisation in ASP 5.1.5 Executed Case Study . . . . . . . . . . . . . . 5.1.6 Inductive Logic Programming: A brief overview 5.2 Revising Institutions For Compliance . . . . . . . . . . 5.2.1 Revising Institutions to be Compliant is an ILP Task Instance . . . . . . . . . . . . . . . . . . 5.2.2 Solving ILP Institution Revision in ASP . . . . 5.2.3 Implementation and Results . . . . . . . . . . 5.3 Related Work. . . . . . . . . . . . . . . . . . . . . . 5.4 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Revision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 113 113 115 117 120 122 124 124 . . . . . 125 127 129 131 132 Formalising Institutional Enactment Validity 6.1 Comparison with InstAL . . . . . . . . . 6.2 Representation . . . . . . . . . . . . . . 6.3 Semantics . . . . . . . . . . . . . . . . 6.3.1 Institutional Change . . . . . . . 6.3.2 Models . . . . . . . . . . . . . . 6.4 Case Studies . . . . . . . . . . . . . . . 6.4.1 Related Work. . . . . . . . . . . 6.5 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 137 139 140 141 143 147 152 153 . . . . 155 156 158 159 161 Application 7.1 Contractually Crowdsensing Rain Data . 7.1.1 Example . . . . . . . . . . . . 7.2 System Overview. . . . . . . . . . . . 7.3 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C ONTENTS 8 9 Conclusions 8.1 Discussion of Results. . . . . . . . . . . . 8.2 Applying the Research to the SHINE Project 8.3 Future Work . . . . . . . . . . . . . . . . 8.3.1 Analysis . . . . . . . . . . . . . . 8.3.2 Improvements . . . . . . . . . . . 8.3.3 New Research Lines . . . . . . . . 8.4 Closing Remarks . . . . . . . . . . . . . . ix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 164 172 173 174 175 178 181 Appendices 183 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 Acknowledgements 203 Curriculum Vitae 205 L IST OF F IGURES 1.1 Dissertation overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.1 2.2 High–level multi–level governance overview . . . . . . . . . . . . . . . . . . 26 The deontic square of opposition . . . . . . . . . . . . . . . . . . . . . . . . . 33 3.1 3.2 3.3 3.4 3.5 Multi–level Governance reasoning overview . . . . . . . Multi–level governance abstraction semantics example . Modal norm discharge and violation . . . . . . . . . . . . Multi–level governance semantics definitional overview . Deontological counts–as semantics overview . . . . . . . 4.1 Multi–level governance case study execution . . . . . . . . . . . . . . . . . . 100 5.1 5.2 5.3 Multi–tier institution schema . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 Example trace as input for finding non–compliance explanations . . . . . . . 123 Compiler for finding non–compliance explanations overview . . . . . . . . . 130 6.1 6.2 6.3 6.4 Institutional enactment governance case 6.4.1 . Institutional enactment governance case 6.4.2 . Institutional enactment governance case 6.4.4 . Institutional enactment governance case 6.4.5 . 7.1 7.2 Simulated application architecture . . . . . . . . . . . . . . . . . . . . . . . . 160 Prototype simulated crowdsensing system visualisation . . . . . . . . . . . . 161 xi . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 51 52 64 67 148 149 151 152 L IST OF TABLES 2.1 Existing knowledge comparison . . . . . . . . . . . . . . . . . . . . . . . . . 41 3.1 3.3 3.4 Charter of Fundamental Rights formalisation . . . . . . . . . . . . . . . . . . 60 Data Retention Directive formalisation . . . . . . . . . . . . . . . . . . . . . 62 Data Retention Regulations formalisation . . . . . . . . . . . . . . . . . . . . 63 4.7 Multi–level governance reasoning comparison with InstAL . . . . . . . . . . 109 5.1 5.3 5.6 Soundsensing Institution formalisation . . . . . . . . . . . . . . . . . . . . . . 118 Governmental Institution formalisation . . . . . . . . . . . . . . . . . . . . . 119 Abducible predicates explanation . . . . . . . . . . . . . . . . . . . . . . . . . 128 7.1 7.2 Crowdsensing contract institution formalisation . . . . . . . . . . . . . . . . 159 Crowdsensing contract formalisation . . . . . . . . . . . . . . . . . . . . . . . 159 xiii 1 I NTRODUCTION The only way to rectify our reasonings is to make them as tangible as those of the Mathematicians, so that we can find our error at a glance, and when there are disputes among persons, we can simply say: Let us calculate [calculemus], without further ado, to see who is right.[153] Gottfried Wilhelm Leibniz 1 2 1. I NTRODUCTION In today’s increasingly connected world, governments, organisations and other regulatory bodies do not operate in isolate free from control. Let us take a look at three examples. Our first example concerns the SHINE1 project under which this dissertation’s research was conducted. SHINE aims to form systems comprising heterogeneous environmental sensors (e.g. cellphone cameras, weather radars) contracted from the sensor owners to collect environmental data. However, constraints are placed on forming contracts, in the sense that a sensor owner is only likely to agree to a contract if it meets their own policies stating what rights the contract should confer and what liberties it should not take away. Our second example concerns European Union (EU) law. In the EU, member states’ governments enact legislation to meet governance aims. When the EU council wishes to coordinate legislation across the union, an EU directive is issued. Directives constrain and direct member states to implement regulations that meet cross–national aims. For example, retaining communications data for EU–wide criminal investigations [71]. In turn, national legislation and EU directives are also required to confer rights and uphold liberties specified in the EU Charter of Fundamental Rights [72]. Our third example concerns the rules that make enacting and changing regulations possible. An organisation can only enact a legally valid and binding contract if the rules and processes that state how and when contractual regulations are enacted are followed [117, p.96]. The EU council is only able to legislate directives according to the rules that give it rule–making powers [73, Art. 288]. The United States government has the power to enact laws by following law making procedures, but laws cannot be created that apply to the past [221, Art. 1 Sec. 9 Cl. 3]. In other words, governments, organisations, contract writers and regulatory bodies are constrained in their regulatory activities. These examples are all about institutions and the constraints placed on institution designers. Institutions are sets of rules and regulations, such as national legislation and contracts [27, 208]. Institution designers are governments, contract writers, organisations and other regulatory bodies. Institutions regulate, organize and guide individuals’ behaviour in a society towards collaboratively meeting societal aims [186]. Societal participants are autonomous agents, such as people or software agents, which are liable to act in their own self interests. Hence, institutions pair regulations with penalties to ensure it is in an individual’s own self–interest to comply for the greater good of the governed society [15, 41][44, p.80]. Institution designers craft institutions to regulate agents towards societal aims, such as people contractually participating in an organisation collecting and providing data, or citizens participating in a society whilst respecting one another’s rights. By regulating rather than regimenting (forcing certain) agent behaviour, institution designers can achieve societal aims whilst preserving agents’ autonomy. Institution designers are also autonomous agents and hence are liable to act in their own self–interests. Consequently, regulations are placed on institution designers to reign their behaviour in. The first two examples showed how institution designers are governed in the institutions they design. Some institutions are designed to govern societies, such as national legislation. But, such institutional designs are in turn governed by other institutions, such as EU directives and human rights charters. The third example shows how institution designers are regulated in their ability to enact institutional changes by establishing new institutions or change existing institutions. By enactment, we mean in the sense of passing of a new law or a change to legislation, making a contract legally binding or more generally 1 http://shine.tudelft.nl 3 the social action of making an institutional change legally valid and imposed on agents. For example, enacting contracts or changing existing institutional rules to meet new aims. Governing regulatory change is defined by rules that stipulate when institutional changes are enacted. Hence, institution designers autonomously design and enact institutions, but institution designers are also governed in the institutions they design and the institutional enactment process. In today’s increasingly technological world, operationalising institutions by applying rules and regulations is not just left up to opaque human reasoning. Instead, the fields of Normative Multi–Agent Systems and AI and Law are concerned with automated reasoning for institutions by contributing formal frameworks that interpret and apply institutions (we discuss background on implemented systems later in Chapter 2, and a literature survey is provided by [12]). Formalisation, in general, takes informal reasoning, that is ambiguous and unclear, and exposes it in plain sight with precise mathematically rigorous definitions. Yet, thus far the reasoning involved in the governance placed on institution designers has not been formalised. We can see a common thread is shared by our examples, in that institution designers are constrained loosely in how the institutions they enact should be designed and strongly in how and when they can enact institutional changes. Yet, although we can clearly see such constraints exist in their written form, we cannot physically see precisely how the machinery that applies and tightens those constraints around the institutional designers works. It is consequently hard to grasp how exactly institution designers need to operate under institutional design and enactment constraints. This dissertation addresses this knowledge gap, by contributing a formal framework for analysing institutional design and enactment governance. To understand more specifically why such formal reasoning is important, let us first take a closer look at the concepts behind institutional design and enactment governance. From the institutional design governance perspective, institution designs are governed by other institutions in what is called multi–level governance [121]. In this dissertation, multi–level governance is conceived as higher–level institutions designed to govern and guide the institution designs, enacted by autonomous institution designers, operating at lower governance levels. Multi–level governance facilitates institution designs in being coordinated, when viewed as being related in a wider multi–institution system (e.g. [244]). For example, at a national level a government enacts institutions to govern a nation. At a cross–national level institutions are designed to guide national governments in enacting institutions with coordinated regulations. Moreover, designers are guided in ensuring their designs do not take away rights and liberties, such as by human rights charters. In multi– level governance, institution designers have autonomy to design institutions according to their aims, but their institution designs are also subject to being governed and guided by higher–level institutions. Multi–level governance creates the possibility for institution designs to be non–compliant. A non–compliant institution design is problematic. From the higher governance levels’ perspective non–compliant institution designs are uncoordinated with other institutions governing separate jurisdictions, do not uphold rights and/or do take away liberties. From an institution designer’s perspective, they are liable to face punishment for non–compliant design. When societal members act in a non–compliant way they are liable to being penalised in order to guide society towards compliance[11, p. 279]. Hence, when an institution 4 1. I NTRODUCTION designer designs a non–compliant institution, they are liable to being fined or having institution designs annulled [210] by judiciaries. Non–compliance in multi–level governance should be detected and avoided before institution enactment by an institution designer in order to avoid punishment, and detected after institution enactment by a judiciary to issue punishment and thus incentivise institution designers in enacting compliant institutions. From the institutional change enactment governance perspective, institutional rules define the legislative actions that constitute a valid institutional change enactment conditional on the social context [20]. In a simple case, a legislature voting by majority on an institution enactment change suffices. In other cases, there are further constraints on valid institution change enactment, such as there being no valid way to change an institution in the past (retroactively) [221, Art. 1 Sec. 9 Cl. 3] “No Bill of Attainder or ex post facto Law shall be passed”. In general, there are rules that state how and when rules are changed. According to the influential legal philosopher Hart, these are secondary institutional rules and they create the possibility for governments to change legislation and citizens to create contracts [117, p.81]. When an institution designer designs or changes an institution outside of the secondary rules the “enacted” changes are invalid. For example, enactment does not occur merely by physically writing institutional rules without following the necessary voting procedure set out by secondary rules. From an institution’s perspective, invalid enactments or changes do not take place. Hence, the system or society the institution governs should ignore such invalid enactments in order to have the correct and shared view of an institution’s rules. Formal reasoning is important for the governance of institution design and enactment. Specifically, for precision and automation: Precision. In general, formalisation removes ambiguity. Without ambiguity, rigorous interrogation of the underlying reasoning is possible. Hence, reasoning flaws can be found and fixed, which can have real positive and negative consequences for agents being rewarded or punished. Moreover, formalisation communicates in clear mathematical terms the reasoning involved. Hence, given an institution and the facts of a case, agents can independently come to the same conclusions by applying identical reasoning. From a multi–level governance perspective, an institution designer can predict whether a judiciary would find the institution design non–compliant. With one caveat, the designer and judiciary must have the same legal rule base, including any unwritten rules such as conceptual interpretations. Prediction benefits an institution designer who can choose to not enact a non–compliant institution in order to avoid punishment. In the case of governing the institutional change enactment process with secondary rules, all agents governed by an institution are able to come to the same understanding over the changes made to the rules they are governed by. A common understanding benefits two agents in neither having a different understanding of the regulations in place nor misunderstanding what they ought to do according to the institutions governing them. Automation. Formalisation removes ambiguity, which is a necessary pre–requisite 5 for automation since it means, potentially, the formal reasoning can be implemented in a computational language as a program for a computer to execute. From the multi–level governance perspective, automation lowers compliance checking costs. A judiciary does not face the dilemma over either arduously determining if an institutional design is compliant or forego judgement and face the possibility that institution designs are allowed to be uncoordinated or take away agents’ rights and liberties without punishment. Automation also lowers compliance checking costs for institution designers and helps rectify non–compliance. Fixing non–compliance is not necessarily easy. There can be multiple possible explanations for why an institution is non–compliant in there there is often a space of many compliant institution designs. For example, EU member states are at liberty to comply with an EU directive in many ways [76, p.5]. Yet, some compliant designs will meet an institution designers’ objectives more than others. By automating compliance checking, searching for explanations for non–compliance that can be used to rectify the underlying causes is also automatable in a way that meets an institution designer’s aims the most. It is non–trivial to determine how an institution is changed according to secondary rules governing rule change. For example, a new rule might be enacted stating rules can be changed by majority vote. Enacting such a rule affects which future rule changes can be enacted. More generally, without wishing to delve into the temporal details at this point, rule changes can also be applied to the past, present or future and have many complex interacting affects with other rule changes. Automation takes over the cognitively difficult task for a human of determining when rule change enactments are legally valid. In order to address the need for precision and automation, institutional design and enactment governance should be formalised, but there is a lack of formal work in this area. This dissertation addresses this problem by proposing the PARAGon2 formal framework for Practical Automated Reasoning for Assessing Governance of institution design and enactment. The formalism comprises precise definitions for compliance in multi–level governance, a mechanism to determine explanations and rectifications for non–compliance, and precise definitions for institution enactment validity according to secondary rules. Moreover, this dissertation adopts a practical approach in two senses. Firstly, it provides definitions that are either coupled with a corresponding computational implementation or are defined in such a way as to make it obvious how the reasoning can be implemented. Thus, the formalisation provides automated reasoning. Secondly, the conceptualisations are aimed at capturing a number of real–world case studies in a realistic setting that includes factors such as time and change. The framework allows an institution designer to specify the institutions in a formal grammar and determine using the reasoning whether the design is compliant in multi–level governance and rectify any non–compliance. Moreover, institution designers and agents governed by institutions alike can apply the framework to determine which rule changes are validly enacted and when. The framework users need 2 Just as an institution defines ideality, a paragon is an example of a person or thing regarded as a perfect example of such an ideal [191] 6 1. I NTRODUCTION not understand the underlying mechanics, in terms of how it is decided what the regulatory effects of an institution are. Rather, users only need to understand what the concept of an institution being used by the system is and correctly provide as input the various institutions that are governing/being governed and the actions of various agents that are occurring. Consequently, the reasoning burden can be delegated to a computer to mechanically determine institution design compliance, rectifications for non–compliance and valid rule change enactment. This chapter proceeds to introduce the research questions in section 1.1. We describe how this dissertation fits into the SHINE project in section 1.3. Then, the research approach is described in section 1.2. Finally, the outline of this dissertation is given in section 1.4. 1.1. R ESEARCH Q UESTIONS As we discussed, there is a lack of formal and practical reasoning for governing institution design and enactment that needs addressing. This leads to the main research question: How can institutional design and enactment governance be supported with formal reasoning? The main research question is broken down into five sub–questions. The idea is to contribute formal reasoning to support human stakeholders in understanding the constraints placed on institution designers. Stakeholders need a way to represent institutions and their governance relationships. This leads to our first research question. Sub–research question 1: What is a suitable representation to specify institutional design and enactment governance? It is important for the representation to be natural, by which we mean with a clear correspondence to how written and verbal institutions are represented, for two reasons. Firstly, from the precision perspective we are interested in formalising institutional governance to make it clear what we mean by the relevant concepts. The idea being, the concepts are exposed and can be interrogated, and discussed and debated for ‘correctness’. A natural representation supports this aim by demonstrating to what extent the formalised reasoning is doing all the work of coming to correct conclusions and to what extent it is actually highly dependent on the way an institution is written. The latter case is far from desirable. For example, if we have to represent an institution in a very convoluted or procedural way to get the correct reasoning results, it is reasonable to assume that the informal reasoning has hardly been formalised at all. From the automation perspective, a ‘user’ 3 needs to face as little burden as possible, meaning they should be able to specify an institution close to how they would a written law without thinking about how a computer might interpret it. To give a contrasting example, we could simply provide the user with an abstract computational machine (e.g. a Turing machine [225]) and give the user all the flexibility to specify institutions in whichever way they want as procedural code. However, by giving users an 3 a user of the PARAGon framework can be a human agent interested in reasoning about institutional design and change enactment governance, such as to avoid punishment for non–compliant design. A user can also be a researcher wishing to understand the precise meaning of the concepts involved. 1.1. R ESEARCH Q UESTIONS 7 ‘unnatural’ language to specify institutions, we have contributed nothing to automating institutional governance reasoning. Hence, a natural representation is central to being able to critique the PARAGon framework, and the framework itself providing the benefits of formalisation for institutional design and enactment governance. The PARAGon framework answers this question by providing different ways to represent institutions depending on whether we are interested in the governance of institution design or change enactment. The first step in answering the question is to gather background knowledge on the kinds of institutional rules and regulations we wish to represent and to what extent there are already suitable grammars to represent those concepts in Chapter 2. Then, in Chapter 3 and 4 we provide a representation for multi–level governance and apply it to European Union laws. A simpler representation for governing institutional designs is provided in Chapter 5 and applied to a crowdsourced mobile sensing scenario inspired by the SHINE project. In Chapter 6 we provide a further representation language, this time focussed on secondary rules used to govern institutional change enactments. Once we have a way to represent institutions, we need a way to reason about them, leading to our next four sub–research questions. The first aspect we look at is compliance of institution designs in multi–level governance. Although it is expected that institution designers enact compliant institutions, due to designers’ autonomy it is not guaranteed. Compliance of institution designs should be evaluated to enable institution designers to understand whether their designs are compliant before enactment, and higher governance levels’ judiciaries in punishing institution designers for offending institution designs. Compliance should be assessed in a precise and consistent way, such that the same notion of compliance is shared by institution designers and judiciaries. Hence, compliance requires formalisation. Since this dissertation takes a practical approach, addressing real–world needs, compliance should be formalised to capture its real–world informal notion. This leads to our next sub–research question: Sub–research question 2: How can we formalise compliance in multi–level governance? In general, compliance involves adhering to regulatory requirements [172]. In multi– level governance, compliance represents whether from the perspective of institutions designed at higher governance levels (e.g. [76, p.5]), lower–level institutions regulate in a ‘good’ way to meet particular higher–level governance aims. There is a difference between societal compliance and institution design compliance. Societal compliance focuses on agent behaviour, which is already widely formalised [12], such as agents being compliant if they do not murder one another according to institutions that prohibit murder. On the other hand, institution design compliance focuses on whether the effects of regulations are good, such as by being coordinated with other institutions’ regulatory effects (e.g. controlling carbon emissions through high–level international institution design coordination [188]), conferring human rights (e.g. prohibiting murder) and respecting liberties. So, compliant institution design is formalised by defining when the regulatory effects at lower governance levels are compliant with the regulations at higher governance levels. The formal notion of compliance in multi–level governance must, however, also take into account abstraction. In multi–level governance, there are conceptual differences be- 8 1. I NTRODUCTION tween institutions operating at different governance levels. Institutions embody institutional concepts defined with context–sensitive conceptualising rules [214]. For example, a rule stating that a soldier killing another person who is not a member of an opposing army is murder. Such conceptual rules serve an important role, since they allow regulations to be succinctly defined over high–level concepts [32]. For example, a regulation prohibiting murder as opposed to a regulation prohibiting a soldier from doing such and such. Separate institutions can potentially define the same concepts differently or define different concepts altogether. Moreover, since institutions define regulations over separate concepts, the regulations themselves have different, context–sensitive, meanings. In multi–level governance, we can see higher governance levels in fact use more abstract concepts. For example national legislation might concretely require communications data to be stored (e.g. [226]). Yet, human rights charters describe abstract notions such as the right to a private and family life [48]. Therefore, compliance should be defined in terms of concrete lower–level governance regulations being compliant with abstract higher–level governance regulations. Moreover, compliance should account for the meanings of the regulations potentially being entirely different depending on the social context. The PARAGon framework provides a formal definition of compliance in multi–level governance in Chapter 3, reconciling the different, context–sensitive, regulation meanings from a conceptually concrete lower–level institution compared to a conceptually abstract higher–level institution. By defining compliance in multi–level governance, we are able to unambiguously determine compliance with mathematical rigour and regularised predictable results for a real world setting. Having a formal definition of compliance does not necessarily reveal how to practically reason about compliance in a computational way. This leads us to the third sub–research question: Sub–research question 3: How can institutional design compliance in multi– level governance be computationally verified? Computationally verifying institution design compliance in a practical way is desirable to reduce compliance checking burdens placed on the various actors involved in multi–level governance. Whilst each institution designer at each level of governance must provide the institutions being governed and doing the governing as input, there should be no burden on those designers to implement or understand the mechanics of compliance checking. As Sergot exemplifies using the law [216], institutions are sets of declarative rules. Whilst rules can influence each other, and rules can define procedures which should be followed, the ordering of the rules themselves should not impact their meaning. What we can take from this is that institutions are not algorithmic and any algorithmic reasoning applied to an institution is not visible in an institutional specification. Consequently, institution designers are not particularly concerned with the reasoning mechanisms used to operationalise institutions. So, automated compliance checking is needed to ensure institution designers do not need to take extra effort in applying the formalised reasoning. That is, by providing a computational framework which hides the mechanics (i.e. algorithms or semantics) for compliance checking. So, what we aim for when answering this research question, is a computational framework that takes a natural representation of institutions as input and de- 1.1. R ESEARCH Q UESTIONS 9 termines if an institution design is compliant in a sound and complete way (i.e. equivalent) with respect to our formal notion of compliance. The PARAGon framework contributes computational compliance checking in multi– level governance in Chapter 5, which is sound and complete with respect to our formal notion of compliance. This supports judiciaries in determining penalties issued on institution designers for non–compliant designs. Moreover, it supports institution designers in avoiding penalties by indicating a non–compliant institution design should perhaps not be enacted. For an institution designer it might be simplistic to state that they can simply avoid punishment by not enacting a non–compliant institution design. Firstly, in the case that an institution designer is actually obliged to enact an institution in order to implement the imperatives issued by a higher–level institution, as is required in complying with EU Directives and other cross–national institutions. Secondly, in the case that an institution designer prefers to enact an adjusted and compliant institution rather than not enacting an institution at all. This leads us to our fourth sub–research question: Sub–research question 4: How can non–compliant institution designs be explained in order to rectify non–compliance according to the institution designer’s objectives? Institutions are designed with a purpose, to guide societies towards an ideal envisaged by the institution designer or guide and coordinate other institution designs towards an ideal. We are interested in resolving non–compliant designs. Mitchell [174], provides a number of reasons for (non–)compliance in general, such as the non–compliance if agentive actions in society. Pertinent to institution design, non–compliance can occur due to preference, in our case because institution designers prefer a non–compliant institution design due to its positive governance effects, even in the face of penalties for non–compliance. Non– compliance can also occur due to incapacity, in our case simply because the institution designers do not know how to design a compliant institution. These reasons for non–compliance should be taken into account when rectifying non– compliant institution designs. From the non–compliance due to designer preference perspective, any non–compliance resolution should balance the requirement to successfully adjust the design to be compliant against the objectives of the institution designer. Assuming the non–compliant design was crafted to achieve particular governance aims, resolving non–compliance must remain as closely as possible to the original design’s regulatory effects. From the non–compliance due to designer incapacity perspective, non–compliance resolution should take into account the fact that incapacity can be due to institutions being complicated, comprising many interrelated rules and regulations [97, p.14] [171, p.2]. This means it can be non–obvious to an institution designer which rules and their interactions are causing non–compliance. Assuming an institution designer wishes to resolve non–compliance in a way they understand, non–compliance resolution should seek the simplest and most general explanations for non–compliance, to support the institution designer in understanding and remedying the underlying problems. For example, the following case of non–compliance could have multiple explanations, which resolve the non–compliance – a lower governance level 10 1. I NTRODUCTION institution is governed by a higher–level institution in only obliging agents that are adults in providing personal information, but the lower–level institution obliges both children and adults to provide personal information. One possible explanation for non–compliance is that it is due to there existing a rule that obliges people to provide personal data and that rule should be removed to ensure compliance. A second explanation for non–compliance that gives less drastic institution re–design advice and is, is that the rule obliging people to provide personal information is too general and it should be modified to only applying to adults. In summary, non–compliance resolution should adhere to an institution designer’s own objectives and recommend the simplest explanations and rectifications for non–compliance. The PARAGon framework answers this question in Chapter 5 with a computational non–compliance resolution mechanism. The previous research questions address institution design governance, our fifth and last research question addresses institution change enactment governance: Sub–research question 5: How can we formally define when legally valid institutional change enactments occur? Institutional change enactment is constrained in its validity according to secondary legal rules. We need a formal definition of when, for a set of secondary legal rules, particular physical behaviour such as ‘the thing we call’ voting on a rule change causes the social action of rules actually being changed. Such secondary rules create the possibility to take the social action of changing rules [20]. These rules making rule change possible are also themselves changeable [220]. Formalising the legal validity of rule change enactment must take into account the fact that changing rules can affect further rule change enactments. Since we are dealing with real–world case studies the temporal aspect of secondary rules is a factor. It is possible, for example, for secondary rules to make past rule change enactments possible. Institution designers have enacted past rule changes in order to ‘undo’ the consequences of ‘bad’ institution design decisions [192]. The implication is that, since changing rules can affect rule change enactments, changing rules in the past can affect rule changes at various other points in time, including in the more recent past, the present or the future. So, what this research question requires is that we formalise rule change enactment validity whilst taking into account complex temporal interdependencies between secondary rules and rule changes. The PARAGon framework answers this research question in Chapter 6 with a formal framework for determining when rule changes count–as legal rule change enactments. In answering this question, special attention is paid to formalising in such a way that demonstrates the computational mechanism to decide whether a rule enactment is valid. Moreover, an account of the temporal aspects is given, demonstrated against a number of real and imagined case studies. By addressing these research questions the following argument is made: This dissertation formalises governing governance by giving a rigorous mathematical definition for institutions being governed in how they should be designed and how institutional change enactments can be made. Now we proceed to the approach we take to answering the research questions. 1.2. R ESEARCH A PPROACH 11 1.2. R ESEARCH A PPROACH This dissertation’s result is the PARAGon framework for formally reasoning about governing institution design and enacting changes. A research approach was followed to develop the PARAGon framework and its constituent parts. The approach is to start with a literature review and then per research question gather case studies, develop a formal framework and apply model checking to assess the framework against the case studies. Each step is described as follows. Literature review: this step achieves three aims. This research started out in the broad area of institutional and normative reasoning. The first aim was to understand informal definitions of the main concepts involved, namely institutions and norms, governance and closely related concepts. The second aim was to identify an area of research which was both useful to the SHINE project of governing large–scale sensor systems (and systems of systems) and had not been looked at previously from an Artificial Intelligence perspective. Namely, the governance of institution design and enacting changes. The third aim was to identify a single underlying formalism providing more primitive concepts (institutions and regulations) on which the PARAGon framework can use as foundations. Framework development cycle: The next step was, per research question, to iterate the following three sub–steps. The iterative cycle terminates when applying the PARAGon framework to case studies results in a natural representation and judgements that correspond to real–world judgements or what we would intuitively expect. Although, ‘natural representation’ and ‘intuitive expectations’ are subjective, the representation and reasoning are made precise so that they can be argued for and against. – Gather case studies: Each research question addressed a real–world governmental process to formalise and automate. To answer the research questions, the first step was to gather or synthesise relevant case studies against which the framework was developed, to ensure it was grounded in a realistic setting. – Formalisation: The next step was to take the relevant case studies and understand the specific reasoning involved in order to come to the intuitive outcome for each case study. Then, to provide a more general account of the reasoning through formalisation, defining a formal syntax and semantics, potentially coupled with a corresponding computational mechanism. Following Hansson’s argument [114], the purpose of formalisation is not to produce an empirically supported theory, but rather to precisely define previously informal concepts (in our case secondary rules, governance of institution design and so on). – Model checking case studies: given a formal language comprising a representation and semantics, it is possible to formally represent the case studies and construct models for those case studies. By a model, we mean a logical model, which for a logical theory is a structure that satisfies the theory (if such a structure exists). By constructing a model, it is possible to check various properties of the theory. In our case, the logical theory is an institutional specification and 12 1. I NTRODUCTION a series of events. The events either occur hypothetically as a part of an offline institution design check (e.g. checking how the institution behaves when an agent decides to collect data) or events which occur in reality (e.g. agents voting on rule enactments). The properties being checked are whether an institution design is compliant, ways to rectify non–compliance and which rule changes have validly been enacted and when. During this step, it was often revealed that there were counter–intuitive results for the developed semantics and given case studies, consequently further refinement of the formalisation was required and the previous steps repeated. Putting it all together: The final step in the research approach was to apply the results and reflect on open questions. This step takes the application further to show its practical relevance by implementing part of the PARAGon framework in a prototype system described in Chapter 7. Each component of the PARAGon framework has its own implications. In this step those implications are compared and synthesised into an overall conclusion and set of unanswered questions in the final chapter, Chapter 8. 1.3. T HE SHINE P ROJECT This research was initiated and supported by the SHINE project of TU Delft. SHINE was a large interdisciplinary research project. It aimed to develop techniques for acquiring and coordinating large numbers of heterogeneous data resources (e.g. cellphone sensors, radars and people). The idea was to use these sensors to gather a wide range of detailed environmental data (e.g. rainfall and pollution levels). In so doing, various stakeholders (e.g. citizens, municipalities) can gain answers to questions pertaining the environment (e.g. ‘how do I get from A to B whilst avoiding flooding?’). SHINE looked at the problem from many different angles, such as algorithms for configuring sensors, user modelling, governing and coordinating resources, and visualising the acquired data to help answer questions. This dissertation contributes techniques for formalising governance, with a focus on formalising governance which is, arguably, particularly suitable for governance and coordination of ‘SHINE–like’ sensor systems of various types. For example, governing and coordinating systems of cellphones gathering geospatial audio data to determine crowding levels or systems of weather radars used to determine rainfall levels. The formalisation is applied to a mixture of governance case studies, from national and international data and human rights laws to imagined SHINE sensor system regulations. The idea is to formalise compliance in multi–level governance and institutional enactment validity as found in the social world to support automated ‘SHINE sensor system’ governance. Multi–level governance is relevant to SHINE according to the argument that it is a necessary governance architecture for governing heterogeneous sociotechnical systems (e.g. what is also called polycentric governance [197, 198]). We will exemplify why using examples concerning SHINE systems. On the one hand, a homogeneous sensor system comprising users crowdsourced into donating their cellphone sensors can, arguably, be governed with a single set of related regulations. For example, regulations defining a communal economy with a single incentive for users to contribute data (i.e. receiving data from a common pool in return). On the other hand, SHINE aims to form heterogeneous sensor systems 1.3. T HE SHINE P ROJECT 13 which, arguably, are unsuitable for a ‘one–size–fits–all’ set of regulations. For example, a system comprising weather radars contributed by organisations could operate best as a market economy, where organisations are incentivised to join the system in order to trade data. In this case, the regulations for a crowdsourcing sensor system operating as a communal economy are entirely inappropriate. One possibility is to view each set of sensors as a separate sensor sub–system and write regulations to govern those sub–systems separately to form a super system of sub–systems. However, this places a burden on the SHINE–system institution designer in writing appropriate regulations for each sensor sub–system. Multi–level governance offers an architecture to move the burden of writing specific regulations from the SHINE–system institution designer to the sensor sub–system stakeholders. The architecture proposes a solution, in the same vein as existing proposals of poly–centric governance for smart–grids comprising heterogeneous energy sub–systems [57]. The idea being, that the stakeholder wishing to form a heterogeneous SHINE sensor system crafts an institution at a second governance level which governs the design of institutions governing the separate sub–systems. The ‘SHINE institution’ is a thin governance layer, comprising abstract regulations requiring that sub–sensor–systems are governed by institutions which regulate resources towards collecting useful environmental data and punishing sensor owners for contributing erroneous data. Appealing to the principle of subsidiarity, what can be done at the local level should be left up to the local level, the SHINE institution would give space for the sensor sub–system stakeholders to determine which data is collected and what the incentives are (e.g. a market economy or a communal economy). In return, sensor sub–system stakeholders can design institutions to govern those sub–systems in order to join the SHINE super–system and gain data from other sub–systems in return. The PARAGon framework helps to operationalise multi–level governance for forming SHINE systems governed by a higher–level SHINE institution, by automating compliance checking and non–compliance rectification. The automated reasoning for compliance checking is also applicable to the SHINE project’s aim of crowdsourcing the existing sensors people already own and their time. For example, crowdsourcing people in donating their cellphone audio sensors in order to detect geo–spatial crowding, or crowdsourcing people into taking photographs of the sky when requested to determine pollution levels. This type of sensing is dubbed by the SHINE project as ‘request driven social sensing’ and a key idea behind it is that people are offered contracts for use of their devices and time. Since people are ideally offered many contracts to address many data needs as and when they arise, it is important cellphone users can automatically accept or reject contracts on the basis of policies they define stating how, when and for whom their cellphone sensors can be used. In this situation, a policy stating sensor usage governs offered contracts. The automated multi–level governance reasoning can be used to automate such contract rejection and is implemented in a prototype simulated crowdsourced mobile sensing system described in Chapter 7. Secondary rules governing institutional enactment are relevant to SHINE from the perspective that they provide sensor system stakeholders a flexible and automated way to govern sensor systems’ regulatory change. Flexibility is meant in two senses. Firstly, stakeholders are able to make how regulatory change legally operates flexible. This is important since the sensing aims or dynamics of the system are liable to changing over time and hence regulatory changes need to be enacted to meet stakeholders new aims or system par- 14 1. I NTRODUCTION ticipant’s changing behaviour. Secondly, the way in which the regulatory change enactment process is defined is flexible. For example, one sensor system can define regulatory change as requiring sensor system participant’s democratic vote, this might be suitable for a system of crowdsourced cellphone users that donate their cellphone sensors to the system partly due to having a say in how that system is run. In another case, where designing regulations requires highly–technical knowledge of sensors’ operation, a sensor system’s regulatory change may be defined on the basis of elected technocrats coming to an agreement. Hence, secondary rules allow a diverse range of governance and regulatory change enactment styles to be defined for different sensor systems in a way that enables those system’s regulations to adapt, as deemed appropriate, to new aims and needs. The PARAGon framework supports realising these benefits by contributing formalisation to automatically determine how and when regulatory changes are legally enacted. For example, such as due to a vote to move a system from a market economy where data is traded to a communal economy where data is contributed to a common pool and shared. Moreover, formalisation means the way in which changes are enacted is automatically changed according to legal rule changes, such as moving from a directed democracy to an elected technocracy. Automation means system stakeholders can operate a flexible governance system at lower cost and therefore makes systems where flexible governance is necessary, such as for diverse SHINE sub–systems, more viable. 1.4. D ISSERTATION O UTLINE The dissertation outline is depicted in figure 1.1. This dissertation is broken up into the introduction (Chapter 1) and the background (Chapter 2), then the main contributions of formal reasoning for governing institution design and change enactment (chapters 3 to 6), and finally an illustration of the framework’s application (Chapter 7) and the conclusions (Chapter 8). The main technical contributions begin by looking at soft constraints. These are constraints that create the possibility for (non–)compliance and, respecting agents’ autonomy, cannot be guaranteed to be complied with. In our case, the soft constraints specify how an institution should be designed (chapters 3 and 4). We subsequently contribute a mechanism for revising an institution design to be compliant with such soft constraints (Chapter 5). Then, we move to reasoning about governance in the form of hard institutional constraints. These are constraints that are not violatable. In our case, the hard constraints are secondary institutional rules defining when institutional change enactment is possible (Chapter 6). The following chapters are described in more detail: Chapter 2 provides background starting with an overview of the informal concepts we wish to formalise and reason about. Then, proceeding to analyse the existing knowledge and its gaps in formalising governance of institution design and change enactment. Next, suitable frameworks that provide preliminary formalisation on which to build the PARAGon framework are compared. Finally, suitable foundational formalisations are selected on which this dissertation builds. Chapter 3 contributes a formalisation of compliance in multi–level governance, providing a way to precisely determine compliant institution designs in a predictable way. 1.4. D ISSERTATION O UTLINE 15 Chapter 1 Introduction Chapter 2 Background Institutional Design Compliance Chapter 5 Rectifying Institutional Design Non-Compliance Chapter 3 Formalising Compliance Chapter 4 Computational Compliance Checking Chapter 6 Institution Change and Enactment Validity Chapter 7 Application Chapter 8 Conclusions Figure 1.1: An overview of the dissertation with suggested reading orders. Chapter 4 contributes the computational means to go about detecting compliance in multi–level governance, furthermore this chapter contributes a computational framework which is sound and complete with respect to the more theoretical formalism in the previous chapter. Chapter 5 contributes a computational mechanism to automatically rectify non– compliant institution designs. Chapter 6 contributes a practical formalisation of institution design validity, looking at when rule changes count–as legal rule change enactments in the face of secondary rules governing the rule change enactment process. Chapter 7 describes a prototype application of compliance checking institution designs (contracts in this case) to forming networks of crowdsourced users and their cellphones in order to collect and aggregate weather data whilst giving users autonomy over how, when and for whom their devices are used. Chapter 8 concludes with discussion on the contributions, implications and directions for future work. 16 1. I NTRODUCTION 1.5. L IST OF P UBLICATIONS The chapters in this dissertation are based on the following publications: King, T. C., Li, T., De Vos, M., Dignum, V., Jonker, C. M., Padget, J., & van Riemsdijk, M. B. (2016, July). Automated Multi–level Governance Compliance Checking. Journal of Autonomous Agents and Multiagent Systems (JAAMAS). International Foundation for Autonomous Agents and Multiagent Systems. (In Submission) King, T. C., Dignum, V., & Jonker, C. M. (2016). When Do Rule Changes Count–as Legal Rule Changes? In Proceedings of the 22nd European Conference on Artificial Intelligence (ECAI 2016). Frontiers in Artificial Intelligence and Applications. Vol 285. (pp. 3 – 11). IOS Press. http://doi.org/10.3233/978–1–61499–672–9–3 King, T. C., Li, T., Vos, M. De, Jonker, C. M., Padget, J., & Riemsdijk, M. B. Van. (2016). Revising Institutions Governed by Institutions for Compliant Regulations. Coordination, Organizations, Institutions, and Normes in Agent Systems XI: COIN 2015 International Workshops, COIN@ AAMAS, Istanbul, Turkey, May 4, 2015, COIN@ IJCAI, Buenos Aires, Argentina, July 26, 2015, Revised Selected Papers., 9628, 191 – 208. King, T. C., Li, T., De Vos, M., Dignum, V., Jonker, C. M., Padget, J., & Riemsdijk, M. B. Van. (2015). A Framework for Institutions Governing Institutions. In Proceedings of the 2015 International Conference on Autonomous Agents and Multiagent Systems (AAMAS 2015) (pp. 473–481). Istanbul, Turkey: International Foundation for Autonomous Agents and Multiagent Systems. King, T. C., Liu, Q., Polevoy, G., Weerdt, M. de, Dignum, V., Riemsdijk, M. B. van, & Warnier, M. (2014). Request Driven Social Sensing (Demonstration). In A. Lomuscio, P. Scerri, A. Bazzan, & M. Huhns (Eds.), In Proceedings of the 2014 International Conference on Autonomous Agents and Multiagent Systems (AAMAS 2014) (pp. 1651 – 1652). Paris, France: International Foundation for Autonomous Agents and Multiagent Systems. King, T. C., Riemsdijk, M. B. Van, Dignum, V., & Jonker, C. M. (2015). Supporting Request Acceptance with Use Policies. Coordination, Organizations, Institutions, and Norms in Agent Systems X: COIN 2014 International Workshops, COIN@ AAMAS, Paris, France, May 6, 2014, COIN@ PRICAI, Gold Coast, QLD, Australia, December 4, 2014, Revised Selected Papers (pp. 114 – 131). Springer. 2 BACKGROUND There is a lot of work which tries to do sophisticated statistical analysis. You know, Bayesian so on and so forth. Without any concern for the actual structure of language. As far as I’m aware that only achieves success in a very odd sense of success [...] I don’t know anything like it in the history of Science. [196] Noam Chomsky 17 18 2. BACKGROUND This chapter makes the following contributions: • An overview of the informal background knowledge from multi–agent systems, philosophy of language and law, and political science. The focus is on institutions, and institutional design and enactment governance. • Formalisation requirements for the PARAGon framework. • A comparison of existing formal approaches and the extent to which they fulfil the PARAGon framework’s requirements. This dissertation formalises reasoning for understanding institutional design and enactment governance. The formalisation supports institution designers in designing compliant institutions and enacting institutional changes in a valid way. The same formalisation allows judiciaries to determine if punishments should be imposed for non–compliant institution designs. Moreover, the formalisation supports agents in understanding when institutional rules are changed. Generally, the objective is to formalise the informal concepts involved in governing institution design and rule change enactment to the extent that the reasoning can be executed by a computer. In this chapter, we give background on the research contributed by this dissertation. First, we situate the research within the wider field of autonomous agents and multi–agent systems in Section 2.1. Then, Section 2.2 gives a broad overview of institutions and norms from an informal point of view. Section 2.3 summarises the formal foundations required for this dissertation to build on and the new formal building blocks this dissertation develops in order to formalise institutional design and enactment governance. Section 2.4 outlines a number of relevant formalisations of institutions on which the contributions of this dissertation can be based. Special attention is paid to identifying to what extent existing approaches can be built on by this dissertation and where there are knowledge gaps. We summarise the knowledge gap in Section 2.6 and outline the approach we take. 2.1. AGENTS AND M ULTI – AGENT S YSTEMS The research presented in this dissertation overlaps with the field of Agents and Multi–agent systems. Examples include socio–technical systems and human societies. To situate this dissertation, it is important to give some background on the general concepts used by the field. When we talk about an agent, we mean an entity which has the ability to act on the world, or in other words possesses agency [211]. Philosophy contributes many agent concepts, primarily dealing with human agents and action. Agency as the ability to act intentionally is a view taken by Bratman [31], Goldman [96] and Mele [169]. Under this definition agents are able to bring about changes of their own volition to realise their intentions. The view that agency is the ability to initiate action spontaneously regardless of intention is taken by Ginet [95], Lowe [161] and O’Connor [184], among others. A more complicated agent, called a ‘person’ is described by [84] as being able to act both on the world and also on their own internal mental states (e.g. realising second–order desires). Agents can be significantly simpler – Dennett [56] questions the conceptual utility in requiring mental attitudes as pre–requisites for agency. He undercuts arguments for requiring 2.1. AGENTS AND M ULTI – AGENT S YSTEMS 19 mental attitudes in the agent concept with Occam’s razor – they should only be ascribed to agents if they help with predicting action. Agents need not be human or biological at all, Wooldridge [240, 241] offers a frequently used definition of an artificial autonomous agent in the MAS community. According to Wooldridge, an agent is software able to act in an environment to meet its own goals, often those given to it at design–time. Without attempting to resolve the differences between these stances the key point subscribed to by this dissertation and the wider field is that agents are able to act on their environment, by extension act in ways that affect one another and importantly act autonomously in ways that cannot be controlled directly. A system comprising agents is called a multi–agent system (MAS). Such systems can be biological (e.g. a nation state comprising humans), artificial (e.g. a software system of agents controlling sensors) or mixed (e.g. a system comprising teams of humans and robots). An MAS is often formed with a goal in mind or an idea of how the agents should behave, from the perspective of the system’s stakeholders (e.g. the members of a nation state or the designer of a software system). For example, a nation state may have the societal goal to minimise the number of car accidents. Another example is a system comprising software agents on people’s cellphones for collecting and aggregating location and sound level data to determine large crowds of people [162]. To achieve the MAS’ ideal and system goals as envisioned by the relevant stakeholders, the agents in an MAS need to act collectively. For example, driving on the same side of the road to avoid collisions or configuring sensors appropriately (e.g. ensuring a microphone is on) for the data being gathered. An MAS is a system comprising agents which is typically designed with an aim or ideal for agents to collectively achieve. The autonomy of agents in an MAS makes it difficult to ensure agents collectively achieve the MAS’ goals. Agents are liable to acting in their own self–interests (e.g. turning cellphone sensors off to conserve cellphone energy rather than contributing data) and if agents are left to their own devices their actions are liable to be uncoordinated (e.g. driving on different sides of the road). Mechanisms for system–wide agent control are required to ensure agents achieve the MAS’ goals. Different mechanisms to control and coordinate agents are available. We split these mechanisms into bottom–up control, top–down governance and bottom–up compliance with top–down control. Which approach is appropriate depends on the level of control a system stakeholder (e.g. software designer, national government) has over the agents and conversely, the level of agency an agent has. • Bottom–up control – this approach relies on being able to control artificial agents directly. Specifically, by programming agents to coordinate their behaviour and collectively achieve the MAS’ goals. Even basic software agents only capable of reacting to a single percept with no memory of past percepts and actions have been shown to exhibit complex emergent coordination such as decentralised gathering and collecting of objects [89]. For more complex cases agent programming languages have been proposed, often based on an architecture where reasoning is compartmentalised into mental constructs such as beliefs, desires and intentions (BDI). In these architectures agents can communicate and therefore be programmed to coordinate their behaviour (e.g. [52, 55, 119, 202, 205]), in the coo–BDI agent architecture for BDI (Belief, Desires, Intentions) agents’ cooperation and coordination is supported with 20 2. BACKGROUND specific constructs for sharing plans [8]. Overall, the bottom–up control approach works by coordinating an MAS from the bottom level comprising the agents and their internal reasoning by regimenting the behaviour of each individual agent, such as by programming their behaviour in being coordinated and collaborative. • Top–down governance – this approach deals with cases where agents cannot be controlled directly. For example, when the agents are biological (e.g. humans). Since such agents cannot be controlled directly they are liable to act in their own self–interests. A common example is the tragedy of the commons [115], where given no constraints it is optimal for agents to act in their self–interests based on the premise that other agents will be doing the same. A top–down approach is also required when an open artificial multi–agent system [118] is designed comprising heterogeneous agents that are unknown a–priori. In an open artificial MAS agents are liable to changing over time and are contributed by various programmers such that they are not (easily) reprogrammable and hence should be guided in behaving in the right way rather than being directly controlled. In top–down governance regulations prescribe how agents should behave (e.g. agents should drive on the left) coupled with rewards/punishments to give agents reason to comply (e.g. fines). Whilst in this situation direct control of agents cannot be automated, the top–down governance can. For example, formal and/or automated reasoning for: monitoring agents’ compliance [34, 38, 75, 79, 175]; determining which regulations apply and when and which agents are compliant and should be rewarded or punished [25– 28, 40, 42, 43, 58, 63, 97–103, 103, 130–132, 159, 160]; synthesising institutions [176–178]; verifying institution designs meet certain correctness properties and do not enable agents to exploit regulations [148, 167]. In this approach societal coordination is realised by top–down governance in the sense that it operates at a level sitting above the entire system and governs agents rather than directly controls them. • Bottom–up compliance with top–down governance – this approach lies in between the two previously mentioned approaches as a way to automate compliance with top–down governance. In this approach, norm–aware agents are programmed. A norm–aware agent could be an artificial agent contributed to an open MAS with top– down governance. Here, the agent can act appropriately to comply with the top– down governance with no assumptions that the regulations placed on the agent will be known a–priori. Research in this area has focussed on agent programming languages, semantics and reasoning for agents acting in a compliant or preferable way way with the regulations and organizations the agents might join (e.g. [6, 50, 52, 124, 128, 129, 152, 170, 218, 222]). This dissertation provides reasoning for both top–down governance and bottom–up compliance with top–down governance. Top–down governance reasoning is provided for determining whether institutions are being designed in a bad way (i.e. the designs themselves are non–compliant in multi–level governance) or institutional changes are enacted without following procedure (i.e. secondary legal rules are not adhered to and thus institutional changes are invalid). Bottom–up compliance with top–down governance is provided for institution designers themselves, so that they can design institutions in a compliant 2.2. G OVERNING M ULTI –AGENT S YSTEMS 21 way and validly enact institutional changes. In the former case, bottom–up compliance is supported with automated reasoning to find explanatory rectifications for non–compliant institutions. In the next sections we will give background on institutions and governing institutional design and enactment. 2.2. G OVERNING M ULTI –AGENT S YSTEMS In this section we discuss governance of multi–agent systems from a conceptual point of view. This dissertation builds on concepts of institutions, discussed in Section 2.2.1 and norms discussed in Section 2.2.2. This dissertation contributes new formal conceptualisations involved in institutional design and enactment governance. Background informal concepts for institution design and enactment governance are described in Section 2.2.3. 2.2.1. I NSTITUTIONS Institutions provide top–down governance of agents. A definition from economics is given by North [182], as a set of rules regulating behaviour enforced with rewards and punishments. For example, fining agents or simply deviating from certain rules being considered a societal taboo and therefore affecting trust. Ostrom [185] provides a similar definition, put best in her own words as “the prescriptions that humans use to organize all forms of repetitive and structured interaction”. In legal theory Ruiter [208] agrees with North and also analogously refers to institutions as a kind of “social agent”, realised as agents practising the institution with behaviour that complies with the institution’s rules. John Austin [14] viewed the law (legal institutions) as rules laid down by one individual who has power over another. Alternatively, Ruiter [208] also views contracts between agents as legal institutions. In legal positivism, legal rules’ validity depends on the source (i.e. whether legislated by a legislator) [88]. According to these definitions regulative rules are an essential part of an institution and when an institution is legislated, such as by a parliament, it is a legal institution. In philosophy [173] an institution is viewed as comprising regulative rules but also rules establishing the language and concepts with which agents and a social reality are talked about. For example, a rule stating ‘I do’ establishes what we call ‘marriage’. Such rules come about through social acceptance. Concepts such as marriage established by an institution, according to Searle [213, 215], are institutional facts and come about only because an institution makes social actions (e.g. marrying) possible. These institutional facts describe a social reality ascribed by the institution, giving an institutional interpretation of the brute (actual) reality. Searle refers to the facts that are independent of an institutional interpretation as brute facts, referring to a ground truth. For example, an institutional fact might be ‘paper’ which refers to a brute fact ‘the thing we call paper’. Searle proposes constitutive institutional counts–as rules of the form “A counts–as B in a context C”, to which from brute facts (As) ascribe more abstract institutional facts (Bs) in a particular social context entailed by the social reality (Cs). For example, the thing we call paper counts–as paper. In turn institutional facts may count–as further institution facts. For example, an agent does not just possess paper with 10 euros written on it, various watermarks and an identification number. Rather, that piece of paper is collectively agreed as counting–as money in the context of a particular nation state and so the agent possesses money in the right context. Counts–as 22 2. BACKGROUND rules establish a concise social description of reality, which can feasibly be talked about at a more abstract, social level, than would otherwise be possible (e.g. ‘money’ is far more concise than a fine–grained description of everything that constitutes money). Searle argues counts–as rules also ascribe special statuses and deontic powers to various concepts [215]. For example, a piece of paper that counts–as money gives an agent possessing it the special deontic power to purchase goods. But, only because there is a social institution ascribing a special status to the money. On the deontic dimension of institutions, Searle says that various obligations are entailed by an institutional fact having a certain status. For example, a police person has a socially recognised status where they are obliged to uphold the law. In fact, Searle states that counts–as rules ascribing institutional facts and assigning statuses to those facts are necessary for there to be a deontology – “No language, no status functions. No status functions, no institutional deontology” [215, p.14]. Searle states institutions contain constitutive counts–as rules, which create a social reality from brute facts, and counts–as rules are necessary for a deontology. Ricciardi [206] views related constitutive rules (e.g. all the rules ascribing meaning and status to money) as constituting the institution they belong to (e.g. the ‘money’ institution). A classic example from Ricciardi is the rules of chess constituting the game of chess and the institution of chess. Moves can physically be made on a chess board that do not conform to chess’ rules, but then the game of chess is not being played and the chess institution does not recognise those moves. Hence, an institution (e.g. chess) is its set of rules. The key points in these definitions subscribed to by this dissertation are: • Institutions can be created by law makers (legislation), between agents (contracts) or through social acceptance. This dissertation mostly focuses on legal case–studies, but we do not tie ourselves to any particular institution source. • Institutions are a set of related counts–as rules, which ascribe a social meaning to brute facts by building an institutional reality comprising institutional facts (n.b. this differs from the more complicated notion of an institution as a social agent). Chapter 3, and Chapter 6 focus on formalising constitutive rules. • Institutions are used to govern and guide agents towards an ideal with rules and regulations (a deontology), rewards and punishments. Chapters 3 to 5 focus on this regulatory aspect of institutions. • Counts–as rules and a social reality are necessary for an institution to have a deontology. In the next section we will describe in more detail the deontic aspect of institutions and its informal representation. 2.2.2. N ORMS In this section we discuss institutional regulations, called norms, further. Norms state what the social reality should be (e.g. an agent should pay for a train ticket before boarding a train). With a suitable mechanism to ensure norms are abided by, norms guide agents towards an ideal. Two mechanisms to ensure norms are abided by are discussed in the literature: regimentation and enforcement. 2.2. G OVERNING M ULTI –AGENT S YSTEMS 23 Regimentation [135] forces norm compliance on agents by controlling their behaviour directly. For example, by programming agents so they cannot board a train unless they have paid for a ticket or by constructing a barrier at the train station that does not let agents onto the train platform unless they have a ticket. One drawback of regimentation is that it assumes hard constraints can be implemented (e.g. an agent can be directly programmed or there are physical barriers that can be constructed). Another drawback is that regimentation does not acknowledge that there are exceptional circumstances under which norms should not be followed – for example when an agent needs to drive faster than the speed limit in the case of an emergency. Regimented norms act as hard constraints on agents’ actions, which is not always possible or in the best interests of the agents and the system. We do not consider norm regimentation in this dissertation. Enforcement [107] gives agents the option to comply with norms that act as soft constraints on agents’ behaviour. To give reasons for agents to comply, secondary reward and punishment norms come into force if a primary norm is violated. For example, a norm stating an agent should pay a fine for boarding a train without a ticket. In turn, the secondary norms can have further enforcing norms. For example, a train guard that finds an agent who refuses to pay a fine should throw the non–compliant agent off the train. This dissertation considers norms that can be violated and are supported through enforcement. Norms take two common forms in the literature. Firstly, an evaluative representation lacking an explicit deontic modality (obligation/permission/prohibition). Secondly, a modal representation where the deontic modality is explicit. Evaluative norms are found in some formal work [9, 105]. In an evaluative representation norms are represented as counts–as rules denoting that “A counts–as being good/bad/compliant/a violation in a context C” with no reference to obligation/permission/prohibition. To give an example based on the UK’s data retention regulations [226] – a communications provider (e.g. telephonics company) retaining all of a person’s communications meta–data (e.g. the time a phone call was made) counts–as compliance in the context that the communications provider is operating in the United Kingdom. An evaluative norm creates evaluative institutional facts in the social reality. For example, creating ‘compliance’ if meta–data is stored. The social reality does not represent which norms are in force (what should be done). If we want to know whether the UK’s data retention regulations require meta–data to be stored then the query is “do the rules state storing meta–data counts–as compliance in a context that holds in the present social reality?”. Determining which evaluative norms are in force requires assessing the constitutive rules for whether they ascribe a concept counting–as compliance/violation in a context that holds in the social reality. Modal norms are counts–as statements ascribing explicit deontic (obligation/prohibition/permission) positions in the social reality. Specifically, as Searle proposed in [213, p. 63] “A counts–as undertaking an obligation to do B in context C”. For example, communicating using a communications provider’s services establishes an obligation for the communications provider to store your meta–data in the context that they are operating in the United Kingdom. A modal representation creates a deontic position in the social reality. For example, an obligation to store communications meta–data. The social reality explicitly represents what should be the case or should be done. If we want to know whether the UK’s data retention regulations require meta–data to be stored then we can look at the social reality for whether storing meta–data obliged. Determining which modal norms are 24 2. BACKGROUND in force requires inspecting the built social reality for which deontic modal statements hold. In this dissertation, one objective is to reason about norms that govern other norms. Expressing and determining that particular norms should (not) be imposed differs between modal and evaluative norms. There are two ways for a norm to express that it is required that other norms do not require storing communications metadata in the context that a user has not consented to their communications metadata being stored. In the evaluative form one possible representation is to nest a counts–as rule within another counts–as rule. For example, “the rule (storing metadata counts–as compliance in a context C) counts–as a violation if context C is somehow compatible with the user not consenting)”. There may be other evaluative representations, but it appears to be the simplest that fully captures a norm stating the requirement for other norms to not require a specific social fact. In a modal form an unconditional constitutive rule seems to express the same thing – “it is prohibited to oblige a user’s metadata to be stored in the context that they have not consented”. The modal norm appears simpler and with little difference between prohibiting an obligation to store metadata and the modal norm obliging metadata to be stored. We would expect that determining compliance is more or less the same for a modal norm obliging storing metadata compared to a modal norm prohibiting obliging storing metadata. In comparison, the evaluative version seems far more complex and is not a simple generalisation of evaluative norms about events. This dissertation considers a modal norm representation for simplicity of reasoning about norms that regulate other norms. Norms prescribe a social reality and are often used together with counts–as rules ascribing non–normative institutional facts. According to Sergot [216, 217], and Jones and Sergot [135], a legal system (what we call an institution) largely consists of rules that define concepts (what we call counts–as rules ascribing institutional facts). Secondary in occurrence to rules defining concepts are the institution’s norms. Definitional rules are used for succinctness, according to Ross [207]. For example, we can define storing communications metadata or content data as counting–as storing personal data. If we want to describe a new concept relating to personal data then we can refer to personal data rather than everything that constitutes personal data. For example, disrespecting someone’s privacy is storing their personal data without their consent, rather than storing their metadata or content data or ... without their consent. Such definitional rules, according to Grossi et al. [109] and Breuker et al. [32], allow norms to be issued more succinctly over abstract concepts. For example a norm stating “you should not disrespect someone’s privacy” is more succinct than “you should not store content data without consent”, “you should not store metadata without consent”, etcetera. Institutions largely comprise concept defining rules, which ascribe an abstract social reality, over which norms are concisely defined. The key points in these definitions subscribed to by this dissertation are: • Norms can take an evaluative or a modal form. An evaluative form does not make explicit that there is an obligation/prohibition/permission in force, it simply states a social action will cause compliance or a violation. A modal form makes explicit that something is obliged/prohibited/permitted in the social reality. The modal form offers a simpler way to represent norms governing other norms and a straightforward way to evaluate such norms. Chapters 3 to 5 formalise modal norms. 2.2. G OVERNING M ULTI –AGENT S YSTEMS 25 • Two ways to ensure norms are abided by are found in the literature – regimentation and enforcement. Regimentation assumes agents can be directly controlled. Enforcement does not assume agents’ actions can be controlled, instead it aims to guide agents’ behaviour. This dissertation does not make assumptions that agents can be controlled directly. In chapters 3 to 5 we look at soft constraints which guide, rather than regiment, agents in their actions within an MAS and how they design institutions. However, in Chapter 6 we look at a kind of hard constraint in the form of rules stating which institutional rule changes are possible. These are not hard constraints in the traditional sense (e.g. physically preventing an agent to board a train or directly controlling an agent’s reasoning to comply with norms). So, we call these hard institutional constraints. • Norms are defined in terms of an abstract social reality created by counts–as rules. Counts–as rules and norms are closely tied, counts–as rules by building an abstract social reality provide a pragmatic means to author concise norms. The link between constitutive rules ascribing abstract concepts and norms defined over these abstract concepts is focussed on in Chapter 3 and Chapter 4. Counts–as rules that make the social action of changing rules possible are addressed in Chapter 6. 2.2.3. G OVERNING I NSTITUTIONAL D ESIGN AND E NACTMENT In this section we discuss how institution designers, such as legislators, are governed. The need to govern institution designers is motivated by the fact that they are autonomous agents. Being autonomous agents, institution designers are liable to behaving in ways that are sub–ideal. For example, designing an institution that takes away agents’ rights or enacting institutional rule changes without following relevant procedure, such as obtaining a majority vote from a parliament. Hence, we look at how institutional designers are governed in their institutional designs and institutional change enactments, which we describe further from an informal point of view in this section. G OVERNING I NSTITUTIONAL D ESIGN : M ULTI – LEVEL G OVERNANCE The problem with agency is that agents are liable to acting undesirably and hence need institutional governance; the problem with institutional governance is that autonomous agents can design subjectively ‘bad’ institutions. For example, an institution can lack coordinated regulations with institutions governing other jurisdictions or place unacceptable limits on agents’ rights. One solution is to override an institution designers’ regulations. But this would violate their autonomy and the principle of subsidiarity – what can be legislated at the local level should be left up to the local level. Hence, institution designers need to be guided in designing subjectively good institutions. In MAS agents are guided towards good behaviour with institutions governing their actions. In order to guide institution designers, institutions are used to govern institution designs. Multi–level governance is an umbrella term for governance styles where institution designs themselves are governed. We depict it abstractly in Figure 2.1. The term multi–level governance is taken from political science [121] (alternatively called multi–tier and polycentric governance). An early conceptualisation by Marks [166] views multi–level governance as negotiation between state actors in the European Union to achieve coordinated 26 2. BACKGROUND Institution Highest-level Governs Increasingly Abstract Regulations Non-compliant Institution Compliant Institution Governs Governs Compliant Institution Governs Compliant Institution Governs Compliant Institution Second-level Governs Non-compliant Institution Governs Compliant Institution First-level Governs MASs Figure 2.1: A high–level overview of multi–level governance. At the bottom level there exists MASs (e.g. nation states, sensor networks). The first level comprises institutions governing MASs (e.g. national legislation, or institutions governing artificial societies such as sensor networks). The second–level comprises institutions governing the first–level institutions (e.g. EU directives, cross–MAS objectives). The highest–level comprises institutions governing lower–level institutions (e.g. human rights charters and constitutions). goals through regulatory change. The negotiated outcome being binding agreements/institutions between EU member states to design their institutions (national legislation) in such a way that they implement those binding agreements. In effect, the negotiations establish a hierarchy of institutions. The negotiated binding agreement being a higher–level institution governing the design of member states’ legislation, which are lower level institutions. More recently, Börzel and Risse [30] conceive multi–level governance as existing at sub–national, national and supranational levels. Conceptually, elected institutional designers (i.e. local councils, national governments, EU governing bodies) create institutions to govern institutions at lower governance levels and comply with institutions enacted at higher governance levels. Hooghe and Marks [121] classify multi–level governance into two types. In the first type, an institution at a higher–level governs a jurisdiction of institutions nested at a level below. In this type lower–level institutions do not belong to any other jurisdiction and are only governed by a single institution at the level above. In the second type institutions at each level can belong to multiple jurisdictions and therefore be governed by multiple higher–level institutions. More generally, multi–level governance comprises institutions at higher governance levels (e.g. EU directives) governing the institution designs operating at lower governance levels (e.g. national legislation) which in turn might govern institution designs at even lower governance levels (e.g. sub–national regulations) etcetera. Multi–level governance guides institution designers towards enacting ideal regulations. Eichener [65] showed multi–level governance in the European Union successfully resulted in cooperating legislation on occupational safety. By issuing higher–level institutions, an EU directive, the EU established workplace health and safety regulations across the EU. The health and safety regulations were coordinated in the sense that no country had more relaxed regulations allowing them to out–compete other member states on labour costs. Hence coordinated regulations ensured no ‘race to the bottom’ was triggered. From a human rights point of view, multi–level governance has ensured legislation that violated cer- 2.2. G OVERNING M ULTI –AGENT S YSTEMS 27 tain rights of agents is revoked, such as the right to privacy set out by EU human rights law [48, 70]. In Artificial Intelligence, Diaconescu and Pitt [57], Pitt and Diaconescu [198], and Jiang, Pitt and Diaconescu [133], view the multi–level governance paradigm as being applicable to artificial societies such as smart grids. In [57] sub–systems of energy users are governed by institutions, each sub–system (e.g. a small housing community) has its own governance to manage its own energy production and usage. Sub–systems can cooperate, requiring coordinated regulations, such as to ensure greater energy stability by sharing energy. Coordinated regulations can be achieved with hierarchical governance, where an overarching institution ensures institution’s regulations at lower–levels are compatible. Multi–level governance helps to ensure that regulations are subjectively ideal in the sense of being coordinated across jurisdictions and upholding agents’ rights. In multi–level governance, institution designs are governed with regulations that govern other regulations. Since multi–level governance is regulatory it implies compliance is possible but not guaranteed. Hence, regulations governing regulations also give the possibility for non–compliant institution designs. In order to ensure institution designers comply, non– compliance can result in legal action being brought about [210], which Smith [219, p. 15] argues is necessary for effective multi–level governance. From a philosophical tradition, Von Wright argues that [236] regulation governing regulations (or in his words, higher-order norms) are really there to transmit will. By which we mean, for example, a regulation requiring another regulation to oblige communications meta-data is stored, is really issued because the issuer wishes not just that there is an obligation for meta-data to be stored, but also that meta-data is actually stored. That is, the issuer is transmitting their will for meta-data to be stored via an intermediary regulator, operating at a lower governance level, acting as a conduit for their will. Following this idea, it has been shown by Boella and van der Torre [29] that in order to transmit will via regulation governing regulations there must be regulation enforcement with reward and/or punishment. Two types of enforcement required for effective regulation governing regulations, need to be distinguished. First, enforcement of the regulation governing regulations, such as punishing EU member states for not implementing an EU directive, which helps to ensure the will is transmitted from the higher-authority to a lower-authority. Secondly, the enforcement of the regulations governing society, which are designed to be compliant with regulation governing regulations. For example, the Data Retention Directive [71] requires other regulations to not just oblige meta-data to be stored but also to enforce that obligation by punishing for not storing meta-data. Without enforcement, a regulation could be compliant with a directive by obliging meta-data to be stored and yet that obligation would be meaningless since it is unenforced. Moreover, enforcement is required so that the will of the higher-authority (e.g. an issuer of an EU directive) is transmitted all the way down to the societal level. Philosophically, regulation governing regulations only make sense if firstly they are enforced through reward/punishment for (non–)compliance and secondly if they also require the enforcement of the regulations that they require to be implemented (if any). Determining such (non–)compliance in multi–level governance is different from determining the compliance of societal members with an individual institution. The main difference is that in multi–level governance, when compared to single–levelled societal governance, regulations operate at different levels of abstraction. Regulations are the most 28 2. BACKGROUND abstract in the highest–level institutions and the most concretely defined in the lowest–level institutions. To give an example, at the (typically) highest level of governance human rights charters use abstract terminology such as ‘fairness’ or ‘privacy’ which can have many different interpretations. At a slightly lower–level, such as supranational agreements or EU directives, the terminology is more precise but countries can comply in different concrete ways. For example, the Data Retention Directive [71] states that member states should legislate for communications metadata (e.g. the time of a phone call) to be stored between 6 and 24 months. The directive’s regulation is far clearer than human rights regulations, but does not provide the precise data retention time. At a slightly lower–level, such as at the level of nation–states, regulations are more concrete. For example, providing a precise time in which data should be stored. In multi–level governance increasingly abstract regulations are prescribed at increasingly higher levels of governance which can be interpreted in many different ways, making determining compliance of institutional designs different from determining compliance of a society’s members. Institutional design compliance is determined by legal monitors such as courts, which interpret concrete regulations to determine if they violate more abstract regulations. To give an example, the European Court of Justice [70] determined that the Data Retention Directive’s relatively concrete requirement for communications metadata to be stored violated the EU Human Rights Charter’s requirement for personal data to be processed fairly [72]. The judgement was based on the interpretation that storing metadata was the same as storing personal data, and storing personal data without someone’s consent was the same as processing data unfairly. In a different context, where someone has given consent, storing personal data would not be unfair data processing. Hence, a relationship between concrete concepts having a context–sensitive abstract meaning is used to determine compliance between concrete and abstract regulations. According to the Searlian institution concept we adopt, the context–sensitive rules linking concrete and abstract social facts are constitutive rules. Hence, the relation between concrete and abstract norms as found in multi–level governance is derived from constitutive rules. To summarise, institutions govern the design of other institutions in what is known as multi–level governance, the main points are: • Constitutive rules provide context–sensitive links between concrete and abstract concepts and through a derivation, concrete and abstract norms. Chapter 3 and Chapter 4 adopt constitutive rules to determine links between concrete and abstract norms in different social contexts. • In multi–level governance abstract regulations at higher–levels are used to govern concrete regulations at lower–levels. Non–compliant concrete regulations results in punishment. Chapter 3 and Chapter 4 look at formalising and automatically detecting (non–)compliance in multi–level governance. The objective is to flag problems to institution designers before they enact non–compliant institutions (and hence are subject to punishment) and to support higher–levels of governance in monitoring the compliance of lower–level institution designs. In order to support institutional designers in enacting compliant designs, Chapter 5 looks at finding explanatory rectifications for non–compliant institutional designs. • Enforcement should be ensured for regulation governing regulations in two senses. 2.2. G OVERNING M ULTI –AGENT S YSTEMS 29 Firstly, the regulation governing regulations should be supported with rewards and/or punishments. We do not look specifically at formalising reward and punishment for regulation governing regulations, but the fact that it should and does exist motivates the contribution of automated compliance checking in Chapter 3 and Chapter 4. Secondly, regulations governing regulations issued by higher-level authorities really require that lower-level authorities do not just implement certain regulations in order to be compliant, but also enforce those implemented regulations. We do not formalise the general principle of both implementation and enforcement required by regulation governing regulations, but we do formalise the specific requirement of the Data Retention Directive [71] to be supported with punishments for non-compliance in Chapter 3 and Chapter 4. G OVERNING THE I NSTITUTION D ESIGN GAL RULES A SCRIBING RULE C HANGE P ROCESS : C ONSTITUTIVE S ECONDARY L E - Constitutive rules define how a social reality grows out of brute facts describing the ground truth. Moreover, constitutive rules make certain social actions, such as marriage, possible. Since brute facts (the ground truth) are liable to changing, it follows that the social reality is liable to changing too and so too the social actions that are possible. Consequently, constitutive rules both describe how the social reality is built and how it evolves over time. Biagoli [20] views an institution itself as having similar dynamic qualities, referring to institutions (legal systems) as organic sets of rules that in themselves change over time. Constitutive rules regulate the change of the social reality but are also subject to changing themselves. According to Hart [117] the complexity of institutions necessitates institutional rules with the sole function to regulate rule change. Hart refers to these rule–change regulating rules as secondary rules. Secondary rules state how and when rules can be changed, modified, repealed and by whom. To give an example, the Italian constitution states that after a law is voted to be enacted by one of the houses of government it is [204][Art. 73] “promulgated by the President of the Republic within one month of their approval”. Such rules regulate rule change by describing the institution design process that must be followed for rule changes to take place. In other words, rules exist with the exclusive function to state what actions constitute rule changes and thereby make the social actions of changing institutional rules possible. Biagoli [20] views rules regulating rule change as constitutive rules that ascribe what constitutes a rule change. From this perspective, a physical rule change does not necessarily count–as a rule change. Physically changing a rule in the Italian rule book (i.e. writing it down) does not count–as changing the rule on its own. Rather, only the president approving a law previously voted for by one of the government houses counts–as a rule change, making the social action of rule change possible. Following this idea, just as constitutive rules ascribe a social reality, making the social reality possible, constitutive rules ascribing rule change make rule changes possible. An analogy can be made to Ricciardi’s argument [206] of the rules of chess constituting the game of chess where moves made outside of chess’ rules can physically be made but then the game of chess is not being played. Likewise, physical rule modifications can be made that do not follow an institution’s constitutive rule change rules, but then according to the 30 2. BACKGROUND institution the rule change has not actually taken place. Taking this view to its logical conclusion – an institution’s rule–modifying counts–as rules constitute its own rule–change system and ascribe the rule changes that can be made. The philosopher Suber [220] famously describes changing institutional rules as a game commonly known as Nomic. In Nomic, a move is proposing a rule change, debating it and then applying it according to the constitutive rules of the game (e.g. by majority vote or some other mechanism). Changing the system’s rules can affect which rule changes are possible in the first place. For example, changing which agents are constituted as being able to change rules by participating in a vote. Suber observes many paradoxes can also arise, in the simplest case by modifying rules that make rule modifications possible. It follows that an agent wishing to change institutional rules to meet their goals, must understand how rule changes affect the built social reality and similarly which rule changes are possible. The effects of rule change on the social reality and possible rule changes also takes a temporal dimension. At the very least, changing rules in the present affects the social reality and possible rule changes in the future. In some institutions it is only possible to change rules from the present onwards – such as ascribed by the United States Constitution [221, Art. 1 Sec. 9 Cl. 3] “No Bill of Attainder or ex post facto Law shall be passed”. In other institutions rule modifications in the past (retroactive modifications) are possible, such retroactive modifications have been made in the United Kingdom [192, Sec. 58]. Given that changing rules affects which rule changes are possible, changing rules in the past, present and future can affect which rule modifications are possible or even happened up until the present. In other cases, constitutive rules ascribe rule changes conditional on the effects of the rule changes. An example is found in the European Convention on Human Rights [48, Art. 7], which explicitly states that retroactive changes to rules are only possible if they do not criminalise formerly innocent people in the past. In order for an agent to determine what rule changes they can make or what rule changes actually took place according to the institution, the hypothetical effects of rule changes must be accounted for. The main points are: • Institutional rules are dynamic and subject to being changed over time. In order to determine what the social reality is at any given point we need to understand how rules have been modified and the effects of modification. Chapter 6 provides reasoning for rule modifications. • Constitutive rules state what rule changes can be made, that is, the rule changes that are recognised by the institution as being valid. Chapter 6 adopts these kinds of constitutive rules, earlier chapters 3 to 5 adopt constitutive rules in general but not rule–modifying constitutive rules. • Rule changes are conditional on the built social reality, the rule changes that have and will take place and the potential effect of the rule changes on the social reality. Chapter 6 pays special attention to an interdependency between rule changes that are conditional on the built social reality and are able to change the social reality. 2.3. F ORMAL F OUNDATIONS 31 2.3. F ORMAL F OUNDATIONS In the previous section we saw that institution designers are governed in what institutions they should design and institutional rule enactments they can make. The idea of this dissertation is to formalise practical reasoning in a single framework: to determine which institutions should be designed, how institutional design non–compliance can be explained to support rectification and what rule modifications can be made. Several foundations for the framework are elicited based on the requirement for a practical framework, and our overview of the informal concepts we wish to formalise given in the previous section. These foundations are: • A temporal setting – the physical reality is not static, brute facts are subject to change, consequently the social reality is also subject to change. When a currency is decommissioned, the paper that counted–as money no longer counts–as money. If you are an academic, you are obliged to submit papers to conferences before their paper submission deadlines. Practical reasoning implies reasoning for realistic institutions and consequently reasoning for a temporal setting. • Constitutive rules – institutions do not govern over a brute reality, but rather a social reality established by constitutive rules. Constitutive rules are a theory of institutional language and to paraphrase Searle [215, p. 13] if there is no language (e.g. represented as constitutive rules) then there can be no deontology. • Modal norms – institutions govern and guide agents towards an ideal with norms. It is simpler to reason about and represent regulations governing regulations using a modal rather than evaluative norms, as this dissertation sets out to do. On top of these foundations, this dissertation lays the following building blocks for formalising the governance of institutional design and enactment: • Automatically detecting non–compliance in multi–level governance: – Regulations governing regulations – in multi–level governance institutions act to govern other institution designs. The instruments governing institution designs are regulations governing other regulations. – Abstraction based on constitutive rules – in multi–level governance institutions are designed at different levels of abstraction. Lower–level institution’s concrete regulations are interpreted for whether they comply with the abstract regulations at higher–levels of governance. The interpretation between concrete and abstract concepts is based on constitutive rules. In turn, the interpretation of concrete norms in terms of the abstract norms that govern them is derived from relationships between concrete and abstract concepts defined by constitutive rules. • Automatic resolution of non–compliance – when an institution is designed that is non–compliant, punishments can be issued. In order to avoid punishment an institution designer should rectify the underlying causes of non–compliance rather than enacting a non–compliant institution. The assumption is that it is preferable to rectify 32 2. BACKGROUND non–compliance whilst remaining as closely to the institution’s original design goals rather than not enact an institution in the first place. • Determining which rule–changes can be made: – Rule–modifying constitutive rules – institution designers are constrained in which rule modifications they can make by constitutive rules. These constitutive rules ascribe rule modifications based on the context in which the modification takes place, including the hypothetical effects of rule modification. – Modifiable institutions in the past, present and future – institution designers can make modifications to institutions. These modifications can be at any point in time made possible by the rule–modifying constitutive rules. In summary, this dissertation builds on foundational concepts comprising institutional reasoning in a temporal setting, constitutive rules and modal norms. Building on these concepts, this dissertation contributes novel formalisations of institutional notions for institutions governed in multi–level governance, explanations for non–compliant institution designs and institutions comprising rule–modifying constitutive rules, where the institution can be modified over time. Collectively, these novel formal building blocks allow us to reason about institutional design and enactment governance. 2.4. F ORMAL A PPROACHES In this section existing formal approaches for normative and institutional reasoning are compared. We focus on approaches that provide useful historical and conceptual context or provide foundations on which to base our framework. In formal philosophy, deontic logic is the field dedicated to the study of ‘ought’ and other normative statements relevant to institutional reasoning. This section overviews a few systems of deontic logic and related developments. 2.4.1. S TANDARD D EONTIC L OGIC Von Wright’s Standard Deontic Logic (SDL) 1 [234] is the first deontic logic widely considered to be a viable formalisation of ought (see [86, p. 5] for a historical overview dating back to medieval times). SDL is situated in a propositional setting. It introduces modal operators over propositional formulae p to express the deontic modalities of obligation (Op ), prohibition/forbidden (Fp ) and permission (Pp ). Von Wright introduced an axiomatisation for the modal deontic operators which, among other axioms, provided equivalences between the deontic modalities that have been used in many other systems of deontic logic. These equivalences are, what is forbidden is obliged to the contrary (Fp = O¬p ) and what is permitted is not obliged to the contrary/not forbidden (Pp = ¬O¬p ) (i.e. permission is the dual of obligation). This scheme gives us the well known deontic square of opposition depicted in Figure 2.2, succinctly summarising the relationships between the different modalities. 1 n.b. Standard is a moniker and does not denote that SDL is by any means the standard [86, p. 39], hence we do not restrict our search for an appropriate formalism to just SDL. 2.4. F ORMAL A PPROACHES 33 Obligatory Op Prohibited Fp Permissible Pp Omissible P¬p Figure 2.2: The Deontic Square of Opposition [168]. Contraries are denoted with , contradictories are denoted with , implications are denoted with and sub-contraries are denoted with . For further geometric analyses of deontic and related logics see [179]. SDL is not without its problems, rather it is susceptible to a number of so–called paradoxes. In SDL conditional norms, such as if there is a fence ( f ) it should be a white fence (w ) are represented with formulae mixing propositional sentences and deontic operators ( f → Ow ). A problem arises if we extend the previous example with a prohibition on there not being a fence (F f ), a fact that there is a fence ( f ) and the implication that a painted fence implies there is a fence (p → f ). The problem is that it leads to a contradiction in SDL – there ought to be a fence and not a fence (O f ∧ ¬ f ) [201]. However, in principle, there should not be a contradiction. In general, a problem arises where there is a primary norm (forbidden for there to be a fence) that is supported with a secondary norm that when applied represents a level below what is ideal (the fence should be painted white). Potentially, such a secondary norm can also be used to represent a punishment for sub–ideal behaviour or circumstances, for example, you should not speed but if you do then you should pay a fine. Such statements are known as contrary–to–duty norms (CTDs). They are viewed as being an important aspect of the law where norms are commonly used to define punishments for non–compliance or state what the sub–ideal circumstances are [134, 135]. Hence, it is important contrary–to–duty norms are handled adequately. Several proposals address the problems caused by CTDs in SDL. A common view is to distinguish between prima facie oughts, the oughts that on the face of it hold, and all things considered oughts [86, p. 256]. For example, prima facie it is forbidden for there to be a fence and obliged the fence is painted white. All things considered, it is only obliged the fence is painted white. Proposals addressing CTDs thus derive ‘all things considered’ oughts from prima facie oughts. For example, by using defeasible reasoning [209] to exclude prima facie oughts that are violated, in favour of secondary oughts. Other significant approaches are preference–based formalisations [228, 230] which interpret ought as ideal and CTDs as representing sub–ideal circumstances, then separating contradictory oughts into separate worlds of ideality. For example, in the ideal world it is forbidden for there to be a fence, in a sub–ideal world the fence ought to be painted white and both do not hold in the same ideality (hence no contradiction). In all of these approaches the semantics of classical implication are replaced with non–classical semantics. Relevant to our dissertation is the fact that, as expected, such a modal representation for 34 2. BACKGROUND norms supports nesting. Nested deontic modalities such as OOp are grammatical in SDL. Unfortunately, SDL is a strictly non–temporal logic and hence unsuitable on its own for the purposes of this dissertation. Furthermore, SDL lacks constitutive rules; with material implication as the only conditional of which context is not a part. 2.4.2. A NDERSON ’ S R EDUCTION Anderson proposed a logic that replaces SDL’s deontic operators in favour of evaluative norms [9, 10]. In Anderson’s proposal SDL is reduced to alethic modal2 logic by replacing Op with a formula stating that it is necessary (ä) that going against the norm (¬p ) materially implies a violation (V ): ä(¬p → V ). In Anderson’s reduction, norms are rules that ascribe violations. Grossi [105] developed Anderson’s idea further by proposing a logic for evaluative norms expressed as constitutive rules. In Grossi’s proposal a logic of context and ascriptions is proposed. In his proposal implications operating on a context i are introduced, denoted as ⇒cl . Evaluative norms stating that p is a duty are represented as a formula ascribing a i violation V in a context i : ¬p ⇒cl V . In Grossi’s proposal, Anderson’s reduction is realised i in a logic of constitutive rules. Hence, Grossi realises the context–sensitive ascription of abstract institutional concepts, including violation, in a deontic logic. Aldewereld et al. [4] build on these proposals with a formalism for reasoning about evaluative norms at different abstraction levels. They combine constitutive rules to ascribe abstract institutional facts from more concrete brute or institutional facts. Constitutive rules define norms by ascribing evaluative statements (compliant and violation in their case). To give their example, the rule “transferring money with a credit card counts–as payment” ascribes the abstract institutional fact of payment from the more concrete fact of using a credit card. A norm is then “paying counts–as fulfilment’. The norm is abstract in that it states someone should make a payment but it does not concretely define, on its own, what payment exactly is. By providing a semantics for counts–as statements that includes a form of transitivity, norms can also be concretised. For example, through transitivity, using a credit–card counts–as fulfilment. In their proposal, constitutive rules are contextual and hence transitivity only holds between constitutive rules if their contexts are compatible. To summarise, Aldewereld et al. take the principles behind Grossi’s reduction to constitutive rules in order to reason about concretisation of abstract norms. Developments in the reductionist approach to norms are relevant to this dissertation. First, they offer a way to reason about abstract norms, in this case by concretising abstract norms. Hence, it seems that the same approach can be taken to multi–level governance. Perhaps, abstract regulations governing other regulations at higher–levels of governance can be reified to determine their concrete meaning and therefore whether concrete norms violate the abstract norms. Conversely, perhaps the same reasoning can be reversed to take concrete norms and abstract them to determine if they are compliant with more abstract norms. However, a major stumbling block is that by reducing norms to evaluative constitutive rules it is no longer straightforward to represent and reason about regulation governing regulations, as we argued previously. Consequently, this dissertation does not take a reductionist approach to norms. 2 If this is Greek to you, alethic modalities are modalities denoting truth, in comparison to deontic modalities, which denote normativity. 2.4. F ORMAL A PPROACHES 35 2.4.3. T EMPORAL D EONTIC L OGICS The previously described approaches are situated in a static setting with no consideration for time. Hence, they deal with non–temporal norms. For example the norm ‘you should not murder’ has no temporal element. However, in the real world duties are often temporal and contain deadlines. For example ‘you should submit your paper before the submission deadline’. Thus, there are deontic logics that deal explicitly with time, by which we mean a temporal ordering of states containing formulae, including temporal obligations. Several temporal logics independent from deontic logic already exist. The prominent ones are Linear Temporal Logic (LTL) [199], Computational Tree Logic (CTL) [69] and CTL* [68], which combines both. There are also logics of actions as transitions between states. Dynamic logic [116] being a prominent action logic, which combines modal logic operators of necessity and possibility with actions to express and reason about statements such as ‘it is possible that action a will cause p to hold’. A common approach to temporalising deontic logic is to combine a deontic logic and one of the aforementioned temporal or action logics. To name a few. Broersen et al. [33] combine SDL and CTL. They introduce dyadic deontic modalities (O(ρ ≤ δ)) representing a propositional formula ρ should hold before or at the same time as a formula δ representing the deadline. In Broersen et al.’s formalisation if δ occurs before ρ then a proposition denoting violation holds. Conversely, ρ holding before or at the same time as δ causes a proposition denoting norm fulfilment to hold. An obligation holds from one state to the next until it is fulfilled or violated, that is, a norm persists by default. F. Dignum et al. [60] combine SDL and dynamic logic. Obligations can take the form O(α < ρ < δ) representing an obligation conditional on α that requires action ρ to be performed before δ. States also have time indices. The special index now denotes the time of the current state. In F. Dignum et al’s proposal instantaneous norms that must be fulfilled immediately are expressed as O(α < ρ < now + 1) representing that α causes an obligation for ρ to be performed before the next state. F. Dignum and Kuiper [59] combine SDL with a logic of ‘dense’ time in which actions are not instantaneous. Rather, actions are performed over a time period. An obligation O(α) represents that an action α should be continuously performed until it is done. It is interesting to note that violations persist from one state to the next until the norm that has been violated is ‘repaired’ (e.g. by performing some punishing action, such as paying a fine). To summarise, temporal deontic logics allow expressing that there should be an ordering in which propositions hold in states or actions are performed. A temporal obligation holding in a state typically states that at the present time an α should be done/hold before a δ. Obligations persist from one state to another if not discharged. Hence, if α and δ do not occur, then α should still be performed/hold before δ. Instantaneous norms then just state that an α should be done/hold before the next state. In this dissertation we adopt similar notions in Chapter 3, Chapter 4 and Chapter 5 – a deontic statement persists until discharged, and either represents one thing should be done before another or that something must be done instantaneously. 36 2. BACKGROUND 2.4.4. S EINSOLLEN AND T UNSOLLEN : O UGHT– TO – BE AND O UGHT– TO – DO There is a difference between ought–to–be statements about what should hold (seinsollen) and ought–to–do statements about what should be done (tunsollen) [35]. In SDL [234] the two are not distinguished; SDL abstracts away from whether a proposition denotes an action or a state–of–affairs. Subsequent developments have focussed on one or the other, or both. • Ought–to–be – logics of this type are characterised by obligations that hold in states and are about propositions that hold in states. Examples include [33, 53, 98]. It is interesting to note that ought–to–be can represent two types of obligation explored in [98]. The first is an achievement obligation: a state of affairs should be achieved before a deadline. The second is a maintenance obligation: a state of affairs should be maintained up until a deadline. • Ought–to–do – logics of this type are characterised by obligations that hold in states and are about events or actions that occur when transitioning between states. Examples include [33, 58, 60, 122]. It is interesting to note that Broersen et al. [33], Horty and Belnap [122], and V. Dignum et al. [58] use a stit (see–to–it–that) operator (or a version thereof) to represent the action of an agent bringing about a particular state of affairs. For example stitφ is an action to bring about φ in a state. Consequently, ought–to–do statements are framed as ought–to–bring–about a particular state, abstracting away from labelled actions whilst still remaining ought–to–do statements. In this dissertation, we look at obligations about agents’ actions (or events if we view actions as requiring intention). This is because they seem to be more concrete and are frequently found in the law – you should not murder, you should not steal, if you do either you should go to prison. We also look at obligations about obligations to reason about regulations governing other regulations. Yet, obligations are normative propositions that hold in states and so obligations about obligations are seinsollen ought statements about a state of affairs. As Von Wright points out, if obligations are about actions then nested modalities are nonsensical [235, p. 91]. Where does this leave us, do we look at both ought–to–do (obligations about actions) and ought–to–be (obligations about obligations which hold in states)? One approach would be only to look at ought–to–do. Here, the idea is to follow Wansing’s suggestion [237] that nested obligations are obligations to see–to–it–that obligations hold. The idea being that a nested obligation is an obligation to perform a locutionary act to establish an obligation, for example, if we are an authority with legal power, by saying “I command you to do X” we can see–to–it–that there is an obligation to do X (see Searle’s account of how to go from is to ought, or obligations from locutionary promises [212]). The problem is, this means imposing obligations requires agency. However, in this dissertation we set out to look at institutions with regulations that govern other regulations – an institution is not a type of agent, it belongs to a class with instantiations that include the written law, promises, contracts etcetera. Hence, in this dissertation we combine ought–to–do for obligations that govern agents’ actions and ought–to–be for norms governing other norms. The combination of both was 2.5. P RACTICAL F ORMAL G OVERNANCE 37 also looked at by D‘Altan et al. [51]. Chapter 3, Chapter 4 and 5 combine both types of ought. Other aspects, of ought–to–be statements such as maintenance and achievement obligations are not considered in this dissertation. 2.5. P RACTICAL F ORMAL G OVERNANCE In this section a number of frameworks for practical formal governance are proposed. There are many links between deontic logics and the following research described and hence the two cannot be easily disentangled. Rather, the following frameworks are characterised firstly by drawing from a wider informal sphere such as legal and organisational theory, whilst deontic logics come from a philosophical tradition. Secondly, by being pragmatic, such as by having a low computational complexity (e.g. by talking about obligations over single propositions rather than arbitrary propositional formulae) or providing clear links to implementation. It is important to note that this dissertation falls firmly in practical formal governance, since it provides a formal account that is characterised in such a way that the decision procedure is obvious and/or is coupled with a computational framework (i.e. an implementation). 2.5.1. O RGANISATIONAL F RAMEWORKS Whilst this dissertation focuses on institutional reasoning a similar coordination mechanism, multi–agent organisations, is also widely studied for formalisation. Like institutions, organisations comprise a normative dimension. In contrast with institutions, organisations also comprise constructs such as roles agents play and interaction patterns to achieve various organisational objectives. If an institution is legislation, contracts and promises, then an organisation is a university or a corporation within which institutions can play a part in the form of contracts and other bodies of rules and regulations. Consequently, formal reasoning between the two areas has much overlap (e.g. norms), institutions tending to focus on legal concepts (e.g. legal empowerment to affect an institution) whilst organisations focus on cooperation concepts and processes to achieve goals (e.g. interaction patterns). HarmonIA [233] is an organisational framework that focuses on conceptualising ‘electronic organisations’ and methodologies for their design. In HarmonIA, organisations comprise different levels of abstraction. These are an abstract level, concrete level, rule level and a procedure level. At the abstract level, the organisation defines abstract norms such as statutes. At the concrete level the organisation refines the abstract level’s norms to concrete policies. At the rule level further refinements are made to the concrete norms as rules for agents to follow in order to comply with the concrete norms. The procedure level comprises the actual computational implementation of the rules. In HarmonIA norms are modal and their refinement/concretisation is based on the counts–as relation. However, a semantics for norm refinement is not investigated. Instead the approach is given [233, p.94] and tools to automate refinement/concretisation are left for future work [233, p.168]. HarmonIA’s focus is on the conceptualisation and design methodology for organisations in MAS at different abstraction levels, but not the formal reasoning. MOISE+ [124] provides a conceptualisation for designing organisations comprising roles, dependencies between roles and norms. In MOISE+ norms have a modal representation. In contrast to much of the work in formal philosophy and elsewhere, MOISE+ does not 38 2. BACKGROUND provide a formal semantics for norms or other organisational concepts. Rather, it focuses on programming organisations at an agent level and an organisation–control level. At the agent level, the J–MOISE+ (sub–)framework provides a way to program agents to enact roles in a MOISE+ organisation. At the organisation level, the S–MOISE+ [125] (sub–)framework provides an interface for agents to join a MOISE+ organisation. Through the S–MOISE+ interface organisational constraints are regimented on agents as hard constraints such that agents are forced to comply. MOISE+ is an agent–organisation framework focussed on programming agents and organisations, there are many aspects relevant to institutions that are not considered (e.g. constitutive rules, abstraction and rule change). OperA [61] is a framework providing an organisation design methodology and formal organisational reasoning. Conceptually, an organisation in OperA is analogous to a human organisation. An organisation comprises a social structure defining organisation objectives, agent roles and relations between roles; an interaction structure describing scenes for agents to play roles in and landmark objectives for the organisation to achieve; a normative structure describing the norms agents must abide by when fulfilling roles and interacting in scenes; and a communicative structure describing the communicative acts agents can make. An organisational logic formalises OperA organisations. The logic combines deontic logic and temporal logic to define normative reasoning for the norms agents adopt when enacting roles and reasoning about the responsibilities and capabilities endowed on agents for enacting those roles. The logic also determines when organisational landmarks are achieved. The formal theory provided by OperA is implemented with the Operetta tool [5] for checking organisational properties. In OperA organisations are the formal counterpart to human organisations and a formal semantics provides organisational reasoning, but OperA lacks many aspects found in the legal/institutional sphere (again, constitutive rules, abstraction and rule change). OperA+ [133] by Jiang builds on the OperA framework with additional organisation design concepts and methodology, and novel computational mechanisms for organisational reasoning. Enhancing OperA’s organisation design methodology, OperA+ proposes multiple levels of abstraction. The most abstract level comprises organisational objectives. From here, the design process enters a contextual level where the organisation design is concretised by decomposing the organisation objectives into sub–domains or situations. Jiang uses a top–level objective of train maintenance as an example where in this case the sub– domains are planned and unplanned maintenance. Such sub–domains are then concretised further at a solution level, by instantiating the sub–domains as social structures and normative structures. Like in OperA, the social structures comprise roles agents play and the normative structure comprises norms. Unlike OperA, OperA+ also includes constitutive rules for establishing institutional actions from brute facts. Opera+ also introduces an operational level, comprising groups of agents enacting roles represented as group preferences for particular actions. OperA+ organisations are operationalised using Coloured Petri Nets (CPNs), a graph–based formalism for describing distributed systems and computing their states over time. Norms are represented as CPN graphs, akin to an evaluative norm representation. Since norms have an evaluative representation, it is unclear how to extend OperA+’s representation and reasoning to norms governing other norms. Other aspects missing from OperA+ but focussed on in the dissertation you are reading now include a semantic definition of links between concrete and abstract norms and governing rule change. 2.5. P RACTICAL F ORMAL G OVERNANCE 39 2.5.2. I NSTITUTIONAL F RAMEWORKS Institutional frameworks in MAS can be understood as analogous to their informal counterparts (e.g. legislation). Typical elements are constitutive rules, norms, and the ability for the institution to evolve from one institutional state to the next according to the change of brute facts and the institution’s constitutive rules. Research on institutional reasoning falls largely into two spheres, legal reasoning (e.g. for legislation) and open multi–agent systems (e.g. artificial markets). We describe three frameworks in what is by no means an exhaustive overview, instead we focus on the frameworks that are closest to what this dissertation is trying to achieve. OCeAN [78, 81, 82] (Ontology CommitmEnts Authorizations Norms) is a high– level institution specification language and an operationalisation in the discrete event calculus. In OCeAN an ontology specifies institutional actions, events and roles agents play (hence there is an organisational flavour to OCeAN). OCeAN adopts constitutive rules (“A counts–as B in a context C”) in order to define an agent communication language. Here, the communicative act ‘A’ counts–as an institutional action in a context where the communicative agent is playing a role that authorises that agent to realise the institutional action. For example, an auctioneer telling everyone the auction is open counts–as opening the auction, where playing the role of auctioneer represents the agent’s authorisation. OCeAN also contains a normative component, adopting the usual deontic modalities in a modal representation. OCeAN’s focus is on ontologies, social commitments and organisational concepts such as roles. TMDL [98, 103] (Temporal Modal Defeasible Logic) is a non–monotonic logic for reasoning about institutions over time. The institutional concepts captured are the deontic modalities, constitutive rules, normative power (the ability for an agent to establish a norm through a communicative act), and positive and negative rights. The logic is temporal in the sense that propositions (including modal statements) hold at points in time when they are initiated by an action according to a rule, and persist in holding (inertia) until they are terminated. The logic’s modus operandi is defeasibility, the idea that a proposition is defeasibly proven but a proof to the contrary defeats the proposition and makes it disproven. In TMDL there are three types of rule in horn–clause form. Firstly, strict rules φ0 , ..., φn → ψ where the consequent is strictly provable when the antecedent is provable and cannot be disproven if the antecedent is proven. Secondly, defeasible rules φ0 , ..., φn ⇒ ψ where proving the antecedent means the consequent is defeasibly proven, but proving contrary propositions from the consequents of other rules defeats ψ or the rule’s defeasible premises and makes ψ disproven. Thirdly, defeater rules φ0 , ..., φn ψ, which do not make their conclusion proven, but rather defeat contrary premises and conclusions of other rules that are defeasibly proven. To determine which rules can defeat other rules, a superiority relation between rules is specified. Defeasible logic, such as TMDL, defines a proof procedure that can be implemented in Prolog [13]. The idea is that a derivation asserts the conclusion of a rule, then all the ways to attack the derivation and its conclusion are found, all the attacks of the attacks are found, and so on. This process continues until no more attacks can be applied and it is determined whether there remain any undefended attacks of the original assertion, in which case it is not proven, and otherwise it is proven. TMDL, through its proof procedure, makes it possible to reason about exceptions as found in the law and also exceptions to exceptions 40 2. BACKGROUND etcetera. InstAL [42, 43] (INSTitution Action Language) is a framework for temporal institutional reasoning. An institution specification in InstAL comprises events that can occur and fluents that can hold in the institution, as well as constitutive rules. The events can be observable corresponding to a brute fact, or institutional such as ‘payment’ or denoting a norm is violated. Fluents represent institutional facts about a domain, the deontic statements of obligation and permission in a modal–form, and institutional empowerment denoting an event is empowered to affect the institution. In InstAL, anything not permitted is prohibited and hence a prohibitive society is reasoned about. The constitutive rules ascribe institutional events from observable events (corresponding to the notion of a brute fact changing) and other institutional events. The constitutive rules also ascribe the effects of institutional events on the institution’s state, causing institutional fluents to be initiated or terminated from one state to the next. Regulations are represented as constitutive rules where the consequents are the initiation or termination of obligation, permission and empowerment fluents. InstAL’s semantics are defined with a formal framework based on set theory and mathematical functions. Complementing the formal framework is a computational framework that executes institution specifications in response to a trace of observable events. The computational framework uses Answer–Set Programming (ASP), a non–monotonic logic programming language [91, 92] based on the stable model semantics [93]. The output of the framework is a state–transition system. Each state contains fluents representing institutional facts and normative positions (obligations and permissions). Transitions between states are the events produced by observable events and the transitive closure of constitutive institutional event generation rules. Fluents persist by default from one state to the next unless terminated, capturing the common–sense law of inertia using Event–Calculus–like constructs. InstAL is complemented with a framework for finding rule changes to meet certain properties, in this case resolving inconsistencies between norms, based on Inductive Logic Programming in ASP [154, 157]. 2.6. K NOWLEDGE G APS AND A PPROACH In this section we compare the frameworks described previously, depicted in table 4.7, in terms of their support for PARAGon’s objective of institutional design and enactment governance reasoning. The comparison is split between foundational representation and reasoning requirements for our formalisation aims, and the necessary conceptual building blocks (shown in bold) we require to formalise institutional design and enactment governance. We also denote those frameworks with a corresponding implementation, although the degree to which there exists an implementation varies from one framework to another (see the previous discussion). The foundational representation and reasoning constructs for this dissertation are modal norms, since they can be extended to nested modal norms and therefore regulations governing regulations; a temporal setting for real–world relevance and the reasoning about rule–change over time; and constitutive rules for reasoning about institutions operating at different levels of abstraction. The conceptual building blocks we require are: rule– modifying constitutive rules for ascribing which rules an agent can modify and when; temporal rule modifications; regulations governing regulations for reasoning about multi–level Implementation Temporal Rule Modifications Rule-modifying Constitutive Rules Automatic Rule Change for Compliance Abstract Norms Regulations Governing Regulations Constitutive Rules 41 Temporal Setting Modal Norms 2.6. K NOWLEDGE G APS AND A PPROACH Standard Deontic Logic [234] Anderson’s Reduction [9, 10] and Subsequent Developments [4, 105] Temporal Deontic Logics [33, 59, 60] HarmonIA [233] ~ ~ ~ ~ MOISE+ [124] OperA [61] OperA+ [133] OCeAN [78, 81, 82] TMDL [98, 103] InstAL [42, 43, 154, 157] ~ ~ Table 2.1: Comparison between the state–of–the–art knowledge provided by different frameworks. A tick denotes the framework provides the necessary representation and reasoning constructs. A denotes the framework only provides a conceptualisation sans semantics in the case of HarmonIA or technologies that can feasibly be adjusted for our purposes in the case of InstAL. Knowledge in a regular font denotes foundational concepts that need formalising, knowledge in bold represents the building block concepts that need formalising to reason about institutional design and enactment governance. governance; norm abstraction or concretisation based on constitutive rules for interpreting institutions in multi–level governance; and automatic rule change for compliance in order to help institution designers in multi–level governance enact institutions whilst avoiding punishment for non–compliance. As we can see, the foundational components are adequately supported by some frameworks, however the conceptual building blocks are not and hence it is those building blocks which the PARAGon framework addresses. Organisation frameworks support some necessary foundational institutional reasoning constructs, such as norms and potentially constitutive rules. However, they lack the semantics for the governance of institutional design and change. In the case of the HarmonIA 42 2. BACKGROUND framework, whilst significant attention is paid to norm concretisation it is done by way of example and not with a general semantics. The same is true for the other aspects of HarmonIA. What HarmonIA does offer, is an indication of on what basis norm abstraction should be reasoned about. Namely, constitutive rules. In fact, that is the same intuition this dissertation takes, albeit we provide a formal semantics for reasoning about abstracting rather than concretising norms using constitutive rules. MOISE+, OperA and OperA+ all offer some foundational aspects that could potentially be built on by this dissertation. However, the institutional reasoning frameworks, focussing on institutions as we do, offer further institutional reasoning foundations suitable for our aims. As for the institutional reasoning frameworks – OCeAN, TMDL and InstAL all share institutional concepts such as norms, constitutive rules and institutional empowerment. Some differences are that OCeAN also comprises organisation concepts, TMDL incorporates defeasible reasoning and InstAL has been used as a basis for Inductive Logic Programming based norm revision. In all of these frameworks norms are specified at a single level of abstraction, constitutive rules establish an institutional reality but not rule changes, and detecting and rectifying compliant institution designs is not captured. Hence, all frameworks provide necessary formal foundations, but do not close the knowledge gap this dissertation addresses. The question arises as to the suitability of these frameworks for our purposes. In this dissertation InstAL is used as a basis for the institutional reasoning we contribute. The main reason is that in InstAL, due to having an ASP computational framework, it is already possible to apply existing ASP–based Inductive Logic Programming techniques in order to resolve problems with institutions. In the case of [157] the problems resolved are normative conflicts. In this dissertation we seek to resolve non–compliance in multi–level governance and hence Inductive Logic Programming techniques are used and developed towards our aims. The following summarises how the PARAGon framework fills the gap in the knowledge. Determining compliance according to institutional design governance in multi–level governance requires: regulations governing regulations, and norm abstraction or concretisation based on constitutive rules, and is addressed with a formal framework in Chapter 3 and a computational framework in Chapter 4. Automatically resolving non–compliant institution designs to support designers in avoiding punishment requires automatic rule change for compliance and is addressed with a computational framework in Chapter 5. Determining when rule changes are legally made requires rule–modifying constitutive rules and temporal rule modifications, and is addressed with a formal framework in Chapter 6. 2.7. D ISCUSSION In this chapter we began with an overview of the informal concepts behind multi–agent systems, institutions, governance and governing governance. Two aspects stand out. First, there are many parallels between the need to govern agents (due to their autonomy and liability to deviate from the ideal), and governing institution designers (for the same reason, since institution designers are also agents). Second, the informal work looked at in the area of institutions is, in fact, fairly formal (e.g. in the case of Searle’s counts–as rules). On the other hand, work on governing governance appears distinctly informal, where we largely drew on work in political science and examples from real–world legislation. 2.7. D ISCUSSION 43 These aspects led us to identifying the main notions that the PARAGon framework needs to formalise. First, we elicited the foundational notions to formalise (institutions, norms). Then, we identified the building blocks required to formalise governing governance. For example, we elicited the need to rely on modal norms over evaluative norms to reason about regulations governing regulations. Likewise, we argued that it is clear constitutive rules play an important role in governing of governance both for providing links between concrete and abstract concepts and governing institutional enactment of new rules or changes to existing rules. What was unclear at this point was to what extent existing approaches provided the foundations or the building blocks required. Hence, we provided a comparison between existing formal approaches. We paid particular attention to where the gaps in the existing knowledge lie that need to be filled. Based on this analysis we selected the InstAL framework from which we can use various foundational formal components on which to build the PARAGon framework this dissertation contributes. 3 F ORMALISING C OMPLIANCE IN M ULTI – LEVEL G OVERNANCE For a large class of cases–though not for all–in which we employ the word “meaning” it can be defined thus: the meaning of a word is its use in the language[239, Sect. 43] Ludwig Wittgenstein This chapter is based on the following papers: King, T. C., Li, T., De Vos, M., Dignum, V., Jonker, C. M., Padget, J., & van Riemsdijk, M. B. (2016, July). Automated Multi–level Governance Compliance Checking. Journal of Autonomous Agents and Multiagent Systems (JAAMAS). International Foundation for Autonomous Agents and Multiagent Systems. (In Submission) Which extends the following paper: King, T. C., Li, T., De Vos, M., Dignum, V., Jonker, C. M., Padget, J., & Riemsdijk, M. B. Van. (2015). A Framework for Institutions Governing Institutions. In Proceedings of the 2015 International Conference on Autonomous Agents and Multiagent Systems (AAMAS 2015) (pp. 473–481). Istanbul, Turkey: International Foundation for Autonomous Agents and Multiagent Systems. [144] 45 46 3. F ORMALISING C OMPLIANCE IN M ULTI – LEVEL G OVERNANCE In this chapter we look at soft constraints placed on institution designers, which prescribe the institution designs they should enact. The contributions of this chapter are: • A formal representation language for institutions governing other institution designs in multi–level governance. • A formal semantics for determining when institutions are compliant in multi–level governance, accounting for concrete regulations at lower–levels of governance, governed by increasingly abstract regulations at higher–levels of governance. Institutions (e.g. legislation) govern societies towards ideal and coordinated behaviour with rules and regulations coupled with the means to detect compliance and issue rewards and punishments. Increasingly, institutional reasoning is formalised and computerised with automated normative and institutional reasoning frameworks (see [12] for a review). Such frameworks can support governing bodies in punishing agents and support agents in understanding their legal duties. However, typical institutions are not written in a vacuum. Rather, institutions are constrained and regulated by higher–level institutions. This is what is called multi–level governance [121]. In multi–level governance, institution designers design institutions comprising rules and regulations, but whose design is also subject to regulation. In 2006 the European Union issued the Data Retention Directive [71] for harmonising member states’ data retention regulations, in 2009 the UK implemented the directive with the Data Retention Regulations [226] in order to avoid fines. Yet, in 2014 the European Court of Justice ruled [70] that the directive was non–compliant with the Charter of Fundamental Rights [72], and annulled the directive. Legislating in multi–level governance exposes institution designers to risks of punishment and wasted legislating time and burdens a judiciary with checking compliance. So far, institutional reasoning frameworks have focussed on single–levelled societal governance. Typically, automated institutional reasoning deals with regulations operating at the level of institutions governing agents and/or corporations. For example, the UK’s Data Retention Regulations [226] obliges communications providers to store communications metadata. There lacks reasoning for cases where regulations themselves are regulated by higher–level institutions in multi–level governance. For example, how EU directives govern national legislation but where EU directives are in turn governed by human rights charters. In this chapter we look at how institutions themselves are regulated by higher– level institutions. In particular, we look at increasingly abstract regulations at higher–levels of governance that govern more concrete regulations at lower–levels of governance. Such abstraction sets multi–level governance apart from single–levelled governance of societies. In multi–level governance at the highest–level, such as human rights charters, regulations are intentionally abstract and open to interpretation. Such abstract regulations provide many ways in which to (non–)comply. At a lower–level, such as EU directives, regulations are more concrete and less open to interpretation. At the lowest level, such as national or sub–national legislation, regulations are concrete and the least ambiguous. Despite the differences in abstraction between levels, each level’s institution design must somehow be demonstrated to be compliant with relatively more abstract regulations at higher–levels. 47 To give an example, the European Charter of Fundamental Rights [72] contains vague regulations requiring that people’s private and family life is respected. The EU’s data retention directive [71] contains a more concrete regulation requiring communications service providers (e.g. ISPs and telephonic companies) to store people’s communications metadata (e.g. a phonecall’s time and place) within a fixed time frame. The directive’s communications metadata regulation must be shown to be compliant with the Charter of Fundamental Right’s more abstract right to a private and family life, or else the directive will be annulled. In fact, the directive was annulled due to violating privacy [70]. At the same time, the directive itself governs the design of institutions – member state’s legislation. Member states must implement the directive in a compliant way in order to avoid fines. The directive gives some scope for member states to implement a compliant institution differently, allowing the data retention period to be between 6 and 24 months. The UK’s data retention regulations [226] are more concrete and must be shown to ensure communications metadata is stored within the required time frame, no shorter and no longer. In fact, they do just that, concretely requiring communications metadata is stored for 13 months which complies with the abstract requirement of the directive to store data between 6 and 24 months. The UK’s institution must be shown to be compliant with the more abstract regulation of the directive in order to avoid fines. In turn, the data retention directive must be shown to be compliant with the more abstract charter of fundamental rights in order to avoid annulment. To this end, this chapter contributes two main formal building blocks that together contribute a system for detecting non–compliance in multi–level governance. These novel elements are: • A way to represent and reason about regulations governing regulations – specifically, combining norms about agents’ actions with norms that oblige and prohibit the imposition of other norms in different social contexts. In this chapter we look explicitly at norms, rules that state what should occur and when. In particular, we look at norms that state what the effects of other norms should be. • Abstraction based on constitutive rules – specifically, taking concrete norms at lower– levels of governance and defining a semantics that re–interprets those concrete norms by abstracting them to the same level of abstraction the higher–levels of governance govern them at. The semantics define an abstracting relation between concrete norms and their abstract definitions based on context–sensitive links provided by constitutive rules between concrete and abstract concepts. For example, the European Data Retention Directive [71] requires member states to store communications metadata. The semantics determine that storing communications metadata without someone’s consent is, abstractly, unfair data processing. This chapter is written to be as self–contained as possible. Thus, we start by describing the individual components of institutions and the approach we take to reasoning about them in Section 3.1. The representation we use is given in Section 3.2. The formal reasoning is presented in Section 3.4. We describe related work in Section 3.5. Conclusions are presented in Section 3.6. 48 3. F ORMALISING C OMPLIANCE IN M ULTI – LEVEL G OVERNANCE 3.1. A PPROACH In this section we describe the approach we take to automatically determining compliance in multi–level governance. Since we are reasoning about institutions in multi–level governance, we build on an existing institutional reasoning framework. Our proposal requires representation and reasoning for: constitutive rules, modal regulatory rules, higher–order norms, connections between institutions and reasoning about regulation abstraction. The InstAL (Institution Action Language) framework [42, 43] provides constitutive rules and modal regulatory rules. Hence, we base our proposal on the InstAL framework and extend it to multi–level governance with higher–order and abstract norm representation and reasoning. We also modify the InstAL reasoning from being about prohibitive societies (where anything not permitted is forbidden) to permissive societies (everything is permitted unless explicitly prohibited), adding explicit prohibitions and removing explicit permissions. Whilst in InstAL brute facts are observable events or properties which hold in a state (fluents), we only consider brute facts to be observable events. For simplicity, all properties which hold in a state are institutional and not brute in our framework. Based on InstAL [42, 43], an institution in our framework specifies six elements. Firstly, following InstAL, events. Events can represent observable changes to reality, corresponding to the notion of brute fact. Events can represent changes to the social reality, corresponding to the notion of institutional fact. For example, the brute fact we call storing metadata is an observable event, whilst storing metadata and storing personal data are institutional events. Secondly, following InstAL, fluents which describe institutional facts holding in a social reality and are subject to changing over time. For example, a user consenting to processing their data causes a fluent to hold stating they have consented, which is removed if they revoke their consent. Some fluents represent the deontic positions that hold. The deontic positions denote institutional empowerments, and obligations and prohibitions. Empowerments represent that an institutional event is empowered to affect the institution, meaning an institutional event can occur in the institution. For example, “storing communications metadata is empowered to occur”. Empowerments represent hard constraints on the events that can (in general) occur (for further discussion see [42, 43]). Fluents representing obligations and prohibitions are normative fluents. For example, “an obligation to pay a fine”. Higher–order normative fluents can also be specified, for example an obligation to oblige paying a fine. We deal with institutions in a temporal setting, so the various deontic positions (normative fluents) express that something should be done before a deadline. For example, an obligation to pay a fine within one month. Thirdly, following InstAL, constitutive rules which cause institutional events to occur when observable or other events occur in a given context. For example, “the observable event of storing metadata counts–as the institutional event of storing metadata”. An example of institutional events causing further institutional events to occur is “storing personal data counts–as unfair data processing in the context that a user has not consented”. Fourthly, following InstAL, constitutive rules which initiate and terminate fluents in holding due to institutional events. For example, “a user consenting to storing their data counts–as initiating the fluent stating the user has consented”. Constitutive rules establishing what we call normative fluents are norms. For example, “a user using a communications device counts–as initiating an obligation for their communications’ metadata to be stored”. 3.1. A PPROACH 49 Higher–order norms impose higher–order normative fluents. Once a fluent is initiated by such a rule it holds until it is terminated by another rule. That is, these rules initiate and terminate inertial fluents. Modal norms, which are regulative rules, are constitutive rules which initiate and terminate fluents due to institutional events. For example “a user using electronic communications initiates an obligation for the communications provider to store their communications metadata”. Thus, norms are not a distinctive element of institutions, but rather a type of constitutive rule. Fifthly, extending InstAL, constitutive rules which derive fluents from other fluents in a particular context. For example, “an obligation to store personal data non–consensually derives (counts–as) unfair data processing in all social contexts”. Viewed as counts–as rules, these rules ascribe a special meaning B to a fluent A in a context C. For example, an obligation to store personal data non–consensually has the special meaning of being unfair data processing. So long as the fluent ‘A’ holds in a context ‘C’ then its special meaning ‘B’ also holds. But, unlike constitutive rules which initiate and terminate fluents the special meaning ‘B’ does not hold until terminated, rather, it holds when ‘A’ holds in the context ‘C’. That is the ‘Bs’ in these types of rule are non–inertial fluents, since the Bs do not persist from over time by default until terminated (i.e. they do not possess inertia). Unlike the previous rules, constitutive rules which derive fluents from other fluents are not present in the InstAL framework. Sixthly, following InstAL, a set of initial inertial fluents which hold in the institution’s first state and continue to hold until terminated. The set of initial inertial fluents can be the empty set. To summarise, an institution specifies events, fluents and constitutive rules which ascribe institutional events or institutional fluents. Multi–level governance is operationalised with a semantics. This semantics defines how each institution evolves from one state to the next in response to a trace of observable events. These events can be real events occurring in the MAS, or hypothetical events if a pre–runtime check for compliance is performed. An institution’s evolution is schematically depicted in Figure 3.1 and described as follows. The institution starts in an initial state in which its initial set of inertial fluents holds. State transitions are driven by observable events occurring in the MAS (potentially hypothetically). During a state transition, further events occur in an institution according to its constitutive rules, building up an institutional interpretation of reality based on the observable events that have occurred. Further events signifying there is (non–)compliance also occur, for example if there is an obligation to store communications’ metadata within one month and the data is not stored within one month, then a norm violation occurs. If it is prohibited to oblige storing communications’ metadata, then a higher–order norm violation occurs. That is, norm violations are institutional events denoting non–compliance. A newly transitioned to state can contain different fluents from the previous state, based on each institution’s constitutive rules variously initiating and terminating fluents from one state to the next. Thus, each institution evolves over time from one state to the next transitioned by events. But, how are concrete regulations imposed at lower levels of governance determined to be (non–) compliant with abstract regulations at higher levels of governance? The approach we take is to firstly, link each institutional level such that concrete normative fluents 50 3. F ORMALISING C OMPLIANCE IN M ULTI – LEVEL G OVERNANCE Nth-level Institution abstraction abstraction abstraction n n Events Events 0 1 n n n S0 S1 S2 abstraction ... n S k+1 Second-level Institution abstraction abstraction abstraction 2 2 Events Events 0 1 2 2 2 S0 S1 S2 ... 2 S k+1 Link First-level Institution abstraction abstraction abstraction 1 1 Events Events 0 1 1 1 1 S0 abstraction S1 S2 abstraction ... 1 S k+1 Input for all Institutions Obs. Event0 Obs. Event1 ... Obs. Eventk Figure 3.1: Multi–level Governance reasoning overview holding in lower level institutions are ‘passed up’ to the corresponding state in higher level institutions. For example, an obligation to oblige storing communications metadata in the EU–DRD is ‘passed up’ to the EU–CFR. Likewise, so too are norm compliance events. Then, in each institutional state of a higher level institution the concrete normative fluents coming from lower level institutions are re–interpreted and abstracted. In order to abstract concrete normative fluents, we use constitutive rules on which to base the abstraction. Recall that constitutive rules establish links between concrete and abstract concepts, from which we can determine links between concrete and abstract norms. For example, the obligation to oblige storing communications metadata is re–interpreted as an obligation to oblige non–consensual data processing. In turn, from these abstractions any further abstractions are also derived. For example, the obligation to oblige non–consensual data processing is abstracted simply to being unfair data processing. Thus, each institutional state contains concrete normative fluents from lower levels and the state contains the closure of all abstractions on these concrete normative fluents based on constitutive rules. Given that normative fluents are abstracted, they can be determined for compliance with abstract higher–order normative fluents that govern them. For example, whether the abstract obligation to oblige storing data non–consensually is in itself prohibited, or perhaps has an even more abstract meaning (e.g. unfair data processing) which is prohibited/obliged. So, concrete normative fluents from lower levels are re–interpreted as more abstract normative fluents at higher levels to determine whether in their abstract incarnation they cause non– 3.1. A PPROACH 51 Prohibited to process data unfairly Unfair data processing Abstraction Obligation to oblige processing data nonCharter of Fun- consensually damental Rights of the EU Abstraction Prohibited to process data unfairly Ada consents to storing data Ada has consented to storViolated prohi- ing data bition to process data unObligation to oblige storing fairly Obligation to oblige storing personal data personal data Abstraction Obligation to oblige storing metadata Link Data Retention Directive Abstraction Obligation to oblige storing metadata Link Ada consents to Obligation to oblige storing storing data Obligation to oblige storing metadata metadata Figure 3.2: An example of abstracting normative fluents at different levels of governance based on the context. Normative fluents oblige/prohibit an aim a occurs before or at the same time as a deadline d . We use < to denote one thing occurring before another and ≤ to denote one thing occurring before or at the same time as another. compliance. An example is depicted in Figure 3.2 based on the running case study. In the EU– DRD’s first state there is an obligation to oblige storing communications’ metadata, which is passed up to the EU–CFR. As described, concrete normative fluents are abstracted based on whether the prescribed event counts–as a more abstract event in a context entailed by the state. Storing metadata counts–as storing personal data. Storing personal data counts–as non–consensual data processing in the context where an agent has not consented. In the EU–CFR’s first state the obligation to oblige storing metadata is abstracted to an obligation to oblige storing personal data. Then, to an obligation to oblige processing data without consent. An obligation to oblige processing data non–consensually is abstracted further to ‘unfair data processing’. Unfair data processing is prohibited and thus a norm violation event occurs in the transition to the EU–CFR’s next state. In the EU–CFR institution the next state lacks an obligation to oblige processing data without consent because a user has consented. So, unfair data processing also does not hold. That is, the abstract meaning of concrete normative fluents evolves as the context evolves. Consequently, compliance of normative fluents is context sensitive because normative flu- 52 3. F ORMALISING C OMPLIANCE IN M ULTI – LEVEL G OVERNANCE pro(obl(a,d ),d 0 ) obl(obl(a,d ),d 0 ) Violates if < d 0 obl(pro(a,d ),d 0 ) pro(pro(a,d ),d 0 ) Discharges if ≤ d 0 Discharges if ≤ d 0 pro(a,d) obl(a,d) Violates if < a Discharges if ≤ d Violates if < d 0 Violates if < d Event/fluent a Discharges if ≤ a Event/fluent d Figure 3.3: Discharge and violation (higher–order) normative fluent conditions. < X denotes the event/fluent holding or occurring strictly before X causes a violation. ≤ X denotes the same, but the condition is non–strictly before. ents’ abstraction is context sensitive. To summarise, our semantics for multi–level governance defines the evolution of each institution over time in response to a sequence of events. Specifically, whether concrete normative fluents imposed by lower level institutions have an abstract interpretation in higher level institutions. Moreover, whether these abstract interpretations of concrete norms violate abstract higher–order norms in higher level institutions. Such non–compliance can be determined by inspecting the sequence of events in higher level institutions for higher– order norm compliance events. The semantics provide a mechanism acting as a kind of legal monitor for multi–level governance. 3.2. F ORMAL R EPRESENTATION In this section we present the syntax for representing multi–level governance. We begin with representing normative fluents. These are fluents which represent temporal obligations and prohibitions, meaning they have an aim which should be achieved before a deadline. In contrast, InstAL considers at temporal obligations and non–temporal permissions, where anything not permitted is prohibited (a prohibitive society). We look at temporal obligations and temporal prohibitions, where anything not prohibited is permitted (a permissive society). Obligation and prohibition fluents are respectively represented as obl(aim, deadline) and pro(aim, deadline). The aims and deadlines can be events, fluents or other normative fluents to represent higher–order normative fluents. Two special events are used in aims and deadlines, now and never. The event ‘now’ occurs immediately to represent something should (not) be done immediately. For example, obl(aim, now) means the aim should occur 3.2. F ORMAL R EPRESENTATION 53 ‘now’. Our representation is inspired by the formalisation of instantaneous norms in a variant of dynamic logic [60], which similarly use ‘now’ to refer to the present state. An aim or deadline event never represents that the aim/deadline never occurs, potentially meaning the normative fluents lasts indefinitely. For example pro(aim, never) means it is always prohibited for the aim to occur or in other words the aim should ‘never’ occur. The informal semantics for normative fluents’ is described in terms of when obligations/prohibitions are discharged and violated, overviewed in Figure 3.3. An obligation fluent, of the form obl(aim, deadline), represents that the aim should occur/hold before or at the same time as the deadline to discharge the obligation (fulfil all duties). If the deadline occurs/holds strictly before the aim then the obligation is violated. Prohibition fluents, of the form pro(aim, deadline), are the inverse of obligations. Prohibitions represent that the aim should not occur/hold strictly before the deadline. When a normative fluent n is discharged it causes the event disch(n) to occur. If n is violated then the event viol(n) occurs. Higher–order norms impose higher–order normative fluents. A higher–order normative fluent obliges/prohibits another normative fluent is imposed before a deadline. The deadline is an event or another normative fluent. Compliance–focussed higher–order norms can also be expressed, which oblige/prohibit compliance with a norm (norm discharge – disch(n)) or violation (viol(n)) occurs before/after an event occurs or another normative fluent is imposed (e.g. it is obliged a norm is violated before a fine is imposed). A grammar to specify normative fluents is formalised as: Definition 1. Normative Fluents Let P be a set of propositions denoting events with typical element p . The set of normative fluents N |P is the set of all normative fluents n expressed as: aim ::= p | n | now | never | disch(n) | viol(n) deadline ::= p | n | now | never | disch(n) | viol(n) n ::= obl(aim, deadline) | pro(aim, deadline) We give some examples concerning two agents, a law enforcement officer called Charles and an internet communications user called Ada, and an internet communications provider colloquially called an ISP. The UK–DRR implements the EU–DRD. They state that if a law enforcement official (e.g. charles) requests the data stored by a communications provider (e.g. isp) of a user (e.g. ada) then the communications provider is obliged to provide the data within one month (m1): obl(provideData(isp, charles, ada), time(m1)) Instantaneous normative fluents express that something should (not) be done or a normative fluent should (not) be imposed now. One way an institution designer might use instantaneous norms is to express that as soon as something happens a normative fluent should be imposed. For example, as soon as a norm is violated it is obliged that there is an obligation to punish the violator. The EU–DRD as we formalise it, requires that any implementing institution should impose punishment as soon as regulations are violated. Thus, when there is a violation it imposes a normative fluent obliging an obligation to punish the violator is imposed immediately: 54 3. F ORMALISING C OMPLIANCE IN M ULTI – LEVEL G OVERNANCE obl(obl(punish(isp), time(m6)), now) Compliance–focussed normative fluents can be used to express that an agent should discharge/violate a normative fluent before another normative is imposed that rewards/punishes the agent. For example, in our previous work [145], an obligation expressed “it is obliged that a norm is violated before a fine is imposed”. Such compliance focussed normative fluents do not state that a normative fluent being discharged should cause a reward/punishment. Rather, they state that discharge/violation should occur before the reward/punishment is imposed. Following this chapter’s case–study – it is obliged that the communications provider isp violates the obligation to provide charles with data which concerns ada before any obligation to punish the communications provider isp is imposed. obl(viol(obl(provideData(isp, charles, ada), time(m1))), obl(punish(isp), time(m6))) Normative fluents can also be explicitly first–order, but implicitly higher–order by obliging/prohibiting fluents that abstractly represent other normative fluents. Recall that various obligations in the EU–DRD can abstractly be interpreted as unfair data processing. Hence, the following is an example of an abstract first–order norm that indirectly governs other norms. The EU–CFR states that it is prohibited to process Ada’s data unfairly (indefinitely): pro(unfairDataProcessing(ada), never) We now proceed to representing individual institutions. In short, institutions are specified as a tuple, extending the formal specification of an institution in the InstAL framework [43]. Generally, speaking, an individual institution describes the things that can occur (events) and hold (fluents) in the institution as well as the institution’s rules causing events to occur and fluents to hold. An institution’s constitutive rules – cause institutional events to occur in response to other events (“an event A counts–as an event B in context C”), fluents to hold in response to events (“an event A counts–as establishing/removing a fluent B in context C”), and further, more abstract, fluents to be derived from other fluents (“a fluent A counts–as a fluent B in context C”). Rules stating fluents are derived are not present in InstAL but we introduce them since they provide an abstracting relation between fluents and thus contribute to our goal of reasoning about abstraction in multi–level governance. Regulative rules are just modal norms represented as constitutive rules which establish normative fluents, “an event A counts–as establishing an obligation/prohibition in context C”. Specifically, institutions comprise the following elements: Events – a set of propositions (E ) denoting events that can occur in the institution, s.t. now, never 6∈ E , meaning the institution cannot define when the brute events now and never occur. The set of events comprises: – Observable events (Eobs ) that are exogenous to the institution corresponding to the notion of a brute fact denoting an event. – Internal institutional events (Einst ) representing an institutional description of reality. 3.2. F ORMAL R EPRESENTATION 55 – Compliance events (Enorm = {disch(n), viol(n) | n ∈ Fcnorm ∪ Fanorm }) indicating a normative fluent (in the set of concrete and abstract normative fluents Fcnorm ∪ Fanorm ) has been discharged or violated. Fluents – a set of propositions (F ) denoting fluents which can hold in the institution, comprising: – Domain fluents (Fdom ) providing an institutional description of the state of reality (e.g. an agent has consented to their data being processed). – Empowerment fluents (Fpow ⊆ {pow(e) | e ∈ Einst }) denoting an event is recognised by the institution in a state and has the power to affect the institution (i.e. is empowered). – Normative fluents (Fnorm = Fcnorm ∪ Fanorm ) comprising mutually disjoint sets of concrete normative fluents (Fcnorm ⊆ N |E ∪Fdom ) and abstract normative fluents (Fanorm ⊆ N |E ∪Fdom ): ¦ Concrete normative fluents denote obligations and prohibitions imposed by the institution about events or domain fluents. These normative fluents are concrete in the sense of being explicitly imposed by an institutional norm, rather than being abstract interpretations of other normative fluents that have been imposed. ¦ Abstract normative fluents denote obligations and prohibitions imposed by the institution about events or domain fluents. These are abstract in the sense of not being imposed by the institution, but rather represent an abstract interpretation of other more concrete normative fluents. For example, an obligation to store personal data is a more abstract interpretation of an obligation to store communications metadata. – Inertial and non–inertial fluents, We assume that fluents are either inertial or non–inertial represented as mutually disjoint sets of inertial fluents (Finert ) and non–inertial fluents (Fninert ) such that F = Finert ∪ Fninert and Finert ∩ Fninert = ;. Institutions define fluents which can be initiated by the institution’s state consequence function and then persist from one state to the next by default until they are terminated. That is, some fluents are inertial. Other fluents hold due to constitutive rules stating more abstract fluents are derived from more concrete fluents. These abstract fluents hold whenever the concrete fluents hold and do not persist from state to state by default. That is, they are non–inertial fluents. Concrete normative fluents are inertial, since an institution explicitly imposes them by initiation and termination according to the state consequence function (Fcnorm ⊆ Finert ). Abstract normative fluents are non–inertial since they are derived from other normative fluents and do not persist from state to state by default (Fanorm ⊆ Fninert ). Contexts – these characterise a condition on a state and denote the social context each rule is conditional on. A context is a set of positive and weakly negative fluents, which holds in a state if all the positive fluents hold and none of the negative fluents hold. Formally, the set of all contexts is X = 2F ∪¬F s.t. ¬F = {¬ f | f ∈ F } is the set containing the negation of all elements in the set F . 56 3. F ORMALISING C OMPLIANCE IN M ULTI – LEVEL G OVERNANCE State change rules (C : X × E → 2Finert × 2Finert ), described as a state consequence function. They specify that due to the occurrence of events conditional on a context holding in a state, inertial fluents are initiated and terminated from one state to the next. State change rules can be descriptive (e.g. a user consenting to their data being stored initiates a fluent stating that they have consented) and regulative rules by initiating and terminating normative fluents (e.g. someone using electronic communications initiates an obligation for the communications provider to store their communications’ metadata). Event generation rules – (G : X × E → 2Einst ), described as an event generation function. These rules are only descriptive. They specify that when an exogenous or institutional event occurs conditional on a context holding in a state another institutional event occurs. Fluent derivation rules – (D : X × F → 2Fninert ), described as a fluent derivation function. These rules state that a fluent holding in a state derives a non–inertial fluent holding in the same state, conditional on a social context. According to these notions, an individual institution is formally defined as: Definition 2. Individual Institution An institution is a tuple I = 〈E , F , C , G , D , ∆〉 such that: • E = Eobs ∪ Einst ∪ Enorm is the set of events. • F = Fdom ∪ Fnorm is the set of fluents. • C : X × E → 2Finert × 2Finert is the state consequence function. • G : X × E → 2Einst is the event generation function. • D : X × F → 2Fninert is the fluent derivation function. • ∆ ⊆ Finert is a set of inertial fluents which hold in the institution’s initial state and persist from one state to the next if they are not terminated. Some further useful constructs are: • Σ = 2F to denote the set of all states for I . • Given a context X ∈ X and an event e ∈ E we denote the result of the consequence function as C (X , e) = 〈C ↑ (X , e), C ↓ (X , e)〉 s.t. the set of initiated fluents is C ↑ (X , e) and the set of terminated fluents is C ↓ (X , e). • For readability if an institution is denoted with a superscript, such as id then all its elements have the same superscript, such as I id = 〈E id , F id , C id , G id , D id , ∆id 〉, the set of states being Σid and the set of contexts being X id . 3.2. F ORMAL R EPRESENTATION 57 We exemplify using institutional specification fragments where for clarity we use a superscript denoting the name of each institution. The EU–CFR [72, Art. 8.2] states that a person’s data must be processed fairly. For an agent called ‘ada’, the set of inertial fluents initially holding in the EU–CFR institution includes: pro(unfairDataProcessing(ada), never) ∈ ∆cfr A communications provider, called ‘isp‘, storing metadata is by default an event empowered to affect the Data Retention Regulations: pow(storeData(isp, ada, metadata)) ∈ ∆drd According to the European Court of Justice’s (ECJ) judgement [70] on the EU–DRD, with respect to the EU–CFR, storing communications metadata counts–as storing personal data. If an agent’s, Ada’s, metadata is stored in any context (the empty set) then the event of storing the agent’s, Ada’s, personal data is generated. Additionally, if Ada’s personal data is stored in the context that Ada has not consented then the event of non–consensually processing Ada’s data occurs. The following rules are a part of the EU–CFR, incorporating the ECJ’s judgement. G cfr (;, storeData(isp, ada, metadata)) 3 storeData(isp, ada, personal) G cfr ({¬consentedDataProcessing(ada, isp)}, storeData(isp, ada, personal)) 3 nonConsensualDataProcessing(ada) The EU–DRD [71, Art. 8] requires data concerning people is transmitted to authorities on request before any undue delay. A fluent initiation rule is conditional on an agent, Charles, requesting the data from a communications provider, ISP, of another agent, Ada. In the context that Charles is a law enforcement official the rule initiates an obligation to immediately oblige that ISP provides Charles with data concerning Ada before any undue delay. C drd↑ ({is(charles, lawEnforcement)}, requestData(ada, isp, charles)) 3 obl(obl(provideData(isp, charles, ada), undue_delay), now) According to the ECJ’s interpretation of the EU–DRD [70] with respect to the EU–CFR. Obliging that personal data is processed non–consensually counts–as unfair data processing. We represent the ECJ’s interpretation as a fluent derivation rule in the EU–CFR institution. It states that obliging an agent, Ada’s, personal data is processed without consent in any social context (the empty set) derives the fluent of (counts–as) unfair data processing. D cfr (obl(nonConsensualDataProcessing(ada), now), ;) 3 unfairDataProcessing(ada) In multi–level governance, institutions are related in the sense that institutions designed at lower levels of governance are governed by institutions designed at higher levels of governance. In our approach, this means that if a lower level institution imposes an obligation or a prohibition, then the same obligation/prohibition holds in any higher level institution 58 3. F ORMALISING C OMPLIANCE IN M ULTI – LEVEL G OVERNANCE which governs it. Institutions are linked in this way in what we call a multi–level governance institution, where institutions are ordered by the level they operate at and linked with a relation between lower level and higher level institutions. The relations linking institutions are expressed as a set of directed edges R between lower level institutions and higher level institutions they are governed by. Each relation is restricted such that higher levels cannot be governed by lower levels, such that collectively the relations are always acyclic. Formally, a multi–level governance institution is: Definition 3. Multi-level Governance Institution A Multi-level Governance Institution is a directed graph 〈T , R〉. The vertices are represented as a tuple T = 〈I 1 , ..., I n 〉 of institutions. The arrows are a set of pairs R = 2[1,n]×[1,n] of institution indexes in T such that ∀〈i , j 〉 ∈ R : i < j . According to these definitions, we can represent the three main aspects of multi–level governance we focus on in this chapter. Firstly, regulations which regulate other regulations in higher level institutions with higher–order normative fluents in prescriptive rules. Secondly, the links between lower level institutions governed by higher level institutions by composing multi–level governance institutions. Thirdly, the interpretation of concrete concepts and normative fluents as more abstract concepts and normative fluents. In our framework abstraction can occur in a multi–level governance institution in two ways. Firstly with constitutive rules which state a concrete concept counts–as a more abstract concept in a particular context. These abstracting constitutive rules are represented as the event generation function – a concrete event counts–as a more abstract event in a particular social context; the state consequence function – a concrete event counts–as initiating/terminating a fluent that abstractly describes the social reality in a particular context; and the fluent derivation function – a concrete fluent counts–as a more abstract fluent in a particular social context. The second method of abstraction is implicit abstraction of concrete normative fluents regulating concrete concepts to more abstract normative fluents regulating abstract concepts. Normative fluent abstraction is defined semantically, based on constitutive rules between concrete and abstract concepts, and requires no explicit representation. 3.3. C ASE S TUDY F ORMALISATION To demonstrate the representation in full, our case study and its formalisation in the formal framework are subsequently summarised. We look at three legal institutions. These institutions operate at different levels of abstraction. Higher–levels interpret the regulatory effects of lower–levels in terms of more abstract normative fluents and concepts based on constitutive rules. Providing the constitutive rules to reinterpret and abstract regulations are the interpretations provided by courts. For example, the lower–level Data Retention Directive’s interpretation by the European Court of Justice (ECJ) with respect to the higher–level Charter of Fundamental Rights. We view constitutive rules provided by court interpretations of a lower–level institution as being a part of the higher–level institution which governs the lower–level. For example, the Charter of Fundamental Rights comprises its rules and regulations set out in writing and also the interpretations of the Data Retention Directive’s concepts provided by the ECJ. 3.3. C ASE S TUDY F ORMALISATION 59 Formally, the multi–level governance institution is the tuple ML = 〈T , R〉 where the institutions are T = 〈I drr , I drd , I cfr 〉 and the governance relation is R = {〈drr, drd〉, 〈drd, cfr〉}. Each of the institutions are formalised in tables 3.1, 3.3 and 3.4 where for brevity we leave out empowerment fluents and upper–case terms represent variables acting as shorthand for their ground instantiations. For clarity, we use labels rather than indexes for each institution. Each institution is described and formalised as follows. The EU Charter of Fundamental Rights [72] (EU–CFR, Formalised in Table 3.1), a third–level institution which through the most abstract regulations governs the Data Retention Directive. The specific fragments of legislation we look at are: – Article 7 – “Everyone has the right to respect for his or her private and family life, home and communications.” (rule CFRC.2, and CFRIS.1) – Article 8 – “Everyone has the right to the protection of personal data concerning him or her.” (rule CFRC.3, and CFRIS.1) and “Compliance with these rules shall be subject to control by an independent authority.” (rule CFRC.5, and CFRIS.1) Partly based on the European Court of Justice’s interpretation of the Data Retention Directive [70] we also take the following legal interpretations as holding in the EU– CFR: – Storing communications content or metadata counts–as storing personal data (rules CFRG.1 and CFRG.2). – Storing personal data if the person it concerns has not consented counts–as non– consensual data processing. (rule CFRG.3). – There is unfair data processing whenever there is an obligation for there to be non–consensual data processing (rule CFRD.1). – Data is unprotected if there is an obligation to store data in the context that the data is not anonymised (rule CFRD.4). – Privacy is disrespected when there is an obligation to store personal data (rule CFRD.8). It is interesting to note that the Charter of Fundamental Rights regulates regulations but in an implicit manner, that is, nowhere does it state that the regulations regulate other regulations. That is, not obliging and prohibiting obligations or prohibitions, but rather obliging and prohibiting abstract concepts which can represent obligations and prohibitions. For example, rather than prohibiting obligations for data to be processed unfairly, the EU–CFR prohibits unfair processing itself. In this chapter, we assume that whenever the EU–CFR governs an abstract concept, such as unfair data processing, then it views obliging that abstract concept as counting–as that abstract concept. For example, processing data unfairly has many interpretations, one of which is obliging data is processed unfairly. Following this idea, if the EU–CFR prohibits processing data unfairly, then an obligation to process data unfairly is reduced to the abstract concept of unfair data processing itself, which violates the EU–CFR’s prohibition. Through transitivity, it follows that an obligation to oblige unfair data 60 3. F ORMALISING C OMPLIANCE IN M ULTI – LEVEL G OVERNANCE processing is also reduced in the same way resulting in a violation of a prohibition to process data unfairly. Interpreting abstract normative fluents as the abstract concepts they oblige/prohibit is realised with fluent derivation rules: – Obliging unfair data processing counts–as unfair data processing (rule CFRD.2). – Obliging data is anonymised counts–as data being anonymised (rule CFRD.3). – Obliging data is unprotected counts–as data being unprotected (rule CFRD.5). – Obliging privacy is disrespected counts–as privacy being disrespected (rule CFRD.7). – Obliging data is processed counts–as data being processed (rule CFRD.9). Table 3.1: Charter of Fundamental Rights of the European Union Formalisation G cfr (;, storeData(CommProv0, Agent0, content)) 3 storeData(CommProv0, Agent0, personal) (CFRG.1) G cfr (;, storeData(CommProv0, Agent0, metadata)) 3 storeData(CommProv0, Agent0, personal) (CFRG.2) G cfr ({¬consentedDataProcessing(Agent0, CommSerProv)}, storeData(CommProv0, Agent0, personal)) 3 nonConsensualDataProcessing(Agent0) (CFRG.3) G cfr ({¬jurisdiction(Location0, eu)}, storeDataAt(CommProv0, Agent0, Location0)) 3 storeDataOutsideEU C cfr↑ (;, consent(CommSerProv0, Agent0) 3 consentedDataProcessing(Agent0, CommSerProv0) (CFRG.4) (CFRC.1) C cfr↑ (;, viol(pro(privacyDisrespected(Agent), never))) 3 pro(privacyDisrespected(Agent), never) (CFRC.2) C cfr↑ (;, viol(pro(dataUnprotected(Agent0, personal), never))) 3 pro(dataUnprotected(Agent0, personal), never) (CFRC.3) C cfr↑ (;, viol(pro(unfairDataProcessing(Agent0), never))) 3 pro(unfairDataProcessing(Agent0), never) (CFRC.4) C cfr↑ (;, viol(pro(uncontrolByIndepAuth, never))) 3 pro(uncontrolByIndepAuth, never) (CFRC.5) D cfr (;, obl(nonConsensualDataProcessing(Agent0), now)) 3 unfairDataProcessing(Agent0) (CFRD.1) D cfr (;, obl(unfairDataProcessing(Agent0), now)) 3 unfairDataProcessing(Agent0) (CFRD.2) D cfr (;, obl(dataAnonymised(CommSerProv0, Agent0), now))) 3 dataAnonymised(CommSerProv0, Agent0) (CFRD.3) 3.3. C ASE S TUDY F ORMALISATION 61 D cfr ({¬dataAnonymised(CommSerProv0, Agent0)}, obl(storeData(CommSerProv0, Agent0, Data0), now) 3 obl(dataUnprotected(Agent0, CommSerProv0), now)) (CFRD.4) D cfr (;, obl(dataUnprotected(Agent0, CommSerProv0), now) 3 dataUnprotected(Agent0, CommSerProv0) (CFRD.5) D cfr (;, {obl(storeData(CommSerProv0, Agent0, personal), now)}) 3 privacyDisrespected(Agent0) (CFRD.6) D cfr (;, {obl(privacyDisrespected(Agent0), now)}) 3 privacyDisrespected(Agent0) (CFRD.7) D cfr (;, obl(storeData(CommSerProv0, Agent0, personal), now)) 3 dataProcessed D cfr (;, obl(dataProcessed, now)) 3 dataProcessed (CFRD.8) (CFRD.9) cfr D ({¬pro(storeDataOutsideEU, never)}, dataProcessed) 3 uncontrolByIndepAuth (CFRD.10) ∆cfr = {pro(privacyDisrespected(Agent), never), pro(dataUnprotected(Agent0, personal), never), pro(unfairDataProcessing(Agent0), never), pro(uncontrolByIndepAuth, never), is(charles, lawEnforcement)} (CFRIS.1) The EU Data Retention Directive [71] (EU–DRD) is a second–level institution. It consists of less abstract regulations than the Charter of Fundamental Rights which governs it. On the other hand, it has more abstract regulations than the institution it governs, the UK’s implementation of the EU–DRD called the UK’s Data Retention Regulations. Whilst both the EU–CFR and the EU–DRD govern regulations, a directive by nature is written specifically for that purpose as a regulation regulating legal institution. Consequently, for the EU–DRD we adopt an explicit form for regulations governing regulations. The specific fragments of the Data Retention Directive that we formalise are: – Article 5 – “Member states shall ensure that the following categories of data are retained under this Directive:” (paraphrased) the data necessary to trace and identify the source, destination, date, time and duration, and type of a communication. Also, the users’ communication equipment and its location (rule DRDC.1, and DRDD.2) and “No data revealing the content of the communication may be retained pursuant to this Directive” (DRDD.2). – “Member States shall ensure that the categories of data specified in Article 5 are retained for periods of not less than six months and not more than two years from the date of the communication” (rule DRDC.2). 62 3. F ORMALISING C OMPLIANCE IN M ULTI – LEVEL G OVERNANCE – Article 8 – “Member States shall ensure that the data specified in Article 5 are retained in accordance with this Directive in such a way that the data retained and any other necessary information relating to such data can be transmitted upon request to the competent authorities without undue delay” (rule DRDC.3). – Article 13 (clause 1) – “[...]sanctions are fully implemented with respect to the processing of data under this Directive.” (rule DRDC.4). We also take the following legal interpretations as holding in the EU–DRD: – Something happening after one month counts–as undue delay (rule DRDG.1). – Paying a fine counts–as being punished (rule DRDG.2). – Data retention is ensured for a period of between six and twenty–four months whenever there is a prohibition on deleting the data before 12 months and an obligation to delete it after 13 months (rules DRDD.1 and DRDD.2). Table 3.3: EU Data Retention Directive Formalisation G drd (;, time(m1)) 3 undue_delay (DRDG.1) G drd (;, payFine(CommSerProv0, Agent0)) 3 punish(CommSerProv0) (DRDG.2) C drd↑ (;, useElectronicCommunication(Agent0, CommServProv0)) 3 obl(obl(storeData(CommServProv0, Agent0, metadata), now), now) (DRDC.1) C drd↑ (;, storeData(CommSerProv0, Agent0, Data0)) 3 obl(ensure_data_retention_period(Agent0, CommSerProv0, Data0, m6, m24), now) (DRDC.2) C drd↑ ({is(Agent0, lawEnforcement)}, (DRDC.3) requestData(Agent0, CommSerProv0, Agent1)) 3 obl(obl(provideData(CommSerProv0, Agent0, Agent1), undue_delay), now) C drd↑ (;, viol(obl(provideData(Co, Ag0, Ag1), undue_delay))) 3 obl(obl(punish(CommServProv0), time(m6)), now) (DRDC.4) D drd ({pro(deleteData(CommSerProv0, Agent0, Data0), time(m12))}, obl(deleteData(CommSerProv0, Agent0, Data0), time(m13))) 3 ensure_data_retention_period(Agent0, CommSerProv0, Data0, m6, m24) (DRDD.1) D drd ({obl(deleteData(CommSerProv0, Agent0, Data0), time(m13))}, pro(deleteData(CommSerProv0, Agent0, Data0), time(m12))) 3 ensure_data_retention_period(Agent0, CommSerProv0, Data0, m6, m24) (DRDD.2) ∆drd = {obl(pro(storeData(CommProv0, Agent0, content), never), now), is(charles, lawEnforcement)} (DRDD.2) The UK’s Data Retention Regulations [226] (UKDRR) is a first–level institution which governs communications service providers in the United Kingdom. The fragments of the legislation we formalise are: 3.4. S EMANTICS 63 – Article 4 – “It is the duty of a public communications provider to retain the communications data specified in the following provisions of the Schedule to these Regulations” obliges metadata is stored and prohibits content data is stored (rule DRRC.1, and DRRIS.1) – Article 5 – “The data specified in the Schedule to these Regulations must be retained by the public communications provider for a period of 12 months from the date of the communication in question” (rules DRRC.2 and DRRC.3). – Article 8 – “The data retained in pursuance of these Regulations must be retained in such a way that it can be transmitted without undue delay in response to requests” (rule DRRC.4). – We assume the regulations are enforced with fines (e.g. rule DRRC.4). Table 3.4: UK Data Retention Regulations Formalisation C drr↑ (;, useElectronicCommunication(Agent0, CommProv0)) 3 obl(storeData(CommProv0, Agent0, metadata), now) (DRRC.1) C drr↑ (;, storeData(CommProv0, Agent0, metadata))) 3 pro(deleteData(CommProv0, Agent0, metadata), time(m12)) (DRRC.2) C drr↑ (;, storeData(CommProv0, Agent0, metadata)) 3 obl(deleteData(CommProv0, Agent0), time(m13)) (DRRC.3) C drr↑ ({is(Agent0, lawEnforcement)}, requestData(Agent0, CommProv0, Agent1, metadata)) 3 obl(provideData(Agent0, CommProv0, Agent1, metadata), time(m1)) (DRRC.4) C drr↑ (;, viol(obl(provideData(CommProv0, Agent0, Agent1), time(Length0)))) 3 (DRRC.5) obl(payFine(CommProv0, secrOfState), time(m6)) ∆drr = {pro(storeData(CommProv0, Agent0, content), never), is(charles, lawEnforcement)} (DRRIS.1) 3.4. S EMANTICS In this section we present the formal semantics for multi–level governance. Given a multi– level governance institution specification the semantics define a model, comprising for each institution states transitioned between by events, in response to a supplied trace of observable events. The key idea behind the semantics, depicted in figure 3.4 is to transition from one state to another, driven by generated events, by initiating and terminating inertial fluents. Then each state is closed by deriving non–inertial fluents according to an institution’s fluent derivation function and abstracting concrete fluents to non–inertial abstract normative fluents according to normative fluent abstraction. Given a multi–level governance institution model it can be determined whether individual institutions are compliant with the institutions that govern them in different contexts. The formal semantics provide a mechanism for automated compliance–checking in multi–level governance. 64 3. F ORMALISING C OMPLIANCE IN M ULTI – LEVEL G OVERNANCE Closed Initial State (def. 8) abstracts concrete (def. 7) normative fluents As Closed transitioned to state (def. 10) noninertial abstract normative fluent B derives nonnon-inertial (def. 6) inertial fluent A fluent B Inertial Fluents Generated events (def. 37) Fluent initiation and termination (def. 9) concrete normative fluents As abstracts non(def. 7) inertial abstract normative fluent B derives nonnon-inertial (def. 6) inertial fluent A fluent B Inertial Fluents Figure 3.4: An overview of the semantics, depicting the transition from the initial state to the next state and state closure. In order to reduce repetition the following definitions are with respect to several common objects. First, a multi–level governance institution ML = 〈T , R〉 where T = 〈I 1 , ..., I n 〉 is a tuple of institutions with typical elements being ∀i ∈ [1, n] : I i = 〈E i , F i , C i , G i , D i , ∆i 〉. Second, a tuple of states, representing the state of each institution for a single point in time j – 〈S 1j , ..., S nj 〉. Third, a tuple of event sets, representing the events occurring in each institution for a single point in time j – 〈E 1j , ..., E nj 〉. S TATE C ONDITIONS Institutions in a multi–level governance specification contain rules which are conditional on states and the occurrence of events. Therefore, determining if a rule is ‘fired’ requires determining in part if its state condition, a social context, holds in a state. We begin by defining when contexts are modelled by (hold in) a state. Informally, a state formula is modelled by a state if for each positive fluent in the formula there is an equivalent fluent that is a member of the state and for each negative fluent in the formula there is not an equivalent fluent that is a member of the state. Rather than defining modelling a state formula in terms of whether the positive/negative fluent is in the state, we use equivalence. This is because two normative fluents can have an equivalent meaning whilst being syntactically different – this is not unusual, in ‘Standard Deontic Logic’ [234] forbidden X is defined as obliged not X and likewise for much subsequent work. In our case, we define equivalences between two fluents based on whether they are are syntactically identical and two normative fluents based on whether their discharge and violation coincide. Referring again to Figure 3.3, an event/fluent a is obliged to occur/hold before or at the same time as some d by the obligation fluent obl(a, d) and is prohibited to occur/hold strictly before d by the prohibition fluent pro(a, d ). Given two normative fluents obl(a, d) and pro(a 0 , d 0 ) where a is equivalent to d 0 and d is equivalent to a 0 , the obligation’s 3.4. S EMANTICS 65 and prohibition’s discharge and violation coincide, and therefore they are equivalent. The equivalences (≡) of obligations and prohibitions according to their discharge and violation is summarised as obl(a, d ) ≡ pro(a 0 , d 0 ) if a ≡ d 0 and d ≡ a 0 , a definition that generalises to higher–order normative fluents.1 Accordingly, we define modelling a state formula as: Definition 4. State Formulae Let f ∈ F i be a fluent. We define ≡ and |= for all contexts X ∈ X i as: f ≡f obl(a, d ) ≡ pro(a 0 , d 0 ) i S |= f S i |= ¬ f S i |= X ⇔ ⇔ ⇔ ⇔ a ≡ d 0 and d ≡ a 0 ∃ f 0 ∈ Si : f ≡ f 0 Ø f 0 ∈ Si : f ≡ f 0 ∀x ∈ X : S i |= x E VENTS In this section we semantically define the events occurring in an institution, in response to other events in specific contexts. Precisely, an event generation operation GRi defines for an institution I i in a multi–level governance institution which events occur in a state S i in response to a set of events E i . An event occurs in an institution if it is generated by the institution’s event generation function G i , or if it represents the discharge/violation of a discharged/violated normative fluent holding in the institution’s state or that of a lower– level institution the institution governs. The event generation operation is formalised below and explained subsequently: i Definition 5. Event Generation Operation The event generation operation GRi : Σi ×2E → i 2E is defined for each institution I i w.r.t. the tuple of multi–level governance states 1 〈S j , ..., S nj 〉 and event sets 〈E 1j , ..., E nj 〉. The operation is defined as GRi (S i , E i ) = E 0 iff E 0 minimally (w.r.t. set inclusion) satisfies all of the following conditions: now ∈ E 0 i E ⊆E (D37.1) 0 (D37.2) i 0 0 i i i 0 0 ∃X ∈ X , e ∈ E , e ∈ G (X , e) : S |= X ∧ S |= pow(e ) ⇒ e ∈ E i i 0 S |= obl(a, d ) ∧ (a ∈ E ∨ S |= a) ⇒ disch(obl(a, d )) ∈ E 0 (D37.3) 0 (D37.4) S i |= obl(a, d ) ∧ (d ∈ E 0 ∨ S i |= d ) ∧ disch(obl(a, d )) 6∈ E 0 ⇒ viol(obl(a, d)) ∈ E 0 i 0 i i 0 i S |= pro(a, d ) ∧ (d ∈ E ∨ S |= d ) ⇒ disch(pro(a, d )) ∈ E 0 0 S |= pro(a, d ) ∧ (a ∈ E ∨ S |= a) ∧ disch(pro(a, d )) 6∈ E ⇒ viol(pro(a, d )) ∈ E h i ∃〈h, i 〉 ∈ R, e ∈ Enorm ∩ Enorm ⇒ e ∈ E 0 (D37.5) (D37.6) 0 (D37.7) (D37.8) In more detail: • D37.1 – the event of now always occurs. 1 An example of higher–order equivalence generalisation is obl(obl(a, d ), d 0 ) ≡ obl(pro(d , a), d 0 ) ≡ pro(d 0 , obl(a, d )), etc. 66 3. F ORMALISING C OMPLIANCE IN M ULTI – LEVEL G OVERNANCE • D37.2 – events that have already occurred still occur (monotonicity). • D37.3 – an event generated by the institution’s event generation function in response to another event, conditional on a social context modelled by the state and the event being empowered to occur. • D37.4 to D37.7 – a compliance event occurring signifying a normative fluent is discharged or violated in a state, by an obliged/prohibited event, fluent or another normative fluent. Compliance events do not need to be empowered in order to occur. • D37.8 – norm compliance events occurring in lower level institutions linked to this institution, also occur in this institution. Note that GRi is increasingly monotonic and a well–defined partial function. The function GRi is partial if there is a fault in the institutional specification or the set of events passed are inconsistent. Specifically, if an institution is defined such that violating a normative fluent causes an event that discharges the same normative fluent via the event generation function G (either directly or transitively). D ERIVED F LUENTS In this section we semantically define deriving fluents from other fluents in a given state. We define a fluent derivation operation FDi which, operating on an institutional state, extends the state to include derived fluents based on fluent derivation rules of the form “fluent A derives fluent B in context C” described by the fluent derivation function D i . These derived fluents are the ‘Bs’ from fluent derivation rules where the context ‘C’ holds and the fluent ‘A’ is modelled by the state. By deriving fluents from other fluents in a state, it is possible further fluents should be derived. Thus, the fluent derivation operation FDi is defined to close a state by producing an extended state which includes all derived fluents with respect to the extended state itself. The fluent derivation operation is formally defined as: Definition 6. Fluent Derivation Operation The fluent derivation operation FDi : Σi → Σi is defined for each institution I i and a state S i ∈ Σi such that FDi (S i ) = S 0 iff S 0 minimally (w.r.t. set inclusion) satisfies all of the following conditions: Si ⊆ S0 (D6.1) 0 0 i 0 0 ∃X ∈ X , f ∈ S , f ∈ D (X , f ) : S |= X ⇒ f ∈ S 0 (D6.2) In more detail: • D6.1 – Closure of the state does not remove any fluents from the input state. • D6.2 – A fluent derived from another fluent conditional on a social context modelled by the state according to the institution’s fluent derivation function is a member of the closed state. Note that the fluent derivation operation is undefined if an institution’s fluent derivation function has an output that is inconsistent with its input. For example D ({¬B }, A) 3 B 3.4. S EMANTICS Deontological counts-as between normative fluents based on ai counting as b 67 obl(a0 , d ) counts-as obl(b, d ) An event, fluent or normative fluent ai counts-as an event, fluent or normative fluent b in a state according to event generation, derived fluents and deontological counts-as functions obl(a1 , d ) counts-as obl(b, d ) a 0 counts-as b ... obl(an , d ) counts-as obl(b, d ) pro(a0 , d ), pro(a1 , d ), ... and pro(an , d ) counts-as pro(b, d ) a 1 counts-as b ... a n counts-as b Figure 3.5: Overview for deontological counts–as semantics between concrete and abstract normative fluents, based on counts–as relations between the elements they prescribe holding in a context entailed by a single state. or in words “A counts–as B in the context that B does not hold”. In other cases, the fluent derivation operation is multi–valued if at least two rules defined by the institution’s fluent derivation function are mutually inconsistent. For example D ({¬B2}, A) 3 B1 and D ({¬B1}, A) 3 B2, or in words “A counts–as B1 in the context that B2 does not hold” and vice versa “A counts–as B2 in the context that B1 does not hold”. The occurrence of these issues indicates an institution design problem, which should be resolved by the institution designer. A BSTRACTING N ORMATIVE F LUENTS This section presents a semantics for abstracting concrete normative fluents. The basic idea, depicted in Figure 3.5, is to establish new counts–as relations between concrete normative fluents and abstract normative fluents, based on the concrete concepts they prescribe counting–as more abstract concepts. In other words, counts–as relations between concrete and abstract normative fluents are based on other counts–as relations between the concrete and abstract concepts they prescribe. Before we go into the actual semantics for abstracting concrete normative fluents, we describe the intuition and general semantics, then give numerous examples and finally the formalisation. We call the relation between concrete and abstract normative fluents deontological counts–as and derive it based on three types of counts–as rules (referring again to figure 3.5). Firstly, based on counts–as between events according to an institution’s event generation function. Here, we derive relations stating concrete normative fluents about events count–as an abstract normative fluent about an event. Secondly, based on counts–as between fluents according to an institution’s fluent derivation function. Here, we derive relations stating concrete normative fluents about fluents count–as an abstract normative fluent about a fluent. Thirdly, based on counts–as between normative fluents themselves 68 3. F ORMALISING C OMPLIANCE IN M ULTI – LEVEL G OVERNANCE according to the deontological counts–as relation we define. Here, we derive relations stating higher–order concrete normative fluents prescribing normative fluents count–as a more abstract higher–order normative fluent prescribing a normative fluent. So, a deontological counts–as relation between concrete and abstract normative fluents is derived from primitive ontological counts–as relations according to an institution’s event generation and fluent derivation functions, and deontological counts–as itself in order to derive deontological counts–as between higher–order normative fluents. How the deontological counts–as relations between concrete and abstract normative fluents are derived is described as follows. The intuition is that concrete normative fluents count–as a more abstract normative fluent if and only if complying with the concrete normative fluents (i.e. discharging or not violating) by causing an event to occur or fluent to hold counts–as a certain institutional event or fluent to hold which guarantees the abstract normative fluent is also complied with (i.e. discharged or not violated). Following this intuition, we start by describing deontological counts–as for obligations. In reference to figure 3.5, whenever any of a0 to an occur or hold we are guaranteed b occurs/holds. If there is a concrete obligation imposed on one of a0 , ..., an to occur/hold before a deadline d , then it is guaranteed that complying with the concrete obligation (discharging or not violating) means a more abstract obligation for b to hold before the same deadline d is also guaranteed to be discharged or not violated. Therefore, we derive a deontological counts–as relation stating that a concrete obligation on any of a0 , ..., an before d counts–as a more abstract obligation for b to occur before d . Prohibitions are different. If a0 , ..., an count–as b , then unlike obligations we cannot apply modus ponens and say that prohibiting a0 before d counts–as prohibiting b before d . The reason being, a 0 not occurring/holding does not mean b does not occur/hold. Thus, prohibiting a0 on its own does not mean b should not occur. In other words. discharging or not violating a prohibition on a0 before d does not guarantee that a prohibition on b before d is discharged or not violated. The reason is b can occur due to any of a 1 , ..., a n occurring/holding (all counting–as b ) and thus violate a prohibition on b before d . We might be tempted to apply modus tollens and say that b not occurring/holding means a0 , ..., an do not occur/hold, therefore prohibiting b before d counts–as prohibiting a0 , ..., an before d . However, this would be concretisation since a0 , ..., an are more concrete than b (recall that concrete concepts count–as abstract concepts, and a0 , ..., an count–as b ). On the other hand, we are interested in abstraction. To summarise, unlike obligations modus ponens is inappropriate to base counts–as between prohibitions on, whilst modus tollens is inappropriate since it concretises rather than abstracts. Instead, we derive a deontological counts–as relation between prohibitions stating that prohibiting all of a0 , ..., an from occurring/holding before d counts–as a prohibition on a more abstract event/fluent b occurring/holding before d . This is based on the fact that counts–as is ascriptive defining all ways an abstract institutional concept can occur/hold when more concrete concepts occur/hold. Since the institutional events/fluents are ascribed by an institution’s counts–as relations, if none of a0 , ..., an occur/hold then b is not ascribed and therefore does not occur/hold. Thus, complying with (discharging or not violating) all prohibitions on a0 , ..., an occurring/holding before d guarantees that a prohibition on b before d is also complied with (discharged or not violated). These informal semantics abstract concrete normative fluents with different concrete 3.4. S EMANTICS 69 aims to an abstract normative fluent with a more abstract aim. Normative fluents’ deadlines are also abstracted. However, as we observed when defining equivalences between normative fluents, the aim of an obligation is by definition obliged, whilst the deadline is prohibited and vice versa for prohibitions. Thus, the abstraction of obligation fluents’ deadlines should be under the same semantics as prohibitions’ aims and vice versa for prohibitions. So, given that a0 counts–as b , a prohibition for z to occur before a0 counts–as a prohibition for z to occur before b . Alternatively, we can just apply the equivalences between normative fluents such that we have an obligation for a0 to occur before z which counts–as an obligation for b to occur before z , which is equivalent to a prohibition for z to occur before b . Since a state with a prohibition fluent also models an equivalent obligation fluent and vice versa, we define deontological counts–as based on the normative fluents a state models and obtain the abstraction of normative deadlines ‘for free’. This summarises the intuition behind deontological counts–as. More formally, deoni i tological counts–as is defined as the function DCi : Σi → 2Fnorm × Fnorm . The function i specifies for a state (S ) a relationship (〈N , n〉 ∈ DC(S )) between sets of relatively concrete normative fluents (N ) that count–as an abstract normative fluent (n ) in the state S i . We exemplify the deontological counts–as function using our running case study. We focus on the EU–DRD’s prescriptions formalised as an institution I drd . Counts–as between events according to the EU–DRD’s event generation G function state that a communications provider (isp) storing the content of a user’s (ada) communications data (storeData(isp, ada, content)) counts–as (causes the institutional event of) storing personal data (storeData(isp, ada, personal)). Likewise, storing communications’ metadata (storeData(isp, ada, metadata)) counts–as storing personal data. Storing metadata or content data counts–as storing personal data. Thus, obliging metadata or obliging content data is stored immediately counts–as obliging personal data is stored immediately, since if a communications provider stores metadata or content data then it also stores personal data: 〈{obl(storeData(isp, ada, content), now)}, obl(storeData(isp, ada, personal), now)〉 ∈ DCi (S i ) 〈{obl(storeData(isp, ada, metadata), now)}, obl(storeData(isp, ada, personal), now)〉 ∈ DCi (S i ) Prohibiting storing both content and metadata indefinitely counts–as prohibiting storing personal data indefinitely: 〈{pro(storeData(isp, ada, content), never), pro(storeData(isp, ada, metadata), never)}, pro(storeData(isp, ada, personal), never)〉 ∈ DCi (S i ) Higher–order normative fluents are abstracted using the same intuitions as first–order normative fluents, but with abstraction based on deontological counts–as. According to our case study, obliging an obligation to store content data counts–as obliging an obligation to store personal data. Likewise, obliging an obligation to store metadata counts–as obliging an obligation to store personal data. 70 3. F ORMALISING C OMPLIANCE IN M ULTI – LEVEL G OVERNANCE 〈{obl(obl(storeData(isp, ada, content), now), now)}, obl(obl(storeData(isp, ada, personal), now), now)}〉 ∈ DCi (S i ) 〈{obl(obl(storeData(isp, ada, metadata), now), now)}, obl(obl(storeData(isp, ada, personal), now), now)}〉 ∈ DCi (S i ) Likewise, but for prohibitions, prohibiting storing metadata and prohibiting storing content data counts–as prohibiting storing personal data. Thus, obliging to immediately prohibit storing metadata and obliging to immediately prohibit content data counts–as obliging to immediately prohibit storing personal data. Only obliging to prohibit storing content data, does not mean it is obliged to prohibit storing personal data: 〈{obl(pro(storeData(isp, ada, content), never), now), obl(pro(storeData(isp, ada, metadata), never), now)}, obl(pro(storeData(isp, ada, personal), never), now)〉 ∈ DCi (S i ) Higher–order prohibition abstraction semantics generalises the intuition of deontological counts–as for first–order prohibitions, but based on deontological counts–as itself. Prohibiting all concrete normative fluents that count–as a more abstract normative fluent, counts–as prohibiting the more abstract normative fluent. According to our case study, indefinitely prohibiting obliging storing content data and prohibiting to oblige storing metadata, counts–as indefinitely prohibiting obliging storing personal data. Likewise, for prohibiting prohibitions. 〈{pro(obl(storeData(isp, ada, content), now), never), pro(obl(storeData(isp, ada, metadata), now), never)}, pro(obl(storeData(isp, ada, personal), now), never)}〉 ∈ DCi (S i ) 〈{pro(pro(storeData(isp, ada, content), never), never), pro(obl(storeData(isp, ada, metadata), never), never)}, pro(pro(storeData(isp, ada, personal), never), never)〉 ∈ DCi (S i ) Abstracted normative fluents can also be further abstracted. To give an example, in the EU–DRD the event of storing personal data without someone’s consent counts–as a non– consensual data processing event. Hence in the context that the agent Ada has not consented (S |= ¬consentedDataProcessing(ada)) we have the following deontological counts–as relation. It states the EU–DRD is effectively obliging an obligation for data to be processed non–consensually: 〈{obl(obl(storeData(isp, ada, personal), now), now)}, obl(obl(nonConsensualDataProcessing(ada), now), now)}〉 ∈ DCi (S i ) Deontological counts–as relations are also derived from the fluent derivation function D i . To exemplify, we take the previous example where we have an abstract obligation obliging Ada’s data is stored non–consensually. Loosely speaking, the ECJ judged [70] that the 3.4. S EMANTICS 71 EU–DRD, by obliging an obligation for non–consensual data processing, violated the EU– CFR’s prohibition on unfair data processing (e.g. pro(unfairDataProcessing(ada), never)). But how do we go from a second–order obligation for data to be processed non–consensually to violating a first–order prohibition on unfair data processing? One possibility is that the EU–CFR’s fluent derivation function (D cfr ) states that obliging non–consensual data processing counts–as unfair data processing, such that D cfr (;, obl (nonConsensualDataProcessing(ada)), now)) 3 unfairDataProcessing(ada). Thus we have the following relation stating the second–order obligation for non–consensual data processing deontologically counts–as, more abstractly, obliging data is processed unfairly: 〈{obl(obl(nonConsensualDataProcessing(ada)), now), now)}, obl(unfairDataProcessing(ada), now)〉 ∈ DCi (S i ) However, obliging data is processed unfairly does not violate the EU–CFR prohibition on unfair data processing, pro(unfairDataProcessing(ada), never). This is unsurprising, the EU–CFR does not impose an explicit second–order prohibition, or contain any explicit higher–order norms for that matter (both in reality and in our formalisation). Unfair data processing is somehow derived from an obligation to oblige non–consensual data processing. One possibility is as follows: 1. according to the fluent derivation function obliging non–consensual data processing counts–as unfair data processing, thus 2. obliging an obligation to process data non–consensually counts–as obliging unfair data processing. 3. The EU–CFR considers whether data is processed unfairly or obliged to be processed unfairly as irrelevant, both are viewed as unfair data processing. 4. Thus, an obligation to process data unfairly counts–as unfair data processing according to the fluent derivation function, D cfr (;, obl (un f ai r D at aP r ocessi ng (ad a)), now)) 3 unfairDataProcessing(ada). That is, normative fluents about abstract concepts are reduced to (ascribed as) those abstract concepts, in this way first–order norms can indirectly govern other norms. The idea here does not mean what ought to be the case is the case (unfair data processing). Rather, unfair data processing is an abstract concept which has many meanings, including obliging unfair data processing itself. Note that this means not only is an obligation to process data unfairly reduced to unfair data processing, but so is a second–order obligation, a third–order obligation, etcetera. Formally: 〈{obl(obl(unfairDataProcessing(ada), now), now)}, unfairDataProcessing(ada)〉 ∈ DCi (S i ) 〈{obl(obl(obl(unfairDataProcessing(ada), now), now), now)}, unfairDataProcessing(ada)〉 ∈ DCi (S i ) ... Following this discussion, we formally define deontological counts–as, based on counts– as relations which hold in a state according to the event generation function, fluent derivation function and deontological counts–as itself. For convenience, we collect the event generation and fluent derivation counts–as relations into a single set Ai which form the function’s base cases. Since deontological counts–as is also defined based on its own counts–as 72 3. F ORMALISING C OMPLIANCE IN M ULTI – LEVEL G OVERNANCE relations (in order to generalise to higher–order normative fluents), deontological counts–as is also defined recursively. Formally, deontological counts–as is defined as: Definition 7. Deontological Counts–as Given a state S i , the deontological counts–as funci i tion DCi : Σi → 2Fnorm × Fnorm is defined for the state S i ∈ Σi such that DCi (S i ) is the minimal (w.r.t. set inclusion) set of all pairs 〈N 0 , n 0 〉 where N 0 6= ; that satisfy the following: 0 N 0 = {obl(a, d ) | a ∈ A}s.t .〈A, b〉 ∈ Ai (S i ) ∪ DCi (S i ) ∧ n 0 = obl(b, d ) ∈ Fnorm or (D7.1) i N 0 = {pro(a, d ) | 〈A, b〉 ∈ Ai (S i ) ∪ DCi (S i ) ∧ a ∈ A} ∧ n 0 = pro(b, d ) ∈ Fnorm (D7.2) i i i Where the set of abstracting counts–as relations A (S ) for the state S is defined as: A(S i ) ={〈{a}, b〉 | X ∈ X i , a ∈ E i , b ∈ G i (X , a) ∧ S i |= pow(b)}∪ i i i {〈{a}, b〉 | X ∈ X , a ∈ F , b ∈ D (X , a)} (D7.3) (D7.4) i A state closed under deontological counts–as function is the function DC : Σi → Σi , such i that S 0 = DC (S i ) iff it minimally (w.r.t. set inclusion) satisfies all of the following conditions: Si ⊆ S0 (D7.6) i ∃〈N 0 , n 0 〉 ∈ DCi (S i ) : N 0 ⊆ S 0 ∧ n 0 ∈ Fanorm ⇒ n0 ∈ S0 (D7.7) In more detail. Concrete obligations count–as a more abstract obligation according to D7.1. Concrete prohibitions count–as a more abstract prohibition according to D7.2. These counts–as relations are derived from relations between concrete concepts counting–as an abstract concept defined by the event generation function and fluent derivation function according to D7.3 – D7.4 (the base cases) and with respect to deontological counts–as itself since it is defined recursively. Deontological counts–as does not describe whether normative fluents in a state S i are abstracted, but rather whether they could be. Closing a state under deontological counts–as i is according to the operation DC . Condition D7.6 ensures any fluents already in the state remain in the state. Condition D7.7 ensures if concrete normative fluents, should they hold in a state are abstracted to a normative fluent, and they do indeed hold, then the abstracted normative fluent also holds. Note that in D7.7 it is ensured only normative fluents which belong to the abstract set of normative fluents can hold in a state due to being derived from concrete normative fluents. Consequently, deontological counts–as only adds non–inertial abstract normative fluents to a state. i Note that DC is a partial function if there is a fault in the institutional specification. For example, if an institution obliges an event a to occur in some state, and the event a generates the event b in that state, then b is also obliged to occur in that state. However, if a generates the event b conditional on b not being obliged then there is a problem. We have that b is obliged since a is obliged. But, if b is obliged then a does not count–as b , thus obliged a does not count–as obliged b and so there is no obligation for b to occur. Again, in principle there is nothing wrong with the possibility of this paradox occurring since it is i an institutional design fault. If we have DC (S) = ⊥ then we have detected an institutional design problem for the institution designer to rectify. 3.4. S EMANTICS 73 M ODELS In this section we define a model which describes how each institution in a multi–level governance institution evolves from one state to the next, driven by observable events which generate institutional events in state transitions. A model is defined in response to a trace of observable (exogenous) events. The approach we take is to put together all the previous operations according to the following description. An institution starts at an initial state which includes the institution’s initial set of inertial fluents (∆i ), and the state closed under the fluent derivation and deontological counts–as operations. The institution transitions between states with a set of events generated by the event generation operation in response to an observable event in the event trace. Each state transitioned to contains the fluents that held in the previous state that were not terminated, any newly initiated fluents as well as closing the state under the fluent derivation and deontological counts–as operations. Additionally, an institution’s evolution is affected by the evolution of other institutions it governs. This means that a higher level institution’s state includes normative fluents from lower level institutions it governs. These normative fluents are ‘passed up’ to the higher level institution in order to abstract the lower levels normative fluents and determine if they are compliant in their abstract interpretation. We begin by defining the initial state of each individual institution. Formally and described subsequently: Definition 8. Initial States The initial state S 0i for each individual institution I i w.r.t. ML = 〈T , R〉 and a tuple of initial states 〈S 01 , ..., S 0n 〉 is the set S 0i if and only if S 0i minimally (w.r.t. set inclusion) satisfies the following: S 0i ⊆ ∆i (D8.1) h h i ∃〈h, i 〉 ∈ R, n ∈ (Fcnorm ∪ Fanorm ) ∩ Fninert : n S 0i i ∈ S 0h ⇒n ∈ S 0i (D8.2) (S 0i ) (D8.3) S 0i = DC (S 0i ) (D8.4) = FD i • D8.1 – an institution’s initial set of inertial fluents is included in the institution’s initial state. • D8.2 – if the institution governs a lower level institution then it contains any normative fluents holding in that lower level institution’s initial state. • D8.3 – the initial state is closed under the fluent dependency operation, such that all derived fluents are included. • D8.4 – the initial state is closed under deontological counts–as such that all abstracted normative fluents are included. Now we define which fluents are initiated and terminated from one state to the next in response to a generated set of events (i.e. by the event generation operation). The set of fluents that are initiated (INITi ) and terminated (TERMi ) from one state to the next are formally defined as and subsequently described: 74 3. F ORMALISING C OMPLIANCE IN M ULTI – LEVEL G OVERNANCE Definition 9. Fluent Initiation and Termination The sets of all initiated and terminated i i fluents for I i are respectively defined with the functions INITi : Σi ×2E → 2F and TERMi : i i Σi × 2E → 2F : INITi (S i , E i ) = { f | ∃e ∈ E i , ∃X ∈ X i : f ∈ C i ↑ (X , e) ∧ S i |= X } (D9.1.1) TERMi (S i , E i ) = { f | ∃e ∈ E i , X ∈ X i :S i |= f ∧ f ∈ C i ↓ (X i , e) ∧ S i |= X or (D9.2.1) S i |= f ∧ (viol( f ) ∈ E i ∨ disch( f ) ∈ E i )} (D9.2.2) Condition D9.1.1 specifies the set of initiated inertial fluents according to the institution’s consequence function. An inertial fluent is initiated by the state consequence function conditional on an event occurring and a social context holding in the state. Conversely, D9.2.1 specifies the set of terminated inertial fluents includes any inertial fluents terminated according to the institution’s consequence function. Condition D9.2.2 states any discharged or violated inertial (concrete) normative fluents are also terminated, meaning discharged/violated normative fluents do not persist by default2 . A state transition operation (TRi (S i , E i )) produces a new institutional state based on the previous state (S i ) due to the occurrence of events (E i ). The new state includes any inertial fluents that held in the previous state and have not been terminated, any newly initiated fluents, normative fluents holding, and the state’s closure under the fluent derivation and deontological counts–as operations. It is formally defined as and subsequently described: i Definition 10. State Transitions The state transition operation TRi : Σi × 2E → Σi is defined for each institution I i , a state S i and a set of events E i w.r.t. the states of other institutions 〈S 1j , ..., S nj 〉 holding at the same time and ML = 〈T , R〉, such that TRi (E i S i ) = S 0 iff S 0 minimally (w.r.t. set inclusion) satisfies all of the following conditions: i ∀ f ∈ (S i ∩ Finert )\TERMi (S i , E i ) ⇒ f ∈ S 0 (D10.1) ∀ f ∈ INITi (S i , E i ) ⇒ f ∈ S 0 h (D10.2) h i ∃〈h, i 〉 ∈ R, n ∈ (Fcnorm ∪ Fanorm ) ∩ Fninert : n 0 i 0 S = FD (S ) i S 0 = DC (S 0 ) ∈ S hj ⇒n∈S 0 (D10.3) (D10.4) (D10.5) • D10.1 – non–terminated inertial fluents persist from one state to the next, following the common sense law of inertia. • D10.2 initiated fluents hold in the next state. 2 Meaning, if you discharge or violate an obligation you are no longer obliged and likewise for prohibitions. In some cases, it can make sense for a discharged/violated normative fluent to persist. For example, if you violate a prohibition on murder, it is still usually the case that you are still prohibited from committing murder. For an extensive discussion on when it does and does not make sense for obligations and prohibitions to persist after discharge/violation see [98]. 3.4. S EMANTICS 75 • D10.3 a higher level institution’s state contains all normative fluents that hold in the same state of a lower level institution the higher level governs. • D10.4 the newly transitioned to state includes all normative fluents that can be derived according to the fluent derivation operation. • D10.5 the newly transitioned state contains all normative fluent abstractions according to deontological counts–as. We now proceed to event traces. The trace a model defined in response to is a sequence of observable events recognised by the institutions involved in a multi–level governance relationship. That is, it is a trace of only those events that can affect the institutions involved, driving their evolution and the multi–level governance institution’s evolution as a whole. Each event in a trace needs to be recognised by at least one institution to drive its evolution over time. We call such a trace, a composite event trace, formally: Definition 11. Composite Event Trace Let ML = 〈T , B 〉 be a multi–level governance institution where T = 〈I 1 , ..., I n 〉. ctr = 〈e 0 , ..., e k 〉 is a composite trace for ML iff ∀ j ∈ i [0, k], ∃i ∈ [n] : e j ∈ Eobs Synchronisation issues can arise between institutions. These issues occur if a composite trace includes an event recognised by one institution, therefore driving its state forward, but not recognised by another meaning its state does not evolve. If an event in a composite trace is not recognised by an institution, then the institution should still transition to a new state to ensure it is evolving at the same rate as other institutions. We replace unrecognised events by the event of no change, the null event, in a synchronised trace for each institution derived from a composite trace. Formally: Definition 12. Synchronised Trace Let I be an institution, and ctr = 〈e 0 , ..., e k 〉 be a composite event trace. A trace str = 〈se0 , ..., sek 〉 is a synchronised trace of ctr for I iff ∀i ∈ [0, k] : if e k ∈ Eobs , sek = e k and sek = e null otherwise. We now define a multi–level governance institution model. A model comprises sequences of states (S ) and events (E ). One state sequence for each individual institution (S i ) and one sequence of event sets for each individual institution (E i ) driving its state transitions. A model is defined in response to a composite trace such that the corresponding synchronised trace for each institution drives its evolution over time, causing events to occur and driving state transitions forward. Each state and set of transitioning events is defined for each institution assuming the states and set of transitioning events exist for every other institution. Formally: Definition 13. Multi–level Governance Institution Model Let M = 〈M 1 , ..., M n 〉 be a tuple of state and event sequence pairs for each institution I i with typical element M i = 〈S i , E i 〉 i where S i = 〈S 0i , ..., S k+1 〉 and E i = 〈E 0i , ..., E ki 〉. Let ctr be a composite trace for ML = i i 〈T , R〉 and str = 〈se0 , ..., seik 〉 be a synchronised trace of ctr for each institution I i . Let ∀i ∈ [1, n], ∀ j ∈ [0, k] : GRi (S ij , E ij ) be the event generation operation for I i w.r.t. 〈S 1j , ..., S nj 〉 and 〈E 1j , ..., E nj 〉. Let ∀i ∈ [1, n], ∀ j ∈ [0, k] : TRi (S ij , E ij ) be the state transition operation for 76 3. F ORMALISING C OMPLIANCE IN M ULTI – LEVEL G OVERNANCE each institution I i w.r.t. 〈S 1j , ..., S nj 〉. The tuple M is a model of ML w.r.t. ctr if and only if: ∀i ∈ [1, n] : S 0i is the initial state of each institution I i w.r.t. 〈S 01 , ..., S 0n 〉 i (D13.1) (S ij , {seij }) (D13.2) ∀i ∈ [1, n], ∀ j ∈ [0, k] : S ij +1 = TRi (S ij , E ij ) (D13.3) ∀i ∈ [1, n], ∀ j ∈ [0, k] : E ij = GR • D13.1 – the initial state of each individual institution, which is defined with respect to the initial state of every other institution (meaning a higher–level institution includes normative fluents from a lower–level institution). • D13.2 – each institution’s set of events transitioning to a new state comprises all events generated from the corresponding event in the synchronised trace and the previous state according to the event generation operation. The event generation operation is also defined with respect to the states and events from every other institution, such that norm compliance events are ‘passed up’ between governance levels. • D13.3 – the next state transitioned from the previous state by the set of transitioning events. The state transition operation is also defined with respect to the states and events from every other institution, such that normative fluents are ‘passed up’ between governance levels. This concludes multi–level governance institution semantics. C OMPLIANCE M ONITORING A multi–level governance institution model monitors the compliance of other institutions’ regulations and their outcomes. A model determines if the concrete regulatory effects of one institution are non–compliant with the more abstract regulations of a higher level institution in a particular context. This is by ‘passing up’ any concrete normative fluents from a lower level institution to the higher level institution which governs it. Then, abstracting those concrete normative fluents in the higher level institution according to the higher level institution’s abstracting constitutive rules (i.e. under the semantics of deontological counts–as). Then, taking the more abstract interpretation of the lower levels’ concrete normative fluents, generating any discharge and violation events of the higher level institution’s higher–order norms that oblige/prohibit the abstracted lower level institution’s concrete norms. All that is needed to determine if there is non–compliance is to collect a set of violation events from the multi–level governance model for each institution. Formally, the set of sets of violation events for each individual institution denoting non–compliance is: Definition 14. Multi–level Governance Violations Let ML = 〈T , R〉 be a multi–level governance institution and M = 〈M 1 , ..., M n 〉 a model of ML w.r.t. a composite trace ctr such i that ∀i ∈ [n] : M i = 〈S i , E i 〉, S i = 〈S 0i , ..., S k+1 〉, E i = 〈E 0i , ..., E ki 〉. The tuple V = 〈V1 , ...,Vn 〉 is the set of multi–level governance violations for ML w.r.t. ctr if and only if: i i ∀i ∈ [1, n] : Vi = {e | ∃ f , j : f ∈ Fcnorm ∪ Fanorm , j ∈ [k] ∧ viol( f ) ∈ E ij ∧ e = viol( f )} (D14.1) 3.5. R ELATED W ORK 77 Non–compliance is found if the set of violation events is not the empty set. For an institution governing a society this implies the society is non–compliant (either in reality if compliance checking is performed before run–time or hypothetically if not). For a higher level institution governing a lower level institution non–compliance denotes the regulatory effects are non–compliant if the violated norms belong to the higher level institution. Such non–compliant regulatory effects can be due to having a more abstract, non–compliant, meaning. 3.5. R ELATED W ORK In this chapter we presented a formal framework for reasoning about multi–level governance. Specifically, determining compliance where higher–level institutions which impose abstract regulations governing lower–level institutions which impose concrete regulations. The purpose of this chapter is to contribute a rigorous formalisation, with particular attention paid to the philosophical aspects. Closely related works contribute formalisms for reasoning about hierarchical governance and abstract regulations. 3.5.1. H IERARCHICAL G OVERNANCE There appears to be little on hierarchical governance and the regulation of regulations. In [159] Lopez and Luck propose a framework for reasoning about norms governing agents, created from a top–down governance perspective. Their framework, based on the Z specification language, gives a precise specification language of a normative system/institution rather than like ours a specification language and operationalisation (semantics). Like our framework, theirs offers similar expressivity with temporal norms, rewards, punishments, etcetera. In particular Lopez and Luck formalize what they call legislative norms which are special norms filling the role of, viewing norms as being dynamic and subject to creation, deletion and modification, governing the act of norm changes. This still presents a substantial difference to the method of hierarchical governance and regulation governing regulations we propose, since we use higher–order norms that govern the outcome of other norms from which (non–)compliance is determined (typically pre–runtime). Lopez and Luck’s legislative norms on the other hand govern the changes to the norms (rules) themselves. Boella and van der Torre [26] offer a conceptual formalisation of hierarchical normative systems in Input/Output Logic (a logic aimed at studying conditional norms [165]). Like our formalisation, they formalise governance hierarchies, but their formalised concepts have nuanced differences with ours. One of their foci is the role of permissions in hierarchical normative systems. They look at permissions from two perspectives: firstly permissions in static normative systems where authorities do not change norms, secondly permissions in dynamic normative systems where authorities are liable to change norms. In the first case of static normative systems, permissions are issued by higher authorities (e.g. existing in higher level institutions) and act to derogate (except) obligations to the contrary (prohibitions) issued by lower level authorities. Conversely, a higher-level authority issuing an obligation is essentially preventing a lower-level authority from issuing a permission that derogates the obligation. In the second case of dynamic normative systems, permissions issued by higher-level authorities act to enable lower-level authorities to change the 78 3. F ORMALISING C OMPLIANCE IN M ULTI – LEVEL G OVERNANCE normative system in some way, such as permitting a norm to be implemented. The same goes for obligations and prohibitions, a higher-level authority may prohibit a lower-level from implementing a permission that derogates other norms. In contrast, we do not look at derogation, similar concepts would require a kind of defeasibility, which as discussed in the relation to defeasible logic is left for future work. In terms of norms that enable/disable changes to a dynamic normative system, we do not look at dynamics of norms in this chapter, but later in Chapter 6 we formalise counts-as conditionals that regulate norm change in a temporal setting. Subsequent work by Boella and van der Torre [29] formalises higher-order norms in the context of security policies. A security governance hierarchy involves global policy makers obliging/permitting/prohibiting local policy makers to/from obliging/permitting/prohibiting individual agents to/from sharing information and knowledge. In the formalisation agents impose norms by ascribing violations to the actions of other named agents. For example, if agent A prohibits agent B from doing x then agent A ascribes, according to an internal rule, a violation on B for doing x . Hence, the general approach is to adopt Anderson’s [9] reduction of deontic logic to alethic modal logic, where the modalities are replaced by rules with violation as the necessary consequent of prohibited actions/states of affairs. In order to impose higher-order norms, agents ascribe nested violations. So for example agent C prohibiting agent A from prohibiting B to do x , is reduced to an ascription by agent C to the action of agent A ascribing a violation to B doing x (a violation violates a norm). The formalisation is in contrast to ours. A higher-order norm according to Boella and van der Torre’s reduction to ascribed violations, is violated only when the norm it prescribes is violated. Consequently, if there are no violations of first-order norms then there are no violations of higher-order norms, owing to one focus being on the enforcement of norms which requires violations being ascribed to agents. In contrast, higher-order norms in our formalisation are discharged/violated by the mere imposition of obligations and prohibitions by lower-level institutions, although we show examples where violations themselves are obliged/prohibited, moreover we specifically address the different level of abstractions norms operate at. Aside from these different approaches and foci, Boella and van der Torre’s formalisation in [29] provides an argument for von Wright’s “transmission of will” principle requiring norms of all orders are enforced. As we discussed briefly in the background section (specifically 2.2.3), it is shown in formalised scenarios that von Wright’s ‘transmission of will’ [236] does not merely involve an obligation to oblige being fulfilled, but also the lower-order obligation being enforced. Moreover, higher-order norms should be enforced, or else lower authority agents acting in their own self interests may (not) impose certain norms that contravene higher-order norms. Central to demonstrating these two enforcement requirements is the use of violations being ascribed to agents’ actions (including the action of ascribing violations). In our formalisation, it is grammatical for higher-order norms to be enforced but in our context of institutions governing institutions higher-order norm enforcement is meaningless. That is, in our formalisation violation occurs as a part of a pre-runtime check (e.g. to check whether national legislation implements an EU directive before a particular deadline) and hence it makes no sense to enforce higher-order norms when violations occur. Rather we assume rewards/punishments for (non-)compliant institution designs are imposed by some kind of external process or logic after a pre-runtime check 3.5. R ELATED W ORK 79 has determined (non-)compliance of the institution design as a whole. In comparison, since Boella and van der Torre are dealing with agents imposing norms on other agents, enforcement of higher-order norms is meaningful. As for transmission of will requiring obliged lower-order norms to be enforced, we do not have a general formalisation of this requirement. However, we do formalise a specific component the EU Data Retention Directive, which that when obliged obligations are violated then it is obliged there is an obligation for an offender to be punished. In summary, our work agrees with Boella and van der Torre’s that both higher and lower-order norms should be enforced, but in the former case we assume an external process handles enforcement and in the latter case we formalise specific scenarios but provide no generalised reasoning for the transmission of will. 3.5.2. A BSTRACTING N ORMS As we discussed in the background section, there has already been a reduction of Standard Deontic Logic [234] to a logic of counts–as conditionals representing evaluative norms [9] (as studied in [106, 112]). For example, ‘B counts–as a violation in a context C’. Following this idea, Aldewereld et al. [4] propose implemented reasoning for concretising abstract norms. This is by representing abstract norms as counts–as statements such as ‘B counts– as a violation in a context C’ and so B is forbidden in C. Then, making use of the fact that more concrete concepts count–as more abstract concepts (e.g. ‘A counts–as B in context C’). Finally, applying transitivity to concretise abstract norms (e.g. ‘A counts–as a violation in context C’, since A counts–as B and B counts–as a violation). Alderwereld et al. provide a computational approach to the normative reasoning with a rule–based computational language. The same warning against this approach for multi–level governance that we make in the background, applies to what differentiates it from our work. Specifically, by ignoring deontic modalities it is difficult to describe and reason about higher–order norms. Although concretisation of norms is possible, higher–order normative reasoning (regulation governing regulations) is not and neither is the abstraction of higher–order norms. A description–logic based mechanism for reasoning about abstract institutional concepts is also proposed by Grossi et al. [108]. Unlike in our work, Grossi et al. do not propose abstraction of norms themselves (in fact, they propose concretising concepts), since normative reasoning is not a part of their proposal. Rather, they offer guidance on how normative reasoning can be incorporated, either by the reduction of norms to counts– as, which like us they acknowledge does not support nesting of deontic modalities and therefore higher–order norms. They also offer an alternative path to normative reasoning. Namely, assigning different descriptive concepts a ‘role’ of ideal thereby designating their normativity together with axioms for normative reasoning. The idea being, norms can then be nested and normative statements concretised. However, this part of the proposal is not formalised. Furthermore, our work still differs in that we are interested in abstracting rather than concretising norms in a temporal setting. In comparison a series of papers by Fornara and Colombetti [79], Fornara [77] and Fornara, Okouya and Colombetti [80] combine the semantic–web focussed description logic OWL2DL with normative reasoning. In their proposal obligations are about events with a time–indexed deadline. Time is not integrated within the underlying logic, rather it is reasoned using an external process which adds facts to the knowledge–base (e.g. that an action has occurred, time has passed, etc.). Like our proposal and many others, the dead- 80 3. F ORMALISING C OMPLIANCE IN M ULTI – LEVEL G OVERNANCE line of an obligation occurring before the aim triggers violations and potentially causes punishing obligations to be imposed. In comparison to the work of Grossi et al. they do explicitly look at representing and reasoning about norms in description logic but do not aim to reason about the relationship between concrete and abstract concepts or the concretisation/abstraction of norms. The same differences apply when compared to our own work with the additional difference that we do not restrict norms to being about events. Rather, in our proposal normative fluents can be higher–order and about events or other fluents. Criado et al. [49] look at agent reasoning for fulfilling agent desires about abstract institutional concepts. Such desires may come about due to the presence of regulative norms (e.g. an obligation to be married), but their focus is on the concretisation of these abstract institutional concepts (e.g. if an agent wants to get married, what are the brute facts that need to be realised?). In relation to our work, Criado et al. also view counts–as, as providing interpretive primitives in which abstract institutional concepts can be reasoned about. However, they do not explicitly look at how to transform abstract norms into concrete ones, or as we do concrete (higher–order) norms into abstract ones to check compliance. Rather, their focus is on the interpretation of the abstract concepts in order to fulfil agents’ desires. To summarise, work proposing ways to reason about abstract and concrete norms or using techniques that can be extended to do so is quite different from our own. Whilst some work does look at the concretisation of abstract norms, there is apparently no work that looks at the abstraction of concrete, potentially higher–order, norms. Furthermore, the aforementioned work that explicitly looks at concretisation is not in a temporal setting. Rather, our proposal focuses on the temporal aspects where as the institutional context evolves so does the abstract meaning of concrete norms and thus their compliance with abstract norms at higher governance levels. 3.6. D ISCUSSION In this chapter, we answered the question “How can we formalise compliance in multi– level governance?” with a formal framework. The general answer being that a lower–level institution is compliant in multi–level governance when the effects of its regulations (obligations and prohibitions) are compliant with higher–order regulations at higher–levels of governance. In particular, taking into account the fact that lower–level institutions operate at a different levels of abstraction to higher–levels. Accommodating for this fact, compliance is determined based on the abstract meaning of concrete regulations. We adopted the usual notion of counts–as between concrete and abstract institutional concepts. Based on the counts–as ontological primitive we semantically defined the abstraction of norms, first and higher–order, with the notion of deontological counts–as. Under the semantics, concrete regulations from lower–level institutions are abstracted to the same level of abstraction in higher–level institutions. In their abstract form, the effects of concrete regulations (obligations and prohibitions) are determined for compliance with abstract regulations in higher–level institutions. It is important to note that the abstract meaning of concrete regulations is context–sensitive. Therefore, whether concrete regulations are compliant depends on the contexts they are applied in. To summarise, institutions are compliant in multi–level governance if in different social contexts the abstract meaning of their concrete regulations is compliant with abstract higher–order norms at higher–levels of governance. 3.6. D ISCUSSION 81 The strength of the semantics is in formalising the abstraction of concrete norm effects (obligations and prohibitions), potentially abstracting higher–order concrete norm effects. By paying particular attention to the norm abstraction semantics, with lengthy discussion and the application to our case study, we argued the semantics correctly abstract concrete normative fluents. However, in general the semantics proposed in this section are not without their weaknesses. In particular, as we discussed multiple times, many of the operations are undefined for cases where an inconsistent institution design causes contradiction. Arguably, the fault is with the institution design and not the semantics. On the other hand, inconsistent information is a fact of life. In this chapter, we do not propose an inconsistency tolerant semantics. But, it is important for future work to address this weakness. Particular attention should be paid to resolving inconsistencies arising under the novel semantics provided by deontic abstraction (whereas current work in the literature deals with inconsistency occurring according to a semantics where abstraction is not modelled). 4 C OMPUTATIONAL M ULTI – LEVEL G OVERNANCE C OMPLIANCE C HECKING Science is knowledge which we understand so well that we can teach it to a computer; and if we don’t fully understand something, it is an art to deal with it. Donald Knuth This chapter is based on the following papers: King, T. C., Li, T., De Vos, M., Dignum, V., Jonker, C. M., Padget, J., & van Riemsdijk, M. B. (2015, May). Automated Multi–level Governance Compliance Checking. Journal of Autonomous Agents and Multiagent Systems (JAAMAS). International Foundation for Autonomous Agents and Multiagent Systems. (In Submission) Which extends the following paper: King, T. C., Li, T., De Vos, M., Dignum, V., Jonker, C. M., Padget, J., & Riemsdijk, M. B. Van. (2015). A Framework for Institutions Governing Institutions. In Proceedings of the 2015 International Conference on Autonomous Agents and Multiagent Systems (AAMAS 2015) (pp. 473–481). Istanbul, Turkey: International Foundation for Autonomous Agents and Multiagent Systems. [144] 83 84 4. C OMPUTATIONAL M ULTI – LEVEL G OVERNANCE C OMPLIANCE C HECKING This chapter makes the following contributions: • A computational framework for representing institutions in multi–level governance and automatically detecting compliance in multi–level governance. The previous chapter gave a formal definition for when institutions are compliant in multi–level governance. Special attention was paid to the increasing abstraction of regulations at higher–levels of governance that govern the relatively concrete regulations of lower– levels of governance. Hence, one objective of this dissertation was achieved. Namely, to formalise the informal notions of compliance in multi–level governance. In this chapter the focus moves from formalising compliance to automated compliance checking with a computational framework that corresponds to the formal framework. The approach we take is to represent institutions and their semantics as Answer–Set Programming (ASP) programs. By using ASP we can produce models of a multi–level governance institution for a trace of events. Thus we can automatically determine compliance by inspecting the generated models for non–compliant lower–level institutions. This follows the approach of InstAL [42, 43], which provides a representation in Answer–Set Programming for individual institutions governing MAS. However, we need to provide a novel representation for institutions governing other institutions in multi–level governance institutions. Thus, we need to provide a corresponding Answer–Set Program for reasoning about abstract norms governing more concrete norms. To this end, this chapter contributes the following novel elements for practical reasoning about compliance in multi–level governance: • Regulations governing regulations computational reasoning. By taking a formal representation of multi–level governance institutions and producing, through a transformation, a set of answer–set programming rules. These rules capture norms governing norms’ representation and reasoning. The previous chapter contributed a representation and semantics for norms governing norms. This chapter contributes the implementation, such that in our computational framework when a norm at a higher–level of governance is violated this indicates that the regulatory effects (imposed obligations and prohibitions) of lower–levels are non–compliant. • Norm abstraction reasoning. By taking a formal representation of multi–level governance institutions and producing through a transformation a set of answer–set programming rules. These rules capture the semantics for abstracting concrete norms based on whether the concrete prescribed concepts count–as more abstract concepts. • A computational framework based on answer–set programming, including the two aforementioned representations, which corresponds to the formal framework. That is, firstly an answer–set program such that for every answer–set program it produces there is an equivalent model in the formal framework for the same multi–level governance institution (soundness). Secondly, an answer–set program such that for every model in the formal framework there is an equivalent answer–set produced by the answer–set program for the same multi–level governance institution (completeness). In addition to these contributions, the following application is contributed: 4.1. P RELIMINARIES – A NSWER S ET P ROGRAMMING 85 • An implementation of the aforementioned transformations as a parser and compiler, extending the InstAL implementation. The implementation provides a high–level representation language for representing multi–level governance institutions and outputs an answer–set programming for checking compliance in those institutions. In this chapter the contributions are applied to an extensive formalisation of EU law for assessing compliance in our running case study. In the rest of this chapter we begin by introducing Answer–Set Programming (ASP) in 4.1. We describe the overall approach we take to representing multi–level governance institutions in answer–set programming in 4.2. We give the representation in ASP in 4.3. We demonstrate the proposed computational framework we have implemented as a compiler which takes a high–level description of a multi–level governance institution. The output is an ASP program that operationalises a multi–level governance institution. We give an overview of the implementation and results of executing the resulting ASP program for our running case study in 4.4. To show that the computational framework provides a practical implementation of the formal framework we provide soundness and completeness properties between the two frameworks in section 4.5. The properties are proven in appendices. We finish with conclusions in section 4.7. 4.1. P RELIMINARIES – A NSWER S ET P ROGRAMMING Answer–Set Programming is a non–monotonic logic–programming language [17, 93], for declaring problems according to the syntax of AnsProlog as a set of first–order rules. AnsProlog is fully declarative in the sense that the ordering of logical formulae (horn clauses) makes no semantic difference. Executing an AnsProlog program solves the declared problems by first running a grounder which grounds all rules, replacing variables with ground terms, and then running a solver against the ground program. A solver computes the set of answer–sets, where each answer–set is a model of the AnsProlog program and a solution to the problem declared. Answer–sets are computed according to the stable– model semantics [93]. We use AnsProlog for two main reasons. Firstly, it provides a natural representation of individual and multi–level governance institutions, where institutions’ functions are represented as AnsProlog rules. Secondly, it supports meeting the goal of our framework: automatically checking different contexts, or traces of exogenous events, for whether lower– level institutions are non–compliant. Using AnsProlog, a single trace of events can be supplied to check for compliance, but we can also specify a partial trace and that all variants of that trace must be used to check compliance or even all possible traces up to a specific length must be checked for compliance. It is also possible to declare that each answer–set produced must have a particular property, such as ‘there must be at least one violation of a norm in a higher level institution’. In this case the property implies that if no answer–sets are produced then there is full compliance for all traces up to a certain length. In summary, Answer–Set Programming provides a natural representation of multi–level governance institutions and an easy way to perform a contextual search for compliance. There are many answer–set solvers available (e.g. [67, 91]). We briefly reintroduce the main definitions to give context for what follows, focussing on the syntax of the CLINGO [91] grounder and solver making use of a number of its unique constructs. In more detail, an 86 4. C OMPUTATIONAL M ULTI – LEVEL G OVERNANCE C OMPLIANCE C HECKING AnsProlog program is built from atoms and predicates. Predicates can be ground, such as lays_eggs(slinky) or non–ground predicates containing variables representing the ground instance schemas, such as bird(X). Atoms and predicates can be weakly negated, such as not. 1 A rule r is typically of the form p_0 :- p_1, ..., p_n comprising a head atom denoted H (r ) and a set of body literals denoted B (r ), which can be delineated into the positive body atoms B + (r ) and atoms appearing negated in the body B −− (r ). A rule r can also be a fact by having an empty body such that B (r ) = ; containing only a single head atom such as lays_eggs(slinky). To give an example adapted from [17], the following program declares that a bird is an animal that lays eggs which is not a reptile, a reptile is an animal that lays eggs that is not a bird and slinky is an animal that lays eggs: bird(X) :- lays_eggs(X), not reptile(X). reptile(X) :- lays_eggs(X), not bird(X). lays_eggs(slinky). A (total) interpretation of an answer–set program is a truth–assignment to literals, comprising a set of the atoms assigned the value of ‘true’. An answer–set is a minimal interpretation containing all atoms that are justified in being true. Precisely, for a rule r , the head atom denoted H (r ) is justified in being true if all positive body atoms, denoted B + (r ), are true, and none of the weakly negated body atoms, denoted B −− , are true. This implies facts are always justified in being true (e.g. lay_eggs(slinky)). Looking at the previous example there can be more than one answer–set. If bird(slinky) is in an interpretation then reptile(slinky) cannot be in the interpretation for it to be an answer–set, and vice versa. These answer–sets are: • { bird(slinky), lays_eggs(slinky) } • { reptile(slinky), lays_eggs(slinky) } Determining if an interpretation is an answer–set requires knowing which atoms are justified according to the program’s rules. In the presence of weak negation this means we should only consider the rules that do not contain weakly negated atoms that are in the answer–set. Furthermore, for those rules that remain we do not need to consider their weakly negated literals to determine if the head is justified. Removing all rules in a program with weakly negated literals that are in an interpretation and all weakly negated literals from the remaining rules is called the reduct of the program, formally from [92]: Definition 15. Reduct Let Π be an Answer–Set Program and X an interpretation of Π, the reduct denoted Π X is the set: {H (r ) ← B + (r ) | r ∈ Π and B −− (r ) ∩ X = ;} We want to determine for a reduct and a set of atoms, whether that set of atoms is closed under the program (containing all justified atoms) and whether it is minimal (containing no atoms that are not justified). To give an example, if we have a reduct Π = { lays_eggs(slinky). bird(slinky) :- lays_eggs(slinky). }, 1 we ignore the case of strong negation since it is unnecessary in our use of AnsProlog. 4.2. A PPROACH 87 then the set {lays_eggs(slinky), bird(slinky), some_atom} is closed since lays_eggs(slinky) and bird(slinky) are justified but it is not minimal due to the presence of some_atom. Formally adapted from [92]: Definition 16. Let Π be a reduct and X a set of atoms. The set of atoms X is closed under Π X if for all r ∈ Π X , we have H (r ) ∈ X iff B + (r ) ⊆ X . The smallest set of atoms closed under Π X is denoted Cn(Π X ). An answer–set is simply a minimal interpretation of a reduct of the program for the interpretation: Definition 17. Answer–Set Let Π be an Answer–Set Program and X be an interpretation of Π and Π X be the reduct of Π w.r.t. X . X is an answer–set of Π iff X = Cn(Π X ). In addition to the Answer–Set Programming semantics given above we use three concise ways to represent useful constructs present in CLINGO [91]. Namely, constraints, choice rules and conditional literals. Constraints are a special type of rule of the form : −b1 , ..., bn . representing a rule with falsity in the head such that if all of b1 to bn are true in an interpretation then there is a contradiction and therefore the interpretation is not an answer–set. Choice rules are of the form {a1 , ..., an } : −b1 , ..., bn ., meaning that any atom in a1 , ..., an can arbitrarily be picked for inclusion in an answer–set if b1 , ..., bn . is true. Aggregates are present in the body of rules and are of the form l{b1 ; ...; bn }u where l and u are positive integers meaning that at least l and at most u elements of b1 , ..., bn must be true for the aggregate to be true. Omitting l or u removes the respective constraint. Finally, conditional literals can be contained in the body of a rule and are of the form b1 : b2 , ..., bn . They follow the semantics of material implication; conditional literals are true if the head is true or the body is false. Note that there are no conditional literals in a strict sense, however an aggregate of the form l{b1 : b2 , ..., bn }u means that b1 is counted as being true when restricted to the domain of b2 , ..., bn . Without variables this simply means that b1 is counted as true when b2 , ..., bn is true and hence operates similarly to conditional literals. 4.2. A PPROACH In this section we describe the overall approach we take to reasoning about multi–level governance institutions using answer–set programming. The general idea is to take a formal representation of a multi–level governance institutions. Then, to produce a corresponding representation of that formal description as a set of answer–set programming rules. Moreover, to also provide a corresponding set of answer–set programming rules which capture multi–level governance institution’s formal semantics. The ASP representation for multi–level governance institutions comprises facts representing the signature of each institution’s formal representation (events and fluents) and their initial states. Furthermore, the ASP representation comprises rules, which represent each individual institution’s rules described by their functions (event generation, consequence and fluent derivation). Each ASP rule, representing an institution rule, comprises an antecedent and a consequent. The antecedent corresponds to the parameters the functions take. For the event generation and state consequence functions, the corresponding ASP rules’ antecedents comprise the occurrence of events and the state conditions. For the fluent derivation function, 88 4. C OMPUTATIONAL M ULTI – LEVEL G OVERNANCE C OMPLIANCE C HECKING expressing constitutive rules of the form “fluent A derives (counts–as) fluent B in context C” the corresponding ASP rules’ antecedents comprise conditions on the state modelling the fluent A and the context C. The consequence of a rule corresponds to the effect of the function’s returned value on a multi–level governance institution model. This is an event caused to occur according to G , the initiation and termination of fluents according to C , and non–inertial fluents holding in a state according to a fluent derivation function D . Multi–level governance institution semantics is represented in ASP as more general rules. For example, stating that if an inertial fluent is initiated then it holds until it is terminated. Finally, composite traces are mapped to a corresponding ASP representation as sets of facts, each stating that an event has been observed at a particular point in time. The mapping to an ASP program makes use of the same common predicates used previously in work extending InstAL to settings with multiple institutions [154–156]. In turn these bear similarities to constructs used in the Event Calculus [150]. To give context for what follows, the predicates are summarised in their non–ground form: • holdsat(F, In, I) denotes that the fluent F holds in the institution In at time I. • observed(E, In, I) denotes that the event E is observed by the institution In at time I corresponding to the exogenous event that has occurred in the synchronised trace for the institution. • occurred(E, In, I) denotes that the event E occurs in the institution In at time I. • initiated(F, In, I) denotes that the fluent F is initiated in the institution In at time I. • terminated(F, In, I) denotes that the fluent F is terminated in the institution In at time I. • instant(I) denotes I is a time instant. • start(I) denotes I is the first time instant. • final(I) denotes I is the last time instant. • next(I, J) denotes J is a time instant that is strictly after I such that there is no time instant between I and J. The aforementioned predicates are used in both antecedents and consequents of rules. Such as, stating conditional on particular fluents (not) holding in a state and an event occurring, then an event occurs. This means events in function parameters correspond to occurred/3 whilst state conditions correspond to sets containing positive and negative holdsat/3 predicates. An empty state condition (the empty set) is always true and replaced with the special atom #true. In more detail, the translation for representing a multi–level governance institution, comprising a set of ASP rules, is split into two parts containing the translation of the individual institutions and the translation of the links between them. For example in the Charter of Fundamental Rights, cfr, exConsent is an exogenous event, consent is an institutional event and consentedDataProcessing(ada,isp) is an inertial fluent: 4.2. A PPROACH 1 2 3 89 evtype(exConsent,cfr,ex). evtype(consent,cfr,in). ifluent(consentedDataProcessing(ada,isp),cfr). An event generation function is translated to rules. Each rule contains an occurred/3 atom in the head representing the event that is caused to occur. Each rule’s body comprises an occurred/3 atom representing the causal event, and positive and negative holdsat/3 atoms representing the rule’s condition on the state. For example, the following rule states that non–consensual data processing occurs if Ada’s personal data has been stored, but she has not consented and non–consensual data processing is empowered to occur: 1 2 3 4 occurred(nonConsensualDataProcessing(ada),cfr,I) :occurred(storeData(isp,ada,personal),cfr,I), holdsat(pow(cfr,nonConsensualDataProcessing(ada)),cfr,I), not holdsat(consentedDataProcessing(ada,isp),cfr,I), instant(I). A consequence function is translated to ASP rules, using initiated/3 and terminated/3 atoms in the head for the initiation and termination of fluents. Each fluent initiation and termination rule’s body comprises an occurred/3 atom representing the event causing a fluent to be initiated/terminated, and positive and negative holdsat/3 atoms representing the context in which the fluent initiation/termination is conditional on. For example, in the Charter of Fundamental Rights institution the fluent stating that Ada has consented to data processing is initiated if she consents. In the Data Retention Directive institution the obligation to oblige metadata is stored is initiated (i.e. imposed) when Ada uses electronic communications: 1 2 3 4 initiated(consentedDataProcessing(ada,isp),cfr,I) :occurred(consent(ada,isp),cfr,I), instant(I). initiated(obl(obl(storeData(isp,ada,metadata),now),now),drd,I) :occurred(useElectronicCommunication(ada,isp),drd,I), instant(I). The fluent derivation function is represented as ASP rules with holdsat/3 atoms in the head and body. For example, in the cfr institution ‘unfair data processing’ is derived from an obligation to process data non–consensually: 1 2 holdsat(obl(nonConsensualDataProcessing(ada),now),cfr,I) :holdsat(unfairdataprocessing(ada),cfr,I), instant(I). The links between institutions are also represented as rules. Generally, a link from a lower–level institution institution L to a higher–level institution H which governs L comprises rules with occurred and holdsat atoms in the head. The occurred rules state a norm dischargement/violation event occurs in the institution H when it occurs in the institution L. Likewise, a normative fluent holds in H when it holds in L. All of these rules are produced such that only the dischargement/violation events occurring in L and consequently in H are about normative fluents L imposes. Likewise, rules state only normative fluents hold in H when they hold in L for those normative fluents that L itself imposes. Thus, if L receives norm dischargement/violation events or normative fluents from another institution, these do not get passed up to H from L. 90 4. C OMPUTATIONAL M ULTI – LEVEL G OVERNANCE C OMPLIANCE C HECKING To give an example, the following rule states that when the prohibition on deleting data before 12 months holds in the UK’s Data Retention Regulations, drr, then it also holds in the EU’s Data Retention Directive for checking compliance. 1 2 3 holdsat(pro(deleteData(isp, ada, metadata),time(m12)),drd,I) :holdsat(pro(deleteData(isp, ada, metadata),time(m12)),drr,I), instant(I). Abstraction according to deontological counts–as is also represented as rules, where the head is a holdsat atom representing the abstract normative fluent conditional on some concrete normative fluents holding. Finally, the semantics are represented as more general rules. For example, the following rules state that an inertial fluent holds in a state if it is initiated or if it held in the previous state and was not terminated (capturing the common–sense law of inertia): 1 2 3 holdsat(P,In,J) :- holdsat(P,In,I), not terminated(P,In,I), next(I,J), ifluent(P, In). holdsat(P,In,J) :- initiated(P,In,I), next(I,J), ifluent(P, In). 4.3. C OMPUTATIONAL F RAMEWORK In this section we detail the computational framework in full. We provide translations from multi–level governance institution’s representation and semantics in the formal framework to an ASP program. The transformation provides an ASP program which is sound and complete with respect to the formal framework, that is, the transformation produces a corresponding ASP program. By executing the ASP program we can determine compliance of lower–level institutions with higher–level institutions in a multi–level governance institution. 4.3.1. M ULTI – LEVEL G OVERNANCE I NSTITUTION ASP R EPRESENTA TION We begin with a convenient translation between a state condition as it appears in an event generation or consequence function and its representation in ASP as a set of positive and negative holdsat/3 atoms. That is, we translate a state condition Exp for an institution I accordingly: Definition 18. Expression Translation Let literals be denoted x i for i ∈ N. The translation of an expression Exp for an individual institution I with the label In is defined as: EX(Exp, I ) =       #true holdsat(p,In, I)  not holdsat (p,In, I)     EX(x 0 , I ), ..., EX(x n , I ) if Exp = ; if Exp = p if Exp =¬p if Exp ={x 0 , ..., x n } Individual institutions are translated according to a set of rules for translating each individual institution in a multi–level governance institution from their formal representation to a corresponding ASP representation. Formally and subsequently described in more detail: 4.3. C OMPUTATIONAL F RAMEWORK 91 Definition 19. Multi–level Governance Institution ASP Translation Let ML = 〈T , R〉 be a multi–level governance institution s.t. T = 〈I 1 , ..., I n 〉. The program Πinsts is the multi–level governance institutions program obtained for ML according to the following translation: ∀i ∈ [1, n](I i = 〈E i , F i , C i , G i , D i , ∆i 〉) : I i ⇔ inst(Ini ). (D19.1) i e ∈ Eobs ⇔ evtype(e,Ini , ex). (D19.2) i e ∈ Einst ⇔ evtype(e,Ini , inst). (D19.3) ifluent(f,Ini ). (D19.4) nifluent(f,Ini ). (D19.5) i f ∈ Finert ⇔ i f ∈ Fninert ⇔ initiated(p,Ini , I) : − ∃X ∈ X i , e ∈ E i , p ∈ C i ↑ (X , e) ⇔ occurred(e,Ini ,I ), not holdsat(p, Ini , I), (D19.6) i EX(X,I ), instant(I). terminated(p,Ini , I) : − ∃X ∈ X i , e ∈ E i , p ∈ C i ↓ (X , e) ⇔ occurred(e,Ini , I),EX(X,I i ), (D19.7) i holdsat( f ,In , I),instant(I). occurred(e 0 ,Ini , I) : − ∃X ∈ X i , e ∈ E i , e 0 ∈ G i (X , e) ⇔ occurred(e,Ini , I), (D19.8) holdsat(pow(e 0 ),Ini , I), EX(X,I i ), instant(I). ∃X ∈ X i , f ∈ F i , f 0 ∈ D i (X , f ) ⇔ holdsat( f 0 ,Ini , I) : − i (D19.9) i holdsat( f ,In , I), EX(X,I ), instant(I). f ∈ ∆i ⇔ holdsat( f ,Ini , I): −start(I). (D19.10) h i h ∪ Fcnorm ) ∩ Fninert ⇔ ∃〈h, i 〉 ∈ R, n ∈ (Fanorm holdsat(n,Ini , I) : − h holdsat(n,In , I). (D19.11) 92 4. C OMPUTATIONAL M ULTI – LEVEL G OVERNANCE C OMPLIANCE C HECKING h i ∃〈h, i 〉 ∈ R, e ∈ Enorm ∩ Enorm ⇔ occurred(e,Ini , I) : − (D19.12) h occurred(e,In , I). ∀ f , f 0 ∈ Fcnorm ∪ Fanorm : f ≡ f 0 ⇔ holdsat(f,Ini , I) : − 0 (D19.13) i holdsat(f ,In , I), instant(I). The translation is described as follows for an individual institution. The first translation D19.1 ensures the unique label of the institution is a fact. Translations D19.2 to D19.5 add facts corresponding to the signature of the institution for representing exogenous events, institutional events, inertial fluents and non–inertial fluents. Translations D19.6 and D19.7 add ASP rules corresponding to the consequence function, ensuring fluents are initiated and terminated if a condition on a state holds and an event occurs. Translation D19.8 adds rules for producing events according to the event generation function conditional on a state and another event occurring. Translation D19.9 adds rules for ensuring non–inertial fluents hold if they hold according to the fluent derivation function. The initial set of inertial fluents is added to the institution’s initial state with transformation D19.10. If the institution governs a lower–level institution, then any normative fluents which hold in the lower–level institution are ‘passed up’ (if they are non–inertial fluents in the higher–level institution) D19.11. Likewise for norm dischargement and violation events D19.12. Finally, transformation D19.13 ensures any normative fluent that is equivalent to another normative fluent that holds in a state, also holds in that state. This concludes the transformations providing specific rules for a multi–level governance institution describing when events occur and fluents are initiated and terminated. 4.3.2. D EONTOLOGICAL C OUNTS – AS ASP R EPRESENTATION The formal semantics for deontological counts–as, which abstracts concrete norms, is represented as a set of ASP rules for each individual institution. The formal semantics for deontological counts–as is a general function defined for any state describing which relatively concrete normative fluents if they hold cause another, more abstract normative fluent to hold. This is based on concepts the concrete fluents prescribe count–as more abstract concepts in a particular state. This is according to the event generation function, fluent derivation function, and counts–as between normative fluents according to deontological counts–as itself. The semantics for deontological counts–as are defined in a general way based on whether concrete concepts could cause a more abstract concept to occur/hold in a state. This general definition is based on inspecting the input and output of the functions representing counts–as rules. In other words, the formal semantics are defined by inspecting the left and right hand side of “A counts–as B in a context C” rules for whether the context C holds in a state and therefore deducing whether A could cause B to occur/hold. 4.3. C OMPUTATIONAL F RAMEWORK 93 However, such a general definition is not possible in ASP. This is because counts–as rules are represented as ASP rules. It is not possible to inspect the left and right hand–side of ASP rules and determine whether, for a counts–as rule “A counts–as B in a context C”, if A could cause B. We address the problem of having no foreseeable way to represent the formal deontological counts–as semantics as general ASP rules. That is by translating from individual institutions’ formal representation to specific rules that provide the same effects as deontological counts–as in a flattened form. Each of these specific rules for deontological counts–as causes a specific abstract normative fluent to hold in the head. They are conditional on specific concrete normative fluents holding in the body depending on the context. Deontological counts–as is context– sensitive, an obligation to store personal data counts–as an obligation to process data non– consensually only if a user has not consented. This means it is only necessary for certain concrete normative fluents to hold in specific contexts for abstraction to take place, obliging personal data is only abstracted if a user has not consented. In different contexts the concrete normative fluents required for abstraction to take place are potentially different or no abstraction takes place. If a user has consented then an obligation to store personal data is not abstracted to non–consensual data processing. So, the body states in which contexts the concrete normative fluents necessarily hold for abstraction to take place and that at least one concrete normative fluent must be eligible for abstraction in order for abstraction to take place. To give an example for abstracting obliging storing personal data to obliging non– consensual data processing in the Charter of Fundamental Rights interpretation of the Data Retention Directive: 1 2 3 4 5 6 7 8 9 holdsat(obl(obl(nonConsensualDataProcessing(ada),now),now), cfr, I) :holdsat(obl(obl(storeData(CommServProv0,Agent0,personal),now), now), cfr, I): not holdsat(consentedDataProcessing(ada,isp),cfr,I); 1{holdsat(obl(obl(storeData(isp,ada,personal),now),now),cfr,I): not holdsat(consentedDataProcessing(ada,isp),cfr,I)}, holdsat(pow(cfr,nonConsensualDataProcessing(ada)),cfr,I), instant(I). The head atom is the more abstract normative fluent obliging an obligation for data to be stored non–consensually. In the body, holdsat(obl(obl( storeData(CommServProv0,Agent0,personal),now),now),cfr,I): not holdsat(consentedDataProcessing(ada,isp),cfr,I), represents that in the context that Ada has not consented to data processing the concrete obligation to oblige storing personal data must hold in order to be abstracted to obliging an obligation to store data non–consensually. At least one context in which abstraction can take place must hold in order for abstraction to actually take place according to 1{holdsat(obl(obl(storeData (isp,ada,personal),now),now),cfr,I): not holdsat(consentedDataProcessing(ada,isp),cfr,I)}. In other words, if Ada has consented to data processing, then no abstraction can take place. Such specific rules to represent deontological counts–as are formally defined as and 94 4. C OMPUTATIONAL M ULTI – LEVEL G OVERNANCE C OMPLIANCE C HECKING subsequently described in detail: Definition 20. Deontological Counts–as Translation Let ML = 〈T , B 〉 be a multi–level governance institution s.t. T = 〈I 1 , ..., I n 〉. The program Πabstr is the deontic abstraction program obtained for ML according to the following translation: ∀i ∈ [1, n](I i = 〈E i , F i , C i , G i , D i , ∆i 〉) : i obl(b, d ) ∈ Fanorm ,b ∈ Ei a ∈ E i , X ∈ X , b ∈ G i (X , a) ⇔ i i CN = {EX(obl(a,d), I ):EX(X, I );} C = 1{CN} i pro(b, d ) ∈ Fanorm ,b ∈ Ei CN = {EX(pro(a,d),I i ):EX(X, I i ); | ⇔ i i a ∈ F , X ∈ X , b ∈ G (X , a)} CN 6= ;, C = 1{CN} i obl(b, d ) ∈ Fanorm ,b ∈ Ei a ∈ F i , X ∈ X , b ∈ D i (X , a) ⇔ CN = {EX(obl(a,d), I i ):EX(X, I i );} i pro(b, d ) ∈ Fanorm ,b ∈ Ei CN = {EX(pro(a,d),I i ):EX(X, I i ); | ⇔ i i a ∈ F , X ∈ X , b ∈ D (X , a)}, holdsat(obl(b, d ), Ini , I) : − CN,C , (D20.1) i holdsat(pow(b),In , I), instant(I). holdsat(pro(b, d ), Ini , I) : − CN,C, (D20.2) i holdsat(pow(b),In , I), instant(I). holdsat(obl(b, d ), Ini , I) : − CN,C , (D20.3) C = 1{CN} holdsat(pro(b, d ), Ini , I) : − CN,C, (D20.4) instant(I). CN 6= ;, C = 1{CN} i obl(b, d ), b ∈ Fanorm , r ∈ Πabstr (H(r ) = holdsat(b,Ini , I)), CN = {EX(obl(a,d), I i ):c; | i holdsat(a, In , I) :c; ∈ B(r )} ⇔ POWS = EX({pow(e) | i i holdsat(pow(e),In , I) ∈ B(r )}, I ), CN 6= ;, C = 1{CN} holdsat(obl(b, d ), Ini , I) : − CN,C ,POWS, instant(I). (D20.5) 4.3. C OMPUTATIONAL F RAMEWORK 95 i pro(b, d ), b ∈ Fanorm , R = {r ∈ Πabstr : H(r ) = holdsat(b,Ini , I)}, CN = {EX(pro(a,d), I i ):c; | r ∈ R, ⇔ i holdsat(a, In , I) :c; ∈ B (r )} holdsat(pro(b, d ), Ini , I) : − CN,C ,POWS, (D20.6) instant(I). POWS = EX({pow(e) | holdsat(pow(e),Ini , I) ∈ B(r )}, I i ), CN 6= ;, C = 1{CN} ∈ B (r ) In more detail, the first two translations D20.1 and D20.2 produce ASP rules for abstracting first–order norms. Abstraction is based on rules of the type “A counts–as B in context C” according to the event generation G i function. The second two translations D20.3 and D20.4 are, like the first, for producing first–order norm abstraction but this time based on the fluent derivation function D i . For all four translations D20.1 to D20.4 the resulting rules are of the type “obliging/prohibiting A(s) counts–as obliging/prohibiting B(s) in context(s) C(s)”. These new abstracting counts–as rules act as base cases for producing further abstracting counts–as rules for higher–order norms by translations D20.5 and D20.6. That is, translations D20.5 and D20.6 provide rules which abstract concrete higher– order normative fluents to abstract higher–order normative fluents based on whether the prescribed lower–order normative fluents count–as abstract lower–order normative fluents according to deontological counts–as itself. To give further examples, the rules for abstracting first–order obligations are provided by the translation according to D20.1 and D20.3. The translation is conditional on there being an event/fluent a counting–as a more abstract event/fluent b in a context X . This counts–as relation is according to the event generation and fluent dependency functions. The result is a rule that states if a concrete obligation fluent about an event/fluent a holds in a state and that state entails the context X (in which a counts–as b ) then a more abstract obligation fluent prescribing b to occur/hold also holds. In the Charter of Fundamental Rights two rules cause an abstract obligation to store personal data to hold if either metadata or content data are obliged to be stored in any context (denoted with #true): 1 2 3 4 5 6 7 8 9 10 holdsat(obl(storeData(commServ,user,personal),now), cfr, I) :holdsat(obl(storeData(commServ,user,content),now), cfr, I): #true; 1{ holdsat(obl(storeData(commServ,user,content),now), cfr, I): #true; }, holdsat(pow(storeData(commServ,user,personal)), cfr, I), instant(I). holdsat(obl(storeData(commServ,user,personal),now), cfr, I) :holdsat(obl(storeData(commServ,user,metadata),now), cfr, I): #true; 96 11 12 13 14 4. C OMPUTATIONAL M ULTI – LEVEL G OVERNANCE C OMPLIANCE C HECKING 1{ holdsat(obl(storeData(commServ,user,metadata),now), cfr, I): #true; }, holdsat(pow(storeData(commServ,user,personal)), cfr, I), instant(I). Rules for abstracting first–order prohibitions are provided by the translations according to D20.2 and D20.4. The translation is conditional on there being events/fluents a which in different contexts X count–as an abstract event/fluent b . This counts–as relation is according to the event generation and fluent dependency functions. The result is a rule that specifies for events/fluents a (s) that count–as an event/fluent b in contexts X entailed by a state, if all the events/fluents a are prohibited (before the same deadline) then a more abstract prohibition on b also holds (with the same deadline). The rule is conditional on at least one context X in which an a counts–as a b holds. The following is an example rule produced in the Charter of Fundamental Rights institution based on storing content data or storing metadata unconditionally counting–as storing personal data: 1 2 3 4 5 6 7 8 9 10 11 holdsat(pro(storeData(commServ,user,personal),never), cfr, I) :holdsat(pro(storeData(commServ,user,content),never), cfr, I): #true; holdsat(pro(storeData(commServ,user,metadata),never), cfr, I): #true; 1{ holdsat(pro(storeData(commServ,user,content),never), cfr, I): #true; holdsat(pro(storeData(commServ,user,metadata),never), cfr, I): #true; }, holdsat(pow(storeData(commServ,user,personal)), cfr, I), instant(I). Higher–order obligation abstraction rules are provided by the translation according to D20.5. In more detail, the translation is conditional on there being a rule that states concrete normative fluents a (s) count–as an abstract normative fluent b in contexts X . The result is a rule that is similar, albeit abstracting higher–order obligations. The new rule states that obliging a (s) before the same deadline counts–as an abstract obligation b before the same deadline in contexts X , so long as one of the contexts for an a to count–as a b holds. To give an example for the Charter of Fundamental Rights as before, albeit this time a rule that abstracts obligations on prohibitions to store content and metadata to an obligation to prohibit storing personal data: 1 2 3 4 5 6 7 8 9 10 11 holdsat(obl(pro(storeData(commServ,user,personal),never), now), cfr, I) :holdsat(obl(pro(storeData(commServ,user,content),never), now), cfr, I): #true; holdsat(obl(pro(storeData(commServ,user,metadata),never), now), cfr, I): #true; 1{holdsat(obl(pro(storeData(commServ,user,content),never), now), cfr, I): #true; holdsat(obl(pro(storeData(commServ,user,metadata),never), now), cfr, I): #true;}, holdsat(pow(storeData(commServ,user,personal)), cfr, I), 4.3. C OMPUTATIONAL F RAMEWORK 12 97 instant(I). Higher–order prohibition abstraction rules are provided by the translation according to D20.6. In more detail, the translation is conditional on there being rules expressing that concrete normative fluents a s count–as an abstract normative fluent b in contexts X . The result is a rule that states prohibiting normative fluents a s before the same deadline in the contexts X counts–as prohibiting normative fluent b before the same deadline, so long as one of the contexts for an a to count–as a b holds. To give an example for the Charter of Fundamental rights, a rule causes an abstract prohibition on prohibiting storing personal data to hold if prohibiting prohibitions to store content and metadata hold (in all contexts, since content and metadata count–as personal data unconditional on a state). 1 2 3 4 5 6 7 8 9 10 11 12 holdsat(pro(pro(storeData(commServ,user,personal),never), never), cfr, I) :holdsat(pro(pro(storeData(commServ,user,content),never), never), cfr, I): #true; holdsat(pro(pro(storeData(commServ,user,metadata),never), never), cfr, I): #true; 1{holdsat(pro(pro(storeData(commServ,user,content),never), never), cfr, I): #true; holdsat(pro(pro(storeData(commServ,user,metadata),never), never), cfr, I): #true;}, holdsat(pow(storeData(commServ,user,personal)), cfr, I), instant(I). This concludes our presentation of the ASP representation for deontological counts–as, as a set of specific rules which flatten the general formal deontological counts–as semantics. 4.3.3. M ULTI – LEVEL G OVERNANCE S EMANTICS ASP R EPRESENTATION Now we present the final component of the computational framework, the general semantics of multi–level governance represented as ASP rules. These semantics comprise two ASP programs, Πtrace(n) representing a composite event trace and Πbase(n) containing general rules to produce a multi–level governance model for a trace of composite events represented in ASP. We begin with the translation from the formal representation of a composite trace, to a corresponding ASP representation, comprising facts representing an event that is observed at each point in time: Definition 21. Composite Trace Translation Let ctr = 〈e0 , ..., e k 〉 be a composite trace. The program Πtrace(k) is the ASP trace program for ctr comprising the following set of rules: {compObserved(ei , i). | i ∈ [n]} (D21.1) We now present the ASP program Πbase(k) comprising general rules for producing sequences of states transitioned between by sets of events for a composite trace, that is, a multi–level governance institution model. Formally and subsequently described: Definition 22. Multi–level Governance Semantics ASP Translation The program Πbase(k) 98 4. C OMPUTATIONAL M ULTI – LEVEL G OVERNANCE C OMPLIANCE C HECKING is the base multi–level governance ASP program: holdsat(P, In, J) : −holdsat(P, In, I), not terminated(P, In, I), next(I, J), ifluent(P, In). (D22.1) holdsat(P, In, J) : −initiated(P, In, I), next(I, J),ifluent(P, In). (D22.2) occurred(now, In, I) : −instant(I), inst(In). (D22.3) occurred(E, In, I) : −evtype(E, In, ex), observed(E, In, I). (D22.4) occurred(null, In, I) : −not evtype(E, In, ex), observed(E, In, I). (D22.5) {compObserved(E, J)} : −evtype(E, In, ex), instant(J), not final(J), inst(In). : −compObserved(E, J), compObserved(F, J), instant(J), evtype(E, InX, ex), evtype(F, InY, ex), E! = F, inst(InX; InY). (D22.6) (D22.7) obs(I) : −compObserved(E, I), evtype(E, In, ex). (D22.8) : −not obs(I), not final(I), instant(I). (D22.9) observed(E, In, I) : −compObserved(E, I), inst(In). (D22.10) occurred(disch(obl(A, D)), In, I) : −holdsat(obl(A, D), In, I), 1{occurred(A, In, I), (D22.11) holdsat(A, In, I)}. occurred(viol(obl(A, D)), In, I) : −holdsat(obl(A, D), In, I), not occurred(disch(obl(A, D)), In, I), (D22.12) 1{occurred(D, In, I), holdsat(D, In, I)}. occurred(disch(pro(A, D)), In, I) : −holdsat(pro(A, D), In, I), 1{occurred(D, In, I), (D22.13) holdsat(D, In, I)}. occurred(viol(pro(A, D)), In, I) : −holdsat(pro(A, D)), In, I), 1{occurred(A, In, I), holdsat(A, In, I)}, (D22.14) not occurred(disch(pro(A, D)), In, I). terminated(N, In, I) : −1{occurred(viol(N), In, I), occurred(disch(N), In, I)}, (D22.15) ifluent(N, In), holdsat(N, In, I). final(k). start(0). instant(0..T) : −final(T). next(T, T + 1) : −instant(T). (D22.16) The common–sense law of inertia is captured with the first rule, D22.1. This states an inertial fluent held in the previous state and it has not yet been terminated, then it continues to hold. Initiated fluents hold in the state after they are initiated due to rule D22.2. The event of ‘now’ occurs in every time instant according to D22.3. Collectively, D22.4 and D22.5 ensure there is a synchronised trace for each institution for a given composite trace. If an event is observed and an institution recognises it as an exogenous event, then that event 4.4. E XECUTED C ASE S TUDY 99 occurs in the institution according to D22.4. If there is no event recognised by an institution that is observed, then the null event occurs in that institution D22.5. Rule D22.6 gives an arbitrary choice to include an observed event in the composite trace, which, together with rules D22.7 to D22.10 ensures there is a complete composite trace of length k and that no two observable events occur at the same time. Rules D22.11 to D22.14 ensure relevant compliance events occur when normative fluents that hold are discharged/violated. Rule D22.15 ensures discharged and violated normative fluents are terminated. Finally, facts and rules in D22.16 ensure the model and composite trace is of length k, that there are facts representing time instants between zero and k, and that the time instants are strictly ordered according to next/2. This concludes our presentation of the ASP programs which comprise the computational framework, thus, allowing multi–level governance institutions and their semantics to be executed and consequently compliance checks performed. 4.4. E XECUTED C ASE S TUDY We have written the case study in the high–level computational framework specification language. By compiling from the specification language to an AnsProlog representation we are able to assess compliance in our case study’s multi–level governance institution. This is by executing the resulting AnsProlog program together with a trace of events. The case study is instantiated for a domain comprising four types. Firstly the agents acting in the system (ada and charles). Secondly, we specify various types of role, since we need to distinguish between the agents/organisations and their social status. The case study differentiates between citizens and law enforcement officials as well as Internet Service Providers (ISPs) thus we have the roles lawEnforcement and isp. Thirdly, we distinguish between different data types (content, metadata and personal). The case study is run against an observable event trace. We chose an observable event trace which shows the framework’s context–sensitivity to abstract norm reasoning. This is by testing the use of electronic communications and ISP’s fulfilment of metadata storage obligations in different social contexts. Namely, the context that an agent, Ada, has not consented and the context that she has. The trace is given below: 1 2 3 4 5 6 observed(exUseElectronicCommunication(ada, isp), 0). observed(exStoreData(isp, ada, metadata), 1). observed(exRequestData(charles, isp, ada), 2). observed(exConsent(ada, isp), 3). observed(exUseElectronicCommunication(ada, isp), 4). observed(exStoreData(isp, ada, metadata), 5). First the agent Ada uses electronic communications provided by the service provider ISP. Then, the service provider, ISP, stores Ada’s communications metadata. An agent, Charles, requests data from ISP concerning Ada. Ada consents to her data being stored (after it is stored). Ada uses ISP’s electronic communications again. Finally, ISP stores Ada’s metadata again. In the first half of this observable event trace Ada’s data is stored without her consent, in the latter half Ada’s data is stored after she has given consent. The resulting multi–level governance institution model is depicted in Figure 4.1, for brevity edited to just containing those fluents that are relevant to the discharge and violation 100 4. C OMPUTATIONAL M ULTI – LEVEL G OVERNANCE C OMPLIANCE C HECKING storeData(isp, ada, metadata): cfr, drd, drr nonConsensualDataProcessing(ada): cfr disch(obl(obl(storeData( ada, metadata), now), now)) : cfr, drd disch(obl(storeData(i ada, metadata), now)) : cfr, drd, drr viol(pro(uncontrolByIndepAut never)) : cfr viol(pro(privacyDisrespecte never)) : requestData(charles, isp, ada): cfr, drd, useElectronicCommunication(ada, isp): cfr drr viol(pro(dataUnprotected(a personal), cfr, drd, drr disch(obl(pro(storeData( ada, content), never)) : cfr disch(obl(ensure_data_retention_period(ada, never), now)) : cfr, drd viol(pro(unfairDataProcessing(ad isp, metadata, m6, m24), now)) : cfr, drd never)) : cfr S0 1) + is(charles, lawEnforcement): drr, drr 2) + pro(dataUnprotected(ada, personal), never): cfr 3) + pro(privacyDisrespected, never): cfr 4) + pro(uncontrolByIndepAuth, never): cfr 5) + pro(unfairDataProcessing( ada), never): cfr 6) – + obl(pro(storeData(isp, ada, content), never), now): cfr, drd 7) + pro(storeData(isp, ada, content), never): cfr, drd, drr S1 S2 S3 1) is(charles, lawEnforcement): drd, drr 2) – pro(dataUnprotected(ada, personal), never): cfr 3) – pro(privacyDisrespected, never): cfr 4) – pro(uncontrolByIndepAuth, never): cfr 5) – pro(unfairDataProcessing( ada), never): cfr 6) pro(storeData(isp, ada, content), never): cfr, drd, drr 7) – + obl(storeData(isp, ada, metadata), now): cfr, drd, drr 8) – + obl(obl(storeData(isp, ada, metadata), now), now): cfr, drd 9) – + obl(obl(storeData(isp, ada, personal), now), now) : cfr(from 8) 10) – + obl(obl( nonConsensualDataProcessing( ada), now), now): cfr (from 9) 11) – + obl(dataProcessed, now) : cfr (from 9) 12) – + obl(dataUnprotected(ada, personal), now): cfr (from 9) 13) – + obl( nonConsensualDataProcessing( ada), now) : cfr (from 10) 14) – + obl(privacyDisrespected, now) : cfr (from 9) 15) – + obl( unfairDataProcessing(ada), now) : cfr (from 13) 16) + dataProcessed : cfr (from 11) 17) + dataUnprotected(ada, personal) : cfr (from 12) 18) + privacyDisrespected : cfr (from 14) 19) + uncontrolByIndepAuth : cfr (from 16) 20) + unfairDataProcessing(ada) (from 15) : cfr 1) is(charles, lawEnforcement): drd, drr 2) pro(storeData(isp, ada, content), never): cfr, drd, drr 3) pro(storeData(isp, charles, content), never): cfr, drd, drr 4) + pro(dataUnprotected(ada, personal), never): cfr 5) + pro(deleteData(isp, ada, metadata), time(m12)): drd, drr 6) + pro(privacyDisrespected, never): cfr 7) + pro(uncontrolByIndepAuth, never): cfr 8) + pro(unfairDataProcessing( ada), never): cfr 9) + pro(unfairDataProcessing( charles), never): cfr 10) + obl(deleteData(isp, ada, metadata), time(m13)): drd, drr 11) + pro(deleteData(isp, ada, metadata), time(m12)): drd, drr 12) – + obl( ensure_data_retention_period( ada, isp, metadata, m6, m24), now) : cfr, drd + ensure_data_retention_period( ada, isp, metadata, m6, m24) : drd from 10 and 11 1) is(charles, lawEnforcement): drd, drr 2) obl(deleteData(isp, ada, metadata), time(m13)): drd, drr 3) pro(deleteData(isp, ada, metadata), time(m12)): drd, drr 4) pro(dataUnprotected(ada, personal), never): cfr 5) pro(privacyDisrespected, never): cfr 6) pro(storeData(isp, ada, content), never): cfr, drd, drr 7) pro(uncontrolByIndepAuth, never): cfr 8) pro(unfairDataProcessing(ada), never): cfr 9) ensure_data_retention_period( ada, isp, metadata, m6, m24) : drd from 2 and 3 10) + obl(provideData(isp, charles, ada), time(m1)): drd, drr 11) + obl(provideData(isp, charles, ada), undue_delay) : drd from 10 12) – + obl(obl(provideData(isp, charles, ada), undue_delay), now) : drd Figure 4.1: Case study execution. The originating institutions for a fluent are in bold, ‘+’ indicates an initiated fluent, ‘–’ indicates a terminated fluent. Non–inertial fluents are in bold denoting they are derived from other fluents according to the fluent derivation and deontological counts–as (norm abstraction) operations. Norm discharge and violation events are highlighted. of norms. The model is described subsequently. We first look at the interaction between the UK–DRR and the EU–DRD which governs the UK–DRR. Accordingly: • State S 0 – Contains fluents stating the agent charles is playing the role of lawEnforcement in the UK–DRR and EU–DRD. The EU–DRD obliges that it is prohibited for isp to store the content of ada’s data. The UK–DRR does indeed prohibit isp from storing the content of ada’s communications data. Thus, the obligation to prohibit storing content data in the EU–DRD is immediately discharged as denoted by the discharge event occurring in the transition to the next state. The 4.4. E XECUTED C ASE S TUDY 101 storeData(isp, ada, metadata): cfr, drd, drr disch(obl(obl(storeData( ada, metadata), now), now)) : cfr, drd disch(obl(storeData(i ada, metadata), now)) : cfr, drd, drr disch(obl(obl(storeData( ada, metadata), now), now)) : cfr, drd disch(obl(storeData(i ada, metadata), now)) : cfr, drd, drr viol(pro(uncontrolByIndepAut never)) : cfr viol(pro(privacyDisrespecte never)) : disch(obl(ensure_data_retention_period(ada, cfr viol(pro(dataUnprotected(a personal), isp, metadata, m6, m24), now)) : cfr drd never)) : cfr consent(ada, isp): cfr useElectronicCommunication(ada, isp): disch(obl(obl(provideData( charles, cfr, drd, drr ada), undue_delay), now)) : cfr, drd S4 S5 S6 1) is(charles, lawEnforcement): drd, drr 2) obl(deleteData(isp, ada, metadata), time(m13)): drd, drr 3) pro(deleteData(isp, ada, metadata), time(m12)): drd, drr 4) obl(provideData(isp, charles, ada), time(m1)): drd, drr 5) pro(dataUnprotected(ada, personal), never): cfr 6) pro(privacyDisrespected, never): cfr 7) pro(storeData(isp, ada, content), never): cfr, drd, drr 8) pro(uncontrolByIndepAuth, never): cfr 9) pro(unfairDataProcessing(ada), never): cfr 10) ensure_data_retention_period( ada, isp, metadata, m6, m24) : drd from 2 and 3 11) + consentedDataProcessing( ada, isp): cfr 1) is(charles, lawEnforcement): drd, drr 2) pro(dataUnprotected(ada, personal), never): cfr 3) pro(privacyDisrespected, never): cfr 4) pro(uncontrolByIndepAuth, never): cfr 5) consentedDataProcessing(ada, isp): cfr 6) obl(provideData(isp, charles, ada), time(m1)): drd, drr 7) obl(provideData(isp, charles, ada), undue_delay): drd 8) pro(dataUnprotected(charles, personal), never): cfr 9) pro(unfairDataProcessing(ada), never): cfr 10) pro(storeData(isp, charles, content), never): cfr, drd, drr 11) + obl(deleteData(isp, ada, metadata), time(m13)): drd, drr 12) pro(deleteData(isp, ada, metadata), time(m12)): drd, drr 13) – + obl(storeData(isp, ada, metadata), now): cfr, drd, drr 14) – + obl(obl(storeData(isp, ada, metadata), now), now): cfr, drd 15) ensure_data_retention_period( ada, isp, metadata, m6, m24) : drd from 11 and 12 16) – + obl(obl(storeData(isp, ada, personal), now), now) : cfr from 14 17) – + obl(privacyDisrespected, now): cfr from 16 18) – + obl(dataProcessed, now): cfr from 16 19) – + obl(dataUnprotected(ada, personal), now): cfr from 16 20) + dataUnprotected(ada, personal) : cfr from 18 21) + privacyDisrespected : cfr from 17 22) + uncontrolByIndepAuth : cfr from 18 1) is(charles, lawEnforcement): drd, drr 2) obl(provideData(isp, charles, ada), time(m1)): drd, drr 3) obl(provideData(isp, charles, ada), undue_delay): drd 4) pro(dataUnprotected(ada, personal), never): cfr 5) pro(privacyDisrespected, never): cfr 6) pro(storeData(isp, ada, content), never): cfr, drd, drr 7) pro(uncontrolByIndepAuth, never): cfr 8) pro(unfairDataProcessing(ada), never): cfr 9) consentedDataProcessing(ada, isp): cfr 10) obl(deleteData(isp, ada, metadata), time(m13)): drd, drr 11) pro(deleteData(isp, ada, metadata), time(m12)): drd, drr 12) ensure_data_retention_period( ada, isp, metadata, m6, m24): drd from 10 and 11 13) – + obl( ensure_data_retention_period( ada, isp, metadata, m6, m24), now): cfr, drd S7 Figure 4.1 (cont.) transition to the next state also includes the event of ada using electronic communications provided by isp, due to the occurrence of the exogenous event in the timeline program stating the same. • State S 1 – Includes new fluents. Firstly, the EU–DRD imposes an obligation on the UK–DRR to oblige isp to store ada’s communications’ metadata. Secondly, the UK–DRR imposes an obligation for isp to store ada’s communications’ metadata. The UK–DRR’s first–order obligation to store metadata discharges the EU–DRD’s second–order obligation to oblige an obligation to store metadata. The transition to state S 2 includes the event of ada’s communications’ metadata being stored by isp, driven by the corresponding exogenous event, and consequently the discharge of the 102 4. C OMPUTATIONAL M ULTI – LEVEL G OVERNANCE C OMPLIANCE C HECKING obligation from the UK–DRR for isp to store Ada’s communications metadata. • State S 2 – The EU–DRD, which governs the UK–DRR, obliges data retention to be ensured for between 6 and 24 months. In comparison, the UK–DRR, both obliges that Ada’s communications metadata is deleted before 13 months and prohibits deletion before 12 months. Hence, the UK–DRR requires that metadata is stored for between 12 and 13 months, which is abstractly interpreted in the EU–DRD as ensuring data is retained between 6 and 24 months (ensure_data_retention_period(ada, isp, metadata, m6, m24) discharging the EU–DRD’s obligation for data to be stored within this timeframe. In the transition to state S 3 charles requests Ada’s data from isp. • State S 3 – Since charles is playing the role of lawEnforcement, this causes the EU–DRD to oblige that isp is obliged to provide the data before any undue_delay. Meanwhile, the UK–DRR obliges isp to provide charles with the data within one month (m1). According to the EU–DRD anything occurring before one month counts–as the event of undue_delay. Thus the EU–DRD interprets the obligation to provide data within one month as the abstract obligation to provide data before any undue delay. This causes discharge of the obligation to oblige data is provided before any undue delay. • States S 4 to S 6 follow largely the same pattern. In the transition to the next state S 4 ada consents to her data being stored, which has no affect on the UK–DRR or the EU–DRD. Transitioning to state S 5 ada uses electronic communications, then ada’s data is stored, causing the same obligations and prohibitions to be imposed by the UK–DRR and EU–DRD as when these events occurred previously. In conclusion, for this trace of events the UK–DRR is compliant with the EU–DRD. All of the EU–DRD’s normative fluents it imposes are discharged and none are violated. In comparison, the EU–DRD is non–compliant with the EU–CFR as we will see: • State S 0 – the EU–CFR prohibits the EU–DRD’s regulations from being uncontrolled by an independent authority. What this means is that data retention should be within the EU jurisdiction. Likewise, the EU–CFR also prohibits data from being unprotected (i.e. stored without anonymisation), privacy from being disrespected (i.e. personal data being stored) and data being processed unfairly (i.e. personal data being stored without an agent’s consent). • State S 1 – a number of the EU–CFR’s prohibitions are violated: – Violation of the CFR’s prohibition on regulations not being controlled by an independent authority (meaning, compliance with the EU–CFR’s data protection rights must be observable by an independent authority, such as by ensuring data is retained within the EU). The EU–DRD obliges the UK–DRR to oblige ada’s communications’ metadata is stored. According to the EU–CFR obliging storing data (of any type) counts–as data being processed, hence an obligation to oblige storing metadata is abstracted to an obligation to process 4.4. E XECUTED C ASE S TUDY 103 data, which is abstracted further to processing data. The EU–CFR views processing data without a prohibition on it being stored outside of the EU counting– as regulations not being controlled by an independent authority. Hence, the prohibition on regulations being uncontrolled by an independent authority is violated. – Violation of the CFR’s prohibition on unfair data processing. The EU–CFR interprets storing metadata as storing personal data, thus it determines that there is an abstract obligation to oblige personal data is stored. In the EU–CFR, storing personal data in the context that an agent has not consented counts–as non– consensual data processing (nonConsensualDataProcessing(ada)). Thus the EU–CFR determines that there is an obligation to oblige non–consensual data processing of ada’s data. According the EU–CFR an obligation to store data non–consensually counts–as unfair data processing, hence an obligation to oblige non–consensual data processing is abstracted to an obligation to process data unfairly. An obligation to process data unfairly in turn, counts–as unfair data processing (i.e. from the perspective of the EU–CFR it does not matter if data is actually processed unfairly or just obliged, both are unfair data processing). This causes the EU–CFR’s prohibition on processing data unfairly to be violated. – Violation of the CFR’s prohibition on disrespecting privacy. The obligation to oblige storing metadata imposed by the EU–DRD is abstracted to an obligation to oblige storing personal data. In the EU–CFR obliging storing personal data counts–as the non–inertial fluent for privacy to be disrespected. Hence, obliging an obligation to store personal data is further abstracted to obliging privacy is disrespected which also counts–as simply disrespecting privacy. Hence the EU–CFR’s prohibition on disrespecting privacy is violated. – Violation of the CFR’s prohibition on data being unprotected. The obliges an obligation for Ada’s metadata to be stored (according to the an obligation to oblige personal data to be stored) even in the context that it is not anonymised. The EU–CFR views an obligation to oblige storing personal data as being the same thing as processing data, which in the context that the data is not anonymised is abstractly the same thing as data being unprotected. Hence, the EU–CFR’s prohibition on data being unprotected is violated. Each violated prohibition in the EU–CFR is initiated in the next state. • States S 2 and S 3 contain nothing of interest from the perspective of the EU–CFR. In the transition to state S 4 Ada consents to her personal data being stored. • State S 4 contains a fluent stating Ada has consented to her personal data being stored. • State S 5 also contains prohibitions in the EU–CFR which are violated by the EU– DRD, as in state S 1 , with one difference: – The CFR’s prohibition on data being processed unfairly is not violated. The EU–DRD, from the perspective of the EU–CFR, obliges an obligation 104 4. C OMPUTATIONAL M ULTI – LEVEL G OVERNANCE C OMPLIANCE C HECKING to store personal data. However, since Ada has consented the obligation to oblige personal data being stored is not abstracted to an obligation to oblige non–consensual data processing and not subsequently abstracted to ‘unfair data processing’. Hence, in state S 5 , unlike in state S 2 the EU–CFR’s prohibition on unfair data processing is not violated since the context is different (Ada has consented to her data being stored). Meanwhile, the rest of the EU–CFR’s prohibitions are violated (for the second time). From this case study we can see the UK–DRR is compliant with the EU–DRD (i.e. the UK’s legislation correctly implements the directive). On the other hand, the EU’s data retention directive is non–compliant with the EU–CFR. In particular, the EU–DRD was found to be non–compliant in a particular social context with particular prohibitions issued by the EU–CFR. In different contexts the same prohibitions might not be violated. As we saw in the context that Ada had consented to her personal data being processed, the directive did not the violate the prohibition on unfair data processing. This is because the directive’s normative fluents were not interpreted by the charter as more abstractly counting–as unfair data processing. Hence, whether there is compliance depends on the context which determines the abstract meaning of normative fluents. A full compliance check examines all possible social contexts by checking all possible traces of events that result in unique answer–sets (or in our formal framework, models). 4.5. C OMPUTATIONAL F RAMEWORK S OUNDNESS AND C OM PLETENESS We now demonstrate that the computational framework provides an executable implementation of the formal framework. This is with theorems stating the computational framework is sound and complete with respect to the formal framework (proofs are provided in the appendices). We begin by packaging, for convenience, the aforementioned ASP programs into a single ASP program ΠML(k) . Definition 23. Multi–level Governance ASP Program Let ML = 〈T , R〉 be a multi–level governance institution. Let ctr be a composite trace for ML of length n . Let Πinsts and Πabstr be the institutions and deontic abstraction programs obtained for ML. Let, Πtrace(n) be the trace program obtained for ctr and let Πbase(n) be a multi–level governance base program. A multi–level governance institution ASP program for ML and a composite trace ctr is: ΠML(n) = Πbase(n) ∪ Πtrace(n) ∪ Πabstr ∪ Πinsts The first property we present gives the set of of events that are maximally in the set of events according to the event generation operation. Lemma 1. If GRi is the event generation operation for an institution I i with respect to a 4.5. C OMPUTATIONAL F RAMEWORK S OUNDNESS AND C OMPLETENESS 105 tuple of events E and a tuple of events S , and E 0 = GRi (S i , E i ) w.r.t. S and E then ∀e 0 ∈ E 0 : e 0 = now 0 e ∈E i i i 0 0 ∃X , e : X ∈ X ∧ e ∈ E ∧ S |= X ∧ e ∈ G (X , e) ∧ S |= pow(e ) e 0 = disch(obl(a, d ))s.t.∃obl(a, d ) : S i |= obl(a, d ) ∧ (a ∈ E 0 ∨ S i |= a) i 0 or (T1.1) or (T1.2) or (T1.3) or (T1.4) or (T1.5) or (T1.6) or (T1.7) i 0 e = viol(obl(a, d))s.t.∃obl(a, d ) : S |= obl(a, d ) ∧ (d ∈ E ∨ S |= d )∧ disch(obl(a, d )) 6∈ E 0 i 0 i 0 e = disch(pro(a, d ))s.t.∃pro(a, d ) : S |= pro(a, d ) ∧ (d ∈ E ∨ S |= d ) i 0 0 i e = viol(pro(a, d ))s.t.∃pro(a, d ) : S |= pro(a, d ) ∧ (a ∈ E ∨ S |= a)∧ disch(pro(a, d )) 6∈ E 0 h i ∃〈h, i 〉 : 〈h, i 〉 ∈ R, e ∈ Enorm ∩ Enorm (T1.8) Proof. Immediately follows from Definition 37. The second property we present gives the set of fluents that are maximally in the closure of deontological counts–as. Lemma 2. If DCω is the closure of the deontological counts–as function for an institution I = 〈E , F , C , G , D , ∆〉, a state S ∈ Σ for I and S 0 = DCω (S) then ∀ f 0 ∈ S 0 : f 0∈S 0 0 0 0 ∃〈N , f 〉 ∈ DC(S ) : N ⊆ S or 0 (T2.1) (T2.2) Proof. Immediately follows from Definition 7. We now give the soundness property for the deontic abstraction representation in ASP with respect to the formal definition of deontological counts–as. In doing so, we demonstrate that we have provided a transformation that flattens the deontological counts–as function described in the formal framework to an executable set of ASP rules. The property states that a state in the answer–set for a multi–level governance answer–set program is equivalent to the same state in the formal model for the formal framework with the deontic counts–as function DCi ω applied. Lemma 3. Let ML = 〈T , R〉 be a multi–level governance institution s.t. T = 〈I 1 , ..., I n 〉, and ctr be a composite trace of length k . Let ∀i ∈ [1, n] Ini be a unique label for I i . Let ΠML(k) be the multi–level governance ASP program for ML and ctr. Let MP be an answer–set for the program P ∗ = ground(ΠML(k) ). Given a set S ij such that ∀i ∈ [1, m], ∀ j ∈ [k] : M P |= holdsat( f , Ini , j ) ⇒ f ∈ S ij then S ij = DCi ω (S ij ). Proof. See the appendices. 106 4. C OMPUTATIONAL M ULTI – LEVEL G OVERNANCE C OMPLIANCE C HECKING The next property we are interested in is soundness for the translation to an ASP program as a whole. Specifically, the property states any answer–set for a multi–level governance ASP program for a given trace of events corresponds to a multi–level governance institution model in the formal framework for the same trace of events. Theorem 1. (Soundness) Given a multi–level governance institution ML = 〈T , R〉 s.t. T = 〈I 1 , ..., I n 〉. Let ctr = 〈e 0 , ..., e k 〉 be a composite trace for ML. Let ΠML(k) be the multi–level governance ASP program for ML and ctr. Let ∀i ∈ [1, n] : stri = 〈sei0 , ..., seik 〉 be a synchronised trace for I i w.r.t. ctr. Let MP be an answer–set for the program P ∗ = i ground(ΠML(k) ). Then M = 〈M 1 , ..., M n 〉 with ∀i ∈ [n] : M i = 〈S i , E i 〉, S i = 〈S 0i , ..., S k+1 〉, E i = i i 〈E 0 , ..., E k 〉 such that: ∀h ∈ [1, n], ∀ j ∈ [k], : M P |= holdsat( f , Inh , j ) ⇒ f ∈ S hj (T1.1) ∀h ∈ [1, n], ∀ j ∈ [k], ∀e 6= null : M P |= occurred(e, Inh , j ) ⇒ e ∈ E hj (T1.2) ∀h ∈ [1, n], ∀ j ∈ [k] : M P |= occurred(null, Inh , j ) ⇒ e null ∈ E hj (T1.3) is the model of ML w.r.t. ctr. Proof. See the appendices. The next property we are interested in is completeness. This states that for any model of a multi–level governance institution in the formal framework, for a trace of events, the multi–level governance ASP program produces a corresponding answer–set for the same trace of events. Theorem 2. (Completeness) Given a multi–level governance institution ML = 〈T , R〉 s.t. T = 〈I 1 , ..., I n 〉. Let ctr = 〈e 0 , ..., e k 〉 be a composite trace for ML. Let ∀i ∈ [1, n] : stri = 〈stri0 , ..., strik 〉 be a synchronised trace for I i w.r.t. ctr. Let M = 〈M 1 , ..., M n 〉 be the multi– level governance institution model ML w.r.t. ctr where ∀i ∈ [1, n] : M i = 〈S i , E i 〉, S i = i 〈S 0i , ..., S k+1 〉, E i = 〈E 0i , ..., E ki 〉. Let ΠML(k) be the multi–level structure ASP program for 4.6. R ELATED W ORK 107 ML and a composite trace ctr. Let MP be the set of atoms: ∀i ∈ [1, n], ∀ j ∈ [k + 1] : S ij |= f ⇒ M P |= holdsat( f , Ini , j ) (T2.1) ∀i ∈ [1, n], ∀ j ∈ [k] : e ∈ E ij ⇒ M P |= occurred(e, Ini , j ) (T2.2) i i (T2.3) i (T2.4) ∀i ∈ [1, n], ∀ j ∈ [1, k] : f ∈ (S j \S j −1 ) ∩ Finert ⇒ M P |= initiated( f , In , j − 1) ∀i ∈ [1, n], ∀ j ∈ [1, k] : f i ∈ (S ij \S ij +1 ) ∩ Finert ⇒ M P |= terminated( f , In , j + 1) ∀i ∈ [1, n], ∀ j ∈ [k] : e = ctr j ⇒ M P |= observed(e, Ini , j ), M P |= compObserved(e, j ), M P |= obs( j ) ∀i ∈ [1, n], ∀ j ∈ [k] : e = strij i (T2.5) 6= e null ⇒ M P |= occurred(e, In , j ) (T2.6) ∀i ∈ [1, n], ∀ j ∈ [k] : e null = strij ⇒ M P |= occurred(null, Ini , j ) (T2.7) i i ∀i ∈ [1, n], ∀e ∈ Eobs : M P |= evtype(e, In , ex) (T2.8) i ∀i ∈ [1, n], ∀e ∈ Einst : M P |= evtype(e, Ini , inst) (T2.9) i i ∀i ∈ [1, n], ∀ f ∈ Finert : M P |= ifluent(f, In ) (T2.10) i ∀i ∈ [1, n], ∀ f ∈ Fninert : M P |= nifluent(f, Ini ) (T2.11) ∀i ∈ [1, n] : M P |= inst(Ini ) (T2.12) ∀i ∈ [k] : M P |= instant(i ) (T2.13) M P |= start(0) (T2.14) ∀i , j ∈ [k] : j = i + 1 ⇒ M P |= next(i , j ) (T2.15) M P |= final(k) (T2.16) Then, MP is an answer set of P ∗ = ground(ΠML(k) ). Proof. See the appendices. This concludes the demonstration of the soundness and completeness of the formal and computational frameworks, with respect to each other. 4.6. R ELATED W ORK In this chapter we presented a computational framework for reasoning about multi–level governance. That is, we focussed on the practical side. Whilst there are many practical institutional reasoning frameworks, we find none which contribute automated reasoning for determining compliance in multi–level governance. We discuss the related work in more detail as follows. There have been many different approaches proposed to reason about institutions, normative systems and organisations which we split into three broad types. Firstly, those proposing a high–level institution specification language (e.g. [63, 159, 160]) for institution designers to precisely specify an institution’s software implementation. Secondly, 108 4. C OMPUTATIONAL M ULTI – LEVEL G OVERNANCE C OMPLIANCE C HECKING those proposing or studying formal logics of norms and other institutional rules (e.g. [26, 58, 110, 111, 165, 229]). Thirdly, those contributing frameworks for formally representing and reasoning about institutions and normative systems, with an aim for practical implementations using an algorithmic or logic–programming based approach (e.g. [42, 43, 98, 103, 130, 154]). Our work most closely relates to the latter practical frameworks, which we discuss in more detail. The most closely related framework, on which we build, is the Institutional Action Language, InstAL, first proposed by Cliffe et al. [42, 43]. Li et al. have made developments on InstAL for detecting conflicts between norms [156], in particular in interacting institutions [155] and cooperating institutions [154]. In the work of Li et al. institutions are linked with special bridge institutions such that events occurring in one can cause events to occur in another and likewise for fluents being initiated or terminated. Such bridge institutions have a similar role to our links between different levelled institutions. The difference is that bridge also operate as a king of institution, evolving from one state to the next such that the bridges (links) between institutions can change over time. In contrast, we use institutional links which remain static over time. Further developments on InstAL were realised by Pieters et al. [194, 195] for reasoning about institutions as a means to police and enforce security policies. In their work, Pieters et al. [194, 195] extend InstAL with rules for non– inertial fluents which (in our own words) state “when context C holds then so does fluent B”. These bear similarity to our fluent derivation rules of the form “fluent A derives fluent B in context C”. But, in our case we view fluent derivation rules as firstly ascribing a special meaning to a concrete fluent ‘A’ (hence they have a different form) and secondly serving as a basis for abstracting normative fluents. Our work is also related to our previous work which was loosely based on InstAL [144, 145] for reasoning about multi–tier institutions and higher–order norms. The main differences between these developments and this chapter is we have extended InstAL for representation and reasoning about multi–level governance. In more detail, there are differences in reasoning about permissive societies (where anything not prohibited is permitted), instantaneous and indefinite norms, bridged versus linked institutions, non–inertial fluent rules versus fluent derivation rules, and our main focus in this chapter: combining higher–order normative reasoning and norm abstraction. We summarise all of these differences in Table 4.7. Also relevant are practical approaches for reasoning about normative social commitments (e.g. contracts, promises) [113, 243], using the Event Calculus [150]. These bear similarity to our own approach since we use EC–like constructs (initiation and termination of fluents driven by events) and reasoning. Commitments have been formalised with ‘lifecycle’ elements not present in our notion of norms, such as the creation and deletion of the commitment/rule (e.g. through an utterance) which in turn imposes obligations in particular circumstances. Higher–order commitments are grammatical in these approaches but do not coincide with our notion of higher–order norms. In our case, a higher–order norm represents a statement such as ‘the outcome of your rules should not be an obligation to do X in context C’, where X can be a concrete or abstract notion. On the other hand, nested commitments represent ‘you have promised to me that you will not make a commitment towards person X to do Y in context C’, here the nesting simply represents that a rule of a specific form should not be created, regardless of the rule’s effects and the abstract meaning 4.6. R ELATED W ORK 109 InstAL [42, 43] Li et al. [154–156] Pieters et al. [194, 195] King et al. [144, 145] This chapter Individual Institutions Empowerment Bridged vs. Linked Institutions B L Non–Inertial vs. Fluent Derivation rules NI D Permissive Society Instantaneous and Indefinite Norms Higher–order Normative Reasoning Norm Abstraction Table 4.7: Comparison between closely related developments on InstAL. of those effects. Consequently, nested commitments, come from a fundamentally different perspective and are not aligned with our formalisation of regulations which govern other regulations nor do they capture abstraction. Another practical institutional reasoning approach is temporal defeasible deontic logic. Defeasible logic is a non–monotonic logic designed to be implemented in Prolog [13, 183]. There are three rules types in defeasible logic, strict rules (→) whose conclusion is true so long as the antecedent is true, defeasible rules (⇒) whose conclusion is true unless the rule is rebutted by another rule, and defeating rules ( ) whose conclusion is never true but if the antecedent is true rebuts other rules with a contradictory conclusion. Defeasible logic comprises a proof procedure where rule conclusions are tested for whether they are true by first asserting them as an argument, then finding all counter–arguments which rebut them by applying defeating rules, and then recursively counter–attacking all rebuttals with further arguments, terminating by constraints on non–repeatability of arguments (e.g. [200]). Defeasible temporal deontic logics proposed by Governatori et al. [98, 103] extend defeasible logic with rule types and proof procedures for obligations and temporalised outcomes. In these proposals various legal concepts are formalised, including constitutive rules and norms. But as far as we know there have been no developments on these approaches towards norms governing norms and/or norm abstraction, such as for reasoning about compliance in multi–level governance. 110 4. C OMPUTATIONAL M ULTI – LEVEL G OVERNANCE C OMPLIANCE C HECKING 4.7. D ISCUSSION In this chapter, we answered the question “how can institutional design compliance in multi–level governance be computationally verified?” with a computational framework. In doing so, we provided a practical way to reason with the semantics proposed in the previous chapter. We assessed our proposal along two fronts. Firstly, with a comprehensive case study based on three–levelled governance in EU law where abstraction and context– sensitivity are important in determining non–compliance. Secondly, by proving that the practical implementation in Answer–Set Programming, the computational framework, is indeed sound and complete with respect to the formal framework showing the two correspond. We used the fact that the formal framework corresponds to the computational framework to implement the proposal by extending the InstAL compiler, thereby offering users a high–level language in order to specify multi–level governance and the means to automatically detect (non–)compliance. To summarise, this chapter provides both a practical way to determine compliance in multi–level governance and also a way to assess the previous chapter’s proposed semantics with a real–world case study and its execution. The main weakness of this chapter’s contributions is that it is heavily dependent on Answer–Set Programming. In one sense this is not a problem, since the previous chapter proposed a semantics which ‘stand on their own’. In another sense, this chapter aims to provide practical reasoning, whilst certain limitations of answer–set programming have practical implications. Specifically, due to answer–set programming’s limitations, this chapter was unable to provide general rules for all of the semantics proposed in the previous section. In particular, the deontological abstraction semantics, characterised as a function in the previous section, are represented as a flattened function in the form of ASP rules in this section. What this means is that any time an institution design is changed and we wish to check its compliance, then the high–level description of an institution needs to be newly compiled in its entirety to an Answer–Set Program. If deontological abstraction’s semantics had a general set of ASP rules, then only the changed rules in the changed institution would need a new corresponding ASP representation. To address this weakness, future work should investigate different representation results. Possible ways to achieve this include a corresponding representation in Prolog (e.g. as for defeasible logic [13]) or an embedding in a higher–order logic theorem prover where the higher–order logic could act as a meta–language in which to represent the semantics from the previous section (e.g. as in [18]). 5 E XPLANATORY R ECTIFICATIONS FOR N ON – COMPLIANT I NSTITUTIONS Plurality is never to be posited without necessity. William of Ockham Whenever possible, substitute constructions out of known entities for inferences to unknown entities. Bertrand Russell This chapter is based on the following paper: King, T. C., Li, T., Vos, M. De, Jonker, C. M., Padget, J., & Riemsdijk, M. B. Van. (2016). Revising Institutions Governed by Institutions for Compliant Regulations. Coordination, Organizations, Institutions, and Normes in Agent Systems XI: COIN 2015 International Workshops, COIN@ AAMAS, Istanbul, Turkey, May 4, 2015, COIN@ IJCAI, Buenos Aires, Argentina, July 26, 2015, Revised Selected Papers., 9628, 191 – 208. [145] 111 112 5. E XPLANATORY R ECTIFICATIONS FOR N ON – COMPLIANT I NSTITUTIONS This chapter makes the following contributions: • An application of Inductive Logic Programming (ILP) in ASP, demonstrated with an implementation, to provide a mechanism that successfully revises rules of a non– compliant institution to ensure it is compliant. • A revision mechanism that ensures institution revisions are minimal in their regulatory effects through adding, deleting and modifying rules, thereby keeping as closely as possible to the designer’s original intentions. In chapters 3 and 4 we presented a formal and computational framework for determining compliance in multi–level governance. The contributions can be used by a judiciary to determine punishments for non–compliance or by a legislature to avoid enacting non– compliant legislation. However, at this point in the dissertation it is unclear how a legislature should address non–compliance by changing an institutional design. In this chapter we return to the issue of rule change, but this time asking the question, how can we mechanically find ways in which legislation can be modified to ensure it is compliant? On the one hand, an institution designer wishes to avoid punishment for non–compliant institution designs. On the other hand, an institution designer designed the non–compliant institution with the aim of meeting particular societal outcomes. At the same time, it is important not to just rectify non–compliance but also find the simplest explanation for non– compliant institution designs in order to support a legislator in avoiding making the same mistakes. It is an arduous task to determine non–compliance, but even more arduous to rectify it in a way that keeps as closely as possible to the legislature’s original intentions. Firstly because different rule modifications, namely addition, deletion and changes to the antecedent, must be tried to determine if they result in compliance in various contexts and therefore find a possible explanation for non–compliance. Secondly, they must be compared to alternative revisions that result in compliance to see if one makes fewer changes to the rules than another, in order to find the simplest and most general explanation for non–compliance. Thirdly, because different revisions must also be optimised for keeping as closely as possible to the designer’s original intentions by still producing the same legal effects (e.g. obligations and prohibitions) that do not result in the institution design being non–compliant. Clearly, this is a mechanical task ripe for computation. The idea is to test different changes to an institution design in order to rectify non– compliance and therefore find possible explanations for non–compliance. Then, to take the simplest explanation, which minimally changes an institution’s outcomes and rules, and apply it as a remedy. In this chapter we address the burden on the institution designer in revising to be compliant with a computational mechanism which also minimise the changes to the outcomes of the institution design. This chapter builds on the previous chapters’ formal and computational frameworks. However, this chapter deals with a simplified version of the formal and computational framework. We discuss this simpler framework, its application to a new case study and the approach we take in 5.1. Then, we present the computational mechanism for successfully and minimally revising an institution for compliance in section 5.2. We finish this chapter by comparing to other mechanisms for revising institutions and sets of rules in 5.3 and conclude with discussion on limitations and wider implications in section 5.4. 5.1. A PPROACH 113 5.1. A PPROACH In this chapter, we look at revising rules for compliance. As we saw in the previous chapter, individual institutions which are governed by other institutions (in that case, within multi– level governance), can be represented as ASP rules. Building on that idea, the approach we take to revising an institution to be compliant is to revise its representation as ASP rules, using ASP itself to try various rule modifications. However, as we discussed at the end of the preceding chapter, there is a limitation of the approach taken due to two contributing factors. Firstly, because whenever a constitutive rule is changed in an institution, then the abstract meaning of concrete normative fluents, which is derived from the constitutive rules, also changes. Secondly, because normative fluent abstraction is represented in ASP as specific ASP rules (rather than a general semantics as in our formal framework). Taking these two factors together, this means whenever a constitutive rule is changed in ASP then potentially other ASP rules must also be changed representing the abstraction of a normative fluent. Consequently, if we use the framework presented in the preceding section which includes ASP rules for abstracting normative fluents, then the process of changing rules involves firstly, changing the rules, secondly determining all other normative fluent abstraction rules which need to be changed or added. This is a complex process and consequently we look at a simpler problem where we change rules in institutions governed by institutions, where each governance level operates at the same level of abstraction. To address this simpler problem, we first re–introduce a simpler version of our framework. In this version of the framework, we define multi–tier institutions, first presented in [144], which defines a tiering of institutions, each institutional tier governing the tier below, where norms are not abstracted. We overview the simpler framework in subsection 5.1.1, then introduce the formal representation in subsection 5.1.2, then we provide the operational semantics in ASP in subsection 5.1.4. Finally, we describe the main technique we use, Inductive Logic Programming (ILP) theory revision, in subsection 5.1.6. 5.1.1. M ULTI – TIER I NSTITUTIONS We begin by providing an overview of individual and multi–tier institutions, schematically depicted in figure 5.1. To recap the main concepts, an individual legal institution acts as a mechanism to guide the behaviour of the system it governs. Institutions define a set of constitutive and regulative rules which respectively establish an institutional description and prescription of reality (see Searle’s counts–as relation [215]). Constitutive rules describe the system governed through creating institutional facts that can represent events caused by other events (e.g. entering a location which is private counts–as entering a private location), or they can represent changes to the institutional state (e.g. entering a private location causes an agent to be at a private location). Regulative rules prescribe what properties should hold/events should occur in a system by creating obligations and prohibitions in states (e.g. when requested an agent is obliged to share their location). An institution’s regulative rules regulate over a social interpretation of reality constructed from brute facts by constitutive rules. Conceptually, a multi–tier institution extends the notion of an individual institution governing an MAS to institutions governing institutions in a tiered structure. Each institutional tier governs the tier below. The first–tier imposes norms on what occurs and holds in an 114 5. E XPLANATORY R ECTIFICATIONS FOR N ON – COMPLIANT I NSTITUTIONS Nth-tier Institution S 0n Eventsn0 S 1n Eventsn1 S 2n ... n S k+1 Nth-order Norms S 22 ... 2 S k+1 Second-order Norms ... 1 S k+1 First-order Norms Second-tier Institution S 02 Events20 S 12 Events21 Link First-tier Institution S 01 Events10 S 11 Events11 S 21 Input for all Institutions Obs. Event0 Obs. Event1 ... Obs. Eventk Figure 5.1: Schematic view of a multi–tier institution model MAS (first–order norms), the second–tier norms on the norms imposed by the first (norms about first–order norms, i.e. second–order norms), and so on. When a lower–tier imposes a normative fluent which is non–compliant with a higher–tier, events denoting a higher–order norm violation occur. The operational semantics of a multi–tier institution, first presented in [144], allow such non–compliance to be determined by checking a multi–tier institution model for norm violations. Depicted in Figure 5.1, the model describes how each i th–tier institution evolves over time, as an event–state sequence, in response to the evolution of the tier below. The first–tier evolves in response to a trace of observable events that could occur in an MAS (i.e. produced for a pre–runtime check). Each tier above the first evolves in response to the event–state sequence of the institution they govern (i.e. the tier below). States contain domain fluents describing the MAS and normative fluents prescribing the events that should occur and fluents that should hold in the tier below (including other normative fluents). Each state transition is caused by events occurring in the institution from the previous state, which are in turn driven by the events and states from the tier below. If a normative fluent in a state is violated by an event or fluent in the tier below (including another normative fluent) a norm violation event occurs in the transition to the next state. Thus, model–checking can be used to compliance–monitor one institution with another by checking for higher–order norm violation events. Differing from previous chapters 3 and 4 on multi–level governance institutions, in this chapter multi–tier institutions restrict each i th tier in regulating the tier below i th–order norms. Moreover, each institutional state does not include the abstraction of any concrete normative fluents. 5.1. A PPROACH 115 5.1.2. F ORMAL R EPRESENTATION In this section we provide the formal representation of institutions and multi–tier institutions from [144] as follows. We start with the representation for normative fluents, which oblige/prohibit an event occurring or another fluent holding (the aim) before an event occurs or fluent holds (the deadline). The language of normative fluents is over a set of propositions denoting fluents and events describing the system being governed. If the set of propositions includes only non–normative events and fluents, then only first–order normative fluents can be expressed. If, however, the set of propositions contains first–order normative fluents, then second–order normative fluents can be expressed and so on. Such higher–order normative fluents are categorised as: obliging/prohibiting a normative fluent holds before an event or non–normative fluent holds, obliging/prohibiting an event or non–normative fluent before a normative fluent holds, and obliging/prohibiting a normative fluent to hold before another normative fluent holds. Definition 24. Normative Fluents Let P be a set of propositions denoting fluents and events, a be the norm’s aim, d the deadline and a, d ∈ P . The set of normative fluents N |P is the set of all norms n expressed as: n ::= obl(a, d) | pro(a, d) Institutions in this chapter share many common characteristics of institutions presented earlier. Formally, an institution is defined as and described subsequently: Definition 25. Individual Institution An institution is a tuple I |P = 〈E , F , C , G , ∆〉, restricted to the set of propositions P , given Eobs , Einstact , Fdom ⊆ P , I |P is defined as: • Fnorm ⊆ N |P is a set of normative fluents. • F = Fdom ∪ Fnorm is a set of fluents. • Enorm = {disch(n), viol(n) | n ∈ Fnorm } • Einst = Einstact ∪ Enorm where Einstact and Enorm are disjoint. • E = Eobs ∪ Einst . • C : X × E → 2F × 2F is a state consequence function. • G : X × E → 2Einstact is an event generation function. • ∆ ⊆ F is the initial institutional state. In more detail, an institutional specification gives the signature of events (E ) that can occur and fluents (F ) that can hold in the institution. The signature is specified from a set of propositions P to which the institution I |P is restricted to (just I is used if P is unimportant). The events E is the set of observable events (Eobs ), and the set of institutional events (Einst ). The set of institutional events (Einst ) consists of events signifying something unrelated to a norm has happened (Einstact ), or a norm has been discharged/violated (Enorm ). The set of an institution’s fluents (F ), describe the state of a domain (Fdom ) such as that being governed (e.g. an agent is at a location), and the normative fluents (Fnorm ) that can hold 116 5. E XPLANATORY R ECTIFICATIONS FOR N ON – COMPLIANT I NSTITUTIONS in the institution. Each institution starts at an initial state (∆). An institution evolves from one state to the next in response to observable events, where, an institutional state is a set of fluents that are true at that point in time, Σ = 2F denoting the set of all possible institutional states. Describing the events and state changes that occur are an event generation function and state consequence function. Both functions’ arguments are a condition on a state, describing the things that must and must not hold in a state to cause the events/state change, and a set of events. A condition on a state is described with state formulae, X = 2F ∪¬F denoting the set of all state formulae, where ¬F = {¬ f | f ∈ F } is the weak negation of all fluents denoting they do not hold. The event generation function (G : X × E → 2Einst ) states when, conditional on a state, one event counts–as another. The consequence function (C : X × E → 2F × 2F ) provides the fluents that are initiated and terminated by events from one state to the next. As previously, we use C (X , e) = 〈C ↑ (X , e), C ↓ (X , e)〉 to denote the consequence function’s result, where C ↑ (X , e) is the set of fluents initiated and C ↓ (X , e) is the set of fluents terminated by the event e when the state entails the state condition X . The approach we take to representing a multi–tier institution is to restrict each i th–tier institution such that it can contain events and fluents from all the tiers below for monitoring, but can only govern the tier directly below by imposing i thorder norms. This restriction is defined by, starting with a set of propositions P which describe the MAS’ events and fluents, the first–tier I 1 |P 1 imposes normative fluents over the events and fluents of the MAS (i.e. first–order normative fluents) such that P 1 = P . Then, each i th–tier above the first I i |P i can contain the normative fluents and events (dischargement and violation) from the tiers i −1 ), but each i th–tier is restricted in only below for monitoring (P i = P i −1 ∪ N |P i −1 ∪ Enorm initiating and terminating normative fluents over these (i.e. i thorder norms). This means, an institution can potentially also impose norms about the dischargement and violation of norms in the tier below. We leave this to the discretion of the designer, since in some cases it can make sense, for example obliging a norm is violated before an obligation to pay a fine is imposed. For monitoring, we will later define using ASP rules how each tier is linked, such that each i th–tier contains the normative events and normative fluents produced/imposed by the tier below. Formally, a multi–tier institution is defined as: Definition 26. Multi–tier Institution Let P be a set of propositions denoting the domain, a multi–tier institution is a tuple T = 〈I 1 |P 1 , ..., I n |P n 〉 where: • Each element of T is an individual institution s.t. i i ∀i ∈ [n] : I i |P i = 〈E i , F i , C i , G i , ∆i 〉, X i = 2F ∪¬F , Σi = 2F i i −1 – each i th–tier can contain the • P 1 = P and ∀i ∈ [2, n], P i = P i −1 ∪ N |P i −1 ∪ Enorm events and fluents that can be defined in the tier below and normative fluents over these. • ∀i ∈ [2, n], ∀S ∈ X i , ∀e ∈ E i : C i ↑ (S, e) ∩ N |P i −1 = ;, C i ↓ (S, e) ∩ N |P i −1 = ; – the i th– tier can only initiate and terminate i thorder norms. This concludes the representation for individual and multi–tier institutions. 5.1. A PPROACH 117 5.1.3. C ASE S TUDY Now, we introduce our case study and demonstrate the multi–tier institution representation by formalising it. Our case study is in the context of a system for crowdsourcing audio data from users using specialised cellphone apps, called a soundsensing system [162]. Our case study is for a tier–1 soundsensing institution (SS) which governs users contributing audio data using cellphone apps, and for the tier–2 governmental institution (GI) which regulates the regulations of the soundsensing system away from placing unacceptable limits on user’s rights. The case study is formalised in table 5.1 and table 5.3. We follow the convention that upper–case symbols stand for variables. For brevity we leave out the set of events and fluents for each institution. Both institutions consist of rules describing the domain (e.g. an agent entering a new location causes the agent to be at that location) and consider the location ‘street b’ to be private and the agent ‘Bertrand’ to be a child (see the initial states). The soundsensing institution is described as follows and formalised in Table 5.1: Soundsensing Tier–1 Institution • Entering a new location causes an agent to leave the previous location (SSIG.1). • In general when a norm is violated a generic norm violation event occurs (SSIG.2, SSIG.3 and SSIG.4). • Due to a designer error, leaving a location also causes a generic norm violation event (SSIG.5). • A user entering a location which is private counts–as entering a private location (SSIG.6). • Likewise, leaving a location which is private counts–as leaving a private location (SSIG.7). • Entering a new location causes a user to be at that location (SSICI.1). • Likewise, leaving a location means the user is no longer at their previous location (SSICT.1). • When a user turns 14 years of age, they are no longer considered a child (SSICT.2) as defined in real–world regulations pertaining to the retention of children’s data[227]. • Users are obliged to provide their location on request to give the collected data location context (SSICI.2). • If a user violates a norm they are obliged to pay a fine (SSICI.3). • Users are forbidden from turning their microphone off to ensure data is collected continuously (SSIIS). In turn, the soundsensing institution is governed by a tier–2 governmental institution designed to meet different aims (e.g. maintaining agents’ rights). It is formalised in table 5.3 and described as follows: Governmental Tier–2 Institution 118 5. E XPLANATORY R ECTIFICATIONS FOR N ON – COMPLIANT I NSTITUTIONS • Entering a new location causes an agent to leave the previous location (GGI.1). • When a first–order norm is violated a generic norm violation event occurs (GGI.2 and GGI.3). • Entering a location causes an agent to be at that location (CIGI.1). • Likewise, leaving a location causes an agent to no longer be at that location (CTGI.1). • If someone turns 14 years of age then they are no longer a child (CTGI.2), again, based on real–world regulations pertaining to the retention of children’s data[227]. • It is obliged that fines are only imposed on users after they violate a norm. In the initial state (GIIS) there is an obligation for a norm violation to occur before an obligation to pay a fine is imposed. Naturally, the obligation for a norm violation to occur first does not hold once a fine is imposed. If there is an obligation to pay a fine and that obligation is discharged (i.e. the fine is paid), then the obligation for a norm to be violated before a fine is imposed is reinstated (CIGI.2). • When a user is in an area that forbids audio recording (i.e. a private area), it is forbidden to forbid them from turning their microphone off (CIGI.3). • It is forbidden to oblige children (users under the age of 14) to share their location (GIIS). Similar regulations can be found in the United States Government’s Child Privacy and Protection Act [227]. This concludes the formalisation of our case study. In the next section we will introduce the computational framework we use in this chapter and present the results of using the computational framework to check the compliance of the soundsensing institution with the governmental institution. Table 5.1: Soundsensing Institution Formalisation G SS ({at(Loc0, Ag0)}, enter(Loc1, Ag0)) 3 leave(Loc0, Ag0) (SSIG.1) SS G (;, viol(obl(share_location(Ag0),leave(Ag0, Loc0)))) 3 norm_violation(Ag0) (SSIG.2) G SS (;, viol(obl(share_location(Ag0),leave(Ag0, Loc0)))) 3 norm_violation(Ag0) (SSIG.3) G SS (;, viol(pro(microphone_off(Ag0),leave_soundsensing(Ag0)))) 3 norm_violation(Ag0) (SSIG.4) 5.1. A PPROACH 119 G SS (;, enter(Ag0, Loc0)) 3 norm_violation(Ag0) (SSIG.5) G SS ({private(Loc0)}, enter(Ag0, Loc0)) 3 enter_private(Ag0) (SSIG.6) SS G ({private(Loc0)}, leave(Ag0, Loc0)) 3 leave_private(Ag0) (SSIG.7) C SS↑ (;, enter(Loc0, Ag0)) 3 at(Ag0, Loc0) (SSICI.1) C SS↑ (;, request_location(Ag0)) 3 (SSICI.2) obl(share_location(Ag0), leave(Ag0, Loc0)) C SS↑ (;, norm_violation(Ag0)) 3 obl(pay_fine(Ag0), leave_soundsensing(Ag0)) (SSICI.3) C SS↓ (;, leave(Loc0, Ag0)) 3 at(Loc0, Ag 0) (SSICT.1) C SS↓ ∆ SS ({child(Ag0)}, birthday(Ag0, 14)) 3 child(Ag0) = {private(street_b), at(ada, street_b), at(bertrand, street_c), child(bertrand), (SSICT.2) (SSIIS) pro(microphone_off(Ag0),leave_soundsensing(Ag0))} Table 5.3: Governmental Institution Formalisation G GI ({at(Loc0, Ag0)}, enter(Loc1, Ag0)) 3 leave(Loc0, Ag0) (GGI.1) GI G (;, viol(obl(share_location(Ag0), leave(Ag0, Loc0)))) 3 norm_violation(Ag0) (GGI.2) G GI (;, viol(pro(microphone_off(Ag0),leave_soundsensing(Ag0)))) 3 norm_violation(Ag0) (GGI.3) C G I ↑ (;, enter(Loc0, Ag0)) 3 at(Ag0, Loc0) (CIGI.1) C G I ↑ (;, disch(obl(pay_fine(Ag0),leave_soundsensing(Ag0)))) 3 obl(norm_violation(Ag0), obl(pay_fine(Ag0),leave_soundsensing(Ag0))) (CIGI.2) C G I ↑ ({private(Loc0)}, enter(Loc0)) 3 pro(pro(microphone_off(Ag0),leave_soundsensing(Ag0)), leave(Loc0)) (CIGI.3) C G I ↓ (;, leave(Loc0, Ag0)) 3 at(Loc0, Ag 0) (CTGI.1) C G I ↓ ({child(Ag0)}, birthday(Ag0, 14)) 3 child(Ag0) (CTGI.2) ∆ GI = {obl(norm_violation(Ag0), obl(pay_fine(Ag0),leave_soundsensing(Ag0)), pro(obl(share_location(bertrand),leave(Ag0, Loc0)), birthday(bertrand, 14))} ∪ ∆SS (GIIS) 120 5. E XPLANATORY R ECTIFICATIONS FOR N ON – COMPLIANT I NSTITUTIONS 5.1.4. M ULTI –T IER I NSTITUTION O PERATIONALISATION IN ASP The formal representation for multi–tier institutions is complemented by a corresponding ASP operationalisation, much like in chapter 4, for automatic compliance checking of lower–tier institutions with higher–tier institutions. The ASP program, comprises rules using the familiar initiated(p, In, I), terminated(p, In, I), occurred(e, In, I), holdsat(f, In, I), start(I ) and instant(I ) literals outlined previously, as well as the set of state formula literals EX(X, In, I). The ASP program comprises several components which we refer to later in this chapter. Firstly, programs presented in the preceding chapter: • A program representing a trace of observable events used as input for producing multi–tier models, the timeline program Πtrace(k) given previously in definition 21. • an implementation of the operational semantics, the reasoning program Πbase(k) given previously in definition 22. Secondly, two new types of ASP program: i • Programs ΠI for each individual institution I i in the multi–tier institution M according to the translation given in the subsequent definition 27. • A program Πmtreas , given in subsequent definition 28. It represents the filtering functions linking the individual institutions in a multi–tier institution, thereby ensuring normative fluents and norm compliance events are passed from lower–tiers to higher– tiers. i The new types of ASP program are defined as follows. First, the programs ΠI for representing each individual institution in a multi–tier institution in ASP. Defined and described subsequently as: Definition 27. Multi–tier Institution ASP Translation Let T = 〈I 1 |P 1 , ..., I n |P n 〉 be a i multi–tier institution. The programs ΠI are defined for each individual institution I i according to the following translation: ∀i ∈ [1, n], (I i = 〈E i , F i , C i , G i , ∆i 〉): Ii ⇔ i e ∈ Eobs ⇔ i ⇔ e ∈ Einstact i f ∈F ⇔ i↑ C (X , e) = P ⇔ tier(In,i).inst(In). ∈ ΠI evtype(e,In, ex). ∈ Π Ii evtype(e,In, in). ∈ Π Ii ifluent(f,In). ∈ Π i (IT.1) (IT.2) (IT.3) Ii (IT.4) ∀p ∈ P : initiated(p,In, I) : − occurred(e,In, I), EX(X, In, I). ∈ Π Ii (IT.5) 5.1. A PPROACH 121 C i ↓ (X , e) = P ⇔ ∀p ∈ P : terminated(p,In, I) : − occurred(e,I n,I ), EX(X, In, I). ∈ Π G i (X , e) = E ⇔ ∀e 0 ∈ E : occurred(e 0 ,In, I) : − occurred(e,In, I), EX(X, In, I). ∈ Π f ∈ ∆i ⇔ (IT.6) Ii (IT.7) Ii holdsat( f ,In, I) : −start(I). ∈ ΠI i (IT.8) In more detail, the tier each institution operates at is declared as a fact (IT.1). Events and fluents are declared as facts as usual (IT.2 to IT.4). Fluents are initiated (IT.5) and terminated (IT.6) as usual according to the state consequence function. Likewise, events occur as usual according to the event generation function (IT.7). Finally, the initial state is represented with holdsat/3 atoms (IT.8). The links between tiers, for ‘passing up’ normative fluents and norm compliance events from lower–tiers to higher–tiers for compliance checking are defined as the following ASP program: Definition 28. Multi–tier Links ASP Program The program Πmtreas is the following ASP program: occurred(disch(obl(A, D)), HIn, I) : −occurred(disch(obl(A, D)), LIn, I), tier(LIn, I1 ),tier(HIn, I2 ), (MTS.1) I2 == I1 + 1. occurred(disch(pro(A, D)), HIn, I) : −occurred(disch(pro(A, D)), LIn, I), tier(LIn, I1 ),tier(HIn, I2 ), (MTS.2) I2 == I1 + 1. occurred(viol(obl(A, D)), HIn, I) : −occurred(viol(obl(A, D)), LIn, I), tier(LIn, I1 ),tier(HIn, I2 ), (MTS.3) I2 == I1 + 1. occurred(viol(pro(A, D)), HIn, I) : −occurred(viol(pro(A, D)), LIn, I), tier(LIn, I1 ),tier(HIn, I2 ), (MTS.4) I2 == I1 + 1. holdsat(obl(A, D), HIn, I) : −holdsat(obl(A, D), LIn, I), tier(LIn, I1 ),tier(HIn, I2 ), (MTS.5) I2 == I1 + 1, start(I). holdsat(pro(A, D), HIn, I) : −holdsat(pro(A, D), LIn, I), tier(LIn, I1 ),tier(HIn, I2 ), I2 == I1 + 1, start(I). (MTS.6) 122 5. E XPLANATORY R ECTIFICATIONS FOR N ON – COMPLIANT I NSTITUTIONS initiated(obl(A, D), HIn, I) : −initiated(obl(A, D), LIn, I), tier(LIn, I1 ),tier(HIn, I2 ), (MTS.7) I2 == I1 + 1, start(I). initiated(pro(A, D), HIn, I) : −initiated(pro(A, D), LIn, I), tier(LIn, I1 ),tier(HIn, I2 ), (MTS.8) I2 == I1 + 1, start(I). terminated(obl(A, D), HIn, I) : −terminated(obl(A, D), LIn, I), tier(LIn, I1 ),tier(HIn, I2 ), (MTS.9) I2 == I1 + 1, start(I). terminated(obl(A, D), HIn, I) : −terminated(obl(A, D), LIn, I), tier(LIn, I1 ),tier(HIn, I2 ), (MTS.10) I2 == I1 + 1, start(I). This concludes our short introduction of multi–tier institution operationalisation in ASP. 5.1.5. E XECUTED C ASE S TUDY In this section we execute our case study, comprising the soundsensing institution which is governed by a governmental institution, formalised as a multi–tier institution. That is by exSS GI ecuting the multi–tier institutions’ corresponding ASP programs, ΠI , ΠI , together with the program linking them Πmtreas , the base semantics program Πbase(k) and an observable trace program Πtrace(k) , in the last two cases for a trace of observable events of length k . In our case, the trace program comprises an event sequence with three elements, represented as the following ASP facts: 1 2 3 compObserved(ex_enter(ada, street_b), 0). compObserved(ex_request_location(ada), 1). compObserved(ex_request_location(bertrand), 2). In this short trace, first Ada enters a new location, street_b, then Ada’s location is requested and finally Bertrand’s location is requested. For this short trace, three cases of non–compliance of the soundsensing institution with the governmental institution are discovered, as depicted in figure 5.2. Firstly, when Ada enters a new location due to an erroneous rule in the soundsensing institution (a designer error), a generic norm violation event occurs in the soundsensing institution (the first state transition). Due to the generic norm violation event occurring, the soundsensing institution imposes an obligation for Ada to pay a fine in state S 1 . However, the governmental institution only recognises actual norm violation events as causing a generic norm violation event and obliges an actual norm is violated before an obligation to pay a fine is imposed. Consequently, the governmental institution’s higher–order norm for there to be a norm violation before an obligation to pay a fine is imposed is violated in the transition from S 1 to S 2 . Secondly, in the soundsensing institution agents are unconditionally prohibited from turning their microphone off, however the governmental institution prohibits such a prohibition when an agent enters a private location. When Ada enters a private location (street_b) 5.1. A PPROACH 123 request_location(ada): governmental request_location(ada): soundsensing viol(pro(pro(microphone_off(a leave_soundsensing(ada)) leave( ada street_b))) : governmental viol(obl(norm_violation(ada), obl(pay_fine(ada) leave_soundsensing(ada)))) : governmental enter(ada, street_b): governmental, soundsensing norm_violation(ada): soundsensing leave(ada, street_a): governmental, soundsensing viol(pro(obl(share_location( bertra leave(bertrand street_c)), birthday(bertrand 14))) : governmental request_location(bertrand): governmental, soundsensing S0 S1 S2 S3 1) + – at(ada, street_a): governmental, soundsensing 2) + at(bertrand, street_c): governmental, soundsensing 3) + child(bertrand): governmental, soundsensing 4) + obl(norm_violation(ada), obl( pay_fine(ada), leave_soundsensing(ada))): governmental 5) + obl(norm_violation(bertrand), obl(pay_fine(bertrand), leave_soundsensing(bertrand))) : governmental 6) + private(street_b) : governmental, soundsensing 7) + pro(microphone_off(ada), leave_soundsensing(ada)): governmental 8 + pro(microphone_off(ada), leave_soundsensing(ada)): governmental, soundsensing 9) + pro(microphone_off(bertrand), leave_soundsensing(bertrand)): governmental, soundsensing 10) + pro(obl(share_location( bertrand), leave(bertrand, street_a)), birthday(bertrand, 14)) : governmental 11) pro(obl(share_location( bertrand), leave(bertrand, street_b)), birthday(bertrand, 14)) : governmental 12 + pro(obl(share_location( bertrand), leave(bertrand, street_c)), birthday(bertrand, 14)) : governmental 13 + pro(obl(share_location( bertrand), leave(bertrand, street_d)), birthday(bertrand, 14)) : governmental 1) + at(ada, street_b): governmental, soundsensing 2) at(bertrand, street_c): governmental, soundsensing 3) child(bertrand): governmental, soundsensing 4) obl(norm_violation(bertrand), obl(pay_fine(bertrand), leave_soundsensing(bertrand))): governmental 5) + obl(pay_fine(ada), leave_soundsensing(ada)): governmental, soundsensing 6) + private(street_b): governmental, soundsensing 7) pro(microphone_off(ada), leave_soundsensing(ada)): governmental, soundsensing 8) pro(microphone_off(bertrand), leave_soundsensing(bertrand)): governmental, soundsensing 9) pro(obl(share_location( bertrand), leave(bertrand, street_a)), birthday(bertrand, 14)): governmental 10) pro(obl(share_location( bertrand), leave(bertrand, street_b)), birthday(bertrand, 14)): governmental 11) pro(obl(share_location( bertrand), leave(bertrand, street_c)), birthday(bertrand, 14)): governmental 12) pro(obl(share_location( bertrand), leave(bertrand, street_d)), birthday(bertrand, 14)): governmental 13) – obl(norm_violation(ada), obl(pay_fine(ada), leave_soundsensing(ada))): governmental 14) +– pro(pro(microphone_off( ada), leave_soundsensing(ada)), leave(ada, street_b)): governmental 1) + obl(share_location(ada), leave(ada, street_b)): governmental, soundsensing 2) at(ada, street_b): governmental, soundsensing 3) at(bertrand, street_c): governmental, soundsensing child(bertrand): governmental, soundsensing 4) obl(norm_violation(bertrand), obl(pay_fine(bertrand), leave_soundsensing(bertrand))): governmental, soundsensing 5) obl(pay_fine(ada), leave_soundsensing(ada)): governmental, soundsensing 6) obl(share_location(ada), leave( ada, street_b)): governmental, soundsensing 7) private(street_b): governmental, soundsensing 8) pro(microphone_off(ada), leave_soundsensing(ada)): governmental, soundsensing 9) pro(microphone_off(bertrand), leave_soundsensing(bertrand)): governmental, soundsensing 10) pro(obl(share_location( bertrand), leave(bertrand, street_a)), birthday(bertrand, 14)): governmental 11) pro(obl(share_location( bertrand), leave(bertrand, street_b)), birthday(bertrand, 14)): governmental 12) pro(obl(share_location( bertrand), leave(bertrand, street_c)), birthday(bertrand, 14)): governmental 13) pro(obl(share_location( bertrand), leave(bertrand, street_d)), birthday(bertrand, 14)): governmental 1) at(ada, street_b): governmental, soundsensing 2) at(bertrand, street_c): governmental, soundsensing 3) child(bertrand): governmental, soundsensing 4) obl(norm_violation(bertrand), obl(pay_fine(bertrand), leave_soundsensing(bertrand))): governmental, soundsensing 5) obl(pay_fine(ada), leave_soundsensing(ada)): governmental, soundsensing 6) obl(share_location(ada), leave( ada, street_b)): governmental, soundsensing 7) + obl(share_location(bertrand), leave(bertrand, street_c)): governmental, soundsensing 8) private(street_b): governmental, soundsensing 9) pro(microphone_off(ada), leave_soundsensing(ada)): governmental, soundsensing 10) pro(microphone_off(bertrand), leave_soundsensing(bertrand)): governmental, soundsensing 11) pro(obl(share_location( bertrand), leave(bertrand, street_a)), birthday(bertrand, 14)): governmental 12) pro(obl(share_location( bertrand), leave(bertrand, street_b)), birthday(bertrand, 14)): governmental 13) pro(obl(share_location( bertrand), leave(bertrand, street_d)), birthday(bertrand, 14)): governmental 14) – pro(obl(share_location( bertrand), leave(bertrand, street_c)), birthday(bertrand, 14)): governmental S4 Figure 5.2: Results for a trace, the originating institutions for an event or a fluent are in bold, newly initiated fluents are denoted with a + and terminated fluents which will cease to hold in the next state are denoted with –. Violated second–order norms in the second–tier governmental institution are highlighted . there is still a prohibition on her from turning her microphone off. Consequently, the prohibition on prohibiting Ada from turning her microphone off when she is in a private location is violated during the transition from state S 1 to S 2 . Thirdly, when an agent is requested to provide their location the soundsensing institution obliges them to do so, but this is forbidden by the governmental institution if the agent is a child, such as Bertrand. In state S 3 the soundsensing institution obliges Bertrand, a child, to share his location. Consequently, in the final state transition the governmental institution’s prohibition on obliging Bertrand to share his location is violated. This concludes our presentation of non–compliance for the case study in this chapter. In the final part of this section we will discuss the approach we take to automatically resolving non–compliance, by using Inductive Logic Programming. 124 5. E XPLANATORY R ECTIFICATIONS FOR N ON – COMPLIANT I NSTITUTIONS 5.1.6. I NDUCTIVE L OGIC P ROGRAMMING : A BRIEF OVERVIEW We view the problem of revising lower–tier institutions to be compliant with higher–tier institutions as a theory revision (TR) problem which can be solved using Inductive Logic Programming (ILP). ILP [180] is a machine learning technique concerned with the induction of logic theories that generalise (positive and negative) examples with respect to a prior background knowledge. In non–trivial problems it is crucial to define the search space accurately. This is done by a language bias, that can be expressed using the notion of mode declarations [180], describing the structure of the elements in the target theory. In the case presented here, we want to find the ASP rules that contain certain elements in the head and body. So we will have head and body mode declarations. An ILP theory revision task is a tuple 〈P, B, M 〉 where P is a set of conjunctions of literals, called properties, B is a normal program, called the background theory, M is a set of mode declarations describing the form that rules in the revised theory can take and s(M ) is the set of rules adhering to M . A theory H , called a hypothesis, is an inductive solution for the task 〈P, B, M 〉, if (i) H ⊆ s(M ), and (ii) P is true in all the answer sets of B ∪ H . Our approach to revising a lower–tier institution in a multi–tier institution to be compliant is based on the introduction of new rules, and deleting and revising existing ones. As discussed in [45], non–monotonic inductive logic programming can be used to revise an existing theory. The key concept is that of minimal revision. In general, a TR system is biased towards the computation of theories that are similar to a given revisable theory. The difference between two programs T and T 0 is denoted as c(T, T 0 ). The theory T 0 , called a revised theory, is a TR solution for the task 〈P, B, T, M 〉 with distance c(T, T 0 ), iff (i) T 0 ⊆ s(M ), (ii) P is true in all the answer sets of B ∪ T 0 , (iii) if a theory S exists that satisfies conditions (i) and (ii) then c(T, S) ≥ c(T, T 0 ), (i.e. minimal revision). 5.2. R EVISING I NSTITUTIONS F OR C OMPLIANCE In this section we give the details of this chapter’s main contribution: a system for revising a lower–tier institution to be compliant with a higher–tier institution in a multi–tier institution. In particular, we are interested in revising the institution which the system user (an institutional designer) has the power to effect change. We call this institution to be revised a mutable institution. We are interested in revising a mutable institution to meet two properties: • Success meaning that a formerly non–compliant institution for an event–trace is compliant for the same event trace after being revised. This means when normative fluents are obliged to be imposed they are, and conversely any prohibited normative fluents are not imposed. • Minimality is a requirement for any revision to minimise the change in consequences of the new institution compared to the old one. That is, following changes to the institution the institution’s states are as close as possible to the states prior to the change(s) for a trace of events. To give an example, the soundsensing institution prohibits agents to turn their cellphone microphone off, whilst the governmental institution prohibits such a prohibition in areas deemed ‘private’. In this case, an institution 5.2. R EVISING I NSTITUTIONS F OR C OMPLIANCE 125 revision can be successful by removing the soundsensing institution’s prohibition altogether, but only successful and minimal by removing the prohibition in just those cases where an agent is at a private location. We instantiate the problem of revising a mutable institution as an ILP theory revision task in Section 5.1.6. Then, we take a computational approach to solving the ILP theory revision task by performing inductive search in ASP [47]. Inductive search is achieved by transforming the mutable institution represented in ASP to an ASP representation encoding the space of ILP theory revisions and enabling different revisions to be tried. We describe our computational approach using ASP in Section 5.2.2, and the implementation and revision results for our case study in Section 5.2.3. 5.2.1. R EVISING I NSTITUTIONS TO R EVISION TASK I NSTANCE BE C OMPLIANT IS AN ILP T HEORY In this section, we define the revision for compliance task as an ILP revision task according to the revision for compliance requirements outlined previously. We begin by formally defining the search space of possible revisions with mode declarations. Mode declarations define the literals that can appear in the head and body of rules. In the case of revising a mutable institution in a multi–tier institution, the mode declarations describe the valid rules for: generating non–normative institutional events, initiating and terminating domain fluents, and given the mutable institution is the i th–tier, initiating and terminating i thorder normative fluents (i.e. restricted to only initiating/terminating a normative fluent f if it is not in the language of norms N |Pri −1 of the tier i − 1 below). Definition 29. Mode Declarations. Let I i = 〈E i , F i , G i , C i , ∆i 〉 be a mutable institution for which In is a unique label. The mode declarations for I i are a pair M = 〈M h , M b 〉 where M h is the set of head mode declarations and M b the set of body mode declarations, defined as: Mh = Mb = {initiated( f , In, I), terminated( f , In, I) : f ∈ F \ N |Pri −1 }∪ i {occurred(e, In, I) : e ∈ Einstact } {holdsat( f ,In, I), ¬holdsat( f ,In, I) : f ∈ F i }∪ {occurred(e, In, I) : e ∈ E i } The set of compatible rules with the head and body mode declarations are also required to contain one and only one event in the body. The compatible rules are defined as: Definition 30. Compatible Rules. Let M = 〈M h , M b 〉 be the mode declarations for a mutable institution I i = 〈E i , F i , G i , C i , ∆i 〉. An ASP rule l0 : − l1 , ..., ln . where n ∈ N is compatible with M iff l 0 ∈ M h , ∀i ∈ [1, n] : l i ∈ M b and |{l 1 , ..., l n } ∩ {occurred(e, In, I) : e ∈ E i }| = 1. The set of all compatible rules with M is s(M ). Having described the search space of revisions, a theory revision task TR needs to be instantiated with the properties P that a solution must meet. These properties are typically positive examples (formulae that are true following a revision) and negative examples (formulae that are false following a revision). In our case we are only interested in supplying 126 5. E XPLANATORY R ECTIFICATIONS FOR N ON – COMPLIANT I NSTITUTIONS negative examples, stating that non–compliance is eradicated in a solution to TR. The negative examples in P are represented as ASP integrity constraints requiring a revised mutable institution is compliant with all higher–order norms it can violate – including those it does not violate before revision – ensuring revision does not cause further non–compliance. Definition 31. Compliance Properties. Let I i be a mutable institution and I i +1 = 〈E i +1 , F i +1 , C i +1 , G i +1 , ∆i +1 〉 be the institution with unique name Ini +1 governing I i where i ∈ N. The compliance properties for I i is the set of constraints: i +1 P = {: − occurred(viol(n), Ini +1 , I), instant(I). : n ∈ Fnorm } We can now instantiate an ILP theory revision task, as a compliance theory revision task in a multi–tier institution according to the previous definitions: Definition 32. Compliance Theory Revision Task. Let I i be a mutable institution in the multi–tier institution M. An ILP theory revision task TR = 〈P, B, T, M 〉 is a compliance theory revision task for I i iff: (a) P is a set of compliance properties for I i , (b) B is the normal program comprising (i) a multi–tier reasoning program Πmtreas , (ii) the timeline j program Πtrace(k) and (iii) the institution representation program ΠI for each institution I j in M apart from the mutable institution I i , (c) T is the institution representation program i ΠI for the mutable institution I i , and (iv) M is the set of mode declarations for I i . As outlined previously, we require solutions to theory revision to minimise the revision cost in order to remain as close to an institution designer’s original intentions as possible. More precisely, the requirement is that the changed, mutable, institution’s model for a composite trace contains as many similarities between states compared to before the changes were made (i.e. minimising the changes to consequences). We derive the cost of revision from the changes in consequences rather than the number of rule changes – as used in [154] – since due to non–monotonicity, as the changes in consequences between two versions of a mutable institution increases, the number of rule changes does not necessarily monotonically increase. The changes in consequences are the number of added and deleted fluents in the answer set for B ∪ T compared to the answer–set B ∪ T 0 for some revised institution T 0 (i.e. the symmetric set difference between the answer–sets for B ∪ T and for B ∪ T 0 ). Definition 33. Theory Revision Cost Let TR = 〈P, B, T, M 〉 be a compliance theory revision task for a mutable institution I with unique label In, T 0 be a solution to TR, ans be the answer–set for B ∪ T and ans0 be the answer–set for B ∪ T 0 and ⊕ be the set symmetric difference operation. The cost c(T, T 0 ) is defined as: ¯© ª¯ c(T, T 0 ) = ¯ f = holdsat(p, In, i ) : i ∈ N, f ∈ ans ⊕ ans0 ¯ Thus, a solution to an ILP theory revision task, instantiated as revision for compliance, TR = 〈P, B, T, M 〉 is a search problem. The search space consists of all possible revised versions of a mutable institution theory (normal program) and a solution T 0 to the theory revision task is one which ensures the mutable institution is now compliant for a particular trace (meets the properties in P ) and minimal such that there is no revised theory S which is ‘more minimal’ (c(T, S) ≥ c(T, T 0 )). This requires searching all possible solutions and 5.2. R EVISING I NSTITUTIONS F OR C OMPLIANCE 127 comparing them. In order to perform this search we need a way to try different changes to T and find optimal solutions. In the next subsection we show how we can use ASP to perform this search. 5.2.2. S OLVING ILP I NSTITUTION R EVISION IN ASP Based on [154] we use inductive search in ASP to solve an ILP theory revision task TR = 〈P, B, T, M 〉 instantiated as institutional revision for compliance. The approach we take is to transform the theory to be revised T (a mutable institution) into an ASP program where different changes to the theory can be tried (body literal and rule addition and deletion) that fit into the space of possibilities s(M ). This is by redefining certain predicates in rules as undefined, rather than being a necessary element of a rule. Such undefined predicates are called abducibles. We call this program, with previously fully–defined predicates now defined as abducibles, the revision program Πrev . The background theory B remains unchanged and provides both the unchangeable parts of the multi–tier institution and multi–tier reasoning. The background theory allows the effects of different revisions to be determined. The properties to be met, P , constrain any revisions found by the ASP program Πrev to result in a compliant institution. The cost measure between a revisable T and revised theory T 0 , c(T, T 0 ) is encoded as an ASP optimisation statement. Computing the answer–sets for these components as a single ASP program explores the search space, with each answer– set representing an outcome (revised theory) that meets the properties P and with those that minimise the difference (changes in consequences) ranked highest and presented to the user for selection. The advantage of this approach is that the representation and reasoning for the non–revisable portions of the multi–tier institution are encoded as the same ASP programs for the computational and revision framework requiring no re–implementation. In order to go from a revisable theory T representing a mutable institution to a revision program Πrev , we need to alter T in some way such that adding new rules and changing existing rules can be tried by the new program with each answer–set corresponding to different revised theories. The approach we take, as in [47, 154], is to introduce abducible predicates which represent the different revision operations and are selected by the program for inclusion in answer–sets. If an abducible is selected for answer–set inclusion then the effect is to perform the revision operation the abducible represents. The abducibles have the form rev(In, i, details(...)) conveying to the user the revision operation described in details(...) (e.g. a rule deletion operation) is carried out on a rule with label i in institution In. To give a simple example the rule l0 : − l1 . cannot be selected for deletion by an ASP program, but we can modify it to become l0 : −l1 , not rev(In, i, details(rDel)). meaning if the abducible r ev(In, i , details(rDel)) is included by the program in an answer–set the effect is to delete the rule i by ensuring the body is never true. The selection of revision tuples for inclusion in an answer–set is encoded in the ASP revision program using the ASP choice construct of the form {rev(In, i, details(...))}. Each type of revision operation (rule and body literal addition and deletion) requires a different abducible and set of rules in the ASP revision program Πrev . In Table 5.6 we describe the details of the different rules for trying revisions and the transformation from a revisable theory T to a revision program Πrev using In to represent an institution’s name, i to represent a rule identifier (e.g. an integer) and B −+ (l ) to represent whether a literal l is 128 5. E XPLANATORY R ECTIFICATIONS FOR N ON – COMPLIANT I NSTITUTIONS Rules Describing Institution Changes l 0 : − l 1 , ..., l n , rev(In, i,details(rDel)). {rev(In, i,details(rDel))}. l 0 : − l 1 , ..., l j −1 , try(i , j , B −+ (l j ), l j ), l j +1 , ..., l n . try(i , j , B −+ (l j ), l j ): − l j , not rev(In, i , details(bDel, j )). try(i , j , B −+ (l j ), l j ): − rev(In, i , details(bDel, j )). {rev(In, i, details(bDel, j))}. l 0 : − rev(In, i,details(rAdd)), l 1 , ..., l n . {rev(In, i,details(rAdd))}. l 0 : −l 1 , l 2 , ..., l n , extension(i , l 0 , l n+1 , B −+ (l n+1 )). extension(i , l 0 , l n+1 , B −+ (l n+1 )): − not rev(In, i , details(bAdd, B −+ (l n+1 ), l n+1 )). extension(i , l 0 , l n+1 , B −+ (l n+1 )): − rev(In, i , details(bAdd, B −+ (l n+1 ), l 1 ), l 1 . {rev(In, i , details(bAdd, B −+ (l n+1 ), l n+1 ))}. Explanation Rule deletion: Existing rules are extended with an abducible rev(In, i,details(rDel)), which when included in an answer–set has the effect of deleting the rule with index i . Body literal deletion: Each body literal l j of an existing rule is replaced with the literal try/4 for trying to delete the body literal l j . When the abducible rev(In, i , details(bDel, j )) is included in an answer–set the effect is to make the try literal true and thus effectively delete the literal l j , otherwise the try literal is only true when l j is true (effectively keeping l j ). Rule addition: Including the abducible rev(In, i,details(rAdd)) has the effect of including the rule with index i in the program. Body literal addition: Existing rules are appended with extension/4 predicates for each body mode literal a rule can be extended with. Including the abducible rev(In, i , details(bAdd, pos, l 1 ) in an answer–set has the effect of extending the rule with index i with the body literal l 1 (constraining the rule). That is, adding the revision predicate to an answer set makes the extension predicate true only when the literal with the specified variable bindings are true, effectively adding a constraint/body–literal to the rule. Otherwise, the extension predicate is always true (no constraint is tried for addition). Table 5.6: Explanation of how abducible revision predicates can (re–)define institutional rules for finding revisions of the institution In positive or negative. Finally, the cost c(T, T 0 ) between two theories is encoded as an ASP optimisation constraint causing the ASP program to only present answer–sets that are minimal in the changes to consequences between T ∪ B and T 0 ∪ B , which we also extend with a secondary prefer- 5.2. R EVISING I NSTITUTIONS F OR C OMPLIANCE 129 ence for revisions that generalise the institution (deleting body literals and rules) rather than specialising (adding new body literals and rules). The optimisation statement is given below where X @n represents the priority n of minimising the numerical value X , difference/1 measures the difference between the states in the answer–set for the institution before and after revision (in terms of added and removed fluents for each state), rAdd/1 counts the rule additions, bAdd/1 the body additions, bDel/1 the body deletions and rDel/1 the rule deletions. 1 2 #minimize {D@5: difference(D); RA@4: rAdd(RA); BA@3: bAdd(BA); BD@2: bDel(BD); RD@1: rDel(RD)}. 5.2.3. I MPLEMENTATION AND R ESULTS A prototype system for revising a lower–tier institution to be compliant with a higher–tier is implemented according to the description in the preceding sections.1 The implementation is a compiler written in Java which, as depicted in Figure 5.3, takes as input the mutable institution the institution designer has the power to effect change represented in ASP i (the mutable institution program ΠI ) and outputs a revision program Πrev . The revision program is then put together with compliance properties to be met by revisions, revision cost minimisation optimisations and the background theory to remain unchanged (the non– mutable institutions, the timeline program and the multi–tier institution reasoning). An answer–set solver applied to the composition of these programs then produces minimal revision suggestions for compliance (answer sets). The suggestions are passed to a user who selects and applies a set of revisions, resulting in a compliant institution represented as an ASP program. In addition to the system presented in this chapter, the ASP compiler also addresses an apparent lack of re–usability of institutions (e.g. using the same institution for different sets of agents) due to their propositional nature. Rather than taking just propositional institutions as input, the compiler also takes first–order institution theories containing variables in the head and body of rules, together with bindings and monadic predicates to denote types. To give an example, agent(ada) denotes ada is of type agent and agent(X) denotes the variable X is any ground term of type agent. Thus, a designer does not need to write a new propositional institution for the case where a new agent, Charles, joins the institutionalised society with all the norms and domain fluents that are about Charles. Instead, a fact agent(charles) can be added stating Charles is of type agent. In turn, the compiler takes these more re–usable first–order institution theories as input and outputs a first–order institution revision program that tries different variable bindings between head and body literals’ variables of the same type. For our case study, we have used our prototype compiler to produce a revision program for sub–sets of the compliance problem. That is, dividing the program up into smaller parts and resolving one case of non–compliance at a time for tractability, and testing all revision suggestions together at the end to confirm they are consistent. Some of the minimal and successful revisions found are given below (we keep to those we find most intuitive). The first change suggested addresses the issue of non–compliance due to an obligation 1 The prototype, multi–tier reasoning in ASP and the examples used in this chapter can be found at https: //sourceforge.net/projects/multitierinstitutionlearning/files/. 130 5. E XPLANATORY R ECTIFICATIONS FOR N ON – COMPLIANT I NSTITUTIONS Revisable Theory: Mutable Institution i Program - ΠI ASP to ASP Compiler Revision Program Compliance properties + cost minimisation optimisations Answer Set Solver Background Theory: j Non-mutable Institution Programs - ΠI trace(k) Trace Program - Π Multi-tier reasoning program - Πmtreas(k) Revision Suggestions for Compliance (Answer Sets) Selects Revisions Compliant Revised Ini0 stitution Program - ΠI Figure 5.3: Overview of using the implemented compiler and the multi–tier institution framework to resolve non– compliance. to pay a fine being imposed by the tier–1 soundsensing institution when an agent enters a new area. Non–compliance occurs, because an agent entering a new area triggers a norm violation event in the first tier institution regardless of whether a norm has been violated, whilst the second tier obliges that a norm is genuinely violated before a fine is imposed. The revision suggestion is to delete the rule in the first–tier soundsensing institution causing a norm violation event to occur when an agent enters an area: 1 2 3 4 occurred(norm_violation(Agent0), soundsensing, I) :agent(Agent0), instant(I), occurred(enter(Agent0, Location0), soundsensing, I), location(Location0). The second issue is that children (people under the age of 14) are obliged to share their location when requested, but this is prohibited by the tier–2 governmental institution. The following suggestion is one of several minimal changes found to ensure the non–compliant obligation is not imposed on children. An additional constraint is placed that an agent, Agent2, is not a child and the variable Agent2 is bound to the variable Agent0 denoting the agent who would be obliged to share their location. This means that the obligation can not be imposed on a child. The new variable Agent2 is introduced since the implementation relies on using unique variables for all literals and then systematically trying different optional bindings between the variables (or no bindings). The new rule is: 1 2 3 4 5 initiated(obl(share_location(Agent0), leave(Agent0, Location0)), soundsensing, I) :occurred(request_location(Agent1), soundsensing, I), holdsat(at(Agent1, Location0), soundsensing, I), not holdsat(child(Agent2), soundsensing, I), Agent0 = Agent1, 5.3. R ELATED W ORK 6 7 131 Agent0 = Agent2, agent(Agent0), agent(Agent1), agent(Agent2), location(Location0), instant(I). Finally, the tier–2 governmental institution prohibits a prohibition on an agent to turn their microphone off when they are in a private area. Yet, the tier–1 soundsensing institution always prohibits turning a microphone off until the agent leaves the system (the prohibition exists in the initial state). The revisions found are not to delete the rule initiating a prohibition in the tier–1 soundsensing institution’s initial state, but instead, to terminate the prohibition when an agent enters a private area and then initiate it again when they leave. Although the revision adds two rules, it is minimal in the outcome of the tier–1 soundsensing institution since there is still a prohibition on turning the microphone off in all other cases where it is allowed by the tier–2 governmental institution: 1 2 3 4 5 6 7 8 terminated(pro(microphone_off(Agent0), leave_soundsensing(Agent0)), soundsensing, I) :occurred(enter_private(Agent2), soundsensing, I), agent(Agent2), agent(Agent0), Agent0=Agent2, instant(I). initiated(pro(microphone_off(Agent0), leave_soundsensing(Agent0)), soundsensing, I) :occurred(leave_private(Agent2), soundsensing, I), agent(Agent2), agent(Agent0), Agent0=Agent2, instant(I). 5.3. R ELATED W ORK There has been much work on norm change in normative systems, however, as far as we are aware we are the first to propose a way to revise institutions to be compliant with other institutions in a multi–tier institution. The most closely related work is by Li et al. [154, 155] who also uses inductive search in ASP to resolve an ILP theory revision task. Unlike us, their focus is on resolving norm conflicts between multiple institutions governing a group of agents (e.g. when an agent is prohibited to perform an action by one institution and obliged by another) and later the general case of debugging ASP programs [157]. In comparison, we focus on revising non– compliance between lower–tier and higher–tier institutions in a multi–tier institution. Our proposal is based on Li et al. and extended to revising an i th–tier institution by adding new rules or modifying/deleting pre–existing rules to impose i th–order norms. We also extend the work to revising with minimal changes in the consequences of a revised institution (as opposed to changed rules), finally we look at the creation and deletion of existing rules which in our case study provides more minimal changes in the consequences compared to rule modification. Vasconcelos et al. [231] have proposed a technique for revising conflicting norms based on first–order unification. Their proposal provides a fine–grained way to revise obligation/permission/prohibition predicates’ terms. For example, an obligation to be in an area that overlaps with a prohibited area is revised by changing the obliged/prohibited areas for an agent to be in. In contrast to our work, their focus is on modifying the obligation/permission/prohibition predicates and not with adding/removing/modifying rules to meet a particular property (compliance between institutions in our case). Governatori and Rotolo [102] propose a way to use a defeasible logic to modify legal 132 5. E XPLANATORY R ECTIFICATIONS FOR N ON – COMPLIANT I NSTITUTIONS systems by introducing new norms which derogate, abrogate and annul norms using defeasible rules. Central to their proposal is the idea of a legal system being versioned and having two timelines: the versioning timeline and the timeline of the legal system’s evolution (i.e. which norms are imposed and when). We only consider the latter timeline, the evolution of an institution (in our case during pre–runtime model checking) and focus on diagnosing causes of non–compliance between institutions rather than assuming it is known what the new information (rules) is. Finally, on the more conceptual and theoretical side, Boella et al.[25] look at how to classify different systems of norm change by investigating a set of rational norm change postulates. Specifically, they look at normative system change to incorporate new conditional norms in input/output logics and they investigate the set of consistent postulates for different input/output logics. Again, this work also presupposes which conditional norms should be added to the normative system/institution, thus any system meeting these postulates is quite different from our proposal. 5.4. D ISCUSSION In this chapter we contributed an implemented automated system for revising a lower–tier institution’s regulations to be compliant with the regulations of a higher–tier institution it is governed by. The proposal addressed a problem created by pervasive legal artefacts in the social world, where on the one hand institutions are used to govern other institutions in a vertical governance structure we call multi–tier institutions, creating the potential for non– compliant regulations. On the other hand, revising institutions’ regulations to be compliant is non–trivial due to their inherent complexity. Our proposal takes our previous formal and computational framework [144] for determining the compliance of institutions in multi–tier institutions. Then, viewing the problem of revising an institution to be compliant as an instance of an ILP (Inductive Logic Programming) theory revision task, we use inductive search in ASP based on [154] to solve the ILP theory revision task for compliance. Inductive search in ASP is performed by translating, using an implemented compiler, from an ASP representation of an institution that needs to be revised to be complaint where revisions cannot be tried and searched for, to an ASP representation where revisions can be tried and thus revisions for compliance determined. Then, our system goes about finding revisions that are successful in resolving non–compliance and minimal in the changes to the institution’s consequences thus keeping the changed institution as close as possible to the institution designer’s original intentions. The system for revising institutions, for tractability, considers a fragment of the search space of revisions: modifying and deleting existing rules and extending a single mutable institution with a limited number of rules. The successful and minimal revisions that do exist (if any) within the space explored are guaranteed to be found. However, there may be more minimal revisions that result in a well–formed institution (according to our representation of institutions) outside of this space, but this space is bigger and takes longer to explore. We consider this a problem that is important to address. Firstly with formal analysis of the complexity of the full problem. Secondly, by studying the applicability of various heuristics to the full search problem (e.g. genetic algorithms) that cannot guarantee a minimal solution is found (i.e. in the case of genetic algorithms instead converging on local optima) but can help resolve tractability issues. As yet, it is unclear which heuristics are 5.4. D ISCUSSION 133 appropriate and how they can be incorporated into ILP revision as abducible search in ASP, presenting an interesting challenge for future work. 6 F ORMALISING I NSTITUTIONAL E NACTMENT VALIDITY One of the major problems encountered in time travel is not that of becoming your own father or mother. There is no problem in becoming your own father or mother that a broad–minded and well–adjusted family can’t cope with. [...] The major problem is simply one of grammar. Douglas Adams, The Restaurant at the End of the Universe This chapter is based on the following paper: King, T. C., Dignum, V., & Jonker, C. M. (2016). When Do Rule Changes Count–as Legal Rule Changes? In Proceedings of the 22nd European Conference on Artificial Intelligence (ECAI 2016). Frontiers in Artificial Intelligence and Applications. Vol 285. (pp. 3 – 11). IOS Press. http://doi.org/10.3233/978–1–61499–672–9–3 [143] 135 136 6. F ORMALISING I NSTITUTIONAL E NACTMENT VALIDITY Previously, Chapter 3, Chapter 4 and Chapter 5 covered soft constraints for institutional design governance and how to comply with these soft constraints. In this chapter we look at hard institutional constraints for institutional enactment governance, which make the social actions of enacting institutional changes possible. This chapter makes the following contributions: • A novel representation of institutions for which changes can be enacted according to secondary legal rules regulating rule change. In particular, secondary legal rules represented as counts–as rule that make rule change possible and are conditional on an extended notion of social context that includes conditions on past and present states, institution versions and hypothetical effects of rule change. • A novel semantics for reasoning about rule changes ascribed by rule–modifying counts–as rules. This chapter looks at institutional governance from the can perspective, in terms of which rule changes can be enacted in which contexts and by whom. Specifically, we look at the kinds of rules found in administrative law, which describes the procedures that must be followed for rule change to take place and specifies what types of rule change are possible. These are hard institutional constraints on rule enactment, in the sense that they make rule changes (im)possible. Whilst constitutive counts–as rules ascribe a social reality and how it changes over time, they themselves are also subject to evolving over time when they are modified, such as by a legislative body. Rule–modifying counts–as rules regulate changes to counts–as rules themselves, “A counts–as modifying a rule in context C”, describing the legislative procedure and the possible modification types. Rule–modifying counts–as rules are also modifiable according to the rule modification regulations. In ([100, 102]) a defeasible logic formalises legal rule change over time but not rule change regulation. In ([28]) counts–as rules that regulate rule modifications are formalised, but not in a temporal setting. However, thus far there has been no attention paid to formalising rule change regulated by counts–as rules in a temporal setting. This raises the question, in a temporal setting “how can we formalise practical reasoning to determine when institutional rule changes count–as legally valid rule change enactments? should we define when rule changes count–as legal and valid rule changes?” To give some examples: • Based on ([204, Art. 71]) parliament voting to enact a bill counts–as enacting it within one month. Rule change affects institutional states (e.g. enacting a bill obliging fences to be painted white, or changing what counts–as parliament); rule changes are conditional on the institutional state (e.g. whether a body constituting parliament has voted). • The UK government voted to retroactively require UK residents in a business partnership abroad to pay tax ([192, Sec. 58]), criminalising people in the past. Criminalising retroactive modifications are not possible according to the European Convention of Human Rights ([48, Art. 7]). Rule change affects institutional states (e.g. criminalising people in the past); rule change is conditional on how it would change 6.1. C OMPARISON WITH I NSTAL 137 institutional states (e.g. if the change would criminalise people in the past then the change is not possible). • A monarch or parliament can enact and repeal laws. The monarch enacts a law obliging all fences are painted white. The parliament retroactively repeals the power for the monarch to enact laws, reversing the fence–painting law enactment. Retroactive rule change affects past rule–modifying counts–as rules; past rule modifications can be unravelled due to a retroactive modification. An interdependency exists between the counts–as rules that construct a social reality and rule–modifying counts–as rules. Changing counts–as rules affects the past/present/future institutional context and can change the modifications which happened in the past up until the present; rule modifications are conditional on the past/present/future institutional context and the hypothetical rule change effects. Whether a rule change counts–as a legal rule change requires assessing the context in which the change takes place – comprising both the present state of affairs and the potential rule change effects affecting whether a rule change is legal in the first place. In this chapter we address the question “how can we formally define when legally valid institutional change enactments occur?”. The question is addressed by contributing the first formalisation of rule change ascribed by counts–as rules accounting for the aforementioned cases in a temporal setting. We introduce the notion of temporal rule–modifying counts–as rules, “A counts–as modifying a rule in the past/present/future in context C”, which ascribe rule changes. To account for institutions dually evolving from one social reality to the next built by counts–as rules, as well as from on counts–as rule set to another, we adopt social reality (state) and institution version timelines. We enhance context from referring to a built social reality, to also a past social reality in different institution versions and the hypothetical effects of rule change. Rule modifications can potentially affect past modifications by changing the social context or contradicting previous modifications, we posit that the most recent modifications are prioritised and can override past modifications. The rest of this chapter is organised as follows. We begin by comparing what follows with the InstAL framework which we use as a basis for our novel formalisation, and the formalisation used in the previous chapters in 6.1. Then we present the formal representation 6.2. The novel formal semantics are given in 6.3. We apply our framework to real case studies and examples used to test difficult edge cases in 6.4. Finally, we compare with closely related work in 6.4.1 and conclude with wider implications and directions for future work in 6.5. 6.1. C OMPARISON WITH I NSTAL In this chapter we extend institutions first formalised in the InstAL (Institution Action Language) framework ([42, 43]) where rules cannot be modified and rule change cannot be regulated, to be modifiable and modification–regulating. In InstAL an institution is a signature comprising events, fluents and regulatory rules. An event is either institutional providing a social interpretation (e.g. a person paying tax) of other institutional events and observable events or is observable and exogenous to the institution corresponding to brute facts (e.g. the event we call a person paying tax). Fluents describe/prescribe the domain (e.g. a person 138 6. F ORMALISING I NSTITUTIONAL E NACTMENT VALIDITY is a business partner who is obliged to pay tax). We view all rules as “A counts–as B in context C”, stating an event (the ‘A’) in a social context (‘C’) causes further institutional events to occur or different fluents to hold in the next state (the ‘B’s’). An InstAL institution contains rules regulating its evolution from one social reality (state) to the next, but the rules remain static. We extend institutions comprising counts–as rules to counts–as rules which are modifiable and ascriptively regulate rule changes. Rule modifications activate and deactivate rules in the past/present/future, analogous to enacting regulatory changes. Rule modifications are regulated with counts–as rules, “an event A counts–as a rule–modifying event B in context C”, which ascribes the actions counting–as past/present/future rule modifications in a particular context. Importantly, unlike in InstAL, institutions with modifiable rules do not just evolve from one state to the next according to their own counts–as rules. Rather, institutions evolve along two timelines, from one version comprising rules to another version comprising different rules. Each version evolves over time from state to state according to its rules. When a rule change occurs according to rule–modifying counts–as rules in one version, the institution evolves to the next version potentially comprising different (active) counts–as rules at different times. For example, if in one institution version on Wednesday a rule is retroactively added on the preceding Monday then that version’s past does not change. Instead, the institution evolves to a new version where the rule is active from the Monday potentially causing the version to evolve differently from then onwards. Institutions evolve from version to version where one versions can evolve from one state to another differently according to different rules. Contexts in counts–as rules are also extended. Contexts can be conditional on the present state but also past institution versions and states. This allows testing potential retroactive rule modification effects. For example, a retroactive rule change is ascribed by a government voting for the change in the context that it does not criminalise people in the past compared to the previous version’s past. To summarise we extend institutions to evolve along rule version and state timelines according to counts–as rules conditional on contexts comprising past versions and states, and potential rule change effects. In comparison to Chapter 3, Chapter 4 and Chapter 5 we are only interested in institutions ascribing non–deontic social facts. For example, social actions such as voting in parliament or enacting a rule change, and states of affairs such as someone being a tax payer. In other words, we are interested in the hard institutional constraints that make social actions possible according to counts–as rules. We are not interested in obligations and prohibitions which prescribe the ideal social actions and states of affairs. Consequently, unlike in the previous chapters we provide no specific representation for deontic positions nor a semantics to determine when they are violated. Moreover, we do not consider whether the effects of regulatory rules (i.e. the obligations and prohibitions they impose) are good or bad and hence we do not capture higher–order norms. We use counts–as rules, but unlike in Chapter 3 and Chapter 4 we do not capture links between concrete and abstract regulations according to counts–as rules. Rather, we capture the notion of governance in terms of counts–as rules making institutional change enactments regular and possible, hence deontic elements are not necessary. 6.2. R EPRESENTATION 139 6.2. R EPRESENTATION We begin with representing institutions which regulate their own temporal rule modifications. Definition 34. Institution An institution is a tuple I = 〈E , F , C , G , ∆〉. Institutions are distinguished with a superscript (e.g. I uk = 〈E uk , F uk , C uk , G uk , ∆uk 〉). Σ = 2F denotes all states for I . Where: 1. E = Eobs ∪ Einst ∪ Emod is a finite set of events comprising: • Observable events Eobs and institutional events Einst . • Rule modification events Emod = {mod(op, id, t) | op ∈ {act, deact}, id ∈ ID, t ∈ N} – a rule with the identifier id (the identifier set being ID) is activated/deactivated (op) at a time t . 2. F = Fdom ∪ Fract is a finite set of fluents describing the: • Domain Fdom . • Active rules Fract = {active(id) | id ∈ ID} identified as id. 3. X is the set of all contexts ϕ expressible in the following grammar for fluents f ∈ F : ϕ ::= > | f | ¬ϕ | ϕ ∧ ϕ | ϕ ∨ ϕ | ϕ → ϕ | P | PrS(ϕ) | PaS(ϕ) | PrV(φ) | PaV(φ) φ ::= ϕ | NS(ϕ) Each expression’s informal meaning is the usual for propositional logic symbols. The operators bear truth in the following cases: (a) P if the context is retroactive (i.e. the state in which P operates on is at a time before the version to which it belongs becomes the current version), and (b) if ϕ is true in: the previous state (PrS(ϕ)), all past states (PaS(ϕ)), the same state in the previous version (PrV(ϕ)), the same state in all past versions (PaV(ϕ)), and the next state (NS(ϕ)).The next state operator is restricted to past versions, meaning rules are never conditional on the actual future. 4. G : X ×2E → 2Einst – is the event generation function where G (X , E ) is an event set caused by the events that occur (E ) when the context X holds. 5. C : X × E → 2Fdom × 2Fdom is the state consequence function where for a context X ∈ X and an event e ∈ E the consequence function’s result is notated C (X , e) = 〈C ↑ (X , e), C ↓ (X , e)〉 s.t. the initiated fluent set is C ↑ (X , e) and the terminated fluent set is C ↓ (X , e) 6. ∆ ⊆ F is the initial institution state For example, the following rule states that if Ada is found guilty (g(ada)) then she becomes a criminal (crim(ada)). That is, the fluent crim(ada) is initiated by the event of being found guilty according to the consequence function (C ↑ ). C ↑ (>, g(ada)) 3 crim(ada) 140 6. F ORMALISING I NSTITUTIONAL E NACTMENT VALIDITY A government rule change (gmod(act, id, t))) that does not retroactively criminalise people counts–as a legal rule change. The condition is in all past retroactive states someone is not a criminal (crim(ada)) if in the previous version (prior to rule change) they were not. G (PaS(P → PrV(¬crim(ada)) → ¬crim(ada))), {gmod(act, id, t)}) 3 act(id, t) In order to reason about modifying specific institutional rules, we tie rule identifiers to the institutional rules they represent. Specifically we map the inputs and single outputs of G and C to identifiers (i.e. not the whole set of events or initiated/terminated fluents). Definition 35. Rule Identifier Function A rule identifier function for an event generation function G : X × 2E → 2Einst is ridG : X × 2E × Einst → ID. The rule identifier functions ↑ for a consequence function C : X × E → 2Fdom × 2Fdom are ridC : X × E × Fdom → ID and ↓ ridC : X × E × Fdom → ID. So, the previous rule criminalising Ada has the ID crim0 = rid↑ (>, g(ada), crim(ada)). Examples/case studies omit this function. 6.3. S EMANTICS This section defines institution semantics, following InstAL’s method using just sets and functions, with the following considerations. Observable events cause an institution rule version to transition from state to state by generating transitioning events according to the event generation function G and initiating and terminating fluents according to the consequence function C . An institution transitions from one version of rules to another when rule modifying events are generated by the event generation function G . An institutional interpretation represents this dual evolution as a tuple M = 〈R,V 〉 where: 1. V = 〈V0 , ...,V j 〉 is a tuple of versions each comprising a state and event set sequence up to length k with typical element Vv = 〈S v , E v 〉. The state sequence for v is S v = 〈S v:0 , ..., S v:k+1 〉 with typical element S v:i ∈ Σ and the event set sequence (the events transitioning between states) is E v = 〈E v:0 , ..., E v:k 〉 with typical element E v:i ⊆ E . States denoted S v:i and event sets E v:t are denoted with the version v to which they belong and their time instant i . 2. R : [0, k] → [0, j ] is a function stating which institution version is the current version for a given time. R also represents when rule change events occurring in a version can change that version’s rules. Rule modification events only change version rules if the institution has not already evolved to a later version. For example, if on Monday a rule is added, then the institution evolves to a new current version where that rule is actually added on Monday. When the version evolves, previous versions become obsolete from then onwards (e.g. Monday) meaning their rules are not changeable. If R(i ) ≤ v then an event occurring in version v at time i can modify rules in v since the version is not yet obsolete. The semantics are defined with respect to the interpretation M = 〈R,V 〉, an institution I = 〈E , F , C , G , ∆〉, the set of all institutional interpretations I, and an observable event set trace et = 〈O 0 , ...,O k 〉 with typical element O i ⊆ Eobs . 6.3. S EMANTICS 141 6.3.1. I NSTITUTIONAL C HANGE Counts–as rules, causing institution state and version change, are conditional on a context being modelled by the state in an interpretation. Definition 36. Modelling Context For all X ∈ X and f ∈ F , context models 〈M , S v:t 〉 |= X is defined for >, ∨ and → w.r.t. ¬ and ∧ as usual and for the other symbols as: 〈M , S v:t 〉 |= f ⇔ f ∈ S v:t (36.1) 〈M , S v:t 〉 |= ¬ψ ⇔ 〈M , S v:t 〉 6|= ψ (36.2) 〈M , S v:t 〉 |= ψ ∧ φ ⇔ 〈M , S v:t 〉 |= ψ and 〈M , S v:t 〉 |= φ (36.3) 〈M , S v:t 〉 |= P ⇔ R(t ) < v (36.4) 〈M , S v:t 〉 |= PrS(ψ) ⇔ 〈M , S v:t −1 〉 |= ψ (36.6) 0 〈M , S v:t 〉 |= PaS(ψ) ⇔ ∀t ∈ [0, t − 1] : 〈M , S v:t −1 〉 |= ψ (36.7) 〈M , S v:t 〉 |= PrV(ψ) ⇔ 〈M , S v−1:t 〉 |= ψ (36.8) 0 〈M , S v:t 〉 |= PaV(ψ) ⇔ ∀v ∈ [0, v − 1] : 〈M , S v 0 −1:t 〉 |= ψ 〈M , S v:t 〉 |= NS(ψ) ⇔ 〈M , S v:t +1 〉 |= ψ (36.9) (36.10) Semantics are as usual for modelling a fluent (36.1), weak negation (36.2) and conjunction (36.3). A state is retroactive if at that time the version is not the current version but it will be in the future (36.4) – for example, if on a Wednesday the institution evolves to a new version, then anything occurring on the Monday is retroactive to the new version (i.e. occurring in the version’s past). States model formula as expected for a previous state (36.6), all previous states (36.7), the previous version (36.8), all past versions (36.9) and the next state (36.10). An event ‘B’ occurs when transitioning to a new state in a version according to a rule – “A counts–as B in context C” (G ) – if an event ‘A’ occurs, the context ‘C’ is modelled by the state and the counts–as rule itself is active in the version’s state. Events occurring in response to observable events E are formalised as an event generation operation. Definition 37. Event Generation Operation The event generation operation GR : Σ × 2E × I → 2E is defined such that GR(S v:t , E , M ) = E 0 iff E 0 only satisfies the following conditions: E ⊆ E0 (37.1) 0 G 0 ∃X ∈ X , e ⊆ E , e ∈ G (X , e) ∩ Einst : id = rid (X , e, e ), 〈M , S v:t 〉 |= X ∧ active(id) ⇒ e 0 ∈ E 0 0 (37.2) G 0 ∃X ∈ X , e ⊆ E , e ∈ G (X , e) ∩ Emod : id = rid (X , e, e ), 〈M , S v:t 〉 |= X ∧ active(id), R(t ) 6= v ⇒ e 0 ∈ E 0 0 G (37.3) 0 ∃X ∈ X , e ⊆ E , e ∈ G (X , e) ∩ Emod : id = rid (X , e, e ), 〈M , S v:t 〉 |= X ∧ active(id), R(t ) = v ⇒ (e 0 ∈ E 0 or e 0 6∈ E 0 ) (37.4) Any fixed point reached after iterative applications of GR is denoted as GRω (S v:t , E , M ). 142 6. F ORMALISING I NSTITUTIONAL E NACTMENT VALIDITY Events that have occurred still occur (37.1). If an active rule states an event e causes an event e 0 in a context modelled by the state, then e can cause e 0 to occur depending on e 0 ’s type. Specifically, whether e 0 is a type that could cause an inconsistency (e.g. removing rules that ascribe rule modifications, for more on the paradox of rule change see [220]). An event e 0 always occurs if it is a non–rule–modifying institutional event (37.2) or occurs when the version is obsolete and it cannot modify rules (37.3). Rule modifying events in non–obsolete versions can cause rule changes and a potential paradox. So they optionally occur in a non–obsolete version where they can cause rule change and/or a paradox (37.4). Hence, GR is multi–valued. Iterating the event generation operation until a fixed point is reached obtains all events which occur. At least one fixed point is guaranteed. Lemma 4. For any set of events E ⊆ E , interpretation M and state S v:t ∈ Σ there exists a fixed point GRω (S v:t , E , M ). Proof. GR always has a monotonically increasing value (w.r.t. set inclusion) and a finite domain. An institution version transitions between states, driven by event occurrences, according to a state transition operation. Definition 38. State Transition Operation The state transition operation TR : Σ × 2E × I → 2E is defined for a state S v:t , a set of events E v:t and an interpretation M as: TR(S v:t , E v:t , M ) = { f | f ∈ S v:t ∩ TERM(S v:t , E v:t , M ) or f ∈ INIT(S v:t , E v:t , M )} (38.1) (38.2) where: INIT(S v:t , E v:t , M ) = ↑ { f |∃e ∈ E v:t , X ∈ X : id = ridC (X , e, f ), f ∈ C ↑ (X , e) ∩ Fdom , 〈M , S v:t 〉 |= X ∧ active(id) or (38.3) C↑ ∃t 0 ∈ [0, k], Øt 00 ∈ [t 0 , k] : id = rid (X , e, f ), R(t 0 ) ≤ v, R(t 00 ) ≤ v, mod(act, id, t) ∈ E v:t 0 , mod(deact, id, t) ∈ E v:t 00 , f = active(id)} (38.4) TERM(S v:t , E v:t , M ) = ↓ { f |∃e ∈ E v:t , X ∈ X : id = ridC (X , e, f ), f ∈ C ↓ (X , e) ∩ Fdom , 〈M , S v:t 〉 |= X ∧ active(id) or (38.5) C↓ ∃t 0 ∈ [0, k], Øt 00 ∈ [t 0 , k] : id = rid (X , e, f ) R(t 0 ) ≤ v, R(t 00 ) ≤ v, mod(deact, id, t) ∈ E v:t 0 , mod(act, id, t) ∈ E v:t 00 , f = active(id)} (38.6) 6.3. S EMANTICS 143 Transitioning from one state to the next follows common–sense inertia – a fluent holds in a new state if it held in the previous state and was not terminated (38.1) or it was initiated in the previous state (38.2). A domain fluent is initiated/terminated if an event causes it to be according to a rule defined by the state consequence function C that is active in the current state with a condition (context) that is modelled in the state (38.3 for initiation and 38.5 for termination). A fluent denoting an active rule is initiated/terminated in a state if a rule activating/deactivating event occurs at a time when the version is not obsolete and no contradictory deactivation/activation event occurs at a later time when the version is not obsolete (38.4 for activating rules and 38.6 for deactivating rules). The most recent modifications in a version take precedent if they occur when the version is a non–obsolete version and simultaneous contradictory rule modifications are cancelled. 6.3.2. M ODELS Now we define when an interpretation is an institutional model for an observable event set trace. An institutional interpretation is, broadly speaking, an institutional model for an observable event set trace iff: 1. each version evolves according to the event generation and state transition operations, and 2. the institution evolves from one version to another when rules are modified. However, the event generation operation is multi–valued since rule modifications are optional. Thus, there are potentially multiple candidate event sets for transitioning between states and therefore multiple interpretations to select as models. We want to maximise the rule modification events that are not self–contradicting (e.g. not applying modifications that retroactively remove a rule making retroactive rule removal possible). Interpretations are prioritised, denoted as <, based on maximising rule modifications. An interpretation has higher priority over another if at the earliest time in the earliest version in which the interpretation differ it contains a superset of rule modifying events compared to the ‘same’ set for the lower priority interpretation. Definition 39. Prioritised Interpretation Let M 0 = 〈R 0 ,V 0 〉 ∈ I and M 1 = 〈R 1 ,V 1 〉 ∈ I be two interpretations for institution I where: V 0 = 〈V00 , ...,Vi0 〉 with typical element Vv0 = 0 0 〈E v0 , S 0v 〉 s.t. E v0 = 〈E v:0 , ..., E v:k 〉, and V 1 = 〈V01 , ...,V j1 〉 with typical element Vv1 = 〈E v1 , S 1v 〉 1 1 s.t. E v1 = 〈E v:0 , ..., E v:k 〉. The ordering < is a relation between interpretations M 0 and M 1 such that: M0 < M1 ⇔ ∃t ∈ [0, k], Øt 0 ∈ [0, t -1] : 1 0 ∩ Emod ⊃ E v:t ∩ Emod v = R 0 (t ), E v:t v 0 = R 0 (t 0 ), E v00 :t 0 6= E v10 :t 0 We operationally characterise a model by constructing a ‘correct’ interpretation. That is, constructing versions comprising correct state transitions and generated events. We could construct each institution version by starting at an initial state and proceeding from one state to the next according to the event generation and state transition operations. However, this would require knowing which rule modification events happen in each version’s past, present and future. To give an example for an observable event set trace 〈O 0 , ...,O k 〉. An institution starts at an initial state only comprising an active rule enabling a government to make retroactive 144 6. F ORMALISING I NSTITUTIONAL E NACTMENT VALIDITY modifications (∆ = S 0:0 = {active(gov0)}). First, a fence is observably built (O 0 = {fb}, occurring during the first state transition fb ∈ E 0:0 = GRω (S 0:0 ,O 0 , M )). But, there is no active rule that causes the next state to be different (S 0:1 = TR(S 0:0 , E 0:0 ) = S 0:0 = {active(gov0)}). Then, the government votes to retroactively activate a rule in state zero, stating building a fence initiates an obligation to paint it. Consequently, the second state which has already been determined, S 0:1 , seems wrong since it lacks the fence painting rule and its effects. In fact, the institution should transition to a new rule version V1 . This new version should start at the same initial state S 1:0 = ∆. But, crucially, transition to the next state (S 1:0 = TR(S 1:0 , E 1:0 )) with the knowledge that in the future of the new version the fence painting rule will be retroactively added at state zero (S 1:0 ) and become active in the second state (S 1:1 ). State transitions are defined with respect to an interpretation comprising past/present/future rule modification events which might be unknown when each state and transitioning event set is constructed. We define an interpretation successor operation which addresses the problem of constructing a ‘correct’ interpretation without the knowledge of each version’s past/present/future. The successor operation takes as input a preceding interpretation which supplies versions comprising a past/present/future on which each version in the new succeeding interpretation can be constructed according to TR and GR. That is, a new interpretation is produced using the version timelines of the previous interpretation, taking into account past/present/future rule modifications from the preceding interpretation’s version timelines. A succeeding interpretation might not be the same as the previous interpretation, since the previous interpretation might have been built without knowledge of its own past/present/future. That is, the new interpretation might differ in its temporal evolution (comparable version timelines in each interpretation being different). Consequently, the succeeding interpretation might have new, previously unknown, rule modification events that also need to be accounted for and thus another succeeding interpretation must be produced. The idea is to iteratively apply the institution successor operation until a succeeding interpretation is produced that is the same as the previous interpretation. That is, until the operation reaches a fixed point, which is guaranteed according to lemma 6 we give later on. Intuitively, the fixed point characterises an interpretation that is built taking into account its own past/present/future modifications in each version (since it was built with respect to an identical preceding interpretation). Formally, the successor interpretation operation is: Definition 40. Successor Interpretation Operation Let et = 〈O 0 , ...,O k 〉 be an observable event trace for I of length k . Let M 0 = 〈R 0 ,V 0 〉 ∈ I be an interpretation such that V 0 = 〈V00 , ...,V j00 〉 is a tuple of institution versions. The interpretation successor operation SUCC : I × ET → I is defined for the interpretation M w.r.t. I and et such that SUCC(M , et) = M 0 iff M 0 satisfies the following conditions: ∀v ∈ [0, j 0 ] : S 0v:0 = ∆ (40.1) 0 ∀v ∈ [0, j 0 ], t ∈ [0, k] : E v:t = GRω (S 0v:t ,O t , M ) 0 ∀v ∈ [0, j ], t ∈ [0, k] : S 0v:t +1 0 = TR(S 0v:t , E v:t ,M) (40.2) (40.3) 6.3. S EMANTICS 145   0,    1, R 0 (t ) = R 0 (t -1),     R 0 (t -1)+1, 0 t = 0, E 0:t ∩ Emod = ; 0 t = 0, E 0:t ∩ Emod 6= ; 0 0 t > 0, E R(t -1):t ∩ Emod = ; 0 0 t > 0, E R(t -1):t ∩ Emod 6= ; Given that V 0 = 〈V00 , ...,V j00 〉, R 0 (k) = j 0 (40.4) (40.5) Every institution version starts at the same initial state (40.1). Each state transition (an event set) in a version is produced by the event generation operation applied to the previous state and the observable events occurring at that time (40.2). The next state in a version is the state produced by the state transition operation applied to the previous state and the transitioning events occurring in that version with respect to the preceding institutional interpretation (40.3). That is, transitioning from one state to the next takes into account the rule modification events occurring in the past/present/future of the same version in the preceding interpretation. Rule modifications in the latest version cause the current version to evolve/increment to the next version. If no rule modification takes place the version remains the same or the zeroeth version for the zeroeth time instant (40.4). If a rule modification does take place in the latest version, then the current version at that time incremented by one, or is the first version for the zeroeth time point (40.4). The version sequence only goes up until the current version at the last time instant (40.5). At least one fixed point for the successor interpretation operation, starting at any initial interpretation, is always guaranteed. A fixed point is denoted as SUCCω (M , et ). To see why, the general idea is that there always exists a series of successive interpretations that monotonically increase which versions and states they agree on. The following lemma is used to prove that there always exists a series of such interpretations and therefore that there always exists a fixed point. Informally, the lemma is conditional on there being two successors M 0 and M 00 to any interpretation that agree with each other up until a particular time (h ) in a version ( j ). The consequence is that the second interpretation M 00 has the same events at time h and state transition at time h + 1 in version j as if the event and state transitions were produced with respect to M 00 ’s own past/present/future timeline. Lemma 5. If I is an institution, M an interpretation and et an observable event trace of length k for I and there exists interpretations M 0 = SUCC(M, et) and M 00 = SUCC(M 0 , et) where ∃h ∈ [0, k], j ∈ [0, v 0 ], ∀i ∈ [0, k] : 〈V00 , ...,V j0−1 〉 = 〈V000 , ...,V j00−1 〉 (A5.1) 〈S 0j :0 , ..., S 0j :h 〉 = 〈S 00j :0 , ..., S 00j :h 〉 mod(op, id, 0 R (i ) ≤ j 0 h) ∈ E v:i , mod(op, id, ⇔ (A5.2) h) ∈ E 00j :i , R 00 (i ) ≤ j (A5.3) then E 00j :h = GRω (S 00j :h ,O h , M 00 ) and S 00j :h+1 = TR(S 00j :h , E 00j :h , M 00 ) The previous lemma’s assumptions can always be met starting from any interpretation M . Firstly, since in the worst case, from any interpretation we can obtain a successor start- ing at the institution’s initial state – so both successors agree at least on the initial state. 146 6. F ORMALISING I NSTITUTIONAL E NACTMENT VALIDITY Secondly, by making the non–deterministic choice in the event generation operation to select the same rule modifications for both the successor and the successor to the successor (in the worst case, no rule modifications). We can continue to incrementally produce successive interpretations that monotonically increase the time point they agreed upon. Note that, this may mean backtracking by changing preceding interpretations (e.g. selecting no rule modifications). Lemma 6. There exists a fixed point for the interpretation successor operation denoted SUCCω (M , et ) for any M and et. In fact, there can be multiple fixed points, as exemplified: Example 1. An institution I contains a legislative rule with the id leg0 ∈ ID stating that an agent, Ada, voting to activate a rule (votea (act, id, t) ∈ Eobs ) counts–as activating the rule: G (>, {votea (act, id, t)}) 3 mod(act, id, t). In the initial state the legislative rule is active ∆ = {active(leg0)}. In an observable event trace et = 〈O 0 〉 Ada votes to activate another rule with the id leg1 ∈ ID in the initial state O 0 = {votea (act, leg1, 0)}. From an initial empty interpretation M we have the following successors and interpretations for example 1(differences are in bold): M 2 = SUCC(M, et) = SUCCω (M, et) s.t. V 2 = 〈V02 〉, R 2 (0) = 0, R 2 (1) = 0, 2 2 2 S 0:0 = {active(leg0)}, S 0:1 = {active(leg0)}, E 0:0 = {votea (act, leg1, 0)} M 1 = SUCC(M, et) = SUCCω (M, et) s.t. V 1 = 〈V01 ,V11 〉, R 1 (0) = 1, R 1 (1) = 1, 1 1 S 0:0 = {active(leg0)}, S 0:1 = {active(leg0)}, 1 E 0:0 = {votea (act, leg1, 0), mod(act, leg1 , 0)} 1 1 1 S 1:0 = {active(leg0)}, S 1:1 = {active(leg0)}, E 1:0 = {votea (act, leg1, 0)} M 0 = SUCC(M, et) = SUCCω (M, et) s.t. V 0 = 〈V00 ,V10 〉, R 0 (0) = 1, R 0 (1) = 1, 0 0 S 0:0 = {active(leg0)}, S 0:1 = {active(leg0)}, 0 E 0:0 = {votea (act, leg1, 0), mod(act, leg1 , 0)} 0 0 S 1:0 = {active(leg0)}, S 1:1 = {active(leg0), active(leg1)}, 0 E 1:0 = {votea (act, leg1, 0), mod(act, leg1 , 0)} Each fixed point has different rule modifications. M 2 does not add the rule leg1. M 1 contains an attempt to add the rule in the version zero but not in version one. Finally, M 0 adds the rule in the version zero and version one, version one being the current version when the rule is added meaning the rule addition is successful. In fact, the following prioritisation holds M 0 < M 1 < M 2 meaning that M 0 maximises successful rule modifications. Models are interpretations which maximise successful rule modifications. Thus we characterise models by combining the successor interpretation fixed point and interpretation prioritisation. Given an empty interpretation we find a fixed point successor interpretation for a given event set trace (41.1). The fixed point is a model if there is no greater prioritised successor fixed point interpretation (41.2). Definition 41. Models Let M = 〈R,V 〉 be an empty interpretation such that V = 〈V0 〉, V0 = 〈E 0 , S 0 〉, E 0 = 〈〉 and S 0 = 〈〉. The interpretation M 0 = 〈R 0 ,V 0 〉 is a model for I w.r.t. an 6.4. C ASE S TUDIES 147 observable event set trace et = 〈O 0 , ...,O k 〉 iff: M 0 = SUCCω (M , et) and (41.1) 00 0 There does not exist an M < M meeting 41.1. (41.2) From lemma 6 and definition 41 we have the following property. Lemma 7. There exists at least one model for any institution I w.r.t. an observable event set trace et. These semantics operationalise answering “when does a rule change count–as a legal rule change?”. Generally, a physical or institutional actions counts–as the social action of a legal rule change if and only if the rule change is ascribed by secondary legal counts–as rules conditional on a social context, which can include hypothetical rule change effects, that holds before and after the rule change takes place. Models always contain ‘legal’ rule modifications, defined as fixed point interpretations which maximise rule modifications. So, ‘legal’ rule–changes occur in at least one model whilst illegal rule changes do not occur at all (the non–deterministic choice for a rule modification to occur in 37.4) and the institution continues to operate ‘as usual’, meeting our desiderata. 6.4. C ASE S TUDIES Now we apply the framework to concrete case studies. For brevity we use variables to denote: all rule identifiers (id ∈ ID), all rule change operations (op ∈ {act, deact}), and all time instants (t ∈ N). The first case concerns a simple rule change procedure. Case 6.4.1. An institution I sgov describes a simple government comprising two agents, Ada and Bertrand. Both Ada and Bertrand voting to activate or deactivate a rule in sgov the context that neither are criminals (crim(ada), crim(bert) ∈ Fdom ) counts–as activating/deactivating the rule. The rule modifying counts–as rules are identified with leg0 ∈ ID and formalised as G sgov (¬crim(ada) ∧ ¬crim(bert), {votea (op, id, t), voteb (op, id, t)}) 3 mod(act, id, t). At time point one Ada and Bertrand vote to add a rule with id crim0, O 1 = {votea (act, crim0, 1), voteb (act, crim0, 1)}. The rule identified as crim0 states that sgov if Ada or Bertrand are found guilty of a crime (g(ada), g(bert) ∈ Eobs ) then they become criminals, formally – C ↑ (>, g(ada)) 3 crim(ada) and C sgov↑ (>, g(bert)) 3 crim(bert). Next, Bertrand is found guilty of a crime O 2 = {g(bert)}. Finally, Bertrand and Ada vote to deactivate the criminalising rule, O 3 = {votea (act, crim0, 3), voteb (act, crim0, 3)}. For clarity, models are represented graphically. The model for case 6.4.1 is shown in Figure 6.1. Lines represent when domain and active rule fluents hold. We distinguish between whether a fluent holds in a state S v:t : 1. retroactively in the version’s past and not in the previous version, (i.e. R(t ) < v and 〈M , S v−1:t 〉 6|= f ), 2. when the version is the current version, ) (i.e. R(t ) = v ), and 3. when the version is obsolete, (i.e. R(t ) > v ). Time instants are marked if they have successful or non–successful rule modification events in versions where modifications can have an effect (i.e. non–obsolete versions): 1. denoting that all the rule modification events occurring in the previous version occur again (i.e. E v:t ∩ Emod = E v−1:t ∩ Emod ). Meaning, the conditions (contexts) 148 6. F ORMALISING I NSTITUTIONAL E NACTMENT VALIDITY for the rule modifying events to be ascribed are consistent with the version and therefore with applying the rule modifications (the non–deterministic choice to include a rule denoting that at least one modification in E v:t according to 37.4 is always made) 2. rule modification event which occurred in the previous version does not occur again (i.e. E v:t ∩ Emod 6= E v−1:t ∩ Emod ). Meaning, the conditions (contexts) for rule modifying events to be ascribed are inconsistent with the version they occur in and therefore with applying the rule modifications (a non–deterministic choice according to 37.4 to not include a rule modification is made when building E v:t ). Figure 6.1 shows case 6.4.1’s model. Throughout version zero the legislative rule (leg0) is active, stating Ada and Bertrand voting to add a rule counts–as adding a rule. When at time instant one Ada and Bertrand vote to add a new rule (crim0), stating people found guilty become criminals, the model succeeds to version one where the new rule is successfully added. At time instant three Bertrand becomes a criminal. When they vote again to modify a rule it is unsuccessful, since rule change is conditional on neither being criminals. Adding a criminalising rule altered the built social reality in version one’s future, changing what could be ascribed as a legal rule modification. Fluent Version crim(bert) active(crim0) active(leg0) 1 active(leg0) 0 0 1 2 3 4 Time Figure 6.1: Model for case 6.4.1 with two institution versions. The next case presents an institution I uk representing the UK’s legislation rules. The cases are based on past changes to a court decision on UK tax laws ([1]), and past changes to tax laws ([192]). The UK government can unconditionally enact any rules effective at any time. Observable events where the government activates/deactivates a rule (gmod(op, id, t)) count–as modifying the rule (mod(op, id, t). Legislative rules identified as leg0 ∈ ID cause rule activations G uk (>, {gmod(act, id, t)}) 3 mod(act, id, t) and legislative rules identified as leg1 ∈ ID cause rule deactivations G uk (>, {gmod(deact, id, t)}) 3 mod(deact, id, t). A model M uk = 〈R uk ,V uk 〉 is produced for an observable event trace et = 〈O 0 ,O 1 ,O 2 ,O 3 ,O 4 〉 for I uk . The model comprises four versions V uk = 〈V0uk ,V1uk ,V2uk ,V3uk 〉. We begin the case: Case 6.4.2. A rule states that any UK resident (e.g. person a resides in the UK –r(a, uk)) in a business partnership in the UK (p(a, uk)) or elsewhere such as Jersey (p(a, jers)) in the first tax year month is obliged to pay tax (oblt). We have for all locations L ∈ {uk, jers} a tax rule C uk↑ (r(a, uk) ∧ p(a, L), mon1) 3 oblt identified as tax0 ∈ ID. Initially the legislative rules leg0 and leg1, and the tax rule tax0 are active (∆uk = {active(leg0), active(leg1), active(tax0)}). At time point one it is the first tax year month (O 1 = {mon1}). Following a court challenge ([1]) the government retroactively replaces the tax rule with id tax0 with a new rule with id tax1 (O 2 = {gmod(deact, tax0, 0), gmod(act, tax1, 0)}). The new rule, tax1, states that only people in a UK business partnership are obliged to pay tax – C uk↑ (r(a, uk) ∧ 6.4. C ASE S TUDIES 149 p(a, uk), mon1) 3 oblt. Rule/ Fluent Version leg2 leg3 tax0 oblt leg0 leg1 EUUK 3 UK 3 tax2 oblt leg0 leg1 UK and EUUK 2 tax1 leg0 leg1 UK and EUUK 1 tax0 oblt leg0 leg1 UK and EUUK 0 0 1 2 3 4 5 6 Time Figure 6.2: Model for case 6.4.2 with four institution versions for the institution I uk (denoted UK) and a model for case 6.4.3 with four versions for the institution I euuk (denote EUUK). Institutions I uk and I euuk have identical versions 0 to 2. Not shown, in all states person ‘a’ is in a Jersey–based business partnership (p(a,jersey)) and is a UK resident (r(a,uk)). In Figure 6.2 version zero (V0uk ) obliges person ‘a’ to pay tax in state two. In state uk ) the current institution version changes when the rule obliging UK residents to two (S 0:2 pay tax (tax0) is replaced with the rule obliging UK business partners to pay tax (tax0) uk ) to version one (V uk s.t. R uk (2) = 1). Due to this change, the (act(t1,0), deact(t0,0) ∈ E 0:2 1 uk uk ) since person a version one (V1 ), does not oblige tax to be paid in its third state (S 1:2 resides in the UK but is in a Jersey–based business partnership. Case 6.4.2 (continued). The government partially reverses the tax change at time point three. This is by retroactively replacing the rule obliging people in a UK business partnership to pay tax (tax1) with a new rule identified as tax2 (O 3 = {gmod(deact, tax1, 0), gmod(act, tax2, 0)}). The new rule obliges UK residents in a business partnership to pay tax if it does not criminalise them retroactively (i.e. in a retroactive state an obligation to pay tax is initiated conditional on the obligation holding in the next state of the previous version). For all locations L ∈ {uk, jersey} the rule is C uk↑ ((r(a, uk) ∧ p(a, L)) → (P) → PrV(NS(oblt))), mon1) 3 oblt. Next, it is the first tax year month again (O 4 = {mon1}). In Figure 6.2 version two (V2uk ), like version zero, does not oblige ‘a’ to pay tax in the past. But, it does oblige them to pay tax after the second time the first tax year month occurs uk ). (mon1 ∈ E 2:4 Case 6.4.2 (continued). The UK government decides to reverse the previous judgements going back to the original rule set (O 5 = {gmod(deact, tax2, 0), gmod(act, tax0, 0)}). 150 6. F ORMALISING I NSTITUTIONAL E NACTMENT VALIDITY In Figure 6.2, version three (V3uk ) reverts to the original legislation. Thus we have the same situation as if the legislation in version zero had not been modified. That is, an uk ). obligation to pay tax after the first occurrence of the first tax year month (mon1 ∈ E 3:1 euuk The next case is a variation on the previous describing an institution I , incorporating EU human rights law. Case 6.4.3. The European Convention on Human Rights [48, Art. 7] (ECHR) blocks retroactive legislative modifications that criminalise formerly innocent people. The institution I euuk contains the same rules as I uk with the same identifiers minus the legislative rules leg0 and leg1. Instead, legislative rules state that observable rule modifications count–as rule modifications conditional on the changes not retroactively criminalising people. In all states where rules are being applied retroactively, if there is not an obligation to pay tax in the previous version then there must not be an obligation to pay tax in the current version. We have rules with the identifier l2: G euuk (PaS(P → PrV(¬oblt) → ¬oblt)), {gmod(act, id, t)}) 3 act(id, t), and rules with the identifier l3: G euuk (PaS(P → PrV(¬oblt) → ¬oblt)), {gmod(deact, id, t)}) 3 deact(id, t). Initially, person ‘a’ is in a Jersey based business partnership (p(a,jersey)) and is a UK resident (r(a,uk)), and the first tax rule and the legislative rules conditional on being non retroactively criminalising are active such that ∆euuk = {p(a,uk), r(a,uk), tax0, l2, l3}. The same events occur as in case 6.4.2, et = 〈;, {mon1}, {gmod(deact, t0, 0), gmod(act, t1, 0)}, {gmod(deact, t1, 0), gmod(act, t2, 0)}, {mon1}, {gmod(deact, t2, 0), gmod(act, t0, 0)}〉. Figure 6.2 shows a model M euuk for I euuk . The first three versions are identical to our previous case 6.4.2 (where the UK’s legislature was not constrained by EU rules blocking retroactively criminalising modifications), since the first two rule modifications do not criminalise people retroactively. Unlike in our previous case 6.4.2, the version two contains no tax rules. The reason being that tax rule two – “obliging uk residents in a business partnership to pay tax but on the condition that if it is retroactive then those people were obliged to pay tax in the previous version”, is deactivated since its deactivation does not criminalise retroactively. On the other hand, tax rule zero – “any UK resident in a business partnership in the first tax year month is obliged to pay tax” (C uk↑ (r(a, uk) ∧ p(a, L), mon1) 3 oblt) is not reactivated, even though it was reactivated in our previous case 6.4.2. Its reactivation would retroactively criminalise people if activated in version three, meaning its activation does not occur since legislative rule – l2: G euuk (PaS(P → PrV(¬oblt) → ¬oblt)), {gmod(act, id, t)}) 3 act(id, t) – has a condition that is not met. The next cases look at modifying legislative rules themselves. Case 6.4.4. An institution I p describes a parliament that can retroactively modify rules through a majority vote pvote(act, id, t) ∈ Eobs . The legislative rules are identified the id parl0 ∈ ID for activating rules G p (>, {pvote(act, id, t)}) 3 mod(act, id, t) and with the id parl1 ∈ ID for deactivating rules G p (>, {pvote(deact, id, t)}) 3 mod(deact, id, t). In the initial state all rules are active such that active(id) ∈ ∆. In an observable event set trace tr = 〈O 0 ,O 1 〉 at time point one the parliament votes to retroactively remove the rule which ascribes retroactive modifications (O 1 = {pvote(deact, parl1, 0)}. Vp Depicted in Figure 6.3 a single model M p = 〈R p ,V p 〉 comprises two institution versions p p = 〈V0 ,V1 〉. An event occurs in version zero at time instant one, where the parliament 6.4. C ASE S TUDIES 151 votes to retroactively modify a rule and the corresponding rule modification event occurs p (E 0:1 = {pvote(deact, parl1, 0), mod(deact, parl1, 0)}). Consequently the institution transitions to version one (R p (1) = 1). Importantly, in version one, the same rule modifying event does not occur. The reason being, if the modification event did occur then the rule parl1 ascribing the modification event – G p (>, {pvote(deact, id, t)}) 3 mod(deact, id, t) – would be p inactive in version one state one S 1:1 , and the deactivation could not occur in the first place (contradiction). This exemplifies how the formalism always guarantees a model, paradoxical rule modifications do not occur if they make the rule modifying event impossible in the first place. Fluent Version active(parl0) active(parl1) 1 active(parl0) active(parl1) 0 0 1 Time 2 Figure 6.3: Model for case 6.4.4 The next case extends the previous case 6.4.4: Case 6.4.5. This case describes an institution I mp where a monarch and a parliament can retroactively modify rules, including all the rules from the previous case’s institution mp I p . Additionally, a rule identified as fence0 ∈ ID states that if a fence is built fb ∈ Eobs it mp mp ↑ is obliged the fence is painted white oblpf ∈ Finst – C (>, fb) 3 oblpf. A rule identified mp as mon0 states the monarch issuing a rule change decree mdecree(act, id, t) ∈ Eobs to acmp tivate a rule counts–as activating the rule – G (>, {mdecree(act, id, t)}) 3 mod(act, id, t). A rule identified as mon1 state the monarch issuing a decree to deactivate a rule counts– as deactivating the rule G mp (>, {mdecree(deact, id, t)}) 3 mod(deact, id, t). All legislative rules are initially active, but the fence painting rule is not (s.t. active(fence0) 6∈ ∆mp ). At time point one the parliament votes for the fence–painting obligation rule to be activated, (O 1 = {pvote(act, fence0, 1)}), a fence is built (O 2 = {fb}), the monarch issues by decree the fence–building rule to be retroactively deactivated at the time it was activated, cancelling its activation (O 3 = {mdecree(deact, fence0, 1)}). Finally, the parliament votes to retroactively dis–enable the monarch from deactivating rules (O 4 = {pvote(deact, mon1, 0)}). Depicted in Figure 6.4 the model M mp = 〈R mp ,V mp 〉 comprises four versions V mp = mp mp mp 〈V0 ,V1 ,V2 ,V3 〉. At version zero time instant zero the parliament votes to add the mp rule obliging built fences to be painted white, causing a rule modification event (E 0:1 = {pvote(act, fence0, 1), mod(act, fence0, 1)}) and the institution to transition to the version one (R mp (1) = 1) where the same modification occurs mp (E 1:1 = {pvote(act, fence0, 1), mod(act, fence0, 1)}). In the version one time instant two mp mp building a fence (fb ∈ E 1:2 ) causes an obligation to paint the fence oblpf ∈ S 1:3 . At time instant three the monarch retroactively deactivates the fence painting rule mp (mdecree(deact, fence0, 1) ∈ E 1:3 ) causing the institution to transition to the version two mp 152 6. F ORMALISING I NSTITUTIONAL E NACTMENT VALIDITY (R mp (3) = 2) where the modification takes effect (mdecree(deact, fence0, 1) ∈ E mp ). Consequently, the fence painting obligation rule is deactivated and its effects (an obligation) no longer hold. When the parliament retroactively removes the ability for the monarch to deactivate rules the institution transitions to the final version three (R mp (4) = 3) where the parliament’s retroactive rule removal takes effect mp (pvote(deact, mon1, 0), mod(deact, mon1, 0) ∈ E 3:4 ) causing the monarch’s modifications to be unravelled (note that at the final version’s third time instant the monarch’s rule modification is unsuccessful even though it was successful in the previous version). Consequently, the fence painting obligation rule and its effects (an obligation) is reinstated by retroactively removing the ability to deactivate the fence painting rule. Fluent Version active(parl0) active(parl1) active(mon0) active(mon1) active(fence0) oblf 3 active(parl0) active(parl1) active(mon0) active(mon1) 2 active(parl0) active(parl1) active(mon0) active(mon1) active(fence0) oblf 1 active(parl0) active(parl1) active(mon0) active(mon1) 0 0 1 2 3 4 5 Time Figure 6.4: Model for case 6.4.5 with four institution versions. 6.4.1. R ELATED W ORK In this chapter we contributed a framework for reasoning about the legality of rule changes. Key to our contribution is the idea of rule–modifying constitutive rules, which express things like “A counts–as modifying a rule in the past/present/future in context C”. The main idea is to contribute a formal framework for reasoning about the legality of rule change ascribed by constitutive rules. In particular, accounting for the fact that changing rules in the past/present/future affects which rule changes are possible in the first place. Moreover, reasoning about conditions on rule change that are dependent on the rule change effects, such as not criminalising people in the past that were previously innocent (non–retroactively criminalising). Broadly speaking, there are three competing formalisations which look at the legality of rule change. We compare these as follows. In ([100, 102]) a defeasible logic is proposed for temporal rule modification operations. 6.5. D ISCUSSION 153 Operations include, in ([102]), complete rule removal (annulment) and removing immediate rule effects (abrogation). Meta–rules are used to introduce rule changes, which bear similarity to our rule–modifying counts–as rules. However, the meta–rules are only conditional on the social context at a single point in time. For comparison, we formalise richer conditions in rule–modifying constitutive rules. Specifically, rule change being conditional on the social reality in previous institution versions with previous rule–sets, previous institutional states and hypothetical rule changes required to capture a number of important examples we address (such as rule change being non–retroactively criminalising). The focus of these papers is on rule change operations found in the legal domain, rather than the relation between ascribing a social reality using constitutive rules and ascribing rule modifications with constitutive rules conditional on the social reality. In ([159, 160]) electronic institutions are specified in the Z specification language where legislation norms restrict legislative actions. The conditions for legislation norms are less expressive than our proposal and the authors do not consider the interdependency between changing rules in the past/present/future and the built social reality. On the other hand, in [28] rule modifications ascribed by counts–as rules are formalised where there is such a potential interdependency. The focus in [28] is on playing games in a setting where agents can act on the environment and also the rules which govern their actions. Most significantly, the main difference is that in [28] a static setting is formalised where institutions do not evolve over time from state to state or one set of rules to another. In our framework we explicitly look at these aspects not examined in [28]. Slightly further afield, the MOISE+ organisational framework has been used to construct organisations that act to enact organisational changes, in this case applied to a football team case study [123]. The focus is on the structural organisational elements required to re–organise an organisation. For example, the organisational roles required to assess when a re–organisation is required and what direction the organisational design should take. In contrast to this chapter, the focus is not on constraints making the social actions of norm change possible (or in their case, organisational change). Nor is the meta–level, the change of the rules making rule change possible. Instead, the claim is that they propose an organisational architecture required to make organisational change effective, and their claim is supported with an empirical simulation using a Markov Decision Process to select appropriate organisational changes. More generally, other work looks at the problem of normative system change. This body of research includes: 1. norm change postulates ([28]), 2. detecting and/or resolving norm inconsistencies ([46, 130, 133, 149, 154, 232]) and 3. temporal norm updates ([7, 148]). However, these frameworks do not look at rule change legality ascribed by constitutive rules over time. 6.5. D ISCUSSION This chapter answers the question “how should we define when rule changes count–as legal and valid rule changes?” with a novel formal framework. Our framework supports reasoning about institutional rule change over time, where rule changes are ascriptively regulated by counts–as rules. We presented a novel semantics defining how an institution evolves from one social reality to the next and from one version of rules to another. Under the proposed semantics counts–as rules define the past/present/future social reality. In 154 6. F ORMALISING I NSTITUTIONAL E NACTMENT VALIDITY turn, rule modifications change counts–as rules in the past/present/future and therefore the constructed social reality. Rule modifications are in turn conditional on the built social reality and their potential effects. To summarise the general answer to the question “how should we define when rule changes count–as legal and valid rule changes?”, according to our formalisation a legal rule change occurs 1. if the rule change is ascribed by counts–as rules, conditional on a context taking into account the potential changes to the context the rule modification would make 2. taking into account past/present/future rule modifications effect on counts–as rules and thus the context in which rule changes are conditional on. In chapters 3, 4 and 5 our Searlian notion of an institution is a social language that ascribes institutional facts, such as obligations and various social notions such as murder. If an institutional fact is ascribed by a brute fact that is an agentive observable event (i.e. an agent doing something) then we say the agent that performed the action had the legal power in the Hohfeldian sense to cause the institutional fact to occur or hold. That is, in previous chapters 3, 4 and 5 we were dealing with the legal power for agents to bring about institutional facts, including obligations when we are dealing with norms. In comparison, in this chapter it is the norms and other counts-as rules themselves that are ascribed from brute facts, or brought about by agents with sufficient legal power. Thus, unlike in previous chapters, this chapter goes beyond merely the notion of legal power to ascribe institutional facts in a limited sense. This chapter, when it talks about legality, is really talking about the legal power to ascribe norms and other counts-as rules themselves, which in turn give agents legal power to bring about further institutional facts and rules. In terms of future work, there are two important formal and application–orientated avenues. From a formal perspective, we considered rule changes conditional on their potential effects in the past/present/future, but not whether affecting the past/present/future in general. Yet, some administrative laws explicitly block retroactive modifications (e.g. [221, Art. 1 Sec. 9 Cl. 3] “No Bill of Attainder or ex post facto Law shall be passed”). In our framework a weak notion of preventing retroactive modifications can be expressed as a lack of retroactive rule–modifying counts–as rules. A stronger notion cannot be expressed blocking rules that allow modifications in the past from being introduced. A natural representation is higher–priority rule modifying counts–as rules (e.g. from a higher authority), but requires a defeasible logic left for further investigation. In principle, the framework’s fixed–point institution model characterisation can be implemented in any adequately expressive language. Future work should investigate if there is a suitable representation in declarative languages, well suited to rule–based reasoning. One candidate is Answer–Set Programming (ASP) [91, 93] as used in the InstAL framework [43]. The main obstacles are finding an adequate representation of the institutions presented in this chapter (i.e. rules that can be modified) and optimising for answer–sets that contain a superset of rule modifications over other answer–sets (thus corresponding to our notion of a model). 7 A PPLICATION If you find that you’re spending almost all your time on theory, start turning some attention to practical things; it will improve your theories. If you find that you’re spending almost all your time on practice, start turning some attention to theoretical things; it will improve your practice. Donald Knuth This chapter is loosely based on the following papers: King, T. C., Liu, Q., Polevoy, G., Weerdt, M. de, Dignum, V., Riemsdijk, M. B. van, & Warnier, M. (2014). Request Driven Social Sensing (Demonstration). In A. Lomuscio, P. Scerri, A. Bazzan, & M. Huhns (Eds.), Proceedings of the 2014 International Conference on Autonomous Agents and Multiagent Systems (AAMAS 2014) (pp. 1651 – 1652). Paris, France: International Foundation for Autonomous Agents and Multiagent Systems. [146] King, T. C., Riemsdijk, M. B. Van, Dignum, V., & Jonker, C. M. (2015). Supporting Request Acceptance with Use Policies. In Coordination, Organizations, Institutions, and Norms in Agent Systems X: COIN 2014 International Workshops, COIN@ AAMAS, Paris, France, May 6, 2014, COIN@ PRICAI, Gold Coast, QLD, Australia, December 4, 2014, Revised Selected Papers (pp. 114 – 131). Springer. [147] 155 156 7. A PPLICATION In this dissertation each formal contribution has been developed and assessed against case studies. In this chapter, we describe an application and implementation in the context of the SHINE project under which this research was conducted. The SHINE project aims to provide suitable mechanisms that help obtaining detailed environmental data through user participation. The idea is to get users to participate in providing data by contributing the sensors they own together with any actions the user needs to take such as taking a photograph or ensuring a microphone is turned on. In return for donating their time, taking useful actions and contributing their resources, users are able to receive the valuable information provided by the participation of other users. In this scenario, institutions in the form of contracts require users to contribute their cellphone sensors, via cellphone apps, in order to collect and aggregate spatio–temporal weather data. Not all users will wish to accept these contracts if they are considered to be ‘bad’ in terms of how, when and for whom their cellphone sensors are used. Moreover, a contract might take away liberties the user wishes to maintain or not uphold highly–valued rights. Hence, we apply a version of the multi–level governance compliance checking framework (chapter 4 and 5) in order to automatically check whether these contracts are ‘good’ from the perspective of the user’s wishes over how, when and for whom their cellphone sensors are used. The rest of this chapter begins by describing the application domain in section 7.1. Then we provide an example in section 7.1.1. An architectural overview is given in section 7.2 of how the reasoning framework is used in the context of crowdsensing and describe the implementation. We finish with discussion on benefits and limitations of the application in section 7.3. 7.1. C ONTRACTUALLY C ROWDSENSING R AIN DATA The SHINE (Sensing Heterogeneous Information Network Environment) project brings the perspective that there are many existing unused sensors owned by various stakeholders. At the same time, detailed environmental data is required to support governments and citizens in making decisions affected by environmental conditions. Such decisions include determining where to go to avoid flooded areas or deciding how city water infrastructure can be improved based on its current effectiveness. One possibility to provide detailed data is to buy sensors, deploy them and then collect data for a single purpose. But this is costly. SHINE aims to overcome a costly single–minded buy–deploy–sense cycle by re–purposing the existing, unused, sensors owned by independent stakeholders. SHINE views the sensors as being heterogeneous and the stakeholders who own the sensors as being autonomous. Sensor heterogeneity means that the sensors’ stakeholders own operate differently. For example, even if we only consider cellphone microphone sensors, one stakeholder might own a cellphone which runs a different operating system and therefore needs to be configured differently (e.g. ensuring data transfer is enabled or recording a video with a cellphone camera) to another stakeholder’s cellphone. One way to address the heterogeneity of sensors is to ask stakeholders to ensure their sensors are configured correctly. Stakeholder autonomy means that we cannot force a stakeholder to donate the use of their sensors or to configure them in the correct way. In SHINE stakeholder autonomy is addressed by contractually obliging stakeholders through bilateral agreement to ensure that they donate and configure their sensors to provide detailed data (e.g. rainfall locations). Specifically, in the context of this dissertation, SHINE 7.1. C ONTRACTUALLY C ROWDSENSING R AIN DATA 157 aims to enact contracts between stakeholders and sensor networks to crowdsource the use of the cellphone sensors stakeholders already own, also known as crowdsensing [87]. Crowdsensing involves crowdsourcing existing sensing devices as a means to cost–effectively acquire detailed data in a variety of domains. For example, crowdsourcing people’s cellphone battery sensors in order to obtain detailed temporal–spatial urban air temperatures [190], using microwave links in cellular networks to obtain detailed rainfall data [189] or using the cellphones in an area to form the wireless network to aggregate and transport the data [158]. The SHINE project uses contractual crowdsensing to acquire people’s cellphone sensors as a means to cost–effectively acquire detailed data in a variety of domains. We look at crowdsensing people’s cellphones to obtain rain data with an implementation in a simulated prototype. In our case, rain data is obtained using a hypothetical cellphone app which uses the cellphone’s audio sensors or communications links between devices to determine rainfall. The hypothetical owner of a cellphone is a human user and as such they have autonomy to join the crowdsensing system, ensure the cellphone sensors are on (i.e. the microphone, GPS and communications links) and that cellphone apps are able to transmit mobile data. The crowdsensing system binds users with contracts (a type of legal institution [208]) for use of their cellphone devices and sensors by imposing various regulations on those users and their cellphones. For example, “a cellphone is obliged to collect rain data when at a specific location and the user is prohibited from turning the sensor off until the data is collected”. In return, a user might be promised access to the rain data obtained by the crowdsensing system. By requesting a large number of users to agree to such contracts and enough users agreeing to those contracts detailed data can be gathered through the crowdsourcing of sensors. However, if there are many contracts offered for the use of a user’s resource, it is unmanageable for a user to assess the details of each and every one. On the one hand, if a user agrees to a contract without reading the fine print, they are liable to engage in a ‘bad’ (e.g. unfair) contract. For example, a contract which requires the owner to keep audio sensors and data communications on even if the cellphone battery is depleted (i.e. below 10%). On the other hand, if contracts are rejected by default the user might miss out on the opportunity to obtain useful information (rain data). In the second case, the system is likely to not meet its aims if too many users reject contracts on the basis of not having the time to assess them. Consequently, feasibility demands the automation of contract acceptance and rejection. Yet, the automation must respect an owner’s desire to maintain autonomy over how, when and for whom their cellphone contributes data. Unfortunately, existing crowdsensing systems (e.g. [64, 126]) do not let users control how their resources are used. In other words, the user needs a way to specify a policy stating regulations a contract should and should not impose for using the user’s resource. We call such a policy a use policy. Conceptually, fitting with our earlier theoretical work, a contract is a first–level institution governing users in an MAS (the crowdsensing system), whilst the use policy specified by users is a second–level institution governing offered contracts. Hence, a contract sets the space of compliant behaviour required to ensure the collection of crowdsensed data. In comparison, a user’s use policy effectively states how, when and for whom their cellphone may be used, or what obligations and prohibitions a contract may impose. Taking a formalised use policy and contract offered to a user as input, software should automatically accept or reject the contract. Acceptance or rejection should be based on 158 7. A PPLICATION whether the contract places obligations and prohibitions on a user and their device that the user does not like in certain contexts (e.g. the context that the battery is depleted). We use a version of our computational framework from chapter 4 for checking compliance of lower– level institutions. We implemented an automated reasoner for contract acceptance/rejection based on compliance in a simulated crowdsensing prototype. 7.1.1. E XAMPLE In the implemented contract reasoner contracts and use policies are specified in a high– level language. In principle, there are many possible contracts and use policies that can be specified. In order to exemplify the application we will present one contract and one use policy adapted from [147]. For simplicity of explanation, all institutions operate at the same level of abstraction and thus the norm abstraction reasoning from chapters 4 and 5 is not employed. In reality, the crowdsensing system owners can specify their own contracts to offer to users and users can specify their own use policies on the basis of which contracts are accepted or rejected. The following contract and use policy is formalised using the institution syntax from chapter 4. The contract is a first–level institution I c offered by the owner of the crowdsensing system, Ada, to a cellphone stakeholder called Bertrand for collecting data. The contract abstracts away from how the data is collected and sent, since this is dependent on the sensor. Data collection may or may not require user input, for example. The contract is formalised in table 7.1 and comprises the following rules: • Ada is interested in collecting rain data for a specific location, a square, and therefore the contract obliges Bertrand’s cellphone to gather rainfall data when he enters the square before leaving the square (rule Contr.1). • Once Bertrand’s cellphone has collected rain data he is obliged to send it within one minute (rule Contr.2). • If Bertrand enters the square then the contract states that he is forbidden to turn the cellphone’s sensors off until the data is collected (rule Contr.3). Bertrand has specified a use policy, the institution I up , formalised in table 7.2. It defines the following second–order norms: • Bertrand wishes to be paid for the use of his resource. Every time Bertrand discharges an obligation to send data, it is obliged that the counter–party, Ada, is obliged to pay Bertrand within two minutes where this obligation must be imposed immediately (rule UsePol.1). • When Bertrand’s cellphone battery is depleted (i.e. drops below 10%), he wishes to conserve it for more important tasks other than collecting rainfall data. Hence, when the battery becomes depleted it is forbidden to oblige Bertrand to keep the cellphone sensors on, until the battery is replenished sufficiently (rule UsePol.2). • Bertrand wishes to maintain the liberty to move freely, hence it is always forbidden to oblige Bertrand to collect data before leaving his location (initial state fluent UsePol.3). 7.2. S YSTEM OVERVIEW 159 Table 7.1: A Contract for Crowdsensing Cellphone Sensors to Gather Rain Data C c (;, enter(bertrand, square)) 3 obl(collectData(bertrand, rain), leave(bertrand, square)) C c (;, collectData(bertrand, rain)) 3 obl(sendData(bertrand, rain), m1) C c (;, enter(bertrand, square)) 3 pro(turnSensorsOff(bertrand), collectData(bertrand, rain)) (Contr.1) (Contr.2) (Contr.3) Table 7.2: A contract for Crowdsensing Cellphone Sensors to Gather Rain Data C up (;, disch(obl(sendData(bertrand, rain), leave(bertrand, square)))) 3 obl(obl(pay(ada, bertrand), m5), now) C up (;, batteryDepleted(bertrand)) 3 pro(pro(turnSensorsOff(bertrand), collectData(bertrand, rain)), batteryReplenished(bertrand)) ∆up 3 pro(obl(collectData(bertrand, rain), leave(bertrand, square)), never) (UsePol.1) (UsePol.2) (UsePol.3) Intuitively, we can see that Ada’s contract violates Bertrand’s use policy. Firstly, Bertrand demands payment for providing data, but Ada’s contract does not offer payment. Secondly, Bertrand wishes to be able to turn his cellphone sensors off when the cellphone battery is depleted, but Ada’s contract requires the sensors to be kept on when collecting data. Thirdly, Ada wants Bertrand to collect data before leaving his location, however, Betrand has stated that he wants the liberty of free movement. Hence, the automated reasoner in this case would reject Ada’s contract on the basis of violating the terms of Bertrand’s sensor use policy. 7.2. S YSTEM OVERVIEW Reasoning about contracts and use policies, as exemplified previously, was implemented as a part of a simulated crowdsensing prototype. In the prototype a simulated cellphone app is instantiated for each simulated user. Each cellphone app combines reasoning for resource governance and data collection. The cellphone app’s architecture is depicted in figure 7.1 and described as follows in terms of interaction with the crowdsensing system as a whole and other user’s individual cellphone apps: 1. Before a user’s cellphone is crowdsourced in providing sensing information, a contract is offered to the cellphone to provide rainfall sensing data. The contract is ongoing in the sense that it is not for a single data point but rather multiple data points requested on–demand by the system. 2. A resource governance component, the multi–level governance compliance reasoning, accepts or rejects the contract based on whether it is compliant with a user’s use policy. Each user has a different use policy and different users may be engaged in different contracts, hence cellphones do not necessarily uniformly accept/reject a contract. If the contract is accepted, then the cellphone joins the crowdsensing system. 160 7. A PPLICATION 1 Contract offer Accept/reject contract Cellphone app 2 Resource Governance Request Data 3 Use Policy Data Collection and Aggregation Application Layer Network Layer 4 5 Send/receive data Cellphone app Figure 7.1: A cellphone app is modelled in the simulated prototype comprising two layers, an application layer for the governance of the user’s resource (the cellphone and its sensors) and a network layer for using the resource (collecting, aggregating and sending data). 3. A cellphone which has accepted a contract is requested for data. When data is requested, the cellphone forms a cluster with nearby users that have also accepted a contract for crowdsourcing rain data in the vicinity. The cluster collectively decides how many and which users collect data, based on the granularity of data required according to the algorithms described by the authors of [158]. 4. Once the data is collected, it is sent using one of two methods. If data delivery speed is unimportant, the cellphone communicates with other cellphones that have accepted a contract to form an ad–hoc network to transmit the data whilst conserving energy (compared to using a traditional cellular network). In this case, users’ cellphones are also crowdsourced in helping to transport the data, where one cellphone receives data from other cellphones, (aggregates) packages it together and forwards it to the next cellphone in the ad–hoc network. If speed is more important, cellphones communicate using the cellular network. 5. In either case, other users’ devices that are contracted in providing data also receive rain data as a part of the contractual agreement. The prototype crowdsensing system is implemented in the NetLogo1 simulation environment. In our prototype simulation, the population of use policies assigned to each user is 1 http://ccl.northwestern.edu/netlogo/ 7.3. D ISCUSSION 161 Figure 7.2: Visualisation of data aggregation. Lines between users (not to scale) indicate data aggregation, adjacent users with the same colour indicate a cluster where only one in that cluster is providing data. Rainclouds are indicated with blue and black squares. The map is taken from ©OpenStreetMap. configurable. Moreover, the contractual rules are also configurable. This is true both before and during runtime. Consequently, use policies can be edited dynamically to demonstrate their representation and how changing various second–order norms affects the acceptance and rejection of contracts. This supports policy makers (i.e. the owners of the crowdsensing system) in assessing the acceptability of contracts and the level of users likely to join the crowdsensing system before run time. However, the main point of the system is as a proof of concept rather than to conduct empirical research. The visualisation of the prototype is shown in figure 7.2, where each cellphone owner that has accepted a contract and joined the crowdsensing system is depicted as a figure, a map represents the geographical area and rain clouds are represented with blocks in shades of black to light blue. Adjacent contracted sensing devices that have formed a cluster in order to select a single cellphone to collect data for a geographical area, share the same colour. Users that are crowdsourced into forming an ad–hoc network for delivering the data are linked with lines (a central station to which the data is eventually sent is denoted as a circle with alternating black and red inner circles). 7.3. D ISCUSSION In this chapter we have described a proof of concept for the application of the compliance checking system, contributed by chapters 3 and 4, to the contracted crowdsourcing of cellphone sensors for detecting rain levels. In principle, the same system can be used to automatically govern contracts for crowdsourcing other types of data, such as temperature, crowd levels or photographic weather reports. However, although this chapter illustrates the proof of concept, it does not assess the usability of the PARAGon framework and hence its applicability is in principle only. Future work should investigate whether users can adequately describe governance of socio–technical systems and the accuracy of the framework in correctly governing resources to meet user’s expectations. Consequently, this chapter only argued the case for multi–level governance automation’s applicability, in one case and a limited form, to SHINE–like systems. To re–iterate, the main advantage of using the multi–level governance compliance check- 162 7. A PPLICATION ing components of the PARAGon framework is that it supports users in specifying how, when and for whom their devices are used. Users are able to state in which contexts specific obligations and prohibitions should (not) be placed on themselves and any counter–party. Moreover, a use policy, by containing temporal second–order norms, is able to declare temporal requirements for a contract to be accepted. For example, a user can specify that they should be paid in advance of being obliged to provide data, keep sensors turned on, etc. Moreover, the abstraction reasoning presented in chapter 3 and 4 was not implemented for this prototype, but in principle would support a user in defining a use policy using abstract terminology they understand. Hence, the PARAGon framework supports users in specifying use policies and automatically accepting or rejecting contracts governed by such use policies. The main limitation of this approach is that a single occurrence of non–compliance in a certain social context is aggregated to the contract being non–compliant as a whole. In reality, contracts are neither always accepted nor rejected outright due to a single flaw from the perspective of one party nor are contracts binarily good or bad. Rather, to an individual there are many levels of preference in how good or bad (compliant) a contract is. Consequently, contracts are often negotiated in order to reach a compromise between two parties. The reasoning implemented does not support negotiating in terms of preferences for contracts for the main reason that use policies do not elicit a preference relation between offered contracts. Consequently, the formalism for compliance checking in multi–level governance would need to be extended to reasoning about different levels of ideality in order to form a partial–ordering between contracts. One way would be to adopt the approach in [230] where contrary–to–duty norms are used to represent different levels of ideality (e.g. you ought not murder, if you murder you ought to do so gently [83]). This approach is in a strictly non–temporal setting and so would need extending to reasoning about temporal norms. Another approach is to combine a temporal logic with a preference logic as in [21], describing preferences over temporal states of affairs (in our case, the obligations and prohibitions imposed by a contract) and do away with higher–order norms altogether. Adopting one of these approaches when combined with the norm abstraction reasoning presented earlier, would enable users to specify abstract temporal preferences over contracts as a use policy. 8 C ONCLUSIONS Of course, errors are not good for a chess game, but errors are unavoidable and in any case, a game without errors, or as they say ‘flawless game’ is colourless. Mikhail Tal When you see a good move, look for a better one. Emanuel Lasker 163 164 8. C ONCLUSIONS This dissertation contributed formal accounts of institutions involved in the governing of governance, which collectively comprise the PARAGon framework. The formalisations focussed on two governance types involved in the governing of governance. Namely, institutional design governance and institutional enactment governance. These governance types are found in the social world, where institution designers are governed in how institutions should be designed and when institutional changes can be enacted. Concerning how institutions should be designed, this dissertation formalised compliance in multi–level governance. Moreover, this dissertation contributed reasoning for diagnosing and rectifying the underlying causes of non–compliant institution designs. Concerning when institutional changes can be enacted, this dissertation formalised secondary legal rules defining the space of possible institutional change enactments. The primary objective, namely formalisation, was complemented with two practical objectives. Firstly, reasoning about realistic institution designs. Secondly, a practical means to reason about governance, which means a computational implementation or an obvious way to build a logical model. Whilst this dissertation contributed prescriptive research, it is nevertheless important to interrogate the intuitions involved. To this end, PARAGon was assessed against a number of real world and imagined institution designs. Together, these contributions aimed to extend the knowledge in the area of institutional reasoning by formalising a new aspect of institutions, in a practical way, and assessing the formalisation intuitions by way of case study. Central to this dissertation’s results was a shift in perspective and a new view on the constitutive rules that comprise institutions. This dissertation’s perspective shifted from institutions guiding agent behaviour typically focussed on in the field, to institutions guiding and governing institutional design and enactment. This dissertation’s formalisations of institutions seen from this new perspective resulted in a new view of constitutive rules’ roles in institutions. Whilst much of the literature viewed the role of constitutive rules as making abstract social actions and other institutional facts possible, this dissertation enlarged the responsibility of constitutive rules. For institutional design governance, this dissertation expanded constitutive rules’ responsibility from defining abstract concepts to also indirectly defining the abstract meaning of concrete norms in multi–level governance. For institutional enactment governance, this dissertation expanded constitutive rules’ responsibility from making social actions and facts possible to making social actions of institutional change enactment possible. These two new views of constitutive rules are central to this dissertation, as we will discuss further in this chapter. The rest of this chapter continues by concluding the dissertation with a discussion of results in Section 8.1, we discuss how the results can be applied to the SHINE project under which this research was conducted in Section 8.2, then we discuss future work in Section 8.3 and finally we reflect on the dissertation as a whole in Section 8.4. 8.1. D ISCUSSION OF R ESULTS Whilst it might have appeared that much of governance already had strong logical foundations, in Chapter 1 and Chapter 2 we saw that governing governance was, until now, mostly formless in the literature. Hence, this dissertation aimed to provide precise definitions for institutional governing of governance in terms of institutional design and enactment governance. This lead to the following overarching research question: 8.1. D ISCUSSION OF R ESULTS 165 How can institutional design and enactment governance be supported with formal reasoning? The overarching research question formed the basis for the sub–research questions presented in Chapter 1, which are listed as follows: • Sub research question 1: What is a suitable representation to specify institutional design and enactment governance? • Sub research question 2: How can we formalise compliance in multi–level governance? • Sub research question 3: How can institutional design compliance in multi–level governance be computationally verified? • Sub research question 4: How can non–compliant institution designs be explained in order to rectify non–compliance according to the institution designer’s objectives? • Sub research question 5: How can we formally define when legally valid institutional change enactments occur? In the remainder of this section we discuss what we did to answer these research questions. W HAT IS A SUITABLE REPRESENTATION TO SPECIFY INSTITUTIONAL DESIGN AND ENACTMENT GOVERNANCE ? In order to answer this question, we wanted a natural way to capture the representation for temporal institutions operating in the following two governance types identified in Chapter 1: • Institutional design governance: multi–level governance where abstract temporal regulations contained within higher–level institutions govern the regulatory effects of lower–level institutions comprising concrete temporal regulations. • Institutional enactment governance: the legality of institutional rule change according to secondary legal rules in a temporal setting. The question was answered for both of these governance types by contributing a high– level representation for institutional design governance in Chapter 3 and in a limited form in Chapter 5, and for institutional enactment governance in Chapter 6. The notion of institution used in this dissertation was founded on Searle’s counts–as rules [215] of the form “A counts–as B in context C”. In our case, counts–as rules were used to represent an institution’s temporal dynamics and played a central role for both institutional design and enactment governance. In order to provide a uniform representation for counts–as rules, we based our institution representations on those first proposed by the InstAL framework [42, 43]. 166 8. C ONCLUSIONS A representation specific to institutional design governance was contributed in Chapter 3 for multi–level governance, where counts–as rules both define which concrete concepts constitute abstract concepts and modal norms. The requirement for a natural representation specific to multi–level governance was met in three ways. Firstly, by offering the option to define explicit or implicit abstract norms governing concrete normative effects. Secondly, by adopting modal norms, which as we discussed in Chapter 3, provide a natural generalisation to higher–order norms for the explicit governance of concrete normative effects. Thirdly, by not requiring any explicitly represented links between concrete and abstract regulations and instead pushing the burden of determining relations between concrete and abstract regulations to a semantics. The temporal requirement was addressed by adopting temporal, immediate and indefinite norms. We showed how institutions defined according to our representation for multi–level governance have an, arguable, natural correspondence to the written law in Chapter 3. In some cases explicit, but controversial, rule formalisation choices were necessary in the case studies examined. Specifically, in order to collapse obligations/prohibitions to non normative social facts, which although we provided argumentation for in Chapter 3, due to having a controversial meaning is a representation choice. A representation specific to institutional enactment governance was contributed in Chapter 6. The central representation construct was counts–as rules used to represent Hart’s [117, p.96] secondary legal rules. As we discussed in Chapter 2, following the conceptualisation of Biagoli [20], secondary rules make the social action of changing rules possible in the same way counts–as rules make social actions in general possible. In our representation, we contributed rule–modifying counts–as rules, which ascribe rule modifications in the past, present or future conditional on a social context. The requirement for a natural representation was addressed in two ways. Firstly, by defining a richer social context to represent rule–modifying counts–as rules for real legal case studies. For example, to represent a condition, such as found in EU law [48, Art. 7], on past rule modifications only being possible if they would not, hypothetically, cause an innocent person to become criminalised in the past. Secondly, by not assuming any special representation to define secondary rules which modify other secondary rules, since there is no evidence supporting a special representation being required in the legal case studies we looked at. A number of real–world case studies in Chapter 6 were looked at to show an, arguable, natural morphism between the written law’s secondary rules and our formalisation of those rules in the representation we propose. In summary, PARAGon contributed a representation which limits assumptions for the governance types looked at, by providing a representation which conforms to written or mental institution’s representation and court interpretations. Where necessary we offered a representation choice rather than making strong representation assumptions. There may be other ways to answer this research question with different representations. However, our requirement was for a natural representation for temporal institutions and hence a suitable representation without requiring any unnecessary constructs was contributed. That is, as far as we are able to tell for the case studies we looked at in Chapter 3, Chapter 4, Chapter 5 and Chapter 6, our representation requires no further simplification in order to be natural nor any further complication in order to represent real–world institutional design and enactment governance. 8.1. D ISCUSSION OF R ESULTS 167 H OW CAN WE FORMALISE COMPLIANCE IN MULTI – LEVEL GOVERNANCE ? In order to answer this question, PARAGon contributed a semantics for operationalising multi–level governance compliance in Chapter 3. The semantics defined when a lower– level governance institution imposing relatively concrete regulations has regulatory effects that are non–compliant with higher–level institutions’ abstract regulations. Generally, the semantics assesses collective regulatory effects of lower–level institutions in different social contexts for whether they violate abstract regulations in higher– level institutions. Our semantics adopts the advice of David Makinson [164], “no logic of norms without attention to a system of which they form part”. That is, norms are understood in terms of the other constitutive rules contained in the same system. Constitutive norms are used to re–interpret the concrete regulatory effects in lower–level institutions for whether they have abstract meanings in higher–level institutions. The abstract meaning of a lower–level institution’s concrete normative effects (caused by its concrete norms), according to constitutive rules, determines if those concrete norms violate abstract obligations and prohibitions in higher–level institutions. The abstract meaning of a lower–level institution’s concrete normative effects is heavily dependent on the social context lower–level institutions’ obligations and prohibitions are imposed in from the perspective of higher–level institutions. To return to a previous example, an obligation imposed by the UK’s Data Retention Regulations to store communications metadata is abstractly interpreted by the Charter of Fundamental Rights’ as unfair data processing in the context that the person who the data concerns has not consented. In turn, unfair data processing is prohibited by the Charter of Fundamental Rights, hence the UK’s Data Retention Regulations institution violates a prohibition on unfair data processing when it imposes an obligation to store communications metadata in the context that the person who the data concerns has not consented. Consequently, not only is the abstract meaning of a lower–level institutions normative effects context sensitive, but so is the compliance of a lower–level institution’s norms. Since social contexts are important, we chose to take into account their dynamics. That ism we chose to interpret institutions operating in multi–level governance as state–event transition systems where an institution evolves from one state to another, meaning social contexts also evolves over time. Consequently, our notion of compliance rejects a naïve static comparison between different regulations which would focus on individual rules, in favour of focusing on the combination of regulatory effects and social contexts they are applied in. We contributed one definitional answer to the aforementioned research question, but there may be many more. Alternative definitions may vary significantly due to representation choices. For example, in our representation we adopted modal norms for the simplicity of representing higher–order norms. An alternative norm form, evaluative norms as discussed in Chapter 2, does not have explicit deontic modalities and hence in this case a notion of compliance in multi–level governance might be defined differently. Moreover, there may be regulations found in multi–level governance that are not captured by our formalism. To summarise, we answered this research question by defining compliance in multi– level governance as follows. An institutional design is compliant in multi–level governance if and only if its concrete regulatory effects in different social contexts have compliant abstract meanings in higher–level institutions according to those higher–level institutions’ 168 8. C ONCLUSIONS interpretive counts–as rules. This notion of compliance accounts for the different concrete and abstract ontological views between governance levels and the dynamic meaning of lower–level regulatory effects from the perspective of higher–levels. H OW CAN INSTITUTIONAL DESIGN COMPLIANCE IN MULTI – LEVEL GOVERNANCE BE COMPUTATIONALLY VERIFIED ? In order to answer this research question, PARAGon contributed a computational framework for determining compliance in multi–level governance, presented in Chapter 4. The computational framework provided a mapping from the formal representation of institutions in a multi–level governance relationship and their semantics to a corresponding executable ASP program. Institutions were represented in the computational framework as rules in a similar fashion to their formal counterparts. The multi–level governance semantics were represented as general ASP rules to capture the temporal dynamics of institutions and specific ASP rules to represent the semantics for the abstraction of norms. Effectively, the ASP rules representing norm abstraction semantics flattened the deontological counts– as function, which defines how concrete normative effects are interpreted more abstractly, presented previously in the formal component of the framework for multi–level governance compliance (Chapter 3). Whist a non–flattened and more general form might have been preferable, we found it was not possible due to current limitations of ASP. Naturally, we contributed theorems and their proofs demonstrating that the computational framework is sound and complete with respect to the formal framework for multi–level governance compliance checking. The computational framework was complemented with an implemented compiler. The compiler built on the InstAL framework’s [42, 43] implementation, which allows institutions in a multi–level governance relationship to be specified in a high–level non–procedural language and compliance to be automatically checked. As we saw, compliance in multi– level governance is highly dependent on social context. Consequently, keeping with the aim of practicality, this means through our implementation we can reveal to institution designers in which social contexts their regulations are non–compliant. If certain social contexts are unreachable in reality and therefore compliance for these contexts is irrelevant, a user can decide based on the presented contextual information whether to ignore these contexts. Since we used ASP, it is possible domain knowledge can be incorporated into the resulting ASP programs in order to constrain compliance checks to only reachable social contexts. Consequently, the practical benefits were realised with an implemented and corresponding computational framework, which provides automated and contextualised compliance checks to users. We only contributed one answer to this research question. Other corresponding computational frameworks may be possible. For example, using a higher–order logic as a meta– language to provide an axiomatisation of our formal semantics and a higher–order logic theorem prover to act as the computational implementation. Such an approach has been used to embed other logics, such as modal logic [18]. Speculatively, this approach could yield greater benefits by potentially enabling a computational framework comprising general rules/axioms rather than a flattening of the deontological counts–as function, which requires re–compilation every time institutional rules are changed. An entirely different answer to the research question could be to not provide a computational implementation, 8.1. D ISCUSSION OF R ESULTS 169 but to instead investigate the computational aspects of the formal framework. For example, decidability and complexity. In effect, our implementation shows our formal semantics is decidable, since ASP is decidable for finite Herbrand universes [92] and we proved a correspondence between the ASP implementation and the formal framework. However, an alternative approach could have been to contribute a decision procedure, which would have removed the need for elaborate and recursive transformations between the formal representation and ASP–based implementation. Hence, there may be alternative and perhaps more elegant solutions to this research question. By contributing a computational framework, we were able to formalise and execute a substantial portion of two related real–world multi–level governance legal cases. Specifically, the first case where the EU Data Retention Directive was enacted in 2006 [71] to coordinate EU member state legislation in requiring communications metadata was stored and where the UK’s implementation, its Data Retention Regulations [226] were enacted and found to be compliantly implement the directive in 2009. Moreover, the second case where in 2014 the Data Retention Directive was found to be non–compliant by the European Court of Justice [70] with the European Charter of Fundamental Rights [72]. By executing the case study, using interpretations provided by court judgements where possible, we were able to evaluate both our formal and computational multi–level governance compliance checking frameworks. One caveat is that the results for executing a case study can be highly dependent on how institutions are represented. Hence, we opted for a formalisation that arguably has a clear correspondence to the written law and court judgements. Bearing this in mind, we were able to see that we gained the same results as the real–world judgements of the European Court of Justice, using what we argue is a natural corresponding representation. Consequently, we contributed a computational implementation that demonstrates the formal definitions of compliance in multi–level governance are arguably ‘correct’ and provides practical benefits with automated compliance checking. H OW CAN NON – COMPLIANT INSTITUTION DESIGNS BE EXPLAINED IN ORDER TO RECTIFY NON – COMPLIANCE ACCORDING TO THE INSTITU TION DESIGNER ’ S OBJECTIVES ? In order to answer this research question PARAGon contributed a formal definition of explanations for non–compliant institutional designs and a computational mechanism to induce those explanations in Chapter 5. That is, by generating explanations, treating those explanations as hypotheses for rectifying non–compliance and then testing those hypotheses for support over a trace of events and therefore multiple social contexts. The contribution means non–compliance can be automatically rectified by adopting the explanatory rectifications for non–compliance as institutional design changes. The search for explanatory non–compliance rectifications was formalised as an Inductive Logic Programming (ILP) problem. We addressed the inconvenient idea that an institution designer prefers explanatory rectifications for non–compliance that keep an institution design as close to their original intentions, in order to ensure the proposal is of practical benefit. The idea being that our formal notion of explanatory rectifications for non–compliance are those that minimise changes to an institution’s constructed social realities. Thereby, explanations for non–compliance offer rectifications that keep as closely as possible to the designer’s original intentions, assuming those intentions were correctly captured by the 170 8. C ONCLUSIONS original institutional design. Moreover, we formalised the notion of explanations as also optimizing, to a secondary degree, institutional design change simplicity. This means explanations are preferred if they are more compact, in the sense of optimising fewer rule changes explaining greater instances of non–compliance. Overall we formalised explanations as comprising four types of rule change which can be combined: adding rules, removing rules, adding rule constraints and removing rule constraints. Hence, we formalised explanatory rectifications for non–compliance as changes to rules that adhere to an institution designer’s intentions, and are the simplest and most compact explanatory hypotheses. We addressed explaining non–compliance from a practical perspective. That is, by implementing the search for the hypotheses that provide possible explanations and rectifications for non–compliance, as an ILP problem in ASP using existing embedding techniques. The implementation alleviates an otherwise arduous task of an institution designer in trying different institutional re–designs for the one which rectifies non–compliance in the best way according to our own optimisation criteria (closeness to the original design and simplicity). The general idea of the implementation is to take an ASP program defining a non–compliant institution and compile that program into another ASP program where hypotheses for rectifying non–compliance can be generated and tested for support. For an institution designer, the implementation provides flexibility in specifying for which social contexts rectifying non–compliance should be found and hence guide the process of finding explanatory rectifications. In order to see how our formalisation of explanatory non–compliance rectifications behaved, we formalised a case study based on a fictional institution for a socio–technical system which in turn was governed by real–world and fictional laws. The system discovered a number of simple explanations for why the socio–technical system institution was non–compliant. These included the discovery of general design faults, which might potentially explain further issues the designer does not desire, removal of problematic rules and changes to existing rule constraints, and explanations comprising rule additions to ensure regulatory effects before rectification would still exist after rectification if they do not cause non–compliance. We only contributed one possible answer to the aforementioned question based on the idea of inducing hypotheses for non–compliance. There may be other possible answers, such as by defining what constitutes an explanation differently. For example, rather than defining explanation as hypotheses comprising institutional rule changes, one possibility is to combine argumentation and abduction to provide explanations as causal stories (e.g. as proposed for legal cases [19]). In this approach, an explanation is a chain of inferences showing how abduced probable causes of a true proposition provide an explanation of that proposition. Hence, a narrative causal chain could instead be used in this way to provide explanations for non–compliance. We do not attempt to exhaust all the feasible ways to define explanations for non–compliance, but note formal argumentation could provide alternative answers. Together, the formal notion of explanations for non–compliance and the implementation for finding such explanations complement each other. The formal aspect can be tested by the implementation with various case studies to determine if the formal notions give intuitive results. The practical aspect is supported by addressing the need to find those solutions for non–compliance which minimise design change and offer the simplest explanations for 8.1. D ISCUSSION OF R ESULTS 171 understandability. We tested both of these aspects using a case study combining fictional and real–world rules. H OW CAN WE FORMALLY DEFINE WHEN LEGALLY VALID INSTITUTIONAL CHANGE ENACTMENTS OCCUR ? In order to answer this research question PARAGon contributed a semantics that defined when institutional change enactments are valid in Chapter 6. In this context, by institutional change enactment we mean changes to an institution’s rules over time. An institutional rule change is valid if it is ascribed by an institution’s secondary rules. These secondary rules were represented as a special type of counts–as rule of the form “A counts–as modifying a rule in the past/present/future in context C”, which ascribe modifications to counts–as rules including other secondary rules. The semantics defined when social actions of institutional counts–as rule changes are ascribed, including to other secondary rules, and how the institution transitions from one version to another when rule changes are validly enacted. The formalisation gave meaning to secondary (counts–as) rules. The secondary counts– as rules we formalised include a condition on a richer social context not given any formalisation, as far as we are aware, previously. In particular, social contexts acting as conditions on past institutional states, past institution versions and hypothetical rule change effects. These conditions were used to represent cases such as institutional rule changes occurring conditional on those changes not criminalising formerly innocent people in the past. In order to deal with such expressivity we proposed a semantics that defines a rule change as occurring if the necessary conditions are met and all of the effects of the rule change are consistent with those necessary conditions. We acknowledged that in reality secondary rules can make it possible for past, present and/or future rule changes to be made including to other secondary rules. Consequently, our semantics dealt with difficult cases where changes to secondary rules potentially cause other, previously established, rule changes at various points in time to be unravelled or potentially further rule changes to be made. Moreover, our semantics handled cases where complex interactions between rule changes would, in a classical setting, cause inconsistency. For example, the case where the only rule ascribing rule modifications ascribes its own removal. In our case, we took the perspective that if a rule change causes inconsistency with the conditions for its own ascription then the rule change is not legally ascribed (i.e. is invalid) and thus does not occur in the first place. We tested our definition against a number of case studies based on EU and UK law, as well as edge cases where we would expect there to be issues with an incorrect definition. The real world case studies demonstrated that through a simple representation we were able to reason about difficult kinds of rule change governance. For example, hard constraints on there being no changes to criminalising laws in the past, requiring a form of hypothetical reasoning to classify rule change effects. From the edge cases we saw that complex cases where rule changes interact, which are conceivably difficult to reason about without a mechanical process, are arguably handled intuitively by our formal account. We did not attempt to exhaustively answer the research question. Instead, we offered a single formalisation of when institutional rule changes occur according to secondary rules. Other formalisations may be possible and, indeed, they exist for rule modifications in non– temporal settings [28] and rule modifications in temporal settings [100, 102] but with less 172 8. C ONCLUSIONS expressive secondary rules. Moreover, an equivalent definitional answer could be given to this research question using a different formalisation. It’s possible our semantics could be defined on top of an existing logic, either at the meta–level or object level. For example, we could try to adopt or modify default logic [203] by viewing conditions on rule change being ascribed as defaults that must hold before and after rule change. In our case, we chose to contribute a formal definition with a semantics that stands on its own, requiring no understanding of pre–existing logics aside from some rudimentary notions of sets and functions. To summarise, we contributed a formal definition to answer this research question. Informally, a rule change occurs if and only if it is ascribed by secondary legal counts–as rules conditional on a social context, which can include hypothetical rule change effects, that holds before and after the rule change takes place. Our account was assessed against a number of case studies, including edge cases to assess the intuitiveness of results. 8.2. A PPLYING THE R ESEARCH TO THE SHINE P ROJECT The research conducted in this dissertation was supported by the SHINE project of TU Delft. The project aimed to develop techniques for acquiring and coordinating large numbers of heterogeneous data resources that already exist in the environment (e.g. cellphone sensors, radars and people) in order to collect environmental data. This dissertation contributes techniques for formalising governing governance, which is arguably suitable for governance and coordination of ‘SHINE–like’ sensor systems. An implemented application of the research was presented in Chapter 7 for a simulated prototype as a proof–of–concept. In this application automated compliance checking in multi–level governance was used to determine if contracts offered to individuals to crowdsource their cellphone sensors should be accepted on the basis of being compliant with use policies. These use policies would be, conceivably, specified by cellphone owners stating how, when and for whom their cellphone sensors may be used. In this setting, the research was applied to giving people control over how their sensors are contributed to crowdsourcing systems without requiring sensor owners to arduously read the fine–print of the offered contracts. The research in Chapter 5 was also applied to a fictional institution used to govern a crowdsourcing system as a whole, which in turn was governed by external laws partially inspired by real–world legislation. In this application we demonstrated an automated system to find explanations for why the crowdsourcing system institution design was non– compliant with external laws. The research on compliance in multi–level governance in Chapter 3 and Chapter 4 was applied to a real–world multi–level governance case study. In this case we showed how the PARAGon framework was able to represent and reason about the EU Data Retention Directive [71] and its non–compliance [70] with the EU Charter of Fundamental Rights [72] due to requiring the storage of people’s communications metadata without their consent, which took away the right to respect for private and family life. In this case, the relevance was showing how we can check the compliance of laws concerning the collection of data, in much the same way a SHINE institution, which aims to guide MAS participants in contributing data, might be found non–compliant with similar external human rights and liberties laws. Hence, we applied the framework to a simulated prototype and case studies 8.3. F UTURE W ORK 173 concerning SHINE–systems and data collection. Outside of these realised applications, the multi–level governance compliance reasoning presented in Chapter 3 and Chapter 4 offers a potential way to contribute automated reasoning for an architecture applied to governing heterogeneous sociotechnical systems. SHINE is concerned with heterogeneous sensor systems, which comprise different types of sensors. Rather than attempting to apply a single institution to govern heterogeneous sensors, which due to different behaviours might be unsuitable, multi–level governance offers a way to treat heterogeneous groups of sensors (e.g. crowdsourced cellphone sensors, a group of weather radars, etc.) as separate homogeneous self–governing sensor sub–systems. The idea is that each sensor sub–system has its own institutional governance designed by the stakeholders of that sub–system (e.g. sensor owners). Then, a SHINE institution is designed to govern institutions governing each sensor sub–system towards over–arching aims with abstract regulations. Thereby, multi–level governance delegates the design of sensor sub–system institution designs, removes problems of a single ‘one–size–fits–all’ institution design and coordinates separate sub–system institution designs towards overarching data collection objectives. In this scenario, this dissertation supports governance of sensor sub– system institution designs with automated multi–level governance compliance checking, but further investigation is needed to determine if automating such governance can work for heterogeneous sensor ‘systems of sub–systems’ in practice. The institutional enactment governance presented in Chapter 6 provides a potential way for stakeholders in SHINE sensor systems to specify flexible and automated governance of sensor systems’ institutional change enactment. This means, system stakeholders are able to use the formal reasoning to determine how institutional changes can be enacted according to an institution’s secondary rules when changing sensor aims require changed regulations. Moreover, stakeholders have flexibility in defining the rule change process for a given governed sensor system. The main benefit being, owing to heterogeneity between different sensor systems, alternative rule change processes for each sensor sub–system can be defined and reasoned about. For example, one system’s rule change process can be defined as a direct democratic vote with certain constraints (e.g. not removing the right to a democratic vote from participants in the past) and another as requiring elected technocrats to make a collective decision. Hence, although untested, our secondary rule formalisation potentially allows automated operationalisation for a diverse range of governance and regulatory change enactment styles to be defined for different sensor systems, in a way that enables those system’s regulations to adapt, as deemed appropriate, to new aims and needs. None of this is to say that this dissertation contributes an exhaustive application to the governance of SHINE–like sensor systems. However, what has been shown is that in at least one area, the governance of contracts for crowdsourcing, the framework was applied in a prototype. Moreover, the framework has been applied to case studies relevant to sensor systems such as those envisaged by the SHINE project. Finally, there are potential avenues for future applications to SHINE–like systems. 8.3. F UTURE W ORK Future work is split into analysis of the formal frameworks contributed by this dissertation, improvements to this dissertation’s contributions and new research lines influenced by this dissertation’s contributions. 174 8. C ONCLUSIONS 8.3.1. A NALYSIS The formalisms developed in this dissertation have been shown to meet various properties, such as there existing a sound and complete logic-programming implementation. Such properties were provided in order to demonstrate the expectations, set out in the introductions of the relevant chapters, have been met. However, there still remains work to be done on general properties that give a better understanding of how institutions behave under the defined semantics. The formalism defining compliance in multi-level governance, in Chapter 3 could be analysed for properties relating to inconsistency, (non-)compliance and redundancy. Inconsistency can occur in two senses. The first type of inconsistency that should be investigated is, what we can call, non-deontic inconsistency where due to the operations defining the semantics being undefined in some cases (e.g. the event generation operation) there is consequently no model for those cases. The second type of inconsistency is what we call deontic inconsistency, where it is impossible to discharge all obligations/prohibitions, or worse that some obligations/prohibitions are necessarily violated no matter what event occurs. Properties that coincide with the dischargement and violation of abstract and higher-order norms should also be investigated. For example, if an abstract norm is violated then what concrete norms, if any, must also necessarily be violated and vice versa? Finally, an important aspect of an institution or normative system addressed in the literature is redundancy [22, 54] – when would removing a counts-as rule have no effect whatsoever on how the institution evolves over time (for all traces of observable events)? Whilst norm redundancy has already been formalised and investigated, it would be interesting to investigate given the novel semantics of the multi-level governance compliance formalisation if there are general properties that coincide with a rule being redundant. Investigating properties relating to inconsistency, (non-)compliance and redundancy for the formalisation of compliance in multi-level governance would give a better understanding of how the formalisation behaves, in particular given the novel abstraction semantics, and some useful properties for understanding how to improve an institution operating under those semantics. The formalism defining the legality of rule change, in Chapter 6, could be analysed concerning (il)legal rule change, temporal dynamics and rationality. To recap the informal notion, a rule change is legal “1. if the rule change is ascribed by counts–as rules, conditional on a context taking into account the potential changes to the context the rule modification would make 2. taking into account past/present/future rule modifications effect on counts–as rules and thus the context in which rule changes are conditional on.” However, such informality still leaves future investigation of formal properties that coincide with (il)legal rule change. Moreover, in terms of temporal dynamics, it is important to analyse under which conditions changes occurring in the future can affect the past, including past states and also the legality of past rule changes. In particular, concerning both temporal dimensions of the formalism. On the one hand we showed future rule changes can make past changes in the same version become (il)legal and therefore potentially no longer occur. On the other hand we did not ascertain under which fragments of the language future rule changes are guaranteed to not affect the legality of rule changes in past versions. Further properties should be analysed concerning rationality. Famously, the AGM belief revision postulates [3] define a notion of rationality for belief revision operators and a related set of postulates has been proposed for norm revision [25]. It is important to analyse 8.3. F UTURE W ORK 175 whether our formalisation of ascriptive legal rule change meets these postulates. However, since we are dealing with rules that ascribe the legality of changing other legal rules and not just ‘straightforward’ norm change, it is possible that the postulates are not met and moreover that a slightly different set of postulates may be more appropriate that do hold for our formalisation. Investigating properties relating to the legality of rule change, temporal dynamics and rationality would give a better understanding of what our formal definitions really mean at a deeper level. In addition to analysing the behaviour of each individual formalisation, it is also important to formally compare with other formalisations. One possible way to do this would be to abstract the semantics. For example, by using Tosatto et al’s [223, 224] graph-based formalism where obligations, permissions and institutional facts are nodes and rules are edges between those nodes. The idea would be to take existing abstractions of formalisms using Tosatto et al’s abstraction and compare them to an abstraction of the formal semantics contributed by this dissertation. The benefit would be not just a formal comparison between the PARAGon framework and other frameworks, but also a comparison where patterns of reasoning and differences between them are visualised. However, this type of analysis requires further investigation since there, to the best of our knowledge, appears to be no work on abstracting systems of the ‘type’ we formalise. In particular in Chapter 6 where an institution evolves over two timelines and there can be complex interactions between past, present and future institutional facts. In order to analyse differences between our formalism and others, a means to abstract our semantics should be found, which is a significant undertaking and left for future work. 8.3.2. I MPROVEMENTS P UTTING AUTOMATED M ULTI – LEVEL G OVERNANCE INTO P RACTICE In Chapter 3 and Chapter 4 we looked at reasoning about compliance in multi–level governance. A focus was placed on reasoning about abstraction at different levels of governance. This aspect of the PARAGon framework was assessed against a real–world case–study for the governance of human societies and governments. An avenue for future work is to determine if the same framework can be applied to artificial societies. This would result in an formalised and automated operationalisation of two proposals. First, the proposal of what Pitt et al. [197] call polycentric governance for socio–technical systems. Here, they argue that in complex artificial MAS a single one–size– fits–all institution is inadequate, since different localised parts of the MAS may need different regulations. Therefore, in our own wording, separate lower level institutions should be designed appealing to subsidiarity. These institutions should be compliant with overarching institutions abstractly prescribing what regulations should be implemented. Secondly, Dignum et al. propose the OMNI design methodology framework for institutions/organizations governing artificial MASs [62]. Here, the design methodology is focussed on a regulation abstraction hierarchy where at the most abstract level statutes comprising values, objectives and contexts should be designed. Then, abstract norms implementing these statutes. Implementing the abstract norms are concrete norms. In this methodology an assumed function that concretises abstract norms is used. PARAgon offers a semantics for reasoning about abstract norms that could potentially be used to weaken or remove the assumption of a concretising function. Future work should extend and apply the PARAGon 176 8. C ONCLUSIONS framework to further operationalise and develop the ideas presented in these papers. E NHANCING I NSTITUTION A BSTRACTION R EASONING Another important future development is extending the semantics for abstract regulation reasoning presented theoretically in Chapter 3 to support ontological alignment of institutions. In our proposal lower–level institutions’ regulatory effects were re–interpreted at the abstract level defined by higher–level institutions. For example, obliging storing communications metadata in a lower level institution is abstracted to obliging storing personal data in a higher–level institution. In one sense, this means lower level institutions’ regulations were aligned with the abstractions defined by higher–level institutions. However, we assumed that the concrete terminology shared by lower and higher–level institutions have the same meaning and are already ontologically aligned. For example, storing metadata in the lower–level institution coincides with storing metadata in the higher– level institution. Thus, if the lower–level obliges storing metadata, and the higher–level views storing metadata as storing personal data, then from the higher–level institution’s perspective the lower–level is obliging that personal data is stored. In general, ontologically aligning institutions is an important problem that needs addressing for comparing regulations between institutions. Aside from alignment, abstraction reasoning should also be improved to address further deontic concepts. We focussed on how to abstract obligations and prohibitions, based on counts–as rules describing the abstraction of events and fluents. However, there are many other deontic concepts, as described by Hohfeld [120], that play an important role in institutions. They include accounting for the concepts of right and liberty. For example, a right to life correlates with a prohibition on others to take life away. The liberty to choose who you love depends on there being no prohibition on choosing who you love. Each of these might be involved in multi–level governance in the form of obliged/prohibited rights and liberties, or rights and liberties represented in constitutions which require obligations/prohibitions to (not) be imposed in lower–level institutions. Such Hohfeldian notions of rights and liberties should be investigated for abstracting and governing. Likewise, concepts of legal power should also be accounted for. Legal power, is the ability to (legally) affect an institution according to ascriptions provided by constitutive rules [136, 163]. To give an example in a multi–level governance context, a higher–level institution governing a marriage institution could state that “it is obliged that newly weds have the power to annul their marriage”. From the perspective of this dissertation, an interesting aspect is determining from a relatively concrete lower–level institution (such as a marriage institution) whether concrete rules and regulations constitute an abstract power such as newly weds having the legal power to annul their marriage. Moreover, concepts related to power should also be accounted for. Namely, disability (the opposite of power), liability (you are only legally liable if you have legal power) and immunity (without liability you are immune from not fulfilling norms you have no legal power to do so). One possibility to incorporate all of these concepts is to build on the logics of Hohfeldian rights and liberties [137–140], and institutional power [136]. That is, we could try to combine these formalisations of Hohfeldian legal concepts with multi–level governance formalisation in order to govern instances of Hohfeldian concepts. 8.3. F UTURE W ORK 177 P UTTING THE A SCRIPTION OF L EGAL RULE C HANGES INTO P RACTICE The formalisation in Chapter 6 provides a fixed point characterisation for ascribing legal and valid rule change. The fixed point characterisation provides the mechanism to find models, which can be implemented in any sufficiently expressive language. Yet, there remain practical concerns for the formalism to be usable in a real–world setting. An obvious improvement is to address the lack of implementation and complexity analysis. Many of the constructs in the formalism are similar to Event Calculus constructs [150] (e.g. a fluent holds if it is initiated until it is terminated). An axiomatisation for an Event Calculus (version) exists in ASP [141]. Hence, one way to implement the formalism would be to provide an Event Calculus–like axiomatisation in ASP. A benefit of this approach is that there are already existing complexity results for ASP [66, 74] which can be used to assess the complexity of an axiomatisation. Another problem that needs addressing is the assumption that, in the formal framework, all rules which can and/or will be added/removed from an institution are fully characterised by an institution’s event generation and state consequence functions. It makes more sense in practical terms to allow the functions describing rules or a database of rules to be updateable with new rules. Then, with new rules added to the database, rule enactment actions can be undertaken by agents to ensure the rules become a valid and recognised part of the institution. If an ASP approach is taken to implementing the formalism, then a logic program would need to be updateable with new rules during run–time. One possibility for updating a rule database is to build on recent advances in answer–set programming for dynamic domains [90]. L EGAL I NTERPRETATION In this dissertation we looked at the legality of institution designs and rule change but we did not investigate legal interpretation, which is closely related to the topics we did investigate as we will discuss. Legal interpretation is the act of courts deciding what various concepts mean, such as to determine the applicability of a rule or whether actions of an agent constitute legally obliged behaviour, even if the written law does not make explicit recommendations for such cases. Legal interpretation is important, since it allows legal norms to be adapted to unforeseen circumstances and changes to the understanding of various concepts by society not represented in the written law. For example, a categorical prohibition on storing private data might have previously meant preventing the storage of communications content between people, but as time went on it became clear that storing communications meta–data is also an infringement on privacy – hence a court would then update the notion of private data to include meta-data. As Boella et al. show [23, 24] legal interpretation is, formally, a case of rule change. Specifically, whilst legislators have the legal power to change ontological and regulative rules at “design–time”, courts have the legal power to change only ontological rules at “run– time” (i.e. as cases are brought before the court). Boella et al. provide a formal mechanism for re–interpreting the ontological meaning of literals in the antecedent of regulations (the applicability of the rule) and the consequent (the obliged actions or state of affairs) based on interpreting the original goal of the legislator (i.e. the intention behind the law). Hence, legal interpretation is an important aspect of rule change that ensures laws, at run-time, can be correctly applied and understood according to the goals behind enacting those laws at design–time. 178 8. C ONCLUSIONS Relating to these aspects, in this dissertation we contributed formalisms that can be used to reason about the effects of legal interpretation. In Chapter 3 and Chapter 4 we looked at interpreting the abstract meaning of detached deontological statements based on ontological interpretations provided by courts. But, the ontological interpretations were formalised a– priori as counts–as rules (e.g. meta–data count-as personal data) in the case study on EU multi-level governance. We did, on the other hand, investigate the generation of hypotheses, using ILP, for explaining and rectifying non–compliant institution designs in Chapter 5. Effectively, ILP synthesised changes to ontological and deontological rules in order to ensure the regulatory effects of an institution do not violate the regulations of other institutions. Courts synthesise interpretations, which are effectively changes to the existing set of ontological rules. But, suitable legal interpretation ensures the law is applied and interpreted correctly with respect to its intention, which is different from our purpose of resolving non-compliant institution designs. Later, we investigated rule change legality and its effects on how an institution evolves in the past/present/future in Chapter 6. Since legal interpretation is a case of rule change, the formalisation of when rule changes are legal could be used, with some enhancements, to reason about when legal interpretations are legal. For example, if we want to reason about a statement such as “a court can introduce a new counts-as rule so long as it is not regulatory and by introducing that rule the goal of the law being interpreted is promoted”. By combining the work on interpreting the abstract meaning of regulations in Chapter 3 and Chapter 4 and the work on legal rule change in Chapter 6 we can potentially capture the effects of legally-valid legal interpretation, which is the addition of ontological rules ascribed by rule change regulating counts-as rules, on the abstract meanings of regulatory effects. Our work is related to reasoning about legal interpretation in terms of its effects and its legality when viewed as a type of rule change. However, this dissertation did not investigate how legal interpretations could be generated in order to support the original goal of a law when it is unsupported according to the run–time interpretation of legal concepts. Potentially, existing approaches by Boella et al. [23, 24], which use defeasible logic to interpret the law, could be adopted to provide a more complete system for reasoning about institutions, their interpretation and governance. 8.3.3. N EW R ESEARCH L INES S OCIAL C OMMITMENTS Whilst this dissertation looks at prescriptions from the perspective of when institutional rule enactment and institution designs are legal, a similar type of prescription is social commitments. Social commitments, such as promises, emerge between agents. Social commitments establish relationships between parties and counter–parties and expectations between agents. In a social commitment, when one agent, called the debtor, commits to bring about X for the benefit of another agent, called the creditor, then the creditor has the expectation that X will be brought about for their benefit and the debtor knows that the creditor has such an expectation [36, 37]. The creditor, has flexibility and autonomy to bring about X in any way they choose including through delegation to another agent. To give an example from [243], a social protocol states whereupon a potential buyer requests a quote for electronic goods, the potential seller is committed to providing the quote and the 8.3. F UTURE W ORK 179 buyer expects to receive a quote. Social commitments should be formalised since they provide a powerful and ubiquitous means for agents to cooperate in a flexible way on the basis of mutual understanding, which supports social interaction planning whilst preserving participants’ autonomy. Furthermore, social commitments allow social endeavours’ progress to be assessed with in–built key performance indicators (KPIs), such as ‘fulfilled’ and ‘violated’. Hence, social commitments have seen formal work in the normative reasoning sphere for creating new social protocols from existing commitment–based protocols [16, 94], planning the fulfilment of commitments on the basis of expectations and mutually held beliefs [243], addressing conflicting commitments [2], and converging on a mutual understanding of commitments and expectations [39], to name a few. In this dissertation we looked at how to synthesise institution changes to rectify non– compliance and how to determine when rule changes are valid, such as to support planning valid legal rule changes. As we saw in Chapter 6, creating and altering rules makes it (im)possible to create and alter rules. This is just as true for social commitments. To give one example, in order to plan a larger project a project manager needs to get various project participants to commit to giving estimated work hours required for deliverables. When participants fulfil commitments, a project manager is able to plan further commitments. Or, to give another example, by creating a social commitment for the trading of goods and services it is possible for each participant to assess the trust they should place in the counter–party after the commitment is fulfilled or violated. Consequently, creating and fulfilling/violating social commitments makes it possible to determine whether further commitments should be created on the basis of new information or increased trust. However, whilst commitment creation and fulfilment is entwined with further commitment creation and planning, planning the synthesis of commitments has not been addressed taking into account this interdependence as far as we can see. This dissertation offers ideas which can be built on to create such plans. Chapter 6’s formalism shows that rule creation (e.g. commitments) is non–trivial given pre–existing rules which ascribe rule changes, where rule changes enable/disable further rule changes. An ASP axiomatisation of Chapter 6’s formalism as outlined previously would potentially support planning rule changes. ILP applied to rule synthesis for compliant institution designs contributed by Chapter 5 can potentially be used as a basis for synthesising the right commitments for a given problem. But, the difficulty is determining how to synthesise commitments given that setting up expectations and/or agents fulfilling those expectations is necessary to build trust and meet sub–goals for further commitments to be planned for meeting an overarching social goal. F ORMALISING THE S UBSIDIARITY P RINCIPLE IN M ULTI – LEVEL G OVERNANCE This dissertation looked at formalising compliance in multi–level governance. Subsidiarity, the principle that what can be legislated at the local level should be left up to the local level, is also an aspect of multi–level governance. This dissertation contributes reasoning for abstract regulations which are used to realise subsidiarity, but this dissertation does not investigate subsidiarity itself. Yet, subsidiarity is an important principle. Ostrom [185, p.90] argues that regulations must be based on local conditions. Whilst regulations should be coordinated across groups/jurisdictions (e.g. carbon emission targets), Wilson argues [238] implementation should 180 8. C ONCLUSIONS be left to the lowest–level jurisdiction where implementation is effective. By involving local lay knowledge, as opposed to a one–size–fits–all approach, policies are more effective by being enhanced with learning from past policy decisions [181, 193, 242]. In general, a one–size–fits–all approach is argued as resulting in failure [187], which the subsidiarity principle aims to address. The same arguments in favour of subsidiarity for human society governance are made for the governance and design of sociotechnical systems, such as smart grids. Frey et al. [85] and Pitt et al. [198], propose a design/governance framework for socio–technical systems, where higher–levels provide over–arching aims but, adhering to the principle of subsidiarity, delegate to lower–levels for implementation or further delegation to even lower– levels. For example, Pitt et al. [198] talk about decentralised community energy systems. These are small residential communities comprising residences which both produce energy (e.g. with wind turbines) and consume energy, and supply energy to one another. Institutions regulate the communities to manage the appropriation of common energy resources. Scaling involves composing a system of decentralised community energy sub–systems, each sub–system demanding and supplying energy from one another. In order to govern a system of systems, hierarchical governance is proposed, where sub–system’s institutions are coordinated (e.g. to ensure energy is shared between sub–systems) but appealing to the principle of subsidiarity different sub–system institutions comprise different regulations as deemed appropriate for the community being governed (e.g. one operates a market economy and another operates a communal economy). Subsidiarity uses local lay knowledge to govern disparate societies or socio–technical systems towards a common aim. In Chapter 3 and Chapter 4 we looked at the abstraction aspect of subsidiarity, where abstract regulations leave some institutional design decisions up to the local level. However, subsidiarity itself has not been formalised in terms of determining what should be left up to the local level. Nor does subsidiarity appear to have been given a precise measure. The question remains, subsidiarity is the principle that what can be done at the local level should be left up to the local level through delegation, but how far down should the delegation go and how much freedom should be given to lower–levels of institution designers? In particular, what level of subsidiarity is suitable taking into account a cross–institutional objective, and lower–level institution designer’s capabilities and local lay knowledge? Arguably, the lack of formalisation is problematic since subsidiarity is a structural optimisation principle and therefore if not measured multi–level governance is not optimisable. We can conceive that if subsidiarity is not realised through over–delegation and overly– abstract regulations at higher–levels, then designers of lower–level institutions have too much room to design compliant institutions. Therefore, coordination between individual sub–systems/societies to meet a global aim is not guaranteed. Moreover, if subsidiarity is not realised due to too little delegation and too concrete regulations in higher–level institutions then lower–level institution designers have too little room to optimise regulations for local lay knowledge to meet global aims. Consequently, subsidiarity needs to be formalised, according to these assumed problems, in order to promote measurement, optimisation, compliance and therefore meeting global goals, and automation. There are many aspects to address when formalising subsidiarity. A metric should be defined for the abstractness level a particular institution possesses at a certain governance level. In Chapter 3 and Chapter 4 we saw how abstract regulations can be complied with but 8.4. C LOSING R EMARKS 181 did not define how abstract each level is in a qualitative or quantitative sense. Abstraction in this context is viewed as providing many ways with which to comply, the shortcoming of this measure is that compliance and therefore ‘abstractness’ is highly dependent on the ontology used. Consequently, a novel measure of abstractness is required that does not depend on the number of ways abstract concepts are ascribed. A metric should be defined to measure how disparate lower–level systems are and whether they should be viewed as separate systems in the first place, or whether there is a ‘one–size–fits–all’ institution for a particular goal and multiple jurisdictions. That is, we need a system disparity metric to calculate the level of abstractness each regulation and each governance level should be issued at. There already exist metrics for differences (inconsistencies) between propositions [151], knowledge bases [104] and separate agents’ beliefs [127]. But it is unclear whether techniques used for such metrics can be extended to assessing system disparity. Finally, it should be possible to determine what capability local levels have to regulate more appropriately than higher–levels using local lay knowledge for a particular objective. One possibility is to define reasoning about whether there is appropriate local–level knowledge such that lower–levels are more capable than higher–levels in regulating towards global aims. Such reasoning should be from the perspective of higher–levels that do not necessarily know exactly what the local knowledge is. However, how to extract information for whether local–level institution designers have appropriate knowledge is unclear. Abstractness, system disparity and local capabilities to self–govern appropriately should be measurable and combined to formalise a subsidiarity metric for a given objective, yet as we have speculated, each measurement is non–trivial to define. 8.4. C LOSING R EMARKS We finish with a few closing remarks regarding the aspects of governing governance this dissertation focuses on. This dissertation contributes formal and practical reasoning for governing institutional design and change with the PARAGon framework. The contribution is split into formalising institution design and enactment governance. Chapter 3, Chapter 4 and Chapter 5 contributed reasoning for how institutions should be designed. Chapter 6 contributed reasoning for how institutional change can be enacted. This raises the question, does institutional design and enactment governance involve deontic shoulds or alethic cans? From the should perspective, higher–level institutional rules prescribe the design of lower–level institutions in multi–level governance and are formalised as soft constraints in Chapters 3, Chapter 4 and Chapter 5. In our case, higher–level institutions comprise primary rules that abstractly prescribe lower–level institutional designs. Such primary rules preserve the autonomy of lower–level institution designers since they can be violated by designing a non–compliant institution. From the can perspective, institutional change enactment is governed by Hart’s secondary legal rules [117, p.81]. These secondary rules define how institutional rules are created and changed, formalised as hard institutional constraints, making (im)possible rule changes in an institution, in Chapter 6. Specifically, secondary rules were formalised as Searle’s constitutive rules. As discussed in the background section, constitutive rules constitute an institution. According to our conceptualisation an institution’s secondary rules constitute the ways in which the institutional rule changes can be enacted. The formalism 182 8. C ONCLUSIONS in Chapter 6 ensures only valid rule changes recognised by the institution can be made representing the actual state of an institution’s rules according to the its own secondary rules. Parallels can be drawn between institutions governing social behaviour, such as formalised in the literature, and the notions of institutions that govern governance defined by this dissertation’s formalisations. In the institution of chess, according to Ricciardi [206], the rules constitute the game. Moves can be physically made outside of chess’ rules, but then the game of chess is not being played. In other words, you cannot cheat at chess. An institution comprising prescriptions (ought statements), such as the law, may be considered as ‘cheatable’ if cheating is defined as the act of violating those prescriptions. An instance of an institution formalised in this dissertation, focussing on institutions involved in governing governance, comprises rules that constitute that institution. Institution designers governed by instances of our institutions can ‘cheat’ with respect to the institutions governing them in one sense and not in another. In our formalisation, you can cheat at institution design in the sense of designing a non–compliant institution (Chapter 3, Chapter 4 and 5), but you cannot cheat at institution design in the sense of enacting rule changes invalidly (Chapter 6). This dissertation formalises both of these kinds of governance. This dissertation argues that it has formalised institutional governing of governance, where regulations regulate how institutions should be designed and how institutional change enactments can be made. 9 A PPENDICES Appendices are available online at http://www.thomascking.com/ dissertation/ThomasKingPhDAppendices.pdf (accessed at time of writing on 14-09-2016). 183 184 R EFERENCES R EFERENCES [1] Padmore v IRC (1987) STC 36 affirmed by the Court of Appeal (1989) STC 493. [2] Ajmeri, N., Jiang, J., Chirkova, R., Doyle, J., and Singh, M. P. (2016). Coco: Runtime Reasoning About Conflicting Commitments. In Proceedings of the 25th International Joint Conference on Artificial Intelligence (IJCAI), pages 1 – 7. [3] Alchourrón, C., Gärdenfors, P., and Makinson, D. (1985). On the logic of theory change: Partial meet contraction and revision functions. Journal of symbolic logic, 50(2):510–530. [4] Aldewereld, H., Álvarez-Napagao, S., Dignum, F., and Vázquez-Salceda, J. (2010). Making Norms Concrete. In Proceedings of the 9th International Conference on Autonomous Agents and Multiagent Systems (AAMAS 2010), pages 807–814. [5] Aldewereld, H. and Dignum, V. (2010). OperettA: Organization-oriented development environment. In International Workshop on Languages, Methodologies and Development Tools for Multi-Agent Systems (LADS’010), pages 1 – 18. [6] Alechina, N., Dastani, M., and Logan, B. (2012). Programming Norm-Aware Agents. In Proceedings of the 11th International Conference on Autonomous Agents and Multiagent Systems (AAMAS 2012), pages 1057–1064. International Foundation for Autonomous Agents and Multiagent Systems. [7] Alechina, N., Dastani, M., and Logan, B. (2013). Reasoning about normative update. In Proceedings of the Twenty Third International Joint Conference on Artificial Intelligence (IJCAI 2013), pages 20–26. AAAI Press. [8] Ancona, D. and Mascardi, V. (2003). Coo-BDI: Extending the BDI Model with Cooperativity. In International Workshop on Declarative Agent Languages and Technologies, pages 109–134. Springer Berlin Heidelberg. [9] Anderson, A. R. (1958). A reduction of deontic logic to alethic modal logic. Mind, 67(265):100–103. [10] Anderson, A. R. and Moore, O. K. (1957). The Formal Analysis of Normative Concepts. American Sociological Review, 22(1):9–17. [11] Anderson, J. E. (1994). Public Policymaking: an introduction. Cengage Learning. [12] Andrighetto, G., Governatori, G., Noriega, P., and van der Torre, L. (2013). Normative Multi-Agent Systems, volume 4. Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik. [13] Antoniou, G., Billington, D., Governatori, G., and Maher, M. (2001). Representation results for defeasible logic. ACM Transactions on Computational Logic, 2(2):255–287. [14] Austin, J. (1832). The Province of Jurisprudence Determined. John Murray, London. [15] Axelrod, R. (1986). An Evolutionary Approach to Norms. The American Political Science Review, 80(4):1095–1111. R EFERENCES 185 [16] Baldoni, M., Baroglio, C., Chopra, A. K., and Singh, M. P. (2015). Composing and Verifying Commitment-Based Multiagent Protocols. In Proceedings of the 24th International Joint Conference on Artificial Intelligence (IJCAI), pages 10–17. AAAI Press. [17] Baral, C. (2003). Knowledge Representation, Reasoning and Declarative Problem Solving. Cambridge University Press. [18] Benzmüller, C. and Woltzenlogel Paleo, B. (2014). Automating Gödel’s ontological proof of god’s existence with higher-order automated theorem provers. In Proceedings of the 2014 European Conference on Artificial Intelligence (ECAI 2014), Frontiers in Artificial Intelligence and Applications 263, pages 93–98. IOS Press. [19] Bex, F. J., Van Koppen, P. J., Prakken, H., and Verheij, B. (2010). A hybrid formal theory of arguments, stories and criminal evidence. Artificial Intelligence and Law, 18(2):123–152. [20] Biagioli, C. (1997). Towards a legal rules functional micro-ontology. In Proceedings of the 1st LegOnt Workshop on Legal Ontologies. [21] Bienvenu, M., Fritz, C., and McIlraith, S. (2006). Planning with Qualitative Temporal Preferences. Proceedings of the Tenth International Conference on the Principles of Knowledge Representation and Reasoning, pages 134–144. [22] Boella, G., Broersen, J., and van der Torre, L. (2008). Reasoning about constitutive norms, counts-as conditionals, institutions, deadlines and violations. In Intelligent Agents and Multi-Agent Systems, 11th Pacific Rim International Conference on MultiAgents, pages 86–97. [23] Boella, G., Governatori, G., Rotolo, A., and van der Torre, L. (2010a). A Logical Understanding of Legal Interpretation. In Principles of Knowledge Representation and Reasoning: Proceedings of the Twelfth International Conference, pages 563–565. [24] Boella, G., Governatori, G., Rotolo, A., and Van Der Torre, L. (2010b). Lex minus dixit quam voluit, lex magis dixit quam voluit: A formal study on legal compliance and interpretation. In AI Approaches to the Complexity of Legal Systems. Complex Systems, the Semantic Web, Ontologies, Argumentation, and Dialogue., pages 162–183. [25] Boella, G., Pigozzi, G., and van der Torre, L. (2009). Normative framework for normative system change. In Proceedings of The 8th International Conference on Autonomous Agents and Multiagent Systems-Volume 1, pages 169–176. International Foundation for Autonomous Agents and Multiagent Systems. [26] Boella, G. and van der Torre, L. (2003). Permissions and obligations in hierarchical normative systems. In Proceedings of the 9th International Conference on Artificial Intelligence and Law, pages 109–118. [27] Boella, G. and van der Torre, L. (2004a). Contracts as Legal Institutions in Organizations of Autonomous Agents. In Proceedings of the Third International Joint Conference on Autonomous Agents and Multiagent Systems-Volume 2 (AAMAS 2004), pages 948 – 955. IEEE Computer Society. 186 R EFERENCES [28] Boella, G. and van der Torre, L. (2004b). Regulative and Constitutive Norms in Normative Multiagent Systems. In Proceedings of 9th International Conference on the Principles of Knowledge Representation and Reasoning (KR’04), pages 255–265. AAAI Press. [29] Boella, G. and van der Torre, L. (2006). Security policies for sharing knowledge in virtual communities. IEEE Transactions on Systems, Man, and Cybernetics - Part A: Systems and Humans, 36(3):439–450. [30] Börzel, T. A. and Risse, T. (2000). Who is Afraid of a European Federation? How to Constitutionalise a Multi-level Governance System. What Kind of Constitution for What Kind of Polity? Responses to Joschka Fischer, pages 45–60. [31] Bratman, M. E. (1987). Intention, Plans and Practical Reason. Harvard University Press. [32] Breuker, J., Valente, A., and Winkels, R. (1997). Legal ontologies: a functional view. In Proceedings of the 1st LegOnt Workshop on Legal Ontologies. [33] Broersen, J., Dignum, F., Dignum, V., and Meyer, J. (2004). Designing a deontic logic of deadlines. Deontic Logic in Computer Science, pages 43–56. [34] Bulling, N., Dastani, M., and Knobbout, M. (2013). Monitoring norm violations in multi-agent systems. In Proceedings of the 2013 International Conference on Autonomous Agents and Multi-agent Systems (AAMAS 2013), pages 491–498. International Foundation for Autonomous Agents and Multiagent Systems. [35] Castañeda, H.-N. (1970). On the semantics of the ought-to-do. Synthese, 21:449–468. [36] Castelfranchi, C. (1995). Commitments: from individual intentions to groups and organizations. Proceedings of the First International Conference on Multiagent Systems, ICMAS 1995, pages 41–48. [37] Castelfranchi, C. (1998). Modeling social actions for AI agents. Artificial Intelligence, 103(January 1997):157–182. [38] Chesani, F., Mello, P., Montali, M., and Torroni, P. (2012). Representing and monitoring social commitments using the event calculus. Autonomous Agents and Multi-Agent Systems (JAAMAS), 27(1):85–130. [39] Chopra, A. K. and Singh, M. P. (2015). Generalized Commitment Alignment. In Proceedings of the 14th International Conference on Autonomous Agents and Multiagent Systems (AAMAS 2015), pages 453–461. [40] Chopra, A. K. and Singh, M. P. (2016). Custard: Computing Norm States over Information Stores. In Proceedings of the 15th International Conference on Autonomous Agents and MultiAgent Systems (AAMAS 2016), pages 1096–1105, Singapore. International Foundation for Autonomous Agents and Multiagent Systems. R EFERENCES 187 [41] Cialdini, R. B., Reno, R. R., and Kallgren, C. A. (1990). A Focus Theory of Normative Conduct: Recycling the Concept of Norms to Reduce Littering in Public Places. Journal of Personality and Social Psychology, 58(6):1015–1026. [42] Cliffe, O. (2007). Specifying and Analysing Institutions in Multi-Agent Systems Using Answer Set Programming. PhD thesis, University of Bath. [43] Cliffe, O., De Vos, M., and Padget, J. (2007). Answer Set Programming for Representing and Reasoning About Virtual Institutions. Computational Logic in Multi-Agent Systems, pages 60–79. [44] Conte, R. and Castelfranchi, C. (1995). Cognitive and Social Action. UCL Press. [45] Corapi, D., Ray, O., Russo, A., Bandara, A., and Lupu, E. (2009). Learning Rules from User Behaviour. Artificial Intelligence Applications and Innovations III, 296:459– 468. [46] Corapi, D., Russo, A., De Vos, M., Padget, J., and Satoh, K. (2011). Normative design using inductive learning. Theory and Practice of Logic Programming, 4-5(11):783–799. [47] Corapi, D., Russo, A., and Lupu, E. (2010). Inductive logic Programming as Abductive Search. In Proceedings of the International Conference on Logic Programming (ICLP), pages 54–63. [48] Council of Europe (1953). European Convention on Human Rights. [49] Criado, N., Argente, E., Noriega, P., and Botti, V. (2013). Reasoning about constitutive norms in BDI agents. Logic Journal of the IGPL, 22(1):66–93. [50] Criado, N., Black, E., and Luck, M. (2015). A coherence maximisation process for solving normative inconsistencies. Autonomous Agents and Multi-Agent Systems (JAAMAS), 30(4):640 – 680. [51] D’Altan, P., Meyer, J.-J. C., and Wieringa, R. J. (1996). An Integrated Framework for Ought-to-Be and Ought-to-Do Constraints. Artificial Intelligence and Law, 4:77–111. [52] Dastani, M. (2008). 2APL: A Practical Agent Programming Language. Autonomous Agents and Multi-Agent Systems (JAAMAS), 16(3):214–248. [53] Dastani, M., Grossi, D., Meyer, J.-J. C., and Tinnemeier, N. (2008). Normative multiagent programs and their logics. In Proceedings of Knowledge Representation for Agents and Multi-Agent Systems (KRAMAS’08), pages 236–243. [54] Dastani, M., van der Torre, L., and Yorke-Smith, N. (2015). Commitments and interaction norms in organisations. Autonomous Agents and Multi-Agent Systems (JAAMAS). [55] De Boer, F. S., Hindriks, K. V., Van Der Hoek, W., and Meyer, J.-J. C. (2000). Agent Programming with Declarative Goals. In Proceedings of the International Workshop on Agent Theories, Architectures, and Languages, pages 228–243. [56] Dennett, D. (1987). The Intentional Stance. Cambridge, MA: MIT Press. 188 R EFERENCES [57] Diaconescu, A. and Pitt, J. (2014). Holonic Institutions for Multi-scale Polycentric Self-governance. Coordination, Organizations, Institutions, and Norms in Agent Systems X, Lecture Notes in Computer Science, 9372:19–35. [58] Dignum, F. (2002). Abstract Norms and Electronic Institutions. In International Workshop on Regulated Agent-Based Social Systems: Theories and Applications (RASTA’02), pages 93 – 104. [59] Dignum, F. and Kuiper, R. (1998). Specifying Deadlines with Dense Time Using Deontic and Temporal Logic. International Journal of Electronic Commerce, 3(2):67– 86. [60] Dignum, F., Weigand, H., and Verharen, E. (1996). Meeting the deadline: on the formal specication of temporal deontic constraints. International Symposium on Methodologies for Intelligent Systems, pages 243–252. [61] Dignum, V. (2003). A Model for Organizational Interaction: Based on Agents, Founded in Logic. PhD thesis, University of Utrecht, Utrecht, The Netherlands. [62] Dignum, V., Vázquez-Salceda, J., and Dignum, F. (2004). OMNI: Introducing Social Structure , Norms and Ontologies into Agent Organizations. In Programming MultiAgent Systems, pages 181–198. Springer Berlin Heidelberg. [63] D’Inverno, M., Luck, M., Noriega, P., Rodriguez-Aguilar, J. a., and Sierra, C. (2012). Communicating Open Systems. Artificial Intelligence, 186:3146–3150. [64] Dutta, P., Aoki, P. M., Kumar, N., Mainwaring, A., Myers, C., Willett, W., and Woodruff, A. (2009). Common sense: participatory urban sensing using a network of handheld air quality monitors. In Proceedings of the 7th ACM conference on embedded networked sensor systems, pages 349–350. [65] Eichener, V. (1997). Effective European problem-solving: lessons from the regulation of occupational safety and environmental protection. Journal of European Public Policy, 4(4):591–608. [66] Eiter, T., Faber, W., Fink, M., and Woltran, S. (2007). Complexity results for answer set programming with bounded predicate arities and implications. Annals of Mathematics and Artificial Intelligence, 51(2-4):123–165. [67] Eiter, T., Faber, W., Leone, N., and Pfeifer, G. (1999). The diagnosis frontend of the dlv system. AI Communications, 12(1):99–111. [68] Emerson, E. (1990). Temporal and modal logic. Handbook of Theoretical Computer Science, B:955–1072. [69] Emerson, E. A. and Halpern, J. Y. (1985). Decision procedures and expressiveness in the temporal logic of branching time. Journal of Computer and System Sciences, 30(1):1–24. R EFERENCES 189 [70] European Court Reports (2014). C-293/12 Digital Rights Ireland Ltd v Minister for Communications, Marine and Natural Resources; Minister for Justice, Equality and Law Reform; Commissioner of the Garda Síochána; Ireland; and The Attorney General and Others. C-594/12 Digital Rights Irela. [71] European Parliament and the Council of the European Union (2006). Directive 2006/24/EC of the European Parliament and of the Council of 15 March 2006 on the retention of data generated or processed in connection with the provision of publicly available electronic communications services or of public communications netwo. [72] European Union (2000). Charter of Fundamental Rights of the European Union 2000/C 364/01. Official Journal of the European Communities. [73] European Union (2008). Consolidated Version of the Treaty on the Functioning of the European Union. [74] Faber, W. and Leone, N. (2007). On the Complexity of Answer Set Programming with Aggregates. In Proceedings of the 9th International Conference on Logic Programming and Nonmonotonic Reasoning (LPNMR’07), pages 97–109, Tempe, Arizona. [75] Faci, N., Modgil, S., Oren, N., Meneguzzi, F., Miles, S., and Luck, M. (2008). Towards a monitoring framework for agent-based contract systems. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), volume 5180 LNAI, pages 292–305. [76] Folsom, R., Lake, R. B., and Nanda., V. P. (1996). European Union Law After Maastricht: Practical Guide for Lawyers Outside the Common Market. Kluwer law international. [77] Fornara, N. (2011). Specifying and monitoring obligations in open multiagent systems using semantic web technology. Semantic Agent Systems, pages 25–45. [78] Fornara, N. and Colombetti, M. (2009). Specifying artificial institutions in the event calculus. Handbook of Research on Multi-Agent Systems: Semantics and Dynamics of Organizational Models, Information science reference, pages 335–366. [79] Fornara, N. and Colombetti, M. (2010). Representation and monitoring of commitments and norms using OWL. AI Communications, 23(4):341–356. [80] Fornara, N., Okouya, D., and Colombetti, M. (2012). Using OWL 2 DL for expressing ACL Content and Semantics. In European Workshop on Multi-Agent Systems, pages 97– 113. [81] Fornara, N., Viganò, F., and Colombetti, M. (2007). Agent communication and artificial institutions. Autonomous Agents and Multi-Agent Systems (JAAMAS), 14(2):121– 142. [82] Fornara, N., Viganò, F., Verdicchio, M., and Colombetti, M. (2008). Artificial institutions: A model of institutional reality for open multiagent systems. Artificial Intelligence and Law, 16(1):89–105. 190 R EFERENCES [83] Forrester, J. W. (1984). Gentle Murder, or the Adverbial Samaritan. The Journal of Philosophy, 81(4):193–197. [84] Frankfurt, H. G. (1971). Freedom of the Will and the Concept of a Person. The Journal of Philosophy, 68(1):5–20. [85] Frey, S., Diaconescu, A., Menga, D., and Demeure, I. (2013). A holonic control architecture for a heterogeneous multi-objective Smart Micro-Grid. 7th IEEE international conference on self-adaptive and self- organizing systems, SASO 2013, pages 21–30. [86] Gabbay, D., Horty, J., Parent, X., van der Meyden, R., and van der Torre, L., editors (2013). Handbook of Deontic Logic and Normative Systems vol. 1. [87] Ganti, R., Ye, F., and Lei, H. (2011). Mobile crowdsensing: current state and future challenges. IEEE Communications Magazine, 49(11):32–39. [88] Gardner, J. (2001). Legal Positivism: 5 1/2 Myths. American Journal of Jurisprudence, 46(1):199–228. [89] Gauci, M., Chen, J., Li, W., Dodd, T. J., and Gross, R. (2014). Clustering objects with robots that do not compute. In Proceedings of the 2014 International Conference on Autonomous agents and multi-agent systems (AAMAS 2014), pages 421–428. International Foundation for Autonomous Agents and Multiagent Systems. [90] Gebser, M., Janhunen, T., Jost, H., Kaminski, R., and Schaub, T. (2015). ASP solving for expanding universes. In International Conference on Logic Programming and Nonmonotonic Reasoning, pages 354–367, Lexington, USA. Springer International Publishing. [91] Gebser, M., Kaufmann, B., and Kaminski, R. (2011). Potassco: The Potsdam answer set solving collection. AI Communications, 24(2):107 – 124. [92] Gelfond, M. (2008). Answer Sets. Foundations of Artificial Intelligence, 3:285–316. [93] Gelfond, M. and Lifschitz, V. (1988). The stable model semantics for logic programming. In Logic Programming: Proceedings of the Fifth International Conference and Symposium, pages 1070 – 1080. [94] Gerard, S. N., Telang, P. R., Kalia, A. K., and Singh, M. P. (2015). Positron: Composing Commitment-Based Protocols. In Proceedings of the 13th IEEE International Conference on Service-Oriented Computing (ICSOC), pages 19 – 35. [95] Ginet, C. (1990). On Action. Cambridge: Cambridge University Press. [96] Goldman, A. (1970). A Theory of Human Action. Englewood Cliffs, NJ: PrenticeHall. [97] Governatori, G. (2005). Representing business contracts in RuleML. International Journal of Cooperative Information Systems, 14(2-3):181–216. R EFERENCES 191 [98] Governatori, G., Hulstijn, J., and Rotolo, A. (2007). Characterising deadlines in Temporal Modal Defeasible Logic. In Proceedings of the 20th Australian Joint Conference on Artificial Intelligence, pages 486–496. [99] Governatori, G., Olivieri, F., Rotolo, A., and Scannapieco, S. (2013). Computing strong and weak permissions in defeasible logic. Journal of Philosophical Logic, 42(6):799–829. [100] Governatori, G., Palmirani, M., Riveret, R., Rotolo, A., and Sartor, G. (2005a). Norm modifications in defeasible logic. In Legal Knowledge and Information Systems (JURIX 2005), pages 13–22. IOS Press. [101] Governatori, G. and Rotolo, A. (2009). How Do Agents Comply with Norms? In Proceedings of the 2009 IEEE/WIC/ACM International Joint Conference on Web Intelligence and Intelligent Agent Technology, pages 488–491. IEEE Computer Society. [102] Governatori, G. and Rotolo, A. (2010). Changing Legal Systems: Legal Abrogations and Annulments in Defeasible Logic. Logic Journal of IGPL, 18:157–194. [103] Governatori, G., Rotolo, A., and Sartor, G. (2005b). Temporalised normative positions in defeasible logic. In Proceedings of the 10th international conference on Artificial intelligence and law, pages 25 – 34, New York, New York, USA. ACM Press. [104] Grant, J. and Hunter, A. (2016). Analysing inconsistent information using distancebased measures. International Journal of Approximate Reasoning. [105] Grossi, D. (2008). Pushing Anderson’s Envelope: The Modal Logic of Ascription. In 9th International Conference on Deontic Logic in Computer Science (DEON 2008), pages 263–277. [106] Grossi, D. (2011). Norms as ascriptions of violations: An analysis in modal logic. Journal of Applied Logic, 9(2):95–112. [107] Grossi, D., Aldewereld, H., and Dignum, F. (2007). Ubi lex, ibi poena: Designing norm enforcement in e-institutions. In Coordination, organizations, institutions, and norms in agent systems II, pages 101 – 114. Springer Berlin Heidelberg. [108] Grossi, D., Aldewereld, H., Vázquez-Salceda, J., and Dignum, F. (2006a). Ontological aspects of the implementation of norms in agent-based electronic institutions. Computational and Mathematical Organization Theory, 12:251–275. [109] Grossi, D. and Dignum, F. (2005). From abstract to concrete norms in agent institutions. In Formal Approaches to Agent-Based Systems, pages 12–29. [110] Grossi, D., Meyer, J.-J., and Dignum, F. (2005). Modal logic investigations in the semantics of counts-as. In Proceedings of the 10th international conference on Artificial intelligence and law (ICAIL ’05), pages 1–19. ACM. 192 R EFERENCES [111] Grossi, D., Meyer, J.-J. C., and Dignum, F. (2006b). Counts-as: Classification or constitution? An answer using modal logic. Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), 4048 LNAI:115–130. [112] Grossi, D., Meyer, J. J. C., and Dignum, F. (2008). The many faces of counts-as: A formal analysis of constitutive rules. Journal of Applied Logic, 6(2):192–217. [113] Günay, A. and Yolum, P. (2012). Detecting conflicts in commitments. Declarative Agent Languages and Technologies IX, pages 51–66. [114] Hansson, S. O. (2013). 79(4):287–289. Formal Philosophy - A Guarded Defence. Theoria, [115] Hardin, G. (1968). The Tragedy of the Commons. Science, 162(3859):1243–1248. [116] Harel, D., Tiuryn, J., and Kozen, D. (1984). Dynamic logic. In Gabbay, D. and Guenthner, F., editors, Handbook of Philosophical Logic, volume 2, chapter 10, pages 497–604. Reidel, Dordrecht. [117] Hart, H. L. A. (1961). The Concept of Law. Clarendon Press., Oxford. [118] Hewitt, C. E. (1986). Offices Are Open Systems. ACM Transactions of Office Automation Systems, 4(3):271–287. [119] Hindriks, K. V., de Boer, F. S., van der Hoek, W., and Meyer, J.-J. C. (2000). A Programming Logic for Part of the Agent Language 3APL, volume 78-89. Springer Berlin Heidelberg. [120] Hohfeld, W. N. (1913). Some Fundamental Legal Conceptions as Applied in Judicial Reasoning. The Yale Law Journal, 23(1):16 – 59. [121] Hooghe, L. and Marks, G. (2003). Unraveling the central state, but how? Types of multi-level governance. American political science review, 97(2):233–243. [122] Horty, J. F. and Belnap, N. (1995). The deliberative stit: A study of action, omission, ability, and obligation. Journal of Philosophical Logic, 24(6):583–644. [123] Hübner, J., Sichman, J., and Boissier, O. (2004). Using the Moise+ for a Cooperative Framework of MAS Reorganisation. In 17th Brazilian Symposium on Artificial Intelligence (SBIA’04), pages 506–515, Berlin. [124] Hübner, J., Sichman, J., and Boissier, O. (2007). Developing organised multiagent systems using the MOISE+ model: programming issues at the system and agent levels. International Journal of Agent-Oriented Software Engineering, 1(3):370–395. [125] Hübner, J. F., Sichman, J. S., and Boissier, O. (2005). S-Moise+ : A Middleware for developing Organised Multi-Agent Systems. Coordination, Organization, Institutions and Norms I. LNAI., 3913:64—-78. R EFERENCES 193 [126] Hull, B., Bychkovsky, V., Zhang, Y., Chen, K., Goraczko, M., Miu, A., Shih, E., Balakrishnan, H., and Madden, S. (2006). Cartel: a distributed mobile sensor computing system. In Proceedings of the 4th international conference on Embedded networked sensor systems, pages 125–138. ACM. [127] Hunter, A., Parsons, S., and Wooldridge, M. (2014). Measuring Inconsistency in Multi-Agent Systems. KI - Künstliche Intelligenz, 28(3):169–178. [128] Jensen, A. S., Dignum, V., and Villadsen, J. (2014). The AORTA architecture: Integrating organizational reasoning in Jason. In International Workshop on Engineering Multi-Agent Systems, pages 112–128. Springer International Publishing. [129] Jensen, A. S., Dignum, V., and Villadsen, J. (2015). A framework for organizationaware agents. In Proceedings of the 2016 International Conference on Autonomous Agents & Multiagent Systems (AAMAS 2016), pages 1133 – 1134. Springer US. [130] Jiang, J. (2015). Organizational Compliance: An Agent-based Model for Designing and Evaluating Organizational Interactions. PhD thesis, TU Delft, Delft University of Technology. [131] Jiang, J., Aldewereld, H., Dignum, V., and Tan, Y.-H. (2012). Norm Contextualization. In International Workshop on Coordination, Organizations, Institutions, and Norms in Agent Systems (COIN 2012), pages 141 – 157. Springer Berlin Heidelberg. [132] Jiang, J., Dignum, V., Tan, Y., and Overbeek, S. (2011). A Context-Aware Interorganizational Collaboration Model Applied to International Trade. In International Conference on Electronic Government, pages 308–319. Springer Berlin Heidelberg. [133] Jiang, J., Pitt, J., and Diaconescu, A. (2015). Rule Conflicts in Holonic Institutions. In 2015 IEEE International Conference on Self-Adaptive and Self-Organizing Systems Workshops, pages 49–54. IEEE. [134] Jones, A. J. I. and Sergot, M. (1992). Deontic logic in the representation of law: Towards a methodology. Artificial Intelligence and Law, 1(1):45–64. [135] Jones, A. J. I. and Sergot, M. (1993). On the Characterisation of Law and Computer Systems: The Normative Systems Perspective. In Deontic Logic in Computer Science: Normative System Specification, pages 275–307. John Wiley & Sons. [136] Jones, A. J. I. and Sergot, M. (1996). A Formal Characterisation of Institutionalised Power. Journal of IGPL, 4(3):427–443. [137] Kanger, S. (1971). New Foundations for Ethical Theory. Deontic Logic: Introductory and Systematic Readings, pages 36 – 58. [138] Kanger, S. (1972). Law and Logic. Theoria, 38:105 – 132. [139] Kanger, S. (1985). On Realization of Human Rights Kanger. Action, Logic and Social Theory, 38. 194 R EFERENCES [140] Kanger, S. and Kanger, H. (1966). Rights and Parliamentarianism. Theoria, 32:85– 115. [141] Kim, T.-w., Lee, J., and Palla, R. (2009). Circumscriptive Event Calculus as Answer Set Programming. In Proceedings of the International Joint Conference on Artificial Intelligence (IJCAI 2009), pages 823 – 829. [142] King, T. C. (2015). Governing Government: A Framework for Multi-tier Institution Specification and Reasoning (Doctoral Consortium). In Proceedings of the 2015 International Conference on Autonomous Agents and Multiagent Systems (AAMAS 2015), pages 2011 – 2012. International Foundation for Autonomous Agents and Multiagent Systems. [143] King, T. C., Dignum, V., and Jonker, C. M. (2016a). When Do Rule Changes Countas Legal Rule Changes? In Proceedings of the 22nd European Conference on Artificial Intelligence (ECAI 2016). Frontiers in Artificial Intelligence and Applications. Vol 285., pages 3 – 11. IOS Press. [144] King, T. C., Li, T., De Vos, M., Dignum, V., Jonker, C. M., Padget, J., and Riemsdijk, M. B. V. (2015a). A Framework for Institutions Governing Institutions. In Proceedings of the 2015 International Conference on Autonomous Agents and Multiagent Systems (AAMAS 2015), pages 473–481, Istanbul, Turkey. International Foundation for Autonomous Agents and Multiagent Systems. [145] King, T. C., Li, T., Vos, M. D., Jonker, C. M., Padget, J., and Riemsdijk, M. B. V. (2016b). Revising Institutions Governed by Institutions for Compliant Regulations. Coordination, Organizations, Institutions, and Normes in Agent Systems XI: COIN 2015 International Workshops, COIN@ AAMAS, Istanbul, Turkey, May 4, 2015, COIN@ IJCAI, Buenos Aires, Argentina, July 26, 2015, Revised Selected Papers., 9628:191 – 208. [146] King, T. C., Liu, Q., Polevoy, G., de Weerdt, M., Dignum, V., van Riemsdijk, M. B., and Warnier, M. (2014). Request Driven Social Sensing (Demonstration). In Lomuscio, A., Scerri, P., Bazzan, A., and Huhns, M., editors, Proceedings of the 2014 International Conference on Autonomous Agents and Multiagent Systems (AAMAS 2014), pages 1651 – 1652, Paris, France. International Foundation for Autonomous Agents and Multiagent Systems. [147] King, T. C., Riemsdijk, M. B. V., Dignum, V., and Jonker, C. M. (2015b). Supporting Request Acceptance with Use Policies. In Coordination, Organizations, Institutions, and Norms in Agent Systems X: COIN 2014 International Workshops, COIN@ AAMAS, Paris, France, May 6, 2014, COIN@ PRICAI, Gold Coast, QLD, Australia, December 4, 2014, Revised Selected Papers, pages 114 – 131. Springer. [148] Knobbout, M., Dastani, M., and Meyer, J.-j. C. (2014). Reasoning about Dynamic Normative Systems. In European Workshop on Logics in Artificial Intelligence, pages 628–636. [149] Kollingbaum, M. J., Vasconcelos, W. W., García-Camino, A., and Norman, T. J. (2007). Managing conflict resolution in norm-regulated environments. In International R EFERENCES 195 Workshop on Engineering Societies in the Agents World, pages 55 – 71. Springer Berlin Heidelberg. [150] Kowalski, R. and Sergot, M. (1986). A logic-based calculus of events. New Generation Computing, 4(1):67–95. [151] Lafage, C. and Lang, J. (2001). Propositional Distances and Preference Representation. In Symbolic and Quantitative Approaches to Reasoning with Uncertainty, ECSQARU’01, pages 48–59. [152] Lee, J., Padget, J., Logan, B., Dybalova, D., and Alechina, N. (2014). N-Jason: Runtime norm compliance in AgentSpeak(L). Engineering Multi-Agent Systems, 8758:367– 387. [153] Leibniz, G. W. (1685). The Art of Discovery. [154] Li, T. (2014). Normative Conflict Detection and Resolution in Cooperating Institutions. PhD thesis, University of Bath. [155] Li, T., Balke, T., De Vos, M., Padget, J., and Satoh, K. (2013a). Legal Conflict Detection in Interacting Legal Systems. In 1st International Jurix Doctoral Consortium and Poster Sessions, JURIX-DoCoPe 2013, in Conjunction with the 26th International Conference on Legal Knowledge and Information Systems, JURIX 2013. [156] Li, T., Balke, T., De Vos, M., Satoh, K., and Padget, J. (2013b). Detecting conflicts in legal systems. New Frontiers in Artificial Intelligence, pages 174 – 189. [157] Li, T., Vos, M. D., Padget, J., Satoh, K., and Balke, T. (2015). Debugging ASP using ILP. In Technical Communcations of International Conference of Logic Programming 2015. [158] Liu, Q., Dulman, S., and Warnier, M. (2013). AREA: an Automatic Runtime Evolutionary Adaptation mechanism for Creating Self-Adaptation Algorithms in Wireless Networks. In Spatial Computing, the 6th International Workshop, colocated with AAMAS 2013, pages 23 – 28, Saint Paul, MN. [159] López, F. L. Y. and Luck, M. (2003). Modelling Norms for Autonomous Agents. In Proceedings of The Fourth Mexican Conference on Computer Science, pages 238–245. IEEE Computer Society. [160] López, F. L. y., Luck, M., and D’Inverno, M. (2006). A normative framework for agent-based systems. Computational and Mathematical Organization Theory, 12(23):227–250. [161] Lowe, E. (2008). Personal Agency: The Metaphysics of Mind and Action. Oxford: Oxford University Press. [162] Lu, H., Pan, W., Lane, N., Choudhury, T., and Campbell, A. (2009). SoundSense: scalable sound sensing for people-centric applications on mobile phones. In Proceedings of the 7th international conference on Mobile systems, applications, and services, pages 165–178. 196 R EFERENCES [163] Makinson, D. (1986). On the Formal Representation of Rights Relations. Journal of Philosophical Logic, 15:403–425. [164] Makinson, D. (1999). On a Fundamental Problem of Deontic Logic. Norms, Logics and Information Systems. New Studies in Deontic Logic and Computer Science, pages 29–53. [165] Makinson, D. and van der Torre, L. (2003). What is input/output logic? Trends in Logic, 17:163–174. [166] Marks, G. (1993). Structural Policy and Multilevel Governance in the European Community. [167] Max Knobbout (2016). Logics for Modelling and Verifying Normative Multi-Agent Systems. PhD thesis, Utrecht University. [168] McNamara, P. (2014). Deontic Logic. In Zalta, E. N., editor, The Stanford Encyclopedia of Philosophy. The Metaphysics Research Lab Center for the Study of Language and Information, Stanford University Stanford, CA 94305-4115, winter 201 edition. [169] Mele, A. (2003). Motivation and Agency. Oxford: Oxford University Press. [170] Meneguzzi, F. and Luck, M. (2009). Norm-based behaviour modification in BDI agents. In Proceedings of the eighth International Joint Conference on Autonomous Agents and Multi-agent Systems (AAMAS 2009), pages 177–184. [171] Meneguzzi, F., Modgil, S., Oren, N., and Miles, S. (2012). Applying electronic contracting to the aerospace aftercare domain. Engineering Applications of Artificial Intelligence, 25(7):1471–1487. [172] Merriam-Webster Online. Compliance - www.merriam-webster.com. Accessed on 2016-06-25. [173] Miller, S. (2014). Social Institutions. In Zalta, E. N., editor, The Stanford Encyclopedia of Philosophy. The Metaphysics Research Lab Center for the Study of Language and Information, Stanford University Stanford, CA 94305-4115, winter 201 edition. [174] Mitchell., R. B. (1996). Compliance theory: an overview. Improving compliance with international environmental law, pages 3–28. [175] Modgil, S., Faci, N., and Meneguzzi, F. (2009). A framework for monitoring agentbased normative systems. In Proceedings of The 8th International Conference on Autonomous Agents and Multiagent Systems-Volume 1 (AAMAS 2009), pages 153–160. International Foundation for Autonomous Agents and Multiagent Systems. [176] Morales, J., López-Sánchez, M., and Esteva, M. (2011). Using experience to generate new regulations. In IJCAI’11 Proceedings of the Twenty-Second international joint conference on Artificial Intelligence, number 2011, pages 307–312. ACM. R EFERENCES 197 [177] Morales, J., Lopez-Sanchez, M., Rodriguez-Aguilar, J. A., Wooldridge, M., and Vasconcelos, W. (2013). Automated synthesis of normative systems. In Proceedings of the 12th International Conference on Autonomous Agents and Multi-agent Systems (AAMAS 2013), pages 483–490. [178] Morales, J., Lopez-Sanchez, M., Rodriguez-Aguilar, J. A., Wooldridge, M., and Vasconcelos, W. (2014). Minimality and Simplicity in the On-line Automated Synthesis of Normative Systems. In Proceedings of the 13th International Conference on Autonomous Agents and Multi-agent Systems (AAMAS 2014), pages 109–116. [179] Moretti, A. (2009). The Geometry of Logical Opposition. PhD thesis, University of Neuchâtel. [180] Muggleton, S. (1995). Inverse entailment and Progol. New generation computing, 13(3-4):245–286. [181] Newig, J. and Fritsch, O. (2009). Environmental governance: Participatory, multilevel - and effective? Environmental policy and governance, 19(3):197 – 214. [182] North, D. C. (1990). Institutions, institutional change and economic performance. Cambridge university press. [183] Nute, D. (1987). Defeasible logic. Handbook of Logic in Artificial Intelligence and Logic Programming, 3. [184] O’Connor, T. (2000). Persons and Causes: The Metaphysics of Free Will. Oxford: Oxford University Press. [185] Ostrom, E. (1990). Governing the commons: The evolution of institutions for collective action. Cambridge University Press, Cambridge, UK. [186] Ostrom, E. (2005). Understanding institutional diversity. Princeton University Press. [187] Ostrom, E. (2009). A general framework for analyzing sustainability of socialecological systems. Science (New York, N.Y.), 325(5939):419–22. [188] Ostrom, E. (2011). Thinking About Climate Change as a Commons. In 15th Annual Philip Gamble Memorial Lecture, pages 1–34, UMass Amherst. [189] Overeem, A., Leijnse, H., and Uijlenhoet, R. (2013a). Country-wide rainfall maps from cellular communication networks. Proceedings of the National Academy of Sciences of the United States of America, 110(8):2741–2745. [190] Overeem, A., R. Robinson, J. C., Leijnse, H., Steeneveld, G. J., P. Horn, B. K., and Uijlenhoet, R. (2013b). Crowdsourcing urban air temperatures from smartphone battery temperatures. Geophysical Research Letters, 40(15):4081–4085. [191] Oxford Dictionaries Online. Paragon - www.oxforddictionaries.com. Accessed on 2016-04-28. [192] Parliament of the United Kingdom (2008). Finance Act 2008, Chapter 9. 198 R EFERENCES [193] Pellizzoni, L. (2003). Uncertainty and participatory democracy. Environmental Values, 12(2):195–224. [194] Pieters, W., Padget, J., and Dechesne, F. (2013). Obligations to enforce prohibitions: on the adequacy of security policies. In Proceedings of the 6th International Conference on Security of Information and Networks, pages 54–61. [195] Pieters, W., Padget, J., Dechesne, F., Dignum, V., and Aldewereld, H. (2015). Effectiveness of qualitative and quantitative security obligations. Journal of Information Security and Applications, 22:3 – 16. [196] Pinker, S., Bizzi, E., Brenner, S., Chomsky, N., Minsky, M., Partee, B. H., and Winston, P. H. (2016). The Golden Age – A Look at the Original Roots of Artificial Intelligence, Cognitive Science, and Neuroscience (partial transcript). [197] Pitt, J. and Artikis, A. (2015). The open agent society: retrospective and prospective views. Artificial Intelligence and Law, 23(3):241 – 270. [198] Pitt, J. and Diaconescu, A. (2015). Structure and Governance of Communities for the Digital Society. In IEEE International Conference on Autonomic Computing (ICAC), pages 279–284. [199] Pnueli, A. (1977). The Temporal Logic of Programs. In Foundations of Computer Science, 1977., 18th Annual Symposium on, pages 46–57. IEEE. [200] Prakken, H. and Sartor, G. (1996). A dialectical model of assessing conflicting arguments in legal reasoning. Artificial Intelligence and Law, 4:331–368. [201] Prakken, H. and Sergot, M. (1996). Contrary-to-duty obligations. Studia Logica, 57(1):91–115. [202] Rao, A. S. (1996). AgentSpeak(L): BDI Agents speak out in a logical computable language. In European Workshop on Modelling Autonomous Agents in a Multi-Agent World, pages 42 – 55. Springer Berlin Heidelberg. [203] Reiter, R. (1980). A logic for default reasoning. Artificial Intelligence, 13(1-2):81– 132. [204] Republic of Italy (1947). Constitution of the Italian Republic. [205] R.H.Bordini, J.F.Hubner, and M.Wooldridge (2007). Programming Multi-Agent Systems in AgentSpeak Using Jason. John Wiley & Sons. [206] Ricciardi, M. (1997). Constitutive rules and institutions. In meeting of the Irish Philosophical Club, Ballymascanlon. [207] Ross, A. Tû-Tû. Harvard Law Review (1956 - 1957), 70:812–825. [208] Ruiter, D. (1997). A basic classification of legal institutions. Ratio Juris, 10(4):357 – 372. R EFERENCES 199 [209] Ryu, Y. U. and Lee, R. M. (1994). Defeasible deontic reasoning: A logic programming model. In Deontic logic in computer science, pages 225–241. John Wiley and Sons Ltd. [210] Scharpf, F. W. (1997). Introduction: the problem-solving capacity of multi-level governance. Journal of European Public Policy, 4(4):520–538. [211] Schlosser, M. (2015). Agency. In Zalta, E. N., editor, The Stanford Encyclopedia of Philosophy (Fall 2015 Edition). The Metaphysics Research Lab Center for the Study of Language and Information, Stanford University Stanford, CA 94305-4115. [212] Searle, J. R. (1964). How to Derive “Ought” from “Is”. The Philosophical Review, 73(1):43–58. [213] Searle, J. R. (1969). Speech acts: An essay in the philosophy of language. Cambridge university press. [214] Searle, J. R. (1995). The Construction of Social Reality. The Free Press, New York. [215] Searle, J. R. (2005). What is an institution? Journal of Institutional Economics, 1:1–22. [216] Sergot, M. (1988). Representing legislation as logic programs. Oxford University Press. [217] Sergot, M. J. (1982). Prospects for representing the law as logic programs. Logic Programming, pages 33–42. [218] Shams, Z., Vos, M. D., Oren, N., and Padget, J. (2016). Normative Practical Reasoning via Argumentation and Dialogue. In Proceedings of the 25th International Conference on Artificial Intelligence. AAAI Press. [219] Smith, M. E. (2004). Toward a Theory of EU Foreign Policy Making: Multi-level Governance, Domestic Politics, and National Adaptation to Europe’s Common Foreign and Security Policy. Journal of European Public Policy, 11(4):740–758. [220] Suber, P. (1990). The Paradox of Self-Amendment: A Study of Law, Logic, Omnipotence, and Change. Peter Lang International Academic Publishers. [221] The United States of America. The United States Constitution. [222] Tinnemeier, N. A. M., Dastani, M. M., Meyer, J. J. C., and Van Der Torre, L. (2009). Programming normative artifacts with declarative obligations and prohibitions. Proceedings - 2009 IEEE/WIC/ACM International Conference on Intelligent Agent Technology, IAT 2009, 2:145–152. [223] Tosatto, S. C., Boella, G., van der Torre, L., and Villata, S. (2012a). Abstract Normative Systems: Semantics and Proof Theory. In Principles of Knowledge Representation and Reasoning: Proceedings of the Thirteenth International Conference, pages 358– 368. 200 R EFERENCES [224] Tosatto, S. C., Boella, G., Van Der Torre, L., and Villata, S. (2012b). Visualizing normative systems: An abstract approach. In International Conference on Deontic Logic in Computer Science, pages 16–30. Springer Berlin Heidelberg. [225] Turing, A. M. (1936). On computable numbers, with an application to the Entscheidungsproblem. Proceedings of the London Mathematics Society, 42(2):230–265. [226] UK (2009). The Data Retention (EC Directive) Regulations 2009, No. 859. [227] United States Federal Law (1998). Children’s Online Privacy Protection Act. [228] van der Torre, L. (1997). Reasoning about obligations: defeasibility in preferencebased deontic logic. PhD thesis, Erasmus University Rotterdam. [229] van der Torre, L. and Tan, Y. (1998). The temporal analysis of Chisholm’s paradox. In Proceedings of the Fifteenth National Conference on Artificial Intelligence (AAAI’98), pages 650–655. [230] van der Torre, L. and Tan, Y. (1999). Contrary-to-duty reasoning with preferencebased dyadic obligations. Annals of Mathematics and Artificial Intelligence, 27 (1-4):49– 78. [231] Vasconcelos, W., Kollingbaum, M. J., and Norman, T. J. (2007). Resolving conflict and inconsistency in norm-regulated virtual organizations. In Proceedings of the 6th International Joint Conference on Autonomous Agents & Multiagent Systems (AAMAS 2007), pages 632–639, New York, New York, USA. IFAAMAS. [232] Vasconcelos, W. W., Kollingbaum, M. J., and Norman, T. J. (2008). Normative conflict resolution in multi-agent systems. Autonomous Agents and Multi-Agent Systems (JAAMAS), 19(2):124–152. [233] Vazquez-Salceda, J. (2003). The role of norms and electronic institutions in multiagent systems applied to complex domains. The HARMONIA framework. PhD thesis, Technical University of Catalonia. [234] von Wright, G. (1951). Deontic logic. Mind, 60(237):1–15. [235] von Wright, G. (1968). An essay in deontic logic and the general theory of action. Acta Philosophica Fennica, 21. [236] von Wright, G. H. (1983). Norms of Higher Order. Studia Logica, 42(119). [237] Wansing, H. (1998). Nested deontic modalities: Another view of parking on highways. Erkenntnis, 49(2):185–199. [238] Wilson, D. S., Ostrom, E., and Cox, M. E. (2013). Generalizing the core design principles for the efficacy of groups. Journal of Economic Behavior and Organization, 90. [239] Wittgenstein, L. (1958). Philosophical Investigations. Blackwell Publishers. R EFERENCES 201 [240] Wooldridge, M. (2002). An Introduction to Multi-Agent Systems. Wiley. [241] Wooldridge, M. and Jennings, N. R. (1995). Intelligent agents: theory and practice. [242] Yearley, S., Cinderby, S., Forrester, J., Bailey, P., and Rosen, P. (2003). Participatory modelling and the local governance of the politics of UK air pollution: A three-city case study. Environmental Values, 12(2):247–262. [243] Yolum, P. and Singh, M. (2004). Reasoning about commitments in the event calculus: An approach for specifying and executing protocols. Annals of Mathematics and Artificial Intelligence, 42(1-3):227–253. [244] Zuckerman, H. S. (1979). Multi-Institutional Systems: Promise and Performance. Inquiry, 16(4):291–314. ACKNOWLEDGEMENTS This dissertation came about through periods of frenzy and pauses for thought, apathy and persistence, ignorance and exploration, disorientation and discovery, and disagreement and acquiescence. I cannot say I found the process particularly easy. However, “omelets are not made without breaking eggs”. Although not something I completely agree with, the man who coined the phrase (François de Charette) was executed in 1796 for breaking too many eggs, I sympathise with short–term difficulties being necessary for certain ends. Those end results are not just papers, presentations and propositions, but also personal progress in acquiring more practical perspectives. One such perspective was becoming tolerant of my work being “naïve”, such as by not capturing all aspects of a particular concept. Naïve work can help our understanding, as the field of Deontic Logic has shown through decades of conceptual changes and refinements. The Japanese aesthetic of Wabi Sabi encapsulates such a view, where transience and imperfection are sought and not fought. That outlook extends to people, including myself, as much as it applies to technical work. Moreover, it may be that if the response to a difficult position is not fight then it is flight, persistently tolerating issues is important – perhaps this all sounds clichéd, but the grass is always greener on the other side. Acknowledging and eventually feeling that not every problem is to be (re)solved, meant that the final work and paper were a walk in the park. Getting to that point, it must be emphasised, was not a solitary effort. There are many people that, in ways small and big, shaped my personal and research outlook in constructive ways and helped to ensure that the outcome was overall positive. I would therefore like to segue to thanking some of those people that helped me along the way. Firstly, I would like to thank, in no particular order, my supervisory team comprising my promotor Prof. dr. Catholijn M. Jonker, and copromotors Dr. Birna van Riemsdijk and Dr. Virginia Dignum for their support, discussion and useful comments. Catholijn, thank you for giving me the opportunity to study at Interactive Intelligence – a research group that is both positively diverse in people and research topics – for having confidence when things were not going well, and for helping me with career advice and the next steps towards the end. Birna, thank you for giving me time to discover my research interests, putting together a diverse and open ended project, emphasising simplicity (but not too simple!) over complexity and helping me through the early stages of learning formal work. Virginia, thank you for helping me in understanding where and when to stop solving a large problem and start focussing on solving a small problem well, ensuring different aspects of my research were more modular than iterative, and especially, thank you for understanding and resolving seemingly insurmountable difficulties. Of course, there is more to thank for, but I feel these aspects were at the core of getting me to the end. Moreover, I would like to extend my thanks to my mentor, Dr. Klaas Pieter Hart. Although we met infrequently, Klaas listened during times of strife, gave practical advice and, much to my reassurance, validated my concerns. Special thanks to the examination committee: Prof. dr. Katie Atkinson, Prof. dr. 203 204 ACKNOWLEDGEMENTS Frances Brazier, Prof. dr. Jeremy Pitt and Prof. dr. Leon van der Torre. Thank you for reading my dissertation. Moreover, thank you Katie Atkinson for the remarks, they helped with clarification and it is good to know there is agreement on the dissertation’s contributions and shortcomings. Thank you Leon van der Torre for the detailed comments, they helped to better position the work and gave useful insights into nascent research topics. I would also like to thank Dr. Tingting Li, Dr. Julian Padget and Dr. Marina de Vos for the collaborative research and co–authorships. In particular, thank you for being so welcoming when I visited Bath, introducing me to your research on institutions and your overall approach. Our co–authorships greatly influenced my dissertation and research. I’d also like to thank everyone who was involved in the SHINE multi–disciplinary project under which this research was conducted. Especially, I’d like to thank the SHINE PhD/postdoc researchers – Qingzhi Liu, Dr. Paolo Palmieri, Gleb Polevoy, Venkat Roy and Sergio Velasco – for the enjoyable project meetings and finding ways to work together. I was between two departments during my PhD. First, I would like to thank all of my wonderful colleagues at the ICT section of TBM and the Interactive Intelligence group of EWI, there are too many to mention so thank you all. Both groups were diverse in research topics and people, so thank you for widening my personal and research perspectives. I would specifically like to thank my TBM office–mates: Jie Jiang and Janneke van der Zwaan for discussing common problems encountered, being so welcoming and thank you Jie for those early days explaining the area as a whole and what you thought I needed to do to get started. I would also like to thank Virginia’s latest PhD students (at the time of writing), Klara Pigmans and Rijk Mercuur for the interesting discussions about their own research and perspectives, which I look forward to continuing. I would also like to thank my II office mates: Alex Kayal for his anecdotes and banter, Marieke Peeters for listening to my cynicism and countering it with research rigour, and Wenxin Wang for conversing about family and showing it can coincide with work. Moreover, I would like to thank the following inspiring individuals for helping with the softer problems encountered: Reyhan Aydogan for her positivity and emphasis on work–life balance, Chris Detweiler for his dry humour and relateability, Maaike Harbers for her outgoing enthusiasm and compassion, Max Knobbout for his insightful knowledge and openness, Arman Noroozian for his academic enthusiasm and rational calmness, and Vanessa Vakili for her grounded outlook and sympathetic listening. Moreover, I would also like to thank from the II group Fawad Khan for helping with implementation, and Wouter Pasman with helping me to resolve code problems and for always having an alternative take on things. Thank you Anita Hoogmoed and Caroline de Wit for always being willing to help with organisational matters and maintaining a cheerful state. I’d like to thank Ruud de Jong and Bart Vastenhouw for happily assisting in technical matters (and also Ruud for the vast coffee supplies). My long–time friend Sonal Sodha/Keay was there for me during the difficult times. Moreover, long long before I even embarked on my PhD she gave me a sharp push that helped me get to where I am now. Thank you, Sonal. Finally, I would like to thank my wonderful life partner, Ruta, for always being there for me, providing both joy and support. Thank you for all of the adventures helping me to get away from work and for being understanding when all I could do was work. Thank you for your love and support – I could not have done it without you Ruta, I love you insanely. C URRICULUM V ITAE Thomas C. King was born on June 18, 1987 in London, United Kingdom. He began studying for a Bachelors in Computer Science in 2008 at King’s College London (KCL). He postponed his Bachelors’ studies, after two years whereupon he worked as a software developer and architect for UBS. Thomas resumed his studies one year later during which he became interested in AI, in particular on logic based approaches to topics such as belief and change. He completed his Bachelors at KCL, First Class with Honours, and was awarded the best KCL Computer Science dissertation of 2012. He then decided to pursue his interests in AI further by undertaking a PhD. Having considered a PhD in sub–symbolic AI such as genetic algorithms or symbolic AI choosing symbolic AI, he chose the latter focusing on normative reasoning, having become interested in ascribing meaning with tangible and precise conceptualisations. His PhD research was conducted from 2012 until 2016 at TU Delft, on formalising institutions, in the philosophical and legal sense (e.g. conventions, laws, contracts and promises), with a focus on institutions that ascribe and regulate the creation and behaviour of other institutional rules. Thomas enjoyed attending and presenting his work at numerous conferences and workshops, as well as making research visits to the University of Bath, gaining an interest in the combination of practical and conceptual work on normative reasoning as a result. Hence – in order to pursue the combination of practical and formal work further – from September 2016, Thomas started working at the School of Computing and Communications of Lancaster University, United Kingdom, as a post–doctoral Senior Research Associate researching social commitment reasoning as an abstraction for: databases, decentralising software and verifying potential agent interactions. 205 SIKS D ISSERTATION S ERIES 2016-41 Thomas C King (TUD), Governing Governance: A Formal Framework for Analysing Institutional Design and Enactment Governance. 2016-40 Christian Detweiler (TUD), Accounting for Values in Design. 2016-39 Merijn Bruijnes (UT), Believable Suspect Agents; Response and Interpersonal Style Selection for an Artificial Suspect. 2016-38 Andrea Minuto (UT), MATERIALS THAT MATTER - Smart Materials meet Art & Interaction Design. 2016-37 Giovanni Sileno (UvA), Aligning Law and Action - a conceptual and computational inquiry. 2016-36 Daphne Karreman (UT), Beyond R2D2: The design of nonverbal interaction behavior optimized for robot-specific morphologies. 2016-35 Zhaochun Ren, Monitoring Social Media: Summarization, Classification and Recommendation. 2016-34 Dennis Schunselaar (TUE), Title: Configurable Process Trees: Elicitation, Analysis, and Enactment. 2016-33 Peter Bloem (UVA), Single Sample Statistics, exercises in learning from just one example. 2016-32 Eelco Vriezekolk (UT), Assessing Telecommunication Service Availability Risks for Crisis Organisations. 2016-31 Mohammad Khelghati (UT), Deep web content monitoring. 2016-30 Ruud Mattheij (UvT), The Eyes Have It. 2016-29 Nicolas Höning (TUD), Peak reduction in decentralised electricity systems -Markets and prices for flexible planning. 2016-28 Mingxin Zhang (TUD), Large-scale Agent-based Social Simulation - A study on epidemic prediction and control. 2016-27 Wen Li (TUD), Understanding Geo-spatial Information on Social Media. 2016-26 Dilhan Thilakarathne (VU), In or Out of Control: Exploring Computational Models to Study the Role of Human Awareness and Control in Behavioural Choices, with Applications in Aviation and Energy Management Domains. 2016-25 Julia Kiseleva (TU/e), Using Contextual Information to Understand Searching and Browsing Behavior. 2016-24 Brend Wanders (UT), Repurposing and Probabilistic Integration of Data; An Iterative and data model independent approach. 2016-23 Fei Cai (UVA), Query Auto Completion in Information Retrieval. 2016-22 Grace Lewis (VU), Software Architecture Strategies for Cyber-Foraging Systems. 2016-21 Alejandro Moreno Célleri (UT), From Traditional to Interactive Playspaces: Automatic Analysis of Player Behavior in the Interactive Tag Playground. 2016-20 Daan Odijk (UVA), Context & Semantics in News & Web Search. 2016-19 Julia Efremova (Tu/e), Mining Social Structures from Genealogical Data. 207 208 SIKS D ISSERTATION S ERIES 2016-18 Albert Meroño Peñuela, Refining Statistical Data on the Web. 2016-17 Berend Weel (VU), Towards Embodied Evolution of Robot Organisms. 2016-16 Guangliang Li (UVA), Socially Intelligent Autonomous Agents that Learn from Human Reward. 2016-15 Steffen Michels (RUN), Hybrid Probabilistic Logics - Theoretical Aspects, Algorithms and Experiments. 2016-14 Ravi Khadka (UU), Revisiting Legacy Software System Modernization. 2016-13 Nana Baah Gyan (VU), The Web, Speech Technologies and Rural Development in West Africa - An. 2016-12 Max Knobbout (UU), Logics for Modelling and Verifying Normative Multi-Agent Systems. 2016-11 Anne Schuth (UVA), Search Engines that Learn from Their Users. 2016-10 George Karafotias (VUA), Parameter Control for Evolutionary Algorithms. 2016-09 Archana Nottamkandath (VU), Trusting Crowdsourced Information on Cultural Artefacts. 2016-08 Matje van de Camp (TiU), A Link to the Past: Constructing Historical Social Networks from Unstructured Data. 2016-07 Jeroen de Man (VU), Measuring and modeling negative emotions for virtual training. 2016-06 Michel Wilson (TUD), Robust scheduling in an uncertain environment. 2016-05 Evgeny Sherkhonov (UVA), Expanded Acyclic Queries: Containment and an Application in Explaining Missing Answers. 2016-04 Laurens Rietveld (VU), Publishing and Consuming Linked Data. 2016-03 Maya Sappelli (RUN), Knowledge Work in Context: User Centered Knowledge Worker Support. 2016-02 Michiel Christiaan Meulendijk (UU), Optimizing medication reviews through decision support: prescribing a better pill to swallow. 2016-01 Syed Saiden Abbas (RUN), Recognition of Shapes by Humans and Machines. 2015-35 Jungxao Xu (TUD), Affective Body Language of Humanoid Robots: Perception and Effects in Human Robot Interaction. 2015-34 Victor de Graaf (UT), Gesocial Recommender Systems. 2015-33 Frederik Schadd (TUD), Ontology Mapping with Auxiliary Resources. 2015-32 Jerome Gard(UL), Corporate Venture Management in SMEs. 2015-31 Yakup Koç (TUD), On the robustness of Power Grids. 2015-30 Kiavash Bahreini(OU), Real-time Multimodal Emotion Recognition in E-Learning. 2015-29 Hendrik Baier (UM), Monte-Carlo Tree Search Enhancements for One-Player and Two-Player Domains. 2015-28 Janet Bagorogoza (TiU), KNOWLEDGE MANAGEMENT AND HIGH PERFORMANCE; The Uganda Financial Institutions Model for HPO. 2015-27 Sándor Héman (CWI), Updating compressed colomn stores. 2015-26 Alexander Hogenboom (EUR), Sentiment Analysis of Text Guided by Semantics and Structure. 2015-25 Steven Woudenberg (UU), Bayesian Tools for Early Disease Detection. 2015-24 Richard Berendsen (UVA), Finding People, Papers, and Posts: Vertical Search Algorithms and Evaluation. SIKS D ISSERTATION S ERIES 209 2015-23 Luit Gazendam (VU), Cataloguer Support in Cultural Heritage. 2015-21 Sibren Fetter (OUN), Using Peer-Support to Expand and Stabilize Online Learning. 2015-20 Loïs Vanhée (UU), Using Culture and Values to Support Flexible Coordination. 2015-19 Bernardo Tabuenca (OUN), Ubiquitous Technology for Lifelong Learners. 2015-18 Holger Pirk (CWI), Waste Not, Want Not! - Managing Relational Data in Asymmetric Memories. 2015-17 André van Cleeff (UT), Physical and Digital Security Mechanisms: Properties, Combinations and Trade-offs. 2015-16 Changyun Wei (UT), Cognitive Coordination for Cooperative Multi-Robot Teamwork. 2015-15 Klaas Andries de Graaf (VU), Ontology-based Software Architecture Documentation. 2015-14 Bart van Straalen (UT), A cognitive approach to modeling bad news conversations. 2015-13 Giuseppe Procaccianti(VU), Energy-Efficient Software. 2015-12 Julie M. Birkholz (VU), Modi Operandi of Social Network Dynamics: The Effect of Context on Scientific Collaboration Networks. 2015-11 Yongming Luo(TUE), Designing algorithms for big graph datasets: A study of computing bisimulation and joins. 2015-10 Henry Hermans (OUN), OpenU: design of an integrated system to support lifelong learning. 2015-09 Randy Klaassen(UT), HCI Perspectives on Behavior Change Support Systems. 2015-08 Jie Jiang (TUD), Organizational Compliance: An agent-based model for designing and evaluating organizational interactions. 2015-07 Maria-Hendrike Peetz(UvA), Time-Aware Online Reputation Analysis. 2015-06 Farideh Heidari (TUD), Business Process Quality Computation - Computing NonFunctional Requirements to Improve Business Processes. 2015-05 Christoph Bösch (UT), Cryptographically Enforced Search Pattern Hiding. 2015-04 Howard Spoelstra (OUN), Collaborations in Open Learning Environments. 2015-03 Twan van Laarhoven (RUN), Machine learning for network data. 2015-02 Faiza Bukhsh (UvT), Smart auditing: Innovative Compliance Checking in Customs Controls. 2015-01 Niels Netten (UvA), Machine Learning for Relevance of Information in Crisis Response. 2014-47 Shangsong Liang (UVA), Fusion and Diversification in Information Retrieval. 2014-46 Ke Tao (TUD), Social Web Data Analytics: Relevance, Redundancy, Diversity. 2014-45 Birgit Schmitz (OUN), Mobile Games for Learning: A Pattern-Based Approach. 2014-44 Paulien Meesters (UvT), Intelligent Blauw. Met als ondertitel: Intelligence-gestuurde politiezorg in gebiedsgebonden eenheden.. 2014-43 Kevin Vlaanderen (UU), Supporting Process Improvement using Method Increments. 2014-42 Carsten Eijckhof (CWI/TUD), Contextual Multidimensional Relevance Models. 2014-41 Frederic Hogenboom (EUR), Automated Detection of Financial Events in News Text. 210 SIKS D ISSERTATION S ERIES 2014-40 Walter Omona (RUN), A Framework for Knowledge Management Using ICT in Higher Education. 2014-39 Jasmina Maric (UvT), Web Communities, Immigration, and Social Capital. 2014-38 Danny Plass-Oude Bos (UT), Making brain-computer interfaces better: improving usability through post-processing.. 2014-37 Maral Dadvar (UT), Experts and Machines United Against Cyberbullying. 2014-36 Joos Buijs (TUE), Flexible Evolutionary Algorithms for Mining Structured Process Models. 2014-35 Joost van Ooijen (UU), Cognitive Agents in Virtual Worlds: A Middleware Design Approach. 2014-34 Christina Manteli(VU), The Effect of Governance in Global Software Development: Analyzing Transactive Memory Systems.. 2014-33 Tesfa Tegegne (RUN), Service Discovery in eHealth. 2014-32 Naser Ayat (UvA), On Entity Resolution in Probabilistic Data. 2014-31 Leo van Moergestel (UU), Agent Technology in Agile Multiparallel Manufacturing and Product Support. 2014-30 Peter de Cock (UvT), Anticipating Criminal Behaviour. 2014-29 Jaap Kabbedijk (UU), Variability in Multi-Tenant Enterprise Software. 2014-28 Anna Chmielowiec (VU), Decentralized k-Clique Matching. 2014-27 Rui Jorge Almeida (EUR), Conditional Density Models Integrating Fuzzy and Probabilistic Representations of Uncertainty. 2014-26 Tim Baarslag (TUD), What to Bid and When to Stop. 2014-25 Martijn Lappenschaar (RUN), New network models for the analysis of disease interaction. 2014-24 Davide Ceolin (VU), Trusting Semi-structured Web Data. 2014-23 Eleftherios Sidirourgos (UvA/CWI), Space Efficient Indexes for the Big Data Era. 2014-22 Marieke Peeters (UU), Personalized Educational Games - Developing agent-supported scenario-based training. 2014-21 Kassidy Clark (TUD), Negotiation and Monitoring in Open Environments. 2014-20 Mena Habib (UT), Named Entity Extraction and Disambiguation for Informal Text: The Missing Link. 2014-19 Vinicius Ramos (TUE), Adaptive Hypermedia Courses: Qualitative and Quantitative Evaluation and Tool Support. 2014-18 Mattijs Ghijsen (UVA), Methods and Models for the Design and Study of Dynamic Agent Organizations. 2014-17 Kathrin Dentler (VU), Computing healthcare quality indicators automatically: Secondary Use of Patient Data and Semantic Interoperability. 2014-16 Krystyna Milian (VU), Supporting trial recruitment and design by automatically interpreting eligibility criteria. 2014-15 Natalya Mogles (VU), Agent-Based Analysis and Support of Human Functioning in Complex Socio-Technical Systems: Applications in Safety and Healthcare. 2014-14 Yangyang Shi (TUD), Language Models With Meta-information. 2014-13 Arlette van Wissen (VU), Agent-Based Support for Behavior Change: Models and Applications in Health and Safety Domains. 2014-12 Willem van Willigen (VU), Look Ma, No Hands: Aspects of Autonomous Vehicle SIKS D ISSERTATION S ERIES 211 Control. 2014-11 Janneke van der Zwaan (TUD), An Empathic Virtual Buddy for Social Support. 2014-10 Ivan Salvador Razo Zapata (VU), Service Value Networks. 2014-09 Philip Jackson (UvT), Toward Human-Level Artificial Intelligence: Representation and Computation of Meaning in Natural Language. 2014-08 Samur Araujo (TUD), Data Integration over Distributed and Heterogeneous Data Endpoints. 2014-07 Arya Adriansyah (TUE), Aligning Observed and Modeled Behavior. 2014-06 Damian Tamburri (VU), Supporting Networked Software Development. 2014-05 Jurriaan van Reijsen (UU), Knowledge Perspectives on Advancing Dynamic Capability. 2014-04 Hanna Jochmann-Mannak (UT), Websites for children: search strategies and interface design - Three studies on children’s search performance and evaluation. 2014-03 Sergio Raul Duarte Torres (UT), Information Retrieval for Children: Search Behavior and Solutions. 2014-02 Fiona Tuliyano (RUN), Combining System Dynamics with a Domain Modeling Method. 2014-01 Nicola Barile (UU), Studies in Learning Monotone Models from Data. 2013-43 Marc Bron (UVA), Exploration and Contextualization through Interaction and Concepts. 2013-42 Léon Planken (TUD), Algorithms for Simple Temporal Reasoning. 2013-41 Jochem Liem (UVA), Supporting the Conceptual Modelling of Dynamic Systems: A Knowledge Engineering Perspective on Qualitative Reasoning. 2013-40 Pim Nijssen (UM), Monte-Carlo Tree Search for Multi-Player Games. 2013-39 Joop de Jong (TUD), A Method for Enterprise Ontology based Design of Enterprise Information Systems. 2013-38 Eelco den Heijer (VU), Autonomous Evolutionary Art. 2013-37 Dirk Börner (OUN), Ambient Learning Displays. 2013-36 Than Lam Hoang (TUe), Pattern Mining in Data Streams. 2013-35 Abdallah El Ali (UvA), Minimal Mobile Human Computer Interaction. 2013-34 Kien Tjin-Kam-Jet (UT), Distributed Deep Web Search. 2013-33 Qi Gao (TUD), User Modeling and Personalization in the Microblogging Sphere. 2013-32 Kamakshi Rajagopal (OUN), Networking For Learning; The role of Networking in a Lifelong Learner’s Professional Development. 2013-31 Dinh Khoa Nguyen (UvT), Blueprint Model and Language for Engineering Cloud Applications. 2013-30 Joyce Nakatumba (TUE), Resource-Aware Business Process Management: Analysis and Support. 2013-29 Iwan de Kok (UT), Listening Heads. 2013-28 Frans van der Sluis (UT), When Complexity becomes Interesting: An Inquiry into the Information eXperience. 2013-27 Mohammad Huq (UT), Inference-based Framework Managing Data Provenance. 2013-26 Alireza Zarghami (UT), Architectural Support for Dynamic Homecare Service Provisioning. 2013-25 Agnieszka Anna Latoszek-Berendsen (UM), Intention-based Decision Support. A 212 SIKS D ISSERTATION S ERIES new way of representing and implementing clinical guidelines in a Decision Support System. 2013-24 Haitham Bou Ammar (UM), Automated Transfer in Reinforcement Learning. 2013-23 Patricio de Alencar Silva(UvT), Value Activity Monitoring. 2013-22 Tom Claassen (RUN), Causal Discovery and Logic. 2013-21 Sander Wubben (UvT), Text-to-text generation by monolingual machine translation. 2013-20 Katja Hofmann (UvA), Fast and Reliable Online Learning to Rank for Information Retrieval. 2013-19 Renze Steenhuizen (TUD), Coordinated Multi-Agent Planning and Scheduling. 2013-18 Jeroen Janssens (UvT), Outlier Selection and One-Class Classification. 2013-17 Koen Kok (VU), The PowerMatcher: Smart Coordination for the Smart Electricity Grid. 2013-16 Eric Kok (UU), Exploring the practical benefits of argumentation in multi-agent deliberation. 2013-15 Daniel Hennes (UM), Multiagent Learning - Dynamic Games and Applications. 2013-14 Jafar Tanha (UVA), Ensemble Approaches to Semi-Supervised Learning Learning. 2013-13 Mohammad Safiri(UT), Service Tailoring: User-centric creation of integrated ITbased homecare services to support independent living of elderly. 2013-12 Marian Razavian(VU), Knowledge-driven Migration to Services. 2013-11 Evangelos Pournaras(TUD), Multi-level Reconfigurable Self-organization in Overlay Services. 2013-10 Jeewanie Jayasinghe Arachchige(UvT), A Unified Modeling Framework for Service Design.. 2013-09 Fabio Gori (RUN), Metagenomic Data Analysis: Computational Methods and Applications. 2013-08 Robbert-Jan Merk(VU), Making enemies: cognitive modeling for opponent agents in fighter pilot simulators. 2013-07 Giel van Lankveld (UvT), Quantifying Individual Player Differences. 2013-06 Romulo Goncalves(CWI), The Data Cyclotron: Juggling Data and Queries for a Data Warehouse Audience. 2013-05 Dulce Pumareja (UT), Groupware Requirements Evolutions Patterns. 2013-04 Chetan Yadati(TUD), Coordinating autonomous planning and scheduling. 2013-03 Szymon Klarman (VU), Reasoning with Contexts in Description Logics. 2013-02 Erietta Liarou (CWI), MonetDB/DataCell: Leveraging the Column-store Database Technology for Efficient and Scalable Stream Processing. 2013-01 Viorel Milea (EUR), News Analytics for Financial Decision Support. 2012-51 Jeroen de Jong (TUD), Heuristics in Dynamic Sceduling; a practical framework with a case study in elevator dispatching. 2012-50 Steven van Kervel (TUD), Ontologogy driven Enterprise Information Systems Engineering. 2012-49 Michael Kaisers (UM), Learning against Learning - Evolutionary dynamics of reinforcement learning algorithms in strategic interactions. 2012-48 Jorn Bakker (TUE), Handling Abrupt Changes in Evolving Time-series Data. SIKS D ISSERTATION S ERIES 213 2012-47 Manos Tsagkias (UVA), Mining Social Media: Tracking Content and Predicting Behavior. 2012-46 Simon Carter (UVA), Exploration and Exploitation of Multilingual Data for Statistical Machine Translation. 2012-45 Benedikt Kratz (UvT), A Model and Language for Business-aware Transactions. 2012-44 Anna Tordai (VU), On Combining Alignment Techniques. 2012-43 Withdrawn, N/A. 2012-42 Dominique Verpoorten (OU), Reflection Amplifiers in self-regulated Learning. 2012-41 Sebastian Kelle (OU), Game Design Patterns for Learning. 2012-40 Agus Gunawan (UvT), Information Access for SMEs in Indonesia. 2012-39 Hassan Fatemi (UT), Risk-aware design of value and coordination networks. 2012-38 Selmar Smit (VU), Parameter Tuning and Scientific Testing in Evolutionary Algorithms. 2012-37 Agnes Nakakawa (RUN), A Collaboration Process for Enterprise Architecture Creation. 2012-36 Denis Ssebugwawo (RUN), Analysis and Evaluation of Collaborative Modeling Processes. 2012-35 Evert Haasdijk (VU), Never Too Old To Learn – On-line Evolution of Controllers in Swarm- and Modular Robotics. 2012-34 Pavol Jancura (RUN), Evolutionary analysis in PPI networks and applications. 2012-33 Rory Sie (OUN), Coalitions in Cooperation Networks (COCOON). 2012-32 Wietske Visser (TUD), Qualitative multi-criteria preference representation and reasoning. 2012-31 Emily Bagarukayo (RUN), A Learning by Construction Approach for Higher Order Cognitive Skills Improvement, Building Capacity and Infrastructure. 2012-30 Alina Pommeranz (TUD), Designing Human-Centered Systems for Reflective Decision Making. 2012-29 Almer Tigelaar (UT), Peer-to-Peer Information Retrieval. 2012-28 Nancy Pascall (UvT), Engendering Technology Empowering Women. 2012-27 Hayrettin Gurkok (UT), Mind the Sheep! User Experience Evaluation & BrainComputer Interface Games. 2012-26 Emile de Maat (UVA), Making Sense of Legal Text. 2012-25 Silja Eckartz (UT), Managing the Business Case Development in Inter-Organizational IT Projects: A Methodology and its Application. 2012-24 Laurens van der Werff (UT), Evaluation of Noisy Transcripts for Spoken Document Retrieval. 2012-23 Christian Muehl (UT), Toward Affective Brain-Computer Interfaces: Exploring the Neurophysiology of Affect during Human Media Interaction. 2012-22 Thijs Vis (UvT), Intelligence, politie en veiligheidsdienst: verenigbare grootheden?. 2012-21 Roberto Cornacchia (TUD), Querying Sparse Matrices for Information Retrieval. 2012-20 Ali Bahramisharif (RUN), Covert Visual Spatial Attention, a Robust Paradigm for Brain-Computer Interfacing. 2012-19 Helen Schonenberg (TUE), What’s Next? Operational Support for Business Process Execution. 214 SIKS D ISSERTATION S ERIES 2012-18 Eltjo Poort (VU), Improving Solution Architecting Practices. 2012-17 Amal Elgammal (UvT), Towards a Comprehensive Framework for Business Process Compliance. 2012-16 Fiemke Both (VU), Helping people by understanding them - Ambient Agents supporting task execution and depression treatment. 2012-15 Natalie van der Wal (VU), Social Agents. Agent-Based Modelling of Integrated Internal and Social Dynamics of Cognitive and Affective Processes.. 2012-14 Evgeny Knutov(TUE), Generic Adaptation Framework for Unifying Adaptive Webbased Systems. 2012-13 Suleman Shahid (UvT), Fun and Face: Exploring non-verbal expressions of emotion during playful interactions. 2012-12 Kees van der Sluijs (TUE), Model Driven Design and Data Integration in Semantic Web Information Systems. 2012-11 J.C.B. Rantham Prabhakara (TUE), Process Mining in the Large: Preprocessing, Discovery, and Diagnostics. 2012-10 David Smits (TUE), Towards a Generic Distributed Adaptive Hypermedia Environment. 2012-09 Ricardo Neisse (UT), Trust and Privacy Management Support for Context-Aware Service Platforms. 2012-08 Gerben de Vries (UVA), Kernel Methods for Vessel Trajectories. 2012-07 Rianne van Lambalgen (VU), When the Going Gets Tough: Exploring Agentbased Models of Human Performance under Demanding Conditions. 2012-06 Wolfgang Reinhardt (OU), Awareness Support for Knowledge Workers in Research Networks. 2012-05 Marijn Plomp (UU), Maturing Interorganisational Information Systems. 2012-04 Jurriaan Souer (UU), Development of Content Management System-based Web Applications. 2012-03 Adam Vanya (VU), Supporting Architecture Evolution by Mining Software Repositories. 2012-02 Muhammad Umair(VU), Adaptivity, emotion, and Rationality in Human and Ambient Agent Models. 2012-01 Terry Kakeeto (UvT), Relationship Marketing for SMEs in Uganda. 2011-49 Andreea Niculescu (UT), Conversational interfaces for task-oriented spoken dialogues: design aspects influencing interaction quality. 2011-48 Mark Ter Maat (UT), Response Selection and Turn-taking for a Sensitive Artificial Listening Agent. 2011-47 Azizi Bin Ab Aziz(VU), Exploring Computational Models for Intelligent Support of Persons with Depression. 2011-46 Beibei Hu (TUD), Towards Contextualized Information Delivery: A Rule-based Architecture for the Domain of Mobile Police Work. 2011-45 Herman Stehouwer (UvT), Statistical Language Models for Alternative Sequence Selection. 2011-44 Boris Reuderink (UT), Robust Brain-Computer Interfaces. 2011-43 Henk van der Schuur (UU), Process Improvement through Software Operation Knowledge. SIKS D ISSERTATION S ERIES 215 2011-42 Michal Sindlar (UU), Explaining Behavior through Mental State Attribution. 2011-41 Luan Ibraimi (UT), Cryptographically Enforced Distributed Data Access Control. 2011-40 Viktor Clerc (VU), Architectural Knowledge Management in Global Software Development. 2011-39 Joost Westra (UU), Organizing Adaptation using Agents in Serious Games. 2011-38 Nyree Lemmens (UM), Bee-inspired Distributed Optimization. 2011-37 Adriana Burlutiu (RUN), Machine Learning for Pairwise Data, Applications for Preference Learning and Supervised Network Inference. 2011-36 Erik van der Spek (UU), Experiments in serious game design: a cognitive approach. 2011-35 Maaike Harbers (UU), Explaining Agent Behavior in Virtual Training. 2011-34 Paolo Turrini (UU), Strategic Reasoning in Interdependence: Logical and Gametheoretical Investigations. 2011-33 Tom van der Weide (UU), Arguing to Motivate Decisions. 2011-32 Nees-Jan van Eck (EUR), Methodological Advances in Bibliometric Mapping of Science. 2011-31 Ludo Waltman (EUR), Computational and Game-Theoretic Approaches for Modeling Bounded Rationality. 2011-30 Egon van den Broek (UT), Affective Signal Processing (ASP): Unraveling the mystery of emotions. 2011-29 Faisal Kamiran (TUE), Discrimination-aware Classification. 2011-28 Rianne Kaptein(UVA), Effective Focused Retrieval by Exploiting Query Context and Document Structure. 2011-27 Aniel Bhulai (VU), Dynamic website optimization through autonomous management of design patterns. 2011-26 Matthijs Aart Pontier (VU), Virtual Agents for Human Communication - Emotion Regulation and Involvement-Distance Trade-Offs in Embodied Conversational Agents and Robots. 2011-25 Syed Waqar ul Qounain Jaffry (VU)), Analysis and Validation of Models for Trust Dynamics. 2011-24 Herwin van Welbergen (UT), Behavior Generation for Interpersonal Coordination with Virtual Humans On Specifying, Scheduling and Realizing Multimodal Virtual Human Behavior. 2011-23 Wouter Weerkamp (UVA), Finding People and their Utterances in Social Media. 2011-22 Junte Zhang (UVA), System Evaluation of Archival Description and Access. 2011-21 Linda Terlouw (TUD), Modularization and Specification of Service-Oriented Systems. 2011-20 Qing Gu (VU), Guiding service-oriented software engineering - A view-based approach. 2011-19 Ellen Rusman (OU), The Mind ’ s Eye on Personal Profiles. 2011-18 Mark Ponsen (UM), Strategic Decision-Making in complex games. 2011-17 Jiyin He (UVA), Exploring Topic Structure: Coherence, Diversity and Relatedness. 2011-16 Maarten Schadd (UM), Selective Search in Games of Different Complexity. 2011-15 Marijn Koolen (UvA), The Meaning of Structure: the Value of Link Evidence for 216 SIKS D ISSERTATION S ERIES Information Retrieval. 2011-14 Milan Lovric (EUR), Behavioral Finance and Agent-Based Artificial Markets. 2011-13 Xiaoyu Mao (UvT), Airport under Control. Multiagent Scheduling for Airport Ground Handling. 2011-12 Carmen Bratosin (TUE), Grid Architecture for Distributed Process Mining. 2011-11 Dhaval Vyas (UT), Designing for Awareness: An Experience-focused HCI Perspective. 2011-10 Bart Bogaert (UvT), Cloud Content Contention. 2011-09 Tim de Jong (OU), Contextualised Mobile Media for Learning. 2011-08 Nieske Vergunst (UU), BDI-based Generation of Robust Task-Oriented Dialogues. 2011-07 Yujia Cao (UT), Multimodal Information Presentation for High Load Human Computer Interaction. 2011-06 Yiwen Wang (TUE), Semantically-Enhanced Recommendations in Cultural Heritage. 2011-05 Base van der Raadt (VU), Enterprise Architecture Coming of Age - Increasing the Performance of an Emerging Discipline.. 2011-04 Hado van Hasselt (UU), Insights in Reinforcement Learning; Formal analysis and empirical evaluation of temporal-difference. 2011-03 Jan Martijn van der Werf (TUE), Compositional Design and Verification of ComponentBased Information Systems. 2011-02 Nick Tinnemeier(UU), Organizing Agent Organizations. Syntax and Operational Semantics of an Organization-Oriented Programming Language. 2011-01 Botond Cseke (RUN), Variational Algorithms for Bayesian Inference in Latent Gaussian Models. 2010-53 Edgar Meij (UVA), Combining Concepts and Language Models for Information Access. 2010-52 Peter-Paul van Maanen (VU), Adaptive Support for Human-Computer Teams: Exploring the Use of Cognitive Models of Trust and Attention. 2010-51 Alia Khairia Amin (CWI), Understanding and supporting information seeking tasks in multiple sources. 2010-50 Bouke Huurnink (UVA), Search in Audiovisual Broadcast Archives. 2010-49 Jahn-Takeshi Saito (UM), Solving difficult game positions. 2010-48 Withdrawn, . 2010-47 Chen Li (UT), Mining Process Model Variants: Challenges, Techniques, Examples. 2010-46 Vincent Pijpers (VU), e3alignment: Exploring Inter-Organizational Business-ICT Alignment. 2010-45 Vasilios Andrikopoulos (UvT), A theory and model for the evolution of software services. 2010-44 Pieter Bellekens (TUE), An Approach towards Context-sensitive and User-adapted Access to Heterogeneous Data Sources, Illustrated in the Television Domain. 2010-43 Peter van Kranenburg (UU), A Computational Approach to Content-Based Retrieval of Folk Song Melodies. 2010-42 Sybren de Kinderen (VU), Needs-driven service bundling in a multi-supplier setting - the computational e3-service approach. SIKS D ISSERTATION S ERIES 217 2010-41 Guillaume Chaslot (UM), Monte-Carlo Tree Search. 2010-40 Mark van Assem (VU), Converting and Integrating Vocabularies for the Semantic Web. 2010-39 Ghazanfar Farooq Siddiqui (VU), Integrative modeling of emotions in virtual agents. 2010-38 Dirk Fahland (TUE), From Scenarios to components. 2010-37 Niels Lohmann (TUE), Correctness of services and their composition. 2010-36 Jose Janssen (OU), Paving the Way for Lifelong Learning; Facilitating competence development through a learning path specification. 2010-35 Dolf Trieschnigg (UT), Proof of Concept: Concept-based Biomedical Information Retrieval. 2010-34 Teduh Dirgahayu (UT), Interaction Design in Service Compositions. 2010-33 Robin Aly (UT), Modeling Representation Uncertainty in Concept-Based Multimedia Retrieval. 2010-32 Marcel Hiel (UvT), An Adaptive Service Oriented Architecture: Automatically solving Interoperability Problems. 2010-31 Victor de Boer (UVA), Ontology Enrichment from Heterogeneous Sources on the Web. 2010-30 Marieke van Erp (UvT), Accessing Natural History - Discoveries in data cleaning, structuring, and retrieval. 2010-29 Stratos Idreos(CWI), Database Cracking: Towards Auto-tuning Database Kernels. 2010-28 Arne Koopman (UU), Characteristic Relational Patterns. 2010-27 Marten Voulon (UL), Automatisch contracteren. 2010-26 Ying Zhang (CWI), XRPC: Efficient Distributed Query Processing on Heterogeneous XQuery Engines. 2010-25 Zulfiqar Ali Memon (VU), Modelling Human-Awareness for Ambient Agents: A Human Mindreading Perspective. 2010-24 Dmytro Tykhonov, Designing Generic and Efficient Negotiation Strategies. 2010-23 Bas Steunebrink (UU), The Logical Structure of Emotions. 2010-22 Michiel Hildebrand (CWI), End-user Support for Access to Heterogeneous Linked Data. 2010-21 Harold van Heerde (UT), Privacy-aware data management by means of data degradation. 2010-20 Ivo Swartjes (UT), Whose Story Is It Anyway? How Improv Informs Agency and Authorship of Emergent Narrative. 2010-19 Henriette Cramer (UvA), People’s Responses to Autonomous and Adaptive Systems. 2010-18 Charlotte Gerritsen (VU), Caught in the Act: Investigating Crime by Agent-Based Simulation. 2010-17 Spyros Kotoulas (VU), Scalable Discovery of Networked Resources: Algorithms, Infrastructure, Applications. 2010-16 Sicco Verwer (TUD), Efficient Identification of Timed Automata, theory and practice. 2010-15 Lianne Bodenstaff (UT), Managing Dependency Relations in Inter-Organizational 218 SIKS D ISSERTATION S ERIES Models. 2010-14 Sander van Splunter (VU), Automated Web Service Reconfiguration. 2010-13 Gianluigi Folino (RUN), High Performance Data Mining using Bio-inspired techniques. 2010-12 Susan van den Braak (UU), Sensemaking software for crime analysis. 2010-11 Adriaan Ter Mors (TUD), The world according to MARP: Multi-Agent Route Planning. 2010-10 Rebecca Ong (UL), Mobile Communication and Protection of Children. 2010-09 Hugo Kielman (UL), A Politiele gegevensverwerking en Privacy, Naar een effectieve waarborging. 2010-08 Krzysztof Siewicz (UL), Towards an Improved Regulatory Framework of Free Software. Protecting user freedoms in a world of software communities and eGovernments. 2010-07 Wim Fikkert (UT), Gesture interaction at a Distance. 2010-06 Sander Bakkes (UvT), Rapid Adaptation of Video Game AI. 2010-05 Claudia Hauff (UT), Predicting the Effectiveness of Queries and Retrieval Systems. 2010-04 Olga Kulyk (UT), Do You Know What I Know? Situational Awareness of Colocated Teams in Multidisplay Environments. 2010-03 Joost Geurts (CWI), A Document Engineering Model and Processing Framework for Multimedia documents. 2010-02 Ingo Wassink (UT), Work flows in Life Science. 2010-01 Matthijs van Leeuwen (UU), Patterns that Matter. 2009-46 Loredana Afanasiev (UvA), Querying XML: Benchmarks and Recursion. 2009-45 Jilles Vreeken (UU), Making Pattern Mining Useful. 2009-44 Roberto Santana Tapia (UT), Assessing Business-IT Alignment in Networked Organizations. 2009-43 Virginia Nunes Leal Franqueira (UT), Finding Multi-step Attacks in Computer Networks using Heuristic Search and Mobile Ambients. 2009-42 Toine Bogers (UvT), Recommender Systems for Social Bookmarking. 2009-41 Igor Berezhnyy (UvT), Digital Analysis of Paintings. 2009-40 Stephan Raaijmakers (UvT), Multinomial Language Learning: Investigations into the Geometry of Language. 2009-39 Christian Stahl (TUE, Humboldt-Universitaet zu Berlin), Service Substitution – A Behavioral Approach Based on Petri Nets. 2009-38 Riina Vuorikari (OU), Tags and self-organisation: a metadata ecology for learning resources in a multilingual context. 2009-37 Hendrik Drachsler (OUN), Navigation Support for Learners in Informal Learning Networks. 2009-36 Marco Kalz (OUN), Placement Support for Learners in Learning Networks. 2009-35 Wouter Koelewijn (UL), Privacy en Politiegegevens; Over geautomatiseerde normatieve informatie-uitwisseling. 2009-34 Inge van de Weerd (UU), Advancing in Software Product Management: An Incremental Method Engineering Approach. 2009-33 Khiet Truong (UT), How Does Real Affect Affect Affect Recognition In Speech?. 2009-32 Rik Farenhorst (VU) and Remco de Boer (VU), Architectural Knowledge Man- SIKS D ISSERTATION S ERIES 219 agement: Supporting Architects and Auditors. 2009-31 Sofiya Katrenko (UVA), A Closer Look at Learning Relations from Text. 2009-30 Marcin Zukowski (CWI), Balancing vectorized query execution with bandwidthoptimized storage. 2009-29 Stanislav Pokraev (UT), Model-Driven Semantic Integration of Service-Oriented Applications. 2009-28 Sander Evers (UT), Sensor Data Management with Probabilistic Models. 2009-27 Christian Glahn (OU), Contextual Support of social Engagement and Reflection on the Web. 2009-26 Fernando Koch (UU), An Agent-Based Model for the Development of Intelligent Mobile Services. 2009-25 Alex van Ballegooij (CWI), "RAM: Array Database Management through Relational Mapping". 2009-24 Annerieke Heuvelink (VUA), Cognitive Models for Training Simulations. 2009-23 Peter Hofgesang (VU), Modelling Web Usage in a Changing Environment. 2009-22 Pavel Serdyukov (UT), Search For Expertise: Going beyond direct evidence. 2009-21 Stijn Vanderlooy (UM), Ranking and Reliable Classification. 2009-20 Bob van der Vecht (UU), Adjustable Autonomy: Controling Influences on Decision Making. 2009-19 Valentin Robu (CWI), Modeling Preferences, Strategic Reasoning and Collaboration in Agent-Mediated Electronic Markets. 2009-18 Fabian Groffen (CWI), Armada, An Evolving Database System. 2009-17 Laurens van der Maaten (UvT), Feature Extraction from Visual Data. 2009-16 Fritz Reul (UvT), New Architectures in Computer Chess. 2009-15 Rinke Hoekstra (UVA), Ontology Representation - Design Patterns and Ontologies that Make Sense. 2009-14 Maksym Korotkiy (VU), From ontology-enabled services to service-enabled ontologies (making ontologies work in e-science with ONTO-SOA). 2009-13 Steven de Jong (UM), Fairness in Multi-Agent Systems. 2009-12 Peter Massuthe (TUE, Humboldt-Universitaet zu Berlin), Operating Guidelines for Services. 2009-11 Alexander Boer (UVA), Legal Theory, Sources of Law & the Semantic Web. 2009-10 Jan Wielemaker (UVA), Logic programming for knowledge-intensive interactive applications. 2009-09 Benjamin Kanagwa (RUN), Design, Discovery and Construction of Service-oriented Systems. 2009-08 Volker Nannen (VU), Evolutionary Agent-Based Policy Analysis in Dynamic Environments. 2009-07 Ronald Poppe (UT), Discriminative Vision-Based Recovery and Recognition of Human Motion. 2009-06 Muhammad Subianto (UU), Understanding Classification. 2009-05 Sietse Overbeek (RUN), Bridging Supply and Demand for Knowledge Intensive Tasks - Based on Knowledge, Cognition, and Quality. 2009-04 Josephine Nabukenya (RUN), Improving the Quality of Organisational Policy Making using Collaboration Engineering. 220 SIKS D ISSERTATION S ERIES 2009-03 Hans Stol (UvT), A Framework for Evidence-based Policy Making Using IT. 2009-02 Willem Robert van Hage (VU), Evaluating Ontology-Alignment Techniques. 2009-01 Rasa Jurgelenaite (RUN), Symmetric Causal Independence Models.
2cs.AI
AGGREGATED EVALUATION OF OPERATION QUALITY OF COMPLEX HIERARCHICAL NETWORK SYSTEMS Olexandr Polishchuk arXiv:1603.02317 [cs.SY] 9 Mar 2016 Department of Nonlinear Mathematical Analysis, Pidstryhach Institute for Applied Problems of Mechanics and Mathematics, National Academy of Sciences of Ukraine, Lviv, Ukraine, [email protected] Abstract. The main approaches for the formation of generalized conclusions about operation quality of complex hierarchical network systems are analyzed. Advantages and drawbacks of the “weakest” element method and a weighted linear aggregation method are determined. Nonlinear aggregation method is proposed for evaluating the quality of the system, which consists of elements of the same priority. Hybrid approaches to form generalized conclusions are developed based on the main aggregation methods. It is shown that they allow to obtain more reliable aggregation results. Key words: complex system, network, hierarchy, priority, evaluation, aggregation 1. Introduction Complex dynamical systems (CDS) are used almost in all areas of human activity, e.g. in transportation (railway, road and aviation systems, transportation networks of large cities and regions of countries) [1], supply and logistics (systems for power, gas, petrol, heat and water supply, trade networks) [2], information and communication (Internet, TV, radio, post service, press, fixed and mobile telephony) [3], in economics (networks of state-owned and (or) private companies, their suppliers and final products distributors) [4], finance (banking and insurance networks, money transfer systems) [5], education, healthcare etc. Their state and operation quality impose large impact on citizens’ quality of life, efficiency of economy and possibilities for its development, as well as government structures readiness to mitigate impacts of technological and natural disasters [6]. Finally, they may be treated as the evidences of country development level in general [7]. Failure of one of the elements of such systems can often lead to operation breakdown or destabilization of the whole CDS. The example of this is cascading phenomenon [8]. Often the situations of the kind (e.g. accidents at nuclear or large chemical plants and other hazardous facilities, power lines, gas pipelines etc.) may lead to harsh consequences, such as environmental disasters, property loss and numerous human victims [9]. These circumstances determine the importance of continuous monitoring of technological systems operation, careful control of their behavior and timely response to emerging threats. Solution for this problem belongs to the fields of systems theory, system analysis, complex networks theory, mathematical modelling etc [10-12]. It is usually difficult to implement classical mathematical modelling methods on practice for studying most existing CDS due to the problems of dimension and adequacy. Therefore, decomposition and investigation of the properties of the separate components of the system is the usual method for modeling. However, the important features of the interaction between components of CDS may be lost during decomposition. A lot of problems arise when trying to optimize the complex large scale systems [13]. Optimizing separate components does not always guarantee the quality improvement of the whole system, and synchronous optimization of all components of CDS is usually unrealistic goal (hard to imagine the simultaneous repair of all roads of megapolis). Network analysis methods [11, 14] are focused mostly on studying of system structure and interconnections between network elements without analysis of their state and functioning quality. At the same time, flow processing in the node may be quite a complicated process [15]. System analysis in general is aimed on selection of alternatives about further actions with respect to real CDS (development plans, ways to optimize, etc.) [16]. Taking into account the human factor is a separate problem in systems research. Often the influence of this factor can not account for any mathematical methods. Complex systems appear, operate and develop within long periods of time and with natural processes of “aging”, despite regular improvements, more strict and accurate control over their behaviour is required. This is why the development of methods for evaluation and forecasting the state, operation quality and interaction between structural elements of CDS is actual problem [17-21]. Often the cause of accidents is the wrong evaluation of the current situation or an inadequate forecast of its future development. Sometimes the reason of accidents become "unfavorable coincidence of many random unlikely circumstances". Scientific discipline is not created yet, which could mathematically formalize such causes and forestall the disasters (accidents on the railway, nuclear power plants, hazardous industries, etc.). Catastrophe theory [22], which includes the bifurcation theory of dynamical systems (differential equations) and the theory of singularities of smooth mappings, is still far from solving the problems of real systems. Evaluation theory allows to determine the preconditions that can lead to catastrophic events (deterioration of the state or operation quality of system components, the weakening of the interaction between them, etc.). It also allows to determine the elements that threaten or require urgent optimization, and to analyze the influence of this 1 optimization on the other system components and the whole CDS. Multi-criteria and multi-parameter analysis of the state and operation quality of the system elements leads to a huge number of local evaluations. Manual analysis of such amounts of data to make correct and timely decisions is practically impossible. Therefore, a special place in evaluation theory take methods for formation of generalized (aggregated) conclusions. Aggregation of evaluations of system components is known for a long time [21, 23, 24]. We used it to make generalized conclusions about the behavior of system elements according to the set of characteristics, parameters and evaluation criteria [25, 26] in a continuous, discrete, conceptual, and precise rating scale [20, 21]. Aggregation is useful for determining the optimal operation modes of CDS [27] and selecting an optimal system from a given class of equivalent systems [28]. It can be used to analyze the history of CDS functioning and forecasting its behavior [20, 29]. As a rule, the weighted linear aggregation method (WLAM) is used to form generalized conclusions about the state and operation quality of the system [23-26]. In this paper we analyze three approaches to form aggregated evaluations: the “weakest” element method (WEM), WLAM and nonlinear aggregation method (NAM). We determine the relationship between the evaluations obtained by these methods and propose hybrid approaches for aggregated evaluation of systems that increase adequacy of generalized conclusions. 2. Evaluation of Complex Hierarchical Network Systems The most of created and controlled by a man industrial, transportation, financial and other systems have a hierarchical network structure. Complex hierarchical network systems (CHNS) are special because each subsystem of a certain hierarchy level consists of a set of subsystems which form subnetwork of lower hierarchy level network (see Fig. 1). Every hierarchical level of such system is the collection of nodes, connected by edges through which the flows are passing. The edges shall ensure smooth passage of flow and nodes are to ensure its processing. Hierarchy is introduced on the basis of management system construction principles, CDS objects arrangement in space etc. Flow movement for which CHNS was created is performed at network of the lowest level. At the higher (control) levels, flows are represented by information, organizational and administrative decisions etc. Methods for complex evaluation of the state, operation quality and interaction between components of CHNS were described in [31]. These methods detemine the way for reflecting CHNS experimental studies data onto structured, according to hierarchy, sequence of local, forecasting, interactive and generalized conclusions about system behaviour. Taking into account the diversity of CHNS objects, these methods defines universal principles of such evaluations development, common for all objects of the same type and functional destination considering peculiarities of the former. Real network systems can be combined into more complex structures: multiplexes, associations, and conglomerates [14, 30]. Analysis of the interaction of these formations is also an important issue. Fig. 1 Hierarchical network structure Evaluation of real systems is reasonable to start with objects of lowest structural level, i.e. with their elements. We define an element as an object of clearly defined location, functional destination and relevant set of characteristics describing its state and functioning process with corresponding ranges of permissible values for those characteristics. All characteristics are evaluated according to certain collection of criteria and parameters [21]. Of course, evaluation of every object presupposes evaluation of its state on the first place, and only after that the evaluation of quality of implementation of its functions that in any case depend on element’s state – either directly or indirectly. The process of evaluation is started only after the stage of thorough extraction and processing of experimental data as to each of characteristic and their conversation into format, suitable for further analysis. Evaluations for elements’ state and functions they implement on the basis of their characteristics behaviour analysis we call local [29]. Scheduled inspections of system’s components are held at different time points, which means the results of last study may not stay on such stage till following inspection, and state of component and its operation quality may cross “safety threshold” [32]. It should be also taken into account that every real system evolves in time, i.e. with regard to current requirements, its evaluation may be insufficient. Therefore, evaluation process should contain means of analysis of CDS’s meeting expected requirements for short- and long-term perspective. Thus, the evaluation process should not only determine conclusions and discover “faulty” elements for the time point moment when study is held, but also it should forecast further behaviour of system components. Forecasting analysis performed on the basis of local evaluations prehistory, allows us to determine the nature, direction and speed of system state change, follow up negative processes and forecast potential risks, as well as material and financial expenses required for their elimination or timely prevention [29]. 2 Due to the number of reasons, scheduled inspections may often not discover drawbacks that arise “out of schedule”. It should be also taken into account that even excellent state and functioning quality of separate components in the system do not ensure high performance of its subsystems or system in general. And vice versa, the most optimal work organization process will not ensure high efficiency of system functioning if CHNS’s state or organization of components functioning is unsatisfactory. The more worn-out CHNS’s objects are the more urgent is the problem of continuous monitoring of their state and functioning process. Quality of implementation of functions by component may be affected by number of third-party factors, both internal and external as to the system. Internal influence may be evaluated on the level of subsystems connecting interacting objects. We call this evaluation method interactive [33]. It allows us to determine separate components in selected subsystem, functioning of which is unsatisfactory, without thorough analysis of state and functioning quality of these components and expenses related to such analysis. The simplest interactive evaluation may be performed for system where the movement of flows is deterministic, at least partially, in accordance with certain schedule, the compliance to which may be periodically summed up [1]. In general, only if combined, proposed methods may provide sufficiently full and adequate understanding of CHNS quality. Indeed, high local evaluations do not ensure effective interaction of elements, failures of separate systems components may result in breakdown in balanced organization, satisfactory state of object for the moment of current inspection does not imply the state will stay satisfactory till the next inspection. Huge amount of information regarding separate CHNS elements without appropriate generalization is ill-suited for rapid analysis and timely reaction for drawbacks discovered. On higher generalization levels, evaluation allows to determine reliable conclusion as to the state and operation quality of system and its main subsystems and to define measures, as well as material and finance expenses required for its modernisation and optimization of functioning [34]. At the local level evaluation allows to identify separate elements and their components subject to improvement. These “narrow” places that are constantly discovered during scheduled inspections or continuous system monitoring may be subject to mathematical modelling. This narrows down the object of modelling and makes the process itself more realistic. 3. Priority of System Components The concept of priority of system components and functions that they implement, is important in the study of CDS [4]. Priority of the component can be defined as a quantitative measure of its significance in the system (in every system there are more and less important objects). In order to reduce the dimension during simulation into the system content and structure first of all are included its highest priority components. In other cases after decomposition of CDS primary consideration is also given to the study of high-priority objects. The highest priority usually have components, failure of which leads to a failure of the whole system. Priority of network node can determine its degree and/or betweenness centrality. Among two nodes with the same degree or betweenness centrality the highest priority has the node through which the more flows have movement. The last statement is true for the edges of the network system. Usually, the analysis of the effectiveness of the large scale network system operation can not be carried out simultaneously for all elements (nodes, edges, flows) and components of the higher hierarchy levels. Sometimes the efficiency of certain subsystems of CDS is more important than the operation quality of separate system elements (in human collectives is expressed by the term “team work”: an agreed team of “mediocrities” often wins uncoordinated team of “stars”). Routes of flows may be such subsystems in CHNS. The priority of each route is determined by the number and/or volume of flows that pass this route in a certain time period. For flow which moves the route is not important priority of node in which it is delayed. This means that from the point of view of analysis of flows movement on the system all the nodes and edges of the route may be considered equally important. Routes can be grouped according to their priority. 4. Aggregation Methods: the Main Approaches The main objective of aggregated evaluation is to create an adequate generalized puttern of the operation quality of system components of various hierarchy levels. Analysis of this puttern can be done by avoiding processing of huge volumes of information that describes the behavior of these components in detail. Aggregated evaluation should significantly simplify and shorten the process of problems localization and preparing of appropriate decisions. Next we analyze the adequacy of generalized conclusions obtained using three different approaches. We illustrate these approaches on the simplest example of a system S that consists of N elements sn , n = 1, N . Let us assume that e( s n ) is evaluation of operation quality of element s n , e(sn ) ∈ [e min , e max ] , where e min and emax are the minimum and maximum possible evaluations of the operation quality of element s n correspondingly. Methods of formation of multi-criteria and multiparameter current and forecasting evaluations of behavior of system elements in precise ball scale were described in detail in [29]. Under the first approach the system quality e (1) ( S ) is determined by the quality of its “weakest” element, i.e. e (1) ( S ) = min e( s n ) . n =1, N This approach has to use when we evaluate the systems in which the malfunction of elements can lead to failure of the separate subsystems or the whole CDS. An example of such system is the human body in which the unsatisfactory functioning of certain organs can lead to lethal consequences; railway in which the shifts of 3 subgrade may cause a train crash; the gas pipelines in which the result of a crack in the pipe often were explosions with a large number of human victims, etc. Unsatisfactory state of such elements may cause cascading effects [8] that extend in complex networks (massive power outage in regions of the country, spread of epidemics, occurrence of traffic jams, etc.). WEM is one of the main methods for determining the reliability of the technical and information systems. It is an ideal means for evaluation of conveyor systems work. If elements with the lowest evaluations may pose a threat to the functioning of CDS, the elements with the highest evaluations may be a "sample" and used to improve other elements of real systems [20]. Such elements can be used to determine the criteria of practically achievable optimality [26]. Another and the most common approach for obtaining generalized conclusions is a weighted linear aggregation of elements evaluations. In the case of the system considered above, this evaluation is obtained by the ratio e ( 2) ( S , ρ) = < ρ , e(s) > R N / < ρ , 1 > R N , where e(s) = {e( s n )}nN=1 , ρ = {ρ n }nN=1 is a vector of weighted coefficients, which determines the priority of e (3) ( S ) = n =1 where e* = N ∑ e( s n ) / N . significantly limits the use of the third approach, is the difficulty of taking into account the priority of system elements. Generalization by means of NAM can be called the rule of "optimality of mediocrity". This rule works wonderfully on a conveyor belt, where from employees require the same productivity. Otherwise conveyor performance is equal to productivity of the “weakest” employee. For normal production requires timely supply of all components, to make the right decision must be synchronized delivery of information flows, etc. However, use this rule, for example, for evaluation of research team work is inexpedient. In this case usually “one person makes a discovery, the second person this discovery confirms (or refutes) and third person “washes the tubes". “Mediocrity” of all is counterproductive here. These considerations determine the areas of potential use of NAM. Let us assume that e( sn ) = e (1) ( S ) , n = 1, N . Then N product in Euclid space R N . The main disadvantage of WLAM is neglecting both positive and negative evaluations. Consider the following example. Assume for the production of some device requires supply of N equally important components. Even in the case of delivery 100% of (N – 1) components and 10% of N-th component can be product only 10% devices. At the same time, evaluation obtained by WLAM when ρ ≡ 1 , e ( 2) ( S ,1) = 100-90/N. For large values of N, this evaluation is close to 100%, although it is possible to product only 10% of devices. It is obvious that such evaluation does not correspond to reality. This method is absolutely not fit for evaluating the operation of conveyor systems. A more appropriate for the reality results of generalization are obtained using the method of nonlinear aggregation. It is based on the following statement [35]. Theorem 1. For an arbitrary set of real numbers {an }nN=1 , value an > 0 , such that N ∏ an n =1 ∑ an = A , the maximum is achieved in the case of an = a* = A / N , n =1 N (∑e (1) = (S ) / N ) N −1 = (e (1) ( S )) N N N −1 (e (e (1) ( S )) N N N −1 N (∑e (1) ( S )) = N −1 n =1 n =1 (1) ( S )) N −1 N N −1 = e (1) ( S ) . Thus, for an arbitrary set of evaluations {e( s n )}nN=1 such that e( s n ) ≥ e (1) ( S ) , n = 1, N , we obtain e (3) ( S ) ≥ e (1) ( S ) . Rewrite the aggregated nonlinear evaluation e (3) ( S ) in the form N e (3) ( S ) = ∏ e( s n ) (e n =1 ( 2) ( S , 1)) N −1 and show that e (3) ( S ) ≤ e ( 2) ( S , 1) or N ∏ e( s n ) n =1 ≤ e ( 2) ( S , 1) . (e ( 2) ( S , 1)) N −1 From the last inequality we obtain N n = 1, N . N ∏ e( s n ) ≤ {an }nN=1 If is a set of evaluations, this means that the best result among all sets is achieved, when deviation of an , n = 1, N , from the mean value a* is a minimum. In the case of system S considered above, evaluation of its quality by NAM is obtained by using the ratio ∏ e (1) (S ) e (3) ( S ) = N n =1 The main drawback, which n =1 system elements, 1 = {1}nN=1 , and < . , . > R N is a scalar for the scale [e min , e max ] =[0, 100] gives the value N ∏ e(sn ) / (e*) N −1 , ( ∑ e( s n ) ) N (e ( 2) ( S , 1)) N = n =1 n =1 NN or N N n =1 n =1 N N ∏ e( s n ) ≤ ( ∑ e ( s n ) ) N . 4 The validity of the last inequality follows from the well-known inequality [36] N N ∏ an N n =1 ∑ an ≤ n =1 N , an > 0 , n = 1, N . Furthermore, in the case e( s n ) = e * we obtain N N n =1 n =1 N N ∏ e( s n ) = N N ∏ e * = N N (e*) N and N ( ∑ e( s n )) N = ( Ne*) N = N N (e*) N . n =1 Thus, the next result is in order. Theorem 2. For arbitrary set of evaluations {e( s n )}nN=1 , e( s n ) ≥ 0 , n = 1, N , and equally important elements of the system S are fair inequalities e and e (3) (1) (S ) ≤ e (3) e (1) ( S ) = e (3) ( S ) (S ) = e ( 2) (S ) ≤ e if ( 2) ( S , 1) , e( s n ) = e (1) ( S ) , and ( S , 1) if e( s n ) = e * , n = 1, N . Consider as an example the system S= {sn }nN=1 , e( sn ) ∈ [0, 100] , n = 1, N , N = 3,4,5 . Take a limiting case when the evaluation e( s1 ) increases uniformly from 0 to 100 and the values e( sn ) =100, n = 2(1) N . We suppose that all system elements have the same priority, i.e. ρ ≡ 1 . Graphs of behavior of aggregated evaluations obtained using the three approaches described above are shown in Fig. 2. We can see that NAM gives a more adequate and closer to the reality aggregated evaluations for the system of equally important elements than WLAM. and e3(3,4),5 are behaving as the evaluation e3(1,4) ,5 . In other words, the evaluations obtained by means of all three approaches converge to the same result, if all values e( s n ) , n = 1, N , are approaching to e * . Shown in the Fig. 2 results confirm that the detection and optimization of the “weakest” elements improve quality evaluation of the whole CDS. The methods discussed above should not be confused with the wellknown weighted sum and weighted product methods [37]. These methods are expedient to use for determination of the best or the worst element (alternative) from a given set. In fact, these methods form a relative quality evaluation of one element in comparison with the other system elements. We aim to be based on absolute quality evaluations [29]. 5. Hybrid Aggregation It is advisable to combine the approaches described above to get more adequate generalized conclusions. Two ways of such combining can be determined. The first way is to remove the defects detected when using the first approach, and further use the second or third approach. In this case WEM is advisable to apply only to a group of elements with the highest priority. The relative difference between the evaluations obtained by a combination of first and second or first and third approaches is a quantitative measure of the adequacy of the obtained generalized conclusion. For the above example of the production of some device when N=3 and e( s1 ) = 10 %, e( s2 ) = e( s3 ) = 100 %, the evaluations obtained by WEM, WLAM and NAM in the percentage scale will have the following values: e (1) ( S ) ≈ 10%, e ( 2) ( S , 1) ≈ 70%, e (3) ( S ) ≈ 20.4%. When first and second approaches are combined the measure of adequacy of aggregated evaluations is determined by the ratio σ 1,2 ( S ) = ( e ( 2) ( S , 1) − e (1) ( S ) )/ e ( 2) ( S , 1) . The maximum value of this parameter (equal to 1) is achieved with the greatest deviation of aggregated linear evaluation from the evaluation of the "weakest" element and the minimum (equal to 0) value is achieved when the evaluations of all system elements are equal. For the last example we have σ 1,2 ( S ) ≈ 0.857. When first and third approaches are combined the measure of adequacy of aggregated evaluations is determined by the ratio σ 1,3 ( S ) = ( e (3) ( S ) − e (1) ( S ) )/ e (3) ( S ) . Fig. 2. Generalized conclusions obtained by means of WEM (1) ( 2) (3) ( e3, 4,5 ), WLAM ( e3, 4,5 ) and NAM ( e3, 4,5 ) If operation quality of all system elements increases uniformly and simultaneously, the evaluations e3( 2,4),5 The maximum value of this parameter (equal to 1) is achieved with the greatest deviation of aggregated nonlinear evaluation from the evaluation of the "weakest" element and the minimum (equal to 0) value is achieved when the evaluations of all system elements are equal. For the last example we have σ 1,3 (S ) ≈ 0.509. Thus, NAM generates more adequate generalized conclusion than WLAM. 5 The second way for combination of aggregation methods is as follows. Assume that the elements of not always guarantee this adequacy, because it can "hide" n system S can be divided into groups S m = {sn }nm=1 , nm ≥ 1 , m = 1, M , ∑ m =1 nm = N . M elements of the group S m Suppose that all have the same priority ρ~m , m = 1, M . Then the aggregated evaluation of system S can be done using the ratio e ( 4) ( S , ~ ρ) = < ~ ρ , e (3) (s) > R M / < ~ ρ , 1 >RM , M M ~ where e (3) (s) = {e (3) ( S m )}m =1 and ρ = {ρ m }m =1 is a vector of weighted coefficients, which determines the priority of groups S m , m = 1, M . The last ratio determines a hybrid method for formation of aggregated evaluations that combines WLAM and NAM. It allows to take into account the priority of elements of separate groups (for example, traffic routes of flows) and perform a more adequate evaluation within each group. Fig. 3. Generalized conclusions obtained by means of WEM (1) From theorem 2 we have that the following statement is in order. Theorem 3. The next inequalities are fair e (1) ( S ) ≤ e ( 4) ( S , ~ ρ ) ≤ e ( 2 ) ( S , ρ* ) , M where ρ* = {{ρ m }nm=1}m =1 . n If all elements of the system S have a different priority (M=N), the proposed hybrid method is converted into WLAM. If all elements of the system have the same priority (M=1), then it is converted into NAM. Consider the following example. Assume that the system consists of two groups of elements. Three elements form a first group. Priority of elements of this group is equal to 1.0. The operation quality of the first element increases from 0 to 100, and the operation quality of other two elements of this group is equal to 100. Two elements form a second group. Priority of elements of this group is equal to 0.5. The operation quality of these elements is equal to 50. Using NAM in this case is not possible, since the elements of the system have different priority. Graphs of behavior of aggregated evaluations, obtained in this case by means of WEM, WLAM and by hybrid method that combines WEM and WLAM are shown in Fig. 3. Note that the operation quality of the elements of the second group is not improved and continues to be equal to 50. Therefore, the aggregated evaluation of the system obtained by WEM is equal to 50 even if the operation quality of elements of the first group is equal to 100. This is another reason to use WEM only for a set of high-priority elements. 6. Conclusions In general, complex large scale dynamical systems with various structures require different approaches to aggregation. These approaches should ensure maximum adequacy of generalized conclusions [38]. WLAM does ( 2) ( e3+ 2 ), WLAM ( e3+ 2 ) and hybrid aggregation method ( 4) ( e3+ 2 ) potentially dangerous components of the system. WEM can be too "radical" and give a negative conclusion about the system quality, based on the quality evaluations of the least important elements. NAM is useful if correlation of system component evaluations should be minimal. Thus, all considered above methods have limited areas of application. Using these methods without taking into account the specifics of the system and its separate components can lead to unreliable results of generalization. We propose to use the hybrid approaches for aggregation which should as much as possible to take into account this specificity. The foregoing examples confirm the effectiveness of such approaches. References [1] Polishchuk D., Polishchuk O., and Yadzhak M., “Complex evaluation of hierarchically-network systems”, Automatic Control and Information Sciences, vol. 2, no. 2, pp. 32-44, 2014. [2] Neng Chiu H., “The integrated logistics management system: a framework and case study”, International Journal of Physical Distribution & Logistics Management, vol. 25, no. 6, pp. 4-22, 1995. [3] Berners-Lee T. et all, “World-Wide Web: the information universe”, Internet Research, vol. 20, no. 4, pp. 461-471, 2010. [4] Marsan G. A., Bellomo N., and Egidi M., “Towards a mathematical theory of complex socio-economical systems by functional subsystems representation”, Kinetic and Related Models, vol. 1, no. 2, pp. 249-278, 2008. [5] Rajan R. G. and Zingales L., “Financial systems, industrial structure, and growth”, Oxford review of economic Policy, vol. 17, no. 4, pp. 467-482, 2001. [6] Scott A. J. and Storper M. “Regions, globalization, development”, Regional studies, vol. 41 (S1), pp. 191205, 2007. 6 [7] Polishchuk O., Polishchuk D., Tyutyunnyk M., and Yadzhak M., “Issues of regional development and evaluation problems”, AASCIT Communications, vol. 2, no. 3, pp. 115-120, 2015. [27] Polishchuk O., “Choice of optimal regimes for functioning of complex dynamical systems”, Mathematical Methods and Physicomechanical Fields, vol. 48, no. 3, pp. 62-67, 2005. [8] Buldyrev S. et all., “Catastrophic cascade of failures in interdependent networks”, Nature, vol. 464(15), pp. 1025–1028, 2010. [9] Weart S. R. and Weart S. R., Nuclear fear: A history of images, Harvard University Press, 2009. [28] Polishchuk O., “About the choice of the optimal dynamical system from the class of equivalent systems”, Information Extraction and Processing, vol. 20 (96), pp. 23-28, 2004. [10] Hinrichsen D. and Pritchard A.J., Mathematical Systems Theory, Springer, New York, 2005. [11] Boccatti S. et all, “Complex networks: structure and dynamics”, Physics Reports, vol. 424, pp. 175-308, 2006. [12] Buslenko N.P., Modelling of complex systems, Nauka, Moscow, 1978. [13] Allison J. T., Complex system optimization: A review of analytical target cascading, collaborative optimization, and other formulations, Doctoral dissertation, The University of Michigan, 2004. [14] Boccaletti S. et all, “Structure and Dynamics of Multilayer Networks”, Physics Reports, vol. 544(1), pp. 1-122, 2014. [15] Polishchuk O. and Polishchuk D., “Monitoring of flow in transport networks with partially ordered motion”, ХХІІІ Conf. Carpenko physics and mechanics institute, NASU, pp. 326-329, 2013. [16] Blanchard B. S. and Fabrycky W. J., Systems engineering and analysis (Vol. 4), Englewood Cliffs, New Jersey: Prentice Hall, 1990. [29] Polishchuk D., Polishchuk O., and Yadzhak M., “Complex deterministic evaluation of hierarchicallynetwork systems: II. Local and forecasting evaluation”, System Research and Information Technologies, no. 2, pp. 26-38, 2015. [30] Polishchuk O., Polishchuk D., Tyutyunnyk M., and Yadzhak M., “Big Data Processing in Complex Hierarchical Network Systems: I. Structures and information flows”, AASCIT Communications, vol.3., in press, 2016. [31] Polishchuk D., Polishchuk O., and Yadzhak M., “Complex deterministic evaluation of hierarchicallynetwork systems: I. Methods description”, System Research and Information Technologies, no. 1, pp. 2131, 2015. [32] Lichtberger B. W., “Kostensenkung durch qualitatsvorrat in der fahrweginstandhaltung”, Der Eisenbahningenieur. vol. 50, no. 1, pp. 39–42, 1999. [33] Polishchuk D., Polishchuk O., and Yadzhak M., “Complex deterministic evaluation of hierarchicallynetwork systems: IV. Interactive evaluation”, System Research and Information Technologies, no. 1, in press, 2016. [18] Norros L. and Saviola P., Usability evaluation of complex systems, STUK, Helsinki, 2004. [34] Polishchuk D., Polishchuk O., and Yadzhak M., “Complex deterministic evaluation of hierarchicallynetwork systems: III. Aggregative evaluation”, System Research and Information Technologies, no. 4, pp. 2031, 2015. [19] Bar-Yam Y., “About Engineering Complex Systems: Multiscale Analysis and Evolutionary Engineering”, Engineering Self-Organising Systems: Methodologies and Applications, Springer, London, pp. 16–31, 2005. [35] Polishchuk A. D., “About convergence the methods of projections for solution potential theory integral equation”, Computer centre of Siberian Division of AS of the USSR, Preprint 776, 1988. [20] Polishchuk D. and Polishchuk O., “About evaluation of complex dynamical systems”, Journal of Complex Systems, 2013, Article ID 204304, 6 p.: Available: http://dx.doi.org/ 10.1155/2013/ 204304. [36] Bronshtein I. N. and Semendyaev K. A., Handbook of mathematics for engineers and students of technical colleges, Nauka, Moscow, 1986. [17] Owen C.L., “Evaluation of complex systems”, Designe Studies, vol. 28, no. 1, pp. 73–101, 2007. [21] Polishchuk D., Polishchuk O., and Yadzhak M., ”Comparison of methods of complex system evaluation”, Information Extraction and Processing, vol. 32 (108), pp. 110-118, 2010. [22] Arnold V.A., Catastrophe theory, Berlin, SpringerVerlag, 1992. [23] Dombi J., “Basic concepts for a theory of evaluation: the aggregative operator”, European Journal of Operational Research, vol. 10, no. 3, pp. 282–293, 1982. [37] Strimling D., “Multi-Criteria Analysis in the Renewable Energy Industry(Green Energy and Technology)”, Interfaces, vol. 43(2), pp. 201-202, 2013. [38] Polishchuk, D., Polishchuk, O., and Yadzhak, M., “Solution of some problems of evaluation of the complex systems”, in 15th International Conference on Automatic Control, Odesa, Ukraine, 968-976. Sept. 2008. [24] Wittmuss A., “Scalarizing multiobjective optimization problems”, Mathematical Researches, vol. 27, pp. 255– 258, 1985. [25] Polishchuk O., “Optimization of function quality of complex dynamical systems”, Journal of Automation and Information Sciences, no. 4, pp. 39-44, 2004. [26] Polishchuk O., “Optimization of evaluation of man’s musculo-sceletal system”, Computing Mathematics, vol. 2, pp. 360-367, 2001. 7
3cs.SY
ON THE LINEARITY OF ω-PRIMALITY IN NUMERICAL MONOIDS arXiv:1309.7476v3 [math.AC] 21 May 2014 CHRISTOPHER O’NEILL AND ROBERTO PELAYO Abstract. In an atomic, cancellative, commutative monoid, the ω-value measures how far an element is from being prime. In numerical monoids, we show that this invariant exhibits eventual quasilinearity (i.e., periodic linearity). We apply this result to describe the asymptotic behavior of the ω-function for a general numerical monoid and give an explicit formula when the monoid has embedding dimension 2. 1. Introduction Recent years have seen an intensive study of the factorization properties in monoids and integral domains. Numerical monoids (i.e., co-finite, additive submonoids of N) provide an excellent venue to explore various measurements of non-unique factorization, including elasticity [6], delta sets [4], and catenary degrees [5]. See [9] for precise definitions. In [11], Geroldinger and Hassler define the ω-primality of an element in a cancellative, commutative monoid, which measures how far an element is from being prime. Their definition is provided below. Definition 1.1. Let M be a cancellative, commutative atomtic monoid with set of units M × and set of irreducibles A(M ). For each x ∈ M , define ω(x) = m if m is the smallest positive integer with the property that wheneverQ x | a1 · · · at , with ai ∈ A(M ), there is a T ⊂ {1, 2, . . . , t} with |T | ≤ m such that x | k∈T ak . If no such m exists, then set ω(x) = ∞. For each x ∈ M × , we define ω(x) = 0. Soon after, Anderson and Chapman developed much of the foundational theory for ω-primality in integral domains [1, 2]. They proved that, when applied to elements in numerical monoids, ω-primality becomes fairly well-behaved and tractable. Furthermore, in [3], they develop an algorithm to compute ω-values for any numerical monoid. A variant of this function is now included in the standard numericalsgps package in GAP [8]. This paper applies their algorithm to give a description of values of the ω-function for elements in an embedding dimension 2 numerical monoid. In embedding dimension 3, the authors of [7] provide a closed form for the ω-function on the generators of a numerical monoid generated by an interval. In this paper, we develop results on the eventual quasi-linearity of ω(n), viewed as a function ω : Γ → N, for any numerical monoid Γ. That is, if n1 is the smallest generator of Γ, we prove that for large enough n ∈ Γ, ω(n) = n11 n + a(n), where a(n) Date: December 17, 2017. 1 2 CHRISTOPHER O’NEILL AND ROBERTO PELAYO is periodic with period dividing n1 . In the case where Γ has embedding dimension 2, we apply these results to obtain an explicit formula for ω(n), which provides a more global description for ω-values for large n than the one given in [3]. In Section 2, we provide the reader with background and definitions related to ωprimality. In Section 3, we prove the main result of our paper (Theorem 3.6) using the concept of a cover map (Definition 3.4), and use it to provide an asymptotic description of the ω-function (Corollary 3.9). In Section 4, we provide an explicit form for ω(n) for n sufficiently large when Γ has embedding dimension 2 (Theorem 4.4). Lastly, in Section 5, we give some open questions, including possible connections to Hilbert functions in combinatorial commutative algebra (Problem 5.4). 2. Background In this section, we will build the basic machinery to compute ω-primality for elements of numerical monoids. In what follows, N denotes the set of non-negative integers. Definition 2.1. Let Γ be a numerical monoid with minimal generating set {n1 , . . . , nk }, P and fix n ∈ Γ. A vector ~a = (a1 , a2 , . . . , ak ) ∈ Nk is a factorization of n if n = ki=1 ai ni . P The length of the factorization ~a, denoted |~a|, is given by ki=1 ai . The support of a factorization ~a, denoted supp(~a), is given by supp(~a) = {nj : aj > 0}. For a numerical monoid Γ, we provide a more pertinent definition of ω-primality in terms of the minimal generators, using the additive structure of Γ as a submonoid of N. Definition 2.2. Let Γ = hn1 , . . . , nk i be a numerical monoid with irreducible elements n1 , . . . , nk . For n ∈ Γ, define ω(n) = m if m is the smallest positive integer with the P property that whenever ~a ∈ Nk satisfies ki=1 ai ni − n ∈ Γ with |~a| > m, there exist a ~b ∈ Nk with bi ≤ ai for each i such that Pk bi ni − n ∈ Γ and |~b| ≤ m. i=1 The notion of a bullet was first introduced in [7]. Throughout this paper, we use bullets extensively to study the ω-function of numerical monoids. Definition 2.3 gives the definition of a bullet, and Lemma 2.4 justifies using bullets to study the ω-function. Definition 2.3. Fix a numerical monoid Γ = hn1 , . . . , nk i and n ∈ Γ. We say ~a ∈ Nk P P is a bullet for n if ( ki=1 ai ni ) − n ∈ Γ and ( ki=1 ai ni − nj ) − n ∈ / Γ whenever aj > 0. A bullet ~a for n is maximal if |~a| = ω(n). Let bul(n) (resp. mbul(n)) denote the set of bullets (resp. maximal bullets) of n, and let bulj (n) = {~a ∈ bul(n) : nj ∈ supp(~a)} ⊂ bul(n) for j ≤ k. Lemma 2.4. There exists a maximal bullet for each n ∈ Γ. In particular, ω(n) < ∞ for all n ∈ Γ. ON THE LINEARITY OF ω-PRIMALITY IN NUMERICAL MONOIDS 3 Proof. It suffices to show that ω(n) is finite. Indeed, if there were no bullets for n of length ω(n), it would contradict the minimality of ω(n). P Fix a factorization ~a for n, and fix ~b with |~b| ≥ |~a| · ki=1 ni . We must have bj > aj P P for some j, so if ki=1 bi ni − n ∈ Γ, we have ki=1 bi ni − nj − n ∈ Γ, meaning ~b is not P a bullet for n. Thus, ω(n) < |~a| · ki=1 ni .  The main result of this paper is Theorem 3.6, which states that for any numerical monoid Γ, ω(n) is quasilinear for sufficiently large values of n. For completeness, we include the following definition here. For a full treatment, see [13]. Definition 2.5. A map f : N → N is a quasipolynomial if f (x) = ad (x)xd +· · ·+a0 (x), where each ai (x) is periodic with period si and ad is not identically 0. We call d the degree of f , and s = lcm(s0 , . . . , sd ) the period of f . A quasipolynomial f is quasilinear if it has degree 1. A function g : N → N is eventually quasilinear if there exists a quasilinear function f and N ∈ N such that g(n) = f (n) for all n > N . 3. Main Result In this section, we begin by explicitly stating the relationship between bullets for n ∈ Γ and the value of ω(n) (Proposition 3.2) and introducing the notion of cover maps (Definition 3.4). We then apply this to prove the eventual quasilinearity of the ω-function for any numerical monoid (Theorem 3.6). We conclude the section by providing an asymptotic description of the ω-function (Corollary 3.9). Example 3.1. Let Γ = h6, 9, 20i. Below is a plot of the values of the ω-function for h6, 9, 20i (left) and h11, 13, 15i (right). Theorem 3.6 states that for large values, these 1 graphs will look like a collection of discrete lines of slope 16 and 11 , respectively. 20 30 18 25 16 20 14 12 15 10 10 8 5 6 20 40 60 80 100 120 140 20 40 Proposition 3.2. For a numerical monoid Γ, ω(n) = max{|~a| : ~a ∈ bul(n)} for all n ∈ Γ. 60 80 100 120 140 4 CHRISTOPHER O’NEILL AND ROBERTO PELAYO Proof. For any bullet ~a ∈ bul(n), ω(n) ≥ |~a|, with equality exactly when ~a is a maximal bullet for n. Lemma 2.4 completes the proof.  Remark 3.3. Proposition 3.2, together with Lemma 3.5b, gives an algorithm for computing ω(n). In particular, Lemma 3.5b shows that every n has a bullet with support {nj } for each j, say with length bj . This means every other bullet ~a ∈ bul(n) must satisfy aj < bj . This gives a bounded region in which to find bul(n), which by Proposition 3.2 allows us to compute ω(n). This is essentially the algorithm given in [3, The Omega Algorithm]. Definition 3.4. Let Γ = hn1 , . . . , nk i be a numerical monoid. For n ∈ Γ and a ∈ N, the j-th cover map is the map bulj (n) → bul(n + anj ) given by φj (a1 , . . . , ak ) = (a1 , . . . , aj + a, . . . , ak ). Each cover map bulj (n) → bul(n + anj ) in Definition 3.4 is injective, and increases the length of a given factorization by a. By Proposition 3.2, this shows ω(n) + 1 is a lower bound for ω(n + nj ) when bulj (n) 6= ∅. Cover maps are, in many ways, the key to the proof of Theorem 3.6, as they allow us to express the bullets that occur for large elements of Γ in terms of the bullets of smaller elements in Γ. Lemma 3.5. Suppose Γ = hn1 , . . . , nk i is a minimally generated numerical monoid. (a) Fix i < j, and fix ~a ∈ bul(n) with ai , aj > 0. Fix an m ∈ N divisible by ni and nj , and let φi : buli (n) → bul(n + mni ) and φj : bulj (n) → bul(n + mnj ) denote the cover maps. We have |φi (~a)| ≥ |φj (~a)| with equality if and only if ni = nj . (b) For each j ≤ k, there exists a bullet ~b ∈ bul(n) for n with supp(~b) = {nj }. Proof. (a) Since ni ≤ nj , we see |φi (~a)| = |~a| + nmi ≥ |~a| + nmj = |φj (~a)|. (b) When bj is sufficiently large, bj nj − n ∈ Γ. Letting bj be the minimal such value, we get ~b ∈ bul(n).  We are now ready to state and prove the main result. Theorem 3.6. Let Γ = hn1 , . . . , nk i be a numerical monoid. For n sufficiently large, ω(n) is quasilinear with period dividing n1 . In particular, there exists an explicit N0 such that ω(n + n1 ) = ω(n) + 1 for n > N0 . P Proof. Let m = lcm(n1 , . . . , nk ), and let n0 = m · ki=1 ni . For 0 ≤ r < m, let cr = max{|~b| − |~a| : ~a, ~b ∈ bul(n0 + r)} and let c = max{cr : 0 ≤ r < m}. Let N0 = n0 + cm. We will show that ω(n + n1 ) = ω(n) + 1 for all n > N0 . ON THE LINEARITY OF ω-PRIMALITY IN NUMERICAL MONOIDS 5 Fix n ∈ Γ with n > n0 + cm, and write n − n0 = qm + r with 0 ≤ r < m. Let φj : bulj (n) → bul(n + m) and ψj : bul(n0 + r) → bul(n) denote the maps given by φj (a1 , . . . , ak ) = (a1 , . . . , aj + m , . . . , ak ) nj ψj (a1 , . . . , ak ) = (a1 , . . . , aj + q · and m , . . . , ak ) nj respectively. Notice that since n ≥ n0 , each (a1 , . . . , ak ) ∈ bul(n + m) has aj > m for some j, so k [ Im(φj ) = bul(n + m) j=1 that is, the union of the images of the cover maps φj cover bul(n + m). Also, since each ψj is a composition of such cover maps, the images of the cover maps ψj cover bul(n) as well. We first show there exists a maximal bullet for n with nonzero first coordinate. Since every bullet in bul(n) is in the image of some ψj , fix ~a ∈ bul(n0 + r) with a1 = 0 and some aj > 0. By Lemma 3.5b, there exists a bullet ~b ∈ bul(n0 + r) with b1 > 0. By assumption we have |~a| ≤ |~b| + cr . Each ψi is the composition of cover maps buli (n0 + r) → buli (n0 + r + m) → · · · → buli (n0 + r + qm). Since n1 < nj , the images of ~a and ~b in bul(n0 + r + `m) differ in length by at most cr − `. Since q ≥ cr , this gives |ψ1 (~b)| ≥ |ψj (~a)|. Next, we will show that ω(n + m) = ω(n) + nm1 . Fix a maximal bullet ~b ∈ bul(n) with b1 > 0. We claim φ1 (~b) ∈ bul(n + m) is maximal as well. Every bullet for n + m is the image of some φj . By Lemma 3.5a, φ1 gives the largest increase in length, so since ~b has maximal length in bul(n), it follows that φ1 (~b) has maximal length in bul(n + m). This yields ω(n + m) = |φ1 (~b)| = |~b| + nm1 = ω(n) + nm1 as desired. Finally, we will show that ω(n + n1 ) = ω(n) + 1. Notice the map φ1 is given by the composition m bul(n) → bul(n + n1 ) → · · · → bul(n + n1 ) n1 and each map is injective. By Lemma 3.5a this means m m ω(n) ≤ ω(n + n1 ) − 1 ≤ · · · ≤ ω(n + n1 ) − n1 n1 However, the first and last terms are equal, so in fact ω(n + n1 ) = ω(n) + 1. This completes the proof.  6 CHRISTOPHER O’NEILL AND ROBERTO PELAYO Remark 3.7. Fix a numerical monoid Γ, and let f denote the quasipolynomial such that f (n) = ω(n) for sufficiently large n. The dissonance point of the ω-function is the maximal n such that ω(n) 6= f (n). The proof of Theorem 3.6 indicates that N0 = n0 + cm is an upper bound for the dissonance point, where m = lcm(n1 , . . . , nk ), P n0 = m · ki=1 ni and c = max{cr : 0 ≤ r < m}, where cr = max{|~b| − |~a| : ~a, ~b ∈ bul(n0 + r)} for 0 ≤ r < m. The actual value of the dissonance point seems to vary drastically for different monoids. For instance, for the numerical monoid h10, 11, 15i, the dissonance point is 380, but for the numerical monoid h11, 13, 15i from Example 3.1, the dissonance point is 66. For both of these monoids, N0 > 10000 and thus is significantly larger than the actual dissonance points. We now give the following corollaries to Theorem 3.6. The first is a consequence of the proof of Theorem 3.6 and strengthens Lemma 3.5b. The second was proved in [3, Theorem 4.9] for embedding dimension 2 but is generalized here to arbitrary embedding dimension. Corollary 3.8. For n ∈ Γ sufficiently large, there exists a maximal bullet ~a ∈ bul(n) with a1 > 0. Corollary 3.9. We have 1 ω(n) = n→∞ n n1 lim for any numerical monoid Γ. Proof. By Theorem 3.6, we can eventually write ω(n) = n11 n + a(n), where a(n) is periodic with period at most n1 . In particular, a(n) takes on finitely many values, and thus is bounded. Therefore, as n grows large, a(n) → 0, so ω(n) → n11 , as desired.  n n 4. Embedding Dimension 2 In this section, we utilize the above results about bullets and the long-term behavior of the ω-function to provide an explicit formula for ω(n) when Γ has embedding dimension 2. Example 4.1. Let Γ = h3, 7i. The following bullets for elements of Γ between 3 and 20. q 3q ω mbul 3q + 1 ω 1 3 3 (0, 3) 4 2 6 3 (0, 3) 7 7 3 9 3 (3, 0), (0, 3) 10 8 4 12 4 (4, 0) 13 9 5 15 5 (5, 0) 16 10 6 18 6 (6, 0) 19 11 gives the omega value and maximal mbul 3q + 2 5 (7, 0) 8 (8, 0) 11 (9, 0) 14 (10, 0) 17 (11, 0) 20 ω mbul 7 (7, 0) 8 (8, 0) 9 (9, 0) ON THE LINEARITY OF ω-PRIMALITY IN NUMERICAL MONOIDS 7 Recall that in a numerical monoid Γ with n ∈ Γ, the Apéry set of n is defined as Ap(Γ, n) = {m ∈ Γ : m − n 6∈ Γ}. See [9] for a full treatment of Apéry sets. We include the following lemma characterizing the Apéry sets of the generators of a numerical monoid with embedding dimension 2. Lemma 4.2. Let Γ = hn1 , n2 i be a numerical monoid. Then Ap(Γ, ni ) = {anj : 0 ≤ a < ni } for {i, j} = {1, 2}. Proof. Since n1 and n2 are relatively prime, anj ∈ Ap(Γ, ni ) for 0 ≤ a < ni . This gives ni distinct elements of Ap(Γ, ni ), and by definition | Ap(Γ, ni )| = ni .  The following lemma appeared as [3, Lemma 4.3]. We state and prove it here using the terminology of this paper. Lemma 4.3. Let Γ = hn1 , n2 i be a numerical monoid. For n ∈ Γ, we have bul(n) = {(u, 0), (0, v)} ∪ {(a1 , a2 ) : n = a1 n1 + a2 n2 } for some u, v > 0. Moreover, only (u, 0) and (0, v) can be maximal bullets for n. Proof. Clearly (u, 0), (0, v) ∈ bul(n) for some u, v > 0, so fix a bullet (a1 , a2 ) ∈ bul(n) with a1 , a2 > 0. Let b = a1 n1 + a2 n2 − n. Then b ∈ Γ but b − n1 , b − n2 ∈ / Γ. This means b ∈ Ap(Γ, n1 ) ∩ Ap(Γ, n2 ). But this only happens when b = 0, proving the first claim. Now, if n = un1 , then un1 is the longest factorization of n, so the second claim follows. Otherwise, we have un1 −n ∈ Ap(Γ, n1 ), so un1 −n = an2 for some nonnegative a < n1 . Then n + an2 = un1 , so for any factorization (a1 , a2 ) of n, a1 + a2 + a ≤ u, meaning |(u, 0)| > |(a1 , a2 )|. This completes the proof.  We now provide a formula for the value of ω(n) in a numerical monoid of embedding dimension 2 for n sufficiently large. Theorem 4.4. Let Γ = hn1 , n2 i be a numerical monoid. Fix n sufficiently large. Write n = qn1 + r with 0 ≤ r < n1 , and let a ≥ 0 be minimal such that an1 ≡ r mod n2 . Then we have ω(n) = q + a. Proof. For any n ∈ Γ, let u(n) and v(n) denote the values such that (u(n), 0), (0, v(n)) ∈ bul(n). By applying covering maps, we see that u(n + n1 n2 ) = u(n) + n2 and v(n + n1 n2 ) = v(n) + n1 . Let c = max({0} ∪ {v(n1 n2 + t) − u(n1 n2 + t) : 0 ≤ t < n1 n2 }), fix n > cn1 n2 , and write n = sn1 n2 + t with 0 ≤ t < n1 n2 . Then u(n) − v(n) = u(sn1 n2 + t) − v(sn1 n2 + t) = (s − 1)(n2 − n1 ) + u(n1 n2 + t) − v(n1 n2 + t) ≥ c(n2 − n1 ) − (v(n1 n2 + t) − u(n1 n2 + t)) ≥ c(n2 − n1 ) − c ≥ 0 8 CHRISTOPHER O’NEILL AND ROBERTO PELAYO so by Lemma 4.3, (u(n), 0) is a maximal bullet for n, meaning ω(n) = u. Write n = qn1 + r with 0 ≤ r < n1 , and let a ≥ 0 be minimal such that an1 ≡ r mod n2 . Then (a + q)n1 − n = an1 + qn1 − n = an1 − r ∈ hn2 i and by minimality of a, (a + q − 1)n1 − n = (an1 − r) − n1 ∈ / Γ, so in fact u = a + q.  Remark 4.5. The authors of [3] also provide a formula for the ω-values in a numerical monoid of embedding dimension 2. Their formula requires an explicit computation for each n ∈ Γ, whereas Theorem 4.4 only requires n1 computations to find all ω-values for large n. Remark 4.6. Theorem 4.4 improves the bound on the dissonance point for 2-generated numerical monoids to cn1 n2 with c = max({0} ∪ {v(n1 n2 + t) − u(n1 n2 + t) : 0 ≤ t < n1 n2 }) where u(n) and v(n) denote the unique values such that (u(n), 0), (0, v(n)) ∈ bul(n), as guaranteed by Lemma 4.3. Example 4.7. Let Γ = h3, 7i as defined in Example 4.1. For n ∈ Γ and writing n = 3q + r for 0 ≤ r < 3, Theorem 4.4 allows us to write ω(n) = q + a(r), where   q + 0 for r = 0 q + 5 for r = 1 ω(n) =  q + 3 for r = 2 and by the table in Example 4.1, we see this holds for n ≥ 7. 5. Future Work In all of the examples of Γ we have computed, the eventual period of the ω-function is the smallest generator. We record this here. Conjecture 5.1. For any numerical monoid Γ with least generator n1 . For n sufficiently large, ω(n) is quasilinear with period exactly n1 . Another question concerns a more precise bound on the dissonance point. Problem 5.2. Fix a numerical monoid Γ, and let f denote the quasipolynomial such that f (n) = ω(n) for sufficiently large n. Characterize the maximal n such that ω(n) 6= f (n). Corollary 3.8 states that each sufficiently large n has a maximal bullet whose support contains n1 . Thus, a related question involves characterizing the maximal bullets of large n ∈ Γ. In many examples (for instance, when Γ have embedding dimension 2), for large n, the bullet with support {n1 } is maximal. However, this is not always the case. For instance, when Γ = h4, 5, 6i and n is sufficiently large with n ≡ 0 mod 4, every maximal bullet ~a ∈ mbul(n) satisfies a2 = 2. ON THE LINEARITY OF ω-PRIMALITY IN NUMERICAL MONOIDS 9 Problem 5.3. Characterize the maximal bullets for numerical semigroups Γ with embedding dimension greater than 2. Our initial efforts to prove Theorem 3.6 involved attempts to construct a graded ring R and a graded R-module M whose Hilbert function H(M ; −) takes on the values of the ω-function. Prior to finding such a construction, the direct proof given in this paper was obtained. If a proof using Hilbert functions were found, the resulting construction would give a combinatorial algebraic interpretation of the ω-function. See [12] for more on the Hilbert function. Problem 5.4. Given Γ, can one construct a graded ring R and graded R-module M (both depending on Γ) for which H(M ; n) = ω(n) for n ∈ Γ? 6. Acknowledgements Much of the work was completed during the Pacific Undergraduate Research Experience in Mathematics (PURE Math), which was funded by National Science Foundation grants DMS-1045147 and DMS-1045082 and a supplementary grant from the National Security Agency. The authors would like to thank Scott Chapman and Ezra Miller for numerous helpful conversations, as well as Emelie Curl, Staci Gleen, and Katrina Quinata for their initial observations on ω-functions. References [1] D. F. Anderson, S. T. Chapman, How far is an element from being prime?, Journal Algebra Appl. 9 (2010), 1–11. [2] D. F. Anderson, S. T. Chapman, On bounding measures of primeness in integral domains, Internat. J. Algebra Comput. 22(2012), 15 pp., [3] D. F. Anderson, S. T. Chapman, N. Kaplan, and D. Torkornoo, An algorithm to compute ω-primality in a numerical monoid, Semigroup Forum 82 (2011), no. 1, 96–108. [4] C. Bowles, S. T. Chapman, N. Kaplan, and D. Reiser, On delta sets of numerical monoids, J. Algebra Appl. 5(2006), 1–24. [5] S. T. Chapman, P. A. Garcı́a-Sánchez, and D. Llena, The catenary and tame degree of numerical semigroups, Forum Math 21(2009), 117–129. [6] S. T. Chapman, M. T. Holden, and T. A. Moore, Full elasticity in atomic monoids and integral domains, Rocky Mountain J. Math. 36 (2006), 1437–1455. [7] S. T. Chapman, W. Puckett, and K. Shour, On the omega values of generators of embedding dimension three numerical monoids generated by an interval, submitted for publication. [8] M. Delgado, P.A. Garcı́a-Sánchez, and J. J. Morais, GAP Numerical Semigroups Package, http://www.gap-system.org/Manuals/pkg/numericalsgps/doc/manual.pdf. [9] P.A. Garcı́a-Sánchez and J.C. Rosales, Numerical semigroups, vol. 20, Developments in Mathematics, Springer-Verlag, 2009. [10] A. Geroldinger, F. Halter-Koch, Nonunique factorization, Algebraic, Combinatorial and Analytic Theory, Pure and Applied Mathematics, vol. 278, Chapman & Hall/CRC, 2006. [11] A. Geroldinger, W. Hassler, Local tameness of v-Noetherian monoids, J. Pure Applied Algebra. 212(2008), 1509–1524. 10 CHRISTOPHER O’NEILL AND ROBERTO PELAYO [12] E. Miller and B. Sturmfels, Combinatorial commutative algebra, Graduate Texts in Mathematics, vol. 227, Springer-Verlag, New York, 2005. [13] R. Stanley, Enumerative combinatorics. volume 1, second edition, Cambridge Studies in Advanced Mathematics, 49. Cambridge University Press, Cambridge, 2012. xiv+626 pp. ISBN: 978-1-107-60262-5 Mathematics Department, Duke University, Durham, NC 27708 E-mail address: [email protected] Mathematics Department, University of Hawai‘i at Hilo, Hilo, HI 96720 E-mail address: [email protected]
0math.AC
Workshop track - ICLR 2018 DLVM: A MODERN COMPILER INFRASTRUCTURE FOR DEEP LEARNING SYSTEMS arXiv:1711.03016v5 [cs.PL] 2 Feb 2018 Richard Wei Departments of Computer Science & Linguistics University of Illinois at Urbana-Champaign Urbana, IL 61801 [email protected] Lane Schwartz Department of Linguistics University of Illinois at Urbana-Champaign Urbana, IL 61801 [email protected] Vikram Adve Department of Computer Science University of Illinois at Urbana-Champaign Urbana, IL 61801 [email protected] A BSTRACT Deep learning software demands reliability and performance. However, many of the existing deep learning frameworks are software libraries that act as an unsafe DSL in Python and a computation graph interpreter. We present DLVM, a design and implementation of a compiler infrastructure with a linear algebra intermediate representation, algorithmic differentiation by adjoint code generation, domainspecific optimizations and a code generator targeting GPU via LLVM. Designed as a modern compiler infrastructure inspired by LLVM, DLVM is more modular and more generic than existing deep learning compiler frameworks, and supports tensor DSLs with high expressivity. With our prototypical staged DSL embedded in Swift, we argue that the DLVM system enables a form of modular, safe and performant frameworks for deep learning. 1 I NTRODUCTION Within the deep learning community, most current approaches to neural networks make use of high-level frameworks with a tensor domain-specific language (DSL) such as Torch (Collobert et al., 2011), TensorFlow (Abadi et al., 2016), PyTorch (PyTorch Development Team, 2016), and MXNet (Chen et al., 2015). Traditionally, developers would build a computation graph (or dynamically generate graph nodes) using a DSL and let the framework interpret the computation graph on parallel architectures such as NVIDIA GPUs. While using hand-tuned GPU subroutines usually yields the best performance for complex operators, advanced compiler techniques can be applied to simplify computation, merge high-level operators based on shaping conditions, and fuse compatible elementwise operators to a single kernel to minimize the latency between kernel launches. Recent projects, the TensorFlow XLA compiler (Leary & Wang, 2017) and the NNVM compiler (NNVM, 2017) including TVM (Chen et al., 2017), have begun to apply compiler techniques to deep learning systems, targeting LLVM (Lattner & Adve, 2004) and various back-ends to achieve good performance. However, their design and implementation have not entirely followed established best practices in widely-used compiler frameworks in the industry. Moreover, some frameworks use operator-overloading algorithmic differentiation (AD) to compute gradients, leaving the gradient computation unoptimizable. The other approach to AD, source code transformation, can produce more efficient code. While frameworks such as TensorFlow already perform AD as a graph transformation and apply various optimizations, their AD transformation is not designed as a transformation pass in the pipeline of their compiler framework, but as part of the DSL library. Making AD part of the compiler framework would greatly simplify the development of DSLs, achieving separation of concerns. 1 Workshop track - ICLR 2018 Command Line Toolchain dlc, dlopt TEL (standalone DSL) Parse, Sema, DLGen HeaderGen, StdLib NNKit (embedded DSL) AST, ops, JIT compiler reification support DLVM Core Analyses Verifier Transforms Intermediate Representation CoreOp CoreTensor DLVM CodeGen Kernel generator, CPU code generator LLVM driver CoreCompute DLRuntime Memory tracker, DSL runtime support Figure 1: Software stack of the DLVM infrastructure. Blue components are the compiler framework. We introduce DLVM, a new compiler infrastructure for deep learning systems that addresses shortcomings of existing deep learning frameworks. Our solution includes (1) a domain-specific intermediate representation specifically designed for tensor computation, (2) principled use of modern compiler optimization techniques to substantially simplify neural network computation, including algebra simplification, AD checkpointing, compute kernel fusion, and various traditional compiler optimizations, (3) code generation through a mature compiler infrastructure that allows for transparent targeting of various hardware, and (4) an embedded DSL that supports static analysis, type safety, and natural expression of tensor computation, and has a just-in-time (JIT) compiler targeting DLVM for AD, optimizations, and code generation. 2 R ELATED W ORK Numerous existing projects provide specialized systems for machine learning but are not closely related to our work. These include Apache SystemML (Ghoting et al., 2011), a high-level language and framework for writing and executing machine learning problems targeting Apache Spark, and TACO (Kjolstad et al., 2017), a C++ library for compiling and optimizing kernels that is more similar to Halide (Ragan-Kelley et al., 2013) than to our work. Our work treats the creation of neural networks as a compilers problem to be addressed using mature compiler techniques. SystemML does not consider this issue at all; TACO does use compiler optimization, but only at a very low level to generate individual kernels. Two projects closely related to this work are the TensorFlow XLA compiler and the NNVM compiler. The code representation in these frameworks is a “sea of nodes” representation, embedding control flow nodes and composite nodes in a data flow graph. To apply algorithmic differentiation on this IR requires non-standard processing. In contrast, our approach is designed from the start around the idea that a neural network (and its associated tensor computations) is itself a program, which is best optimized through robust application of mature techniques in a principled compilation pipeline. We represent tensor computation in static single assignment (SSA) form with control flow graph, and perform algorithmic differentiation, domain-specific optimizations, general-purpose optimizations, low-level optimizations, and code generation. XLA takes a similar approach to ours, transforming TensorFlow sub-graphs to XLA’s HLO graph and performing optimizations. Our intermediate representation is much more expressive than XLA’s by including modular IR components and general-purpose instructions; this enables our approach to support full-fledged DSLs including standalone compiled DSLs and perform more extensive optimizations such as inlining and interprocedual optimizations. Our approach also differs from XLA by representing composite functions such as min and max directly through primitive instructions 2 Workshop track - ICLR 2018 Analyses & Verification Differentiation Optimization Dominance Algebra Simplif. Side Effects AD Checkpointing Type Checking Linear Alg. Fusion Differentiability Dead Code Elim. Compute Generation Compute Scheduling Code Generation Comm. Subexp. Elim. Figure 2: Compilation stages in the DLVM compilation pipeline. such as compare and select, which enables us to apply generic AD, and by using SSA form with control flow graph, which allows for reusing battle-tested SSA optimization algorithms in the LLVM community. Importantly, our entire infrastructure was designed from the start around a robust compile-time framework for tensor DSLs, whereas XLA has been adapted around the existing TensorFlow infrastructure with a particular focus on hardware support for Google’s Tensor Processing Units (Jouppi et al., 2017). Where TVM and NNVM are built as a DSL and a graph library in Python with a C++ implementation, DLVM’s architecture is closer to LLVM and the Swift Intermediate Language (Groff & Lattner, 2015), having an IR file format and a full-fledged command line toolchain. More specifically, our work differs from NNVM and XLA in the design and presence of an IR that has a textual parsable format, a module/function/basic block hierarchy, custom type declarations and memory semantics. The textual IR enables robust unit testing via FileCheck, which is used extensively in LLVM and most LLVM-based compilers. Moreover, DLVM and its associated DSLs are implemented entirely in Swift, a safe systems programming language, and thus have an elegantly compact codebase and type-safe APIs. 3 DLVM Deep Learning Virtual Machine (DLVM) is a compiler infrastructure designed for modern deep learning systems.1 DLVM is designed to apply a multi-stage compiler optimization strategy to both high-level linear algebra and low-level parallelism, perform domain-specific transformations, relieve the overhead in front-end languages, and serve as the host for research and development of DSLs for deep learning. The complete DLVM software stack, including sample front-end deep learning DSLs, is shown in Figure 1 on the preceding page. Figure 2 illustrates the major stages in the DLVM compilation pipeline. The DLVM compilation stages address algorithmic differentiation, domain-specific optimizations, general-purpose optimizations, and static code generation targeting a variety of compute architectures. The raw and optimizable stages allow constructs for high-level tensor operations and various high-level optimizations. The compute and schedule stages allow constructs for low-level array operations lowered from tensor operations in high-level stages, borrowing the design from Halide (Ragan-Kelley et al., 2013). The DLVM Intermediate Representation (IR) is the core language of the system. It uses static single assignment (SSA) form, control flow graphs, high-level types including a first-class tensor type, and a set of linear algebra operators combined with a general-purpose instruction set (see Table 1). The system enables a wide variety of domain-specific analyses and transformations, such as reverse-mode AD, AD checkpointing, algebra simplification and linear algebra fusion. To demonstrate how DLVM helps the development of domain-specific languages (DSLs), in Section 3.4 we present one prototypical staged DSL: NNKit. NNKit features safe and natural expression of tensor computation alongside the host program, and targets DLVM for differentiation, optimizations and static code generation. 1 Code for DLVM is available at https://github.com/dlvm-team 3 Workshop track - ICLR 2018 Kind Element-wise unary Element-wise binary Dot Reduce Transpose Slice Compare Data type cast Function application Branch Conditional branch Shape cast Example tanh %a: <10 x f32> power %a: <10 x f32>, %b: 2: f32 dot %a: <10 x 20 x f32>, %b: <20 x 2 x f32> reduce %a: <10 x 30 x f32> by add along 1 transpose %m: <2 x 3 x 4 x 5 x f32> slice %a: <10 x 20 x i32> from 1 upto 5 gt %a: <10 x 20 x bool>, %b: <1 x 20 x bool> dataTypeCast %x: <10 x f32> to f64 apply %foo(%x: f32, %y: f32): (f32, f32) -> f32 branch 'block_name(%a: i32, %b: i32) conditional %cond: bool then 'bb0() else 'bb1() shapeCast %a: <1 x 40 x f32> to 2 x 20 Table 1: This table illustrates a selection of the instructions in the DLVM virtual instruction set. The instruction set includes linear algebra operations such as tanh and dot in addition to control flow instructions such as branch. 3.1 DLVM C ORE DLVM Core contains essential components for an optimizing compiler: IR, pass manager, and passes (see Figure 1 on page 2). The DLVM IR consists of a virtual instruction set, control flow graph and data flow representation. Passes are functions that traverse the intermediate representation of a program, either producing useful results as analyses of the program (analysis passes), or mutating the program for differentiation and optimizations (transform passes). 3.1.1 A D OMAIN - SPECIFIC C OMPILER I NTERMEDIATE R EPRESENTATION FOR DLVM Inspired by the LLVM IR (Lattner & Adve, 2004) and the Swift Intermediate Language (Groff & Lattner, 2015), DLVM IR is a graph-based, modular code representation, with both an in-memory format and a textual format. The code representation has a hierarchy of abstractions: module, function, basic block, and instruction. An instruction is the minimal unit of code that operates on values, which can be globals, function arguments or temporary virtual registers produced by instructions. Each module contains a collection of type definitions, global values and functions. Each function has a control flow graph formed by basic blocks and control flow edges. Each basic block contains an ordered list of instructions with data dependencies forming a directed acyclic graph. The DLVM IR has a high-level type system with tensor as a first-class type. The DLVM virtual instruction set includes domain-specific primitive math operators, as well as general-purpose instructions for memory management, control flow and function application. Domain-specific instructions include element-wise unary operators, such as tanh and negate, element-wise binary operators, such as add and power, and complex operators such as dot, transpose, and convolve. All element-wise binary operators support broadcasting. A sample of DLVM IR code is shown in Figure 3 on the next page. The DLVM instruction set does not include composite math functions such as softmax, sigmoid, min or max. All of these functions can be composed of primitive math instructions and control flow constructs. This design allows for the standard AD algorithm to be applied to any differentiable program, with no need for special handling of composite cases. 3.1.2 D OMAIN - SPECIFIC C OMPILER PASSES FOR DLVM DLVM has a full-fledged pass infrastructure, performing various analyses and two kinds of transformations: differentiation and optimization. Differentiation constructs function definitions from gradient declarations using adjoint code generation (see Section 3.1.3 below). Optimization is then performed on the resulting IR, maximizing the code performance. Optimizations include domainspecific optimizations, such as algebra simplification, linear algebra fusion, matrix multiplication reordering, and AD checkpointing, and traditional compiler optimizations. 4 Workshop track - ICLR 2018 module "my_module" stage raw // Representing function foo(x, w, b) = dot(x, w) + b func @foo: (<1 x 784 x f32>, <784 x 10 x f32>, <1 x 10 x f32>) -> <1 x 10 x f32> { 'entry(%x: <1 x 784 x f32>, %w: <784 x 10 x f32>, %b: <1 x 10 x f32>): %v0 = dot %x: <1 x 784 x f32>, %w: <784 x 10 x f32> %v1 = add %v0: <1 x 10 x f32>, %b: <1 x 10 x f32> return %v1: <1 x 10 x f32> } // Gradient of @foo with respect to all arguments [gradient @foo] func @foo_grad: (<1 x 784 x f32>, <784 x 10 x f32>, <1 x 10 x f32>) -> (<1 x 784 x f32>, <784 x 10 x f32>, <1 x 10 x f32>) // Gradient of @foo with respect to arguments 1 and 2 // Keeping original output 0 // Seedable, able to take back-propagated gradient as a seed for AD [gradient @foo wrt 1, 2 keeping 0 seedable] func @foo_grad_3: (<1 x 784 x f32>, <784 x 10 x f32>, <1 x 10 x f32>, <1 x 10 x f32>) -> (<784 x 10 x f32>, <1 x 10 x f32>, <1 x 10 x f32>) Figure 3: Example code in DLVM intermediate representation. Note that some functions are annotated as defining the gradient of another function with respect some or all arguments. The body of these gradient functions will be automatically generated. Since DLVM IR is aware of mathematical operators such as tanh and power, the algebra simplification pass can find and simplify certain mathematical operations that are expensive or redundant. For example, x2 can be simplified to x x ( stands for element-wise multiplication), and x0 can be simplified to constant 1. Matrix multiplication reordering is another classic optimization that minimizes the number of sub-operations in a chain of matrix multiplications with different dimensionality, based on matrix multiplication’s associativity. Since the DLVM optimizer is aware of linear algebra operations with static dimensionality, maximizing the performance by fusing verbose linear operations into a single matrix multiplication is beneficial as well. For example, it is very common to encounter expressions of the form Wx + b. When unoptimized, the matrix multiplication and the addition will be parallelized separately. Since launching compute kernels separately can be expensive, DLVM performs linear algebra fusion, which transforms subexpressions involving both matrix multiplication and element-wise operations into a single matrix multiplication instruction on padded tensors. Besides the simple pattern like an addition of matrix multiplication and a vector, we can apply the same approach to a polynomial of multiple matrix multiplications, turning the polynomial into a single matrix multiplication. For example, in a simple recurrent neural network (RNN), each cell of the recurrence is a feed forward neural network that takes two inputs: xt , the input local to the current timestep, and ht , the hidden state carried along the recurrence. The linear algebra fusion pass can simplify operations in ht = f (Wxt−1 +Uht−1 +b) from two matrix multiplications and two additions into a single matrix multiplication. A more aggressive, interprocedural version of linear algebra fusion can optimize parameter passing and memory allocation, so that the entire concatenated matrix can be created and passed around in the first place without reallocation. 3.1.3 A LGORITHMIC D IFFERENTIATION THROUGH A DJOINT C ODE G ENERATION Algorithmic differentiation (AD), also known as automatic differentiation, encompasses a family of a well-known techniques for algorithmically obtaining the derivatives of a function f : x ∈ Rn → y ∈ Rm (Naumann, 2011). The function f can be represented as a directed acyclic computation graph representing the composition of elementary computational operations for which the respective 5 Workshop track - ICLR 2018 ∂y derivatives are well known. The partial derivative ∂xji can be computed through recursive applications of the chain rule, either in the forward direction (corresponding to a bottom-up traversal of the computation graph) or in the backward direction (corresponding to a top-down traversal of the computation graph). The former approach, called forward-mode or tangent-mode AD, is used in some research communities, most commonly when m  n (Goodfellow et al., 2016). The latter approach, which includes the back-propagation algorithm (Rumelhart et al., 1986) as a special case, is called reverse-mode or adjoint-mode AD, and encompasses the techniques most commonly used for training the weights in neural networks. In DLVM, the differentiation pass is responsible for performing reverse-mode AD. This pass is responsible for generating DLVM IR code that calculates the derivative of a differentiable function. A function is marked as being automatically differentiable via gradient declarations. A gradient declaration is a function in a module that is declared with its mathematical relation with another function in the module and no function body. The function @foo_grad in Figure 3 is an example of such a function. Gradient declarations are configurable, e.g. specifying arguments to differentiate with respect to, keeping original outputs, and toggling seedability to accept back-propagated gradients. The differentiation pass, when applied, canonicalizes every gradient declaration in the module to a normal function definition with basic blocks and instructions. The canonicalization process first copies basic blocks and instructions from the original function to the new function body, and then applies adjoint code generation to the function. Unlike many of the existing deep learning frameworks, AD in DLVM is a source code transformation, not interpretation (operator overloading) over the same program. This makes the compiler able to perform optimizations on the gradient computation separately and enables higher order differentiation. Given a differentiable function f (x1 , x2 , . . . , xn ), this pass creates a new function that computes the Jacobian Jf . This approach to AD has several advantages with respect to AD performed by operator overloading / graph interpretation. Unlike operator overloading, the gradient function produced by AD is a standalone function that sits uniformly alongside other functions in an IR module, representationally unrelated to the original function. The generated function takes original inputs and produces a tuple of partial derivatives with respect to the inputs. In AD, not all values in the forward evaluation will necessarily be used to compute derivatives. In DLVM, unused operations can be easily eliminated by the aggressive dead code elimination pass in the compilation pipeline (see Section 3.1.4). In addition, an AD-specific optimization technique called checkpointing can further reduce memory consumption during gradient computation. AD in DLVM is configurable. The front-end can choose to differentiate a function with respect to selected arguments, to keep some of the outputs of the original function, to apply differentiation to a specific output when there are multiple return values, or to enable the function to accept backpropagated gradients (seeds) through function composition, all by gradient declarations. If the function returns multiple values in a tuple, the gradient declaration can also specify which tuple element to differentiate. Our approach to AD is implemented as a transformation from one function to another function. This approach also makes higher-order differentiation possible; this can be accomplished by declaring a higher-order gradient function that differentiates the original gradient function. 3.1.4 G ENERAL - PURPOSE O PTIMIZATIONS FOR DLVM General-purpose optimizations refer to traditional compiler optimizations applied to DLVM IR. These optimizations are important at the DLVM stage in the compilation pipeline, since linear algebra computation can be highly optimized or eliminated before they get lowered to LLVM IR which contain parallel execution and low-level information that prevent LLVM optimizations from identifying high-level patterns. Some of these optimizations are aggressive dead code elimination, common subexpression elimination, and sparse conditional constant propagation. Applying such optimizations on gradient computation is not feasible in other approaches to AD that use graph interpretation (operator overloading), because the forward pass and the backward pass are tied together in a single graph; mutating either evaluation pass will alter the semantics of the other. 6 Workshop track - ICLR 2018 3.2 C ODE GENERATION Two major design goals of DLVM are the ability to target multiple heterogenous parallel architectures from the same front-end DSL code (and corresponding DLVM IR), and the ability to perform aggressive optimizations on lowered programs. In order to attain these goals, DLVM code generation transforms DLVM IR into LLVM IR. LLVM is a robust and mature compiler infrastructure with multiple back-ends, including NVIDIA GPUs. Many high-level DLVM IR linear algebra instructions over tensors abstract lower-level operations. The DLVM compiler transforms the high-level DLVM IR into lower-level stages and ultimately into calls to BLAS and compute kernels in LLVM IR. Existing LLVM utilities are used to compile the generated LLVM IR to the final binary. In order to take full advantage of a variety of emerging heterogeneous parallel architectures, we plan for future versions of DLVM to target the IR of HPVM (Srivastava et al., 2016), a higherlevel heterogeneous compiler extension to LLVM IR that allows for transparent targeting of diverse architectures from a data flow graph. 3.3 DLVM COMMAND LINE TOOLCHAIN The front-end software associated with each DSL (see Section 3.4) is responsible for generating a DLVM IR for a given source language program to be compiled. The DLVM compiler infrastructure itself is a compiler from DLVM IR to LLVM IR, therefore having a command line toolchain is necessary for verifying, transforming and compiling batches of DLVM IR files (*.dl). Unlike XLA and NNVM/TVM, which only provide a Python/C++ interface to their users, DLVM provides a command line interface like any industry-standard compiler. The DLVM optimizer utility, dlopt, accepts *.dl IR files and applies user-specified optimization passes on them. The DLVM compiler driver, dlc, accepts *.dl IR files and performs user-specified tasks, such as verification, differentiation, optimization passes, stage lowering passes, and code generation; the driver invokes the DLVM core library to achieve these tasks. Because of having a textual format of the IR, the DLVM framework can easily make use of the LLVM Integrated Tester (lit) and FileCheck to perform robust unit testing. In future development, we plan to introduce a DLVM bitcode format for compact storage and high-throughput processing of DLVM code. 3.4 N EURAL NETWORK DSL S Most of existing deep learning DSLs are embedded in a dynamically typed scripting language such as Python and Lua. While these scripting languages provide flexibility and a large number of libraries for scientific computing, they can act as a barrier between lightweight prototyping code and systematic production code. This barrier significantly reduces the reliability of ML software, resulting in suboptimal programming experience and unnecessarily effortful development cycles. In software engineering, a proven approach to tackle this problem is language and compiler technologies, starting from a language that is amenable to static analysis. A well-designed deep learning DSL should support the needs of deep learning software developers by providing a safe environment for rapid prototyping, while simultaneously generating highly efficient code for training and inference. DSLs in a scripting language can easily achieve rapid prototyping, but they are generally incapable of providing a safe environment with optimal performance. We believe that the best solution is DSLs embedded in a type-safe, type-inferring programming language that is both fast and easy to learn. In our initial release of DLVM, we provide one such DSL, both as a proof-of-concept and as a reference implementation that showcases the capabilities of DLVM as a platform for deep learning DSL development. NNKit is a staged DSL embedded in Swift, featuring natural expression of tensor computation alongside the host program without losing static analyses and optimizations on the tensor program. Inspired by Lightweight Modular Staging (Rompf & Odersky, 2010), NNKit leverages the static type system of Swift to guarantee type safety of the DSL. Tensor types are wrapped in Rep<T>, meaning the representation of some computation that produces data of type T. Tensor operators overloaded for Rep are essentially AST builders for delayed evaluation. Instead of generating computation nodes at runtime and performing operator-overloading AD like PyTorch or TensorFlow Eager (Google Brain Team, 2017), NNKit tensor computations are staged once during the lifetime of the host program. At invocation time of staged functions, NNKit emits shape-specialized DLVM IR and leverages DLVM 7 Workshop track - ICLR 2018 // Staged function representing f(x, w, b) = dot(x, w) + b let f: Rep<(Float2D, Float2D, Float2D) -> Float2D> = lambda { x, w, b in x • w + b } // Staged function ’g’, type-inferred from ’f’ let g = lambda { x, w, b in let linear = f[x, w, b] // staged function application return tanh(linear) } // Gradient of ’g’ with respect to arguments ’w’ and ’b’ let dg = gradient(of: g, withRespectTo: (1, 2), keeping: 0) // ’dg’ has type: // Rep<(Float2D, Float2D, Float2D) -> (Float2D, Float2D, Float2D)> // Call staged function on input data ’x’, ’w’ and ’b’ let (dg_dw, dg_db, result) = dg[x, w, b] // At runtime, ’dg’ gets just-in-time compiled though DLVM, // and computes ( dg/dw, dg/db, g(x, w, b) ) // Second order derivative of ’g’ with respect to ’w’ let d2g_dw2 = gradient(of: dg, from: 0, withRespectTo: (1)) // ’d2g_dw2’ has type: // Rep<(Float2D, Float2D, Float2D) -> Float2D> Figure 4: Example code in Swift using NNKit, a staged DSL targeting DLVM. to perform AD, optimizations, and low-level code generation. A sample of Swift code using NNKit is shown in Figure 4. The NNKit just-in-time compiler has four important phases: The first phase, expression staging, produces an unshaped graph IR of the tensor computation. The second phase, shape specialization, prepares to generate statically shaped DLVM IR for staged functions when they are applied to shaped tensors. The third phase, lowering, generates DLVM IR and passes it through DLVM, producing a dynamic library containing a function symbol. The final phase, function reification, loads the binary and wraps the low-level function to a Swift function. We anticipate other existing deep learning frameworks, such as TensorFlow, could be adapted to use DLVM as a back-end to their tensor math DSLs. 4 C ONCLUSION The deep learning research community has a rich variety of available frameworks. While two existing projects have attempted a compilers approach to deep learning frameworks, and have respectively achieved good integration with existing systems (TensorFlow XLA) and good performance (NNVM + TVM), their design philosophies have not entirely followed established best practices in optimizing compiler design. While well intentioned, the remaining vast majority of other frameworks have failed to observe that the problem of front-end DSLs, algorithmic differentiation, and converting a neural network into efficient executable code is, at its core, a compilers problem. As a result, important issues of extensibility and optimization have been addressed in less than optimal fashion in such frameworks. Nevertheless, several such frameworks have achieved wide adoption. We believe that the principled application of optimizing compiler techniques will lead to substantial improvements in the tools available to deep learning researchers. DLVM and its associated front-end DSLs have a major role to play in this future. Our existing implementation supports reverse-mode AD in the core language, and utilizes LLVM to target NVIDIA GPUs. In our ongoing work, we plan to substantially increase the number of supported hardware architectures by utilizing HPVM as an additional back-end, and explore more advanced AD techniques such as mixing forward and reverse modes. 8 Workshop track - ICLR 2018 R EFERENCES Martín Abadi, Ashish Agarwal, Paul Barham, Eugene Brevdo, Zhifeng Chen, Craig Citro, Gregory S. Corrado, Andy Davis, Jeffrey Dean, Matthieu Devin, Sanjay Ghemawat, Ian J. Goodfellow, Andrew Harp, Geoffrey Irving, Michael Isard, Yangqing Jia, Rafal Józefowicz, Lukasz Kaiser, Manjunath Kudlur, Josh Levenberg, Dan Mané, Rajat Monga, Sherry Moore, Derek Gordon Murray, Chris Olah, Mike Schuster, Jonathon Shlens, Benoit Steiner, Ilya Sutskever, Kunal Talwar, Paul A. Tucker, Vincent Vanhoucke, Vijay Vasudevan, Fernanda B. Viégas, Oriol Vinyals, Pete Warden, Martin Wattenberg, Martin Wicke, Yuan Yu, and Xiaoqiang Zheng. TensorFlow: Large-scale machine learning on heterogeneous distributed systems. CoRR, abs/1603.04467, 2016. URL http://arxiv.org/abs/1603.04467. Tianqi Chen, Mu Li, Yutian Li, Min Lin, Naiyan Wang, Minjie Wang, Tianjun Xiao, Bing Xu, Chiyuan Zhang, and Zheng Zhang. Mxnet: A flexible and efficient machine learning library for heterogeneous distributed systems. CoRR, abs/1512.01274, 2015. URL http://arxiv.org/ abs/1512.01274. Tianqi Chen, Thierry Moreau, Ziheng Jiang, and Haichen Shen. TVM: An end to end IR stack for deploying deep learning workloads on hardware platforms. http://tvmlang.org/2017/ 08/17/tvm-release-announcement.html, 2017. Ronan Collobert, Koray Kavukcuoglu, and Clément Farabet. Torch7: A Matlab-like environment for machine learning. In NIPS Big Learning Workshop: Algorithms, Systems, and Tools for Learning at Scale, December 2011. Amol Ghoting, Rajasekar Krishnamurthy, Edwin Pednault, Berthold Reinwald, Vikas Sindhwani, Shirish Tatikonda, Yuanyuan Tian, and Shivakumar Vaithyanathan. Systemml: Declarative machine learning on MapReduce. In Proceedings of the 2011 IEEE 27th International Conference on Data Engineering, ICDE ’11, pp. 231–242, Washington, DC, USA, 2011. IEEE Computer Society. ISBN 978-1-4244-8959-6. doi: 10.1109/ICDE.2011.5767930. URL http://dx.doi.org/ 10.1109/ICDE.2011.5767930. Ian Goodfellow, Yoshua Bengio, and Aaron Courville. Deep Learning. MIT Press, 2016. http: //www.deeplearningbook.org. Google Brain Team. Eager Execution: An imperative, define-by-run interface to TensorFlow. 2017. URL https://research.googleblog.com/2017/10/ eager-execution-imperative-define-by.html. Joe Groff and Chris Lattner. Swift’s High-Level IR: A Case Study of Complementing LLVM IR with Language-Specific Optimization. 2015 LLVM Developers’ Meeting, 2015. URL http: //llvm.org/devmtg/2015-10/slides/GroffLattner-SILHighLevelIR.pdf. Norman P. Jouppi, Cliff Young, Nishant Patil, David Patterson, Gaurav Agrawal, Raminder Bajwa, Sarah Bates, Suresh Bhatia, Nan Boden, Al Borchers, Rick Boyle, Pierre-luc Cantin, Clifford Chao, Chris Clark, Jeremy Coriell, Mike Daley, Matt Dau, Jeffrey Dean, Ben Gelb, Tara Vazir Ghaemmaghami, Rajendra Gottipati, William Gulland, Robert Hagmann, Richard C. Ho, Doug Hogberg, John Hu, Robert Hundt, Dan Hurt, Julian Ibarz, Aaron Jaffey, Alek Jaworski, Alexander Kaplan, Harshit Khaitan, Andy Koch, Naveen Kumar, Steve Lacy, James Laudon, James Law, Diemthu Le, Chris Leary, Zhuyuan Liu, Kyle Lucke, Alan Lundin, Gordon MacKean, Adriana Maggiore, Maire Mahony, Kieran Miller, Rahul Nagarajan, Ravi Narayanaswami, Ray Ni, Kathy Nix, Thomas Norrie, Mark Omernick, Narayana Penukonda, Andy Phelps, Jonathan Ross, Amir Salek, Emad Samadiani, Chris Severn, Gregory Sizikov, Matthew Snelham, Jed Souter, Dan Steinberg, Andy Swing, Mercedes Tan, Gregory Thorson, Bo Tian, Horia Toma, Erick Tuttle, Vijay Vasudevan, Richard Walter, Walter Wang, Eric Wilcox, and Doe Hyun Yoon. In-datacenter performance analysis of a tensor processing unit. CoRR, abs/1704.04760, 2017. URL http: //arxiv.org/abs/1704.04760. Fredrik Kjolstad, Shoaib Kamil, Stephen Chou, David Lugato, and Saman Amarasinghe. The tensor algebra compiler. Proc. ACM Program. Lang., 1(OOPSLA):77:1–77:29, October 2017. ISSN 2475-1421. doi: 10.1145/3133901. URL http://doi.acm.org/10.1145/3133901. 9 Workshop track - ICLR 2018 Chris Lattner and Vikram Adve. LLVM: A Compilation Framework for Lifelong Program Analysis & Transformation. In Proceedings of the 2004 International Symposium on Code Generation and Optimization (CGO’04), Palo Alto, California, Mar 2004. Chris Leary and Todd Wang. XLA: TensorFlow, compiled! TensorFlow Dev Summit 2017, February 2017. Uwe Naumann. The Art of Differentiating Computer Programs. Society for Industrial and Applied Mathematics, 2011. doi: 10.1137/1.9781611972078. URL http://epubs.siam.org/doi/ abs/10.1137/1.9781611972078. NNVM. NNVM compiler: Open compiler for AI frameworks. http://tvmlang.org/2017/ 10/06/nnvm-compiler-announcement.html, 2017. PyTorch Development Team. Tensors and Dynamic neural networks in Python with strong GPU acceleration. 2016. URL http://pytorch.org. Jonathan Ragan-Kelley, Connelly Barnes, Andrew Adams, Sylvain Paris, Frédo Durand, and Saman Amarasinghe. Halide: A language and compiler for optimizing parallelism, locality, and recomputation in image processing pipelines. In Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’13, pp. 519–530, New York, NY, USA, 2013. ACM. ISBN 978-1-4503-2014-6. doi: 10.1145/2491956.2462176. URL http://doi.acm.org/10.1145/2491956.2462176. Tiark Rompf and Martin Odersky. Lightweight modular staging: A pragmatic approach to runtime code generation and compiled dsls. In Proceedings of the Ninth International Conference on Generative Programming and Component Engineering, GPCE ’10, pp. 127–136, New York, NY, USA, 2010. ACM. ISBN 978-1-4503-0154-1. doi: 10.1145/1868294.1868314. URL http://doi.acm.org/10.1145/1868294.1868314. David E. Rumelhart, James L. McClelland, and CORPORATE PDP Research Group (eds.). Parallel Distributed Processing: Explorations in the Microstructure of Cognition, Vol. 1: Foundations. MIT Press, Cambridge, MA, USA, 1986. ISBN 0-262-68053-X. Prakalp Srivastava, Maria Kotsifakou, and Vikram S. Adve. HPVM: A portable virtual instruction set for heterogeneous parallel systems. CoRR, abs/1611.00860, 2016. URL http://arxiv.org/ abs/1611.00860. 10
6cs.PL
arXiv:1802.05686v1 [cs.NE] 15 Feb 2018 A Bio-inspired Redundant Sensing Architecture Anh Tuan Nguyen, Jian Xu and Zhi Yang∗ Department of Biomedical Engineering University of Minnesota Minneapolis, MN 55455 ∗ [email protected] Abstract Sensing is the process of deriving signals from the environment that allows artificial systems to interact with the physical world. The Shannon theorem specifies the maximum rate at which information can be acquired [1]. However, this upper bound is hard to achieve in many man-made systems. The biological visual systems, on the other hand, have highly efficient signal representation and processing mechanisms that allow precise sensing. In this work, we argue that redundancy is one of the critical characteristics for such superior performance. We show architectural advantages by utilizing redundant sensing, including correction of mismatch error and significant precision enhancement. For a proof-of-concept demonstration, we have designed a heuristic-based analog-to-digital converter - a zero-dimensional quantizer. Through Monte Carlo simulation with the error probabilistic distribution as a priori, the performance approaching the Shannon limit is feasible. In actual measurements without knowing the error distribution, we observe at least 2-bit extra precision. The results may also help explain biological processes including the dominance of binocular vision, the functional roles of the fixational eye movements, and the structural mechanisms allowing hyperacuity. 1 Introduction Visual systems have perfected the art of sensing through billions of years of evolution. As an example, with roughly 100 million photoreceptors absorbing light and 1.5 million retinal ganglion cells transmitting information [2, 3, 4], a human can see images in three-dimensional space with great details and unparalleled resolution. Anatomical studies determine the spatial density of the photoreceptors on the retina, which limits the peak foveal angular resolution to 20-30 arcseconds according to Shannon theory [1, 2]. There are also other imperfections due to nonuniform distribution of cells’ shape, size, location, and sensitivity that further constrain the precision. However, experiment data have shown that human can achieve an angular separation close to 1 arcminute in a two-point acuity test [5]. In certain conditions, it is even possible to detect an angular misalignment of only 2-5 arcseconds [6], which surpasses the virtually impossible physical barrier. This ability, known as hyperacuity, has baffled scientists for decades: what kind of mechanism allows human to read an undistorted image with such a blunt instrument? Among the approaches to explain this astonishing feat of human vision, redundant sensing is a promising candidate. It is well-known that redundancy is an important characteristic of many biological systems, from DNA coding to neural network [7]. Previous studies [8, 9] suggest there is a connection between hyperacuity and binocular vision - the ability to see images using two eyes with overlapping field of vision. Also known as stereopsis, it presents a passive form of redundant sensing. In addition to the obvious advantage of seeing objects in three-dimensional space, the binocular vision has been proven to increase visual dynamic range, contrast, and signal-to-noise ratio [10]. It is evident that seeing with two eyes enables us to sense a higher level of information 30th Conference on Neural Information Processing Systems (NIPS 2016), Barcelona, Spain. ∆4 ∆0 ∆8 ∆5 ∆1 ∆6 ∆2 ∆7 ∆3 ∆4 ∆9 ∆10 ∆11 ∆0 ∆8 ∆5 ∆1 ∆9 ∆6 ∆2 ∆7 ∆3 ∆10 ∆11 ∆12 ∆13 ∆14 ∆15 ∆12 ∆13 ∆14 ∆15 Mismatch Error Ideal Conditions (a) 𝜃0 𝜃1 𝜃2 𝜃3 𝜃4 𝜃5 𝜃6 𝜃7 𝜃8 𝜃0 ∆0 ∆1 ∆2 ∆3 ∆4 ∆5 ∆6 ∆7 Ideal Conditions 𝜃1 𝜃2 𝜃3 𝜃4 𝜃5 𝜃6 𝜃7𝜃8 ∆0 ∆1 ∆2 ∆3 ∆4 ∆5 ∆6 ∆7 Mismatch Error (b) Figure 1: Illustration of n-dimensional quantizers without (ideal) and with mismatch error. (a) Twodimensional quantizers for image sensing. (b) Zero-dimensional quantizers for analog-to-digital data conversion. as well as to correct many intrinsic errors and imperfections. Furthermore, the eyes continuously and involuntarily engage in a complex micro-fixational movement known as microsaccade, which suggests an active form of redundant sensing [11]. During microsaccade, the image projected on the retina is shifted across a few photoreceptors in a pseudo-random manner. Empirical studies [12] and computational models [13] suggest that the redundancy created by these micro-movements allows efficient sampling of spatial information that can surpass the static diffraction limitation. Both biological and artificial systems encounter similar challenges to achieve precise sensing in the presence of non-ideal imperfections. One of those is mismatch error. At a high resolution, even a small degree of mismatch error can degrade the performance of many man-made sensors [14, 15]. For example, it is not uncommon for a 24-bit analog-to-digital converter (ADC) to have 18-20 bits effective resolution [16]. Inspired by the human visual system, we explore a new computational framework to remedy mismatch error based on the principle of redundant sensing. The proposed mechanism resembles the visual systems’ binocular architecture and is designed to increase the precision of a zero-dimensional data quantization process. By assuming the error probabilistic distribution as a priori, we show that precise data conversion approaching the Shannon limit can be accomplished. As a proof-of-concept demonstration, we have designed and validated a high-resolution ADC integrated circuit. The device utilizes a heuristic approach that allows unsupervised estimation and calibration of mismatch error. Simulation and measurement results have demonstrated the efficacy of the proposed technique, which can increase the effective resolution by 2-5 bits and linearity by 4-6 times without penalties in chip area and power consumption. 2 2.1 Mismatch Error Quantization & Shannon Limit Data quantization is the partition of a continuous n-dimensional vector space into M subspaces, ∆0 , ..., ∆M −1 , called quantization regions as illustrated in Figure 1. For example, an eye is a twodimensional biological quantizer while an ADC is a zero-dimensional artificial quantizer, where the partition occurs in a spatial, temporal and scalar domain. Each quantization region is assigned a representative value, d0 , ..., dM −1 , which uniquely encodes the quantized information. While the representative values are well-defined in the abstract domain, the actual partition often depends on the physical properties of the quantization device and has a limited degree of freedom for adjustment. An optimal data conversation is achieved with a set of uniformly distributed quantization regions. In practice, it is difficult to achieve due to the physical constraints in the partition process. For example, individual pixel cells can deviate from the ideal morphology, location, and sensitivity. These relative differences, referred to as mismatch error, contribute to the data conversion error. In this paper, we consider a zero-dimensional (scalar) quantizer, which is the mathematical equivalence of an ADC device. A N -bit quantizer divides the continuous conversion full-range (FR = [0, 2N ]) into 2N quantization regions, ∆0 , ..., ∆2N −1 , with nominal unity length E(|∆i |) = ∆ = 1 2 Figure 2: (a) Degeneration of entropy, i.e. maximum effective resolution, due to mismatch error versus quantizer’s intrinsic resolution. (b) The proportion of data conversion error measured by mismatch-to-quantization ratio (MQR). With a conventional architecture, mismatch error is the dominant source, especially in a high-resolution domain. The proposed method allows suppressing mismatch error below quantization noise and approaching the Shannon limit. least-significant-bit (LSB). The quantization regions are defined by a set of discrete references1 , SR = {θ0 , ..., θ2N }, where 0 = θ0 < θ1 < ... < θ2N = 2N . An input signal x is assigned the digital code d(x) = i ∈ SD = {0, 1, 2, ..., 2N − 1}, if it falls into region ∆i defined by x ← d(x) = i ⇔ x ∈ ∆i ⇔ θi ≤ x < θi+1 . (1) The Shannon entropy of a N -bit quantizer [17, 18] quantifies the maximum amount of information that can be acquired by the data conversion process √ H = − log2 12 · M , (2) where M is the normalized total mean square error integrated over each digital code Z 2N 1 M = 3N [x − d(x) − 1/2]2 dx 2 0 N 2X −1 Z θi+1 1 (x − i − 1/2)2 dx. = 3N 2 θi i=0 (3) In this work, we consider both quantization noise and mismatch error. The Shannon limit is generally preferred as the maximum rate at which information can be acquired without any mismatch error, where θi = i, ∀i or SR \{2N } = SD , M is equal to the total quantization noise Q = 2−2N /12, and the entropy is equal to the quantizer’s intrinsic resolution H = N . The differences between SR \{2N } and SD are caused by mismatch error and result in the degeneration of entropy. Figure 2(a) shows the entropy, i.e. maximum effective resolution, versus the quantizer’s intrinsic resolution with fixed mismatch ratios σ0 = 1% and σ0 = 10%. Figure 2(b) describes the proportion of error contributed by each source, as measured by mismatch-to-quantization ratio (MQR) MQR = M −Q . Q (4) It is evident that at a high resolution, mismatch error is the dominant source causing data conversion error. The Shannon theory implies that mismatch error is the fundamental problem relating to the physical distribution of the reference set. [19, 20] have proposed post-conversion calibration methods, which are ineffective in removing mismatch error without altering the reference set itself. A standard workaround solution is using larger components thus better matching characteristics; however, this incurs penalties concerning cost and power consumption. As a rule of thumb, 1-bit increase in resolution requires a 4-time increase of resources [14]. To further advance the system performance, a design solution that is robust to mismatch error must be realized. 1 θ2N = 2N is a dummy reference to define the conversion full-range. 3 Figure 3: Simulated distribution of mismatch error in terms of (a) expected absolute error |PE (i)| and (b) expected differential error PD (i) in a 16-bit quantizer with 10% mismatch ratio. (c, d) Optimal mismatch error distribution in the proposed strategy. At the maximum redundancy 16 · (15, 1), mismatch error becomes negligible. 2.2 Mismatch Error Model For artificial systems, binary coding is popularly used to encode the reference set. It involves partitioning the array of unit cells into a set of binary-weighted components SC , and assembling different components in SC to form the needed references. The precision of the data conversion is related to the precise matching of these unit cells, which can be in forms of comparators, capacitors, resistors, or transistors, etc. Due to fabrication variations, undesirable parasitics, and environmental interference, each unit cell follows a probabilistic distribution which is the basis of mismatch error. We consider the situation where the distribution of mismatch error is known as a priori. Each unit cell, cu , is assumed to be normally distributed with mismatch ratio σ0 : cu ∼ N(1, σ02 ). SC is then a collection of the binary-weighted components ci , each has 2i independent and identically distributed unit cells SC = {ci |ci ∼ N(2i , 2i σ02 )}, ∀i ∈ [0, N − 1]. (5) Each reference θi is associated with a unique assembly Xi of the components2 P ∈Xi ck N SR \{2 } = {θi = 1 ckP |Xi ∈ P(SC )}, ∀i ∈ [0, 2N − 1], N −1 c j=0 j 2N −1 (6) where P(SC ) is the power set of SC . Binary coding allows the shortest data length to encode the references: N control signals are required to generate 2N elements of SR . However, because each reference is bijectively associated with an assembly of components, it is not possible to rectify the mismatch error due to the random distribution of the components’ weight without physically altering the components themselves. The error density function defined as PE (i) = θi − i quantifies the mismatch error at each digital code. Figure 3(a) shows the distribution of |PE (i)| at 10% mismatch ratio through Monte Carlo The dummy reference θ2N = 2N is exempted. Other references are normalized over the total weight to define the conversion full-range of FR = [0, 2N ] 2 4 Figure 4: Associating and exchanging the information between individual pixels in the same field of vision generate an exponential number of combinations and allow efficient spatial data acquisition beyond physical constraints. Inspired by this process, we propose a redundant sensing strategy that involves blending components between two imperfect sets to gain extra precision. simulations, where there is noticeably larger error associating with middle-range codes. In fact, it can be shown that if unit cells are independent, identically distributed, PE (i) approximates a normal distribution as follows PE (i) = θi − i ∼ N(0, N −1 X 2j−1 Dj − j=0 i σ 2 ), 2N − 1 0 i ∈ [0, 2N − 1], (7) where i = DN −1 ...D1 D0 (Dj ∈ {0, 1}, ∀j) is the binary representation of i. Another drawback of binary coding is that it can create differential “gap” between the references. Figure 3(b) presents the estimated distribution of differential gap PD (i) = θi+1 − θi at 10% mismatch ratio. When the gap exceeds two unit-length, signals that should be mapped to two or multiple codes collapse into a single code, resulting in a loss of information. This phenomenon is commonly known as wide code, an unrecoverable situation by any post-conversion calibration methods. Also, wide gaps tend to appear at two adjacent codes that have large Hamming distance, e.g. 01111 and 10000. Subsequently, the amount of information loss can be signal dependent and amplified at certain parts of data conversation range. 3 Proposed Strategy The proposed general strategy is to incorporate redundancy into the quantization process such that one reference θi can be generated by a large number of distinct component assemblies Xi , each yields a different amount of mismatch. Among numerous options that lead to the same goal, the optimal reference set is the collection of assemblies with the least mismatch error over every digital code. Furthermore, we propose that such redundant characteristic can be achieved by resembling the visual systems’ binocular structure. It involves a secondary component set that has overlapping weights with the primary component set. By exchanging the components with similar weights between the two sets, excessive redundant component assemblies can be realized. We hypothesize that a similar mechanism may have been employed in the brain that allows associating information between individual pixels on the same field of vision in each eye as illustrated in Figure 4. Because such association creates an exponential number of combinations, even a small percentage of 100 million photoreceptors and 1.5 million retinal ganglion cells that are “interchangeable” could result in a significant degree of redundancy. The design of the primary and secondary component set, SC,0 and SC,1 , specifies the level and distribution of redundancy. Specifically, SC,1 is derived by subtracting from the conventional binaryweighted set SC , while the remainders form the primary component set SC,0 . The total nominal P weight remains unchanged as ci,j ∈(SC,0 ∪SC,1 ) ci,j = 2N0 − 1, where N0 is the resolution of the 5 Figure 5: The distribution of the number of assemblies NA (i) with different geometrical identity in (a) 2-component-set design and (b) 3-component-set design. Higher assembly count, i.e., larger level of redundancy, is allocated for digital codes with larger mismatch error. quantizer as well as the primary component set. It is worth mentioning that mismatch error is mostly contributed by the most-significant-bit (MSB) rather than the least-significant-bit (LSB) as implied by Equation (5). Subsequently, to optimize the level and distribution of redundancy, the secondary set should advantageously consist of binary-weighted components that are derived from the MSB. SC,0 and SC,1 can be described as follows  i 2, if i < N0 − N1 Primary: SC,0 = {c0,i |c0,i = , ∀i ∈ [0, N0 − 1]}, i 2 − c1,i−N0 +N1 , otherwise (8) Secondary: SC,1 = {c1,i |c1,i = 2N0 −N1 +i−s1 , ∀i ∈ [0, N1 − 1]}, where N1 is the resolution of SC,1 and s1 is a scaling factor satisfying 1 ≤ N1 ≤ N0 − 1 and 1 ≤ s1 ≤ N0 − N1 . Different values of N1 and s1 result in different degree and distribution of redundancy. Any design within this framework can be represented by its unique geometrical identity: N0 · (N1 , s1 ). The total number of components assemblies is |P(SC,0 ∪ SC,1 )| = 2N0 +N1 , which is much greater than the cardinality of the reference-set |SR | = 2N0 , thus implies the high level of intrinsic redundancy. NA (i) is defined as the number of assemblies that represent the same reference θi and is an essential indicator that specifies the redundancy distribution X cj,k = i}|, i ∈ [0, 2N0 − 1]. (9) NA (i) = |{X|X ∈ P(SC,0 ∪ SC,1 ) ∧ cj,k ∈X Figure 5(a) shows NA (i) versus digital codes with N0 = 8 and multiple combinations of (N1 , s1 ). The design of SC,1 should generate more options for middle-range codes, which suffer from larger mismatch error. Simulations suggest N1 decides the total number of assemblies, P2N0 −1 NA (i) = |P(SC,0 ∪ SC,1 )| = 2N0 +N1 ; s1 defines the morphology of the redundancy disi=0 tribution. A larger value of s1 gives a more spreading distribution. Removing mismatch error is equivalent to searching for the optimal component assembly Xop,i that generates the reference θi with the least amount of mismatch Xop,i = argmin X∈P(SC,0 ∪SC,1 ) i− X cj,k , i ∈ [0, 2N0 − 1]. (10) cj,k ∈X The optimal reference set SR,op is then the collection of all references generated by Xop,i . In this work, we do not attempt to find Xop,i as it is an NP-optimization problem with the complexity of O(2N0 +N1 ) that may not have a solution in the polynomial space. Instead, this section focuses on showing the achievable precision with the proposed architecture while section 4 will describe a heuristic approach. The simulation results in Figure 2(b) demonstrate our technique can suppress 6 mismatch error below quantization noise, thus approaching the Shannon limit even at high resolution and large mismatch ratio. In this simulation, the secondary set is chosen as N1 = N0 − 1 for maximum redundancy. Figure 3(c, d) shows the distribution of mismatch error after correction. Even at the minimum redundancy (N1 = 1), a significant degree of mismatch is rectified. At the maximum redundancy (N1 = N0 − 1), the mismatch error becomes negligible compared with quantization noise. Based on the same principles, a n-set components design (n = 3, 4, ...) can be realized, which gives an increased level redundancy and more complex distribution as shown in Figure 5(b), where n = 3 and the geometrical identity is N0 · (N1 , s1 ) · (N2 , s2 ). With different combinations of Nk and sk (k = 1, 2, ...), NA (i) can be catered to a known mismatch error distribution and yield a better performance. However, adding more component set(s) can increase the computational burden as the complexity increases rapidly with every additional set(s): O(2N0 +N1 +N2 +... ). Given mismatch error can be well rectified with a two-set implementation over a wide range of resolution, n > 2 might be unnecessary. Similarly, three or more eyes may give better vision. However, the brain circuits and control network would become much more complicated to integrate signals and information. In fact, stereopsis is an advanced feature to human and animals with well-developed neural capacity [7]. Despite possessing two eyes, many reptiles, fishes and other mammals, have their eyes located on the opposite sides of the head, which limits the overlapping region thus stereopsis, in exchange for a wider field of vision. Certain species of insect such as Arachnids can possess from six to eight eyes. However, studies have pointed out that their eyes do not function in synchronous to resolve the fine resolution details [21]. It is not a coincidence that at least 30% of the human brain cortex is directly or indirectly involved in processing visual data [7]. We conjecture that the computational limitation is a major reason that many higher-order animals are evolved to have two eyes, thus keep the cyclops and triclops remain in the realm of mythology. No less as it would sacrifice visual processing precision, yet no more as it would overload the brain’s circuit complexity. 4 Practical Implementation & Results A mixed-signal ADC integrated circuit has been designed and fabricated to demonstrate the feasibility of the proposed architecture. The nature of hardware implementation limits the deployment of sophisticated learning algorithms. Instead, the circuit relies on a heuristic approach to efficiently estimate the mismatch error and adaptively reconfigure its components in an unsupervised manner. The detailed hardware algorithm and circuits implementation are presented seperately. In this paper, we only briefly summarize the techniques and results. The ADC design is based on successive-approximation register (SAR) architecture and features redundant sensing with a geometrical identity 14 · (13, 1). The component set SC is a binaryweighted capacitor array. We have chosen the smallest capacitance available in the CMOS process to implement the unit cell for reducing circuits power and area. However, it introduces large capacitor mismatch ratios up to 5% which limits the effective resolution to 10-bit or below for previous works reported in the literature [14, 19, 20]. The resolution of the secondary array is chosen as N1 = N0 − 1 to maximize the exchange capacity between two component sets c0,i = c1,i−1 = 1/2c0,i+1 , i ∈ [1, N − 2]. (11) In the auto-calibration mode, the mismatch error of each component is estimated by comparing the capacitors with similar nominal values implied by Equation (13). The procedure is unsupervised and fully automatic. The result is a reduced dimensional set of parameters that characterize the distribution of mismatch error. In the data conversion mode, a heuristic algorithm is employed that utilizes the estimated parameters to generate the component assembly with near-minimal mismatch error for each reference. A key technique is to shift the capacitor utilization towards the MSB by exchanging the components with similar weight, then to compensate the left-over error using the LSB. Although the algorithm has the complexity of O(N0 + N1 ), parallel implementation allows the computation to finish within a single clock cycle. By assuming the LSB components contribute an insignificant level of mismatch error as implied by Equation (5), this heuristic approach trades accuracy for speed. However, the excessive amount of 7 Figure 6: High-resolution ADC implementation. (a) Monte Carlo simulations of the unsupervised error estimation and calibration technique. (b) The chip micrograph. (c) Differential nonlinearity (DNL) and (d) integral nonlinearity (INL) measurement results. redundancy guarantees the convergence of an adequate near-optimal solution. Figure 6(a) shows simulated plots of effective-number-of-bits (ENOB) versus unit-capacitor mismatch ratio, σ0 (Cu ). With the proposed method, the effective resolution is shown to approach the Shannon limit even with large mismatch ratios. It is worth mentioning that we also take the mismatch error associated with the bridge-capacitor, σ0 (Cb ), into consideration. Figure 6(b) shows the chip micrograph. Figure 6(c, d) gives the measurement results of standard ADC performance merit in terms of differential nonlinearity (DNL) and integral nonlinearity (INL). The results demonstrate that a 4-6 fold increase of linearity is feasible. 5 Conclusion This work presents a redundant sensing architecture inspired by the binocular structure of the human visual system. We show architectural advantages of using redundant sensing in removing mismatch error and enhancing sensing precision. A high resolution, zero-dimensional data quantizer is presented as a proof-of-concept demonstration. Through Monte Carlo simulation with the error probabilistic distribution as a priori, we find the precision can approach the Shannon limit. In actual measurements without knowing the error probabilistic distribution, the gain of extra 2-bit precision and 4-6 times linearity is observed. We envision that the framework can be generalized to handle higher dimensional data and apply to a variety of applications such as digital imaging, functional magnetic resonance imaging (fMRI), 3D data acquisition, etc. Moreover, engineering such bioinspired artificial systems may help better understand the biological processes such as stereopsis, microsaccade, and hyperacuity. Acknowledgment The authors would like to thank Phan Minh Nguyen for his valuable comments. 8 References [1] Shannon, C.E. (1948) A Mathematical Theory of Communication. Bell System Technical Journal, vol. 27(3), pp. 379423. [2] Curcio, C.A., Sloan, K.R., Kalina, R.E., Hendrickson, A.E. (1990) Human photoreceptor topography. Journal of Comparative Neurology, vol. 292(4), pp. 497-523. [3] Curcio, C. A., Allen, K. A. (1990) Topography of ganglion cells in human retina. Journal of Comparative Neurology, vol. 300(1), pp. 5-25. [4] Read, J.C. (2015) What is stereoscopic vision good for? Proc. SPIE 9391, Stereoscopic Displays and Applications XXVI, pp. 93910N. [5] Westheimer, G. (1977) Spatial frequency and light-spread descriptions of visual acuity and hyperacuity. Journal of the Optical Society of America, vol. 67(2), pp. 207-212. [6] Beck, J., Schwartz, T. (1979) Vernier acuity with dot test objects. Vision Research, vol. 19(3), pp. 313319. [7] Reece, J.B., Urry, L.A, Cain, M.L., Wasserman, S.A, Minorsky, P.V., Jackson R.B., Campbell, N.A. (2010) Campbell biology, 9th Ed. Boston: Benjamin Cummings/Pearson. [8] Westheimer, G., McKee, S.P. (1978) Stereoscopic acuity for moving retinal images. Journal of the Optical Society of America, vol. 68(4), pp. 450-455. [9] Crick, F.H., Marr, D.C., Poggio, T. (1980) An information processing approach to understanding the visual cortex. The Organization of the Cerebral Cortex, MIT Press, pp. 505-533. [10] Cagenello, R., Arditi, A., Halpern, D. L. (1993) Binocular enhancement of visual acuity. Journal of the Optical Society of America A, vol. 10(8), pp. 1841-1848. [11] Martinez-Conde, S., Otero-Millan, J., Macknik, S.L. (2013) The impact of microsaccades on vision: towards a unified theory of saccadic function. Nature Reviews Neuroscience, vol. 14(2), pp. 83-96. [12] Hicheur, H., Zozor, S., Campagne, A., Chauvin, A. (2013) Microsaccades are modulated by both attentional demands of a visual discrimination task and background noise. Journal of vision, vol. 13(13), pp. 18-18. [13] Hennig, M.H., Wörgötter, F. (2004) Eye micro-movements improve stimulus detection beyond the Nyquist limit in the peripheral retina. Advances in Neural Information Processing Systems. [14] Murmann, B. (2008) A/D converter trends: Power dissipation, scaling and digitally assisted architectures. Custom Integrated Circuits Conference, 2008. CICC 2008. IEEE, pp. 105-112. [15] Nguyen, A.T., Xu, J., Yang, Z. (2015) A 14-bit 0.17 mm2 SAR ADC in 0.13µm CMOS for high precision nerve recording. Custom Integrated Circuits Conference (CICC), 2015 IEEE, pp. 1-4. [16] Analog Devices (2016) 24-Bit Delta-Sigma ADC with Low Noise PGA. AD1555/1556 datasheet. [17] Frey, M., Loeliger., H.A. (2007) On the static resolution of digitally corrected analog-to-digital and digital-to-analog converters with low-precision components. Circuits and Systems I: Regular Papers, IEEE Transactions on, vol. 54(1), pp. 229-237. [18] Biveroni, J., Loeliger, H.A. (2008) On sequential analog-to-digital conversion with low-precision components. Information Theory and Applications Workshop, 2008. IEEE, pp. 185-187. [19] Um, J.Y., Kim, Y.J., Song, E.W., Sim, J.Y., Park, H.J. (2013) A digital-domain calibration of splitcapacitor DAC for a differential SAR ADC without additional analog circuits. Circuits and Systems I: Regular Papers, IEEE Transactions on, vol. 60(11), pp. 2845-2856. [20] Xu, R., Liu, B., Yuan, J. (2012) Digitally calibrated 768-kS/s 10-b minimum-size SAR ADC array with dithering. Solid-State Circuits, IEEE Journal of, vol. 47(9), pp. 2129-2140. [21] Land, M.F. (1985) The morphology and optics of spider eyes. Neurobiology of arachnids, pp. 53-78, Springer Berlin Heidelberg. 9 Appendix This appendix presents the detailed implementation of a high-resolution analog-to-digital converter (ADC) in integrated circuits as mentioned in Section 4 “Practical Implementation & Results” A Component Sets The ADC design utilizes a special case of the proposed redundant sensing architecture: N = 14 = N0 = N1 + 1 and s1 = 1, which results in two component sets with nominal weights as follows S C,0 = {1, 1, 2, 4, ..., 2N −2 } S C,1 = { 1, 2, 4, ..., 2N −2 }. (12) The components are implemented using unit capacitors with the mean capacitance of 22fF and the effective mismatch ratio of 2-3%. We refer to the design as the “half-split” capacitor array since it is equivalent to dividing each conventional binary-weighted component into two identical halves c0,i + c1,i−1 = 2i = c0,i+1 c0,i = c1,i−1 = 1/2c0,i+1 , (13) where i ∈ [1, N − 2]. The relative mismatch error of each component ε0,i and ε1,j is defined as P ∀k,l ck,l , (14) εi,j = ci,j − ci,j N 2 −1 where i ∈ [0, 1], j ∈ [0, N − 1 − i]. By definition, the sum of all relative mismatch errors is equal to zero P X X X ∀i,j ci,j εi,j = ci,j − ci,j · N = 0. (15) 2 −1 ∀i,j B ∀i,j ∀i,j SAR ADC Architecture The functional block diagram of the ADC implementation is presented in Figure A1. The device has two “half-split” capacitor arrays in the differential configuration, a comparator, an on-chip memory and digital logic blocks. Each capacitor array is divided into three sections: MSB, LSB, and subDAC using the split-capacitor technique to reduce the total capacitance. The sub-DAC section is only used to fine-tune the error estimation procedure and represents c0,0 during normal conversion. The primary logic blocks are composed of the conventional successive-approximation register (SAR) logic and the proposed capacitor mismatches estimation and calibration logic. Figure A1: Functional block diagram of the SAR ADC implementation. The circuit operations are comprised of two phases: the foreground error estimation and the normal conversion with background calibration. The error estimation procedures are engaged when the 10 device is reset, in which capacitor mismatches are automatically obtained and stored in the onchip memory. The error estimation procedures only need to be performed once and take less than 10ms at 40kHz sampling rate. During the succeeding normal conversion phase, the calibration logic utilizes the estimated mismatches to generate the near-optimal component assemblies in real-time and adaptive to each input signal. C Capacitor Mismatches Estimation The capacitor mismatches estimation is a mixed-signal process that automatically obtains the mismatches of all components. The key technique involves comparing and resolving the weight differences among consecutive components using charge-redistribution procedures. Because the mismatch error increases exponentially from LSB to MSB, the smallest LSB component, i.e. c0,0 , can be used as the reference to obtain the relative mismatches of the others. The process is carried out in multiple iterations, each produces the mismatch of a component starting from LSB to MSB. At the beginning of an iteration, one of the differential capacitor arrays generates a voltage to counteract the comparator offset, while the capacitor comparison is performed on the other array. The ADC actually operates in the single-ended configuration during error estimation. The mismatches are obtained by evaluating the difference (d0,i , d1,i ) between (c0,i , c1,i−1 ) and their preceding bit-capacitors c0,i−1 + c1,i−2 d0,i = c0,i − (c0,i−1 + c1,i−2 ) d1,i−1 = c1,i−1 − (c0,i−1 + c1,i−2 ), (16) where i ∈ [1, N − 1]. Due to the relationship between components specified in Equation 13, (d0,i , d1,i ) should have a zero-mean and a standard deviation proportional to the mismatch error. The charge redistribution process is described in Figure A2 where Vref + , Vref − and Vcm represent the positive, negative and common-mode reference voltage respectively. The voltage ∆VDAC generated on the top-plate is proportional to the difference ∆VDAC = d0,i Vref + − Vref − P . ∀j,k cj,k (17) ∆VDAC is digitized with the remaining components from c0,0 to (c0,i−2 , c1,i−3 ) by switching the bottom-plates to either Vref + or Vref − . The 4-bit sub-DAC array is used for fine resolving of d0,i and d1,i−1 with the maximum precision of 1/16 LSB. After all d0,i and d1,i−1 are resolved, the pre-estimated mismatches ε00,i and ε01,i−1 are obtained by integrating the differences in a recursive manner. ε00,i = (ε0,i−1 + ε1,i−2 ) + d0,i ε01,i−1 = (ε0,i−1 + ε1,i−2 ) + d1,i−1 , (18) where i ∈ [1, N − 1]. There is systematic bias in values of ε00,i and ε01,i−1 due to the assumption that ε0,0 ≈ 0. This bias can be corrected by exploiting the property specified in Equation 15. The final estimated mismatches ε0,i and ε1,i−1 are obtained as follows ε0,i = ε00,i − S · 2−n+i−1 ε1,i−1 = ε01,i−1 − S · 2−n+i−1 , (19) where i ∈ [1, N − 1] and S= N −1 X (ε00,j + ε01,j−1 ). (20) j=0 The estimated mismatches are stored in the on-chip memory as 10-bit fix-point numbers with a 6-digit integer. The result is a reduced-dimensional set of parameters that fully characterizes the mismatch error of capacitor arrays while only occupies a memory space of 480-bit. 11 Figure A2: The mixed-signal process to estimate capacitor mismatches based on chargeredistribution procedures. D Capacitor Mismatches Calibration Figure A3(a) illustrates the calibration logic which operates in the background during normal data conversion. It is a heuristic algorithm that searches for the near-optimal component assembly to generate the required reference having the minimal error. The algorithm is designed to be efficient and can be implemented in a parallel structure such that the component assembly is recalculated within a single clock cycle, i.e. O(1). Figure A3: (a) Illustration of the on-chip capacitor mismatches calibration algorithm. (b) “Mapping & shifting” logic effectively migrates the component assembly towards the MSBs. The calibration algorithm consists of two phases: “mapping and shifting” and residual error compensation. The first phase maps the digital code Dn−1 ...D1 D0 to the component assembly without considering the mismatch error while utilizing as much SC,0 as possible as illustrated in Figure A3(b). The algorithm effectively migrates the component utilization towards the MSBs, leaving the many idle components in SC,1 which can be used to compensate the residual error in the later stage. The second phase involves computing the residual mismatches εres using the estimated parameters stored in the on-chip memory εres = N −1 X i=0 D0,i · ε0,i + N −2 X D1,j · ε1,j − VCO , (21) j=0 where D0,i , D1,j ∈ {0, 1} are the digital digits associated with components in SC,0 , SC,1 and generated from the output of the first phase. It is worth noting that the algorithm also compensates the comparator offset VCO . The binary representation of the residual mismatches εres is then directly 12 mapped to an assembly of the idle component in SC,1 and is effectively compensated. Because the value of εres cannot exceed tens of LSB, the first 6 LSB components (c1,0 , ..., c1,5 ) are sufficient, which mismatches are small enough to be neglected. It should be mentioned that some LSB components in SC,1 could be already utilized from the first phase, thus are unavailable for residual error compensation. However, these scenarios only occur at digital codes near 2N , in which the mismatch error is sufficiently small. The Monte Carlo simulation results presented in the main paper have indicated that the residual mismatches εres can be effectively compensated in almost all situations. 13
7cs.IT
Robot Localisation and 3D Position Estimation Using a Free-Moving Camera and Cascaded Convolutional Neural Networks arXiv:1801.02025v1 [cs.RO] 6 Jan 2018 Justinas Mišeikis1 , Patrick Knöbelreiter2 , Inka Brijacak3 , Saeed Yahyanejad4 , Kyrre Glette5 , Ole Jakob Elle6 , Jim Torresen7 Abstract— Many works in collaborative robotics and humanrobot interaction focuses on identifying and predicting human behaviour while considering the information about the robot itself as given. This can be the case when sensors and the robot are calibrated in relation to each other and often the reconfiguration of the system is not possible, or extra manual work is required. We present a deep learning based approach to remove the constraint of having the need for the robot and the vision sensor to be fixed and calibrated in relation to each other. The system learns the visual cues of the robot body and is able to localise it, as well as estimate the position of robot joints in 3D space by just using a 2D color image. The method uses a cascaded convolutional neural network, and we present the structure of the network, describe our own collected dataset, explain the network training and achieved results. A fully trained system shows promising results in providing an accurate mask of where the robot is located and a good estimate of its joints positions in 3D. The accuracy is not good enough for visual servoing applications yet, however, it can be sufficient for general safety and some collaborative tasks not requiring very high precision. The main benefit of our method is the possibility of the vision sensor to move freely. This allows it to be mounted on moving objects, for example, a body of the person or a mobile robot working in the same environment as the robots are operating in. I. INTRODUCTION Robotic manipulators are becoming cheaper resulting in new application fields outside the traditional industrial environment. It is more common to see robots in hospitals, warehouses and households. These environments result in robots having to share the workspace with people and even perform collaborative tasks. The concept of a shared workspace has been an active research area for many years, which is still highly relevant today [1] [2]. Furthermore, with the appearance of Industry 4.0, the need toward the environment and safety-aware robots is growing [3]. Collaborative robots, like Baxter and Sawyer, are advertised to be fully safe around people, however, it commonly means that they have sophisticated collision detection systems [4]. Ideally, collisions should be avoided at all, 1 5 6 7 Justinas Mišeikis, Kyrre Glette, Ole Jakob Elle and Jim Torresen are with the Department of Informatics, University of Oslo, Oslo, Norway 2 Patrick Knöbelreiter is with the Institute of Computer Graphics and Vision, Graz University of Technology, Graz, Austria 3 4 Inka Brijacak and Saeed Yahyanejad are with the Joanneum Research, Klagenfurt am Wörthersee, Austria 6 Ole Jakob Elle has his main affiliation with The Intervention Centre, Oslo University Hospital, Oslo, Norway [email protected] 1 5 7 2 3 4 {justinm,kyrrehg,jimtoer}@ifi.uio.no [email protected] [email protected] [email protected] especially in sensitive environments like hospitals. Collision avoidance can be achieved by adding vision sensors. Vision sensors observe the environment and indicate the areas which are unobstructed and safe to operate in, and are used to plan the robot movements accordingly. However, there are issues with this approach. Sensors have to be fixed on the robot itself or fixed in relation to the robot body. A precise Hand-Eye calibration is then performed to allow the sensors and the robot to operate in the same coordinate system. However, then the setup takes up more space and any unexpected disturbances or repositioning of the sensor can mean that the calibration has to be repeated. Despite automated calibration procedures, the process can still be cumbersome and time consuming [5]. Another option would be to fix the vision sensor on the robot body itself, commonly on the end-effector of the robot. This can be an effective method for collision avoidance for the end-effector of the robot, however, the field-of-view is normally limited and a full robot body collision check is rarely possible [6]. There has been a significant amount of work towards robot autonomy and self-localisation. However, robot selfawareness is normally limited to navigation, especially for mobile robots, or self-collision avoidance for robot arms or humanoid robots, where the robot model is known [7] [8] [9] [10]. Visual-based robot manipulator tracking has been extensively researched as well. End-effector being the main point of focus with the aim of conducting robot control based on visual servoing [11] [12]. Furthermore, it has proven to be an effective method for adaptive redundant robot control in Cartesian space [13]. Image-based tracking of 7-DoF robot arm showed promising results with dynamic parameter tuning as well [14]. Interesting work was presented, where authors are using particle swarm optimisation approach for fuzzy sliding mode control to track the end-effector of the robot manipulator [15]. Despite achieving good accuracy, most of these methods used prior knowledge or fixed setups for the particular use case. Changing the setup would result in the need to tune the algorithm for it to function accurately given the new conditions. Furthermore, commonly it was just the end-effector of the robot that was tracked instead of the whole robot body. When looking at the field of human-robot interaction, a significant amount of work has been done on the design of the systems and workspaces allowing to monitor the human presence in close proximity to the robot and detect any irregularities [16] [17] [18]. Another work is focusing Fig. 1. Samples from a collected robot dataset. Each row of images represents different robot type in the following order: UR3, UR5 and UR10. The dataset was created using a varying background to provide more robustness. on the best approaches to safeguard the workspace of the robots [19]. When looking at the motion planning and behaviour prediction topics, most of the focus has been on modelling the human motions [20]. A heatmap of the workspace could be constructed to allow the robot to predict where dynamic obstacles are most likely to enter and have an additional reflexive behaviour override for unexpected cases [21]. However, the majority of existing research has a robot model and control architectures well defined and fine-tuned. This means that the hardware setups are usually fixed and all the sensors have to be attached at the defined locations and calibrated specifically for the use case. Our current research focuses on adding the flexibility on the robot identification side and allowing more unrestricted setups. For example, having a free-moving vision sensor as a part of the robotic system aimed at the robot safety or human-robot collaboration use case. We address this issue by removing the need for fixed setups. Instead of having a known transformation matrix between the coordinate frames of the sensor and the robot base, we teach the system to identify the robot body in a color image provided by the vision sensor. Our method uses convolutional neural networks (CNNs), which learn visual cues allowing it to understand the environment [22]. The system identifies the robot body in the color image of the vision sensor, and depth information normally provided by 3D cameras is not needed for the recognition task anymore. Furthermore, the system estimates the robot body configuration and 3D coordinates of each joint of the robot. The vision sensor can be placed anywhere around the robot or even used as a wearable device by the robot operator. This approach can prove very useful in a cluttered environment where one or many robots are located, such as a factory floor or automated surgery room. Such environments can have a limited space for fixed camera setups or line-of-sight can be blocked by people or other machinery operating in close proximity. Having multiple free-moving cameras is one of the robust solutions ensuring the workspace is constantly observed. An operator or a visitor can have a wearable camera which observes the surroundings and indicates the positions of all the robots in the vicinity. A warning system or even an emergency stop option can be incorporated for the situations when the robot gets too close to the person to ensure a fully-safe operation. Systems using our approach can also be useful in robotrobot interaction cases, where a mobile robot is operating in the same environment as robotic manipulators. It should avoid getting too close to other robots and avoid possible collisions. Even given a fully known environment, our system can prove useful if navigation or localisation algorithm fails to get an accurate position estimate, the vision sensor on the mobile robot can indicate positions where other robots are located. It can be useful for robot-to-robot interaction tasks. For example, if a mobile robot is bringing tools or objects that a robot arm needs to grasp, the mobile robot could localise itself in relation to the robot manipulator. This paper is organized as follows. We present the system setup and dataset collection in Section II. Then, we explain the proposed method and CNN architecture in Section III. We provide experimental results in Section V, followed by relevant conclusions and future work in Section VI. (a) Color Image Fig. 2. (b) Ground truth model of the robot mask Example image of the dataset containing an UR3 robot. II. SYSTEM SETUP AND DATASET COLLECTION In our experiments, we use three types of robot arms produced by Universal Robots: UR3, UR5 and UR10. All three robots have a similar appearance, but different size and payload capabilities. A Kinect V2 camera was used as a 3D vision sensor providing both color image and depth information, needed to create the dataset containing ground truth data [23]. The final, fully-trained system only needs the color image. The whole system was based on a combination of the Robot Operating System (ROS) and Theano framework [24]. Input Image Intermediate: Robot Mask Robot 3D Joint Coordinate Estimation Fig. 3. Process described in regards to inputs and outputs of the system. A simple color image of the robot body is provided as an input to the system. The first CNN estimates the mask containing the robot body and this result is overlayed with the color image and used as an input to the second CNN. The second CNN provides an estimate of the joint coordinates of the robot in 3D. Each robot joint is visualised with a circle of a different color. Deep learning requires a large amount of diverse training data to ensure efficient and robust learning. Given a limited availability of datasets for such applications, it was decided to create a dataset for this purpose. Access to the robots was obtained in three institutions: TU Graz, Joanneum Research and the University of Oslo. In order to obtain a precise ground truth data, a Kinect V2 camera was placed at a number of positions overlooking the robot. At each position, a precise Hand-Eye calibration was performed by placing a marker on the end-effector of the robot and using both color and depth image for the calibration process [25]. TABLE I. Dataset summary describing the number of samples collected for each type of the robot. In total 9 recordings were made, 3 for each type of the robot. Recording Rec 1 Rec 2 Rec 3 Rec 4 Rec 5 Rec 6 Rec 7 Rec 8 Rec 9 Robot Type UR3 UR3 UR3 UR5 UR5 UR5 UR10 UR10 UR10 Number of Samples 211 252 463 252 756 1512 112 278 514 All the collected datasets were used for the training process, resulting in 926 samples for UR3, 2520 samples for UR5 and 904 samples for UR10. We used the MoveIt! package [26] to obtain ground truth data by using a robot self-filtering algorithm. At each time instance, the robot joints encoder information is combined with a simplified robot model to generate a precise estimation of the current robot pose in 3D space and a robot body mask as a 2D image. Robot movements were pre-programmed in joints coordinate system to move in as many different configurations as possible without hitting an obstacle or self-collision occurring. Each of the robot joints is moved through the full range of motion in combination with other joints as well. The step size of the joint movements is varied between the datasets resulting in a different number of samples in each. This method ensured that the robot body will be observed from many angles by the vision sensor. After each movement was performed, a trigger signal was sent to record camera images, joint coordinates, Cartesian coordinates of each joint and ground-truth model of the robot position. The number of samples per dataset varied from 112 to 1512. In total nine datasets were collected, three for each type of the robot, summarized in Table I. Example images from the collected dataset can be seen in Figure 1. Datasets with the UR5 robot were the most extensive given the access to the robot at the lab of the main author. An example of color and ground truth images can be seen in Figure 2. The datasets were split into training and test set by randomly assigning 80% and 20% of the images accordingly. All of the images have the resolution of 512×424 pixels and are rectified using an internal camera calibration to remove the lens distortion. Higher resolution, 960 × 540 pixels color images were recorded as well, however, in practice, we scaled and cropped images to have the same resolution for all the types: color, depth and ground truth mask to avoid any scaling issues. III. METHOD Our method is based on a two-level cascaded CNN, where one CNN is used for the classification task in foreground/background detection of the robot body in the image, and the second CNN is used for landmark detection of the robot joint positions in 3D coordinates. The process in regards to the input and output images is shown in Figure 3. The principle of CNN is to have an image as an input, which is passed to the network. Normally, CNN contains a number of hidden layers, which lead to the output, which is also given during the training process, defined as ground truth. In the hidden layers, the network is capable of learning a number of filters, which help to achieve the desired result, thus minimising the error between the output of the network and provided ground truth result. The learning process is done by initialising random weights, getting the output, comparing it to the desired result and then adjusting the weights in the hidden layers during the back-propagation process in order to achieve better accuracy. For the robot body classification, our CNN consists of four convolutional layers with 32 filters each and varying dilation was used as well as the last convolutional layer containing just one filter. The details about the architecture are illustrated in Figure 4(a). The loss function was specifically designed to take into consideration the rather small area of the foreground object in the input image. In most of the cases, the area of the robot body in the input image was 6 − 17% of the whole image. Without this adjustment, in some cases, the network classifying all the pixels as background could still achieve the accuracy of over 90%, which is conceptually wrong. Calculation of the foreground weight wf g is shown CNN for Robot Body Classification CNN for Robot Body Classification Input Input Conv 32F Filter Size: 3x3 Conv 32F Dilation 2x2 Filter Size: 3x3 Dilation 2x2 Conv 32F Filter Size: 3x3 Conv 32F Dilation 3x3 Filter Size: 3x3 Dilation 3x3 Conv 32F Filter Size: 3x3 Conv 32F Dilation 5x5 Filter Size: 3x3 Dilation 5x5 Conv 32F Filter Size: 3x3 Conv 32F Dilation 3x3 Filter Size: 3x3 Dilation 3x3 Conv 32F Filter Size: 3x3 Conv 32F Filter Size: 3x3 Output Output (a) CNN architecture for the robot mask classification. The network consists of 5 convolutional layers with varying dilation. Input is a color image and output is a mask image defining the body of the robot. CNN for Robot Joint Coordinates Estimation CNN for Robot JointMax Coordinates Estimation Pooling Max Pooling 2x2 Max Pooling 2x2 2x2 Max Pooling 2x2 Conv 64F Conv 128F Output Conv 32F FC Filter Size: 3x3 Filter Size: 2x2 21 Filter Size: 3x3 500 Conv 64F Conv 128F Output Conv 32F FC Dilation: 5x5 Dilation: 3x3 Dilation: 2x2 Input Filter Size: 3x3 Filter Size: 2x2 21 Filter Size: 3x3 500 Dilation: 5x5 3x3 layers, 2 pooling layers and a fully connected layer Dilation: 2x2 (b) CNN architecture for the robot joint coordinate estimation. The network consists of 3Dilation: convolutional Input in the end. Input is an overlayed color image with a robot foreground mask and output is 3D coordinates of the robot joints in the coordinate system of the vision sensor. Fig. 4. Cascaded CNN architecture for the robot position estimation using non-fixed camera. in Equation 1. It is based on the inverse probability of the foreground and background classes, where Y ∈ {f g, bg}. wf g = 1 P(Y = f g) (1) Similarly, the background weight wbg is calculated using Equation 2. wbg = 1 P(Y = bg) (2) The loss function is calculated by first getting loss per pixel and then using it to calculate loss of the whole image. A normalisation factor N , which is a number of pixels in the image, allows us to keep the learning rate fixed, independent of the image size. Loss function for one pixel ln is defined in Equation 3, where iest is P(Y = f g), (1 − iest ) is P(Y = bg) and igt is the ground truth value from the mask image. n n ln (Iest , Igt ) = − wf g iest log (igt ) − wbg (1 − iest ) log (1 − igt ) (3) The result is then used to calculate normalised loss for the whole image Lmask using Equation 4. Lmask (Iest , Igt ) = 1 X n l (iest , igt ) N n (4) We formulate the joint coordinate estimation as a regression task using the second CNN. The network consists of three dilated convolutional layers with 32, 64 and 128 filters respectively, two max-pooling layers in between and a fully connected layer in the end. Details of the network architecture can be seen in Figure 4(b). Loss function Lcoords is based on Euclidean distance calculations between estimated and ground truth values as defined in Equation 5, where Nj is the number of joints, Ji defines ground truth position of each joint and Ei is the estimated position of each joint by CNN. Lcoords Nj 1 X = kJi − Ei k2 Nj i=1 (5) In this work we decided not to use any prior robot model information to keep the system more adaptable to other robot models in the future, meaning that a raw CNN output is used to evaluate the accuracy of the results without any additional post-processing. IV. CNN TRAINING There are two main possibilities on how to train the cascaded CNN. The first option is to train the whole network end-to-end and observe the middle layer of the mask. However, this might not result in the output that is expected and is unlikely to reach the desired mask accuracy. In this work, (a) Results: evaluation of the CNN trained for the (b) Results: evaluation of the CNN trained for 3D (c) Results: evaluation of the CNN trained for 3D robot body classification, mask accuracy over a coordinate estimation of the robot joint positions coordinate estimation of the robot joint positions number of iterations for all three robots using val- using input based on ground truth mask data. using the full system. idation sets. It can be seen that UR5 outperformed UR3 and UR10. Fig. 5. Evaluation of our method based on accuracy over a number of training iterations. we train each of the CNNs separately optimising for the best result at each stage. This approach provides the flexibility of using just a part of the system, for example, if only a mask for the robot body is needed. When running the full cascade, the output of the first CNN is used to mask a color input image and use it as an input for the second CNN. The training has been done on each type of the robot separately, however, by observing intermediate-level feature maps, we have noticed very similar features for all of the robot models. The training of the classification CNN took slightly more than 2 days on a regular nVidia GeForce 1080 GTX graphics card for all the datasets. The data was selected in a random order to avoid any biases and split in mini-batches of 128 images each for input to avoid overloading memory of the GPU. The learning rate was gradually decreasing, starting at 0.001 and reducing to 0.000001 throughout the learning process. It took 5000 epochs for the network to converge. The input size was half of the original image size: 256 × 212 pixels. The pixel intensity values were converted to float and normalised to lay between 0 and 1. Additionally, pixel values of the ground truth image are clipped to avoid division by zero in cases when the estimated mask fits the ground truth perfectly. Training of the coordinate estimation CNN was significantly faster, taking under 7 hours, also converging after 5000 epochs. The learning rate was adjusted during the training, starting at 0.03 down to 0.0001, and momentum was increased over epochs from 0.9 to 0.999. V. RESULTS For evaluation, we use test sets and analyze outputs of the trained systems against the ground truth data and calculate the accuracy of the system. For the robot body classification, the accuracy is defined by comparing how many pixels in the CNN output mask image match the ground truth mask. For the robot joint coordinates estimation, the error is defined by the Euclidean distance between the estimated coordinates and ground truth in all three dimensions, averaged over all joints of the robot. Fig. 6. An example result of the UR3 robot body mask classification including input, ground truth, raw and thresholded CNN output images. It can be seen that the mask fit corresponds well with the ground truth. The only drawback is that the fit is not as sharp as the ground truth image. However, no unwanted artefacts or false positives are present. First, the results are presented for each of the CNNs separately and then of the whole system altogether. Results are analysed separately for the three types of robots. A. Evaluation of the Robot Classification Task First, we present the results of the robot classification task for each type of the robot. Accuracy is defined by the number of correctly classified pixels in the mask image. Classification of UR5 reached the accuracy of 98, 1% and outperformed UR3 and UR10 with 93, 1% and 92, 8% respectively. The accuracy results over the training iterations can be seen in Figure 5(a). An example mask estimation is shown in Figure 6. B. Evaluation of the Robot Joint Coordinate Estimation In order to analyse the coordinate estimation, first, we use the overlay images based ground truth mask data for Fig. 7. Estimated robot joint position coordinates marked on the images taken from the dataset. Due to difficulty in visualising 3D coordinates on printed figures, the estimated joint coordinates were mapped back into 2D images. Each row represents UR3, UR5 and UR10 robots respectively. the input. As expected, CNN trained on UR5 data provided the most accurate estimation with the average position error of 2, 0cm, while UR3 had the error of 2, 5cm and UR10 3, 2cm. The coordinate estimation results over the training iterations can be seen in Figure 5(b). C. Evaluation of the Full System For the full system evaluation, the process is the combination of the previous two methods joined together: the resulting output image of the robot mask classification is used to overlay the color image and passed as an input for the robot joint coordinate estimation. It is imperfect compared to the ground truth data, so worse results were expected compared to the previous test. For the full system, the final coordinate estimation error increased to 2, 4cm for UR5, 2, 6cm for UR3 and 3, 9cm for UR10. Results can be directly compared with the previous Section V-B. The final results are summarised in Table II and the estimated coordinates by the full system marked over the dataset images can be seen in Figure 7. Because it is difficult to show 3D estimations on 2D figures, the visualisation of estimation is done by mapping the estimated 3D coordinates back onto input images. TABLE II. Experiment Results Summary Mask Accuracy, % Coordinates Error (separate) Coordinates Error (full system) UR3 93, 1% 2, 5cm 2, 57cm UR5 98, 1% 2, 02cm 2, 42cm UR10 92, 8% 3, 21cm 3, 89cm VI. CONCLUSIONS AND FUTURE WORK In this work, we have addressed robots for collaboration and human-robot interaction tasks. We have found an alternative solution for Hand-Eye calibration and added the flexibility of placing the camera at arbitrary position observing the robot workspace, while still being able to identify the robot in the image and estimate its position. Our system uses a cascaded convolutional neural network to achieve the goal. For training and testing purposes, we have collected a number of datasets using a line of robots produced by Universal Robots: UR3, UR5 and UR10. This allowed us to precisely train the CNN and achieve the accuracy in robot body classification of up to 98% on the test set and 3D joint coordinate estimation with an error of less than 3cm. Furthermore, we have shown that the accuracy directly correlates with the training duration and a number of collected samples. This result is still not accurate enough for applications like visual servoing, but it can be good enough for some collaboration tasks as well as safety alerts in cases where a person does not have to work in a very close proximity to the robot. Some example applications would be a small bodymounted camera for doctors working in robotised operating rooms or visitors on the factory floor. It would also be useful in robot-robot interaction cases, when a mobile robot is operating in the same areas as the robot arms, either in order to avoid each other, or support the operations by bringing objects, which would be handled by robot manipulators. The system would be trained to identify all the robots existing in the specific environment, and the person would be warned by a visual or audible alert in cases where he gets within the reachable distance of the robot. Furthermore, if the robot gets too close to the person, an emergency stop could be initiated. For the human-robot collaboration tasks, hand tracking of a person can be achieved using devices like Leap Motion or skeleton tracking to get an estimate of the relative hand positions to the robot. This makes it possible to achieve the tasks like tool handover between the person and the robot, completing joint tasks or even hand-gesture control, while avoiding any unwanted physical contact between the two. Further work includes expanding our method to new types of robots by using transfer learning from pre-trained CNN. This could allow achieving good accuracy with a limited number of training samples. Furthermore, we will add stateof-the-art skeleton tracking and human motion prediction to perform collaborative human-robot tasks and evaluate the performance compared to the cases of having fixed camerarobot setups. ACKNOWLEDGMENT This work is partially supported by The Research Council of Norway as a part of the Engineering Predictability with Embodied Cognition (EPEC) project, under grant agreement 240862 R EFERENCES [1] J. Roach and M. Boaz, “Coordinating the motions of robot arms in a common workspace,” IEEE Journal on Robotics and Automation, vol. 3, no. 5, pp. 437–444, 1987. [2] J. Leitner, S. Harding, M. Frank, A. Förster, and J. Schmidhuber, “Transferring spatial perception between robots operating in a shared workspace,” in 2012 IEEE/RSJ International Conference on Intelligent Robots and Systems. IEEE, 2012, pp. 1507–1512. [3] J. Lee, B. Bagheri, and H.-A. Kao, “A cyber-physical systems architecture for industry 4.0-based manufacturing systems,” Manufacturing Letters, vol. 3, pp. 18–23, 2015. [4] C. Fitzgerald, “Developing Baxter,” in Technologies for Practical Robot Applications (TePRA), 2013 IEEE International Conference on. IEEE, 2013, pp. 1–6. [5] J. Miseikis, K. Glette, O. J. Elle, and J. Torresen, “Automatic calibration of a robot manipulator and multi 3d camera system,” in System Integration (SII), 2016 IEEE/SICE International Symposium on. IEEE, 2016, pp. 735–741. [6] G. Flandin, F. Chaumette, and E. Marchand, “Eye-in-hand/eye-to-hand cooperation for visual servoing,” in Robotics and Automation, 2000. Proceedings. ICRA’00. IEEE International Conference on, vol. 3. IEEE, 2000, pp. 2741–2746. [7] S. Schneegans, P. Vorst, and A. Zell, “Using RFID Snapshots for Mobile Robot Self-Localization.” in EMCR, 2007. [8] J.-S. Gutmann and C. Schlegel, “Amos: Comparison of scan matching approaches for self-localization in indoor environments,” in Advanced Mobile Robot, 1996., Proceedings of the First Euromicro Workshop on. IEEE, 1996, pp. 61–67. [9] O. Stasse, A. Escande, N. Mansard, S. Miossec, P. Evrard, and A. Kheddar, “Real-time (self)-collision avoidance task on a hrp-2 humanoid robot,” in Robotics and Automation, 2008. ICRA 2008. IEEE International Conference on. IEEE, 2008, pp. 3200–3205. [10] A. De Santis, A. Albu-Schaffer, C. Ott, B. Siciliano, and G. Hirzinger, “The skeleton algorithm for self-collision avoidance of a humanoid manipulator,” in Advanced intelligent mechatronics, 2007 IEEE/ASME international conference on. IEEE, 2007, pp. 1–6. [11] W. J. Wilson, C. W. Hulls, and G. S. Bell, “Relative end-effector control using cartesian position based visual servoing,” IEEE Transactions on Robotics and Automation, vol. 12, no. 5, pp. 684–696, 1996. [12] A. Ruf, M. Tonko, R. Horaud, and H.-H. Nagel, “Visual tracking of an end-effector by adaptive kinematic prediction,” in Intelligent Robots and Systems, 1997. IROS’97., Proceedings of the 1997 IEEE/RSJ International Conference on, vol. 2. IEEE, 1997, pp. 893–899. [13] B. Daachi and A. Benallegue, “A neural network adaptive controller for end-effector tracking of redundant robot manipulators,” Journal of Intelligent & Robotic Systems, vol. 46, no. 3, pp. 245–262, 2006. [14] I. Siradjuddin, L. Behera, T. M. McGinnity, and S. Coleman, “Imagebased visual servoing of a 7-DOF robot manipulator using an adaptive distributed fuzzy PD controller,” IEEE/ASME Transactions on Mechatronics, vol. 19, no. 2, pp. 512–523, 2014. [15] M. R. Soltanpour and M. H. Khooban, “A particle swarm optimization approach for fuzzy sliding mode control for tracking the robot manipulator,” Nonlinear Dynamics, vol. 74, no. 1-2, pp. 467–478, 2013. [16] G. Michalos, S. Makris, P. Tsarouchi, T. Guasch, D. Kontovrakis, and G. Chryssolouris, “Design considerations for safe human-robot collaborative workplaces,” Procedia CIrP, vol. 37, pp. 248–253, 2015. [17] T. B. Sheridan, “Human–robot interaction: status and challenges,” Human factors, vol. 58, no. 4, pp. 525–532, 2016. [18] I. Brijacak, S. Yahyanejad, B. Reiterer, and M. Hofbaur, “Visual tracking of an end-effector by adaptive kinematic prediction,” in OAGM and ARW Joint Workshop, Vienna. IEEE, May 2017, pp. 80–85. [19] Y. Yamada, Y. Hirasawa, S. Huang, Y. Umetani, and K. Suita, “Humanrobot contact in the safeguarding space,” IEEE/ASME transactions on mechatronics, vol. 2, no. 4, pp. 230–236, 1997. [20] J. Mainprice and D. Berenson, “Human-robot collaborative manipulation planning using early prediction of human motion,” in Intelligent Robots and Systems (IROS), 2013 IEEE/RSJ International Conference on. IEEE, 2013, pp. 299–306. [21] J. Mišeikis, K. Glette, O. J. Elle, and J. Torresen, “Multi 3D camera mapping for predictive and reflexive robot manipulator trajectory estimation,” in Computational Intelligence (SSCI), 2016 IEEE Symposium Series on. IEEE, 2016, pp. 1–8. [22] P. Y. Simard, D. Steinkraus, J. C. Platt, et al., “Best practices for convolutional neural networks applied to visual document analysis.” in ICDAR, vol. 3, 2003, pp. 958–962. [23] P. Fankhauser, M. Bloesch, D. Rodriguez, , R. Kaestner, M. Hutter, and R. Siegwart, “Kinect v2 for mobile robot navigation: Evaluation and modeling,” in IEEE International Conference on Advanced Robotics (ICAR) (submitted), 2015. [24] M. Quigley, K. Conley, B. Gerkey, J. Faust, T. Foote, J. Leibs, R. Wheeler, and A. Y. Ng, “ROS: an open-source Robot Operating System,” in ICRA workshop on open source software, vol. 3, no. 3.2, 2009, p. 5. [25] T. Heikkilä, M. Sallinen, T. Matsushita, and F. Tomita, “Flexible handeye calibration for multi-camera systems,” in Intelligent Robots and Systems, 2000.(IROS 2000). Proceedings. 2000 IEEE/RSJ International Conference on, vol. 3. IEEE, 2000, pp. 2292–2297. [26] I. A. Sucan and S. Chitta, “MoveIt!” Online Available: http://moveit.ros.org, 2013.
2cs.AI
Neural Network Reinforcement Learning for Audio-Visual Gaze Control in Human-Robot Interaction arXiv:1711.06834v1 [cs.RO] 18 Nov 2017 Stéphane Lathuilièrea,b , Benoit Masséa,b , Pablo Mesejoa,b , Radu Horauda,b a Inria Grenoble Rhône-Alpes, 655 Avenue de l’Europe, Montbonnot-Saint-Martin, 38330, France b Univ. Grenoble Alpes, 621 avenue Centrale, Saint-Martin-d’Hères, 38400, France Abstract This paper introduces a novel neural network-based reinforcement learning approach for robot gaze control. Our approach enables a robot to learn and adapt its gaze control strategy for human-robot interaction without the use of external sensors or human supervision. The robot learns to focus its attention on groups of people from its own audio-visual experiences, and independently of the number of people in the environment, their position and physical appearance. In particular, we use recurrent neural networks and Q-learning to find an optimal action-selection policy, and we pretrain on a synthetic environment that simulates sound sources and moving participants to avoid the need of interacting with people for hours. Our experimental evaluation suggests that the proposed method is robust in terms of parameters configuration (i.e. the selection of the parameter values has not a decisive impact on the performance). The best results are obtained when audio and video information are jointly used, and when a late fusion strategy is employed (i.e. when both sources of information are separately processed and then fused). Successful experiments on a real environment with the Nao robot indicate that our framework is a step forward towards the autonomous learning of a perceivable and socially acceptable gaze behavior. Keywords: Reinforcement Learning, Human-Robot Interaction, Robot Gaze Control, Neural Networks, Transfer Learning, Multimodal Data Fusion 1. Introduction the case of the gaze control problem in a multi-person scenario, the fact of focusing on only one person would lead to omit important information and, therefore, to make In recent years, there has been a growing interest in wrong decisions. Indeed, the robot needs to follow a strathuman-robot interaction (HRI), a research field dedicated egy to maximize useful information, and such a strategy is to designing, evaluating and understanding robotic sysdifficult to design for two main reasons. First, the number tems able to communicate with people [9]. The robotic of possible configurations grows exponentially with the agent must perceive humans and perform actions that, in sequence length, making difficult to obtain an optimal soturn, will have an impact on the interaction. For instance, lution for long time sequences. Second, the robot needs to it is known that the robot’s verbal and gaze behavior has be able to adapt its strategy to currently available data, as a strong effect on the turn-taking conduct of the particprovided by its sensors, cameras and microphones in our ipants [27]. Traditionally, HRI has been focused on the case. For instance, if a companion robot enters a room interaction between a single person with a robot. Howwith very bad acoustic conditions, the strategy needs to ever, robots are increasingly part of groups and teams, be adapted by decreasing the importance given to audio e.g. performing delivery tasks in hospitals [17] or working information. closely alongside people on manufacturing floors [26]. In November 21, 2017 In this paper, we consider the general problem of gaze control, with the specific goal of finding good policies to control the orientation of a robot head during informal group gatherings. In particular, we propose a methodology for a robotic system to be able to autonomously learn to focus its attention on groups of people using audiovisual information. This is a very important topic of research since perception requires not only making inferences from observations, but also making decisions about where to look next. More specifically, we want a robot to learn to find people in the environment, hence maximize the number of people present in its field of view, and favor people who speak. We believe this could be useful in many real scenarios, such as a conversation between a humanoid robot and a group of humans, where the robot needs to learn to look at people, in order to behave properly. The reason for using multiple sources of information can be found in recent HRI research suggesting that no single sensor can reliably serve to robust interaction [22]. Importantly, when it comes to the employment of multiple sensors in complex social interactions, it becomes difficult to implement an optimal policy based on handcrafted rules that take into consideration all possible situations that may occur. On the contrary, we propose to follow a data-driven approach to face such complexity. In particular, we propose to tackle this problem using a reinforcement learning (RL) approach [28]. RL is a machine learning paradigm in which agents learn by themselves by trialand-error to achieve successful strategies. As opposed to supervised learning, there is no need for optimal decisions at training time, only a way to evaluate how good a decision is: a reward. This paradigm, inspired by behaviorist psychology, can allow a robot to autonomously learn a policy that maximizes accumulated reward. In our case, the agent, a Nao robot, autonomously moves its head depending on its knowledge about the environment. This knowledge is called the agent’s state, and it is defined as a sequence of audio-visual and motor observations, actions and rewards. The optimal policy for making decisions is learned from the reward computed using the detected faces and the localized sound sources. The use of annotated data is not required to learn the best policy as the agent learns autonomously by trial-and-error in an unsupervised manner. Moreover, using our approach, it is not even necessary to make any assumption about the number of people moving in the environment or their initial locations. The use of RL techniques presents several advantages. First, training using optimal decisions is not required since the model learns from the reward obtained for each decision taken. The reward can be considered as a feedback signal that indicates how well the robot is doing at a given time step. Second, the robot must continuously make judgments so as to select good actions over bad ones. In this sense, the model can keep training at test time and benefits from a higher adaptation ability. Finally, we avoid the need of an annotated training set or calibration data, as our approach is unsupervised. In our opinion, it seems entirely natural to use RL techniques to “educate” a robot, since recent neuroscientific studies have suggested that reinforcement affects how infants interact with their environment, including what they look at [1], and that face looking is not innate but that environmental importance influences viewing behavior. This paper is an extension of a recently submitted conference paper [18], where we presented the initial version of a neural network-based RL approach to address the robot gaze control problem. In this paper, we extend the system to deal with more complex and realistic scenarios, we delve into the impact of the main parameters of the model, and we make a much more precise description of the whole approach. The overall proposal of this paper can be summarized as follows: • We propose to use recurrent neural networks, in combination with a fully connected layer, to autonomously learn the robot gaze control strategy by means of a value-based RL approach from multimodal data. • We extend the visual observations to use a full body pose detector instead of a simple face detector. While this makes both the proposed simulationbased training and online algorithms more complex, it guarantees that more realistic scenarios are considered. • We introduce a new algorithm to simulate moving persons together with their respective poses. We employ this synthetic environment to avoid the tedious training protocols that use real data, and we use 2 transfer learning from the simulated environment to the real one. and the time spent gazing at the robot in one interaction. As external cameras are required, this cannot be easily applied in scenarios where the robot has to keep learning in a real environment. Moreover, the method is limited to the case of a single human participant. Another example of RL applied to HRI can be found in [29] where a humanprovided reward is used to teach a robot. This idea of interactive RL is exploited by [5] in the context of a tablecleaning robot. Visual and audio recognition are used to get advice from a parent-like trainer to enable the robot to learn a good policy efficiently. An extrinsic reward is used in [25] to learn how to point a camera towards the active speaker in a conversation. Audio information is used to determine where to point the camera, while the reward is provided by visual information: the active speaker raises a blue card that can be easily identified by the robot. The use of a multimodal DQN to learn human-like interactions is proposed both in [23] and in[24]. The robot must choose an action (waiting, looking to a person, hand waving and hand shaking) to perform a hand shake with a human. The reward is negative if the robot tries unsuccessfully to shake hands, positive if the hand shake is successful, and null otherwise. In practice, the reward is obtained from a sensor located in the hand of the robot and it takes fourteen days of training to learn this skill successfully. To the best of our knowledge, the closest work to ours is [30] where an RL approach learns good policies to control the orientation of a mobile robot during social group conversations. The robot learns to turn its head towards the speaking person of the group. However, their model is learned on simulated data that are restricted to a few predefined scenarios with static people and a fixed spatial organization of the group. • We perform an extensive comparison with other neural network-based temporal architectures and evaluate the impact of the main parameters involved. • We describe a real-time implementation of the proposed algorithm using a companion robot. The data, the network weights, and the codes used in this paper will be released upon acceptance of the paper 1 . 2. Related Work RL has been studied for decades [11, 28] and has been widely used in various topics, including robotics [14]. Learning a policy is the main challenge in RL, and there are two main categories of methods to address it. First, policy-based methods define a space from the set of policies, and sample policies from it. The reward is then used, together with optimization techniques, e.g. gradient-based methods, to increase the quality of subsequent sampled policies [32]. The other category, valuebased methods, consists in estimating the expected reward for the set of possible actions. The actual policy uses this value function to decide the suitable action, e.g. choose the action that maximizes the value-function. In particular, popular value-based methods include Q-learning [31] and its deep learning extension, Deep Q-Networks (or DQNs) [20]. We now review some of the most relevant RL-based HRI methods. In [7] an RL approach is employed to learn a robot to play a game with a human partner. The robot uses vision and force/torque feedback to choose the commands, and the uncertainty associated with human actions is modeled via Gaussian processes. Bayesian optimization selects an optimal action at each time step. In [19] RL is employed to adjust motion speed, timing, interaction distances, and gaze in the context of HRI. The reward is based on the amount of movement of the subject In contrast to prior work, our approach allows a robot to autonomously learn an effective gaze control policy from audio and visual inputs in an unconstrained real-world environment. In particular, a simulated environment is used for pretraining, thus avoiding to spend several days of tedious real interactions with people, followed by trans1A video showing additional offline and onfer learning to map the learned strategies to real environline experiments is already available at https: ments. Moreover, it requires neither external sensors nor //team.inria.fr/perception/research/ neural-reinforcement-learning-for-human-robot-interaction/. human intervention to obtain a reward. 3 Figure 1: Outline of our neural network-based reinforcement learning (RL) approach. In this example, the reward, rt−1 , includes only visual information (Face reward). ωt , θt , and vt denote the extracted audio (Sound Source Localization, or SSL), motor and video features that compose ot , a particular observation at time t. The observation at time t and the previous ∆t observations are used as input for the Q-Network that, as output, provides the action, at , with the largest expected return. 3. Reinforcement Learning for Gaze Control that determines the suitability of the action to carry out the specified task. 3.1. Problem Formulation The current pitch and yaw angles of the robot head are denoted by Θt = (Θtp , Θyt ). V t ∈ {0, 1}Nv ×Mv ×J denotes the visual observations. We consider an image of size Nv × Mv and a multi-person 2D pose estimator returning the J joint locations of the Nt detected persons at each time t. The outputs of the pose estimator are pn = (unj , vnj , snj ), n ∈ [1..Nt ], j ∈ [1..J] where (unj , vnj ) ∈ Nv × Mv denotes the pixel coordinates of the jth joints, and snj is a binary value such that snj = 1 if the jth joints is successfully detected and snj = 0 otherwise. We can now define the visual observations V t as follows: ( 1 i f ∃n ∈ [1..Nt ], snj = 1, (unj , vnj ) = (u, v) V t (u, v, j) = 0 otherwise We consider the case of a robot in a social environment. The robot can move its head using its motors (2 degrees of freedom) and have access to video (stereo camera) and audio information (microphone array). We assume the existence of methods to perform body pose estimation and sound source localization (SSL) to process video and audio data, respectively. The goal is to “teach” the robot, by a trial-and-error learning procedure, to perform the suitable action employing those sources of information. In this case, the suitable action corresponds to move the head to maximize the number of people in the field of view, favoring the attention to people who speak. The main building blocks of our proposal are graphically displayed in Figure 1. Throughout the paper, random variables and their realizations are denoted by uppercase and lowercase letters, respectively. Vectors and matrices are represented using bold italic letters. The terms agent and robot are used indistinctly to refer to the autonomous entity that observes the environment and performs actions towards achieving a particular goal. Similarly, Ωt ∈ [0, 1]Na ×Ma denotes the audio observations, where Ωt is a heat map giving the probability that a source is emitting a sound at each location of a grid of size Na × Ma . It is important to notice that in practice the audio grid is wider than the visual grid as a sound source can be detected even if the source is outside the field of view of the cameras. The observation variable is formally defined The variable Ot gathers observations received at time as Ot = {Θt , V t , Ωt }, and the state variable is defined as step t by the agent, namely visual (V t ), audio (Ωt ), and St = {O1 ...Ot } ∈ S, the set of all possible states. The robot motor observations (Θt ). The agent uses Ot to update its can perform the action At ∈ A = {∅, ←, ↑, →, ↓}, namely state from St−1 to St , that represents the knowledge the staying in the same position or moving its head a fixed anagent possesses about the environment. The agent then gle in one of the four cardinal directions. The reward Rt selects an action, At , that consists on sending an input to is defined after taking action At , either as the number of the robot motors. Finally, the agent receives a reward, Rt , faces detected in the field of view (termed Face reward in 4 section 4, and displayed in Figure 1) or as the number of However, in practice, we employ a network Q(s, a, θ) faces detected plus one if sound is also present in the field parametrized by weights θ to estimate the Q-function of view (termed Speaker reward in section 4). We con- Q(s, a, θ) ≈ Q∗ (s, a) and we minimize the following loss: sider interesting to compare a purely visual reward with a h i L(θi ) = ESt , At ,Rt ,St+1 (Yi−1 − Q(St , At , θi ))2 (4) multimodal one including audio information. with Yi−1 = Rt + γ max(Q(St+1 , a, θi−1 )). It can been a seen as minimizing the mean square distance between the approximations of the right and left hand sides of (3). When the robot is training, we obtain a quadruplet (St , At , Rt , St+1 ) for each time-step allowing us to compute (4). However, instead of sampling only according to the policy implied by Q(s, a, θi ), random actions at are taken in  percents of the time steps in order to explore new strategies. This approach is known as epsilon-greedy policy. L is minimized over θi+1 by stochastic gradient descent. Refer to [21] for more technical details about the training algorithm. In RL, the model is learned on sequences of T states, actions and rewards called episodes. At each time-step t, the action at should not be chosen aiming at maximizing only the immediate reward Rt but also the future rewards (Rt+1 ...RT ). To do so, we make the standard assumption that future rewards are discounted by a factor of γ. The parameter γ defines how much we favor rewards returned in the next coming time-steps over longer term rewards. We then define the discounted future return R̄t as the discounted sum of future rewards P −t τ R̄t = Tτ=0 γ Rτ+t . We now aim at maximizing R̄t at each time step t. In other words, the goal is to learn a policy, π(at , st ) = P(At = at |St = st ), (at , st ) ∈ A × S, such that if the agent choose its actions according to π, the expected R̄t is maximal. The Q-function (also called actionvalue function) is defined as the expected future return from state St taking action At and then following any policy π: 3.2. Neural Network Architectures for Q-Learning The Q-function is modeled by a neural network that takes as input part of the state variable St , that we define as S∆t t = {Ot−∆t ...Ot }. The output is a vector of size #A that corresponds to each Qπ (s∆t Qπ (st , at ) = Eπ (R̄t |St = st , At = at ) (1) t , at ), at ∈ A, where ∆t Qπ (st , at ) is built analogously to Equation 1. Following Learning the best policy corresponds to the following op- [21], the output layer is a Fully-Connected Layer (FCL) timization problem Q∗ (s, a) = max[Qπ (st = s, at = a)]. with linear activations. We propose to use the Long Shortπ The optimal Q-function obeys the identity known as the Term Memory (LSTM) [10] recurrent neural network to model the Q-function. Batch normalization is applied to Bellman equation: the output of the LSTM. We argue that LSTM is wellh i ∗ ∗ Q (st , at ) = ESt+1 ,Rt Rt + γ max(Q (St+1 , a)) St = st , At = at suited for our task as it is capable of learning temporal a dependencies better than other recurrent neural networks (2) and hidden Markov models. In fact, our model needs to memorize the position and the motion of the people This equation corresponds to the following intuition: if when it turns its head. When a person is not detected anywe have an estimator Q∗ (st , at ) for R̄t , the optimal action more, the network should be able to use previous detecat is the one that leads to the largest expected R̄t . The tions back in time in order to predict the direction towards recursive application of this policy leads to equation (2). it should move. The J channels of V are flattened before t A straightforward approach would consist in updating Q the LSTM layers. at each training step i with: Four different network architectures are described in this section and evaluated in the experimental section. h i order to evaluate when the two streams of informaIn Qi (st , at ) = ESt+1 ,Rt Rt + γ max(Qi−1 (St+1 , a)) St = st , At = attion (audio and video) need to be fused, we propose to a (3) compare two strategies: early fusion and late fusion. In 5 early fusion, the unimodal features are combined into a single representation before modeling time dependencies (see Figure 2a, called EFNet). Conversely, in late fusion, audio-visual features are modeled separately before fusing them (see Figure 2b, called LFNet). In order to measure the impact of each modality, we propose two more networks using either only video (V) or only audio (Ω) Figure 3: Unfolded representation of EFNet to better capture the sequeninformation. Figure 2c displays AudNet, the network us- tial nature of the recurrent model. Encircled crosses depict the concateing only audio information, while Figure 2d shows VisNet, nation of inputs. that employs only visual information. Figure 2 employs a compact representation where time t is not explicitly included, while Figure 3 depicts the unfolded representation of EFNet where each node is associated with one particular time instance. Both figures follow the graphical representation used in [8]. Figure 4: Diagram showing all fields used in the proposed synthetic environment. The robot’s field of view (in red) can move within the reachable field (in blue), whereas the participants can freely move within a larger field (in black). two reasons. First, it would entail a long period of training, since each physical action by the robot takes an amount of time that cannot be reduced neither by code (a) EFNet (b) LFNet optimization nor by increasing our computational capabilities. Second, in the case of HRI, participants would need to move in front of the robot for several hours or days (like in [23]). For these two reasons, we propose to use a transfer learning approach. The Q-function is first learned on a synthetic environment, where we simulate people moving and talking, and it is then used to initialize the network employed by the robot. Importantly, the network learned from this synthetic environment can be successfully used in the robot without the need of fine-tuning in real data. (c) AudNet (d) VisNet In this synthetic environment, we do not need to generate Figure 2: Proposed architectures to model the Q-function. Dashed lines images and sound signals, but only the observations and indicate connections only used in the last time step. Black squares represent a delay of a single time step. Encircled crosses depict the con- rewards the Q-Network receives as input. catenation of inputs. We consider that the robot can cover the field [−1, 1]2 by moving its head, but can only visually observe the people within a small rectangular region Ft ⊂ [−1, 1]2 3.3. Pretraining on Synthetic Environment centered in position vector Θt . The audio observations Training from scratch a DQN model can take a long cover the whole reachable region [−1, 1]2 . However, the time (in our case ∼150000 time steps to converge), and actual robot we use is only able to locate the yaw angle of training directly on a robot would not be convenient for the sound sources, therefore we decided to solely provide 6 used when a person is going out vertically except that we do not create new persons on top of the field because that would imply the unrealistic sudden appearance of new legs within the field. Figure 4 displays a visual representation of the different fields (or areas) defined in our synthetic environment, and Figure 5 shows an example of a sequence of frames taken from the synthetic environment and used during training. Moreover, in order to favor tracking abilities, we bias the person motion probabilities such that a person that is faraway from the robot head orientation has a low probability to move, and a person within the field of view has a high probability to move. Thus, when there is nobody in the field of view, the robot cannot simply wait for a person to come in. On the contrary, the robot needs to track the persons that are visible. More precisely, we consider 4 different cases. First, when a person has never been seen by the robot, the person does not move. Second, when a person is in the robot field of view (ht ∈ Ft ), they move with a probability of 95%. Third, when the person is further than a threshold τ ∈ R from the field of view (||ht − Θt ||2 > τ), the probability of moving is only 25%. Finally, when the person is not visible but close to the field of view (||ht − Θt ||2 < τ and ht < Ft ), or when the person is unreachable (ht ∈ [−ξ, ξ]\[−1, 1]), this probability is 85%. Regarding the simulation of missing detections, we randomly ignore some faces when computing the face features. Concerning the sound modality, we randomly choose between the following cases: 1 person speaking, 2 persons speaking, and nobody speaking. We use a Markov model to enforce continuity in the speaking status of the persons, and we also simulate wrong SSL observations. Figure 5: Illustrative sequence taken from the synthetic environment and employed to pretrain our neural network-based RL approach. The moving square represents the camera field of view Ft of the robot. The colored circles represent the joints of a person in the environment. The large white circle represents a person speaking and, therefore, producing speech that can be detected by the SSL system. Frames are displayed from top to bottom and left to right. sound observations on the horizontal axis [−1, 1]. On each episode, we simulate one or two persons moving with random speeds and accelerations within a field [−ξ, ξ]2 where ξ > 1. In other words, people can go to regions that are unreachable for the robot. For each simulated person in the current episode, we consider the position and velocity of their head at time t, ht = (uht , vht ) ∈ [−ξ, ξ]2 and ḣ = (u̇ht , v̇ht ) ∈ R2 , respectively. At each frame, the person can keep moving, stay without moving, or choose another random direction. The details of the simulated environment generator are given in Algorithm 1. In a real scenario, people can leave the scene so, in order to simulate this phenomenon, we consider two equally probable cases when a person is going out horizontally of the field (vht < [−ξ, ξ]). In the first case, the person is deleted and instantly recreated on the other side of the field (vht+1 = −vht ) keeping the same velocity (v̇ht+1 = v̇ht ). In the second case, the person is going back towards the center (vht+1 = vht and (v̇ht+1 = −v̇ht )). A similar approach is From, the head position, we need to generate the position of all body joints. To do so, we propose to collect a set P of poses from an external dataset (the AVDIAR dataset [6]). We use a multiple person pose estimator on this dataset and use the detected poses for our synthetic environment. This task is not trivial since we need to simulate a realistic and consistent sequence of poses. Applying tracking to the AVDIAR videos could provide good pose sequences, but we would suffer from three major drawbacks. First, we would have a tracking error that could affect the quality of the generated sequences. Second, each sequence would have a different 7 Data: P: a set of poses, δ: time-step σ: velocity variance, M: pose continuity parameter and constant size, whereas we would like to simulate sequences without size constraints. Finally, the number of sequences would be relatively limited. In order to tackle these three concerns, we first standardize the output coordinates obtained on AVDIAR. Considering the pose pnt of the nth person, we sample a subset PtM ⊂ P of M poses. Then, we select the closest pose to the current pose: pnt+1 = argmin d(p, pnt ) where Randomly chose N in [1..3]. for n ∈ [1..N] do n Initialize (hn0 , ḣ0 ) ∼ S 2 U([−1, 1]) × U([−1, −0.5] [0.5, 1])2 . n Randomly chose p0 in P. p∈Π end     for t ∈ [1..T − 1] do q u1  u2  J X for n ∈ [1..N] do 1     j 2 j j j j 2 j (s1 s2 ) (u1 − u2 ) + (v1 − v2 ) d v1  , v2  = P J Randomly chose motion ∈ {S tay, Move} j j     s s j=1 1 2 j=1 s2 s1 if motion = Move then (5) if hnt < [−ξ, ξ]2 then The person is leaving the scene. This distance is designed to face poses with different numSee section 3.3. ber of detected joints. It can be interpreted as an L2 diselse n tance weighted by the number of visible joints in comhnt+1 ← hnt + δ( ḣt + N((0, 0), σ)). n n 1 mon. The intuition behind this sampling process is that ḣt+1 ← δ (ht+1 − hnt ) when the size M of PtM increases, the probability of obend taining a pose closer to pnt increases. Consequently, the else motion variability can be adjusted with the parameter M hnt+1 ← hnt S n in order to obtain a natural motion. With this method we ḣt+1 ∼ U([−1, −0.5] [0.5, 1])2 can obtain diverse sequences of any size. end Draw PtM , a random set of M elements of P pnt+1 ← argmin d(p, pnt ) 4. Experiments p∈P M t end end Algorithm 1: Generation of simulated moving poses for our synthetic environment. This section begins with the description of the quantitative evaluation performed on AVDIAR and synthetic datasets. After this offline evaluation, it continues with the description of the experiments in real time with the Nao robot, performed to qualitatively evaluate our approach in a real environment. Finally, the section ends with implementation details, and the results obtained and their anal- to train and test the different models on the exact same data. In the context of RL in HRI, this is problematic beysis. cause the data (e.g. what the robot sees and hears) depends on the action the robot has taken. Thus, we propose to 4.1. Offline Evaluation on the AVDIAR Dataset first evaluate our proposal on an offline dataset. To mimic The evaluation of HRI systems is not an easy task. the real behavior of a robot, we use the audio-visual First, the definition of a metric to measure a correct, so- AVDIAR dataset [6]. This dataset has been recorded cially acceptable behavior is far from trivial [33]. In our with 4 microphones and high-resolution binocular camparticular case, since gaze behavior is an important non- eras (1920 × 1080), of which we use only one. These verbal communication cue in human-human social en- images, due to their wide field of view, are suitable to counters [2, 12], we evaluate our approach according to simulate the whole field the robot can cover by moving the robot capability of finding and tracking faces. Sec- its head. In practical terms, only a small part of the full ond, in order to fairly compare different models, we need image is considered as seen by the robot. 8 4.2. Real Time Experiments on a Nao Robot 4.3. Implementation Details In all experiments we employ the full-body pose estimator described in [4], considering the nose as the landmark that represents the face. On the Nao robot, we manage to obtain the pose in less than 100ms by selecting carefully the research scale and downsampling the images. Considering that the Nao cameras provide images with 10 fps, this pose estimator method can be considered as fast enough for our scenario. Moreover, [4] has the particularity of following a bottom-up approach: each body joint is first detected in the image, and then connected by solving a graph matching problem. In our case, as we use a joint heatmap, we do not need to perform this association step in order to save computation time. In order to carry out an online evaluation of our proposal, we perform experiments on a Nao robot, developed by Aldebaran Robotics. Nao provides a camera of 640 × 480 pixels and four microphones. This robot is particularly well suited for HRI applications because of its design, hardware specifications and affordable cost. Nao can detect and identify people, localize sounds, understand some spoken words, synthesize speech and engage itself in simple and goal-directed dialogs. Our gaze control system is implemented on top of the NAOLab middleware [3] that synchronizes proprioceptive and perceptive information. The reason why we use a middleware is threefold. First, the implementation is platform-independent and, thus, easily portable. Platform-independence is crucial since we employ a transfer learning approach to transfer the knowledge gathered on our proposed synthetic environment to the Nao robot. Second, the use of external computational resources is transparent. This is also a crucial matter in our case, since the full-body pose estimator requires GPU computation for fast inference. Third, the use of middleware makes prototyping much faster. For all these reasons, we employed the remote and modular layer-based middleware architecture named NAOLab. NAOLab consists of 4 layers: drivers, shared memory, synchronization engine and application programming interface (API). Each layer is divided into 3 modules devoted to vision, audio and proprioception, respectively. The last layer of NAOLab provides a general programming interface in C++ to handle the robot’s sensor data and manage its actuators. NAOLab provides, at each time step, the camera images and the yaw angle of the detected sound sources using [15, 16]. In all scenarios we set ∆T = 4 such that each decision is based on the last 5 observations. Different values for ∆T were tested, see Table 1, and we kept the value that provided the best possible results without increasing the computational complexity (in fact, values for ∆T larger than 1 provided an almost equivalent final reward). The output size of the LSTMs is set to 30 (since larger sizes do not provide an improvement in performance, see Table 3), and the output size of the FCLs is set to 5 (one per action). We use a discount factor (γ) of 0.90 (that yields a good performance in both the AVDIAR test and the synthetic environment, see Table 2). Concerning the training phases, we employed the Adam optimizer [13] and a batch size of 128. In order to help the model to explore the policy space, we use an -greedy algorithm: while training, a random action is chosen in % of the cases; we decrease linearly the  value from  = 90% to  = 10% after 150000 iterations. Concerning the observations, we employed visual and SSL heatmaps of sizes 7 × 5 for the three environments used in our experiments. The models were trained in approximately 45 minutes on both AVDIAR and the synthetic environment. It is interesting to notice that we obtain this training time without using GPU, because a GPU is only required to compute the full-body pose (in our case, a Nvidia GTX 1070 GPU). It is important to highlight that we pretrain on the synthetic environment before running experiments on the Nao robot. The synthetic environment is flexible and allows us to be closer to the conditions Nao would face in reality (field of view range, uniform location of the people of the field, etc.). For instance, in AVDIAR, as the camera is fixed, heads are almost always at the same height. As a consequence, the learned model would not be sufficiently general and flexible to perform well in real scenarios. Figure 5 shows a synthetic sequence employed for pretraining our neural network-based RL system. Concerning the details related specifically to the AVDIAR dataset, we employed 16 videos for training. The amount of training data is doubled by flipping the video and the SSL outputs. In order to save computation time, the original videos are down-sampled to 1024×640 pixels. 9 2.5 2.0 2.5 2.5 LFNet EFNet AudNet VisNet 2.0 LFNet EFNet AudNet VisNet 0.6 2.0 1.5 1.5 1.5 1.0 1.0 1.0 0.5 0.4 0.3 0.5 0.0 0 100 time step(x1000) 150 (a) Face reward on AVDIAR 0.6 0.5 LFNet EFNet AudNet VisNet 0.0 0 0.6 0.5 0.4 0.3 0.3 0.2 0.2 0.1 0.1 50 100 time step(x1000) 150 (c) Face reward on Synthetic 50 100 time step(x1000) 0.0 0 150 0.0 0 50 100 time step(x1000) 150 (a) AVDIAR (b) Speaker reward on AVDIAR 0.4 0.0 0 0.5 0.5 50 Head Only - face_reward Head Only - Speaker_reward Full model- Face_reward Full model - Speaker_reward 0.2 Head Only - face_reward Head Only - Speaker_reward Full model- Face_reward Full model - Speaker_reward 0.1 0.0 0 50 100 time step(x1000) 150 (b) Synthetic Figure 7: Evolution of the training reward obtained when using as visual observation the result of either the full-body pose estimation or the face detection. LFNet EFNet AudNet VisNet 4.4. Results and Discussion 50 100 time step(x1000) In all our experiments, we run five times each model and display the mean of five runs to lower the impact of the stochastic training procedure. On AVDIAR, the results on both training and test sets are reported in the tables. As described previously, the synthetic environment is randomly generated in real time, so there is no need for a separated test set. Consequently, the mean reward over the last 10000 time steps is reported. 150 (d) Speaker reward on Synthetic Figure 6: Evolution of the reward obtained while training with the two proposed rewards on the AVDIAR dataset and on the synthetic environment. We average over a 5000 time-step window for a cleaner visualization. Table 1: Comparison of the final reward obtained using different window lengths (∆T ). The mean and standard deviation over 5 runs are reported. The best average results obtained are displayed in bold. The size of the field of view where faces can be detected is set to 300 × 200 pixels using motion steps of 36 pixels each. At the beginning of each episode, the position of the field of view is randomly sampled such that no face can be seen. We noticed that this initialization procedure favors the exploration abilities of the agent. To avoid a bias due to the initialization procedure, we used the same seed for all our experiments and iterated 3 times over the 10 test videos (20 when counting the flipped sequences). An action is taken every 5 frames (0.2 seconds) and the SSL is obtained using [6]. In the synthetic environment, the size of field in which the people can move is set to ξ = 1.4. In the case of Nao, the delay between two successive observations is ∼0.3 seconds. The head is free to move in a field corresponding to 180 degrees. The motion of a single action corresponds to 0.15 radians (∼9◦ ) and 0.10 radians (∼6◦ ) for horizontal and vertical moves, respectively. ∆T + 1 1 2 3 5 10 20 AVDIAR Training Test 1.75 ± 0.04 1.55 ± 0.08 1.80 ± 0.02 1.59 ± 0.03 1.82 ± 0.03 1.61 ± 0.01 1.81 ± 0.01 1.57 ± 0.03 1.80 ± 0.01 1.60 ± 0.03 1.80 ± 0.03 1.55 ± 0.05 Synthetic 0.26 ± 0.04 0.36 ± 0.04 0.42 ± 0.02 0.43 ± 0.01 0.40 ± 0.02 0.42 ± 0.02 First, we describe the experiments devoted to evaluate the impact of some of the principal parameters involved. Different window sizes (i.e. the number of past observations necessary to make a decision) are compared in Table 1. We can conclude that the worst results are obtained when only the current observation is used (window size of 1). We also observe that, on AVDIAR, the model performs well even with short window lengths (2 and 3). In turn, with a more complex environment, as the proposed 10 synthetic environment, a longer window length tends to perform better. We interpret that using a larger window size helps the network to ignore the noisy observations and to remember the position of people that left the field of view. In Table 2, different discount factors are compared. We notice that, on AVDIAR, high discount factors are prone to overfit as the difference in performance between training and test is higher. On the synthetic environment, low discount values perform worse because we think that, as the environment is more complex, the model may need several actions to reach a face. Consequently, a model that is able to take into account the future benefit of each action performs better. Finally, in Table 3, we compare different LSTM sizes. We observe that increasing the size does not lead to better results; an interesting conclusion since, from a practical point of view, smaller LSTMs are faster to train. Table 2: Comparison of the final reward obtained using different discounted factors (γ). The mean and standard deviation over 5 runs are reported. The best average results obtained are displayed in bold. γ 0.25 0.50 0.75 0.90 0.99 AVDIAR Training Test 1.80 ± 0.47 1.60 ± 0.01 1.80 ± 0.48 1.60 ± 0.01 1.80 ± 0.49 1.54 ± 0.08 1.80 ± 0.48 1.58 ± 0.03 1.81 ± 0.49 1.55 ± 0.04 Synthetic 0.33 ± 0.09 0.35 ± 0.08 0.43 ± 0.11 0.42 ± 0.12 0.42 ± 0.12 Table 3: Comparison of the final reward obtained using different LSTM sizes. The mean and standard deviation over 5 runs are reported. The best average results obtained are displayed in bold. LSTM size AVDIAR Training Test 1.81 ± 0.47 1.56 ± 0.02 1.81 ± 0.50 1.60 ± 0.03 1.79 ± 0.46 1.56 ± 0.02 Synthetic passes (specially in the experiments with the AVDIAR dataset), meaning that the agent is learning (improving performance) from experience. The best results are generally provided by the late fusion strategy (LFNet) and the Speaker reward. We observe that the rewards we obtain on AVDIAR are generally higher than those obtained on the synthetic environment. We suggest two possible reasons. First, the synthetic environment, as described in section 3.3, has been specifically designed to enforce exploration and tracking abilities. Consequently, it poses a more difficult problem to solve. Second, the number of people in AVDIAR is higher (about 4 in average), thus finding a first person to track would be easier. Figure 7 displays the reward obtained when using only faces as visual observation (dashed lines) in contrast to using the full-body pose estimation (continuous lines). The former represents the results obtained by our previous proposal [18]. We observe that for both datasets, the rewards are significantly higher when using the full-body pose estimator. This figure intends to respond empirically to the legitimate question of why a full-body pose estimator is used instead of a simple face detector. From a qualitative point of view, the answer can be found in the type of situations that can solve one and the other. Let’s imagine that the robot looks at the legs of a user; in case of using only a face detector, there is no clue that could help the robot to move up its head in order to see a face; however, if a human full-body pose detector is used, the detection of legs implies that there is a torso over them, and a head over the torso. Figure 8 shows a short sequence of the AVDIAR environment, displaying the whole field covered by the AVDIAR videos as well as the smaller field of view captured by the robot (the red rectangle in the figure). Finally, Table 4 shows the mean reward on the test set for all architectures and rewards, using both AVDIAR and synthetic data. We can notice that, on the AVDIAR dataset using the Face reward, we obtain a mean reward greater than 1, meaning that, on average, our model can In Figure 6, we compare the evolution of the reward see more than one face per frame. Similarly to Figure 6, obtained while training on the AVDIAR dataset and on higher rewards are obtained in the AVDIAR dataset, and our synthetic environment with the two proposed rewards the best results are yielded when both modalities are taken (Face reward and Speaker reward). Four different net- into account with LFNet. That led us to select the LFNet works are tested: EFNet, LFNet, VisNet, and AudNet. model to perform experiments on Nao. We observe that The y-axis of Figure 6 shows the average reward per AudNet is the worst performing approach. However, it episode, with a clear growing trend as the training time performs quite well on AVDIAR compared to the synthetic 30 60 120 0.42 ± 0.11 0.43 ± 0.12 0.41 ± 0.10 11 Table 4: Comparison of the reward obtained with different architectures. The best results obtained are displayed in bold. AVDIAR Face Network AudNet VisNet EFNet LFNet Training 1.53 ± 0.02 1.63 ± 0.03 1.71 ± 0.04 1.81 ± 0.01 Test 1.47 ± 0.02 1.54 ± 0.04 1.53 ± 0.06 1.56 ± 0.04 Speaker Training Test 1.91 ± 0.03 1.84 ± 0.02 2.01 ± 0.02 1.87 ± 0.05 2.05 ± 0.02 1.85 ± 0.09 2.20 ± 0.04 1.96 ± 0.05 Face Synthetic Speaker 0.21 ± 0.01 0.37 ± 0.04 0.41 ± 0.03 0.42 ± 0.01 0.33 ± 0.01 0.45 ± 0.06 0.53 ± 0.03 0.52 ± 0.03 Acknowledgments environment. This behavior can be explained by the fact that, on AVDIAR, the SSL algorithm returns a 2D heatmap whereas only the yaw angle is used in the synthetic environment. Funding from the EU through the ERC Advanced Grant VHIA #340113 is greatly acknowledged. Concerning the experiments performed on Nao, Figure 9 shows an example of a two-person scenario using the LFNet architecture. We managed to transfer the exploration and tracking abilities learned using the synthetic environment. In our experiments, we see that our model behaves well independently of the number of participants, and the main failure cases are related to quick movements of the participants. References [1] Arcaro, M.J., Schade, P.F., Vincent, J.L., Ponce, C.R., Livingstone, M.S., 2017. Seeing faces is necessary for face-domain formation. Nature Neuroscience 20, 1404–1412. [2] Argyle, M., 1975. Bodily communication. 1st ed., Routledege. 5. Conclusions In this paper we have presented a neural network-based reinforcement learning approach to solve the gaze robot control problem. In particular, our agent is able to autonomously learn how to find people in the environment by maximizing the number of people present in its field of view (and favoring people who speak). A synthetic environment is used for pretraining in order to perform transfer learning to the real environment. Neither external sensors nor human intervention are necessary to compute the reward. Several architectures and rewards are compared on three different environments: two offline (a real and a synthetic datasets) and one online (real time experiments using the Nao robot). Our results suggest that the late fusion of audio and visual information represents the best performing alternative, as well as that pretraining on synthetic data can even make unnecessary to train on real data. 12 [3] Badeig, F., Pelorson, Q., Arias, S., Drouard, V., Gebru, I., Li, X., Evangelidis, G., Horaud, R., 2015. A distributed architecture for interacting with nao, in: ACM International Conference on Multimodal Interaction, pp. 385–386. [4] Cao, Z., Simon, T., Wei, S.E., Sheikh, Y., 2017. Realtime Multi-Person 2D Pose Estimation using Part Affinity Fields, in: IEEE Conference on Computer Vision and Pattern Recognition. [5] Cruz, F., Parisi, G.I., Twiefel, J., Wermter, S., 2016. Multi-modal integration of dynamic audiovisual patterns for an interactive reinforcement learning scenario, in: IEEE/RSJ International Conference on Intelligent Robots and Systems, pp. 759–766. [6] Gebru, I., Ba, S., Li, X., Horaud, R., 2017. Audiovisual speaker diarization based on spatiotemporal bayesian fusion. IEEE Transactions on Pattern Analysis and Machine Intelligence . Figure 8: Example of a sequence from the AVDIAR dataset. The SSL heatmap is superposed on the frame, and visible joints/limbs are displayed using a colored skeleton. The agent’s field of view (in red) is randomly initialized (1st column), detects sound emitted by the a person and moves accordingly (2nd). The agent manages to get all the persons in the field of view (3rd), and it looks at the three people group when two persons move apart (4th). Figure 9: Example of a sequence in a two-person scenario. First row shows an overview of the scene, including the participants and the robot. Second row shows the robot’s field of view. The robot’s head is first initialized in a position where no face is visible (1st column), and the model uses the available detections (elbow/wrist) to find the person on the right (2nd column). The robot finds the second person by looking around while keeping the first person in its field of view (3rd column), and tracks the two people walking together (4th column). [7] Ghadirzadeh, A., Bütepage, J., Maki, A., Kragic, D., [12] Kendon, A., 1967. Some functions of gaze-direction Björkman, M., 2016. A sensorimotor reinforcement in social interaction. Acta Psychologica 26, 22 – 63. learning framework for physical Human-Robot Interaction, in: IEEE/RSJ International Conference on [13] Kingma, D.P., Ba, J., 2014. Adam: A method for stochastic optimization, in: International ConIntelligent Robots and Systems, pp. 2682–2688. ference on Learning Representations. [8] Goodfellow, I., Bengio, Y., Courville, A., 2016. [14] Kober, J., Bagnell, J.A., Peters, J., 2013. ReinforceDeep learning. MIT press. ment learning in robotics: A survey. The Interna[9] Goodrich, M.A., Schultz, A.C., 2007. Human-robot tional Journal of Robotics Research 32, 1238–1274. Interaction: A Survey. Foundations and Trends in [15] Li, X., Girin, L., Badeig, F., Horaud, R., 2016. Human-Computer Interaction 1, 203–275. Reverberant sound localization with a robot head [10] Hochreiter, S., Schmidhuber, J., 1997. Long shortbased on direct-path relative transfer function, in: term memory. Neural Computation 9, 1735–1780. IEEE/RSJ International Conference on Intelligent Robots and Systems, pp. 2819–2826. [11] Kaelbling, L.P., Littman, M.L., Moore, A.W., 1996. Reinforcement learning: A survey. Journal of artifi- [16] Li, X., Girin, L., Horaud, R., Gannot, S., 2017. cial intelligence research 4, 237–285. Multiple-speaker localization based on direct-path 13 features and likelihood maximization with spatial sparsity regularization. IEEE/ACM Transactions on Audio, Speech, and Language Processing 25, 1997– 2012. human-robot social interaction through neural attention Q-network, in: IEEE International Conference on Robotics and Automation, pp. 1639–1645. [25] Rothbucher, M., Denk, C., Diepold, K., 2012. Robotic gaze control using reinforcement learning, in: IEEE International Workshop on Haptic Audio Visual Environments and Games, pp. 83–88. [17] Ljungblad, S., Kotrbova, J., Jacobsson, M., Cramer, H., Niechwiadowicz, K., 2012. Hospital Robot at Work: Something Alien or an Intelligent Colleague?, in: ACM Conference on Computer Supported Cooperative Work, pp. 177–186. [18] [19] [20] [21] [26] Sauppé, A., Mutlu, B., 2015. The Social Impact of a Robot Co-Worker in Industrial Settings, in: ACM Conference on Human Factors in Computing SysMassé, B., Lathuilière, S., Mesejo, P., Horaud, tems, pp. 3613–3622. R., 2017. A reinforcement learning approach to sensorimotor control in human-robot interaction, [27] Skantze, G., Hjalmarsson, A., Oertel, C., 2014. in: Submitted to IEEE International Conference on Turn-taking, feedback and joint attention in situated Robotics and Automation. human-robot interaction. Speech Communication 65, 50–66. Mitsunaga, N., Smith, C., Kanda, T., Ishiguro, H., Hagita, N., 2006. Robot behavior adaptation for [28] Sutton, R.S., Barto, A.G., 1998. Introduction to Rehuman-robot interaction based on policy gradient reinforcement Learning. 1st ed., MIT Press. inforcement learning. Journal of the Robotics Society of Japan 24, 820–829. [29] Thomaz, A.L., Hoffman, G., Breazeal, C., 2006. Reinforcement learning with human teachers: UnderMnih, V., Kavukcuoglu, K., Silver, D., Graves, A., standing how people want to teach robots, in: IEEE Antonoglou, I., Wierstra, D., Riedmiller, M., 2013. International Symposium on Robot and Human InPlaying Atari With Deep Reinforcement Learning, teractive Communication, pp. 352–357. in: NIPS Deep Learning Workshop. [30] Vázquez, M., Steinfeld, A., Hudson, S.E., 2016. Mnih, V., Kavukcuoglu, K., Silver, D., Rusu, A.A., Maintaining awareness of the focus of attention of Veness, J., Bellemare, M.G., Graves, A., Rieda conversation: A robot-centric reinforcement learnmiller, M., Fidjeland, A.K., Ostrovski, G., et al., ing approach, in: IEEE International Symposium on 2015. Human-level control through deep reinforceRobot and Human Interactive Communication, pp. ment learning. Nature 518, 529–533. 36–43. [22] Pourmehr, S., Thomas, J., Bruce, J., Wawerla, J., Vaughan, R., 2017. Robust sensor fusion for finding HRI partners in a crowd, in: IEEE International Conference on Robotics and Automation, pp. 3272– 3278. [31] Watkins, C.J.C.H., Dayan, P., 1992. Q-learning. Machine Learning 8, 279–292. [32] Williams, R.J., 1992. Simple statistical gradientfollowing algorithms for connectionist reinforcement learning. Machine Learning . [23] Qureshi, A.H., Nakamura, Y., Yoshikawa, Y., Ishiguro, H., 2016. Robot gains social intelligence through multimodal deep reinforcement learning, in: IEEE International Conference on Humanoid Robots, pp. 745–751. [33] Zaraki, A., Mazzei, D., Giuliani, M., Rossi, D.D., 2014. Designing and Evaluating a Social GazeControl System for a Humanoid Robot. IEEE Transactions on Human-Machine Systems 44, 157–168. [24] Qureshi, A.H., Nakamura, Y., Yoshikawa, Y., Ishiguro, H., 2017. Show, attend and interact: Perceivable 14
1cs.CV
arXiv:1712.03351v1 [cs.LG] 9 Dec 2017 Peephole: Predicting Network Performance Before Training Boyang Deng∗ Beihang University Junjie Yan SenseTime Dahua Lin The Chinese University of Hong Kong [email protected] [email protected] [email protected] Abstract Accuracy after training (more than 1h/accuracy) The quest for performant networks has been a significant force that drives the advancements of deep learning in recent years. While rewarding, improving network design has never been an easy journey. The large design space combined with the tremendous cost required for network training poses a major obstacle to this endeavor. In this work, we propose a new approach to this problem, namely, predicting the performance of a network before training, based on its architecture. Specifically, we develop a unified way to encode individual layers into vectors and bring them together to form an integrated description via LSTM. Taking advantage of the recurrent network’s strong expressive power, this method can reliably predict the performances of various network architectures. Our empirical studies showed that it not only achieved accurate predictions but also produced consistent rankings across datasets – a key desideratum in performance prediction. Network Designer (Human or Algorithm) Training on the Dataset An architecture proposal (less than 1s/proposal) Network Designer (Human or Algorithm) With Peephole: < 1s/loop Peephole Predicted accuracy (less than 1s/accuracy) Figure 1: Peephole, the proposed network performance predictor, can dramatically reduce the cost of network design. The top circle, which relies on post-training verification, takes hours per loop due to the time-consuming training process, while the bottom circle, which relies on the proposed predictor, can provide fast and effective feedback within 1 second for each architecture. the large design space and the costly training process. Specifically, to devise a convolutional network, one has to make a number of modeling choices, e.g. the number of layers, the number of channels within these layers, and whether to insert a pooling layer at certain points, etc. All such choices together constitute a huge design space that is simply beyond our means to conduct a thorough investigation. Previous efforts were mostly motivated by intuitions – though fruitful in early days, this approach has met increasing difficulties as networks become more complicated. In recent works [27, 1, 28, 26], automatic search methods have been proposed. These methods seek better designs (within a restricted design space), by gradually adjusting parts of the networks and validating the generated designs on real datasets. Without an effective prior guidance, such search procedures tend to spend lots of resources in evaluating “unpromising” options. Also note that training a network in itself is a time-consuming process. Even on a dataset of moderate size, it may take hours (if not days) to train a network. Consequently, an excessively long process is generally needed to to find a positive adjustment. It’s 1. Introduction The computer vision community has witnessed a series of breakthroughs over the past several years. What lies behind this remarkable progress is the advancement in Convolutional Neural Networks (CNNs) [14, 13]. From AlexNet [13], VGG [21], GoogLeNet [23], to ResNet [7], we have come a long way in improving the network design, which also results in substantial performance improvement. Take ILSVRC [4] for example, the classification error rate has dropped from 15.3% to below 3% in just a few years, primarily thanks to the evolution of network architectures. Nowadays, “using a better network” has become a commonly adopted strategy to boost performance – this strategy, while simple, has been repeatedly shown to be very effective in practical applications, e.g. recognition [4], detection [17], and segmentation [6]. However, improving network designs is non-trivial. Along this way, we are facing two key challenges, namely, ∗ Work Previous: > 1h/loop done during an internship at SenseTime 1 been reported [27, 28] that searching a network on CIFAR takes hundreds of GPUs for a lengthy period. Like many others in this community, we have our own share of painful experience in finding good network designs. To mitigate this lengthy and costly process, we develop an approach to quantitatively assess an architecture before investing resources in training it. More accurately, we propose a model, called Peephole, to predict the final performance of an architecture before training. In this work, we explore a natural idea, that is, to formulate the network performance predictor as a regression model, which accepts a network architecture as the input and produces a score as a predictive estimate of its performance, e.g. the accuracy on the validation set. Here, the foremost question is how to turn a network architecture into a numerical representation. This is nontrivial given the diversity of possible architectures. We tackle this problem in two stages. First, we develop a vector representation, called Unified Layer Code, to encode individual layers. This scheme allows various layers to be represented uniformly and effectively by vectors of a fixed dimension. Second, we introduce an LSTM network to integrate the layer representations, which allows architectures with different depths and topologies to be handled in a uniform way. Another challenge that we face is how to obtain a training set. Note that this task differs essentially from conventional ones in that the samples are network architectures together with their performances instead of typical data samples like images or data records. Here, the sample space is huge and it is very expensive to obtain even a sample (which involves running an entire training procedure). In addressing this issue, we draw inspirations from engineering practice, and develop a block-based sampling scheme, which generates new architectures by integrating the blocks sampled from a Markov process. This allows us to explore a large design space with limited budget while ensuring that each sample architecture is reasonable. Overall, our main contributions lie in three aspects: (1) We develop Peephole, a new framework for predicting network performance based on Unified Layer Code and Layer Embedding. Our Peephole can predict a network’s performance before training. (2) We develop Block-based Generation, a simple yet effective strategy to generate a diverse set of reasonable network architectures. This allows the proposed performance predictor to be learned with an affordable budget. (3) We conducted empirical studies over more than a thousand networks, which show that the proposed framework can make reliable predictions for a wide range of network architectures and produce consistent ranking across datasets. Hence, its predictions can provide an effective way to search better network designs, as shown in Figure 1. 2. Related Work Network Design. Since the debut of AlexNet [13], CNNs have become widely adopted to solve computer vision problems. Over the past several years, the advances in network design have been a crucial driving force behind the progress in computer vision. Many representative architectures, such as AlexNet [13], VGGNet [21], GoogLeNet [23], ResNet [7], DenseNet [9], and DPN [3] are designed manually, based on intuitions and experience. Nonetheless, this approach has become less rewarding. The huge design space combined with the costly training procedure makes it increasingly difficult to obtain an improved design. Recently, the community has become more interested in an alternative approach, namely automatic network design. Several methods [27, 1, 28, 26] have been proposed. These methods rely on reinforcement learning to learn how to improve a network design. In order to supervise the learning process, all these methods rely on actual training processes to provide feedback, which are very costly, in both time and computational resources. Our work differs essentially. Instead of developing an automatic design technique, we focus on a crucial but often overlooked problem, that is, how to quickly get the performance feedback. Network Performance Prediction. As mentioned, our approach is to predict network performance. This is an emerging topic, on which existing works remain limited. Some previous methods on performance prediction were developed in the context of hyperparameter optimization, using techniques like Gaussian Process [22] or Last-SeenValue heuristics [16]. These works mainly focus on designing a special surrogate function for a better evaluation of hyper-configurations. There have also been attempts to directly predict network performance. Most works along this line intend to extrapolate the future part of the learning curve given the elapsed part. For this, Domhan et al. [5] proposed a mixture of parametric functions to model the learning curve. Klein et al. [11] extended this work by replacing the mixture of functions with a Bayesian Neural Network. Baker et al. [2] furthered this study by additionally leveraging the information about network architectures with handcrafted features, and using v-SVR for curve prediction. All these works rely on partially observed learning curves to make predictions, which still involve a partly run training procedure and therefore are time-consuming. To support large-scale search of network designs, we desire much quicker feedback and thus explore a fundamentally different but more challenging approach, that is, to predict the performance purely based on architectures. 3. Network Performance Prediction Our goal is to develop an effective method to predict network performance before training. Our predictive model, Block Architecture Block Layer Code Conv 3x3 64 Code of Layer1 MaxPool 2x2 Code of Layer2 Conv 5x5 64 Code of Layer3 Epoch ID LSTM Epoch Embedding LSTM Layer Embedding LSTM Epoch Vector MLP Predicted Accuracy Structural Feature Concat Figure 2: The overall pipeline of the Peephole framework. Given a network architecture, it first encodes each layer into a vector through integer coding and layer embedding. Subsequently, it applies a recurrent network with LSTM units to integrate the information of individual layers following the network topology into a structural feature. This structural feature together with the epoch index (also embedded into a vector) will finally be fed to an MLP to predict the accuracy at the corresponding time point, i.e. the end of the given epoch. Note that the blocks indicated by green color, including the embeddings, the LSTM, and the MLP, are jointly learned in an end-to-end manner. called Peephole and shown in Figure 2, can be formalized as a function, denoted by f . The function f takes two arguments, a network architecture x and an epoch index t, and produces a scalar value f (x, t) as the prediction of the accuracy at the end of the t-th epoch. Here, incorporating the epoch index t as an input to f is reasonable, as the validation accuracy generally changes as the training proceeds. Therefore, when we predict performance, we have to be specific about the time point of the prediction. Note that this formulation differs fundamentally from previous works [5, 11, 2]. Such methods require the observation of the initial part (usually 25%) of the training curve and extrapolate the remaining part. On the contrary, our method aims to predict the entire curve, relying only on the network architecture. In this way, it can provide feedback much quicker and thus is particularly suited for large-scale search of network designs. However, developing such a predictor is nontrivial. Towards this goal, we are facing significant technical challenges, e.g. how to unify the representation of various layers, and how to integrate the information from individual layers over various network topologies. In what follows, we will present our answers to these questions. Particularly, Sec. 3.1 presents a unified vector representation of layers, which is constructed in two steps, namely coding and embedding. Sec. 3.2 presents an LSTM model for integrating the information across layers. 3.1. Unified Layer Code In general, a convolutional neural network can be considered as a directed graph whose nodes represent certain operations, e.g. convolution and pooling. Hence, to develop a representation of such a graph, the first step is to define a representation of individual nodes, i.e. the layers. In this Layer TY KW KH CH Conv Max-Pool Avg-Pool ReLU Sigmoid Tanh BN {1} {2} {3} {4} {5} {6} {7} {1, 2, 3, 4, 5} {2, 3, 4, 5} {2, 3, 4, 5} {1} {1} {1} {1} {1, 2, 3, 4, 5} {2, 3, 4, 5} {2, 3, 4, 5} {1} {1} {1} {1} [0.25, 3] {1} {1} {1} {1} {1} {1} Table 1: The coding table of the Unified Layer Code, where each row corresponds to a layer type. For each layer, we encode it with a type id (TY), a kernel width (KW), a kernel height (KH), and a channel number (CH). Note that for CH, we use the ratio of the output channel number to the input number, instead of the absolute value, and quantize it into an integer. paper, we propose Unified Layer Code (ULC), a uniform scheme to encode various layers into numerical vectors, which is done in two steps: integer coding and embedding. Integer coding. We notice that the operations commonly used in a CNN, including convolution, pooling, and nonlinear activation, can all be considered as applying a kernel to the input feature map. To produce an output value, the kernel takes a local part of the feature map as input, applies a linear or nonlinear transform, and then yields an output. In particular, an element-wise activation function can be considered as a nonlinear kernel of size 1 × 1. Each operation is also characterized by the number of output channels. In a typical CNN, the number of channels can vary significantly, from below 10 to thousands. However, for a specific layer, this number is usually decided based on that of the input, according to a ratio within a limited range. Particularly, for both pooling and nonlin- Type Integer Code Lookup Tables Layer Representation Layer Types Type Vector KW KH Kernel Sizes KW Vector KH Vector CH Channel Ratios CH Vector Concat Figure 3: The layer embedding component. It takes the integer codes as input, maps them to embedded vectors respectively via table lookup, and finally concatenates them into a real vector representation. Note that KW and KH share the same lookup table. ear activation, the numbers of output channels are always equal to that of the input channels, and thus the ratio is 1. While for convolution, the ratio usually ranges from 0.25 to 3, depending on whether the operation intends to reduce, preserve, or expand the representation dimension. In light of this, we choose to represent CH by the output-input ratio instead of the absolute number. In this way, we can effectively limit its dynamic range, quantize it into 8 bins (respectively centered at 0.25, 0.5, 0.75, 1.0, 1.5, 2.0, 2.5, 3.0). Overall, we can represent a common operation by a tuple of four integers in the form of (TY, KW, KH, CH), where TY is an integer id that indicates the type of the computation, KW and KH are respectively the width and height of the kernel, while CH represents the ratio of output-input channels (using the the index of the quantized bin). The details of this scheme are summarized in Table 1. Layer embedding. While capturing the key information for a layer, the discrete representation introduced above is not amenable to complex numerical computation and deep pattern recognition. Inspired by word embedding [20], a strategy proven to be very effective in natural language processing, we take one step further and develop Layer Embedding, a scheme to turn the integer codes into a unified real-vector representation. As shown in Figure 3, the embedding is done by table lookup. Specifically, this module is associated with three lookup tables, respectively for layer types, kernel sizes, and channel ratios. Note that the kernel size table is used to encode both KW and KH. Given a tuple of integers, we can convert its element into a real vector by retrieving from the corresponding lookup table. Then by concatenating all the embedded vectors derived respectively from individual integers, we can form a vector representation of the layer. 3.2. Integrated Prediction With the layer-wise representations based on Unified Layer Code and Layer Embedding, the next is to aggregate them into an overall representation for the entire net- work. In this work, we focus on the networks with sequential structures, which already constitute a significant portion of the networks used in real-world practice. Here, the challenge is how to cope with varying depths in a uniform way. Inspired by the success of recurrent networks in sequential modeling, e.g. in language modeling [19] and video analytics [25], we choose to explore recurrent networks in our problem. Specifically, we adopt the Long-Short Term Memory (LSTM) [8], an effective variant of RNN, for integrating the information along a sequence of layers. In particular, an LSTM network is composed of a series of LSTM units, each for a time step (i.e. a layer in our context). The LSTM maintains a hidden state ht and a cell memory ct , and uses an input gate it , an output gate ot , and a forget gate ft to control the information flow. At each step, it takes an input xt , decides the value of all the gates, yields an output ut , and updates both the hidden state ht and the cell memory ct , as follows:   it = σ W (i) xt + U (i) ht−1 + b(i) ,   ot = σ W (o) xt + U (o) ht−1 + b(o) ,   ft = σ W (f ) xt + U (f ) ht−1 + b(f ) ,   ut = tanh W (u) xt + U (u) ht−1 + b(u) , ct = it ut + ft ct−1 , ht = ot tanh (ct ) . (1) Here, σ denotes the sigmoid function while the elementwise product. Along the way from low-level to high-level layers, the LSTM network would gradually incorporate layer-wise information into the hidden state. At the last step, i.e. the layer right before the fully connected layer for classification, we extract the hidden state of the LSTM cell to represent the overall structure of the network, which we refer to as the structural feature. As shown in Figure 2, the Peephole framework will finally combine this structural feature with the epoch index (also embedded into a real-vector) and use a Multi-Layer Perceptron (MLP) to make the final prediction of accuracy. In particular, the MLP component at the final step is comprised of three fully connected layers with Batch Normalization and ReLU activation. The output of this component is a real value that serves as an estimate of the accuracy. 4. Training Peephole Like other predictive models, Peephole requires sufficient training samples to learn its parameters. However, for our problem, the preparation of the training set itself is a challenge. Randomly sampling sequences of layers is not a viable solution for two reasons: (1) The design space grows exponentially as the number of layers increases, while it is Convolution 3x3 In: 3/Out: 16 Batch Normalization Convolution 3x3 In: 1/Out: 16 Batch Normalization ReLU ReLU Block In: 16/Out: 16 Block In: 16/Out: 16 Block In: 16/Out: 16 Block In: 16/Out: 16 Max Pooling 2x2 (stride 2) Max Pooling 2x2 (stride 2) Block In: 16/Out: 32 Block In: 16/Out: 32 Block In: 32/Out: 32 Block In: 32/Out: 32 Max Pooling 2x2 (stride 2) Max Pooling 2x2 (stride 2) Block In: 32/Out: 64 Block In: 32/Out: 64 Block In: 64/Out: 64 Block In: 64/Out: 64 Average Pooling 8x8 Average Pooling 7x7 Linear Linear CIFAR-10 MNIST Figure 4: Block-based Generation. We first generate individual blocks (indicated by green color), and then assemble them into a network following a skeleton predefined for each dataset (MNIST or CIFAR). The layers in blue color are fixed in the skeleton. Different networks for a dataset differ mainly in the block designs. expensive to obtain a training sample (which requires running an entire training procedure to obtain a performance curve). Hence, it is unaffordable to explore the entire design space freely, even with a large amount of computational resources. (2) Many combinations of layers are not reasonable options from a practical point of view (e.g. a network with multiple activation layers stacked consecutively in a certain part of the layer sequence). Training such networks are simply a waste of resources. In this section, we draw inspirations from existing practice and propose a Block-based Generation scheme to acquire training samples in Sec. 4.1. Then, we present a learning objective for supervising the training process in Sec. 4.2. 4.1. Block-based Generation The engineering practice of network design [7, 24] suggests that it is a good strategy to construct a neural network by stacking blocks that are structurally alike. Zoph et al. [28] and Zhong et al. [26] also proposed to search transferable blocks (referred to as cells in [28]) and assemble them into a network in their efforts towards an automatic way for network search. Inspired by these works, we propose Block-based Generation, a simple yet effective strategy to prepare our training samples. As illustrated in Figure 3, it first designs individual blocks and then stacks them into a network following a certain skeleton. A block is defined to be a short sequence of layers with no more than 10 layers. To generate a block, we follow a Markov chain. Specifically, we begin with a convolution layer by randomly choosing its kernel size from {1, . . . , 5} and the ratio of output/input channel numbers from {0.25, 0.50, 0.75, 1.0, 1.5, 2.0, 2.5, 3.0}. Then at each step, we draw the next layer conditioned on the current one following predefined transition probabilities between layer types, which are empirically estimated from practical networks. For example, a convolution layer has a high chance to be followed by a batch normalization layer and a nonlinear activation. An activation layer is more likely to ensued by another convolution layer or a pooling layer. More details will be provided in the supplemental materials. With a collection of blocks, we can then build a complete network by assembling them following a skeleton. The design of the skeleton follows the general practice in computer vision. As shown in Figure 4, the skeleton comprises three stages with different resolutions. Each stage is a stack of blocks followed by a max pooling layer to reduce the spatial resolution. The features from the last block will go through an average pooling layer and then a linear layer for classification. When replicating blocks within a stage, 1 × 1 convolution layers will be inserted in between for dimension adaptation when the output dimension of the preceding layer does not match the input dimension of the next layer. The block-based generation scheme presented above effectively constrain the sample space, ensuring that the generated networks are mostly reasonable and making it feasible to prepare a training set with an affordable budget. 4.2. Learning Objective Given a set of sample networks {xi }1:N , we can obtain a performance curves yi (t) for each network xi , i.e. the validation accuracy as a function of epoch numbers, by training the network on a given dataset. Hence, we can obtain a set of pairs D = {(xi , yi )}1:N and learn the parameters of the predictor in a supervised way. Specifically, we formulate the learning objective with the smooth L1 loss, denoted by l, as below: L(D; θ) = n 1 X l (f (xi , T ), yi (T )) . N i=1 (2) Here, θ denotes the predictor parameters. Note that we train each sample network with T epochs, and use the results of the final epoch to supervise the learning process. Our framework is very flexible – with the entire learning curves, in principle, one can use the results at multiple epochs for training. However, we found empirically that using only the final epochs already yields reasonably good results. 4.3. Discussions First, the Peephole predictor is task-specific. It is trained to predict the performance on a certain dataset with a specific performance metric. Second, besides network architectures and epoch numbers, the performance of a network also depends on a number of other factors, e.g. how it is initialized, how the learning rate is adjusted over time, as well as the settings on the optimizers. In this work, we train all sample networks with a fixed set of or such design choices. Size Mean Std Min Max CIFAR-10 Train Validation 844 800 0.74 0.73 0.07 0.08 0.50 0.48 0.89 0.88 MNIST Train Validation 471 400 0.98 0.98 0.03 0.04 0.52 0.49 0.99 0.99 Table 2: The performance statistics for the networks respectively sampled for CIFAR-10 and MNIST. Here, Size means the number of sampled networks, Mean, Std, Min, and Max are respectively the mean, standard deviation, minimum, and maximum of the validation accuracies over the corresponding sets of networks. Admittedly, such a setting may sound a bit restrictive. However, this actually reflects our typical practice when tuning network designs in ablation studies. Moreover, most automatic network search schemes also fix such choices during the search process in order to fairly compare among architectures. Therefore, the predictor trained in this way can already provide good support to the practice. That being said, we do plan to incorporate additional factors in the predictor in our future exploration. 5. Experiments We tested Peephole, the proposed network performance prediction framework on two public datasets, CIFAR10 [12] and MNIST [15]. Sec. 5.1 presents the experiment settings, including how the datasets are used and the implementation details of our framework. Sec. 5.2 presents the results we obtained on both datasets, and compares them with other performance prediction methods. Sec. 5.3 presents preliminary results on using Peephole to guide the search of better networks on ImageNet. Finally, Sec. 5.4 presents a qualitative study on the learned representations via visualization. 5.1. Experiment Configurations Datasets. CIFAR-10 [12] is a dataset for object classification. In recent years, it usually serves as the testbed for convolutional network designs. MNIST [15] is a dataset for hand-written digit classification, one of the early and widely used datasets for neural network research. Both datasets are of moderate scale. We chose them as the basis for our study because it is affordable for us to train over a thousand networks thereon to investigate the effectiveness of the proposed predictor. After all, our goal is to explore an performance prediction method that works with diverse architectures instead of pursing a state-of-the-art network on large-scale vision benchmarks. To prepare the samples for training and validation, we follow the procedure described in Sec. 4 to generate two sets of networks, respectively for CIFAR-10 and MNIST, and train them to obtain performance curves. Detailed settings. For fair comparison, we train all sampled networks with the same setting: We use SGD with momentum 0.9 and weight decay 0.0001. Each epoch loops over the entire training set in random order. The learning rate is initialized to 0.1 and scaled down by a factor of 0.1 every 60 epochs (for CIFAR-10) or 80 epochs (for MNIST). The network weights are all initialized following the scheme in [7]. Table 2 shows the statistics of these networks and their performances. For the Peephole model, we use 40-dimensional vectors for both layer embedding and epoch embedding. The dimension of the hidden states in LSTM is set to 160. The Multi-Layer Perceptron (MLP) for final prediction comprises 3 linear layers, each with 200 hidden units. 5.2. Comparison of Prediction Accuracies Methods to compare. We compare our Peephole method with two representative methods in recent works: 1. Bayesian Neural Network (BNN) [11]. This method is devised to extrapolate learning curves given their initial portions (usually 25% of the entire ones). It represents each curve as a linear combination of basis functions and uses Bayesian Neural Network to yield probabilistic extrapolations. 2. ν-Support Vector Regression (ν-SVR) [2]. This method relies on a regression model, ν-SVR, to make predictions. To predict the performance of a network this model takes as input both the initial portion of the learning curve and simple heuristic features derived based on the network architecture. This method represents the state of the art on this task. Note that both methods above require the initial portions of the learning curves while ours can give feedback purely based on the network architecture before training. Evalution criteria. We evaluate the predictor performances using three criteria: 1. Mean Square Error (MSE), which directly measures the deviation of the predictions from the actual values. 2. Kendall’s Tau (Tau), which measures the correlation between the predictive rankings among all testing networks and their actual rankings. The value of Kendall’s Tau ranges from −1 to 1, and a higher value indicates higher correlation. 3. Coefficient of Determination (R2 ), which measures how closely the predicted value depends on the actual Method MSE Tau R2 BNN ν-SVR 0.0032 0.0018 0.5417 0.6232 0.5400 0.7321 Peephole (Ours) 0.0010 0.7696 0.8596 Table 3: Comparison of prediction accuracies for the networks trained on CIFAR-10, with three metrics MSE, Tau, and R2 . The best result for each metric is highlighted with bold font. Method MSE Tau R2 BNN ν-SVR 0.0004 0.0008 0.3380 0.3489 0.1921 0.2121 Peephole (Ours) 0.0003 0.5036 0.4681 Table 4: Comparison of prediction accuracies for the networks (a) BNN (b) v-SVR (c) Peephole Figure 5: The scatter plots with x-axes representing the actual validation accuracies on CIFAR-10 and y-axes representing the predicted accuracies. These plots show how much the predictions are correlated with the actual values. Model VGG-13 Selected #Param 126M 35M CIFAR-10 Pred Real – 87.52% – 88.06% ImageNet Top-1 Top5 71.55% 71.91% 90.37% 90.53% trained on CIFAR-10, with three metrics MSE, Tau, and R2 . The best result for each metric is highlighted with bold font. Table 5: The accuracies on ImageNet obtained by a network sevalue. The value of R2 ranges from 0 to 1, where a value closer to 1 suggests that the prediction is more closely coupled with the actual value. Results on CIFAR-10. Table 3 compares the prediction results for the networks trained on CIFAR-10, obtained with different predictors. We observe that Peephole consistently outperforms both BNN and ν-SVR across all metrics. Particularly, achieving smaller MSE means that the predictions from Peephole are generally more accurate than those from others. This makes it a viable predictor in practice. On the other hand, the high values in Tau and R2 indicate that the ranking among multiple networks produced by Peephole is quite consistent with the ranking of their actual performances. This makes Peephole a good criterion to select performant network architectures. The scatter plots in Figure 5 visualize the correlations between the predicted accuracies and actual accuracies, obtained with different methods. Qualitatively, the predictions made by Peephole demonstrate notably higher correlation with the actual values than those from other methods, especially at the high-accuracy area (top right corner). Results on MNIST. We also evaluated the predictions on the networks trained on MNIST in the same way, with the results shown in Table 4. Note that since most networks can yield high accuracies on this MNIST, it would be easier to produce more precise predictions on the accuracy numbers but more difficult to yield consistent rankings. This is reflected by the performance metrics in the table. Despite this difference in data characteristics, Peephole still significantly outperforms the other two methods across all metrics. lected based on Peephole predictions. Here, Pred is the predicted accuracy on CIFAR-10. Real is the actual accuracy on CIFAR-10. #Param is the number of parameters. Top-1 and Top-5 indicates the accuracies obtained on ImageNet. 5.3. Transfer to ImageNet Getting top performance on ImageNet is a holy grail for convolutional network design. Yet, directly training Peephole based on ImageNet is prohibitively expensively due to the lengthy processes of training a network on ImageNet. Nevertheless, [28] suggests an alternative way, that is, to search for scalable and transferable block architectures on a smaller dataset like CIFAR-10. Following this idea, we select the network architecture with the highest Peepholepredicted accuracy among those in our validation set for CIFAR-10, then scale it up and transfer it to ImageNet1 . We compared this network with VGG-13 [21], a widely used network that was designed manually. From the results in Table 5, we can see that the selected network achieves moderately better accuracy on ImageNet with a substantially smaller parameter size. This is just a preliminary study. But it shows that Peephole is promising for pursuing performant network designs that are transferable to the larger datasets. 5.4. Studies on the Representations The effective of Peephole may be attributed to its ability to abstract a uniform but expressive representation for various architectures. To gain better understanding of this 1 The details of the selected network and this transfer process will be provided in the supplemental materials. Convolution Convolution High ReLU BatchNorm Convolution BatchNorm Convolution Sigmoid Tanh Convolution Good Blocks MaxPooling ReLU MaxPooling Block_1 ReLU Block_2 Poor Blocks Low Accuracy Figure 6: Responses of a cell in the learned LSTM for two block Figure 7: The learned structural features for the networks in the architectures. The color is drawn according to the response value of this cell. On the right is the color bar used in this figure, where darker color represents higher responses. Every time a convolution layer appears the response will get higher (the color gets darker in the figure). This figure is better viewed in color. validation set, visualized based on t-SNE embeddings. Points are colored according to their accuracies. (better viewed in color) representation, we analyze the learned LSTM and the derived feature vectors. In one study, we examined the hidden cells inside the LSTM using the method presented in [10]. Particularly, we recorded the dynamics of the cell responses as the LSTM traverses the sequence of layers. Figure 6 shows the responses of a certain cell, where we can see that the response raises every time it gets to a convolution layer. This behavior is observed in different blocks. This observation suggests that this cell learns to “detect” convolution layers even without being explicitly directed to do. In a certain sense, this also reflects the capability of LSTM to capture architectural patterns. In another study, we visualized the structural feature (derived from the last unit of the LSTM) using t-SNE embedding [18]. Figure 7 shows the visualized results. We can see the gradual transition from low performance networks to high performance networks. This shows that the structural features contain key information related to the network performances. 6. Conclusion We presented Peephole, a predictive model for predicting network performance based on architectures before training. Specifically, we developed Unified Layer Code as a unified representation for network architectures and a LSTM-based model to integrate the information from individual layers. To tackle the difficulties in preparing the training set, we propose a Block-based Generation scheme, which allows us to explore a wide variety of reasonable designs while constraining the search space. The systematic studies with over a thousand networks trained on CIFAR10 and MNIST showed that the proposed method can yield reliable predictions that are highly correlated with the actual performance. On three different metrics, our method significantly outperforms previous methods. We note that this is just the first step towards the goal of fast search of network designs. In future work, we plan to incorporate additional factors in our predictor, such as various design choices, to extend the applicability of the predictive model. We will also explore more effective ways to optimize network designs on top of this predictive model. References [1] B. Baker, O. Gupta, N. Naik, and R. Raskar. Designing neural network architectures using reinforcement learning. CoRR, abs/1611.02167, 2016. 1, 2 [2] B. Baker, O. Gupta, R. Raskar, and N. Naik. Practical neural network performance prediction for early stopping. arXiv preprint arXiv:1705.10823, 2017. 2, 3, 6 [3] Y. Chen, J. Li, H. Xiao, X. Jin, S. Yan, and J. Feng. Dual path networks. arXiv preprint arXiv:1707.01629, 2017. 2 [4] 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. 1 [5] T. Domhan, J. T. Springenberg, and F. Hutter. Speeding up automatic hyperparameter optimization of deep neural networks by extrapolation of learning curves. In TwentyFourth International Joint Conference on Artificial Intelligence, 2015. 2, 3 [6] M. Everingham, L. Van Gool, C. K. Williams, J. Winn, and A. Zisserman. The pascal visual object classes (voc) challenge. International journal of computer vision, 88(2):303– 338, 2010. 1 [7] 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. 1, 2, 5, 6 [8] S. Hochreiter and J. Schmidhuber. Long short-term memory. Neural computation, 9(8):1735–1780, 1997. 4 [9] G. Huang, Z. Liu, K. Q. Weinberger, and L. van der Maaten. Densely connected convolutional networks. arXiv preprint arXiv:1608.06993, 2016. 2 [10] A. Karpathy, J. Johnson, and L. Fei-Fei. Visualizing and understanding recurrent networks. arXiv preprint arXiv:1506.02078, 2015. 8 [11] A. Klein, S. Falkner, J. T. Springenberg, and F. Hutter. Learning curve prediction with bayesian neural networks. International Conference on Learning Representations, 2017. 2, 3, 6 [12] A. Krizhevsky, V. Nair, and G. Hinton. Cifar-10 and cifar-100 datasets. URl: https://www. cs. toronto. edu/˜ kriz/cifar.html, 2009. 6 [13] 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. 1, 2 [14] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. Gradientbased learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. 1 [15] Y. LeCun, C. Cortes, and C. J. Burges. The mnist database of handwritten digits, 1998. 6 [16] L. Li, K. Jamieson, G. DeSalvo, A. Rostamizadeh, and A. Talwalkar. Hyperband: A novel bandit-based approach to hyperparameter optimization. arXiv preprint arXiv:1603.06560, 2016. 2 [17] T.-Y. Lin, M. Maire, S. Belongie, J. Hays, P. Perona, D. Ramanan, P. Dollár, and C. L. Zitnick. Microsoft coco: Common objects in context. In European Conference on Computer Vision, pages 740–755. Springer, 2014. 1 [18] L. v. d. Maaten and G. Hinton. Visualizing data using t-sne. Journal of Machine Learning Research, 9(Nov):2579–2605, 2008. 8 [19] T. Mikolov, M. Karafiát, L. Burget, J. Černockỳ, and S. Khudanpur. Recurrent neural network based language model. In Eleventh Annual Conference of the International Speech Communication Association, 2010. 4 [20] T. Mikolov, I. Sutskever, K. Chen, G. S. Corrado, and J. Dean. Distributed representations of words and phrases and their compositionality. In Advances in neural information processing systems, pages 3111–3119, 2013. 4 [21] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. 1, 2, 7 [22] K. Swersky, J. Snoek, and R. P. Adams. Freeze-thaw bayesian optimization. arXiv preprint arXiv:1406.3896, 2014. 2 [23] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich. Going deeper with convolutions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1–9, 2015. 1, 2 [24] S. Xie, R. Girshick, P. Dollár, Z. Tu, and K. He. Aggregated residual transformations for deep neural networks. arXiv preprint arXiv:1611.05431, 2016. 5 [25] J. Yue-Hei Ng, M. Hausknecht, S. Vijayanarasimhan, O. Vinyals, R. Monga, and G. Toderici. Beyond short snippets: Deep networks for video classification. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 4694–4702, 2015. 4 [26] Z. Zhong, J. Yan, and C.-L. Liu. Practical network blocks design with q-learning. arXiv preprint arXiv:1708.05552, 2017. 1, 2, 5 [27] B. Zoph and Q. V. Le. Neural architecture search with reinforcement learning. arXiv preprint arXiv:1611.01578, 2016. 1, 2 [28] B. Zoph, V. Vasudevan, J. Shlens, and Q. V. Le. Learning transferable architectures for scalable image recognition. arXiv preprint arXiv:1707.07012, 2017. 1, 2, 5, 7 Convolution; 7x7; stride 2 In: 1/Out: 64 Batch Normalization Convolution; 4x3; 1 ReLU Batch Normalization Block In: 64/Out: 128 ReLU Max Pooling 2x2 (stride 2) Convolution; 2x2; 3 Block ReLU In: 128/Out: 256 Max Pooling 2x2 (stride 2) Convolution; 3x1; 1 Batch Normalization Block Tanh Max Pooling 2x2 (stride 2) Block Block In: 256/Out: 512 In: 512/Out: 512 Average Pooling 7x7 Linear Network Figure 1: Selected Architecture for ImageNet. On the left is the block architecture selected based on Peephole-predicted accuracy. We mark the type of each layer. For Convolution layers, we also note the kernel size (W idth × Height) and the ratio of output/input channel sizes (the last digit). On the right is the scheme we use to stack replicants of the left block into a network, which achieves 71.91% Top-1 accuracy. A. Appendix Selected Block for ImageNet. In Figure 1, we illustrate the selected block architecture based on Peephole-predicted accuracy. We also stack them in a similar manner to our scheme used in CIFAR-10. Note that this architecture is not generated by our algorithm but selected from randomly sampled validation architectures using Peephole. Next Now Conv MP AP ReLU Sigm Tanh Conv MP AP ReLU Sigm Tanh 0.03 0.6 0.6 0.3 0.3 0.3 0.03 0.05 0.05 0.3 0.3 0.3 0.03 0.05 0.05 0.3 0.3 0.3 0.31 0.1 0.1 0 0.05 0.05 0.3 0.1 0.1 0.05 0 0.05 0.3 0.1 0.1 0.05 0.05 0 Table 1: Transition Matrix of the Markov Chain in Blockbased Generation. Every row is the distribution of the next layer conditioned on the current layer (denoted as Now in the Table). Conv stands for Convolution. MP refers to MaxPooling. AP refers to Average-Pooling. Sigm represents Sigmoid. Note that Batch Normalization is not illustrated in this table since we insert them right behind the Convlution layers with the probability of 0.6. Details of Sampling Strategy. Here we detail our configurations for Block-based Generation scheme. The whole process begins with a convolution layer whose kernel size is uniformly sampled from {1, . . . , 5} and the ratio of output/input channel number is uniformly sampled from {0.25, 0.50, 0.75, 1.0, 1.5, 2.0, 2.5, 3.0}. Then the construction will follow a Markov chain, i.e. we will choose the type of the next layer merely based on the current one. The transition matrix is shown in Table 1. Note that Batch Normalization is inserted right behind Convolution layers with the probability of 0.6. Thus it’s not shown in the table. Meanwhile, for computational consideration, we limit the depth of a block to less than 11 layers and restrict the number of convolution layers within a block to less than 4.
9cs.NE
SPLITTING TOWER AND DEGREE OF TT-RINGS arXiv:1309.1802v2 [math.AC] 9 Jan 2014 PAUL BALMER Abstract. After constructing a splitting tower for separable commutative ring objects in tensor-triangulated categories, we define and study their degree. Introduction Let K be a tensor-triangulated category (tt-category, for short). Denote its tensor by ⊗ : K × K −→ K and its ⊗-unit by 1. Let A be a ring object in K, that is, an associative monoid µ : A ⊗ A → A with unit η : 1 → A. We want to study the degree of such a ring object under the assumption that A is what we call a tt-ring, i.e. is commutative and separable. We focuss on tt-rings because their Eilenberg-Moore category A - ModK of A-modules in K remains a tt-category and extension-of-scalars FA : K −→ A - ModK is a tt-functor (a fact which also explains the terminology : tt-rings preserve tt-categories). See Section 1. In practice, tt-rings appear in commutative algebra as finite étale algebras and in representation theory of finite groups as the amusing algebras A = k(G/H) associated to subgroups H < G; see [Bal12]. In the latter case, if K = K(G) is the derived or the stable category of the group G over a field k, then A - ModK is nothing but the corresponding category K(H) for the subgroup. These two sources already provide an abundance of examples. Furthermore, the topological reader will find tt-rings among ring spectra, equivariant or not. Let us contemplate the problem of defining a reasonable notion of degree, i.e. an integer deg(A) measuring the size of the tt-ring A in a general tt-category K. When working over a field k, it is tempting to use dimk (A). When A is a projective separable R-algebra over a commutative ring R then its rank must be finite ([DI71]) and provides a fine notion of degree for A viewed in the tt-category of perfect complexes Dperf (R) = Kb (R – proj). However, tt-geometry covers more than commutative algebra. Unorthodox separable algebras already emerge in representation theory for instance, as the above A = k(G/H). In Db (kG – mod), one can still forget the G-action and take dimension over k as a possible degree – which of course yields the index [G : H] in that example – but one step further, in the stable category K = stab(kG), dimension over k becomes a slippery notion whereas the tt-ring A = k(G/H) remains equally important. Such questions become even harder in general stable homotopy categories (see [HPS97]) where there is simply no ground field k to deal with in the first place. So a good concept of degree in the broad generality of tt-geometry requires a new idea. Date: 2013 December 2. 1991 Mathematics Subject Classification. 18E30, 13B40, 20J05, 55U35. Key words and phrases. Separable, tensor triangulated category, degree. Research supported by NSF grant DMS-1303073. 1 2 PAUL BALMER Our solution relies on the following Splitting Theorem 2.1, which echoes a classical property of usual separable rings (see [CHR65]). Note that such a result is completely wrong for non-separable rings, already with B = A[X] for instance. Theorem. Let f : A → B and g : B → A be homomorphisms of tt-rings such that ∼ g ◦f = idA . Then there exists a tt-ring C and a ring isomorphism ( g∗ ) : B → A×C. Using this theorem, we construct (Definition 3.1) a tower of tt-rings and homomorphisms A =: A[1] → A[2] → · · · → A[n] → · · · such that after extending scalars to A[n] our A splits as the product of 1 × · · · × 1 (n times) with A[n+1] . The degree of A is defined to be the last n such that A[n] 6= 0 (Definition 3.4). We prove a series of results which show that this concept of degree behaves according to intuition and provides a reasonable invariant. In basic examples, we recover expected values, like [G : H] in the case of k(G/H) in Db (kG – mod). In the stable category however, deg(k(G/H)) can be smaller than [G : H]. In the extreme case of H < G strongly p-embedded, we even get deg(k(G/H)) = 1 in stab(kG); see Example 4.6. We prove in Section 4 that the degree is finite for every tt-ring in the derived category of perfect complexes over a scheme, in the bounded derived category of a finite dimensional cocommutative Hopf algebra and in the stable homotopy category of finite spectra. It is an open question whether the degree must always be finite, at least locally. Several aspects of this work extend to non-triangulated additive tensor categories. This is discussed in Remark 3.13. In [Bal13], our degree theory will be used to control the fibers of the map Spc(A - ModK ) → Spc(K). We shall notably reason by induction on the degree, thanks to the following Theorem 3.6 : Theorem. Let A be a tt-ring of finite degree d in K. Then in the tt-category of A-modules, we have an isomorphism of tt-rings FA (A) ≃ 1 × A[2] where the tt-ring A[2] has degree d − 1 in A - ModK . Convention : All our tt-categories are essentially small and idempotent complete. 1. The tt-category of A-modules We quickly list standard properties of the Eilenberg-Moore category A - ModK of A-modules in K, see [EM65], [ML98, Chap. VI] or [Bal11]. As A is separable (i.e. µ : A ⊗ A → A has a section σ as A, A-bimodules) the category A - ModK admits a unique triangulation such that both extensionof-scalars FA : K −→ A - ModK , x 7→ A ⊗ x, and its forgetful right adjoint UA : A - ModK −→ K are exact; see [Bal11]. Also, A - ModK is equivalent to the idempotent completion of the Kleisli category A – FreeK of free A-modules, see [Kle65]. Objects of A – FreeK are the same as those of K, denoted FA (x) for every x ∈ K, and morphisms HomA (FA (x), FA (y)) := HomK (x, A⊗y). Denote by f¯ : FA (x) → FA (y) the morphism in A – FreeK corresponding to f : x → A ⊗ y in K. As our tt-ring A is furthermore commutative, there is a tensor structure − ⊗A − : A - ModK × A - ModK −→ A - ModK making FA : K −→ A - ModK a tt-functor. Indeed, one can define ⊗A on the Kleisli category by FA (x) ⊗A FA (y) := FA (x ⊗ y) and f¯⊗A ḡ = (µ ⊗ 1 ⊗ 1)(23)(f ⊗ g) if f : x → A ⊗ x′ and g : y → A ⊗ y ′ , as below : x⊗y f ⊗g / A ⊗ x′ ⊗ A ⊗ y ′ (23) / A ⊗ A ⊗ x′ ⊗ y ′ µ⊗1⊗1 / A ⊗ x′ ⊗ y ′ . SPLITTING TOWER AND DEGREE OF TT-RINGS 3 Idempotent completion then yields ⊗A on A - ModK . One can also describe ⊗A on all modules directly. First only assume that A is separable with a chosen A, Abimodule section σ : A → A ⊗ A of µ. Let (x1 , ̺1 ) and (x2 , ̺2 ) be right and left A-modules in K respectively. Then the following endomorphism v in K (1.1) v : x1 ⊗ x2 1⊗η⊗1 / x1 ⊗ A ⊗ x2 1⊗σ⊗1 / x1 ⊗ A ⊗ A ⊗ x2 ̺1 ⊗̺2 / x1 ⊗ x2 is an idempotent : v ◦ v = v. Hence one can define x1 ⊗A x2 := Im(v) as the corresponding direct summand of x1 ⊗ x2 . We obtain a split coequalizer in K : x1 ⊗ A ⊗ x2 ̺1 ⊗1 1⊗̺2 // x ⊗ x 1 2 v / / Im(v) = x1 ⊗A x2 as in the traditional definition of ⊗A . When A is commutative, left and right Amodules coincide and one induces an A-action on x1 ⊗A x2 from the usual formula on x1 ⊗ x2 . One verifies that this coincides with the tensor constructed above. 1.2. Proposition (Projection formula). Let A be a tt-ring in K. For all y ∈ K and x ∈ A - ModK , we have a natural isomorphism UA (x ⊗A FA (y)) ∼ = UA (x) ⊗ y in K. Proof. By construction of ⊗A , it suffices to prove the existence of such an isomorphism for x ∈ A – FreeK , which is natural in x in that category (and in y too but that is easy). So, let x = FA (z) for some z ∈ K. Then UA (x ⊗ FA (y)) = UA (FA (z) ⊗A FA (y)) = UA (FA (z ⊗ y)) = A ⊗ (z ⊗ y) ∼ = (A ⊗ z) ⊗ y = UA (x) ⊗ y. This looks trivial but the point is that this isomorphism is natural with respect to morphisms f¯ : x = FA (z) → FA (z ′ ) = x′ in A – FreeK for f : z → A ⊗ z ′ in K (not just natural in z). This is now an easy verification.  1.3. Remark. For two ring objects A and B, the ring object A × B is A ⊕ B with component-wise structure. The ring object A⊗B has multiplication (µ1 ⊗µ2 ) (23) : (A ⊗ B)⊗2 −→ A ⊗ B and obvious unit. The opposite Aop is A with µop = µ (12). The enveloping ring Ae is A ⊗ Aop . Left Ae -modules are just A, A-bimodules. If A and B are separable, then so are A × B, A ⊗ B and Aop . Conversely, if A × B is separable then so are A and B (restrict the section “σ” to each factor). 1.4. Remark. Let h : A → B be a homomorphism of tt-rings in K (i.e. h is compatible with multiplications and units). We also say that B is an A-algebra or a tt-ring over A. Then idempotent-complete the functor Fh : A – FreeK −→ B – FreeK defined on objects by Fh (FA (x)) = FB (x) and on morphisms by Fh (f¯) = (h ⊗ 1) ◦ f . Alternatively, equip B with a right A-module structure via h and define for every A-module x ∈ A - ModK , its extension Fh (x) = B ⊗A x equipped with the left B-module structure on the B factor. Both define the same tt-functor Fh : A - ModK −→ B - ModK and the following diagram commutes up to isomorphism : K ❖❖❖ ❖❖F❖B ♣♣♣ ♣ ♣ ❖❖❖ ' w♣♣♣ Fh ∼ = B⊗A − / A - ModK B - ModK . FA Furthermore, if k : B → C is another homomorphism then Fkh ∼ = Fk ◦ Fh . 1.5. Remark. For A a tt-ring in K, there is a one-to-one correspondence between (i) A-algebras in K, i.e. homomorphism h : A → B of tt-rings in K, and (ii) tt-rings B̄ in A - ModK . 4 PAUL BALMER The correspondence is the obvious one : To every tt-ring B̄ = (B̄, µ̄, η̄) in A - ModK , associate B := UA (B̄) and h := UA (η̄). The ring structure on B is given by v µ̄ ηA h B ⊗ B = UA (B̄) ⊗ UA (B̄) ։ UA (B̄ ⊗A B̄) → UA (B̄) = B and ηB : 1 → A → B. Conversely, if h : A → B is a homomorphism, then one can use h to equip B̄ := B with an A-module structure and verify that µ : B ⊗ B → B respects the idempotent v of (1.1), hence defines µ̄ : B ⊗A B → B. Then B is separable in K (with section σ of µ) if and only if B̄ is separable in A - ModK (with section v σ of µ̄). We tacitly use this dictionary below. If we need to distinguish the A-algebra B in K from the tt-ring B̄ in A - ModK , we shall write UA (B̄) for the former. Under this correspondence, if L := A - ModK , there is an equivalence B - ModK ∼ = B̄ - ModL such that the following diagram commutes up to isomorphism : FA K / L = A - ModK FB̄ FB  B - ModK  B̄ - ModL . ≃ On Kleisli categories, it maps FB (x) to FB̄ (FA (x)) for every x ∈ K and follows the sequence of isomorphisms HomB (FB (x), FB (y)) ∼ = HomK (x, B ⊗ y) ∼ = ∼ ∼ HomA (FA (x), B ⊗ y) = HomA (FA (x), B̄ ⊗A FA (y)) = HomB̄ (FB̄ FA (x), FB̄ FA (y)) on morphisms. Idempotent completion does the rest. 1.6. Remark. Let F : K → L be a tt-functor. Let A be a tt-ring in K and let B := F (A) its image in L. Then B is also a tt-ring and there exists a tt-functor F̄ : A - ModK −→ B - ModL F KO (1.7) FA UA  A - ModK /L O FB F̄ UB  / B - ModL such F̄ FA = FB F and UB F̄ = F UA . Explicitly, for every A-module (x, ̺), we have (̺) ∼ F (A ⊗ x) F−→ F (x). On F̄ (x, ̺) = (F (x), F (̺)) where B ⊗ F (x) = F (A) ⊗ F (x) = morphisms, F̄ (f ) = F (f ). The “Kleislian” description of F̄ is equally easy. 2. Splitting theorems We will iteratively use the following splitting result : 2.1. Theorem. Let f : A → B and g : B → A be homomorphisms of tt-rings in K such that g ◦ f = idA . Then there exists a tt-ring C and a ring isomorphism ∼ h : B → A × C such that pr1 h = g. Consequently, C becomes an A-algebra, via ∼ pr2 h f . Moreover, if C ′ is another A-algebra and h′ : B → A × C ′ is another A-algebra isomorphism such that pr1 h = g, then there exists an isomorphism of ∼ A-algebras ℓ : C → C ′ such that h′ = (1 × ℓ) h. We start with a couple of additive lemmas. 2.2. Lemma. Let B be a ring object, B1 and B2 two B, B-bimodules and h : ∼ B → B1 ⊕ B2 an isomorphism of B, B-bimodules. Then B1 and B2 admit unique ∼ structures of ring objects such that h becomes a ring isomorphism B → B1 × B2 . SPLITTING TOWER AND DEGREE OF TT-RINGS 5  ∼ Proof. Write the given isomorphisms h = hh12 : B −→ B1 ⊕ B2 and h−1 = ( k1 k2 ) : ∼ B1 ⊕ B2 −→ B. If h is to be a ring isomorphism, we must have for i = 1, 2 that the multiplication µi : Bi ⊗ Bi → Bi is given by µi = hi µ (ki ⊗ ki ) and the unit ηi : 1 → Bi by ηi = hi η. Hence uniqueness. Conversely, let us see that these formulas provide the wanted ring structures. Let ρ : B ⊗ B2 −→ B2 be the left B-action on B2 . By left B-linearity of k2 : B2 → B, we have µ (1 ⊗ k2 ) = k2 ρ : B ⊗ B2 → B. Note that h h−1 = ( 10 01 ) implies hi kj = 0 when i 6= j. Therefore h1 µ (1 ⊗ k2 ) = h1 k2 ρ = 0. Similarly, B, B-linearity of k1 and k2 gives hi µ (1 ⊗ kj ) = 0 and hi µ (kj ⊗ 1) = 0 when i 6= j. So the bottom square of the following diagram commutes, in which the top one commutes by definition : h −1 −1 ⊗h ≃ (B1 ⊕B2 ) ⊗ (B1 ⊕B2 ) µB1 ×B2 ∼ =  (B1 ⊗B1 ) ⊕ (B1 ⊗B2 ) ⊕ (B2 ⊗B1 ) ⊕ (B2 ⊗B2 )  ( k1 ⊗k1 k1 ⊗k2 k2 ⊗k1 k2 ⊗k2 ) ,  B⊗B / B1 ⊕ B2 µ1 0 0 0 0 0 0 µ2  / B1 ⊕ B2 O h= h1 h2  µ  ≃ /B ∼ Hence h : B → B1 ⊕B2 is an isomorphism of objects-equipped-with-multiplications. Since B is associative and unital, B1 and B2 must have the same properties.  ∼ 2.3. Lemma. Let C and C ′ be ring objects and ( 1s 0ℓ ) : 1 × C → 1 × C ′ a ring isomorphism. Then s = 0 and ℓ is a ring isomorphism. Proof. Let us denote by (C, µ, η) and (C ′ , µ′ , η ′ ) the structures. Clearly ℓ is an isomorphism of objects. From the fact ( 1s 0ℓ ) preserves the structures  it follows  that  100 0 ′ that η = s + ℓη and that 0 0 0 µ′ ( 1s 0ℓ ) ⊗ ( 1s 0ℓ ) = ( 1s 0ℓ ) 10 00 00 µ0 , giving in particular µ′ (s⊗ ℓ) = 0 and µ′ (ℓ ⊗ ℓ) = ℓµ. Composing the former with (1 ⊗ ℓ−1 η ′ ) : 1 ⊗ 1 → 1 ⊗ C, we get 0 = µ′ (s ⊗ ℓ)(1 ⊗ ℓ−1 η ′ ) = µ′ (s ⊗ η ′ ) = µ′ (1C ′ ⊗ η ′ )s = s and therefore ℓη = η ′ . Hence ℓ preserves multiplication and unit.  Proof of Theorem 2.1. Via the morphism g : B → A, we can equip A with a structure of B, B-bimodule, so that g becomes B e -linear. Since B e = B ⊗ B op is separable, the category B e - ModK of B, B-bimodules is triangulated in such a way that UB e : B e - ModK −→ K is exact. Choose a distinguished triangle over g in g z B e - ModK say C → B → A → ΣC. Forgetting the B e -action, since g is split by f in K, we see that UB e (z) = 0. Since UB e is faithful, z is also zero in the triangulated ∼ category B e - ModK , which in turn yields an isomorphism h : B → A ⊕ C of B, Bbimodules such that pr1 h = g. By Lemma 2.2, A and C can be equipped with ring structures so that h is a ring isomorphism. We are left to verify that this new ring structure on A is indeed the original one. This follows from the fact that g : B → A is a split epimorphism which is a homomorphism from B to A with both structures (the original one by hypothesis and the new one because h = ( g∗ ) is a homomorphism). Note that C is separable by Remark 1.3. Finally, for uniqueness of C as A-algebra, with the notation of the statement, we obtain an isomorphism ∼ k := h′ ◦ h−1 : 1 × C → 1 × C ′ in A - ModK such that pr1 k = pr1 which means  that k has the form ( 1s 0ℓ ) and we conclude by Lemma 2.3. 6 PAUL BALMER 2.4. Theorem. Let A be a tt-ring in K. Then there exists a ring isomorphism ∼ h : A ⊗ A → A × A′ for some tt-ring A′ in such a way that pr1 h = µ. Moreover, the A-algebra A′ is unique up to isomorphism with this property. Proof. Apply Theorem 2.1 to the tt-ring B = A ⊗ A with g = µ : A ⊗ A → A and f = 1A ⊗ η = FA (η) : A → A ⊗ A.  ∼ 2.5. Remark. From the isomorphism ( µ∗ ) : A ⊗ A → A ⊕ A′ , we see that A′ ≃ Σ−1 cone(µ) ≃ cone(1A ⊗ η) ≃ A ⊗ cone(η) in K. Also supp(A′ ) ⊆ supp(A). 3. Splitting tower and degree 3.1. Definition. We define the splitting tower of a tt-ring A A[0] → A[1] → A[2] → · · · → A[n] → A[n+1] → · · · as follows : We start with A[0] = 1, A[1] = A and η : A[0] → A[1] . Then for n ≥ 1 we define A[n+1] = (A[n] )′ in the notation of Theorem 2.4 applied to the tt-ring A[n] in the tt-category A[n−1] - ModK (see Remark 1.5). Equivalently, A[n+1] is characterized as A[n] -algebra by the existence of an isomorphism of A[n] -algebras (3.2) ∼ h : A[n] ⊗A[n−1] A[n] → A[n] × A[n+1] such that pr1 h = µ. This tower {A[n] }n≥0 is well-defined up to isomorphism. 3.3. Remark. By Remark 2.5, supp(A[n+1] ) ⊆ supp(A[n] ), and if A[n] = 0 for some n then A[m] = 0 for all m ≥ n. Also, by construction, if we consider A[n] as a tt-ring in A[n−1] - ModK , we have (A[n] )[m] ∼ = A[n+m−1] for all m ≥ 1. 3.4. Definition. We say that A has finite degree d if A[d] 6= 0 and A[d+1] = 0. In that case, we write deg(A) = d or degK (A) = d if we need to stress the category. If A[n] 6= 0 for all n ≥ 0, we say that A has infinite degree. 3.5. Example. For A = 1 × 1, we have A ⊗ A ≃ A × A. Hence A[2] = A = A[1] . If one was to compute A[2] ⊗ A[2] one would get A[2] × A again and misreading Definition 3.4 could lead to the false impression that A[3] is A again and that all A[n] are equal. This is not the way to compute A[3] ! One needs to compute A[2] ⊗A[1] A[2] = A ⊗A A = A = A[2] × 0 and therefore A[3] = 0. So, the tt-ring 1 × 1 has degree 2. In (3.2), it is important to perform the tensor over A[n−1] . An immediate gain of having a numerical invariant like the degree is the possibility of making proofs by induction. This will be applied in [Bal13] using the Splitting Theorem 2.4, under the following form : 3.6. Theorem. Let A be a tt-ring of finite degree d in a tt-category K. Then we have a ring isomorphism FA (A) ≃ 1A × A[2] and deg(A[2] ) = d − 1 in A - ModK . Proof. Since A[2] = A′ , this is simply Theorem 2.4 with A-algebras replaced by ttrings in A - ModK (see Remark 1.5 if necessary), together with the observation that (A[2] )[n] = A[n+1] for all n ≥ 1, which gives degA - ModK (A[2] ) = degK (A) − 1.  Before showing in Section 4 that many tt-rings have finite degree, let us build our understanding of this deg(A) ∈ N ∪ {∞}, starting with functorial properties. SPLITTING TOWER AND DEGREE OF TT-RINGS 7 3.7. Theorem. Let A be a tt-ring in K. (a) Let F : K → L be a tt-functor. Then for every n ≥ 0, we have F (A)[n] ≃ F (A[n] ) as tt-rings. In particular, deg(F (A)) ≤ deg(A). (b) Let F : K → L be a tt-functor. Suppose that F is “ weakly conservative on supp(A)”, i.e. for x ∈ Ksupp(A) if F (x) = 0 then x⊗m = 0 for m ≥ 0; for instance, if F is just conservative. Then deg(F (A)) = deg(A). (c) Suppose that B ∈ K is a tt-ring such that supp(B) ⊇ supp(A); for instance, if supp(B) = Spc(K). Then deg(A) is equal to the degree of FB (A) in B - ModK . (d) Suppose K is local and that B ∈ K is a non-zero tt-ring. Then the degree of A in K is equal to the degree of FB (A) in B - ModK . Proof. To prove (a) by induction on n, simply apply F to (3.2), which characterizes the splitting tower A[∗] . So, if deg(A) < ∞ then F (A)[deg(A)+1] ≃ F (A[deg(A)+1] ) = 0 and deg(F (A)) ≤ deg(A). For (b), recall that A[n] ∈ Ksupp(A) for every n ≥ 1 (Rem. 3.3). As deg(F (A)) =: d < ∞ implies F (A[d+1] ) ≃ F (A)[d+1] = 0 we get by weak-conservativity of F that A[d+1] is ⊗-nilpotent, hence zero (every ring object is a direct summand of its ⊗-powers via the unit). This A[d+1] = 0 means deg(A) ≤ d = deg(F (A)), which finishes (b). Then (c) follows since supp(B) ⊇ supp(A) implies that FB : K → B - ModK is weakly conservative on Ksupp(A) . Indeed, if supp(x) ⊆ supp(A) and FB (x) = 0 then B ⊗ x = UB FB (x) = 0 and ∅ = supp(B ⊗ x) = supp(B) ∩ supp(x) = supp(x), which implies that x is ⊗nilpotent. For (d), recall that a tt-category is local if x ⊗ y = 0 implies that x or y is ⊗-nilpotent. Hence for the non-zero tt-ring B, the functor FB : K → B - ModK  is weakly conservative on the whole of K and we can apply (b). Let us now describe the local nature of the degree. Recall that for every prime P ∈ Spc(K), the local category KP = (K/P)♮ at P is the idempotent completion of the Verdier quotient K/P, hence comes with a tt-functor qP : K ։ K/P ֒→ KP . 3.8. Theorem. Let A be a tt-ring in K. Suppose that qP(A) has finite degree in the local tt-category KP for every point P ∈ Spc(K). Then A has finite degree and deg(A) = max P∈Spc(K) deg(qP(A)) = max P∈supp(A) deg(qP(A)) . Proof. There exists, for every P ∈ Spc(K), an integer nP ≥ 1 such that qP(A[nP ] ) = (qP(A))[nP ] = 0. Hence P belongs to the open U(A[nP ] ) := Spc(K) − supp(A[nP ] ). Putting all those open subsets together, we cover Spc(K). But the spectrum is always quasi-compact and U(A[n] ) ⊆ U(A[n+1] ), hence there exists n ≥ 0 such that U(A[n] ) = Spc(K). This means A[n] = 0, i.e. d := deg(A) < ∞. By Theorem 3.7 (a) we have d = deg(A) ≥ maxP∈Spc(K) deg(qP(A)) ≥ maxP∈supp(A) deg(qP(A)). Since A[d] 6= 0 there exists P ∈ supp(A[d] ) ⊆ supp(A) with 0 6= qP(A[d] ) ≃ (qP(A))[d] hence deg(qP(A)) ≥ d = deg(A), wrapping up all above inequalities into equalities.  We now discuss the link between the degree and the trivial tt-ring 1. 3.9. Theorem. Let A be a tt-ring in K. Suppose K 6= 0. (a) For every n ≥ 1, we have deg(1×n ) = n. (b) For every n ≥ 1 we have FA[n] (A) ≃ 1×n × A[n+1] as tt-rings in A[n] - ModK . 8 PAUL BALMER (c) If deg(A) < ∞ then B := A[deg(A)] is non-zero and we have in B - ModK (3.10) FB (A) ≃ 1× deg(A) . (d) If a tt-functor F : K → L is weakly conservative on Ksupp(A) , see Thm. 3.7 (b), e. g. if F is conservative, and if F (A) ≃ 1×d in L then deg(A) = d. (e) Let B be a tt-ring such that FB (A) ≃ 1×d as tt-rings in B - ModK . Suppose either that supp(B) ⊇ supp(A), or that K is local and B 6= 0. Then d = deg(A). We need another additive lemma, whose naive proof (with a permutation) fails. 3.11. Lemma. Let A = 1×n . Then there exists an isomorphism h : FA (A) = ∼ A ⊗ A → A × A×(n−1) of A-algebras such that pr1 h = µ. Proof. To keep track of the various copies of 1, write A = ⊕ni=1 1i and A×(n−1) = n−1 n ⊕ℓ=1 ⊕i=1 1iℓ where 1i = 1iℓ = 1 for all i, ℓ. Then A ⊗ A = ⊕i,j 1i ⊗ 1j . Define h by mapping the summand 1i ⊗ 1i = 1 identically to 1i ֒→ A and 1i ⊗ 1j = 1 identically to 1ij ֒→ A×(n−1) when i 6= j and j ≤ n − 1 but mapping 1i ⊗ 1n = 1 diagonally n−1 ×(n−1) to ⊕ℓ=1, for all i < n. Verifications are now an exercise.  ℓ6=i 1iℓ ֒→ A Proof of Theorem 3.9. We prove (a) by induction on n. The result is clear for ×(n−1) n = 1. If A = 1×n for n ≥ 2 then Lemma 3.11 gives A[2] ≃ A×(n−1) ≃ 1A in A - ModK . By induction hypothesis applied to the tt-category A - ModK we get deg(A[2] ) = n − 1 hence the result by definition of the degree. For (b), we need to prove that there are A[n] -algebra isomorphisms A[n] ⊗ A ≃ A[n] × · · · × A[n] × A[n+1] (with n factors A[n] ). This is an easy induction on n, applying A[n+1] ⊗A[n] − and using (3.2) at each stage. Formula (3.10) follows since A[deg(A)+1] = 0. Parts (d) and (e) follow from (a) and Theorem 3.7 (b)-(d).  3.12. Corollary. Suppose that K is local and that A, B ∈ K are two tt-rings of finite degree. Then A×B and A⊗B have finite degree with deg(A×B) = deg(A)+deg(B) and deg(A ⊗ B) = deg(A) · deg(B). Proof. By Thm. 3.9 (c), there exists two tt-rings Ā 6= 0 and B̄ 6= 0 such that FĀ (A) ≃ 1× deg(A) and FB̄ (B) ≃ 1× deg(B) . Let then C̄ = Ā ⊗ B̄. Extending scalars from Ā and from B̄ to C̄ gives FC̄ (A × B) ≃ 1×(deg(A)+deg(B)) and FC̄ (A ⊗ B) ≃  1×(deg(A)·deg(B)) . Finally C̄ 6= 0 since K is local and apply Theorem 3.9 (e). 3.13. Remark. It will be clear to the interested reader that several arguments, mostly the early ones of Section 2, only depend on the property that split epimorphisms in K admit a kernel (a property which holds when K is triangulated, regardless of idempotent-completeness). The reader interested in using the degree in that generality will easily adapt our definition. However, all results which involve Spc(K), or the support supp(A), or the local categories K/P, as well as the geometric applications in [Bal13], only make sense when K is triangulated. It is nonetheless interesting to be able to speak of the degree in the generality of, say, the category of abelian groups, for instance. SPLITTING TOWER AND DEGREE OF TT-RINGS 9 4. Examples We start by quickly discussing tt-rings of minimal degree (beyond deg(0) = 0). 4.1. Proposition. Let A be a tt-ring with deg(A) = 1, i.e. such that µ : A ⊗ A → A is an isomorphism. Then A ⊗ − : K → K is a (very special) Bousfield localization with FA : K → A - ModK as (Verdier) localization. Also, Spc(A - ModK ) is homeomorphic to the open and closed subset supp(A) of Spc(K). If K is rigid, this further implies a decomposition K = K1 × K2 under which A ∼ = (1, 0). Proof. Since µ is an isomorphism, then so are its two right inverses η ⊗ 1 and 1 ⊗ η : A → A⊗2 and these inverses coincide. So, L := A ⊗ − is a Bousfield η localization (ηL = Lη is an isomorphism). Let C → 1 → A → Σ(C) be an exact triangle on η. Since, A ⊗ η is an isomorphism, we have A ⊗ C = 0. Therefore Spc(K) = supp(A) ⊔ supp(C) hence supp(A) is open and closed. Since every object x ∈ K fits in an exact triangle C ⊗ x → x → A ⊗ x → Σ(C ⊗ x), it is standard to show that the kernel of A ⊗ − is exactly the thick ⊗-ideal J := hCi generated by C ∼ and that FA induces an equivalence K/J A ) induces  −→ A - ModK . Hence Spc(F  a homeomorphism Spc(A - ModK ) ∼ = P ∈ Spc(K) J ⊆ P = P C ∈ P = U(C) = supp(A). When K is rigid, supp(A) ∩ supp(C) = ∅ forces furthermore HomK (A, ΣC) = 0, in which case the above triangle splits : 1 ≃ A ⊕ C. This gives the wanted decomposition, where K1 = A ⊗ K and K2 = C ⊗ K.  We want to show that the degree is finite in examples. Our main tool is : 4.2. Theorem. Suppose that K admits a conservative tt-functor F : K → L into a tt-category L such that every object of L is isomorphic to a sum of suspensions of 1L . (1) Then every tt-ring in K has finite degree. More precisely, if F (A) ≃ Pℓ ⊕ℓi=k Σi 1ri for rk , . . . , rℓ ∈ N then deg(A) = i=k ri . Proof. By Theorem 3.7 (b), it suffices to prove that every tt-ring A in L has Pℓ ℓ i ri as objects in L. First, let finite degree d = i=k ri , where A ≃ ⊕i=k Σ 1 [d+1] B=A . Then, by Theorem 3.9 (b), we have FB (A) ≃ 1d+1 ⊕ x in B - ModL . On the other hand FB (A) ≃ ⊕ℓi=k Σi 1ri . Therefore there is a split monomorphism 1d+1 ֌ ⊕ℓi=k Σi 1ri in B - ModL which can be described by a split injective d×(d+1)matrix with coefficients in the graded-commutative ring S • = End•B (1B ). This is impossible (by mapping to a graded residue field of S • ) unless S • = 0, that is B = 0 meaning A[d+1] = 0. Hence deg(A) ≤ d. Now, replace B by A[deg(A)] and reason as above. We now have isomorphisms FB (A) ≃ 1deg(A) and FB (A) ≃ ⊕ℓi=k Σi 1ri in B - ModL with B 6= 0. The isomorphism 1deg(A) ≃ ⊕ℓi=k Σi 1ri forces (periodicities Pℓ  Σi 1 ≃ 1 in B - ModK whenever ri 6= 0 and) deg(A) = i=k ri . 4.3. Corollary. Let X be a quasi-compact and quasi-separated scheme (e. g. an affine or a noetherian scheme). Then every tt-ring in Dperf (X) has finite degree. Proof. By Theorem 3.8, we can assume that X = Spec(R) with (R, m) local. Then, the functor Dperf (R) → Dperf (k) to the residue field k = R/m is conservative.  1Such an L is sometimes called a “field” but the author finds this definition too restrictive. Also note that the existence of such a functor F forces K to be local. 10 PAUL BALMER 4.4. Example. Let A be a separable commutative R-algebra which is projective as R-module (and finitely generated by [DI71, Prop. II.2.1]). Since A is R-flat, we can view it as the “same” tt-ring in Dperf (R). Then its degree can be computed in every residue field, hence deg(A) coincides with the rank of A as R-module. 4.5. Corollary. Let H be a finite dimensional cocommutative Hopf algebra over a field k. Then every tt-ring in the bounded derived category Db (H – mod) of finitely generated H-modules (with ⊗ = ⊗k ) has finite degree. Proof. Apply Theorem 4.2 to the fiber functor Db (H – mod) → Db (k).  4.6. Example. For any finite group G, all tt-rings in Db (kG – mod) have finite degree. For every subgroup H ≤ G, the tt-ring A = k(G/H) has finite degree deg(A) = dimk (A) = [G : H] in Db (kG – mod). Hence A has also finite degree in stab(kG) ∼ = Db (kG – mod) by Theorem 3.7 (a). However, if H < G is a strongly p-embedded Dperf (kG) ∼ ∼ subgroup then FA ∼ = ResG H is an equivalence stab(kG) −→ stab(kH) and ηA : 1 → A is an isomorphism, hence deg(A) = 1 in stab(kG). (Example : p = 2 and C2 < S3 .) 4.7. Example. Let H1 , H2 be two non-conjugate cyclic subgroups of order p in G (for instance two non-conjugate symmetries in D8 for p = 2) and consider Ai = k(G/Hi ) in K = stab(kG) as above. Then, by the Mackey formula A1 ⊗ A2 = 0. Consequently they have disjoint support and therefore both formulas of Corollary 3.12 fail in this case, showing the importance of our assumption that the category be local. Yet, one can still deduce global formulas via Theorem 3.8. 4.8. Corollary. In the stable homotopy category K = SHfin of finite (topological) spectra, every tt-ring has finite degree. ∼ b Proof. First note that the result is true in the localizations SHfin Q = D (Q – mod) and fin SHp , at zero and at each prime p. For the latter, it suffices to apply Theorem 4.2 to homology with coefficients in Z/p, which is conservative on SHfin p and takes values in Db (Z/p – mod). Now, if A is a tt-ring in SHfin , then there exists m ≥ 1 such that [m] A[m] goes to zero in SHfin , Q (since its degree is finite there). Replacing A by A fin we can assume that A itself maps to zero in SHQ , that is, A is torsion. But then A is non-zero in SHfin p for only finitely many primes p. Therefore we can find n big enough so that A[n] = 0 everywhere. Hence A[n] = 0.  Acknowledgments : It is my pleasure to thank an anonymous referee for several useful suggestions, including the one discussed in Remark 3.13 and a simplification of the proof of Corollary 4.8. References [Bal11] Paul Balmer. Separability and triangulated categories. Adv. Math., 226(5):4352–4372, 2011. [Bal12] Paul Balmer. Stacks of group representations. J. Eur. Math. Soc. (JEMS), preprint 2012. 36 pages, to appear. [Bal13] Paul Balmer. Separable extensions in tt-geometry and generalized Quillen stratification. Preprint, 14 pages, 2013. [CHR65] S. U. Chase, D. K. Harrison, and Alex Rosenberg. Galois theory and Galois cohomology of commutative rings. Mem. Amer. Math. Soc. No., 52:15–33, 1965. SPLITTING TOWER AND DEGREE OF TT-RINGS [DI71] 11 F. DeMeyer and E. Ingraham. Separable algebras over commutative rings. Lecture Notes in Mathematics, Vol. 181. Springer-Verlag, Berlin, 1971. [EM65] Samuel Eilenberg and John C. Moore. Adjoint functors and triples. Illinois J. Math., 9:381–398, 1965. [HPS97] Mark Hovey, John H. Palmieri, and Neil P. Strickland. Axiomatic stable homotopy theory. Mem. Amer. Math. Soc., 128(610), 1997. [Kle65] Heinrich Kleisli. Every standard construction is induced by a pair of adjoint functors. Proc. Amer. Math. Soc., 16:544–546, 1965. [ML98] Saunders Mac Lane. Categories for the working mathematician, volume 5 of Graduate Texts in Mathematics. Springer-Verlag, New York, 1998. Paul Balmer, Mathematics Department, UCLA, Los Angeles, CA 90095-1555, USA E-mail address: [email protected] URL: http://www.math.ucla.edu/∼balmer
0math.AC
arXiv:1706.01554v2 [cs.CV] 27 Oct 2017 Best of Both Worlds: Transferring Knowledge from Discriminative Learning to a Generative Visual Dialog Model Jiasen Lu1∗, Anitha Kannan2∗, Jianwei Yang1 , Devi Parikh3,1 , Dhruv Batra3,1 1 Georgia Institute of Technology, 2 Curai, 3 Facebook AI Research {jiasenlu, jw2yang, parikh, dbatra}@gatech.edu Abstract We present a novel training framework for neural sequence models, particularly for grounded dialog generation. The standard training paradigm for these models is maximum likelihood estimation (MLE), or minimizing the cross-entropy of the human responses. Across a variety of domains, a recurring problem with MLE trained generative neural dialog models (G) is that they tend to produce ‘safe’ and generic responses (‘I don’t know’, ‘I can’t tell’). In contrast, discriminative dialog models (D) that are trained to rank a list of candidate human responses outperform their generative counterparts; in terms of automatic metrics, diversity, and informativeness of the responses. However, D is not useful in practice since it can not be deployed to have real conversations with users. Our work aims to achieve the best of both worlds – the practical usefulness of G and the strong performance of D – via knowledge transfer from D to G. Our primary contribution is an end-to-end trainable generative visual dialog model, where G receives gradients from D as a perceptual (not adversarial) loss of the sequence sampled from G. We leverage the recently proposed Gumbel-Softmax (GS) approximation to the discrete distribution – specifically, a RNN augmented with a sequence of GS samplers, coupled with the straight-through gradient estimator to enable end-to-end differentiability. We also introduce a stronger encoder for visual dialog, and employ a self-attention mechanism for answer encoding along with a metric learning loss to aid D in better capturing semantic similarities in answer responses. Overall, our proposed model outperforms state-of-the-art on the VisDial dataset by a significant margin (2.67% on recall@10). The source code can be downloaded from https://github.com/jiasenlu/visDial.pytorch 1 Introduction One fundamental goal of artificial intelligence (AI) is the development of perceptually-grounded dialog agents – specifically, agents that can perceive or understand their environment (through vision, audio, or other sensors), and communicate their understanding with humans or other agents in natural language. Over the last few years, neural sequence models (e.g. [47, 44, 46]) have emerged as the dominant paradigm across a variety of setting and datasets – from text-only dialog [44, 40, 23, 3] to more recently, visual dialog [7, 9, 8, 33, 45], where an agent must answer a sequence of questions grounded in an image, requiring it to reason about both visual content and the dialog history. The standard training paradigm for neural dialog models is maximum likelihood estimation (MLE) or equivalently, minimizing the cross-entropy (under the model) of a ‘ground-truth’ human response. Across a variety of domains, a recurring problem with MLE trained neural dialog models is that they tend to produce ‘safe’ generic responses, such as ‘Not sure’ or ‘I don’t know’ in text-only dialog [23], and ‘I can’t see’ or ‘I can’t tell’ in visual dialog [7, 8]. One reason for this emergent behavior is that ∗ Work was done while at Facebook AI Research. the space of possible next utterances in a dialog is highly multi-modal (there are many possible paths a dialog may take in the future). In the face of such highly multi-modal output distributions, models ‘game’ MLE by latching on to the head of the distribution or the frequent responses, which by nature tend to be generic and widely applicable. Such safe generic responses break the flow of a dialog and tend to disengage the human conversing with the agent, ultimately rendering the agent useless. It is clear that novel training paradigms are needed; that is the focus of this paper. One promising alternative to MLE training proposed by recent work [36, 27] is sequence-level training of neural sequence models, specifically, using reinforcement learning to optimize taskspecific sequence metrics such as BLEU [34], ROUGE [24], CIDEr [48]. Unfortunately, in the case of dialog, all existing automatic metrics correlate poorly with human judgment [26], which renders this alternative infeasible for dialog models. In this paper, inspired by the success of adversarial training [16], we propose to train a generative visual dialog model (G) to produce sequences that score highly under a discriminative visual dialog model (D). A discriminative dialog model receives as input a candidate list of possible responses and learns to sort this list from the training dataset. The generative dialog model (G) aims to produce a sequence that D will rank the highest in the list, as shown in Fig. 1. Note that while our proposed approach is inspired by adversarial training, there are a number of subtle but crucial differences over generative adversarial networks (GANs). Unlike traditional GANs, one novelty in our setup is that our discriminator receives a list of candidate responses and explicitly learns to reason about similarities and differences across candidates. In this process, D learns a task-dependent perceptual similarity [12, 19, 15] and learns to recognize multiple correct responses in the feature space. For example, as shown in Fig. 1 right, given the image, dialog history, and question ‘Do you see any bird?’, besides the ground-truth answer ‘No, I do not’, D can also assign high scores to other options that are valid responses to the question, including the one generated by G: ‘Not that I can see’. The interaction between responses is captured via the similarity between the learned embeddings. This similarity gives an additional signal that G can leverage in addition to the MLE loss. In that sense, our proposed approach may be viewed as an instance of ‘knowledge transfer’ [17, 5] from D to G. We employ a metric-learning loss function and a self-attention answer encoding mechanism for D that makes it particularly conducive to this knowledge transfer by encouraging perceptually meaningful similarities to emerge. This is especially fruitful since prior work has demonstrated that discriminative dialog models significantly outperform their generative counterparts, but are not as useful since they necessarily need a list of candidate responses to rank, which is only available in a dialog dataset, not in real conversations with a user. In that context, our work aims to achieve the best of both worlds – the practical usefulness of G and the strong performance of D – via this knowledge transfer. Our primary technical contribution is an end-to-end trainable generative visual dialog model, where the generator receives gradients from the discriminator loss of the sequence sampled from G. Note that this is challenging because the output of G is a sequence of discrete symbols, which naïvely is not amenable to gradient-based training. We propose to leverage the recently proposed Gumbel-Softmax (GS) approximation to the discrete distribution [18, 30] – specifically, a Recurrent Neural Network (RNN) augmented with a sequence of GS samplers, which when coupled with the straight-through gradient estimator [2, 18] enables end-to-end differentiability. Our results show that our ‘knowledge transfer’ approach is indeed successful. Specifically, our discriminator-trained G outperforms the MLE-trained G by 1.7% on recall@5 on the VisDial dataset, essentially improving over state-of-the-art [7] by 2.43% recall@5 and 2.67% recall@10. Moreover, our generative model produces more diverse and informative responses (see Table 3). As a side contribution specific to this application, we introduce a novel encoder for neural visual dialog models, which maintains two separate memory banks – one for visual memory (where do we look in the image?) and another for textual memory (what facts do we know from the dialog history?), and outperforms the encoders used in prior work. 2 Related Work GANs for sequence generation. Generative Adversarial Networks (GANs) [16] have shown to be effective models for a wide range of applications involving continuous variables (e.g. images) c.f [10, 35, 22, 55]. More recently, they have also been used for discrete output spaces such as language generation – e.g. image captioning [6, 41], dialog generation [23], or text generation [53] – by either viewing the generative model as a stochastic parametrized policy that is updated using REINFORCE 2 Generator Do you see any birds? Question Qt A gray tiger cat sitting underneath a metal bench. Answer Decoder 𝑒" Is it in color? Yes it is. Is it day time? Yes. Is the tiger big? No, it’s a regular cat. HCIAE Encoder No bird I do not see any birds No No , I do not Answer Encoder 𝑓(𝑎) Nope … yes Mangoes White I see small shops t rounds of history HQI No bird I do not see any birds Image I Option answers (D) Not that I can see HCIAE Encoder Deep Metric Loss Gumbel Sampler Discriminator 𝑎∗ Score No No , I do not No , Nope Not that I can see yes … … Mangoes 𝑒" White I see small shops HQI HQI Figure 1: Model architecture of the proposed model. Given the image, history, and question, the discriminator receives as additional input a candidate list of possible responses and learns to sort this list. The generator aims to produce a sequence that discriminator will rank the highest in the list. The right most block is D’s score for different candidate answers. Note that the multiple plausible responses all score high. Image from the COCO dataset [25]. with the discriminator providing the reward [53, 6, 41, 23], or (closer to our approach) through continuous relaxation of discrete variables through Gumbel-Softmax to enable backpropagating the response from the discriminator [21, 41]. There are a few subtle but significant differences w.r.t. to our application, motivation, and approach. In these prior works, both the discriminator and the generator are trained in tandem, and from scratch. The goal of the discriminator in those settings has primarily been to discriminate ‘fake’ samples (i.e. generator’s outputs) from ‘real’ samples (i.e. from training data). In contrast, we would like to transfer knowledge from the discriminator to the generator. We start with pre-trained D and G models suited for the task, and then transfer knowledge from D to G to further improve G, while keeping D fixed. As we show in our experiments, this procedure results in G producing diverse samples that are close in the embedding space to the ground truth, due to perceptual similarity learned in D. One can also draw connections between our work and Energy Based GAN (EBGAN) [54] – without the adversarial training aspect. The “energy” in our case is a deep metric-learning based scoring mechanism, instantiated in the visual dialog application. Modeling image and text attention. Models for tasks at the intersection of vision and language – e.g., image captioning [11, 13, 20, 49], visual question answering [1, 14, 31, 37], visual dialog [7, 9, 8, 45, 33] – typically involve attention mechanisms. For image captioning, this may be attending to relevant regions in the image [49, 51, 28]. For VQA, this may be attending to relevant image regions alone [4, 50, 52] or co-attending to image regions and question words/phrases [29]. In the context of visual dialog, [7] uses attention to identify utterances in the dialog history that may be useful for answering the current question. However, when modeling the image, the entire image embedding is used to obtain the answer. In contrast, our proposed encoder HCIAE (Section 4.1) localizes the region in the image that can help reliably answer the question. In particular, in addition to the history and the question guiding the image attention, our visual dialog encoder also reasons about the history when identifying relevant regions of the image. This allows the model to implicitly resolve co-references in the text and ground them back in the image. 3 Preliminaries: Visual Dialog We begin by formally describing the visual dialog task setup as introduced by Das et al. [7]. The machine learning task is as follows. A visual dialog model is given as input an image I, caption c describing the image, a dialog history till round t − 1, H = ( c , (q1 , a1 ), . . . , (qt−1 , at−1 )), and |{z} | {z } | {z } H0 H1 Ht−1 the followup question qt at round t. The visual dialog agent needs to return a valid response to the question. Given the problem setup, there are two broad classes of methods – generative and discriminative models. Generative models for visual dialog are trained by maximizing the log-likelihood of the ground truth answer sequence agt t ∈ At given the encoded representation of the input (I, H, qt ). 3 On the other hand, discriminative models receive both an encoding of the input (I, H, qt ) and as (1) (100) additional input a list of 100 candidate answers At = {at , . . . , at }. These models effectively learn to sort the list. Thus, by design, they cannot be used at test time without a list of candidates available. 4 Approach: Backprop Through Discriminative Losses for Generative Training In this section, we describe our approach to transfer knowledge from a discriminative visual dialog model (D) to generative visual dialog model (G). Fig. 1 (a) shows the overview of our approach. Given the input image I, dialog history H, and question qt , the encoder converts the inputs into a joint representation et . The generator G takes et as input, and produces a distribution over answer sequences via a recurrent neural network (specifically an LSTM). At each word in the answer sequence, we use a Gumbel-Softmax sampler S to sample the answer token from that distribution. The discriminator D in it’s standard form takes et , ground-truth answer agt t and N − 1 “negative” gt N −1 answers {a− } as input, and learns an embedding space such that similarity(e t , f (at )) > t,i i=1 − similarity(et , f (at,· )), where f (·) is the embedding function. When we enable the communication between D and G, we feed the sampled answer ât into discriminator, and optimize the generator G to produce samples that get higher scores in D’s metric space. We now describe each component of our approach in detail. 4.1 History-Conditioned Image Attentive Encoder (HCIAE) … An important characteristic in dialogs is the use of co-reference to avoid repeating entities that can be contextually resolved. In fact, in the VisDial dataset [7] nearly all (98%) dialogs involve at least one pronoun. This means that for a model to correctly answer a question, it would require a reliable mechanism for co-reference resolution. A common approach is to use an encoder architecture with an attention mechanism that implicitly performs co-reference resolution by identifying the portion of the dialog history that can help in answering the current question [7, 38, 39, 32]. while using a holistic representation for the image. Intuitively, one would also expect that the answer is also localized to regions in the image, and be consistent with the attended history. With this motivation, we propose a novel encoder architecture (called HCIAE) shown in Fig. 2. Our encoder first uses the current question to attend to the exchanges in the history, and then use the question and attended history to attend to the image, so as to obtain the final encoding. Specifically, we use the spatial image features V ∈ Rd×k from a convolution layer of a CNN. qt is encoded with an LSTM to get a vector mqt ∈ CNN 𝐼 Rd . Simultaneously, each previous round of history (H0 , . . . , Ht−1 ) is encoded separately with another LSTM 𝑄" LSTM as Mth ∈ Rd×t . Conditioned on the question embedding, the model attends to the history. The at𝑒" tended representation of the history and the question LSTM 𝐻$ embedding are concatenated, and used as input to attend to the image: LSTM 𝐻"%& αht = softmax(zth ) (2) … = waT tanh(Wh Mth + (Wq mqt )1T ) (1) … … zth Encoder Figure 2: Structure of the proposed encoder. where 1 ∈ R is a vector with all elements set to 1. Wh , Wq ∈ Rt×d and wa ∈ Rk are parameters to be learned. α ∈ Rk is the attention weight over history. The attended history feature m̂ht is a convex combination of columns of Mt , weighted appropriately by the elements of αth . We further concatenate mqt and m̂ht as the query vector and get the attended image feature v̂t in the similar manner. Subsequently, all three components are used to obtain the final embedding et : t et = tanh(We [mqt , m̂ht , vˆt ]) where We ∈ Rd×3d is weight parameters and [·] is the concatenation operation. 4 (3) 4.2 Discriminator Loss Discriminative visual dialog models produce a distribution over the candidate answer list At and maximize the log-likelihood of the correct option agt t . The loss function for D needs to be conducive for knowledge transfer. In particular, it needs to encourage perceptually meaningful similarities. Therefore, we use a metric-learning multi-class N-pair loss [43] defined as: logistic loss z   − N −1 LD = Ln−pair {et , agt t , {at,i }i=1 }, f = log 1 + N X }|  gt − > exp e> t f (at,i ) − et f (at ) | {z } i=1  !{ (4) score margin where f is an attention based LSTM encoder for the answer. This attention can help the discriminator better deal with paraphrases across answers. The attention weight is learnt through a 1-layer MLP over LSTM output at each time step. The N-pair loss objective encourages learning a space in which the ground truth answer is scored higher than other options, and at the same time, encourages options similar to ground truth answers to score better than dissimilar ones. This means that, unlike the multiclass logistic loss, the options that are correct but different from the correct option may not be overly penalized, and thus can be useful in providing a reliable signal to the generator. See Fig. 1 for an example. Follwing [43], we regularize the L2 norm of the embedding vectors to be small. 4.3 Discriminant Perceptual Loss and Knowledge Transfer from D to G At a high-level, our approach for transferring knowledge from D to G is as follows: G repeatedly queries D with answers ât that it generates for an input embedding et to get feedback and update itself. In each such update, G’s goal is to update its parameters to try and have ât score higher than the correct answer, agt t , under D’s learned embedding and scoring function. Formally, the perceptual loss that G aims to optimize is given by:      gt > > LG = L1−pair {et , ât , agt }, f = log 1 + exp e f (a ) − e f (â ) (5) t t t t t where f is the embedding function learned by the discriminator as in (4). Intuitively, updating generator parameters to minimize LG can be interpreted as learning to produce an answer sequence ât that ‘fools’ the discriminator into believing that this answer should score higher than the human response agt t under the discriminator’s learned embedding f (·) and scoring function. While it is straightforward to sample an answer ât from the generator and perform a forward pass through the discriminator, naïvely, it is not possible to backpropagate the gradients to the generator parameters since sampling discrete symbols results in zero gradients w.r.t. the generator parameters. To overcome this, we leverage the recently introduced continuous relaxation of the categorical distribution – the Gumbel-softmax distribution or the Concrete distribution [18, 30]. At an intuitive level, the Gumbel-Softmax (GS) approximation uses the so called ‘Gumbel-Max trick’ to reparametrize sampling from a categorical distribution and replaces argmax with softmax to obtain a continuous relaxation of the discrete random variable. Formally, let x denote a K-ary categorical K random variable with parameters denoted by (p1 , . . . pK ), or x ∼ Cat(p). Let gi 1 denote K −g IID samples from the standard Gumbel distribution, gi ∼ F (g) = e−e . Now, a sample from the Concrete distribution can be produced via the following transformation: e(log pi +gi )/τ yi = PK (log p +g ) j j /τ j=1 e ∀i ∈ {1, . . . , K} (6) where τ is a temperature parameter that control how close samples y from this Concrete distribution approximate the one-hot encoding of the categorical variable x. As illustrated in Fig. 1, we augment the LSTM in G with a sequence of GS samplers. Specifically, at each position in the answer sequence, we use a GS sampler to sample an answer token from that conditional distribution. When coupled with the straight-through gradient estimator [2, 18] this enables end-to-end differentiability. Specifically, during the forward pass we discretize the GS samples into discrete samples, and in the backward pass use the continuous relaxation to compute gradients. In our experiments, we held the temperature parameter fixed at 0.5. 5 5 Experiments Dataset and Setup. We evaluate our proposed approach on the VisDial dataset [7], which was collected by Das et al. by pairing two subjects on Amazon Mechanical Turk to chat about an image. One person was assigned the role of a ‘questioner’ and the other of ‘answerer’. One worker (the questioner) sees only a single line of text describing an image (caption from COCO [25]); the image remains hidden to the questioner. Their task is to ask questions about this hidden image to “imagine the scene better”. The second worker (the answerer) sees the image and caption and answers the questions. The two workers take turns asking and answering questions for 10 rounds. We perform experiments on VisDial v0.9 (the latest available release) containing 83k dialogs on COCO-train and 40k on COCO-val images, for a total of 1.2M dialog question-answer pairs. We split the 83k into 82k for train, 1k for val, and use the 40k as test, in a manner consistent with [7]. The caption is considered to be the first round in the dialog history. Evaluation Protocol. Following the evaluation protocol established in [7], we use a retrieval setting to evaluate the responses at each round in the dialog. Specifically, every question in VisDial is coupled with a list of 100 candidate answer options, which the models are asked to sort for evaluation purposes. D uses its score to rank these answer options, and G uses the log-likelihood of these options for ranking. Models are evaluated on standard retrieval metrics – (1) mean rank, (2) recall @k, and (3) mean reciprocal rank (MRR) – of the human response in the returned sorted list. Pre-processing. We truncate captions/questions/answers longer than 24/16/8 words respectively. We then build a vocabulary of words that occur at least 5 times in train, resulting in 8964 words. Training Details In our experiments, all 3 LSTMs are single layer with 512d hidden state. We use VGG-19 [42] to get the representation of image. We first rescale the images to be 224 × 224 pixels, and take the output of last pooling layer (512 × 7 × 7) as image feature. We use the Adam optimizer with a base learning rate of 4e-4. We pre-train G using standard MLE for 20 epochs, and D with supervised training based on Eq (4) for 30 epochs. Following [43], we regularize the L2 norm of the embedding vectors to be small. Subsequently, we train G with LG + αLM LE , which is a combination of discriminative perceptual loss and MLE loss. We set α to be 0.5. We found that including LM LE (with teacher-forcing) is important for encouraging G to generate grammatically correct responses. 5.1 Results and Analysis Baselines. We compare our proposed techniques to the current state-of-art generative and discriminative models developed in [7]. Specifically, [7] introduced 3 encoding architectures – Late Fusion (LF), Hierarchical Recurrent Encoder (HRE), Memory Network (MN) – each trained with a generative (-G) and discriminative (-D) decoder. We compare to all 6 models. Our approaches. We present a few variants of our approach to systematically study the individual contributions of our training procedure, novel encoder (HCIAE), self-attentive answer encoding (ATT), and metric-loss (NP). • HCIAE-G-MLE is a generative model with our proposed encoder trained under the MLE objective. Comparing this variant to the generative baselines from [7] establishes the improvement due to our encoder (HCIAE). • HCIAE-G-DIS is a generative model with our proposed encoder trained under the mixed MLE and discriminator loss (knowledge transfer). This forms our best generative model. Comparing this model to HCIAE-G-MLE establishes the improvement due to our discriminative training. • HCIAE-D-MLE is a discriminative model with our proposed encoder, trained under the standard discriminative cross-entropy loss. The answer candidates are encoded using an LSTM (no attention). Comparing this variant to the discriminative baselines from [7] establishes the improvement due to our encoder (HCIAE) in the discriminative setting. • HCIAE-D-NP is a discriminative model with our proposed encoder, trained under the n-pair discriminative loss (as described in Section 4.2). The answer candidates are encoded using an LSTM (no attention). Comparing this variant to HCIAE-D-MLE establishes the improvement due to the n-pair loss. • HCIAE-D-NP-ATT is a discriminative model with our proposed encoder, trained under the n-pair discriminative loss (as described in Section 4.2), and using the self-attentive answer encoding. Comparing this variant to HCIAE-D-NP establishes the improvement due to the self-attention mechanism while encoding the answers. 6 Table 1: Results (generative) on VisDial dataset. “MRR” Table 2: Results (discriminative) on VisDial dataset. is mean reciprocal rank and “Mean” is mean rank. Model MRR R@1 R@5 R@10 Mean Model MRR R@1 R@5 R@10 Mean LF-D [7] 0.5807 43.82 74.68 84.07 5.78 0.5868 44.82 74.81 84.36 5.66 LF-G [7] 0.5199 41.83 61.78 67.59 17.07 HREA-D [7] 0.5965 45.55 76.22 85.37 5.46 HREA-G [7] 0.5242 42.28 62.33 68.17 16.79 MN-D [7] MN-G [7] 0.5259 42.29 62.85 68.88 17.06 HCIAE-D-MLE 0.6140 47.73 77.50 86.35 5.15 0.6182 47.98 78.35 87.16 4.92 HCIAE-G-MLE 0.5386 44.06 63.55 69.24 16.01 HCIAE-D-NP HCIAE-G-DIS 0.5467 44.35 65.28 71.55 14.23 HCIAE-D-NP-ATT 0.6222 48.48 78.75 87.59 4.81 Results. Tables 1, 2 present results for all our models and baselines in generative and discriminative settings. The key observations are: 1. Main Results for HCIAE-G-DIS: Our final generative model with all ‘bells and whistles’, HCIAE-G-DIS, uniformly performs the best under all the metrics, outperforming the previous state-of-art model MN-G by 2.43% on R@5. This shows the importance of the knowledge transfer from the discriminator and the benefit from our encoder architecture. 2. Knowledge transfer vs. encoder for G: To understand the relative importance of the proposed history conditioned image attentive encoder (HCIAE) and the knowledge transfer, we compared the performance of HCIAE-G-DIS with HCIAE-G-MLE, which uses our proposed encoder but without any feedback from the discriminator. This comparison highlights two points: first, HCIAE-G-MLE improves R@5 by 0.7% over the current state-of-art method (MN-D) confirming the benefits of our encoder. Secondly, and importantly, its performance is lower than HCIAE-G-DIS by 1.7% on R@5, confirming that the modifications to encoder alone will not be sufficient to gain improvements in answer generation; knowledge transfer from D greatly improves G. 3. Metric loss vs. self-attentive answer encoding: In the purely discriminative setting, our final discriminative model (HCIAE-D-NP-ATT) also beats the performance of the corresponding state-of-art models [7] by 2.53% on R@5. The n-pair loss used in the discriminator is not only helpful for knowledge transfer but it also improves the performance of the discriminator by 0.85% on R@5 (compare HCIAE-D-NP to HCIAE-D-MLE). The improvements obtained by using the answer attention mechanism leads to an additional, albeit small, gains of 0.4% on R@5 to the discriminator performance (compare HCIAE-D-NP to HCIAE-D-NP-ATT). 5.2 Does updating discriminator help? Recall that our model training happens as follows: we independently train the generative model HCIAE-G-MLE and the discriminative model HCIAE-D-NP-ATT. With HCIAE-G-MLE as the initialization, the generative model is updated based on the feedback from HCIAE-D-NP-ATT and this results in our final HCIAE-G-DIS. We performed two further experiments to answer the following questions: • What happens if we continue training HCIAE-D-NP-ATT in an adversarial setting? In particular, we continue training by maximizing the score of the ground truth answer agt t and minimizing the score of the generated answer ât , effectively setting up an adversarial training regime LD = −LG . The resulting discriminator HCIAE-GAN1 has significant drop in performance, as can be seen in Table. 4 (32.97% R@5). This is perhaps expected because HCIAE-GAN1 updates its parameters based on only two answers, the ground truth and the generated sample (which is likely to be similar to ground truth). This wrecks the structure that HCIAE-D-NP-ATT had previously learned by leveraging additional incorrect options. • What happens if we continue structure-preserving training of HCIAE-D-NP-ATT? In addition to providing HCIAE-D-NP-ATT samples from G as fake answers, we also include incorrect options as negative answers so that the structure learned by the discriminator is preserved. HCIAE-D-NP-ATT continues to train under loss LD . In this case (HCIAE-GAN2 in Table. 4), we find that there is a small improvement in the performance of G. The additional computational overhead to training the discriminator supersedes the performance improvement. Also note that HCIAE-D-NP-ATT itself gets worse at the dialog task. 7 Table 3: Qualitative comparison. “Ours” are samples from G-DIS model with different gumbel noise z. Images from the COCO dataset [25]. Q: Is it a home or restaurant? A: I think restaurant. G-MLE: I can’t tell. Ours (z1): Hard to say. Ours (z2): It looks like a restaurant. Ours (z3): I can’t tell because it is too close. Q: Can you see his face? A: I am not sure. G-MLE: Yes. Ours (z1): I can only see the back of his body. Ours (z2): No. Ours (z3): No , he’s too far away. Q: How old does the man seem to be? A: 20’s. G-MLE: Late teens. Ours (z1): On his 20s. Ours (z2): In his twenties. Ours (z3): Mid 20’s. Q: Can you see broccoli? A: Yes, 3 larger pieces and some small. G-MLE: No, just the broccoli. Ours (z1): I can see broccoli, slightly butter. Ours (z2): Yes, there is broccoli. Ours (z3): Yes, broccoli is green. Table 4: Adversarial training results on VisDial dataset. Discriminative Generative Model MRR R@1 R@5 R@10 Mean MRR R@1 R@5 R@10 Mean HCIAE-D-NP-ATT HCIAE-G-DIS 0.6222 - 48.48 - 78.75 - 87.59 - 4.81 - 0.5467 44.35 65.28 71.55 14.23 HCIAE-GAN1 HCIAE-GAN2 0.2177 0.6050 8.82 46.20 32.97 77.92 52.14 87.20 18.53 4.97 0.5298 0.5459 43.12 44.33 62.74 65.05 68.58 71.40 16.25 14.34 One might wonder, why not train a GAN for visual dialog? Formulating the task in a GAN setting would involve G and D training in tandem with D providing feedback as to whether a response that G generates is real or fake. We found this to be a particularly unstable setting, for two main reasons: First, consider the case when the ground truth answer and the generated answers are the same. This happens for answers that are typically short or ‘cryptic’ (e.g. ‘yes’). In this case, D can not train itself or provide feedback, as the answer is labeled both positive and negative. Second, in cases where the ground truth answer is descriptive but the generator provides a short answer, D can quickly become powerful enough to discard generated samples as fake. In this case, D is not able to provide any information to G to get better at the task. Our experience suggests that the discriminator, if one were to consider a ‘GANs for visual dialog’ setting, can not merely be focused on differentiating fake from real. It needs to be able to score similarity between the ground truth and other answers. Such a scoring mechanism provides a more reliable feedback to G. In fact, as we show in the previous two results, a pre-trained D that captures this structure is the key ingredient in sharing knowledge with G. The adversarial training of D is not central. 5.3 Qualitative Comparison In Table 3 we present a couple of qualitative examples that compares the responses generated by G-MLE and G-DIS. G-MLE predominantly produces ‘safe’ and less informative answers, such as ‘Yes’ and or ‘I can’t tell’. In contrast, our proposed model G-DIS does so less frequently, and often generates more diverse yet informative responses. 6 Conclusion Generative models for (visual) dialog are typically trained with an MLE objective. As a result, they tend to latch on to safe and generic responses. Discriminative (or retrieval) models on the other hand have been shown to significantly outperform their generative counterparts. However, discriminative models can not be deployed as dialog agents with a real user where canned candidate responses are not available. In this work, we propose transferring knowledge from a powerful discriminative visual dialog model to a generative model. We leverage the Gumbel-Softmax (GS) approximation to the discrete distribution –specifically, a RNN augmented with a sequence of GS samplers, coupled with a ST gradient estimator for end-to-end differentiability. We also propose a novel visual dialog encoder that reasons about image-attention informed by the history of the dialog; and employ a metric learning loss along with a self-attentive answer encoding to enable the discriminator to learn meaningful structure in dialog responses. The result is a generative visual dialog model that significantly outperforms state-of-the-art. 8 References [1] Stanislaw Antol, Aishwarya Agrawal, Jiasen Lu, Margaret Mitchell, Dhruv Batra, C Lawrence Zitnick, and Devi Parikh. Vqa: Visual question answering. In Proceedings of the IEEE International Conference on Computer Vision, pages 2425–2433, 2015. [2] Yoshua Bengio, Nicholas Léonard, and Aaron C. Courville. Estimating or propagating gradients through stochastic neurons for conditional computation. CoRR, abs/1308.3432, 2013. [3] Antoine Bordes and Jason Weston. arXiv:1605.07683, 2016. Learning end-to-end goal-oriented dialog. arXiv preprint [4] Kan Chen, Jiang Wang, Liang-Chieh Chen, Haoyuan Gao, Wei Xu, and Ram Nevatia. Abc-cnn: An attention based convolutional neural network for visual question answering. arXiv preprint arXiv:1511.05960, 2015. [5] Tianqi Chen, Ian Goodfellow, and Jonathon Shlens. Net2net: Accelerating learning via knowledge transfer. arXiv preprint arXiv:1511.05641, 2015. [6] Bo Dai, Dahua Lin, Raquel Urtasun, and Sanja Fidler. Towards diverse and natural image descriptions via a conditional gan. arXiv preprint arXiv:1703.06029, 2017. [7] Abhishek Das, Satwik Kottur, Khushi Gupta, Avi Singh, Deshraj Yadav, José M.F. Moura, Devi Parikh, and Dhruv Batra. Visual Dialog. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2017. [8] Abhishek Das, Satwik Kottur, José MF Moura, Stefan Lee, and Dhruv Batra. Learning cooperative visual dialog agents with deep reinforcement learning. arXiv preprint arXiv:1703.06585, 2017. [9] Harm de Vries, Florian Strub, Sarath Chandar, Olivier Pietquin, Hugo Larochelle, and Aaron Courville. Guesswhat?! visual object discovery through multi-modal dialogue. arXiv preprint arXiv:1611.08481, 2016. [10] Emily L. Denton, Soumith Chintala, Arthur Szlam, and Robert Fergus. Deep generative image models using a laplacian pyramid of adversarial networks. Neural Information Processing Systems, 2015. [11] Jeff Donahue, Lisa Anne Hendricks, Sergio Guadarrama, Marcus Rohrbach, Subhashini Venugopalan, Kate Saenko, and Trevor Darrell. Long-term Recurrent Convolutional Networks for Visual Recognition and Description. In CVPR, 2015. [12] Alexey Dosovitskiy and Thomas Brox. Generating images with perceptual similarity metrics based on deep networks. In Advances in Neural Information Processing Systems, pages 658–666, 2016. [13] Hao Fang, Saurabh Gupta, Forrest N. Iandola, Rupesh Kumar Srivastava, Li Deng, Piotr Dollár, Jianfeng Gao, Xiaodong He, Margaret Mitchell, John C. Platt, C. Lawrence Zitnick, and Geoffrey Zweig. From Captions to Visual Concepts and Back. In CVPR, 2015. [14] Haoyuan Gao, Junhua Mao, Jie Zhou, Zhiheng Huang, Lei Wang, and Wei Xu. Are you talking to a machine? dataset and methods for multilingual image question answering. In NIPS, 2015. [15] Leon A Gatys, Alexander S Ecker, and Matthias Bethge. A neural algorithm of artistic style. arXiv preprint arXiv:1508.06576, 2015. [16] Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in neural information processing systems, pages 2672–2680, 2014. [17] Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015. [18] Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterization with gumbel-softmax. arXiv preprint arXiv:1611.01144, 2016. [19] Justin Johnson, Alexandre Alahi, and Li Fei-Fei. Perceptual losses for real-time style transfer and super-resolution. In European Conference on Computer Vision, pages 694–711. Springer, 2016. [20] Andrej Karpathy and Li Fei-Fei. Deep visual-semantic alignments for generating image descriptions. In CVPR, 2015. [21] Matt J. Kusner and José Miguel Hernández-Lobato. Gans for sequences of discrete elements with the gumbel-softmax distribution. CoRR, abs/1611.04051, 2016. [22] Christian Ledig, Lucas Theis, Ferenc Huszar, Jose Caballero, Andrew P. Aitken, Alykhan Tejani, Johannes Totz, Zehan Wang, and Wenzhe Shi. Photo-realistic single image super-resolution using a generative adversarial network. CoRR, abs/1609.04802, 2016. [23] Jiwei Li, Will Monroe, Tianlin Shi, Alan Ritter, and Dan Jurafsky. Adversarial learning for neural dialogue generation. arXiv preprint arXiv:1701.06547, 2017. [24] Chin-Yew Lin. Rouge: A package for automatic evaluation of summaries. In ACL 2004 Workshop, 2004. 9 [25] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollár, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In European Conference on Computer Vision, pages 740–755. Springer, 2014. [26] Chia-Wei Liu, Ryan Lowe, Iulian V Serban, Michael Noseworthy, Laurent Charlin, and Joelle Pineau. How not to evaluate your dialogue system: An empirical study of unsupervised evaluation metrics for dialogue response generation. arXiv preprint arXiv:1603.08023, 2016. [27] Siqi Liu, Zhenhai Zhu, Ning Ye, Sergio Guadarrama, and Kevin Murphy. Optimization of image description metrics using policy gradient methods. arXiv preprint arXiv:1612.00370, 2016. [28] Jiasen Lu, Caiming Xiong, Devi Parikh, and Richard Socher. Knowing when to look: Adaptive attention via A visual sentinel for image captioning. CoRR, abs/1612.01887, 2016. [29] Jiasen Lu, Jianwei Yang, Dhruv Batra, and Devi Parikh. Hierarchical question-image co-attention for visual question answering. In Advances In Neural Information Processing Systems, pages 289–297, 2016. [30] Chris J Maddison, Andriy Mnih, and Yee Whye Teh. The concrete distribution: A continuous relaxation of discrete random variables. arXiv preprint arXiv:1611.00712, 2016. [31] Mateusz Malinowski, Marcus Rohrbach, and Mario Fritz. Ask your neurons: A neural-based approach to answering questions about images. In ICCV, 2015. [32] Hongyuan Mei, Mohit Bansal, and Matthew R Walter. Coherent dialogue with attention-based language models. arXiv preprint arXiv:1611.06997, 2016. [33] Nasrin Mostafazadeh, Chris Brockett, Bill Dolan, Michel Galley, Jianfeng Gao, Georgios P Spithourakis, and Lucy Vanderwende. Image-grounded conversations: Multimodal context for natural question and response generation. arXiv preprint arXiv:1701.08251, 2017. [34] Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. Bleu: a method for automatic evaluation of machine translation. In ACL, 2002. [35] Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. CoRR, abs/1511.06434, 2015. [36] Marc’Aurelio Ranzato, Sumit Chopra, Michael Auli, and Wojciech Zaremba. Sequence level training with recurrent neural networks. arXiv preprint arXiv:1511.06732, 2015. [37] Mengye Ren, Ryan Kiros, and Richard Zemel. Exploring models and data for image question answering. In NIPS, 2015. [38] Iulian V Serban, Alessandro Sordoni, Yoshua Bengio, Aaron Courville, and Joelle Pineau. Building end-to-end dialogue systems using generative hierarchical neural network models. arXiv preprint arXiv:1507.04808, 2015. [39] Iulian Vlad Serban, Alessandro Sordoni, Ryan Lowe, Laurent Charlin, Joelle Pineau, Aaron Courville, and Yoshua Bengio. A hierarchical latent variable encoder-decoder model for generating dialogues. arXiv preprint arXiv:1605.06069, 2016. [40] Iulian Vlad Serban, Alessandro Sordoni, Ryan Lowe, Laurent Charlin, Joelle Pineau, Aaron Courville, and Yoshua Bengio. A hierarchical latent variable encoder-decoder model for generating dialogues. In Thirty-First AAAI Conference on Artificial Intelligence, 2017. [41] Rakshith Shetty, Marcus Rohrbach, Lisa Anne Hendricks, Mario Fritz, and Bernt Schiele. Speaking the same language: Matching machine to human captions by adversarial training. CoRR, abs/1703.10476, 2017. [42] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. [43] Kihyuk Sohn. Improved deep metric learning with multi-class n-pair loss objective. In Advances in Neural Information Processing Systems, pages 1849–1857, 2016. [44] Alessandro Sordoni, Michel Galley, Michael Auli, Chris Brockett, Yangfeng Ji, Margaret Mitchell, JianYun Nie, Jianfeng Gao, and Bill Dolan. A neural network approach to context-sensitive generation of conversational responses. arXiv preprint arXiv:1506.06714, 2015. [45] Florian Strub, Harm de Vries, Jeremie Mary, Bilal Piot, Aaron Courville, and Olivier Pietquin. End-to-end optimization of goal-driven and visually grounded dialogue systems. arXiv preprint arXiv:1703.05423, 2017. [46] Sainbayar Sukhbaatar, Jason Weston, Rob Fergus, et al. End-to-end memory networks. In Advances in neural information processing systems, pages 2440–2448, 2015. [47] Ilya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence to sequence learning with neural networks. In Advances in neural information processing systems, pages 3104–3112, 2014. [48] Ramakrishna Vedantam, C Lawrence Zitnick, and Devi Parikh. Cider: Consensus-based image description evaluation. In CVPR, 2015. 10 [49] Oriol Vinyals, Alexander Toshev, Samy Bengio, and Dumitru Erhan. Show and tell: A neural image caption generator. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3156–3164, 2015. [50] Huijuan Xu and Kate Saenko. Ask, attend and answer: Exploring question-guided spatial attention for visual question answering. In European Conference on Computer Vision, pages 451–466. Springer, 2016. [51] Kelvin Xu, Jimmy Ba, Ryan Kiros, Kyunghyun Cho, Aaron C. Courville, Ruslan Salakhutdinov, Richard S. Zemel, and Yoshua Bengio. Show, attend and tell: Neural image caption generation with visual attention. CoRR, abs/1502.03044, 2015. [52] Zichao Yang, Xiaodong He, Jianfeng Gao, Li Deng, and Alex Smola. Stacked attention networks for image question answering. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 21–29, 2016. [53] Lantao Yu, Weinan Zhang, Jun Wang, and Yong Yu. Seqgan: Sequence generative adversarial nets with policy gradient. AAAI Conference on Artificial Intelligence, 2017. [54] Junbo Jake Zhao, Michaël Mathieu, and Yann LeCun. Energy-based generative adversarial network. CoRR, abs/1609.03126, 2016. [55] Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. arXiv preprint arXiv:1703.10593, 2017. 11
7cs.IT
A Dual Number Approach for Numerical Calculation of derivatives and its use in the Spherical 4R Mechanism 1 F. Peñuñuri∗, 1 Facultad R. Peón-Escalante†, 1 C. Villanueva‡, 2 Carlos A. Cruz-Villar§ de Ingenierı́a, Universidad Autónoma de Yucatán, A.P. 150, Cordemex, Mérida, Yucatán, México. 2 Cinvestav-IPN, arXiv:1301.1409v3 [cs.CE] 23 Jul 2013 1 Departamento de Ingenierı́a Eléctrica, Av. IPN 2508, A. P. 14-740, 07300, México D.F., México. March 25, 2018 Abstract This paper proposes a methodology to calculate both the first and second derivatives of a vector function of one variable in a single computation step. The method is based on the nested application of the dual number approach for first order derivatives. It has been implemented in Fortran language, a module which contains the dual version of elementary functions as well as more complex functions, which are common in the field of rotational kinematics. Since we have three quantities of interest, namely the function itself and its first and second derivative, our basic numerical entity has three elements. Then, for a given vector function f : R → Rm , its dual version will have the form f˜ : R3 → R3m . As a study case, the proposed methodology is used to calculate the velocity and acceleration of a point moving on the coupler-point curve generated by a spherical four-bar mechanism. 1 Introduction The calculation of velocity and acceleration is often needed in the fields of physics and engineering. In some cases, there is no possibility to obtain them analytically. In other cases, the analytical result is quite complicated to deal with; in both situations a numerical treatment is desirable. Regarding the field of mechanisms, the calculation of the first and second derivative allows the designer to include the velocity and acceleration in the synthesis of balanced mechanisms, dwell mechanisms, etc., [1–7]. Usually, the process of calculating a derivative is not difficult. However, for the case of a spherical mechanism, obtaining first and second derivatives of the position vector for the coupler point is not simple. Even when such derivatives can be explicitly obtained, the resulting expressions could be of great complexity and useless for practical purposes. An alternative solution is to numerically calculate such derivatives. Nevertheless, traditional methods for calculating numerical derivatives (finite-differences) are subject to both truncation and subtractive cancellation errors, not to mention that they are not efficient enough to be used in the optimum synthesis of mechanisms. A different approach that is not subject to the above mentioned errors is automatic differentiation (AD) [8], an algorithmic approach to obtain derivatives for functions which are implemented in computer programs. AD can be implemented in several ways [9], but the use of dual numbers is specially suited for that, since the chain rule can be implemented almost directly. Analogous to the definition of a complex number z = a + i b with a and b being real numbers and i2 = −1, a dual number is defined as r̂ = a +  b where a and b are real numbers but 2 = 0. Although the first applications of the dual number theory to the development of mechanical engineering date back ∗ [email protected][email protected][email protected] § [email protected] 1 to early XX century [10], and algebra of dual numbers was developed in the late XIX century [11], applications of dual numbers to numerical calculation of derivatives are relatively recent [12–14]. Since then, a big amount of work regarding applications of dual numbers has been made. They are used to describe finite displacements of rigid and deformable bodies, for the analytical treatment in kinematic and dynamics of spatial mechanisms, for the study of the kinematics, dynamics and calibration of openchain robot manipulators, for the study of computer graphics, etc. In references [14–16] there is some bibliography about such studies. Due to the great applicability of the dual numbers, it is important to develop algorithms implementing their algebra, which has been done in [15]. It is worthwhile to mention reference [16] where some linear dual algebra algorithms are presented. Regarding applications of dual numbers to compute the numerical derivative of functions, we can cite [12–14]. In [12], dual numbers are used to calculate first order derivatives and in [13] and [14], they are used to calculate second order derivatives by using the operator overloading method. The aim of this paper is twofold. First, it develops a methodology based on dual numbers where first and second order derivatives are obtained in a single computation step. Second, it obtains the velocity and acceleration of a point moving on the coupler-point curve generated by a spherical four-bar mechanism. Once the methodology of developing elementary functions in its dual version including its second derivative has been presented, it is straightforward to develop more sophisticated functions such as rotations and numerical solutions to equations. Moreover, as the use of functions in programming languages as C, C++ and Fortran is quite intuitive and easy to codify, we have created a Fortran module where some functions in their dual version, as well as common functions to the field of rotational kinematics are provided. Such a module along with an example of its usage can be downloaded via internet at http://www.meca.cinvestav.mx/personal/cacruz/archivos-ccv/. The rest of the paper is organized as follows. Section 2 presents the process of calculating numerical derivatives using dual numbers. Section 3 presents the implementation in Fortran language of the dual versions of scalar elementary functions as well as more complicated expressions, such as vector and matrix functions. In section 4 we show how the velocity and acceleration of a point moving on the couplerpoint curve generated by a spherical four-bar mechanism are obtained. Finally, section 5 presents the conclusions. 2 Dual numbers and derivatives A dual number r̂ is a number of the form r̂ = a +  b, (2.1) 2 where a (the real part) and b (the dual part) are real numbers and  = 0. As in the case of complex numbers, there is an isomorphism1 between dual numbers and the real vector space R2 . So, a dual number r̂ can be defined as ordered pairs r̂ = {a, b}. (2.2) The algebraic rules for dual numbers can be found elsewhere in the literature, see for example [11, 16, 17]. Below we present how the dual numbers are used to calculate derivatives of a function. 2.1 First order derivative Let us consider the Taylor series expansion (2.3) of a function f : R → R about the point x, where h.o.t. stands for higher order terms: f (x + h) = f (x) + f 0 (x)h + f 00 (x) 2 h + · · · + h.o.t. 2 (2.3) 1 Under the ordinary addition and scalar multiplication—multiplication by a real number, the transformation T(a + b ) = {a, b} is linear and bijective. 2 Now, let us consider the dual number x̂ = x + , i.e., a dual number where the coefficient of the nilpotent  is equal to one. Substituting x̂ in (2.3), we obtain fˆ(x̂) = f (x + ) = f (x) + f 0 (x). Instead of computing over the reals, we compute over the dual numbers and come up with a dual function fˆ = f (x + ) whose real term is the original function f (x) and the coefficient of  is its derivative f 0 (x). In the notation of (2.2) we may write fˆ(x̂) = {f (x), f 0 (x)} . (2.4) Let us exemplify the procedure for computing the dual function, by using the sinusoidal function. Let f (x) = sin(x) be the function for which the dual function has to be obtained and let ĝ(x̂) = {g1 (x), g2 (x)} be a dual function where g1 (x) = g(x) and g2 (x) = g 0 (x). Then, from (2.4) we obtain c sin(ĝ(x̂)) = {sin (g1 (x)) , cos (g1 (x)) g2 (x)} . 2.2 (2.5) Second order derivative The second order derivative can be obtained by applying (2.4) to f 0 (x), that is, stating the dual version of the function f 0 (x) as fˆ0 (x) = {f 0 (x), f 00 (x)} . (2.6) The relevant information can be stored in a vector of three components. Such a vector will have the information of the function, its first and its second derivative, so we could speak of an extended dual function (to differentiate it from the common dual function which has only two components). We will use the notation f˜(x) = {f (x), f 0 (x), f 00 (x)} (2.7) to represent the extended dual version of the original function f . The identity function in its extended dual version x̃, has three components and is given by x̃ = {x, 1, 0} . (2.8) Let us exemplify the proposed methodology using the sinusoidal function. Let g̃(x̃) = {g1 (x), g2 (x), g3 (x)} be an extended dual function, where g1 (x) = g(x), g2 (x) = g 0 (x), g3 (x) = g 00 (x). The sinusoidal function in its extended dual version is given by f sin(g̃) ={sin(g1 ), cos(g1 ) g2 , − sin(g1 ) g22 + cos(g1 ) g3 } (2.9) where the arguments of the functions are not written to simplify notation. Notice that no matter how complicated the function g, Eq. (2.9) ensures that the chain rule will be successfully applied. Thus by writing all the functions in their extended dual version the derivatives will be obtained without the need of traditional methods of finite-differences. 3 Fortran implementation of the extended dual functions The extended dual functions are defined as arrays of 3m components and since we are interested in functions f : R → Rm , a function g : R3 → R3m is required to write the extended dual version of the function f . For example, in the case of the sinusoidal function and considering Fortran programming language, the code results as follows: 3 module sphmodual contains function sindual(x) result(f_result) implicit none double precision :: f_result(3) double precision, intent(in) :: x(3) f_result=[sin(x(1)),cos(x(1))*x(2),-sin(x(1))*x(2)**2 + cos(x(1))*x(3)] return end function sindual end module sphmodual f A simple For coding purposes we will use fdual instead of f˜, so in the above code sindual means sin. program calculating the function f (x) = sin(sin(x)) for x = 1.1 in its extended dual version is: program sind use sphmodual implicit none double precision :: angd(3), res(3) angd=[1.1d0,1d0,0d0] res = sindual(sindual(angd)) print*,res(1),res(2),res(3) end program sind After compiling and executing the above program, the result is: 0.777831 0.285073 -0.720138 The first component of the output vector corresponds to f , the second one to f 0 and the third one to f 00 , all of them evaluated at the argument x = 1.1. The implementation of all of the other elementary functions is straightforward from this example. 3.1 Extended dual version of more complicated objects It has been shown how elementary functions can be dualized, but there are more complicated objects such as, for example, the vector product, whose extended dual version is required for applications to rotational kinematics. One approach to handle vector functions is to work by components. Let us exemplify for the cross product. The i-th component of the cross product of two vectors a and b is given by (a × b)i = εijk aj bk , where an and bn are the n-th component of vectors a and b, respectively, and εijk is the Levi-Civitta tensor. Notice that summation over repeated indices is assumed. As the derivative operator is a linear operator, only the extended dual version of the multiplication has to be obtained, but the addition has not. Below we show the Fortran code for the extended dual version of the cross product. function crossdual(xd,yd) result(f_result) implicit none double precision :: f_result(3,3) double precision, intent(in) :: xd(3,3),yd(3,3) integer :: j,k f_result = 0d0 4 do j=1,3 do k=1,3 f_result(1,:) = f_result(1,:) + levic(1,j,k)*proddual(xd(j,:),yd(k,:)) f_result(2,:) = f_result(2,:) + levic(2,j,k)*proddual(xd(j,:),yd(k,:)) f_result(3,:) = f_result(3,:) + levic(3,j,k)*proddual(xd(j,:),yd(k,:)) end do end do return end function crossdual In the levic function, the Levi-Civita tensor is coded. In the proddual function, the extended dual version of the scalar product is coded. The code for both functions is included in the downloadable module. The result is a 3 × 3 matrix where the first column is the real cross product, the second column is the first order derivative of the cross product, and the third column is the second order derivative of the cross product. n 2 o  For example, let v(θ) = cos(θ), sin(θ), θ3 and w(θ) = e−θ , θ cos(θ), sin(θ) be two vectors. A program that calculates its extended dual cross product at θ = 1.1 is as follows: program crossp use sphmodual implicit none double precision :: ang(3),v(3,3),w(3,3),thr(3),crsp(3,3) thr = [3d0,0d0,0d0] ang = [1.1d0,1d0,0d0] v(1,:) = cosdual(ang) v(2,:) = sindual(ang) v(3,:) = powdual(ang,thr) w(1,:) = expdual(-proddual(ang,ang)) w(2,:) = proddual(cosdual(ang),ang) w(3,:) = sindual(ang) crsp = crossdual(v,w) print*,crsp(:,1) print*,crsp(:,2) print*,crsp(:,3) end program crossp Extended dual version of other mathematical objects like dot product, norms, matrix multiplications, rotation matrices, etc., can be implemented in a similar way. 4 First and second derivative in the spherical 4R mechanism This section presents the application of the proposed methodology to compute the first and second order derivatives of some useful functions in the synthesis of mechanisms. In particular, the examples concern the spherical four bar mechanism shown in Fig. 1. A detailed procedure in order to obtain the couplerpoint curve can be found in [18]. Here we reproduce the essential formulas in order to make the paper 5 Figure 1: Spherical four-bar mechanism self-contained. Notice that the notation has been slightly changed in order to have a clear code for the programming functions. 4.1 Derivative of the output angle Let us consider the spherical four bar mechanism shown in Fig. 1. Without loss of generality we assume a unit sphere. In its assembly configuration, the input angle is equal to Θ0 and the vectors xk k = 1, 2, 3, 4, represent the initial position vectors for the joints k, respectively. We will consider the input link as the geodesic connecting the points x1 and x2 , the coupler link as the geodesic connecting the points x2 and x3 , the output link as the geodesic connecting the points x3 and x4 . Finally the fixed link is the geodesic connecting x4 and x1 . Since we are considering a unit sphere, α1 , α2 , α3 , α4 will be the lengths of the links, respectively. Once the input link starts to rotate, for example by an angle θ, its new position will be Θ0 + θ. Similarly the position of the output link changes by the amount φ(θ; ~x) where the symbol ~x represents the dependence on (x1 , x2 , x3 , x4 ). In what follows the dependence of φ on ~x will not be written to avoid unnecessary notation, however it will be written in those vectors with such a dependence. Let r2 (θ; x1 , x2 ) and r3 (φ(θ); ~x) denote the final positions of input and output link, respectively, given by r2 (θ; x1 , x2 ) = R(θ, x1 )x2 r3 (φ(θ); ~x) = R(φ(θ), x4 )x3 , (4.1) (4.2) where R(ϑ, x) is a rotation matrix for angle ϑ about the unit vector x. Since the coupler link must have a constant length, the angle φ(θ) can be obtained from r2 (θ; x1 , x2 ) · r3 (φ(θ); ~x) = x2 · x3 = cos α2 = constant. (4.3) A closed-form solution of Eq. (4.3) can be found in [19, 20]. In our notation, it is given by −1 φ = Φ0 − 2 tan A± √ A2 + B 2 − C 2 C −B ! , where A = sin α1 sin α3 sin(θ + Θ0 ) B = cos α1 sin α3 sin α4 − sin α1 sin α3 cos α4 cos(θ + Θ0 ) C = sin α1 cos α3 sin α4 cos(θ + Θ0 ) + cos α1 cos α3 cos α4 − cos α2 . 6 (4.4) !*+, !!"#E$ !!"#EJ$ !-'!!"#D&$ !& ' !! " #( Q E J !!"#Q$ $ ") "% Figure 2: Vectors involved to obtain rgen . Although we use Eq. (4.4) to obtain the coupler-point curve generated by the mechanism, in this section, we are interested in showing a numerical approach, where the derivative of φ with respect to θ can be found without the analytical knowledge of the φ(θ) angle. This can be obtained from F (θ, φ) = r2 (θ) · r3 (φ), as 1 ∂F dφ (θ) = − ∂F (θ, φ(θ)). (4.5) dθ ∂θ ∂φ (θ, φ(θ)) In order to obtain a numerical value for Eq. (4.5), the φ angle is obtained by numerically solving Eq. (4.3). Clearly the use of dual numbers is an advantage here, since by implementing the extended dual version of Eq. (4.3) and applying the numerical method of solution also in the context of the extended dual functions, the first and second derivatives of Eq. (4.3) with respect to θ are automatically obtained, along with the solution for φ. Notice that even when Eq. (4.5) is a formal solution to the problem at hand, yet the derivatives still need to be calculated. 4.2 Velocity and acceleration of the coupler point We are interested in calculating the velocity and the acceleration of a point moving on the coupler-point curve. Given a mechanism, the only independent (except time dependence) variable is the rotation angle θ of the input link. Denoting the position vector of the coupler point as rgen (see Fig. 2), we have ∂(rgen ) ∂θ 2 ∂ (rgen ) ∂(rgen ) , = θ̇2 + θ̈ ∂θ2 ∂θ ṙgen = θ̇ (4.6) r̈gen (4.7) for velocity and acceleration of rgen . Since one can, in principle, control the angular velocity of the input link, the problem is reduced to calculate ∂(rgen )/∂θ and ∂ 2 (rgen )/∂θ2 . In order to obtain a parametric equation for the coupler-point curve, it is necessary to find the position vector rcp (θ, ν; ~x) of a point on the coupler link (see Fig. 2). This can be done by rotating the vector r2 (θ; x1 , x2 ) by an angle ν about the unit vector n̂23 orthogonal to r2 (θ; x1 , x2 ) and r3 (φ(θ); ~x). Thus rcp (θ, ν; ~x) = R(ν, n̂23 )r2 (θ; x1 , x2 ) (4.8) r2 (θ; x1 , x2 ) × r3 (φ(θ); ~x) . kr2 (θ; x1 , x2 ) × r3 (φ(θ); ~x)k (4.9) where n̂23 = 7 Then, the position vector of the coupler point rgen is obtained by rotating the vector rcp (θ, β + γ; ~x), being γ the angle between rcp (θ, β; ~x) and rgen , by an angle of π/2 about vector rcp (θ, β; ~x): rgen (θ, β, γ; ~x) = R (π/2, rcp (θ, β; ~x)) rcp (θ, β + γ; ~x). (4.10) So, writing the Eq. (4.10) in its extended dual version, we could automatically get the parametric equation for the coupler-point curve, as well as its first and second derivatives with respect to θ. It is worthwhile to mention that all the necessary functions to obtain rgen in its extended dual form are coded in the downloadable module. As a practical example, let us consider the spherical four bar mechanism whose parameters are shown in Table 1. This mechanism was synthesized for the path generation task in [18]. The desired points were firstly presented in [21] and normalized in [22]. Table 1: Parameters of the Spherical 4R mechanism 1.00000 x1 0.00000 0.00000 0.54462 x4 0.80817 0.22413 α1 0.40144 α2 0.82034 α3 0.92504 β 0.23067 γ 0.47437 Table 2 shows numerical results for velocity and acceleration, of a point moving on the coupler-point curve as function of the input angle θ. Table 2: Components of velocity vector ṙgen (θ) and acceleration vector r̈gen (θ) for θ̇ = 1 (units are in the SI system) θ 0.00000 0.62832 1.25664 1.88496 2.51327 3.14159 3.76991 4.39823 5.02655 5.65487 5 ẋgen (θ) ẏgen (θ) żgen (θ) ẍgen (θ) ÿgen (θ) z̈gen (θ) −0.14255 −0.28008 −0.17827 −0.02698 0.10680 0.15218 0.12511 0.09935 0.08944 0.05510 −0.06884 −0.18548 −0.23972 −0.20190 −0.11271 −0.00109 0.13203 0.25462 0.28061 0.14226 0.59467 0.35545 0.05446 −0.13155 −0.26666 −0.36590 −0.36657 −0.23446 0.01394 0.34717 −0.42870 0.03897 0.22578 0.24421 0.15791 −0.00803 −0.05418 −0.02558 −0.01379 −0.14138 −0.25131 −0.15048 −0.00787 0.11368 0.16247 0.19437 0.22196 0.14294 −0.08080 −0.34298 0.02053 −0.56498 −0.37389 −0.23910 −0.19681 −0.09747 0.10407 0.31101 0.47129 0.56752 Conclusions Velocity and acceleration of a coupler-point on a spherical 4R mechanism are obtained by using dual numbers. Although it would be possible to obtain an analytical expression for the position vector of the coupler point, the complexity of the expression does not allow an efficient method to obtain its derivatives, but, if the vector is written in its extended dual version, as it is proposed in this work, its derivatives are obtained directly. As a consequence velocities and accelerations can now be efficiently considered in the optimum synthesis of mechanisms. The work details the proposal and implementation of a methodology to numerically obtain first and second order derivatives of one variable functions. With our proposal such derivatives (without any approximation) can be obtained in straightforward manner. The methodology is easy to implement and, although we have coded the extended dual functions in the Fortran language, other programming languages could be used. 8 References [1] G. Guj, Z. Dong, M. D. Giacinto, Dimensional synthesis of four bar linkage for function generation with velocity and acceleration constraints, Meccanica: an international journal of theoretical and applied mechanics 16 (4) (1981) 210–219. [2] K. Russella, R. S. Sodhib, On the design of slider-crank mechanisms. part I: multi-phase motion generation, Mechanism and Machine Theory 40 (3) (2005) 285–299. [3] E. Sandgren, Design of single-and multiple-dwell six-link mechanisms through design optimization., Mechanism and Machine Theory 20 (6) (1985) 483–490. [4] Ümit. Sönmez, Introduction to compliant long dwell mechanism designs using buckling beams and arcs, Journal of Mechanical Design 129 (8) (2007) 831 – 844. [5] M. Jagannath, S. Bandyopadhyay, A new approach towards the synthesis of six-bar double dwell mechanisms, Computational Kinematics VII (2009) 209–216. [6] M. Zobairi, S. Rao, B. Sahay, Kineto-elastodynamic balancing of 4R-four bar mechanisms combining kinematic and dynamic stress considerations, Mechanism and Machine Theory 21 (4) (1986) 307–315. [7] Y.-Q. Yu, B. Jiang, Analytical and experimental study on the dynamic balancing of flexible mechanisms, Mechanism and Machine Theory 42 (5) (2007) 626–635. [8] R. D. Neidinger, Introduction to automatic differentiation and matlab object-oriented programming, SIAM Review 52 (3) (2010) 545–563. [9] A. Griewank, On automatic differentiation, in Mathematical Programming: Recent Developments and Applications, M. Iri and K. Tanabe, eds., Klu wer Academic, Dordrecht, The Netherlands, 1998. [10] E. Study, Geometrie der Dynamen, Verlag Teubner, Leipzig, 1903. [11] W. Clifford, Preliminary sketch of biquaternions, Proc. London Mathematical Society 1 (s1-4) (1873) 381–395. [12] H. Leuck, H.-H. Nagel, Automatic differentiation facilitates of-integration into steering-angle-based road vehicle tracking, IEEE Computer Society Conference on Computer Vision and Pattern Recognition 2 (5) (1999) 2360. [13] D. Piponi, Automatic differentiation, c++ templates, and photogrammetry, Journal of graphics, gpu, and game tools 9 (4) (2004) 41–55. [14] J. A. Fike, J. J. Alonso (Eds.), The Development of Hyper-Dual Numbers for Exact Second-Derivative Calculations, Proceedings of the 49th AIAA Aerospace Sciences Meeting, Orlando Florida, USA, 2011. [15] H. H. Cheng, Programming with dual numbers and its applications in mechanisms design, Engineering with Computers 10 (4) (1994) 212–229. [16] E. Pennestrı̀, P. Valentini, Linear dual algebra algorithms and their application to kinematics, Multibody Dynamics Computational Methods and Applications 12 (2008) 207–229. [17] V. Brodsky, M. Shoham, Dual numbers representation of rigid body dinamics, Mechanism and Machine Theory 34 (1999) 975–991. [18] F. Peñuñuri, R. Peón-Escalante, C. Villanueva, C. A. Cruz-Villar, Synthesis of spherical 4r mechanism for path generation using differential evolution, Mechanism and Machine Theory 57 (2012) 62–70. 9 [19] J. J. Cervantes-Sánchez, H. I. Medellı́n-Castillo, J. M. Rico-Martı́nez, E. J. González-Galván, Some improvements on the exact kinematic synthesis of spherical 4r function generators, Mechanism and Machine Theory 44 (2009) 103–121. [20] S. Bai, J. Angeles, A unified input-output analysis of four-bar linkages, Mechanism and Machine Theory 43 (2008) 240–251. [21] J. Chu, J. Sun, Numerical atlas method for path generation of spherical four-bar mechanism, Mechanism and Machine Theory 45 (2010) 867–879. [22] G. Mullineux, Atlas of spherical four-bar mechanisms, Mechanism and Machine Theory 46 (2011) 1811–1823. 10
5cs.CE
EQUIDIVISIBLE PSEUDOVARIETIES OF SEMIGROUPS arXiv:1603.00330v1 [math.GR] 1 Mar 2016 JORGE ALMEIDA AND ALFREDO COSTA Abstract. We give a complete characterization of pseudovarieties of semigroups whose finitely generated relatively free profinite semigroups are equidivisible. Besides the pseudovarieties of completely simple semigroups, they are precisely the pseudovarieties that are closed under Mal’cev product on the left by the pseudovariety of locally trivial semigroups. A further characterization which turns out to be instrumental is as the non-completely simple pseudovarieties that are closed under two-sided Karnofsky-Rhodes expansion. 1. Introduction A pseudovariety of semigroups is a class of finite semigroups closed under taking subsemigroups, homomorphic images and finitary products. In the past few decades, pseudovarieties provided the main framework for the research on finite semigroups, motivated by Eilenberg’s correspondence theorem between pseudovarieties and varieties of languages. In this context, the finitely generated relatively free profinite semigroups associated to each pseudovariety proved to be of fundamental importance. We assume the reader has some familiarity with this background. The books [19, 1] are indicated as supporting references. The paper [2] might also be useful for someone looking for a brief introduction. In this paper we are concerned with equidivisible relatively free profinite semigroups. A semigroup S is equidivisible if for every u, v, x, y ∈ S, the equality uv = xy implies that u = x and v = y, or that there is t ∈ S such that ut = x and v = ty, or such that xt = u and y = tv. Equidivisible semigroups were introduced in [12] as a generalization of free semigroups. They were further investigated in [13] where a characterization of the completely simple semigroups as being a special class of equidivisible semigroups was given (cf. Theorem 5.1). A pseudovariety of semigroups V is said to be equidivisible if every finitely generated free pro-V semigroup is equidivisible. The paper [4] includes results about a special class of semigroup pseudovarieties, the WGGM pseudovarieties, the ones whose corresponding relatively free profinite semigroups are “weakly generalized group mapping”. In the same paper, the WGGM condition is applied to obtain sufficient conditions for a pseudovariety to be finitely join irreducible in the lattice of ordered pseudovarieties. It is also 2010 Mathematics Subject Classification. Primary 20M07, 20M05. Key words and phrases. semigroup, equidivisible, pseudovariety, Karnofsky-Rhodes expansion, connected expansion, two-sided Cayley graph. Work partially supported respectively by CMUP (UID/MAT/00144/2013) and CMUC (UID/MAT/00324/2013), which are funded by FCT (Portugal) with national (MEC) and European structural funds (FEDER) under the partnership agreement PT2020. 1 2 JORGE ALMEIDA AND ALFREDO COSTA shown in [4] that a sufficient condition for a semigroup pseudovariety V to be WGGM is to be equidivisible and to contain LSl (the pseudovariety of finite semigroups whose local monoids are semillatices). This adds motivation to investigate the natural question: which pseudovarieties are equidivisible, other than those of completely simple semigroups? In this paper we give a complete characterization of the equidivisible pseudovarieties of semigroups (Sec. 8), showing that those which are not contained in the pseudovariety of completely simple semigroups are precisely the ones of the form V = LI m V, where LI denotes the pseudovariety of locally trivial semigroups and m denotes the Mal’cev product of pseudovarieties. The semigroup pseudovarieties of the form V = A m V, where A denotes the pseudovariety of aperiodic semigroups, are those whose corresponding variety of languages is closed under language concatenation [23, 6]. In [3, Lemma 4.8] it is shown that every such pseudovariety is equidivisible, with a proof that uses the closure under concatenation. In contrast to the approach made in [3] for this class of pseudovarieties, our proof of the equidivisibility of the pseudovarieties of the form V = LI m V does not use a characterization in terms of the corresponding varieties of languages, which are those that are closed under unambiguous product of languages [14, 15]. For our complete characterization of the equidivisible pseudovarieties, and in both directions of the proof, we had to use a distinct approach, based on the two-sided Karnofsky-Rhodes expansion of semigroups. This approach was inspired by the proof given in [18] that if a pseudovariety of semigroups V is stable under (one-sided) right Karnofsky-Rhodes expansion, then the finitely generated free pro-V semigroups have unambiguous ≤R -order. It turns out that, by a deep result of Rhodes et al. [20, 21], the pseudovarieties of the form V = LI m V are precisely those that are stable under two-sided Karnofsky-Rhodes expansion (Corollary 3.3). Roughly speaking, the two-sided Karnofsky-Rhodes expansion keeps track of the transition edges used to read a word in the two-sided Cayley graph of the semigroup expanded. If we only keep track of the strongly connected components, we obtain another expansion, which we call the two-sided connected expansion. We deduce from our main result that a pseudovariety is closed under two-sided Karnofsky-Rhodes expansion if and only if it is closed under two-sided connected expansion (cf. Corollary 8.4). Another by-product of our results concerns the pseudovariety LG of finite semigroups whose local monoids are groups. After showing directly that the equidivisible subpseudovarieties of LG are precisely those containing LI, we apply our main result to deduce that, whenever V is a subpseudovariety of LG, the join LI ∨ V is equal to the Mal’cev product LI m V (Corollary 8.6). 2. Preliminaries Recall that [19, 1, 2] are our supporting references. We use the standard notation V ∨ W, V ∗ W, V ∗∗ W and V m W respectively for the join, the semidirect product, the two-sided semidirect product, and the Mal’cev product of pseudovarieties of semigroups. Occasionally (only in the preparatory EQUIDIVISIBLE PSEUDOVARIETIES OF SEMIGROUPS 3 Section 3) we refer to pseudovarieties of semigroupoids (namely the pseudovariety ℓI of trivial semigroupoids) and to varietal operations concerning them. We refer to [19, 2] for details. The following pseudovarieties of semigroups appear in this paper: • • • • • • • • • • • S: finite semigroups; A: finite aperiodic semigroups; G: finite groups; I: trivial semigroups; D: finite semigroups all of whose idempotents are right zeros; K: finite semigroups all of whose idempotents are left zeros; LI = K ∨ D: finite semigroups whose local monoids are trivial; LG: finite semigroups whose local monoids are groups; LSl: finite semigroups whose local monoids are semilattices; CS: finite completely simple semigroups; CR: finite completely regular semigroups. For a semigroup S, let S I be the monoid obtained from S by adding an extra element I which is the identity of S I . This allows a convenient way of writing the definition of equidivisibility: the semigroup S is equidivisible when, for every u, v, x, y ∈ S, the equality uv = xy implies that there is t ∈ S I such that ut = x and v = ty, or such that xt = u and y = tv. If f : S → T is a semigroup homomorphism, then we extend f to a homomorphism from S I to T I , also denoted f , by letting f (I) = I. Note that, for every alphabet A, the monoid (A+ )I can be identified with the free monoid A∗ in a natural manner. In particular, if ϕ is a homomorphism from A+ to a semigroup S, then we have a unique extension of ϕ to a homomorphism from A∗ to S I , with ϕ(1) = I. We were inspired by [18] in the use of semigroup expansions to obtain our main result. With this reference in mind (see also [10]), we quickly recall that, for a fixed alphabet A, the category of A-generated semigroups is the category SA whose objects are the pairs of the form (S, ϕ) in which ϕ is an onto homomorphism A+ → S, and where morphisms (S, ϕ) → (T, ψ) are the homomorphisms θ : S → T such that θ ◦ ϕ = ψ. An expansion cut to generators defined in SA is an endofunctor F : SA → SA equipped with a natural transformation from F to the identity functor of SA . A convenient way to refer to F is the notation correspondence (S, ϕ) 7→ (S F , ϕF ), where the pair (S F , ϕF ) is the object F (S, ϕ). 3. The two-sided Karnofsky-Rhodes expansion Let ϕ be a homomorphism from A+ onto a semigroup S. The twosided Cayley graph defined by ϕ is the directed graph Γϕ whose set of vertices is S I × S I , and where an edge from (s1 , t1 ) to (s2 , t2 ) is a triple ((s1 , t1 ), a, (s2 , t2 )), with a ∈ A, such that s1 ϕ(a) = s2 and t1 = ϕ(a)t2 . Giving to each edge ((s1 , t1 ), a, (s2 , t2 )) the label a, the graph Γϕ becomes a semi-automaton over the alphabet A. A labeling of paths is inherited from the labeling of edges in an obvious way. If u ∈ A+ , then we denote by pϕ,u , or simply pu if ϕ is understood, the unique path from (I, ϕ(u)) to (ϕ(u), I) labeled by u. 4 JORGE ALMEIDA AND ALFREDO COSTA For an edge t in a directed graph H, we denote by α(t) its source and by ω(t) is target. The edge t is a transition edge of H if α(t) and ω(t) are not in the same strongly connected component of H. Returning our attention to the two-sided Cayley graph Γϕ , for a path p in Γϕ , denote by T (p) the set of transition edges in p. Let ≡ϕ be the binary relation on A+ defined by u ≡ϕ v if and only if ϕ(u) = ϕ(v) and T (pu ) = T (pv ). The relation u ≡ϕ v is a congruence, a well-known fact whose routine proof is similar to the explicit K(ℓI) proof we give later of an analogous result, Lemma 4.1. Denote by Sϕ the + K(ℓI) quotient A /≡ϕ and by ϕ the corresponding quotient homomorphism K(ℓI) + A → Sϕ . For the sake of simplicity, we will write S K(ℓI) instead of K(ℓI) Sϕ , if the dependency on ϕ is implicitly understood. It is well known that the correspondence (S, ϕ) 7→ (S K(ℓI) , ϕK(ℓI) ) is an expansion cut to generators, which is called the two-sided Karnofsky-Rhodes expansion. There is an alternative way of defining this expansion, which puts it as a special case within a more general framework, and which we refer briefly, leaving the details for the bibliographic references supporting our discussion. The two-sided Karnofsky-Rhodes expansion is an example of a two-sided semidirect product expansion defined by a variety of semigroups (in this case, the variety of trivial semigroups), as introduced by Elston in [10]. In [18], a variation of this approach is followed, one where pseudovarieties of semigroupoids are used instead of varieties of semigroups. The notation S K(ℓI) is consistent with the notation used in [18] for the twosided semidirect product expansion S K(V) of a profinite semigroup S defined by a pseudovariety V of semigroupoids. As observed in [18, Sec. 10], if V is a pseudovariety of semigroups, then S K(ℓV) is the corresponding expansion S K(V) introduced by Elston. Suppose that the alphabet A is finite. If S is finite then S K(ℓI) is finite, because a kernel class of ϕK(ℓI) is determined by a kernel class of ϕ together with a set of transition edges of Γϕ , and there is only a finite number of such classes and edges. More generally, as explained in [18, Sec. 10], if S is finite and V is a locally finite pseudovariety of semigroupoids (which is the case of ℓI), then S K(V) is a finite semigroup which is in a natural way a two-sided semidirect product (ΩΓϕ V) ∗∗ S, and so if S belongs to a pseudovariety W of semigroups, then S K(V) belongs to V ∗∗ W. As remarked at the beginning of Section 11 of [18], the isomorphism between the quotient A+ /≡ϕ and the two-sided semidirect product (ΩΓϕ ℓI)∗∗S is justified by Tilson’s result asserting that two paths in a graph X coincide in the locally trivial free category generated by X if and only if they have the same transition edges. The following result is a special case of [19, Theorem 3.6.4]. Proposition 3.1. Let W be a locally finite pseudovariety and let A be a finite alphabet. Then (ΩA W)K(ℓI) is isomorphic to ΩA (ℓI ∗∗ W). It is an easy exercise to show, directly from the definition we gave of the two-sided Karnofsky-Rhodes expansion, that if π is the canonical projection S K(ℓI) → S then the semigroup π −1 (e) satisfies the identity xyz = xz, for every idempotent e of S. Actually, as remarked in the proof of Lemma 3.4 EQUIDIVISIBLE PSEUDOVARIETIES OF SEMIGROUPS 5 in [16], we have ℓI ∗∗ V ⊆ [[xyz = xz]] m V, and so ℓI∗∗ V ⊆ LI m V. Denote by S n n≥1 ℓI ∗∗ V the sequence of semigroup pseudovarieties recursively defined by ℓI ∗∗0 V = V, ℓI ∗∗n V = ℓI ∗∗ (ℓI ∗∗n−1 V), n ≥ 1. The following theorem is a deep result of Rhodes et al. [20, 21] which the reader can find in [19, Corollary 5.3.22]. TheoremS 3.2. Let V be a pseudovariety of semigroups. Then we have LI m V = n≥0 ℓI ∗∗n V. Say that a pseudovariety of semigroups V is closed under the two-sided K(ℓI) Karnofsky-Rhodes expansion if we have Sϕ ∈ V whenever S ∈ V and ϕ is a homomorphism from a finitely generated free semigroup onto S. For the reader’s convenience, we give a proof of the following easy consequence of Theorem 3.2. Corollary 3.3. A pseudovariety of semigroups V is closed under the twosided Karnofsky-Rhodes expansion if and only if V = LI m V. Proof. Suppose that V = LI m V. Let S ∈ V and consider a homomorphism K(ℓI) ϕ : A+ → S. Using the aforementioned fact that Sϕ ∈ [[xyz = xz]] m V, K(ℓI) we immediately get that Sϕ ∈ V, because [[xyz = xz]] ⊆ LI. Alternatively, K(ℓI) one can apply (the easy part of) Theorem 3.2, since Sϕ ∈ ℓI ∗∗ V. Conversely, suppose that V is closed under the two-sided KarnofskyRhodes expansion. Let W be a locally finite subpseudovariety of V. Then ΩA W belongs to V. By hypothesis, (ΩA W)K(ℓI) also belongs to V. Applying Proposition 3.1, we conclude that ℓI ∗∗ W ⊆ V. As W can be any locally finite subpseudovariety of V, we actually have ℓI ∗∗ V ⊆ V. We deduce from  Theorem 3.2 that LI m V = V. 4. The two-sided connected expansion In this section we show that the pseudovarieties closed under the two-sided Karnofsky-Rhodes expansion are equidivisible. Actually, it is not necessary to use the full force of the definition of the expansion. It suffices to use a weaker expansion which we introduce in this section. Let ϕ be a homomorphism from A+ onto a semigroup S. Given a path p in the two-sided Cayley graph Γϕ , denote by C(p) the set of strongly connected components of Γϕ that contain some vertex in p. Let ≈ϕ be the binary relation on A+ defined by u ≈ϕ v if and only if ϕ(u) = ϕ(v) and C(pu ) = C(pv ). Lemma 4.1. The relation ≈ϕ is a congruence. Proof. The relation ≈ϕ is clearly an equivalence. Taking into account the symmetry of its definition, to prove that ≈ϕ is a congruence, it suffices to show that C(puw ) = C(pvw ) whenever u, v, w ∈ A+ are such that u ≈ϕ v. Let x be a vertex of puw that is not in pvw , where u ≈ϕ v. Then, as ϕ(u) = ϕ(v), we necessarily have x = (ϕ(u1 ), ϕ(u2 w)) for some u1 , u2 ∈ A+ such that u = u1 u2 . Since x′ = (ϕ(u1 ), ϕ(u2 )) is a vertex of pu , there is some vertex x′′ in pv such that x′ and x′′ are in the same strongly connected component. Let t be the label of a path from x′ to x′′ , and let z be the label 6 JORGE ALMEIDA AND ALFREDO COSTA of a path from x′′ to x′ . We have x′′ = (ϕ(v1 ), ϕ(v2 )) for some v1 , v2 ∈ A∗ such that v = v1 v2 . Note that (4.1) ϕ(u1 t) = ϕ(v1 ), ϕ(u2 ) = ϕ(tv2 ), ϕ(v1 z) = ϕ(u1 ), ϕ(v2 ) = ϕ(zu2 ). Consider the vertex x′′′ = (ϕ(v1 ), ϕ(v2 w)). Looking at (4.1), we see that we also have ϕ(u2 w) = ϕ(tv2 w) and ϕ(v2 w) = ϕ(zu2 w), whence there is a path from x to x′′′ labeled t, and a path from x′′′ to x labeled z. This shows that x′′′ belongs to the strongly connected component of x. Since x′′′ belongs to pvw , this establishes the inclusion C(puw ) ⊆ C(pvw ). Dually, we have C(pvw ) ⊆ C(puw ).  If S is finite then ≈ϕ has finite index, because a ≈ϕ -class is defined by a kernel class of ϕ together with a set of strongly connected components of Γϕ , and there is only a finite number of such classes and components. We denote by S C the quotient A+ /≈ϕ and by ϕC the canonical homomorphism A+ → S C . Clearly, if ϕK(ℓI) (u) = ϕK(ℓI) (v) then ϕC (u) = ϕC (v), and so S C is a quotient of S K(ℓI) . The semigroups S C and S K(ℓI) may not be isomorphic. For example, consider the onto homomorphism ϕ from the two-letter alphabet A = {a, b} onto the trivial semigroup S. Then ϕC (a) = ϕC (b) but ϕK(ℓI) (a) 6= ϕK(ℓI) (b). Proposition 4.2. The correspondence (S, ϕ) 7→ (S C , ϕC ) is an expansion cut to generators. Proof. Let ϕ : A+ → S and ψ : A+ → T be onto homomorphisms, and let f : S → T be a homomorphism such that f ◦ ϕ = ψ. The mapping f induces a homomorphism f¯ of semi-automata from Γϕ to Γψ , defined by the following mappings from vertices and edges of Γϕ respectively to vertices and edges of Γψ : (s, t) 7→ (f (s), f (t)), ((s, t), a, (s′ , t′ )) 7→ ((f (s), f (t)), a, (f (s′ ), f (t′ ))). Let u, v ∈ A+ be such that u ≈ϕ v. Then we have ϕ(u) = ϕ(v) and ψ(u) = ψ(v). Let y = (ψ(u1 ), ψ(u2 )) be a vertex in pψ u , where u = u1 u2 , ∗ ¯ with u1 , u2 ∈ A . Then y = f (x), where x = (ϕ(u1 ), ϕ(u2 )) is a vertex ϕ ′ ′ in pϕ u . Since u ≈ϕ v, there is a vertex x in pv such that x and x are in the same strongly connected component of Γϕ . Clearly, y = f¯(x) and y ′ = f¯(x′ ) are in the same strongly connected component of Γψ . As x′ is ψ ψ ψ ′ in pϕ v , we have y in pv , showing that C(pu ) ⊆ C(pv ). By symmetry, we ψ have C(pψ u ) ⊇ C(pv ). This establishes the equality u ≈ψ v, and therefore we may consider the unique semigroup homomorphism f C : S C → T C such that f C ◦ ϕC = ψ C .  Let us call the expansion (S, ϕ) 7→ (S C , ϕC ) the two-sided connected expansion. A pseudovariety of semigroups V is closed under two-sided connected expansion if we have S C whenever S ∈ V. Proposition 4.3. If V is a pseudovariety of semigroups closed under twosided connected expansion then V is equidivisible. EQUIDIVISIBLE PSEUDOVARIETIES OF SEMIGROUPS 7 Proof. Let A be a finite alphabet. Suppose u, v, x, y are elements of ΩA V such that uv = xy. Let Φ be a continuous homomorphism onto a semigroup S from V, and let ϕ be its restriction to A+ . Denote by ΦC the unique continuous homomorphism from ΩA V onto S C whose restriction to A+ coincides with ϕC . Consider elements u0 , v0 , x0 , y0 of A+ such that ϕC (u0 ) = ΦC (u), ϕC (v0 ) = ΦC (v), ϕC (x0 ) = ΦC (x) and ϕC (y0 ) = ΦC (y). The veru v0 tex (Φ(u), Φ(v)) = (ϕ(u0 ), ϕ(v0 )) belongs to the path (I, ϕ(u0 v0 )) −−0−→ (ϕ(u0 v0 ), I) of the two-sided Cayley graph Γϕ . Since uv = xy, we know that ΦC (uv) = ΦC (xy). Therefore, there is a vertex (r, s) in the path x 0 y0 (I, ϕ(u0 v0 )) −−−→ (ϕ(u0 v0 ), I) of Γϕ which lies in the strongly connected component of (Φ(u), Φ(v)). Since (Φ(x), Φ(y)) is clearly also in the path x 0 y0 (I, ϕ(u0 v0 )) −−−→ (ϕ(u0 v0 ), I), we conclude that in Γϕ there is a (possibly empty) path from (Φ(u), Φ(v)) to (Φ(x), Φ(y)) or a path from (Φ(x), Φ(y)) to (Φ(u), Φ(v)). Therefore, there is a word tΦ ∈ A∗ such that ( Φ(utΦ ) = Φ(x) Φ(v) = Φ(tΦ y), in which case we say that Φ is of the first type, or there is a word τΦ ∈ A∗ such that ( Φ(xτΦ ) = Φ(u) Φ(y) = Φ(τΦ v), in which we say that Φ is of the second type. Note that Φ can be simultaneously of the first type and of the second type. The result now follows from a standard argument, which we write down for the reader’s convenience. We know that ΩA V is the inverse limit of an inverse system of semigroups from V defined by a countable set of connecting onto homomorphisms of the form πm,n : Sm → Sn , where m, n are arbitrary positive integers with m ≥ n. For each n ≥ 1, let πn be the projection ΩA V → Sn associated to this inverse system. Note that, for each n ≤ m, the homomorphism πn is of the same type as πm . On the other hand, since there are only two types, at least one of them occurs infinitely often. Combining these two simple observations we conclude that πn is of the first type for every n ≥ 1, or of the second type for every n ≥ 1. Without loss of generality, we assume the former case. Denote tπn by tn . We have (4.2) πn (utn ) = πn (x) and πn (v) = πn (tn y), for every n ≥ 1. Let t be an accumulation point in (ΩA V)I of the sequence (tn )n . Fix k ≥ 1, and let n ≥ k. Applying πn,k to (4.2), we get πk (utn ) = πk (x) and πk (v) = πk (tn y), for every n ≥ k. By continuity of πk , we obtain πk (ut) = πk (x) and πk (v) = πk (ty). This implies ut = x and v = ty. The case where πn is of the second type for every n ≥ 1 leads to the existence of τ in (ΩA V)I such that xτ = u and y = τ v.  8 JORGE ALMEIDA AND ALFREDO COSTA Corollary 4.4. If V is a pseudovariety of semigroups closed under twosided Karnofsky-Rhodes expansion then V is equidivisible. Proof. It follows immediately from Proposition 4.3 and the fact that the two-sided connected expansion of a semigroup S is a homomorphic image of the two-sided Karnofsky-Rhodes expansion of S.  Corollary 4.5. If V is a pseudovariety of semigroups such that V = LI m V then V is equidivisible. Proof. Apply Corollary 4.4 and (the easy part of) Corollary 3.3.  5. Equidivisible subpseudovarieties of CR It was proved in [13] that every completely simple semigroup is equidivisible. In fact, the following stronger result was established. Theorem 5.1. A semigroup S is completely simple if and only if for every u, v, x, y ∈ S, the equality uv = xy implies the existence of t1 , t2 ∈ S I such that ut1 = x, t1 y = v, u = xt2 , and y = t2 v. On the other hand we have the following simple fact. Lemma 5.2. If V is a pseudovariety of completely regular semigroups containing Sl then V is not equidivisible. Proof. Consider the alphabet A = {a, b}. We claim that ΩA V is not equidivisible. Indeed, we have ab · (ab)ω = a · b. On the other hand, since c(ab) * c(a), there is no t ∈ (ΩA V)I such that ab · t = a. Similarly, there is no t ∈ (ΩA V)I such that t · (ab)ω = b. This establishes the claim.  Since a pseudovariety of completely regular semigroups not containing Sl is contained in CS, combining Theorem 5.1 and Lemma 5.2 we deduce the following result. Corollary 5.3. A pseudovariety of completely regular semigroups is equidivisible if and only if it is contained in CS.  6. Letter super-cancelability as a necessary condition for equidivisibility Let S be an A-generated compact semigroup. This implies S = S I A = AS I . Say that S is right letter cancelative when, for every a ∈ A and u, v ∈ S I , the equality ua = va implies u = v. Say moreover that S is right letter super-cancelative when, for every a, b ∈ A and u, v ∈ S I , the equality ua = vb implies a = b and u = v. We have the obvious dual notions of left letter cancelative and left letter super-cancelative semigroup. If S is simultaneously right and left letter (super-)cancelative, then we say S is letter (super-)cancelative. Say that a pseudovariety of semigroups V is right letter (super-)cancelative if ΩA V is right letter (super-)cancelative, for every finite alphabet A. One also has the dual notions of left letter (super-)cancelative and letter (super-) cancelative pseudovariety. EQUIDIVISIBLE PSEUDOVARIETIES OF SEMIGROUPS 9 Example 6.1. If V is a semigroup pseudovariety containing some nontrivial monoid and such that V = V ∗ D, then V is letter super-cancelative (cf. [7, Prop. 1.60] and [1, Exercise 10.2.10]). In [4] one finds a characterization of the (right/left) super-cancelative pseudovarieties as a routine exercise of application of basic results in the theory of profinite semigroups. The following simple observation is included in that characterization. Lemma 6.2. A semigroup pseudovariety V is right letter super-cancelative if and only if D ⊆ V and V is right letter cancelative. Dually, V is left letter super-cancelative if and only if K ⊆ V and V is left letter cancelative. Therefore, V is letter super-cancelative if and only if LI ⊆ V and V is letter cancelative. Letter super-cancelability appears as a necessary condition for equidivisibility in the following way. Proposition 6.3. If V is an equidivisible pseudovariety of semigroups not contained in CS then V is letter supper-cancelative. Proof. Fix a finite alphabet A. Let u, v ∈ (ΩA S)I and let a, b ∈ A be such that V |= ua = vb. Since ΩA V is equidivisible, there is t ∈ (ΩA V)I such that V |= ut = v and V |= a = tb, or such that V |= vt = u and V |= b = ta. Suppose that t 6= I. Suppose also that V |= a = tb. Replacing by a every letter occurring in tb, we get V |= a = aν for some profinite exponent ν > 1. This implies that V ⊆ CR. Corollary 5.3 states that the equidivisible subpseudovarieties of CR are precisely the subpseudovarieties of CS. Since V is not contained in CS, we reach a contradiction. Similarly, V |= a = tb leads to a contradiction. To avoid the contradiction, we must have t = I, whence a = b and V |= u = v. Symmetrically, V |= au = bv implies a = b and V |= u = v.  Combining Proposition 6.3 with Lemma 6.2 we get the following corollary. Corollary 6.4. If V is an equidivisible pseudovariety not contained in CS, then V contains LI.  7. Equidivisible subpseudovarieties of LG Recall that the class LG of all finite local groups is the largest pseudovariety of semigroups whose semilattices are trivial. Local groups are thus generalizations of completely simple semigroups that turn out to be sometimes much harder to handle. For our purposes, the following technical result turns out to be essential. Lemma 7.1. If V is a subpseudovariety of LG containing D, then V is right letter super-cancelative. Proof. Let u and v be pseudowords and a and b be letters such that the pseudoidentity ua = vb holds in V. The pseudovariety D is right letter super-cancelative, whence a = b and D satisfies u = v. In particular, u = v or both u and v are infinite pseudowords. Suppose the latter case occurs. Let sn be the suffix of u of length n, which is also the suffix of length n of v, 10 JORGE ALMEIDA AND ALFREDO COSTA that is, there are factorizations u = un sn and v = vn sn . By compactness, there exists a convergent subsequence of the sequence of triples (un , vn , sn ) and, therefore, there exist pseudowords u′ , v ′ , w, where w is infinite, such that u = u′ w and v = v ′ w (in S). Since w is infinite, there is a factorization of the form w = w1 w2ω w3 [1, Corollary 5.6.2]. As V is contained in LG, it must satisfy the following pseudoidentities: w = w1 w2ω w3 = w1 (w2ω w3 aw2ω )ω w3 = w1 w2ω w3 at = wa · t where t = (w2ω w3 aw2ω )ω−1 w3 . Hence, since the pseudovariety V satisfies ua = va, it also satisfies u = u′ w = u′ wa · t = ua · t = va · t = v ′ wa · t = v ′ w = v.  Theorem 7.2. A subpseudovariety of LG is equidivisible if and only if it is contained in CS or it contains LI. Proof. We already know that every subpseudovariety of CS is equidivisible by Theorem 5.1. Thus, for the remainder of the proof, we assume that V is a subpseudovariety of LG not contained in CS. If V is equidivisible, then V contains LI by Corollary 6.4. For the converse, suppose that V contains LI and that V satisfies the pseudoidentity uv = xy. By Lemma 7.1, V is right letter super-cancelative. By duality, V is also left letter super-cancelative. Therefore, to prove that there is a (possibly empty) pseudoword t such that in V we have ut = x and v = ty, or xt = u and y = tv, we may assume that all the pseudowords u, v, x, y are infinite. Hence, uv = xy may be viewed as an equality between products in the minimum ideal of a suitable ΩA V, which is a completely simple semigroup. By Theorem 5.1, we may conclude that V is equidivisible.  8. Characterization of equidivisible pseudovarieties Let ϕ be a homomorphism from A+ onto a semigroup S. Given u ∈ A+ , a transition edge for u in Γϕ is an element of T (pu ). Note that T (pu ) is always nonempty, since there is no path from (ϕ(u), I) to (I, ϕ(u)) in Γϕ . If A and S are finite, then T (pu ) is finite and so, for some integer n, we can consider the sequence (εi )i∈{1,...,n} of transition edges for u in Γϕ , where εi is the i-th transition edge appearing in pu . In this section we shall work primarily with the expansion ϕK(ℓI) , but at some point it will be convenient to use another expansion which we next describe. In a graph, the content of a path p is the set c(p) of edges in the path. Consider the relation ≡ϕ,Sl on A+ defined by u ≡ϕ,Sl v if and only if c(pu ) = c(qv ). Note that since pw starts at (I, ϕ(w)), if u ≡ϕ,Sl v then ϕ(u) = ϕ(v) holds. The relation ≡ϕ,Sl is a congruence and the quotient homomorphism A+ → A+ /≡ϕ,Sl is precisely the two-sided semidirect product expansion ϕK(ℓSl) : A+ → S K(ℓSl) (cf. [10, Sec. 5.4]).1 1The reader is cautioned for some misprints in the discussion made in [10, Sec. 5.4]; for instance, at some point a map ψ is defined that takes a word u to the set of edges in pu , and not to the set of transition edges as by mistake it is written there. The characterization of ϕK(ℓSl) is an application of [10, Corollary 5.4] and of a result of I. Simon [22] (a proof of which may be found in [9, Theorem VIII.7.1]) stating that two paths in a graph have the same content if and only if they are equal in the free category relatively to ℓSl. EQUIDIVISIBLE PSEUDOVARIETIES OF SEMIGROUPS 11 Suppose moreover that A and S are finite. Then S K(ℓI) and S K(ℓSl) are both finite semigroups. Denote by Φ (respectively, ΦK(ℓI) and ΦK(ℓSl) ) the unique continuous homomorphism from ΩA S onto S (respectively, S K(ℓI) and S K(ℓSl) ) whose restriction to A+ is ϕ (respectively, ϕK(ℓI) and ϕK(ℓSl) ). Let u ∈ ΩA S. Consider an arbitrary sequence (un )n of elements of A+ converging to u. Then, there is N such that ΦK(ℓI)(u) = ϕK(ℓI) (un ) for every n ≥ N . Therefore, we can define a transition edge for u in Γϕ as being an element of T (pun ) for every sufficiently large n, since this set depends only on ϕ and u. In a similar way, one can define the sequence of transition edges for u in Γϕ as being the sequence of transition edges for un in Γϕ for every sufficiently large n, and an edge for u in Γϕ as being an element of c(pun ) for every sufficiently large n. Note that a transition edge for u is indeed an edge for u. If ψ is a continuous homomorphism from ΩA S onto a finite semigroup T , then we denote by Γψ the two-sided Cayley graph of the restriction of ψ to A+ . Since ψ is the unique continuous extension to ΩA S of its restriction to A+ , the homomorphisms ψ K(ℓI) and ψ K(ℓSl) are defined in view of K(ℓI) K(ℓSl) , the previous paragraph. Their images are also denoted Sϕ and Sψ respectively. Lemma 8.1. Let ϕ be a continuous homomorphism from ΩA S onto a finite semigroup S, where A is a finite alphabet. Let u ∈ ΩA S. If ((s1 , t1 ), a, (s2 , t2 )) is an edge for u in Γϕ , then there is a factorization u = u1 au2 of u, with u1 , u2 ∈ (ΩA S)I , such that ϕ(u1 ) = s1 and ϕ(u2 ) = t2 . Proof. We may consider a sequence (un )n of elements of A+ converging to u and such that ϕK(ℓSl) (un ) = ϕK(ℓSl) (u) for every n. In particular, for every n, the edge ((s1 , t1 ), a, (s2 , t2 )) is an edge for un in Γϕ , and so un factors as un = un,1 aun,2 for some un,1 , un,2 ∈ A∗ such that ϕ(un,1 ) = s1 and ϕ(un,2 ) = t2 . By compactness, the sequence of pairs (un,1 , un,2 ) has some accumulation point (u1 , u2 ) in (ΩA S)I × (ΩA S)I . By continuity of multiplication and of ϕ, we have u = u1 au2 , ϕ(u1 ) = s1 and ϕ(u2 ) = t2 .  Lemma 8.2. Let θ : B + → A+ be a homomorphism satisfying θ(B) = A, for some alphabets A and B. Consider a homomorphism ϕ from A+ onto a semigroup S. Let ψ be the homomorphism from B + onto S such that ψ = ϕ ◦ θ. Then we have ψ K(ℓI) (u) = ψ K(ℓI) (v) =⇒ ϕK(ℓI) (θ(u)) = ϕK(ℓI) (θ(v)), K(ℓI) for every u, v ∈ B + . Consequently, Sϕ K(ℓI) is a homomorphic image of Sψ . Proof. The proof relies on the following fact: there is in Γψ a path from (s1 , t1 ) to (s2 , t2 ) labeled by u ∈ B + if and only if there is in Γϕ a path from (s1 , t1 ) to (s2 , t2 ) labeled by θ(u) ∈ A+ . In particular, ((s1 , t1 ), b, (s2 , t2 )) is a transition edge of Γψ if and only if ((s1 , t1 ), θ(b), (s2 , t2 )) is a transition edge of Γϕ . Let u, v ∈ B + be such that ψ K(ℓI) (u) = ψ K(ℓI) (v). Then we immediately have ϕ(θ(u)) = ϕ(θ(v)). Suppose that ((s1 , t1 ), a, (s2 , t2 )) is a transition edge of Γϕ belonging to the path pθ(u) . We have s1 = ϕ(w1 ) and t2 = ϕ(w2 ) for some w1 , w2 ∈ A∗ such that θ(u) = w1 aw2 . There is a factorization 12 JORGE ALMEIDA AND ALFREDO COSTA u = u1 bu2 with w1 = θ(u1 ), w2 = θ(u2 ) and a = θ(b). It then follows that ((s1 , t1 ), b, (s2 , t2 )) is a transition edge of Γψ belonging to pu . It belongs also to pv , since ψ K(ℓI) (u) = ψ K(ℓI) (v). Therefore, ((s1 , t1 ), a, (s2 , t2 )) is a transition edge of Γϕ in pθ(v) . Symmetrically, every transition edge of Γϕ belonging to pθ(v) also belongs to pθ(u) , establishing that ϕK(ℓI) (θ(u)) = ϕK(ℓI) (θ(v)). K(ℓI) K(ℓI) → Sϕ Therefore, we can consider the onto homomorphism ρ : Sψ defined by ρ(ψ K(ℓI) (u)) = ϕK(ℓI) (θ(u)).  We are now ready to prove our main result. Theorem 8.3. A pseudovariety of semigroups V is equidivisible if and only if it is contained in CS or it is closed under the two-sided Karnofsky-Rhodes expansion. Proof. The “if” part follows from Corollaries 4.4 and 5.3. Conversely, suppose that V is an equidivisible pseudovariety not contained in CS. Let u, v be elements of ΩX S such that V |= u = v, where X is some finite alphabet. For a finite alphabet A, let ϕ be a continuous homomorphism from ΩA S onto a semigroup S from V. Consider the finite alphabet B = A∪ X. There is a continuous onto homomorphism θ : ΩB S → ΩA S such that θ(B) = A. Let ψ be the unique continuous homomorphism from ΩB S K(ℓI) onto S such that ψ = ϕ ◦ θ. We will show that Sψ |= u = v. Viewing u, v as elements of ΩB S, and because V |= u = v, we have ψ(u) = ψ(v). We claim that ψ K(ℓI) (u) = ψ K(ℓI) (v). Let (εi )i∈{1,...,n} and (δi )i∈{1,...,m} be the sequences of transition edges in Γψ respectively for u and for v. Without loss of generality, we may assume that n ≤ m. Suppose that the set (8.1) {i ∈ {1, . . . , n} | εi 6= δi } is nonempty, and let j be its minimum. By Lemma 8.1, there are factorizations u = u1 au2 of u and v = v1 bv2 of v, with a, b ∈ B and u1 , u2 , v1 , v2 ∈ (ΩB S)I , such that εj = ((ψ(u1 ), ψ(au2 )), a, (ψ(u1 a), ψ(u2 )) and δj = ((ψ(v1 ), ψ(bv2 )), b, (ψ(v1 b), ψ(v2 )). Note that α(εj ) and α(δj ) belong to the same strongly connected component of Γψ , by the minimality of the index j. Since V |= u1 a · u2 = v1 · bv2 and V is equidivisible, there is t ∈ (ΩB S)I such that (8.2) V |= u1 at = v1 and V |= u2 = tbv2 , V |= v1 t = u1 a and V |= bv2 = tu2 . or (8.3) If Case (8.2) holds, then there is in Γψ a (possibly empty) path from ω(εj ) to α(δj ), labeled by a word t0 ∈ B ∗ such that ψ(t0 ) = ψ(t). Since α(δj ) and ω(δj ) belong to the same strongly connected component, we conclude EQUIDIVISIBLE PSEUDOVARIETIES OF SEMIGROUPS 13 there is in Γψ a path from ω(εj ) to α(εj ), contradicting the fact that εj is a transition edge. Therefore, Case (8.3) holds with t 6= I. By Proposition 6.3, it follows from (8.3) that there is t′ ∈ (ΩB S)I with t = t′ a and (8.4) V |= v1 t′ = u1 and V |= bv2 = t′ au2 . Suppose that t′ 6= I. Again by Proposition 6.3, it follows from (8.4) that there is t′′ ∈ (ΩB S)I with t′ = bt′′ and (8.5) V |= v1 b · t′′ = u1 and V |= v2 = t′′ · au2 . This implies the existence of a path in Γψ from ω(δj ) to α(εj ), which once more leads to a contradiction with the definition of a transition edge. Therefore, we have t′ = I, and so, thanks to Proposition 6.3, from (8.4) we get V |= v1 = u1 , a = b and V |= v2 = u2 . This yields εj = δj , which contradicts the initial assumption. Therefore, the set (8.1) is empty. In particular, εn = δn holds. Since εn is the last transition edge for u, we have ω(δn ) = (ψ(u), I), which means that δn is the last transition edge for v, whence m = n and εi = δi for every i ∈ {1, . . . , n}. This concludes the proof that ψ K(ℓI) (u) = ψ K(ℓI) (v). Now, let ζ be an arbitrary continuous homomorphism from ΩB S into K(ℓI) Sψ . Because ψ K(ℓI) is onto, there is a continuous endomorphism λ of ΩB S such that ζ = ψ K(ℓI) ◦ λ. Since we also have V |= λ(u) = λ(v), we K(ℓI) |= u = v. deduce that ζ(u) = ζ(v). This establishes our claim that Sψ K(ℓI) Applying Lemma 8.2, we conclude that Sϕ |= u = v. By Reiterman’s K(ℓI) Theorem [17], we deduce that Sϕ ∈ V, thus proving that V is closed under the two-sided Karnofsky-Rhodes expansion.  Corollary 8.4. Let V be a pseudovariety of semigroups. The following conditions are equivalent: (1) V is equidivisible and it is not contained in CS; (2) V = LI m V; (3) V is closed under the two-sided Karnofsky-Rhodes expansion; (4) V is closed under the two-sided connected expansion. Proof. The equivalence (2)⇔(3) is Corollary 3.3. In particular, a pseudovariety closed under the the two-sided Karnofsky-Rhodes expansion contains LI. As LI is not contained in CS, the equivalences (1)⇔(2)⇔(3) then follow from Theorem 8.3. Since the two-sided connected expansion is a quotient of the two-sided Karnofsky-Rhodes expansion, we clearly have (3)⇒(4). Conversely, suppose that V is closed under the two-sided connected expansion. By Proposition 4.3, V is equidivisible. We claim that V is not contained in CS. Consider the mapping ϕ from Ω{a} S onto the trivial semigroup S = {1}. The path in Γϕ from (I, 1) to (1, I) labeled a intersects precisely two strongly connected components of Γϕ , while, for every k ≥ 2, the path in Γϕ from (I, 1) to (1, I) labeled ak intersects precisely three strongly connected components of Γϕ . Therefore, denoting by ϕC the canonical continuous homomorphism from Ω{a} S to S C whose restriction to {a}+ is the connected expansion of ϕ|{a}+ , we have ϕC (a) 6= ϕC (aω+1 ). This shows 14 JORGE ALMEIDA AND ALFREDO COSTA that S C ∈ / CR, establishing the claim, and concluding the proof that we have (4)⇒(1).  There is one important further connection of the conditions of Corollary 8.4 with varieties of languages. Indeed, as has been proved by Pin [14] (cf. [15, Theorem 7.3]), the language counterpart of the operator V 7→ LI m V is the closure under unambiguous product. We conclude the paper with one further application of our results for pseudovarieties of local groups. Combining Corollary 8.4 with Theorem 7.2, we obtain the following. Corollary 8.5. If V is a subpseudovariety of LG containing LI then V =  LI m V. It is well known that LI ∨ H = LI m H for every pseudovariety H of groups [11, Corollary 3.2]. The previous results provide an indirect proof of the following extension of that fact, which appears to be new. Corollary 8.6. If V is a subpseudovariety of LG then LI ∨ V = LI m V. Proof. Let V be a subpseudovariety of LG. Then the pseudovariety LI ∨ V is equidivisible by Theorem 7.2. Therefore, applying Corollary 8.5, we obtain  LI ∨ V = LI m (LI ∨ V) ⊇ LI m V ⊇ LI ∨ V. Reading [8, Corollary 4.3] one finds the following basis for LI ∨ CS: LI ∨ CS = [[z ω (xy)ω xtω = z ω xtω , xy ω z = (xy ω z)ω+1 ]]. As an example of application of Corollary 8.6, we obtain a simplified basis for LI ∨ CS, made of a pseudoidentity involving only three letters. Proposition 8.7. The pseudovariety LI∨CS is defined by the pseudoidentity (xy)ω (xz)ω (xy)ω = (xy)ω . Proof. By [5, Theorem 6.1], taking Σ = {(zt)ω z = z}, H = I, W = {x1 }, m = 0, and α1 = xω+1 , we obtain that the pseudovariety LI m CS is defined 1 by the following pseudoidentities:  ω ω ω ω x(zt)ω zy xzy x(zt)ω zy (8.6) = x(zt)ω zy ω+1 (8.7) (xzy)ω−1 x(zt)ω zy (xzy)ω = (xzy)ω . Note that the first of these pseudoidentities is valid in LG while the pseudovariety defined by the second one is contained in LG. Hence, LI m CS is defined by the pseudoidentity (8.7). Further simplifications of the pseudoidentity (8.7) may be carried out as follows. First, since it defines a subpseudovariety of LG, the (ω+1)-power of the infinite element in the middle may be replaced by the base of that power. Second, pre-multiplying both sides by zy, postmultiplying by x(zyx)ω−1 and applying suitable conjugations to shift infinite powers, we obtain the pseudoidentity (zyx)ω (zt)ω (zyx)ω = (zyx)ω . Substituing x by zy, we deduce the equivalent pseudoidentity (zy)ω (zt)ω (zy)ω = (zy)ω , as the former can be recovered by substituting in the latter y by yx. Renaming variables, this shows that (xy)ω (xz)ω (xy)ω = (xy)ω is a simplified  basis for LI m CS. Finally, we apply Corollary 8.6. EQUIDIVISIBLE PSEUDOVARIETIES OF SEMIGROUPS 15 References 1. J. Almeida, Finite semigroups and universal algebra, World Scientific, Singapore, 1995, English translation. 2. , Profinite semigroups and applications, Structural theory of automata, semigroups and universal algebra (New York) (V. B. Kudryavtsev and I. G. Rosenberg, eds.), Springer, 2005, pp. 1–45. 3. J. Almeida and A. Costa, Infinite-vertex free profinite semigroupoids and symbolic dynamics, J. Pure Appl. Algebra 213 (2009), 605–631. 4. J. Almeida and O. Klı́ma, Representations of relatively free profinite semigroups, irreducibility, and order primitivity, Tech. report, Univ. Masaryk and Porto, 2015, arXiv:1509.01389. 5. J. Almeida, S. Margolis, B. Steinberg, and M. Volkov, Characterization of group radicals with an application to mal’cev products, Illinois J. Math. 54 (2010), 199–221. 6. L. Chaubard, J.-E. Pin, and H. Straubing, Actions, wreath products of C-varieties and concatenation product, Theor. Comp. Sci. 356 (2006), 73–89. 7. A. Costa, Semigrupos profinitos e dinâmica simbólica, Ph.D. thesis, Univ. Porto, 2007. 8. J. C. Costa, Some pseudovariety joins involving locally trivial semigroups, Semigroup Forum 64 (2002), 12–28. 9. S. Eilenberg, Automata, languages and machines, vol. B, Academic Press, New York, 1976. 10. G. Z. Elston, Semigroup expansions using the derived category, kernel, and Malcev products, J. Pure Appl. Algebra 136 (1999), no. 3, 231–265. 11. T. E. Hall and P. Weil, On radical congruence systems, Semigroup Forum 59 (1999), 56–73. 12. F. W. Levi, On semigroups, Bull. Calcutta Math. Soc. 36 (1944), 141–146. 13. J. D. McKnight, Jr. and A. J. Storey, Equidivisible semigroups, J. Algebra 12 (1969), 24–48. 14. J.-E. Pin, Propriétés syntactiques du produit non ambigu, Automata, languages and programming (Proc. Seventh Internat. Colloq., Noordwijkerhout, 1980) (Berlin), Lect. Notes in Comput. Sci., vol. 85, Springer, 1980, pp. 483–499. 15. , Syntactic semigroups, Handbook of Formal Languages (G. Rozenberg and A. Salomaa, eds.), Springer, 1997. 16. J.-E. Pin, H. Straubing, and D. Thérien, Locally trivial categories and unambiguous concatenation, J. Pure Appl. Algebra 52 (1988), 297–311. 17. J. Reiterman, The Birkhoff theorem for finite algebras, Algebra Universalis 14 (1982), 1–10. 18. J. Rhodes and B. Steinberg, Profinite semigroups, varieties, expansions and the structure of relatively free profinite semigroups, Int. J. Algebra Comput. 11 (2002), 627–672. 19. , The q-theory of finite semigroups, Springer Monographs in Mathematics, Springer, 2009. 20. J. Rhodes and B. Tilson, The kernel of monoid morphisms, J. Pure Appl. Algebra 62 (1989), 227–268. 21. J. Rhodes and P. Weil, Decomposition techniques for finite semigroups, using categories II, J. Pure Appl. Algebra 62 (1989), 285–312. 22. I. Simon, Hierarchies of events of dot-depth one, Ph.D. thesis, Univ. Waterloo, 1972. 23. H. Straubing, Aperiodic homomorphisms and the concatenation product of recognizable sets, J. Pure Appl. Algebra 15 (1979), 319–327. CMUP, Departamento de Matemática, Faculdade de Ciências, Universidade do Porto, Rua do Campo Alegre 687, 4169-007 Porto, Portugal. E-mail address: [email protected] CMUC, Department of Mathematics, University of Coimbra, Apartado 3008, EC Santa Cruz, 3001-501 Coimbra, Portugal. E-mail address: [email protected]
4math.GR
INDUCTIVE MCKAY CONDITION FOR FINITE SIMPLE GROUPS OF TYPE C arXiv:1612.03741v1 [math.RT] 12 Dec 2016 MARC CABANES AND BRITTA SPÄTH Abstract. We verify the inductive McKay condition for simple groups of Lie type C, namely finite projective symplectic groups. This contributes to the program of a complete proof of the McKay conjecture for all finite groups via the reduction theorem of IsaacsMalle-Navarro and the classification of finite simple groups. In an important step we use a new counting argument to determine the stabilizers of irreducible characters of a finite symplectic group in its outer automorphism group. This is completed by analogous results on characters of normalizers of Sylow d-tori in those groups. 1. Introduction The McKay conjecture is one of the most important, basic but still open among the counting conjectures in the representation theory of finite groups. For G a finite group and ℓ a prime, denoting by Irrℓ′ (G) the set of irreducible characters of G of degree prime to ℓ, the McKay conjecture asserts that | Irrℓ′ (G)| = | Irrℓ′ (N)| where N is the normalizer in G of one of its Sylow ℓ-subgroups. After the reduction theorem of Isaacs-Malle-Navarro [IMN07], showing that this conjecture holds if all simple groups satisfy a stronger version of it, the so-called inductive McKay condition, several works have recently contributed to the verification of that condition for simple groups. After [S12], [CS13], [CS15] and [MS16], it is left open to verify it for odd primes ℓ and simple groups of Lie type, whose defining characteristic is some p 6= ℓ and whose type is among B, C, D, 2 D, E6 , 2 E6 , E7 . We solve here type C. A similar method should apply equally to other types. As in several other checkings, our starting point is the criterion for the inductive McKay condition introduced in [S12, 2.12]. The assumptions of this criterion can be divided into a global condition, a local condition and the existence of a bijection. Our Theorems 3.1, 5.1 and 6.2 deal separately with each part. We should mention that Jay Taylor has proved independently Theorem 3.1 in [T16] with different methods related to generalized Gelfand Graev representations. Theorem 1. The inductive McKay condition from [IMN07, §10] holds for projective symplectic groups over finite fields. Our proof starts with the checking of the global condition in Sections 2-3. We propose there a new method to study the stabilizers of irreducible characters, thus establishing the Date: August 2016. 2010 Mathematics Subject Classification. Primary 20C15, 20C33; Secondary 20G40. Key words and phrases. McKay conjecture, symplectic groups, action of automorphisms on characters. 1 2 MARC CABANES AND BRITTA SPÄTH assumption from Theorem 2.12(v) in [S12]. In the types B, C and E7 we show that this condition holds if and only if two numbers of invariant characters coincide, see Proposition 2.2. Thanks to Brauer’s permutation Lemma, one of those numbers can be computed by counting conjugacy classes invariant under certain automorphisms. The other number is also determined in a very elementary way. We provide explicit formulas in the case of a group G = GF where G is a symplectic group over Fp and F is a Frobenius endomorphism associated with the subfield Fq of Fp . Then Sections 4–5 consider the characters of the relevant local subgroups, namely N = NG (S)F where S is a so-called Sylow d-torus of G for d the order of q mod ℓ. The groups CG (S)F and NG (S)F /CG (S)F have a well-known “generic” description (see [BM92]), but knowing enough of the structure of N = NG (S)F to get decisive information on Irr(N) requires nevertheless a lot of specific work. The general strategy used here is the one of Section 5 of [CS15]. Most of the additional effort is devoted to the structure of groups closely related to the extended Weyl groups of type C, using certain elements defined in the associated braid group. e F (a conformal As a corollary of the latter considerations we obtain a bijection for G symplectic group) as required in the criterion of [S12, 2.12], see Theorem 6.2. In Section 6 we also assemble our previous results to conclude our proof of Theorem 1. Acknowledgement: The first author thanks the working group “Algebra und Zahlentheorie” in Wuppertal for its hospitality. Both authors thank also the Bernoulli Centre at the EPFL Lausanne for their nice stay. 2. Notation and general considerations We first explore quite generally how to ensure assumption 2.12(v) of Theorem 2.12 in [S12] for certain simple groups of Lie type. This assumption requires that given a prime ℓ every χ ∈ Irrℓ′ (G) has a stabilizer in Out(G) of a specific structure, where G is the universal covering group of the simple group considered. Note that in the case of a simple group of Lie type C, B or E7 , we have Out(G) ∼ = C2 × Cm (m ≥ 1) where the first factor corresponds to the so called “diagonal” automorphisms and the second summand corresponds to field automorphisms. The condition in [S12, 2.12(v)] then clearly reduces to the fact that stabilizers of elements of Irr(G) in Out(G) are subproducts of the above direct product. Let Gsc be a simple simply connected algebraic group over Fp (p a prime). Let F0 : Gsc → Gsc a Frobenius endomorphism defining Gsc over Fp . Let F1 be a power of F0 and F a power of F1 , thus inducing an automorphism of GFsc . Denote G = GFsc and assume it is the universal covering group of the simple group G/ Z(G). We assume fixed (Gsc , F ); only F1 will be allowed to vary. e be a regular embedding endowed with a Frobenius and field automorphism Let Gsc → G extending our initial F , F1 (see the next section for an explicit choice in the relevant cases). e = G e F . Let δ : G → G be a non-interior diagonal automorphism, that is the Denote G e \ GC e (G). conjugation by an element of G G INDUCTIVE MCKAY CONDITION FOR FINITE SIMPLE GROUPS OF TYPE C 3 Recall that for a finite group H, Cl(H) denotes the set of conjugacy classes and Irr(H) the set of irreducible (ordinary) characters. As above we denote by Cl(H)A the A-invariant conjugacy classes of H, whenever a group A acts on H and Cl(H)a for Cl(H)hai for any a ∈ A. e F1 ) be the number of F1 -stable Definition 2.1. Let c(δ, F1 ) = | Cl(G)δF1 | and let d(G, e e of length |G/G|. e e e is given Irr(G/G)-orbits in Irr(G) (Here the action of Irr(G/G) on Irr(G) by multiplication with the linear characters.) The relevance to our purpose comes from the following Proposition 2.2. Assume that the root system of Gsc is of type B, C or E7 , and that p 6= 2. Then the following two statements are equivalent: e : G|−1d(G, e F1 ) for any pair (δ, F1 ) as above. (1) c(δ, F1 ) = |G (2) Assumption 2.12.(v) of [S12] holds for G, i.e. for every χ ∈ Irr(G) and (δ, F1 ), one can have χF1 = χδ only if χ = χF1 = χδ . Proof. We use the same letters to denote the images of δ and F1 in the outer automorphism group. Note that in the types concerned the outer automorphism group is hδi × hF0 i where δ (of order 2) induces a non-trivial diagonal outer automorphism, which corresponds to e on G . the action of G e : G|−1 d(G, e F1 ) = | Irr(G)hδ,F1 i |. Indeed since G e acts on Irr(G) by We also note that |G e restrict to G without multiplicity, the set Irr(G)δ = Irr(G)Ge is the δ and characters of G e the set of characters of G e that restrict irreducibly to G. image by restriction of Irr′ (G), e : G|. The restrictions that are F1 -fixed are the ones that The fibers have cardinality |G e which is sent by F1 to a multiple by a linear are the restriction of an element of Irr(G) e character of G/G. This gives our claim. Now (1) is equivalent to the equality | Cl(G)δF1 | = | Irr(G)hδ,F1i |. Thanks to Brauer’s permutation lemma (see [I, 6.32]), (1) is then equivalent to | Irr(G)δF1 | = | Irr(G)hδ,F1 i |. We now check the equivalence of the above with (2). A subgroup H of hδi × E can be different from a product of subgroups of each of those factors only if it projects non-trivially on the first summand and δ ∈ / H. Let F1 be a generator of the projection of H to E. If H has not the required structure it contains δF1 for some non-trivial δ. If (1) is assumed then Irr(G)δ F1 = Irr(G)hδ ,F1 i as seen before. So, if H is now the stabilizer of a character, then this character is δ-invariant. A contradiction showing that (1) implies (2). The converse is trivial.  e F1 ) from Definition 2.1 is accessible via the following counting in the The number d(G, e ∗ be dual to G e with associated endomorphisms F1 and F in the sense of dual group. Let G ∗ e [CE, 8.4]. If s ∈ G we denote by A(s) the group of connected components of the stabilizer e ∗ ) in G e ∗ . We abbreviate G e∗ = G e ∗F . of s Z(G 4 MARC CABANES AND BRITTA SPÄTH e F1 ) is Lemma 2.3. Keep the same hypotheses as in Proposition 2.2 above. Then d(G, e∗ -conjugacy classes of pairs (s, λ) where s ∈ G e∗ is semi-simple, λ ∈ the number of G F E(CGe∗ (s) , 1) (unipotent characters) is such that the stabilizer of λ under A(s)F is trivial, e∗ -conjugacy class of (s Z(G e ∗ ), λ) is F1 -stable. and the G e F1 ) is the number of elements Proof. We have seen in the proof of Proposition 2.2 that d(G, e that restrict irreducibly to G and whose image under F1 is a multiple by a of Irr(G) e e (linear) character of G/G. Through Lusztig’s Jordan decomposition of characters of G, e are parametrized (s, λ) 7→ χs,λ by G e∗ -conjugacy classes of pairs the elements of Irr(G) e ∗F , λ ∈ E(C e∗ (s)F , 1). The action of F1 is then given by acting on the (s, λ) with s ∈ G ss G pair (s, λ) (see [CS13, 3.1]). The character χs,λ restricts irreducibly to G if and only if e A(s)Fλ = 1 (see [L88, 5.1]). The action of linear characters of G/G also corresponds to ∗ F e Z(G ) -translation of s (see [CE, 8.26]). This gives our claim.  3. The global condition in Type C In this section we prove Theorem 3.1 by verifying the statement of Proposition 2.2(1) in the particular case where Gsc has a root system of type Cl . Accordingly, from now on we e = CSp2n (Fq ), G = Sp2n (q) = GF and G e := CSp2n (q). assume Gsc = Sp2n (Fq ), G Theorem 3.1. Let χ ∈ Irr(G). For any field automorphism F1 and any diagonal automorphism δ of G the equality χF1 = χδ implies χ = χF1 = χδ . Before computing the number of δF1 -invariant G-conjugacy classes in G we describe in general their parametrization and the action of automorphism in terms of their parameters. e In a second part of this section we compute the relevant number of characters of G. 3.A. Conjugacy classes. We first recall the parametrization of conjugacy classes of G = GF = Sp2n (q) (see [W63, 2.6], [Mi69, §3]). × × In the following we denote by Fq the set Fp / hF i of orbits of Fp under the map F taking the q-th power. For any P ∈ Fq , we denote by P −1 ∈ Fq the set of inverses of elements of P.   0 −Jn 2n Let V = (Fq ) be the symplectic space over Fq whose form h , iV is given by Jn 0 with Jn = (δi,n+1−j )1≤i,j≤n . We identify G with Sp(V ). We recall the parametrization of Cl(G) following the approach of Cikunov-Milnor (see [Mi69, §3]): The conjugacy class containing x ∈ G corresponds to (m, Ψ+ , Ψ− ), where × 2 m : Fq × Z≥1 → Z≥0 and Ψ+ , Ψ− : Z≥1 → F× q /(Fq ) are defined at the class of x as follows. First m is given by the Jordan normal form of x seen as an element of GL2n (q), namely m(P, j) is the number of Jordan blocks of size j associated to any eigenvalue of x belonging to P . Let ǫ = ±1, then Ψǫ is defined as follows. For j ≥ 1, let Kj (ǫ) := ker((x − ǫ)j ) and ′ V2j (ǫ) := K2j (ǫ)/(K2j−1 (ǫ) + (x − ǫ)K2j+1 (ǫ)), an m(ǫ, 2j)-dimensional Fq -space. Then via (ū, v̄)j,ǫ = h(x − x−1 )2j−1 u, viV for any u, v ∈ (ker(x − ǫ)2j ) one obtains a symmetric INDUCTIVE MCKAY CONDITION FOR FINITE SIMPLE GROUPS OF TYPE C 5 non-degenerate form on V2j′ (ǫ). One defines Ψ+ , Ψ− such that Ψǫ (j) gives the Witt type of (ū, v̄)j,ǫ and equals 1 whenever m(ǫ, 2j) = 0. Theorem 3.2. Let C be the set of triples (m, Ψ+ , Ψ− ) with m : Fq × Z≥1 → Z≥0 and × 2 −1 Ψ+ , Ψ− : Z≥1 → F× q /(Fq ) that satisfy m(P P, j) = m(P, j), m(1, 2j−1) ∈ 2Z, m(−1, 2j− 1) ∈ 2Z for every (P, j) ∈ Fq × Z≥1 , and (P,j)∈Fq ×Z≥1 j · m(P, j) · |P | = 2n. Then the conjugacy classes of GF are parametrized by C through the description given above. Clearly outer automorphisms of G act on Cl(G) and hence on the parametrizing set C. The action of diagonal automorphisms has already been (implicitly) used in [L77, 6.3.3] (see also the computation of the centralizers of unipotent elements in [LS]). We provide a proof for completeness. Proposition 3.3. Let x ∈ G and (m, Ψ+ , Ψ− ) the parameter of the conjugacy class containing x. (1) For a field automorphism F1 the element F1 (x) belongs to the conjugacy class (F1 (m), Ψ+ , Ψ− ) where F1 (m)(F1 (P ), j) := m(P, j) for every (P, j) ∈ Fq × Z≥1 . e\ (2) For δ a non-interior diagonal automorphism of G (induced by an element of G e Z(G)G) the conjugacy class containing δ(x) corresponds to (m, Ψ′+ , Ψ′− ), where for every ǫ ∈ {±1}, j ≥ 1, one has Ψ′ǫ (j) 6= Ψǫ (j) if and only if m(ǫ, 2j) is odd. Proof. Via the action of F1 on the conjugacy classes of GLn (q) one easily understands the induced action on the first parameter. On the other hand it is clear that F1 is induced by an automorphism of the ground field Fq of the space V and induces the same on the Vi′ ’s. It preserves the equivalence class of any bilinear form. This completes the proof of (1). e on G. Because of G e ≤ For part (2) we consider the action of the conformal group G GL(V ), the map m is in the triple of C corresponding to δ(x). We now turn to check the effect of δ on the parameters Ψ. By decomposing V into orthogonal direct sum (see [Mi69, Th 3.2]) it is sufficient to check the case where m has only one non-zero value, i.e. y := x − 1V has Jordan type Jor(d)(m) with md = 2n and Jor(d) is the d × d matrix whose (i, i + 1) terms equal 1 and all others 0. For odd d, the above parametrization tells us that the Jordan form gives only one conjugacy class, so the latter is preserved by diagonal automorphisms. Assume now d even. Let us recall the associated non-degenerate symmetric form ( , )x defined on V ′ = V /yV by (v + yV, v ′ + yV )x := h(x − x−1 )d−1 v, v ′ iV for any v, v ′ ∈ V . We must show that the Witt types of ( , )x and ( , )δ(x) coincide for even m and always differ for odd m.   a 0 For every a ∈ GLn (q) and λ ∈ F× ∈ Sp2n (q) q , the matrices D(a) := 0 Jn t a−1 Jn   λIn 0 and cλ := commute. Moreover the elements cλ generate CSp2n (q)/ Sp2n (q). 0 In When a is a direct sum of unipotent Jordan blocks all of size d a divisor of n, then D(a) − 1 n is indeed of type Jor(d)(2 d ) = Jor(d)(m) , and we have just seen that its centralizer covers 6 MARC CABANES AND BRITTA SPÄTH the quotient CSp(V )/ Sp(V ). So CSp(V ) fixes that conjugacy class. Hence it also fixes the conjugacy class with opposite Ψ. This shows our claim in the case where m is even. In the case where m = 2m′ + 1 is odd, let us split the space into a sum V1 ⊥ V2 where V1 has dimension 2m′ d and V2 has dimension d (recall that md, hence d, is even, so this is possible). Both V1 and V2 can be assumed to be endowed with forms of the type above with respect to matrices Jm′ d and Jd/2 . Let D(a′ ) ∈ Sp(V1 ) be as in our first case with a′ a direct sum of m′ unipotent Jordan blocks   of size d. Let b be a unipotent Jordan block of b bJd/2 size d/2 and let E := . The latter is clearly in Sp(V2 ), unipotent. The 0 Jd/2 t b−1 Jd/2 rank of E − Id is easily checked to be d, since the elements on the upper second diagonal of length d − 1 are 1d/2 (−1)d/2−1 (we use exponential notation for tuples). So E is unipotent of Jordan type Id + Jor(d). Now the element x := D(a′ ) ⊥ E ∈ Sp(V1 ⊥ V2 ) is unipotent of type I2n + Jor(d)(m) . An element of CSp(V1 ⊥ V2 ) can be formed by taking cλ ’s as above with same λ ∈ F× on V1 and V2 . On V1 it commutes with D(a′ ) while on V2 it conjugates  q  b λbJd/2 E into Eλ = . The bilinear form ( , )x associated with x is clearly an 0 Jd/2 t b−1 Jd/2 orthogonal sum of the forms associated with D(a′ ) and E. On V1 the form is unaffected by the conjugation, since D(a′ ) is not changed. Let us show that the form coming from V2 (on a line) is multiplied by λ. Numbering the basis of V2 used for the matrix above as e1 . . . ed , the associated orthogonal space can be identified with the line generated by ed and the form is defined by (ed , ed )Eλ = h(Eλ − Eλ−1 )d−1 ed , ed iV2 . The elements on the upper diagonal of size d − 1 in Eλ − Eλ−1 are 2d/2−1 (2λ)1 (−2)d/2−1 (exponential notation again), and therefore(Eλ − Eλ−1 )d−1 ed = (−1)d/2−1 2d−1 λe1 = λ(E − E −1 )d−1 ed . So it is clear that (ed , ed )Eλ = λ(ed , ed )E , hence our claim.  Note that by the above statement the analogue of Theorem 3.1 clearly holds for conjugacy classes. We use the above description to count the number cn (δ, F1 ) of conjugacy classes of G = Sp2n (q) that are δF1 -invariant where F1 is a field and δ a non-inner diagonal automorphism of G. Proposition 3.4. Let q1 = |FFq 1 |. Then X n≥0 cn (δ, F1 )tn = Y (1 + t2i )2 i≥1 1 − q1 ti . Proof. This is shown via considerations analogous to [W63, p. 38]. By Proposition 3.3, we have to count all triples (m, Ψ+ , Ψ− ) ∈ C with F1 (m) = m and such that m(±1, 2j) is even for all j ≥ 1. Let an bePthe number of conjugacy classes of Sp2n (q) without ±1 as eigenvalue, and f0 (t, q) = an tn be its generating function 1/2 (denoted as F0 (t ) in [W63, p 37]). Let X Partn := {(m1 , m2 , . . .) | mi ∈ Z≥0 and imi = n}, i INDUCTIVE MCKAY CONDITION FOR FINITE SIMPLE GROUPS OF TYPE C P 7 P s(m) := |{i | m2i 6= 0}|, bn := m∈Partn 2s(m) and f+′ (t) = n≥0 bn tn . Each element x ∈ G induces an x-stable orthogonal decomposition V = V0 ⊥ V± with x having no eigenvalue ±1 on V0 and only ±1 on V± . The restrictions are described by the maps m and (Ψ+ , Ψ− ) respectively. The condition that F1 (m) = m means that the retriction of x to V0 has to be in Sp(V0 )F1 . Inputing also the condition on (Ψ+ , Ψ− ) coming from δF1 -stability, we get X cn (δ, F1 )tn = f0 (t, q1 )f+′ (t)2 . n≥0 Q i )2 One has f0 (t, q1 ) = i≥1 (1−t according to [W63, p. 37]. On the other hand by the 1−q1 ti definition of bn we easily get f+′ (t) = (1 + t + t2 + . . . )(1 + 2t2 + 2t4 + . . . )(1 + t3 + t6 + . . . )(1 + 2t4 + 2t8 + . . . ) . . . Y 1 + t2i = . i 1 − t i≥1 So we get indeed f0 (t, q1 )f+′ (t)2 = Q (1+t2i )2 i≥1 1−q1 ti and our claim.  e F1 ) 3.B. Counting certain characters. In the next step we compute the number d(G, from Definition 2.1 using the reformulation of Lemma 2.3. As above F1 acts on G by e F1 ) from raising the matrix entries to the q1 -th power, with q a power of q1 . Recall d(G, Definition 2.1. e F1 ) for G e = CSp2n (Fp ), with d′ = 1. Then Proposition 3.5. Denote d′n := (q − 1)−1 d(G, 0 ! X X 2 Y 1 d′n tn = tj +j . i )(1 − t2i ) (1 − q t 1 n≥0 j≥0 i≥1 e we get for G e ∗ the connected component of 1 in the Clifford Proof. With our choice of G, 0 e∗ = G e ∗F and Z := Z(G e ∗ ) a one-dimensional group (see [L77, 8.1]), denoted by G2n+1 . Let G e∗ is semi-simple recall A(s) the group of components of the stabilizer of sZ torus. If s ∈ G ∗ e . We now enumerate the (G e∗ -conjugacy classes of) pairs (s, λ) with the properties in G given in Lemma 2.3 above. e ∗ /Z = (G∗ )ad = SO(V ) = SO2n+1 (Fp ) is the adjoint group of type Bn where Recall G V is a (2n + 1)-dimensional Fq -vector space. The centralizers in SO(V ) of semi-simple elements s ∈ SO2n+1 (Fq ) are described for instance in [FS89, p. 126]. Note that −1 has to have even multiplicity as eigenvalue of s since s has determinant 1. Then the eigenspace of the eigenvalue 1 satisfies V 1 6= 0 and 2 ∤ dim(V 1 ). The centralizer of s ∈ SO2n+1 (Fp ) can be non-connected only if in addition V −1 6= 0. Then A(s)F = A(s) acts by the diagonal outer automorphism on both summands SO(V 1 )F and SO(V −1 )F of the connected centralizer. All unipotent characters of finite special orthogonal groups are fixed by diagonal automorphisms except the so-called twin characters in type D2m (see [L88, 5.1] and the remark following it). This type may occur only as SO(V −1 ) since V 1 has odd 8 MARC CABANES AND BRITTA SPÄTH dimension. So the condition that A(s)F has trivial stabilizer on our unipotent character of the connected centralizer is that one of the following two conditions are satisfied (a) A(s) = 1 or equivalently V −1 = 0 (b) V −1 has dimension 4m 6= 0 and the unipotent character of SO(V −1 )F is a twin character (then |A(s)| = 2). Unipotent characters are parametrized by classes of symbols (S, T ) (see [L77, 8.2.(i)]). Twin characters correspond to the so-called degenerate symbols with S = T . The number of classes of degenerate symbols of rank 2m is p(m), the number of partitions of m. So the number of possible unipotent characters is then 2 · p(m). Thanks to an easy discussion on eigenvalues and eigenspaces, the condition on F1 stability means that (sZ, λ) is a pair for SO2n+1 (Fq1 ) where q1 = |FFq 1 |. e∗ , while the ones from Each class in G∗ from (a) above gives rise to q − 1 classes in G part (b) give rise to (q − 1)/2 (see for instance [L77, §6.4 page 154]). So the number we e∗ -classes of pairs (sZ, λ) satisfying compute is d′n = an + bn /2 where an is the number of G e∗ -classes of pairs (sZ, λ) satisfying (b). Recall the condition (a), and bn is the number of G that unipotent characters of SO2n+1 (q) are parametrized by the set of classes of symbols of rank n and odd defect (see [L77, 8.2.(i)]). Denote by φn its cardinality. Then X X an t2n+1 = f0 (t2 , q1 ) φm t2m+1 n≥0 m≥0 Q 2m )2 where as before f0 (t2 , q) := m≥1 (1−t is the generating function denoted by F0+ (t) in 1−qt2m [W63, p. 37] and representing the number of conjugacy classes in Sp2n (q) (or SO+ 2n (q)) without eigenvalue 1 or −1. Indeed, by Jordan decomposition in even-dimensional orthogonal groups O2m (q1 ), choosing simultaneously a semi-simple element s′ without eigenvalue ±1 |ω| and a unipotent character for each factor GLm(ω) (q1 ) corresponding with the eigenvalue ω of s′ in the centralizer of s′ is combinatorially equivalent to enumerating in the same group the conjugacy classes of elements without ±1 as eigenvalue, whence the function f0 (t2 , q1 ) (see [W63, 2.6.12]) in the formula above. By the discussion made before about case (b), we also get X X X bn t2n+1 = f0 (t2 , q1 ) · ( φm t2m+1 ) · ( 2 · p(m)t4m ). n≥0 So m>0 m≥0 X n≥0 d′n t2n+1 = f0 (t2 , q1 ) · ( X φm t2m+1 ) · P(t4 ) m≥0 P Q where P is the generating function of partitions, P(t) = m≥0 p(m)tm = m>0 (1 − tm )−1 . P P 2 According to [L77, 3.4.1], one has m≥0 φm tm = P(t)2 j≥0 tj +j . So X X 2 d′n t2n+1 = tf0 (t2 , q1 )P(t2 )2 P(t4 ) t2(j +j). n≥0 j≥0 We deduce our claim (at t2 ) by substituting the formula given above for f0 (t2 , q1 ).  INDUCTIVE MCKAY CONDITION FOR FINITE SIMPLE GROUPS OF TYPE C 9 3.C. Proof of Theorem 3.1. In view of Proposition 2.2 and Lemma 2.3, we now have to compare the generating functions given by Propositions 3.4 and 3.5. After factoring out Q i )2 , the sought equality amounts to the term f0 (t, q1 ) = i≥1 (1−t 1−q1 ti X 2 Y Y ti +i = (1 − t2i ) (1 + t2i )2 , i≥0 i≥1 i≥1 an obvious consequence of the Jacobi triple product identity X 2 Y    xn y n = 1 − x2m 1 + x2m−1 y 1 + x2m−1 y −1 . n∈Z m≥1 4. The local condition - general tools Our goal in this and the following section is to prove Theorem 5.1, namely that assumpe N and D adapted to quasi-simple tion 2.12(vi) of [S12] is satisfied for a choice of G, G, groups of type Cl . This assumption requires that the stabilizers of some characters of local subgroups have a particular structure. Like in [Ma07] we choose the local subgroups (called N in [S12, 2.12]) as normalizers of Sylow d-tori. Sylow d-tori have been introduced in [BM92, 3.C] under the name of Sylow Φd -tori. In the case where the underlying root system is of type Al the analogous statement has been proven in Theorem 5.1 of [CS15]. In [MS16, §3] this property of characters of normalizers of Sylow d-tori has been proven for d ∈ {1, 2}. (In a more general sense Prop. 3.6 of [S12] can be seen as an analogue for the case where the characteristic of the underlying field coincides with the prime ℓ, but there the local groups to consider are different.) In this section we generalize the considerations of §5 of [CS15] and clarify which computations have to be done for each type and which arguments from [CS15, §5] can be transferred, see Theorems 4.3 and 4.4. We then distinguish two cases, depending on the centralizer of a Sylow d-torus being a torus or not. We start by introducing the relevant notation and recalling some definitions for later use. In the next section we consider in turn the regular and non-regular case and prove 5.1 by applying Theorems 4.3 and 4.4. In contrast to the preceding section where the symplectic group over a finite group was considered as a matrix group we see here this group as a finite subgroup of an algebraic group whose elements are subject to the Chevalley relations. This allows to formulate some results in greater generality. We follow here the notation introduced in [MS16, §2]. Notation 4.1. Let p be a prime. Let G be a simply connected simple algebraic group over an algebraic closure Fp of Fp . Let B be a Borel subgroup of G with maximal torus T. Let Φ, Φ+ and ∆ denote the set of roots, positive roots and simple roots of G that are determined by T and B. Let N := NG (T), W := NG (T)/T the Weyl group of G, and let ρ : N → W be the defining epimorphism. For the calculations with elements of G, we use the Chevalley generators subject to the Steinberg relations as in [GLS, Thm. 1.12.1], i.e., the elements xα (t1 ), nα (t2 ) and hα (t2 ) (α ∈ Φ, t1 , t2 ∈ Fq with t2 6= 0) defined therein. 10 MARC CABANES AND BRITTA SPÄTH The following endomorphisms of G will be of particular interest. Let F0 : G → G the field automorphism of G given by F0 (xα (t)) = xα (tp ) for every t ∈ Fq and α ∈ Φ. Any length-preserving automorphism of Φ stabilizing ∆ induces a graph automorphism γ of G satisfying γ(xα (t)) = xγ(α) (t) for every t ∈ Fq and α ∈ ±∆. Clearly F0 and γ commute. Let E0 be the subgroup ΓK ≤ Aut(G) from [GLS, Def. 1.15.5] corresponding to the length-preserving automorphisms of ∆. × Let r be the rank of Z(G) (as abelian group) and Z := (Fq )r a torus. Via the identificae := G ×Z(G) Z. We obtain a regular embedding tion of Z(G) with a subgroup of Z we set G e in the sense of [CE, 15.1]. Let T e := TZ and N e := NZ. Like in [MS16, 2.B] ιreg : G → G e we extend the field and graph endomorphisms introduced above to endomorphisms of G. m We consider the Steinberg endomorphism F := F0 γ for some positive integer m with e with q := pm . We let G := GF and γ ∈ E0 . Hence F defines an Fq -structure on G e := G eF. G Let D be the subgroup of Aut(G) generated by F0 and graph automorphisms commuting e ⋊ D is well defined and induces all automorphisms of G, see [GLS, with F . Then G Thm. 2.5.1]. For later it is relevant that by definition D acts on the set of F -stable subgroups of G. Let V := h nα (−1) | α ∈ Φi, H := T ∩ V and φ be the automorphism of ZΦ of finite order induced by F . Let E1 = CE0 (γ), exp(E1 ) its exponent, let e := o(φ) exp(E1 )|V |, em and let E := Cem ×E1 act on GF0 such that a generating element Fb0 of Cem acts by F0 and the second factor in the natural way (by graph automorphisms). We denote by Fb1 the em element γ Fb0m of E inducing the automorphism F on GF0 . Definition 4.2 ([CS15, Def. 5.7]). Let Y ⊳ X be finite groups. We say that maximal extendibility holds with respect to Y ⊳X if every χ ∈ Irr(Y ) extends (as irreducible character) to Xχ (stabilizer). Then, an extension map with respect to Y ⊳ X is a map [ Λ : Irr(Y ) → Irr(I) Y ≤I≤X such that for every χ ∈ Irr(X) the character Λ(χ) ∈ Irr(Xχ ) is an extension of χ. When Y ⊳ X and χ ∈ Irr(Y ), χ′ ∈ Irr(X), let us recall the notations Irr(X | χ), Irr(Y | X ′ χ ), denoting the set of irreducible components of IndX Y (χ) and ResY (χ ), respectively. We now formally give a criterion to check assumption 2.12(iv) of [S12]. This summarizes and generalizes considerations from [CS15, §5] that appeared there only in the context of type A. ′ Theorem 4.3. Let d be a positive integer. Assume there exists an element v ∈ V such e := N e (S)vF , N b := that for the Sylow d-torus S of (T, vF ) the groups N := NG (S)vF , N G e := C e (S)vF satisfy the following conditions: (CGF0em E (v Fb))S , C := CG (S)vF and C G INDUCTIVE MCKAY CONDITION FOR FINITE SIMPLE GROUPS OF TYPE C 11 (i) S is a Sylow d-torus of (G, vF ). (ii) There exists some set T ⊆ Irr(C), such that eξ = C eξ Nξ for every ξ ∈ T , (ii.1) N e N) b e N N b (ii.2) (N =N for every ξ ∈ T , and IndN IndC (ξ) IndN C (ξ) C (ξ) e (ii.3) T contains some C-transversal of Irr(C). (iii) There exists an extension map Λ with respect to C ⊳ N such that b -equivariant. (iii.1) Λ is N bξ ) (iii.2) If D is non-cyclic, every character ξ ∈ Irr(C) has an extension ξb ∈ Irr(N b N b b = Λ(ξ) and v Fb ∈ ker(ξ). with Res ξ (ξ) Nξ cd := N b /C. For ξ ∈ Irr(C) and ξe ∈ Irr(C eξ | ξ) let W e := (iv) Let Wd := N/C and W ξ b N e/C, Wξ := Nξ /C, K := NW (Wξ , W e) and K := Nc (Wξ , W e). Then there exists ξ d ξ Wd ξ for every η0 ∈ Irr(Wξe) some η ∈ Irr(Wξ | η0 ) such that b η0 -invariant. (iv.1) η is K b η ) with v Fb ∈ ker(b (iv.2) If D is non-cyclic, η extends to some ηb ∈ Irr(K η ). e0 := N e (S0 )F and ψ ∈ Then for every Sylow d-torus S0 of (G, F ), N0 := NG (S0 )F , N G e0 ) there exists some ψ0 ∈ Irr(N0 | ψ) such that Irr(N e F ∩ O0 ) ⋊ (D ∩ O0 ) for O0 := GF (G e F ⋊ D)S0 ,ψ0 , and (1) O0 = (G (2) ψ0 extends to (G ⋊ D)S0 ,ψ0 . This ensures assumption 2.12(vi) of [S12] with that choice of groups. e with the groups N0 and N e0 : the considerations in Proof. First we relate the groups N and N subsection 5.1 of [CS15], especially in the proof of Proposition 5.3 establish an isomorphism D E F b b e em ǫ : G ⋊ D → CG e F0 E (v F )/ v F . Applying this isomorphism proves the equivalence of the following two statements: e0 := N e (S0 )F and ψ ∈ (i) Let S0 be a Sylow d-torus of (G, F ), N0 := NG (S0 )F , N G e0 ). Then there exists some ψ0 ∈ Irr(N0 | ψ) such that Irr(N e F ∩ O0 ) ⋊ (D ∩ O0 ) for O0 := GF (G e F ⋊ D)S0 ,ψ0 , and • O 0 = (G • ψ0 extends to (G ⋊ D)S0 ,ψ0 . e there exists some χ0 ∈ Irr(N | χ) such that (ii) For every χ ∈ Irr(N) e N) b χ0 = N eχ0 N bχ0 , and • (N b )χ0 with v Fb ∈ ker(e χ). • χ0 has an extension χ e0 to (N If D is cyclic, the characters χ0 and ψ0 have automatically the second property by [I, Cor. (11.22)]. We use the extension map Λ for C ⊳ N from assumption (iii). Note that for every e vF )ξ and ξe ∈ Irr(hC, ti | ξ) the character ν ∈ Irr(Nξ ) given by Λ(ξ)t = Λ(ξ)ν is t ∈ (T the lift of a faithful character of Nξ /Nξe by straightforward computations. By the proof of Proposition 5.10 of [CS15] based on Clifford theory we obtain a parametrization of Irr(N): 12 MARC CABANES AND BRITTA SPÄTH Let P be the set of pairs (ξ, η) with ξ ∈ Irr(C) and η ∈ Irr(Wξ ) with Wξ = Nξ /C. Then Π : T → Irr(N) defined by (ξ, η) 7−→ IndN Nξ (Λ(ξ)η) (4.1) is surjective and satisfies (i) Π(ξ, η) = Π(ξ ′, η ′ ) if and only if ξ ′ = ξ n and η ′ = η n for some n ∈ N, (ii) Π(ξ, η)σ = Π(ξ σ , η σ ) for every σ ∈ N̂, e vF , where νt ∈ Irr(Nξt ) is defined by Λ(ξ)t = (iii) Π(ξ, η)t = Π(ξ t , ηνt ) for every t ∈ T Λ(ξ t)νt . If ξ t = ξ, then νt satisfies ker(νt ) = Nξe for any extension ξe of ξ to hC, ti. eξ | ξ) the map t 7→ νt defines a bijection between For a given ξ ∈ Irr(C) and ξe ∈ Irr(C eξ /CC e (G) and Irr(Nξ /N e). C C ξ e Then With the above we prove the required property of characters of N. Let χ ∈ Irr(N). we can choose χ1 ∈ Irr(N | χ e) such that χ1 = Π(ξ, η) for (ξ, η) ∈ P and some character e ξ ∈ T . (Note that T contains some C-transversal of Irr(C).) We first show that some Cξ -conjugate χ0 of χ1 satisfies eN b )χ = N eχ N bχ . (N 0 0 0 e N) b χ can be written as n eξ and By the properties of T and Π every x ∈ (N en b with n e∈N 0 bξ after some N-multiplication. We can write n eξ and n ∈ Nξ by n b ∈N e = tn with t ∈ C the assumptions on T . Accordingly we can compute as in the proof of Proposition 5.13 of [CS15] the following Π(ξ, η)x = Π(ξ, η)nenb = Π(ξ, (ην)nbn ), where ν ∈ Irr(Wξ ) is the character defined by Λ(ξ)t = Λ(ξ)ν. Since χ1 is n en b-invariant this n b n implies η = (ην) . (Recall n ∈ Nξ and hence η = η.) Accordingly n b stabilizes Irr(Wξe | η) b η for some η0 ∈ Irr(W e | η). If η is the character from (iv) it is and hence n bC ∈ Wξ K 0 ξ b η0 -invariant. Then η nb = η and hence ην = η. This implies t ∈ C eΛ(ξ)η and K Π(ξ, η)nb = Π(ξ, η) = Π(ξ, η)ne . By conjugating χ1 with elements of Cξ one obtains some χ0 = Π(ξ, η) with ξ ∈ T and η ∈ Irr(Wξ | η0 ) with properties as in (iv). Then eN b )χ 0 = N eχ0 N bχ0 . (N bξ,η ) from bξ ) from assumption (iii.2) and ResNbξ (b η ) ∈ Irr(N Using the character ξb ∈ Irr(N b N ξ,η (iv.2),D theEconstruction of the proof of [CS15, Prop. 5.13(ii)] gives an extension of χ0 to bχ0 / v Fb . According to the reformulation of the statement in terms of characters of N N e from the beginning of the proof, this implies the statement. and N  In the study of normalizers of Sylow d-tori in [S10a, S10b, CS15] it is important first to understand the situation where the centralizer of the Sylow d-torus is a torus, which is equivalent to the fact that d is a regular number of (G, F ), respectively W φ, see also [S10a, Def. 2.4]. In this so-called regular case and type Al the considerations in Section 5 INDUCTIVE MCKAY CONDITION FOR FINITE SIMPLE GROUPS OF TYPE C 13 of [CS15] have established a strategy to verify the assumptions of Theorem 4.3. The next statement clarifies the necessary computations that have to be performed in that case. Theorem 4.4. Let d be a regular number for (G, F ). Assume that there exists an element v ∈ V with the following properties: (i) ρ(v)φ is a ζ-regular element of W φ in the sense of [Sp74] for some primitive dth root of unity ζ ∈ C, see also [S10a, Def. 2.5]. (ii) ρ(Vd ) = Wd with Vd := V vF and Wd := CW (ρ(v)). (iii) There exists an extension map Λ0 with respect to Hd ⊳ Vd such that: b. (iii.1) Λ0 is Vbd -equivariant with Vbd := V E ∩ N b ∈ Irr((Vbd )λ ) (iii.2) If D is non-cyclic, Λ0 (λ) extends for every λ ∈ Irr(Hd ) to some λ b with v Fb ∈ ker(λ). vF e e vF , N := NvF , Wd := N/C and W cd := N b /C. For ξ ∈ Irr(C) (iv) Let C := T , C := T e | ξ) let W e := N e/C, Wξ := Nξ /C, K := NW (Wξ , W e) and K b := and ξe ∈ Irr(C ξ ξ d ξ NW cd (Wξ , Wξe). Then there exists for every η0 ∈ Irr(Wξe) some η ∈ Irr(Wξ | η0 ) such that b η0 -invariant. (iv.1) η is K cη ) with v Fb ∈ ker(b (iv.2) If D is non-cyclic, η extends to some ηb ∈ Irr(W η). e0 := N e (S0 )F and ψ ∈ Then for every Sylow d-torus S0 of (G, F ), N0 := NG (S0 )F , N G e0 ) there exists some ψ0 ∈ Irr(N0 | ψ) such that Irr(N e F ∩ O0 ) ⋊ (D ∩ O0 ) for O0 := GF (G e F ⋊ D)S0 ,ψ0 , (1) O0 = (G (2) ψ0 extends to (G ⋊ D)S0 ,ψ0 This ensures that assumption 2.12(vi) of [S12] is satisfied with that choice of groups. Proof. We prove that in the above situation the assumptions of Theorem 4.3 are satisfied. Since ρ(v)φ is a ζ-regular element of W φ the Sylow d-torus S of (T, vF ) is a Sylow d-torus of (G, vF ) according to [S09, Rem. 3.2 and Lem. 3.3]. Accordingly 4.3(i) holds. e vF and is hence abelian. For T := Irr(C) every e := C e (S)vF coincides with T Note that C G e⊆N eξ and hence N eξ = (N C) e ξ = CN e ξ . This ensures 4.3(ii.1). Analogous ξ ∈ T satisfies C e computations verify 4.3(ii.2). By the choice T := Irr(C) it contains some C-transversal. The equation ρ(Vd ) = Wd and the extension map Λ0 allow us to construct an extension b = Vbd C. Following the proof of map Λ as required in 4.3(iii): Note that N = Vd C and N [S09, 4.3] there exists a unique extension map Λ with respect to C ⊳ N such that N V ξ 0 (Λ0 (ξ0 )) for every ξ ∈ Irr(C) (Λ(ξ)) = ResVd,ξ ResVd,ξ d,ξ b b b with ξ0 := ResC Hd (ξ). By the construction Λ is Vd and hence N = Vd C-equivariant. (This b b is assumption 4.3(iii.1).) For any ξ ∈ Irr(C) and λ := ResC Hd (ξ) we have Nξ = C(Vd )ξ and b = bξ with ResNbξ (ξ) (Vbd )ξ ≤ (Vbd )λ ; this implies that there exists an extension ξb of ξ to N (Vb ) d ξ (Vb ) b Res(Vbd )λ (λ). d ξ This character ξb has then the properties required in 4.3(iii.2). Since the last 14 MARC CABANES AND BRITTA SPÄTH assumptions coincide one sees that all assumptions of Theorem 4.3 hold and hence the statement follows from it.  The following remark helps in the verification of the assumptions. b = N ⋊ E, where E acts Remark 4.5. Note that if F = F0m and |E1 | = 1 we have N trivially on V and hence Vd . This implies that assumption 4.4(iii) holds whenever maximal extendibility holds for Hd ⊳Vd since then a Vd -equivariant extension map for Hd ⊳Vd exists. 5. The local condition in Type C From now on we concentrate on the case where the underlying root system is of type Cl (l ≥ 1). The aim of this section is to prove the following statement. Theorem 5.1. Assume that in the notation of 4.1 the root system of G is of type Cl and p 6= 2. Let d be a positive integer, S0 be a Sylow d-torus of (G, F ), N0 := NG (S0 )F , e0 := N e (S0 )F and ψ ∈ Irr(N e0 ). There exists some ψ0 ∈ Irr(N0 | ψ) such that N G e F ∩ O0 ) ⋊ (D ∩ O0 ) for O0 := GF (G e F ⋊ D)S0 ,ψ0 and (i) O0 = (G (ii) ψ0 extends to (GF ⋊ D)S0 ,ψ0 . We must now introduce some specific roots and subgroups. Notation 5.2. We assume that p 6= 2, the root system of G and its system of simple roots ∆ := {α1 , . . . , αl } is given as in [GLS, 1.8.8]. We identify the Weyl group W of G, a Coxeter group of type Cl with the subgroup of bijections σ on {±1, . . . ± l} with σ(−i) = −σ(i) for all 1 ≤ i ≤ l, see also [S10a, §5]. This group is denoted by S±l . Via the natural identification of Sl with a quotient of S±l , the map ρ : N → W induces an epimorphism ρ : V → Sl . Note that for this type the group E1 of graph automorphisms is trivial and D is cyclic. We first concentrate on the case where d is a regular number of (G, F ) in the sense of [S10a, Def. 2.4]. By [S10a, Table 1] this implies d | 2l. For that case we successively ensure the assumptions of Theorem 4.4. At the end of this section we give the proof of Theorem 5.1. 5.A. Construction of some Sylow d-torus. For the construction of a Sylow d-torus we first choose a Sylow d-twist in the sense of [S09, Def. 3.1] using v0 := v1 . . . vl , where 2l vk := nαk (1) ∈ G. Note that ρ(v0 ) = (1, 2, . . . , l, −1, −2, . . . , −l). Let v = v0d and let d0 be the length of the ρ(v)-orbits. Then ( d 2 ∤ d, d0 := d 2 | d. 2 Let a be the number of ρ(v)-orbits of ρ(v) on {1, . . . , l}, hence a = dl0 . For the study of v it is helpful to use the braid group B of type Cl , the element w0 ∈ B, corresponding to the longest element of W and the natural epimorphism from B to V as given in Remark 3.2 of [S09]. By the definition of v0 as Coxeter-like element we see that v INDUCTIVE MCKAY CONDITION FOR FINITE SIMPLE GROUPS OF TYPE C 15 is the image of a d-th good root of w02 in B in the sense of [BrMi97, Def. 3.8]. By [S10a, Rem. 3.3(c)] this implies ρ(Vd ) = CW (ρ(v)), (5.1) or equivalently N = Vd TvF for Vd := CV (v). Note CW (ρ(v)) = C2d0 ≀Sa by computations in S±l . According to [S09, Lem. 3.3], some Sylow d-torus S of (G, vF ) is contained in T. Altogether we see that the assumptions 4.4(i) and 4.4(ii) hold. Next we verify assumption 4.4(iii) for the element v. Recall Hd = CH (v). Theorem 5.3. Maximal extendibility holds with respect to Hd ⊳ Vd . Following Remark 4.5 this implies assumption 4.4(iii) in our case. Proof. The proof of the statement is divided into two parts. First the structure of Vd is analysed in detail and then the extensions are constructed. Let v := ρ(v) and Ok be the v-orbit on {1, . . . , l} containing k. Since a = dl0 the sets Q O1 , . . . , Oa give a disjoint partition of {1, . . . , l}. For 1 ≤ k ≤ a let hk := i∈Ok h2ei (−1). By Chevalley relations hk ∈ Hd is an involution. As for any h ∈ H there exists ti ∈ {±1} Q such that h = li=1 h2ei (ti ) we see Hd = CH (v) = hh1 i × · · · × hha i. Hence Hd is an elementary abelian 2-group of rank a. Similarly we determine elements of Vd . Note that ρ(Vd ) is a wreath product. Associated to its structure we choose elements in Vd that get mapped to generators of the base groups in (C2d0 )a , and involutions generating the symmetric group. If 2 | d let c1 := (1, a + 1, . . . , a(d0 − 1) + 1, −1, −a − 1, . . . , −a(d0 − 1) − 1) ∈ CW (ρ(v)). This is the cycle of ρ(v) (written as product of disjoint cycles) containing 1. If 2 ∤ d let c′1 :=(1, 2a + 1, 4a + 1, . . . , (d − 1)a + 1, −a − 1, . . . , −(d − 1)a − 1) (−1, −2a − 1, −4a − 1, . . . , −(d − 1)a − 1, +a + 1, . . . , (d − 1)a + 1) ∈ CW (ρ(v)) Q ′ Let c1 := c′1 d−1 i=0 (ia + 1, −ia − 1) ∈ CW (ρ(v)). Note that c1 is the pair of cycles of ρ(v) (written as product of disjoint cycles) containing ±1. Equation (5.1) implies that there is some c1 ∈ Vd with ρ(c1 ) = c1 . Next we prove that for Φ1 := Φ ∩ h±ei | i ∈ O1 i and VO1 := hnα (±1) | α ∈ Φ1 i some c1 ∈ VO1 ∩ Vd satisfies ρ(c1 ) = c1 . By definition nα (±1)2 ∈ H. Hence c1 is contained in TVO1 . Clearly VO1 ∩ T ≤ H. Hence c1 ∈ V implies c1 ∈ HVO1 . By the Chevalley relations we see that H = (VO1 ∩ H) × H ′ for some subgroup H ′ ≤ H and hence HVO1 = VO1 × H ′ . Then c1 = c′1 h for unique c′1 ∈ VO1 and h ∈ H ′. Here (VO1 )v = VO1 and (H ′ )v = H ′ imply c′1 ∈ CVO1 (v). Accordingly some c1 ∈ (VO1 )vF satisfies ρ(c1 ) = c1 . By this construction hc1 , h1 i = (VO1 )vF . Q 0 −1 vi For 1 ≤ k ≤ (a − 1), let pk := di=0 vk . Using nα (±1)nβ (±1) = nsβ (α) (±1) from [GLS, 1.12.1(j)] together with the commutator formula from [GLS, 1.12.1(b)] we see ρ(pk )(Ok ) = Ok+1 and ρ(pk )(Ok+1 ) = Ok . 16 MARC CABANES AND BRITTA SPÄTH Moreover pk ∈ Vd since v d0 ∈ Z(V ). Like before straightforward computations show pk ∈ VOk ∪Ok+1 , where VOk ∪Ok+1 := hnα (±1) | α ∈ Φk,k+1i with Φk,k+1 := Φ∩h±ei | i ∈ Ok ∪ Ok+1 i. Recall v := ρ(v). The square of pk satisfies p2k = dY 0 −1 vi 2 (vk ) = i=0 dY 0 −1 he −e i i v (k) v (k+1) (−1) = i=0 Y h2ej (−1) = hk hk+1 ∈ Hd . j∈Ok ∪Ok+1 Note that since the elements v1 , . . . , va−1 satisfy the braid relations this applies also to pk . For 2 ≤ k ≤ a let ck := (c1 )p1 ···pk−1 . Clearly it is sufficient to prove that the characters of some Vd -transversal in Irr(Hd ) extend to their inertia group in Vd . Recall that Hd = hh1 i × · · · × hha i. Accordingly every λ ∈ Irr(Hd ) can be written as λ1 × · · · × λa with λk ∈ Irr(hhk i). Since Vd acts on Hd via permutation of the groups hhk i and | hhk i | = 2 every character of Hd is Vd -conjugate to some λ = λ1 × · · · × λa ∈ Irr(Hd ) where there exists some integer k0 (0 ≤ k0 ≤ a) with ( 1 k ≤ k0 , o(λk ) = 2 k > k0 . Note that such a character satisfies λck = λ for all 1 ≤ k ≤ a and λpk = λ for all 1 ≤ k < a with k 6= k0 . This proves (Vd )λ = CS, where C := Hd h ci′ | 1 ≤ i′ ≤ ai and S := hpk | 1 ≤ k < a, k 6= k0 i. Let Λ1 be an extension map for hh1 i ⊳ hc1 , h1 i. It exists since hc1 , h1 i / hh1 i is cyclic. Let Λk be the extension map with respect to hhk i ⊳ hhk , ck i that is obtained by conjugating Λ1 with p1 · · · pk−1 . The character e λ := Λ1 (λ1 ) × · · · × Λ(λa ) ∈ Irr(hh1 , c1 i × · · · × hha , ca i) is pk -invariant for 1 ≤ k < a with k 6= k0 by the definition of the extension maps Λk′ . Note that S is a supplement of C in (Vd )λ . Since ρ(S) is the direct product of two symmetric groups S ∩ Hd = p2k | 1 ≤ k ≤ a, k 6= k0 by the presentation of the symmetric groups as Coxeter groups. By the above computations of p2k we see S ∩ Hd ≤ ker(λ). According to [CS15, Lem. 5.8(a)] e λ and hence λ extend to b b some λ ∈ Irr((Vd )λ ) with λ(S) = 1.  In the next step we verify assumption 4.4(iv). Note that D is cyclic. We recall the action of N := NvF on C := TvF from [S10a], then we describe the groups Wξ and Wξe for e | ξ) and study their characters. ξ ∈ Irr(C) and ξe ∈ Irr(C d Notation 5.4. In the following let ǫ = (−1) d0 . We identify Cqd0 −ǫ , the cyclic group of order q d0 − ǫ with (a subgroup of) F× and let the group Gal(Fqd /Fq ) × C2 act on it by qd INDUCTIVE MCKAY CONDITION FOR FINITE SIMPLE GROUPS OF TYPE C 17 Frobenius endomorphisms and inversion. Let G ≤ Gal(Fqd /Fq ) × C2 be defined by ( Gal(Fqd /Fq ) × C2 , if d = d0 , G := , if d = 2d0 . Gal(Fqd /Fq ) Note that G is cyclic, 2 | |G| and the involution of G acts on Cqd0 −ǫ by inversion. Accordingly for ξ ∈ Irr(Cqd0 −ǫ ) the statements 2 | |Gξ | and o(ξ) ∈ {1, 2} are equivalent. Let f and n be two positive integers with 2 | f . We write (h1 , . . . , hn )σ for the elements of Cf ≀Sn , where hi ∈ Cf and σ ∈ Sn . Via Cf ≤ C× we define by ! f2 Y (h1 , . . . , hn )σ 7→ hi i a linear character µ ∈ Irr(Cf ≀Sn ) of order 2. Proposition 5.5. (a) C = TvF ∼ = (Cqd0 −ǫ )a is the direct product of a cyclic groups of d0 order q − ǫ. (b) Let R be a G-transversal L of Irr(Cqd0 −ǫ ) and ξ ∈ Irr(C) with ξ = ξ1 × · · · × ξa for ξi ∈ R. Then Wξ = ζ∈R Gζ ≀ SIζ , where Iζ := {i | ξi = ζ} for ζ ∈ R. e | λ), ζ2 ∈ Irr(Cqd0 −ǫ ) with o(ζ2) = 2, µ ∈ Irr(Gζ2 ≀ SI ) be defined as (c) Let ξe ∈ Irr(C ζ2 above and ν ∈ Irr(Wλ ) with ( 1Gζ ≀Snζ ζ 6= ζ2 , λ ResW Gζ ≀Snζ (ν) = µ ζ = ζ2 . L Then Wξe = ker(ν) and Wξe = ker(µ) × ζ∈R\{ζ2 } Gζ ≀ SIζ . (d) For I ⊆ {1, . . . , a} let / I and hi = hj for i, j ∈ I}. ∆I G := {(h1 , . . . , ha ) idSa | hi = 1G for i ∈ Q Let Z := ( ζ∈R ∆Iζ G) and S be the subgroup of elements σ ∈ Sa that satisfy: • for every ζ ∈ R there exists some ζ ′ ∈ R with σ(Iζ ) = Iζ ′ and Gζ = Gζ ′ , • σ(i) < σ(j) for every ζ ∈ R and i, j ∈ Iζ with i < j. Then NWd (Wξ ) = (ZWξ ) ⋊ S. (e) We have Sν = {σ ∈ S | σ(Iζ2 ) = Iζ2 } and NWd (Wξ , Wξe) = (ZWξ ) ⋊ Sν . vF Proof. Part (a) follows from the considerations in [S10a, Sect. 5 and 6]: C ∼ = TvF 1 ×· · ·×Ta in the terminology of [S10a]. Hence C is the direct product of a groups isomorphic to Cqd0 −ǫ . For the proof of (b) we write ξ ∈ Irr(C) as ξ1 × · · · × ξa with ξi ∈ Irr(Cqd0 −ǫ ). Computations with the Chevalley relations show that Vd acts on C by G on each factor and permutation of the a factors. More precisely an element ci acts by an element generating G on the ith factor and pk swaps the kth and the (k + 1)st factor. Each character of C is Vd -conjugate to one considered here. Then straightforward computations show the statement. In order to prove part (c) recall that the center of G is generated by the element Ql e i=1 h2ei (−1), see also [GLS, Table 1.12.6]. This implies that C can be embedded into 18 MARC CABANES AND BRITTA SPÄTH the central product of (C2(qd0 −ǫ) )a and C2q−2 . On these groups the induced action of Wd d is given by the action of a generating element of G on C2(qd0 −ǫ) via ψ 7→ ψ −ǫ((q 0 −ǫ)+q) . For each ζ ∈ R one chooses some extension ζe ∈ Irr(C2(qd0 −ǫ) ). For each ζ ∈ R we have |Gζ : Gζe| ∈ {1, 2}. By the above this implies Gζ = Gζe unless ζ = ζ2 . For part (d) we see G a as a subgroup of Wd . Then NG a (Wξ ) is contained in ZWξ . On the other hand S = NSa (Wξ ) and NWd (Wξ )G a ≤ G a ⋊ S. Those considerations then prove the statement. For the last part (e) we see that Z acts trivially on Wξ , and hence ν is Z-stable. Accordingly Z stabilizes ker(ν). On the other hand NS (Wξe) = NS (ker(ν)). For σ ∈ S we have ν σ = ν if and only if σ(Iζ2 ) = Iζ2 .  The character theory for the groups Wξ and Wξe is as follows. Proposition 5.6. For K := NWd (Wξ , Wξe) and η0 ∈ Irr(Wξe) every η ∈ Irr(Wξ | η0 ) is Kη0 -invariant. Proof. As seen in 5.5(e) we have K = ZWξ ⋊Sν . Since Z acts trivially on Wξ it is sufficient to check if there exists some η that is invariant under Sν,η0 . As seen in 5.5(d) the groups Wξe and Wξ are direct products of groups indexed by R which differ only in the factor associated with ζ2 : in Wξ the factor associated with ζ2 is Gζ2 ≀ SIζ2 and in Wξe it is ker(µ). Hence η0 is the product of characters η0,ζ (ζ ∈ R) with η0,ζ2 ∈ Irr(ker(µ)) and η0,ζ ∈ Irr(Gζ ≀ SIζ ) for ζ ∈ R\ {ζ2 }. Analogously η ∈ Irr(Wξ | η0 ) is the product of ηζ ∈ Irr(Gζ ≀ SIζ ) with η0,ζ = ηζ for ζ 6= ζ2 and ηζ2 ∈ Irr(Gζ2 ≀ SIζ2 | η0,ζ2 ). Let σ ∈ Sν,η0 . We see that by definition σ acts trivially on the factor related to ζ2 . On the other hand this is the only factor in which η0 and η differ. Accordingly the character η is σ-invariant.  The previous statement ensures the assumption 4.4(iv). In the proof of Theorem 5.1 we can focus on the case where d is a non-regular number of (G, F ). Proof of Theorem 5.1. If d is a regular number of (G, F ) then by the previous results we can apply Theorem 4.4 and thus obtain Theorem 5.1 in that case. In the remaining case we apply Theorem 4.3 by deducing the required assumptions from results known in the regular case. According to results from [S10b] the groups considered in the non-regular case are closely related to groups occuring in the regular case. Let d0 := d for odd d and d0 := d2 otherwise. Let l′ be the maximal multiple of d0 with ′ l′ ≤ l. For a := dl0 let v := (v1 · · · vl′ −1 n2el′ (−1))a . Then T contains a Sylow d-torus S of (G, vF ) according to [S10b, 3.2]. (This ensures assumption 4.3(i).) Let C := CGvF (S) and N := NGvF (S). Let G1 , T1 and G2 be defined as in [S10b, 2.2, vF 2.3]. Let T1 := TvF 1 and G2 := G2 . By the proof of [S10b, 5.2] we see L = T1 × G2 , where d is a regular number of (G1 , F |G1 ) and S is a Sylow d-torus of (G1 , F |G1 ). According to the proof of [S10b, 5.1] the group N := NGvF (S) satisfies N = N1 × G2 , where N1 := NG1 (S)vF . Accordingly any character ξ ∈ Irr(C) can be written as ζ × θ INDUCTIVE MCKAY CONDITION FOR FINITE SIMPLE GROUPS OF TYPE C 19 with ζ ∈ Irr(T1 ) and θ ∈ Irr(G2 ). By the proof of [S10b, 5.2] we have [N1 , G2 ] = 1, Nξ = N1,ζ × G2 and hence Wξ = Wζ′ for W ′ := N1 /T1 . By the description of Z(G) given in [GLS, Table 1.12.1] we see that the diagonal automorphism of GvF induced by an element of T induces a diagonal automorphism of GvF 1 on vF vF vF G1 and a diagonal automorphism of G2 on G2 . Any diagonal automorphism of GvF induced by some element of T acts trivially on Irr(T1 ). Analogously the field automorphism vF F0 induces field automorphisms of GvF 1 and of G2 . e ⋊E)θ = N eθ ⋊Eθ . Since N e and N act the same on Irr(T1 ), By Theorem 3.1, θ satisfies (N e N ⋊E N = (N e E) N . This proves 4.3(ii) this implies for ξ = ζ ×θ the equation N IndC (ξ) IndC (ξ) IndC (ξ) for T = Irr(C). By the proof of Theorem 4.4 there exists some N1 ⋊ E-equivariant extension map Λ1 with respect to T1 ⊳ N1 . Let Λ be the extension map with respect to C ⊳ N given by ζ × θ 7→ Λ1 (ζ) × θ. By this construction Λ is NE-equivariant as required in 4.3(iii). It remains to prove that for every ξ ∈ Irr(C) the characters of Wξ satisfy the assumption 4.3(iv). The group Wξ coincides with Wζ because of [N1 , G2 ] = 1. eξ | ξ). If C eξ = CC e (G) we have W e = Wζ = Wξ . In that case the Let ξe ∈ Irr(C C ξ e=C eξ the character θ is C-invariant e assumption is clear. If C and W e = W e where ζe is an ζ ξ extension of ζ to Te1 where Te1 := {t ∈ T1 | F (t)t−1 ∈ Z(G1 )}. The groups W ′ , Wζ and Wζe occur in the regular situation for the group (G1 , vF |G1 ). In the previous section we have proven that those groups satisfy 4.4(iv). This implies the analogous condition 4.3(iv). Altogether this verifies the required assumptions from 4.3 and implies the statement of Theorem 5.1.  6. Proof of Theorem 1 For the proof of Theorem 1 by an application of Theorem 2.12 of [S12] we construct e are as in another extension map and another character correspondence. Now G and G Sect. 3 and 5. e e for Irr(C) e with respect Theorem 6.1. There exists an NE-equivariant extension map Λ e⊳N e that is compatible with the action of Irr(C|1 e C ) by multiplication. to C Proof. Let Λ be the NE-equivariant extension map for Irr(C) with respect to C ⊳ N. In the regular case the existence of Λ follows from Theorem 5.3 by the proof of Theorem 4.3. In the other case such a map was constructed in the proof of Theorem 5.1. e as e ξ) e | ξ) with ResCe ξe = ξ we define Λ( For characters ξ := ζ × θ ∈ Irr(C) and ξe ∈ Irr(C C N (Λ(ζ × θ)), see [S09, 4.2]. the common extension of ξe and ResNζ×θ ξe e e Let T2 ⊆ Irr(G2 ) be a CE-transversal of the set of non C-invariant characters of G2 . e e e | θ). Then Then T2 is a N E-transversal of the same set. Let θ ∈ T2 and ξ ∈ Irr(C e e e e ResC C ξ is not irreducible. Let ζ ∈ Irr(T1 ) with ξ ∈ Irr(C | ζ × θ). Then there exists a N e According to e ξ). ee | Res 1,ζ (Λ1 (ζ)) × θ). We define this as Λ( unique extension of ξe in Irr(N ξ N1,ξe 20 MARC CABANES AND BRITTA SPÄTH e e Theorem 3.1 there is a unique way to extend this to a NE-equivariant extension map Λ. e has all the required properties. By this construction Λ  We apply this to prove the following theorem that ensures assumption 2.12(iv) of [S12]. Theorem 6.2. Let ℓ be an odd prime with ℓ ∤ q and d the order of q in (Z/ℓZ)× , S a  e := N e (S). Let G := ∪χ∈Irr ′ (G) Irr G e | χ and Sylow d-torus of (G, F ), N := NG (S) and N G ℓ  e | ψ . Then there is a (G e ⋊ D)S -equivariant bijection Ω e : G −→ N N := ∪ψ∈Irrℓ′ (N ) Irr N e e ∩Irr(G e | ν)) = N ∩Irr(N e | ν) for every ν ∈ Irr(Z(G)), e and Ω(χδ) e e with Ω(G = Ω(χ) ResG e (δ) N e for every δ ∈ Irr(G | 1G ) and χ ∈ G. Proof. Using the extension map from Theorem 6.1 the statement follows from the proof given in Section 6 of [CS15], where it was applied in type A.  Proof of Theorem 1. Let ℓ be a prime, S a simple group of Lie type Cl . By [S12, 1.1] and [MS16] we may assume that ℓ is different from the defining characteristic and odd. According to [CS13, 5.2] we may assume that the defining characteristic is odd. According to [GLS, Tab. 6.1.3] the Schur multiplier of S is non-exceptional and some G defined as in 4.1 (together with 5.2) is the universal covering group of S. We now review the assumptions of [S12, 2.12]. Arguing as in the proof of Proposition e ⋊ D defined as 7.2 of [CS15] we see that assumption 2.12(i) is satisfied with the groups G × in 4.1. Let d be the order of q in (Z/ℓZ) and S0 a Sylow d-torus of (G, F ). According to e ⋊ D)Q -stable for some Sylow ℓ-subgroup Q of N [Ma07, 5.14] the group N := NG (S0 ) is (G e := N e (S) the quotients G/G e e /N are cyclic and and hence satisfies 2.12(ii). For N and N G hence 2.12(iii) naturally holds. The remaining assumptions of [S12, 2.12] are the Theorems 3.1, 5.1 and 6.2. This finishes our proof.  References [BM92] M. Broué and G. Malle, Théorèmes de Sylow génériques pour les groupes réductifs sur les corps finis. Math. Ann. 292, 241–262, (1992). [BrMi97] M. Broué and J. Michel, Sur certains éléments réguliers des groupes de Weyl et les variétés de Deligne-Lusztig associée. In: Finite reductive groups (Luminy, 1994), 73–139, Progr. Math. 141, Birkhäuser Boston, Boston, MA, 1997. [CE] M. Cabanes and M. Enguehard, Representation Theory of Finite Reductive Groups. Volume 1 of New Mathematical Monographs, Cambridge University Press, Cambridge, 2004. [CS13] M. Cabanes and B. Späth, Equivariance and extendibility in finite reductive groups with connected center. Math. Z. 275, 689–713, (2013). [CS15] M. Cabanes and B. Späth, Equivariant character correspondences and inductive McKay condition for type A. arXiv:1305.6407. To appear in J. Reine Angew. Math., 2016. [FS89] P. Fong and B. Srinivasan, The blocks of finite classical groups. J. reine angew. Math. 396, 122–191, (1989). [GLS] D. Gorenstein, R. Lyons, and R. Solomon, The Classification of the Finite Simple Groups. Number 3. American Mathematical Society, Providence, RI, 1998. [I] I.M. Isaacs, Character Theory of Finite Groups. Academic Press, New York, (1976). [IMN07] I.M. Isaacs, G. Malle, and G. Navarro, A reduction theorem for the McKay conjecture. Invent. Math. 170, 33–101, (2007). INDUCTIVE MCKAY CONDITION FOR FINITE SIMPLE GROUPS OF TYPE C [LS] [L77] [L88] [Ma07] [MS16] [Mi69] [S09] [S10a] [S10b] [S12] [Sp74] [T16] [W63] 21 M. Liebeck and G.M. Seitz, Unipotent and Nilpotent Classes in Simple Algebraic Groups and Lie Algebras. American Mathematical Society, Providence, (2012). G. Lusztig, Irreducible representations of finite classical groups. Invent. Math. 43, 125–175, (1977). G. Lusztig, On the representations of reductive groups with disconnected centre, in Orbites unipotentes et représentations, I. Astérisque 168, 157–166, (1988). G. Malle, Height 0 characters of finite groups of Lie type. Represent. Theory 11, 192–220, (2007). G. Malle and B. Späth, Characters of odd degree, Ann. Math. 184 (2016), 869–908. J. Milnor. On isometries of inner product spaces. Invent. Math. 8, 83–97, (1969). B. Späth, The McKay conjecture for exceptional groups and odd primes. Math. Z. 261, 571–595, (2009). B. Späth, Sylow d-tori of classical groups and the McKay conjecture. I. J. Algebra 323, 2469– 2493, (2010). B. Späth, Sylow d-tori of classical groups and the McKay conjecture. II. J. Algebra 323, 2494– 2509, (2010). B. Späth, Inductive McKay condition in defining characteristic. Bull. Lond. Math. Soc. 44, 426–438, (2012). T. A. Springer, Regular elements of finite reflection groups. Invent. Math. 25, 159–198, (1974). J. Taylor, Action of automorphisms on irreducible characters of symplectic groups. Preprint, 2016. G. E. Wall, On the conjugacy classes in the unitary, symplectic and orthogonal groups. J. Austral. Math. Soc. 3, 1–62, (1963). Institut de Mathématiques de Jussieu - Paris Rive Gauche, Boite 7012, 75205 Paris Cedex 13, France. E-mail address: [email protected] BU Wuppertal, Gaußstr. 20, 42119 Wuppertal, Germany E-mail address: [email protected]
4math.GR
An Efficient Representation for Filtrations of Simplicial Complexes arXiv:1607.08449v3 [cs.CG] 4 Feb 2018 Jean-Daniel Boissonnat∗ INRIA Sophia Antipolis - Méditerranée, France. [email protected]. Karthik C. S.† Department of Computer Science and Applied Mathematics, Weizmann Institute of Science, Israel. [email protected]. Abstract A filtration over a simplicial complex K is an ordering of the simplices of K such that all prefixes in the ordering are subcomplexes of K. Filtrations are at the core of Persistent Homology, a major tool in Topological Data Analysis. In order to represent the filtration of a simplicial complex, the entire filtration can be appended to any data structure that explicitly stores all the simplices of the complex such as the Hasse diagram or the recently introduced Simplex Tree [Algorithmica ’14]. However, with the popularity of various computational methods that need to handle simplicial complexes, and with the rapidly increasing size of the complexes, the task of finding a compact data structure that can still support efficient queries is of great interest. This direction has been recently pursued for the case of maintaining simplicial complexes. For instance, Boissonnat et al. [Algorithmica ’17] considered storing the simplices that are maximal with respect to inclusion and Attali et al. [IJCGA ’12] considered storing the simplices that block the expansion of the complex. Nevertheless, so far there has been no data structure that compactly stores the filtration of a simplicial complex, while also allowing the efficient implementation of basic operations on the complex. In this paper, we propose a new data structure called the Critical Simplex Diagram (CSD) which is a variant of the Simplex Array List (SAL) [Algorithmica ’17]. Our data structure allows one to store in a compact way the filtration of a simplicial complex, and allows for the efficient implementation of a large range of basic operations. Moreover, we prove that our data structure is essentially optimal with respect to the requisite storage space. Finally, we show that the CSD representation admits fast construction algorithms for Flag complexes and relaxed Delaunay complexes. ∗ This work was partially supported by the Advanced Grant of the European Research Council GUDHI (Geometric Understanding in Higher Dimensions). † This work was partially supported by Irit Dinur’s ERC-StG grant number 239985. 1 1 Introduction Simplicial complexes are the prime objects to represent topological spaces. The notion of filtration of a simplicial complex has been introduced to allow the representation of topological spaces at various scales and to distinguish between the true features of a space and artifacts arising from bad sampling, noise, or a particular choice of parameters [EH10]. The most popular filtrations are nested sequences of increasing simplicial complexes but more advanced types of filtrations have been studied where consecutive complexes are mapped using more general simplicial maps [DFW14]. Filtrations are at the core of Persistent Homology, a major tool in the emerging field of Topological Data Analysis. A central question in Computational Topology and Topological Data Analysis is thus to represent simplicial complexes and filtrations efficiently. The most common representation of simplicial complexes uses the Hasse diagram of the complex that has one node per simplex and an edge between any pair of incident simplices whose dimensions differ by one. A more compact data structure, called Simplex Tree (ST), was proposed recently by Boissonnat and Maria [BM14]. The nodes of both the Hasse diagram and ST are in bijection with the simplices (of all dimensions) of the simplicial complex. In this way, they explicitly store all the simplices of the complex and it is easy to attach information to each simplex (such as a filtration value). In particular, they allow one to store in an easy way the filtration of complexes. However, such data structures are typically very big, and they are not sensitive to the underlying structure of the complexes. This motivated the design of more compact data structures that represent only a sufficient subset of the simplices. A first idea is to store the 1-skeleton of the complex together with a set of blockers that prevent the expansion of the complex [ALS12]. A dual idea is to store only the simplices that are maximal with respect to inclusion. Following this last idea, Boissonnat et al. [BKT17] introduced a new data structure, called the Simplex Array List, which was the first data structure whose size and query time were sensitive to the geometry of the simplicial complex. SAL was shown to outperform ST for a large class of simplicial complexes. Although very efficient, SAL, as well as data structures that do not explicitly store all the simplices of a complex, makes the representation of filtrations problematic, and in the case of SAL, impossible. In this paper, we introduce a new data structure called Critical Simplex Diagram (CSD) which has some similarity with SAL. CSD only stores the critical simplices, i.e., those simplices all of whose cofaces have a higher filtration value, and in this paper, we overcome the problems arising due to the implicit representation of simplicial complexes, by showing that the basic operations on simplicial complexes can be performed efficiently using CSD. 1.1 Our Contribution At a high level, our main contribution through this paper is to develop a new perspective for the design of data structures representing simplicial complexes associated with a filtration. Previous data structures such as the Simplex Tree interpreted a simplicial complex as a set of strings defined over the set of labels of its vertices and the filtration values as keys associated with each string. When a simplicial complex is perceived this way, a trie is indeed a natural data structure to represent the complex. However, this way of representing simplicial complexes doesn’t make use of the fact that simplicial complexes are not arbitrary sets of strings 2 but are constrained by a lot of combinatorial structure. In particular, simplicial complexes are closed under subsets and also (standard) filtrations are monotone functions1 . We exploit this structure by viewing a filtered simplicial complex with a filtration range of size t as a monotone function from {0, 1}|V | to {0, 1, . . . , t}, where V is the vertex set. We note that if a simplex is mapped to t then, the simplex is understood to be not in the complex and if not, the mapping is taken to correspond to the filtration value of the simplex. In light of this viewpoint, we propose a data structure (CSD) which stores only the critical elements in the domain, i.e. those elements all of whose supersets (cofaces in the complex) are mapped to a strictly larger value. As a result, we are able to store the data regarding a simplicial complex more compactly. More concretely, we have the following result. Theorem 1. Let K be a d-dimensional simplicial complex. Let κ be the number of critical simplices in the complex. The data structure CSD representing K admits the following properties: 1. The size of CSD is Õ(κd). 2. The cost of basic operations (such as membership, insertion, removal, elementary collapse, etc.) through the CSD representation is Õ((κ · d)2 ). The proof of the above two properties follows from the discussions in Section 3.3 and Section 3.4 respectively. We would like to point out here that while the cost of static operations such as membership is only Õ(d) for the Simplex Tree, to perform any dynamic operation such as insertion or removal, the Simplex Tree requires exp(d) time. As a direct consequence of representing a simplicial complex only through the critical simplices, the construction of any simplicial complex with filtration, will be very efficient through CSD, simply because we have to build a smaller data structure as compared to the existing data structures. This is shown for flag complexes and relaxed Delaunay complexes. 2 Preliminaries A simplicial complex K is defined over a (finite) vertex set V whose elements are called the vertices of K and is a set of non-empty subsets of V that is required to satisfy the following two conditions: 1. p ∈ V ⇒ { p} ∈ K 2. σ ∈ K, τ ⊆ σ ⇒ τ ∈ K Each element σ ∈ K is called a simplex or a face of K. The dimension dσ of σ is equal to its number of vertices minus 1. A simplex of dimension d is also called a d-simplex for short. The dimension of the simplicial complex K is the largest d such that it contains a d-simplex. A face of a simplex σ = { p0 , ..., ps } is a simplex whose vertices form a subset of { p0 , ..., ps }. A proper face is a face different from σ and the facets of σ are its proper faces of maximal 1 By monotone function we mean that the filtration value of a coface of any simplex is at least the filtration value of the simplex. 3 dimension. A simplex τ ∈ K having σ as a face is called a coface of σ. In some places in the paper, we will not specify if a face or coface is proper, as it should be clear from the context. A maximal simplex of a simplicial complex is a simplex that has no cofaces. A simplicial complex is pure if all its maximal simplices are of the same dimension. Also, a free pair is defined as a pair of simplices (τ, σ) in K where τ is the only coface of σ. In Figure 1 we see a three dimensional simplicial complex on the vertex set {1, 2, 3, 4, 5, 6}. This complex has two maximal simplices: the tetrahedron [1234] and the triangle [356]. We use this complex as an example throughout the paper. 4 2 3 3 3 1 5 2 5 2 3 5 1 2 6 Figure 1: A simplicial complex with two maximal simplices : tetrahedron [1234] and triangle [356]. The filtration value of all vertices is 0. Filtration values of edges are shown in the figure. The filtration value of a higher dimensional simplex is the largest filtration value of its edges. We adopt the following notation: [t] := {1, . . . , t} and JtK = {0, 1, . . . , t}. A filtration of a complex is a function f : K → R satisfying f (τ ) ≤ f (σ) whenever τ ⊆ σ [EH10]. Moreover, we will assume that the filtration values range over JtK. We say that a simplex σ ∈ K is a critical simplex if for all cofaces τ of σ we have f (σ) < f (τ ). For example, the critical simplices in the example described in Figure 1 are all the vertices, the edges [56], [14], and [24], the triangles [356] and [134], and the tetrahedron [1234]. Notations. In this paper, the class of simplicial complexes of n vertices and dimension d with k maximal simplices out of the m simplices in the complex is denoted by K(n, d, k, m), and K denotes a simplicial complex in K(n, d, k, m). 2.1 Lower Bounds Boissonnat et al. proved the following lower bound on the space needed to represent simplicial complexes [BKT17]. Theorem 2. [BKT17] Consider the class of all d-dimensional simplicial complexes with n vertices containing k maximal simplices, where d ≥ 2 and k ≥ n + 1, and consider any data structure that ( n/2 ) can represent the simplicial complexes of this class. Such a data structure requires log ( kd−+1n ) bits to be stored. For any constant ε ∈ (0, 1) and for 2ε n ≤ k ≤ n(1−ε)d , d ≤ nε/3 , the bound becomes Ω(kd log n). We prove now a lower bound on the representation of filtrations of simplicial complexes. 4  1 Lemma 3. Let β = dt+ +1 be greater than 1. For any simplicial complex K of dimension d containing m simplices, the number of distinct filtrations f : K → JtK is at least βm . If β > (d + 1)δ for some constant δ > 0 then, any data structure that can represent filtrations of the class of all d-dimensional simplicial complexes containing m simplices requires Ω(m log t) bits to be stored. Proof. Let us fix a simplicial complex K of dimension d containing m simplices. We will now build functions f i : K → JtK. For every i ∈ Jβm − 1K, let b(i ) be the representation of i as an m digit number in base β and let b(i ) j be the jth digit of b(i ). Let g be a bijection from K to [m]. We define f i (σ) = dσ · β + b(i ) g(σ) + 1. We note that all the f i s are distinct functions as for any two distinct numbers i and j in Jβm − 1K, we have that b(i ) 6= b( j). Finally, we note that each of the f i s is a filtration of K. This is because, for any two simplices τ, σ ∈ K, such that τ ⊂ σ (i.e., dτ < dσ ), and any i ∈ Jβm − 1K, we have that f i (τ ) ≤ (dτ + 1) · β < dσ · β + 1 ≤ f i (σ). It follows that there are at least βm distinct filtrations of K. By the pigeonhole principle, we have that any data structure that can represent filtrations of K requires log ( βm ) bits. It follows that if β > (d + 1)δ for some constant δ > 0 then β > represent filtrations of K requires at least δ 1+ δ ( t + 1) δ . ( β − 1) δ Thus, any data structure that can · m log(t + 1) = Ω(m log t) bits to be stored. t ≤ 1, we can show that any data structure that can represent d-dimensional √ simplicial complexes containing m simplices with filtration range JtK requires Ω( md t log t) bits. This can be shown by modifying the above proof as follows. Let S j be the set of all simplices √ √ of dimension j − 1. We identify a subset D of [d] of size t, such that ∑ j∈ D |S j | is at least md t . √ Therefore, for every set S j , j ∈ D, we can associate t distinct filtration values, which leads to the lower bound. Even if d The lower bound in Lemma 3 is not sensitive to the number of critical simplices, and intuitively, any lower bound on the size of data structures storing complexes with filtrations needs to capture the number of critical simplices as a parameter. We adapt the proof of Theorem 2 and combine it with the ideas from the proof of Lemma 3, to obtain the following lower bound. Intuitively, the theorem says that given κ critical simplices, with no other restrictions, it is not possible to find a representation shorter than an enumeration of these critical simplices, each of these critical simplices being represented with d log n + log t bits. Theorem 4. Consider the class of all simplicial complexes on n vertices of dimension d, associated with a filtration over the range of JtK, such that the number of critical simplices is κ, where d ≥ 2 and κ ≥ n + 1, and consider any datastructure that  can represent the simplicial complexes of this class. n/2 Such a data structure requires log ((κd−+1n))tκ −n bits to be stored. For any constant ε ∈ (0, 1) and for 2 εn ≤ κ ≤ n(1−ε)d and d ≤ nε/3 , the bound becomes Ω(κ (d log n + log t)). Proof. The proof of the first statement is by contradiction. Let us define h = κ − n ≥ 1 and sup n/2 def pose that there exists a data structure that can be stored using only s < log α = log ((κd−+1n))th bits. We will construct α simplicial complexes (associated with a filtration), all with the same set P of n vertices, the same dimension d, with exactly κ maximal simplices, and with a filtration over the range of JtK. By the pigeonhole principle, two different filtered simplicial complexes2 , say K and K ′ , are encoded by the same word. So any algorithm will give the same 2 i.e., two complexes which either differ on the simplices contained on the complex or on the filtration value of a simplex contained in both complexes. 5 answer for K and K ′ . But, by the construction of these complexes, there is either a simplex which is in K and not in K ′ or there is a simplex whose filtration value in K is different from the simplex’s filtration value in K ′ . This leads to a contradiction. The simplicial complexes and their associated filtration are constructed as follows. Let ⊂ P be a subset of cardinality n/2, and consider the set of all possible simplicial complexes of dimension d with vertices in P′ that contain h critical simplices. We further assume that all P′ ( n/2 ) critical simplices have dimension d exactly. These complexes are β = ( d+h 1 ) in number, since the total number of maximal d dimensional simplices is (dn/2 +1) and we choose h of them. Let us call them Γ1 , . . . , Γ β . We now extend each Γi so as to obtain a simplicial complex whose vertex set is P and has exactly κ critical simplices. The critical simplices will consist of the h maximal simplices of dimension d already constructed (whose filtration value is set to one of the values in [t]) plus a number of maximal simplices of dimension 1 (whose filtration value is set to 0). The set of vertices of Γi , vert(Γi ), may be a strict subset of P′ . Let its cardinality be n n n 2 − ri and observe that 0 ≤ ri < 2 . Consider now the complete graph on the 2 + ri vertices of n P \ vert(Γi ). Any spanning tree of this graph gives 2 + ri − 1 edges and we arbitrarily choose n 2 − ri + 1 edges from the remaining edges of the graph to obtain n distinct edges spanning over the vertices of P \ vert(Γi ). We have thus constructed a 1–dimensional simplicial complex Ki on the n2 + ri vertices of P \ vert(Γi ) with exactly n maximal simplices. Finally, we define the complex Λi = Γi ∪ Ki that has P as its vertex set, dimension d, and κ maximal simplices which are also the critical simplices. The filtration value of any simplex which is not maximal is defined to be the minimum of the filtration values of its cofaces in the complex. The set of Λi , i = 1, · · · , β, where for each complex we associate th different filtrations is the set of simplicial complexes (associated with a filtration) that we were looking for. The second statement in the theorem is proved through the following computation:      n/2    d+1 log  tκ −n  ≥ log κ−n n(d+1)(κ −n) 2(d+1)(κ −n) (d + 1)(d+1)(κ −n) (κ − n)(κ −n) ! + (κ − n) log t = (d + 1)(κ − n) log n − (d + 1)(κ − n) − (d + 1)(κ − n) log(d + 1) − (κ − n) log(κ − n) + (κ − n) log t > (d + 1)(κ − n) log n − 3(d + 1)(κ − n) − (d + 1)(κ − n) log d − (κ − n) log κ + (κ − n) log t ≥ (d + 1)(κ − n)(log n − 3 − log d) − (κ − n)(1 − ε)d log n + (κ − n) log t   ε ≥ dε(κ − n) log n + (κ − n) log n − (d + 1)(κ − n) 3 + log n 3 + (κ − n) log t       2ε ε ε ε ≥ 1− κd log n + 1 − κ log t + 1 − κ log n 3 2 2 2      ε ε ε κ− 1− κ 3 + log n − 3d 1 − 2 2 3 = Ω(κ (d log n + log t)) We note that in the above computation, the first inequality is obtained by applying the d following bound on binomial coefficients: (nd) ≥ nd . 6 2.2 Simplex Tree Let K ∈ K(n, d, k, m) be a simplicial complex whose vertices are labeled from 1 to n and ordered accordingly. We can thus associate to each simplex of K a word on the alphabet set [n]. Specifically, a j-simplex of K is uniquely represented as the word of length j + 1 consisting of the ordered set of the labels of its j + 1 vertices. Formally, let σ = {vℓ0 , . . . , vℓ j } be a simplex, where vℓi are vertices of K and ℓi ∈ [n] and ℓ0 < · · · < ℓ j . σ is represented by the word [σ] = [ℓ0 , · · · , ℓ j ]. The simplicial complex K can be defined as a collection of words on an alphabet of size n. To compactly represent the set of simplices of K, the corresponding words are stored in a tree and this data structure is called the Simplex Tree of K and denoted by ST(K ) or simply ST when there is no ambiguity. It may be seen as a trie on the words representing the simplices of the complex. The depth of the root is 0 and the depth of a node is equal to the dimension of the simplex it represents plus one. We give a constructive definition of ST. Starting from an empty tree, insert the words representing the simplices of the complex in the following manner. When inserting the word [σ] = [ℓ0 , · · ·, ℓ j ] start from the root, and follow the path containing successively all labels ℓ0 , · · ·, ℓi , where [ℓ0 , · · ·, ℓi ] denotes the longest prefix of [σ] already stored in the ST. Next, append to the node representing [ℓ0 , · · ·, ℓi ] a path consisting of the nodes storing labels ℓi+1 , · · ·, ℓ j . The filtration value of σ denoted by f (σ) is stored inside the node containing the label ℓ j , in the above path. In Figure 2, we give ST for the simplicial complex shown in Figure 1. X,0 1,0 2,5 3,5 4,5 3,3 4,3 2,0 4,2 3,5 3,0 4,3 4,3 4,5 5,2 4,0 6,2 5,0 6,0 6,1 6,2 4,5 Figure 2: Simplex Tree of the simplicial complex in Figure 1. In each node, the label of the vertex is indicated in black font and the filtration value stored by the simplex is in brown font. If K consists of m simplices (including the empty face) then, the associated ST contains exactly m nodes. Thus, we need Θ(m(log n + log t)) bits to represent the nodes in ST (since each node stores a vertex which needs Θ(log n) bits to be represented and also stores the filtration value of the simplex that the node corresponds to, which needs Θ(log t) bits to be represented). We can compare the upper bound obtained to the lower bound of Lemma 3. In particular, ST matches the lower bound when t is nΩ(1) . Now, we will briefly discuss the cost of doing some basic operations through ST on a 7 simplicial complex. Checking if a simplex σ is in the complex, is equivalent to checking the existence of the corresponding path starting from the root in ST. This can be done very efficiently in time O(dσ log n) and therefore all operations which primarily depend on the membership query can be efficiently performed using ST. One such example, is querying the filtration value of a simplex. However, due to its explicit representation, insertion is a costly operation on ST (exponential in the dimension of the simplex to be inserted since a d-simplex has 2d faces). Similarly, removal is also a costly operation on ST, since there is no efficient way to locate and remove all cofaces of a simplex. Consequently, topology preserving operations such as elementary collapse and edge contraction are also expensive for ST. These operation costs are summarized later in Table 1. In the next section, we will introduce a new data structure which does a better job of balancing between static queries (e.g. membership) and dynamic queries (e.g. insertion and removal) 2.3 Motivation for a New Data Structure: The Case of Flag Complexes In this subsection, we will motivate the need for a new data structure that is more sensitive to the number of critical simplices than the Simplex Tree by taking up the case of flag complexes. The flag complex of an undirected graph G is defined as an abstract simplicial complex, whose simplices are the sets of vertices in the cliques of G. As noted by Boissonnat et al. (see Section 2 in [BKT17]), in several cases of interest, the number k of maximal simplices of a flag complex is small. In particular, we have k = O(n) for flag complexes constructed from planar graphs and expanders [ELS10] and, more generally, from nowhere dense graphs [GKS13], and also from chordal graphs[Gol80]. Furthermore, k = nO(1) [GKS13] for all flag complexes constructed from graphs with degeneracy O(log n) (degeneracy is the smallest integer r such that every subgraph has a vertex of degree at most r). We further add to this list of observations by noting that the flag complexes of Kℓ -free graphs have at most max{n, n∆ℓ−2 /2ℓ−2 } maximal simplices [Pri95], where ∆ is the maximum degree of any vertex in the graph. Thus, when ∆ and ℓ are constants, we have k = O(n). Finally, we note that the flag complexes of Helly circular-arc (respectively, circle) graphs [Gav74, Dur03], and boxicity-2 graphs [Spi03] have k = nO(1) from Corollary 4 of [RS07]. This encompasses a large class of complexes encountered in practice and if the number of maximal simplices is small, then any data structure that is sensitive to k is likely to be more efficient than ST. Moreover, we go a step ahead and show below that any data structure that is sensitive to κ, the number of critical simplices, is likely to be more efficient than ST as well. This is done by proving that in most of the above cases, if k is small then so is κ. We formalize the argument below. We recall the definition of a hereditary property of a graph [Hed73]. A property P of a graph G is hereditary if, whenever G has property P and G ′ is a subgraph of G, then G ′ also has property P. We consider a specific filtration f for flag complexes which is of significant interest: the filtration value of every edge e in the complex (denoted f (e)) is given as part of the input and the filtration value of a simplex of higher dimension is equal to the maximum of the filtration values of all the edges in the simplex. We have the following lemma for the filtration described above. Lemma 5. Let t : N → N be a non-decreasing function. Let P be a hereditary property of a graph such that any graph G on n vertices and E edges with the property P has at most t(n) maximal cliques. Then the number of critical simplices of the flag complex of G is at most n + t(n) · E. 8 Proof. For every edge e in G, let Ge be the subgraph of G induced by the vertices of e and all the vertices which are common neighbors of both the vertices of e. Then, we remove all the edges in Ge which have a filtration value higher than f (e). Let Me be the set of all maximal S cliques in Ge . Let M = Me . Let σ be a critical simplex of filtration value f (e). We claim that e σ is a maximal clique in Ge . To see that σ is a clique in Ge , notice that from the monotonicity property of filtration, we have that the filtration value of the edges in σ are at most f (e), and thus all the edges of σ are in Ge . The observation that σ is a maximal clique in Ge follows from the assumption that σ is a critical simplex in the flag complex. Hence, we have that the number of critical simplices is at most | M | + n (the additive n term comes from the possibility that the vertices might be critical simplices). Thus, we have the following upper bound on the number of critical simplices. | M | ≤ E · max | Me | e ≤ E · max t (|Ge |) (1) ≤ E · t ( n ), (2) e where (1) follows from the hereditary property of G and (2) follows from t being a nondecreasing function. We note that planarity, expansion (in some cases) and degeneracy are all hereditary properties of a graph. Thus from the above lemma we have that a data structure sensitive to the number of critical simplices representing the flag complexes of graphs having any of the above properties is not only of small size but may also be efficient to construct (i.e., requires poly(n) time). Our goal is to show that the Critical Simplex Diagram to be introduced in the next section exhibits these nice properties for a large class of general simplicial complexes. 3 Critical Simplex Diagram In this section, we introduce the Critical Simplex Diagram, CSD(K ), which is an improved version of SAL [BKT17] (as it has the additional functionality of maintaining filtrations). CSD is a collection of n arrays that correspond to the n vertices of K. The elements of an array, referred to as nodes in the rest of the paper, correspond to copies of the vertex of K associated to the array. The collection of all these nodes across all the arrays will represent the disjoint union of the critical simplices in the complex. Additionally, CSD has edges that join nodes of different arrays. Each connected component of edges in CSD represents a (critical) simplex of K. We describe some notations used throughout the section below. 3.1 Notations Through out the section, we will denote by σ a simplex of dimension dσ in the complex and denote its vertices by [vℓ0 · · · vℓdσ ]. Let Sh be the set of simplices in the complex whose filtration value is h. Let Mh be the subset of Sh containing all the critical simplices of the complex in Sh . For instance, in the complex of Figure 1, we have M0 = {1, 2, 3, 4, 5, 6}, M1 = {[56]}, M2 = {[14], [356]}, M3 = {[134], [24]}, M4 = ∅, and M5 = {[1234]}. Moreover, we note that 9 M0 , M1 , ...., Mt are all disjoint and denote by M the union of all Mh . Hence M is the set of all critical simplices of the complex. We denote by Ψmax (i ) the subset of simplices of M that contain vertex i. In other words, Ψmax (i ) = {σ ∈ K i ∈ σ, f (σ) < f (τ ), ∀τ ∈ K, σ ⊂ τ }. Let Ψ = max |Ψmax (i )|. i∈[n ] We denote by Γ j the largest number of maximal simplices of K that contains any j-simplex of K. We have the following bounds: k ≥ Γ0 ≥ Γ1 ≥ · · · ≥ Γd = 1, Γ0 ≤ Ψ ≤ m. Moreover, when t = 0, we have Ψ = Γ0 . We describe the construction of CSD below. 3.2 Construction We initially have n empty arrays A1 , . . . , An . The vertices of K are associated to the arrays. Each array contains a set of nodes that are copies of the vertex associated to the array and are labelled by an ordered pair of integers (to be defined below). Nodes belonging to distinct arrays are joined by edges leading to a graph structure. Each connected component of that graph is a star tree3 and there is a bijection between the star trees of that graph and the set of critical simplices M. All the nodes of such a simplex are labelled by the same ordered pair of integers. The first integer refers to the filtration value of the simplex and the second integer refers to a number used to index critical simplices that have the same filtration value. For instance, in Figure 3 we have the CSD representation of the simplicial complex of Figure 1, and the triangle [134] in M3 is represented by 3 nodes, each with label (3, 1), that are connected by edges. Below we provide a more detailed treatment of the construction of CSD. Given Mh for every h ∈ JtK, we build the CSD by inserting the simplices in Mh in decreasing values of h. For every simplex σ = vℓ0 · · · vℓdσ in Mh , we associate a unique key H(σ) ∈ [| Mh |]. We insert a node with label (h, H(σ)) into each of the arrays Aℓ0 , . . . , Aℓdσ . For every j ∈ [dσ ], we introduce an edge between (h, H(σ)) in Aℓ0 and (h, H(σ)) in Aℓ j . In other words, a critical simplex σ is represented in CSD by a star tree in the graph thus defined. Each star tree is on dσ + 1 nodes where vℓ0 is the center of the star tree. Furthermore, each node in CSD corresponds to a vertex in exactly one simplex. We denote by A⋆i the set of all nodes in Ai which are part of the star trees that correspond to maximal simplices in K (the region with these nodes are shaded in Figure 3). Inside each Ai , we first sort nodes based on whether they are in A⋆i or not. Furthermore, inside A⋆i and inside Ai \ A⋆i , we sort the nodes according to the lexicographic order of their labels. Thus we have that A⋆i is a contiguous subarray of Ai , i.e., all consecutive elements in A⋆i are also consecutive elements in Ai , as can be observed in Figure 3. We partition Ai as above because it will help us perform the operations which do not depend on the filtration of the complex (such as membership query) at least as fast as SAL. Finally, we remark here that we can use a priority queue data structure to efficiently generate keys for the simplices. 3A star tree is a tree in which there is a special vertex with an edge to every other vertex in the graph. 10 A4 A1 A3 (5,1) (5,1) A2 (5,1) (3,2) A5 A6 (3,1) (5,1) (2,1) (3,1) (2,1) (2,1) (2,2) (3,2) (3,1) (2,2) (1,1) (1,1) (0,1) (0,2) (0,3) (0,4) (0,5) (0,6) Figure 3: Critical Simplex Diagram for the complex in Figure 1. The shaded region in each Ai corresponds to A⋆i . A star tree represents a critical simplex. Each node has two labels, the first one is the filtration value and the second one designates a unique identification to the simplex within the set of critical simplices with the same filtration value. 3.3 Size of the Critical Simplex Diagram We denote the total number of nodes in CSD by |CSD|. The number of nodes in each Ai is at most Ψ, and thus |CSD| is at most Ψn. Note that the number of edges in CSD is also at most Ψn since CSD is a collection of star trees (i.e., a star forest). Alternatively, we can bound the number of nodes by | M |d, where M as defined in Section 3.1 is the union of all Mh . The actual relation between Ψ and | M | can be stated as follows: n ∑ |Ψmax (i)| = ∑ (dσ + 1). σ∈ M i=1 We recall that in the previous section we denoted | M | by κ. Furthermore, in each node we store a filtration value (which requires log t bits), a unique key (which requires max log | Mh | ≤ log m bits), and a pointer to the center vertex of the star h∈JtK tree. If the node corresponds to the center vertex of a star tree then it additionally maintains the list of all its neighbors as well. We can thus upper bound the space needed to store the nodes of CSD by κd(3 log m + log t). Thus, CSD  matches the lower bound in Theorem 4, up to a multiplicative factor of O(d) (as m = O nd ). In the case of CSD, we are interested in the value of Γ0 and Ψ which we use to estimate the worst-case cost of basic operations in CSD, in the following subsection. 11 3.4 Operations on the Critical Simplex Diagram Let us now analyze the cost of performing basic operations on CSD. First, we describe how to intersect arrays and update arrays in CSD as these are elementary operations on CSD which will be required to perform basic operations on the simplicial complex that it represents. Next, we describe how to perform static queries such as the membership query. Then we describe how to perform dynamic queries such as the insertion or removal of a simplex. Finally, we compare the efficiency of CSD with ST. We remark here that in order to perform the above operations efficiently, we will exploit the fact that the filtration value of a simplex that is not critical is equal to the minimum of the filtration values of its cofaces. 3.4.1 Elementary Operations on the Critical Simplex Diagram Implementation of the arrays We implement the arrays Ai using red-black trees as the building blocks. This allows us to efficiently search, insert, and remove an element inside Ai in time O(log | Ai |). We treat A⋆i and Ai \ A⋆i separately. Below we will discuss how to implement A⋆i and the same will hold for Ai \ A⋆i . Each subarray of A⋆i with a same filtration value, i.e., the same first coordinate, is implemented using a red-black tree. These subarrays which partition A⋆i are labelled with the common first coordinate value of their elements. We represent the set of subarrays using a red-black tree on their labels. Therefore, each A⋆i is represented as the composition of two red-black trees. Ai \ A⋆i is represented similarly. Finally, to search in Ai we sequentially search in A⋆i and then search in Ai \ A⋆i . Intersecting arrays We will need to compute Aσ , defined as the intersection of Aℓ0 , . . . , Aℓdσ , and A⋆σ , defined as the intersection of A⋆ℓ0 , . . . , A⋆ℓd . To compute Aσ , we first find out the array with fewest elements σ amongst Aℓ0 , . . . , Aℓdσ . Then, for each element x in that array, we search for x in the other dσ    arrays, which can be done in time O dσ log max | Aℓi | . Hence Aσ can be computed in i time O    min | Aℓi | dσ log max | Aℓi | i i  = O(dσ Ψ log Ψ). We can compute A⋆σ in the same way as Aσ in time     O min | A⋆ℓi | dσ log max | A⋆ℓi | = O(dσ Γ0 log Γ0 ). i 3.4.2 i Static Operations on the Critical Simplex Diagram The tree structure of ST provides an efficient representation to perform static operations. However, we show below that we are able to answer static queries using CSD by only paying a multiplicative factor of Ψ (in the worst case) over the cost of performing the same operation in ST. In the case of the membership query, the multiplicative factor is reduced to Γ0 . 12 Membership of a Simplex We first observe that σ ∈ K if and only if A⋆σ 6= ∅. This is because if σ ∈ K, then there exists a maximal simplex in K that contains σ. The star tree associated to this maximal simplex has nodes in all the A⋆ℓi , and all those nodes have the same label. This implies that A⋆σ 6= ∅, and the converse is also true. It follows that determining if σ is in K reduces to computing A⋆σ and checking whether it is non-empty. This procedure is very similar to the analogous procedure using SAL [BKT17]. Therefore, membership of a simplex can be determined in time O(dσ Γ0 log Γ0 ). Finally, we note that the membership query allows us to decide if a simplex is maximal in the complex since a simplex is maximal iff | A∗σ | = 1 and the star tree corresponding to the label in A∗σ has exactly dσ + 1 nodes. We denote this new query by is maximal. Access Filtration Value Given a simplex σ of K we want to access its filtration value f (σ). We observe that f (σ) is the minimal filtration value of the nodes in Aσ since the filtration function is monotone w.r.t. inclusion. Hence, accessing the filtration value of σ reduces to computing Aσ . Therefore, the filtration value of a simplex can be determined in time O(dσ Ψ log Ψ). For example, consider the CSD in Figure 3. We have to find the filtration value of σ = [134] in the complex of Figure 1. We see that A1 ∩ A3 ∩ A4 = {(3, 1), (5, 1)}. This means that the filtration value of the triangle is f ([134]) = min (3, 5) = 3. Finally, we note that the filtration query allows to decide if a simplex is critical in the complex since a simplex is critical iff | Aσ | = 1 and the star tree corresponding to the label in Aσ has exactly dσ + 1 nodes. This new query is denoted by is critical. Computing Filtration Value of Facets Given a simplex σ = [vl0 · · · vldσ ], we can provide the filtration values of all of its dσ + 1 facets by calling the previous operation for each of its facets, which will require a total running time of O(d2σ Ψ log Ψ). We can improve on this naive approach and obtain the filtration values of the dσ + 1 facets of σ in running time of O(dσ Ψ log Ψ). At a high level, we find an efficient way to compute the filtration values of all but one facet in time essentially equal to the cost of performing one access filtration value query. We compute the filtration value of the remaining facet using the access filtration value query. For j ∈ Jdσ K, we denote by σℓ j the facet of σ opposite to vℓ j , i.e. σℓ j = vℓ0 , . . . , vℓ j−1 , vℓ j+1 , . . . , vℓdσ . Let r ∈ Jdσ K be such that r = arg mini | Aℓi |. Let F be the set of facets of σ that are incident to vℓr and B the set of critical simplices that contain a facet of F but do not contain σ. Equivalently, B is the subset of Aℓr containing every element of Aℓr which appears in exactly dσ − 1 of the sets in Aℓ0 , . . . , Aℓr−1 , Aℓr+1 , . . . , Aℓdσ . Hence the number of elements of B is O(Ψ) and B can be computed in time O(| Aℓr |dσ log Ψ) = O(Ψdσ log Ψ). We define a map g that maps every simplex in B to the facet of σ ∈ F that it contains. We sort B based on g, and in case of ties based on the first coordinate. For every j ∈ Jdσ K, j 6= r, let α j be the minimal filtration value of the nodes in B which are mapped to j under g. Then, the filtration value of the facet σℓ j is the minimum between α j and f (σ). We can compute 13 f (σ) using the function Access Filtration Value described previously. If there are no nodes in B mapped to j under g then the filtration value of σℓ j is f (σ). From the above discussion, we see that computing the filtration values of the σℓ j for all j 6= r, i.e. for the dσ facets of σ incident to vertex vℓr , requires a total time of O(| B| log | B| + dσ log | B|) = O((Ψ + dσ ) log Ψ). It remains to compute the filtration value of σℓr which can be done using the function Access Filtration Value. We conclude that the total running time to compute the filtration values of all the facets of σ is O(dσ Ψ log Ψ). Computing Filtration Value of Cofaces of codimension 1 Given a simplex σ, we perform the access filtration value query to obtain the list of all the critical simplices that contain σ (there are at most Ψ such simplices). For each critical simplex τ that contains σ, we list all its faces which are cofaces of σ of codimension 1 (there are at most d − dσ of them), and associate to each of them a filtration value of f (τ ). This can be done in time O(Ψd log Ψ) by traversing through the star tree corresponding to τ. It might happen that a coface of σ of codimension 1 can be associated to more than one filtration value (because this coface is contained in more than one critical simplex). In such a case, the filtration value of the coface is associated to the minimum of the filtration values of the critical simplices that contain it. Again, this can be done in O(Ψd log Ψ) time. Therefore, the filtration value of all the cofaces of a simplex of codimension 1 can be computed in O(Ψd log Ψ) time. 3.4.3 Dynamic Operations on the Critical Simplex Diagram Now, we will see how to perform dynamic operations on CSD. We note here that CSD is more suited to perform dynamic queries compared to ST because of its non-explicit representation, and this means that the amount of information to be modified in CSD is always less than in ST. Lazy Insertion When inserting a critical simplex σ, we need to check if some of its faces were critical (prior to the insertion of σ) and have the same filtration value as f (σ). We need to remove such simplices since they are no longer maximal for this value of the filtration after the insertion of σ. The full operation will be described in the next paragraph. We first describe a lazy version that do not remove (nor even consider) the subfaces of σ. We further assume that we know whether σ is maximal or not. Lazy insertions will be extensively used in the later sections. A lazy insertion in CSD requires O(dσ log Ψ) time (i.e., the cost of updating the arrays). We remark here that lazy insertions will not hinder any subsequent operation on CSD nor modify their time complexity, and, in order to save memory space, we can clean-up the data structure. See details in the paragraph called ‘Robustness in Modification’ in Section 3.5. Insertion Let, as before, σ be a simplex that we want to insert in CSD. Since CSD only stores critical simplices, we can assume that the filtration value f (σ) of σ is less than the filtration values of all its cofaces. The insertion operation consists of first checking if σ is a maximal simplex in K using is maximal. 14 If σ is a maximal simplex, we insert the star tree corresponding to σ in A⋆ℓ0 , . . . , A⋆ℓd . Upσ dating the arrays Aℓi takes time O(dσ log Ψ). Next, we have to check if there existed maximal simplices in K which are now faces of σ (and therefore no longer maximal). We either remove such a simplex if its filtration value is equal to f (σ) or move it from A⋆ℓi to Aℓi \ A⋆ℓi if its filtration value is strictly less than that of f (σ). We restrict our search to the faces of σ which were previously maximal, by considering for every vertex v in σ, the set of all maximal simplices that contain v, denoted by Zv . We can compute Zv in time O(dσ Γ0 log Γ0 ). Then, we compute ∪v∈σ Zv whose size is at most (dσ + 1)Γ0 and check if any of these maximal simplices is a face of σ (which can be done in O(d2σ Γ0 ) time). If such a face of σ in ∪v∈σ Zv has filtration value equal to f (σ) then, we remove its associated star tree. To remove all such star trees takes time O(d2σ Γ0 log Γ0 ). On the other hand, if the filtration value of the face is less than f (σ) then, we will have to move the node from A⋆ℓi to Aℓi \ A⋆ℓi and to place it appropriately to maintain the sorted structure of Aℓi . To reallocate all such star trees takes time O(d2σ Γ0 log Ψ). Summarizing, to remove or reallocate the faces of σ which were previously maximal takes time at most O(d2σ Γ0 (log Γ0 + log Ψ)). Next, we have to remove all the faces of σ which were critical and whose filtration values were equal to f (σ). This can be done in time O(Ψd2σ log Ψ) by simply identifying the star trees all of whose nodes are contained in Aℓ0 ∪ · · · ∪ Aℓdσ . If σ is not a maximal simplex then, we insert the star tree corresponding to σ in Aℓ0 , . . . , Aℓdσ . Updating the arrays Aℓi takes time O(dσ log Ψ). Next, we have to remove all the faces of σ which were critical and whose filtration value were equal to f (σ). This can be done in time O(Ψd2σ log Ψ) as described in the previous case. Thefore, the total running time in this case is O(Ψd2σ log Ψ). Ψd2σ We conclude that the total time for inserting a simplex σ is O(d2σ Γ0 (log Γ0 + log Ψ) + log Ψ) = O(Ψd2σ log Ψ). Removal To remove a face σ, we first perform an access filtration value query of σ (requires O(Ψdσ log Ψ) time). Note that there are at most mini∈Jdσ K | Aℓi | many critical simplices that contain σ. We deal with the simplices in A⋆σ and Aσ \ A⋆σ separately. For every simplex τ ∈ A⋆σ , i.e., for every coface τ of σ in K which is a maximal simplex, we remove its corresponding star tree from the CSD. Since there are at most Γdσ maximal simplices that contain σ, the above removal of star trees can be done in O(Γdσ d log Ψ) time. Next, for each maximal simplex τ (containing σ) that we removed, and for every i ∈ Jdσ K we check if the facet of τ obtained by removing vℓi from τ, is a maximal simplex. If yes, we lazy insert the facet as a maximal simplex with the same filtration value as τ. If no, we lazy insert the facet as a non-maximal simplex with the same filtration value as τ provided that it is still a critical simplex (can be checked using the is critical query). Note that in order to check if the above mentioned dσ + 1 facets of τ are maximal/critical, we do not have to make dσ + 1 is maximal/is critical queries, but can do the same checking in O(Γdσ d log Ψ)/O(Ψd log Ψ) time by using the same idea that is described in the ‘computing filtration value of facets’ paragraph in Section 3.4.2. Next, for every simplex τ ∈ Aσ \ A⋆σ i.e., for every coface τ of σ in K which is a critical (not maximal) simplex, we replace its corresponding star tree by star trees of its dσ + 1 facets with the same filtration value, where the ith facet is obtained by removing vℓi−1 from τ. Introducing a star tree and updating the arrays Aℓi takes time O(dτ log Ψ). Again, we note that we introduce the star tree of the facet of τ if and only if the facet is still a critical simplex in the complex 15 (can be checked using the is critical query). Furthermore, if σ is a critical simplex (can be checked by is critical query) then, we know that there is a star tree representing σ. We replace this star tree by the star tree for each of its facets which have the same filtration value (if the facets are critical). Therefore, the total time for removal is O(Ψ2 ddσ log Ψ). Elementary Collapse A simplex τ is collapsible through one of its facets σ, if τ is the only coface of σ. Such a pair (σ, τ ) is called a free pair, and removing both faces of a free pair is an elementary collapse. Given a pair of simplices (σ, τ ), to check if it is a free pair is done by obtaining the list of all maximal simplices that contain σ, through the membership query (costs O(dσ Γ0 log Γ0 ) time) and then checking if τ is the only member in that list that is different from σ. If yes, then we remove τ from the CSD by just removing all the nodes in the corresponding arrays in time O(dτ log Ψ). We call such an operation (of removal) as lazy removal. Next, for every facet σ′ of τ other than σ, we check if σ′ is a critical simplex (post the removal of τ) by applying is critical. If yes, we lazy insert σ′ in time O(dσ log Ψ). Finally, if σ is explicitly represented in CSD (i.e., it was a critical simplex prior to the removal of τ) then we lazy remove it and, for every facet of σ, we similarly check if it is a critical simplex (post the removal of σ) by applying is critical. If yes, we lazy insert that facet in time O(dσ log Ψ). Thus, the total running time is O(dσ (dσ Ψ log Ψ + Γ0 log Γ0 )) = O(d2σ Ψ log Ψ). 3.4.4 Summary We summarize in Table 1 the asymptotic cost of basic operations discussed above and compare it with ST, through which the efficiency of CSD is established. ST CSD Storage Θ(m log(nt)) O(Ψn log(Ψt)) Membership of a simplex σ Θ(dσ log n) Access Filtration Value Θ(dσ log n) Computing Filtration Value of Facets O(d2σ log n) Θ(ndσ log n) O(dσ Γ0 log Ψ) O(dσ Ψ log Ψ) O(dσ Ψ log Ψ) O(dΨ log Ψ) Computing Filtration Value of Cofaces of codimension 1 O(dσ log Ψ) O(Ψd2σ log Ψ) σ log n ) O(Γdσ 2d d log n) O(Ψ2 ddσ log Ψ) Θ(ndσ log n) O(d2σ Ψ log Ψ) Lazy Insertion of a simplex σ – O(2dσ d Insertion of a simplex σ Removal of a face Elementary Collapse Table 1: Cost of performing basic operations on CSD in comparison with ST. If the number of critical simplices is not large then |CSD| is smaller than |ST|. The number of critical simplices is small unless we associate unique filtration values to a significant fraction of the simplices. As will be shown later, this assumption is relevant in applications. 16 We observe that while performing static queries, we pay a factor of Ψ or Γ0 in the case of CSD over the cost of the same operation in ST. In the case of dynamic operations we observe that the dependence on the dimension is exponentially smaller in CSD than in ST. Therefore, even if the number of critical simplices is polynomial in the dimension then, there is an exponential gap between CSD and ST in both the storage and the efficiency of performing dynamic operations. 3.5 Performance of CSD CSD has been designed to store filtrations of simplicial complexes but it can be used to store simplicial complexes without a filtration. In this case, | M | = k and CSD requires O(kd log k) memory space, which matches the lower bound in Theorem 2, when k = nO(1) . In this case, CSD is very similar to SAL [BKT17]. Marc Glisse and Sivaprasad S. [GS] have performed experiments on SAL and concluded that it is not only smaller in size but also faster than the Simplex Tree in performing insertion, removal, and edge contraction. CSD is also a compact data structure to store filtrations, as its size matches (up to constant factors for small d) the lower bound of Ω(| M |(d log n + log t)) in Theorem 4. Moreover, if Ψ is small, CSD is not only a compact data structure since |CSD| is upper bounded by Ψn, but, as shown in Table 1, CSD is also a very efficient data structure as all basic operations depend polynomially on d (as opposed to ST for which some operations depend exponentially on d). As our analysis shows, we can express the complexity of CSD in terms of a parameter Ψ that reflects some “local complexity” of the simplicial complex. In the worst-case, Ψ = Ω(m) as it can be observed in the complete complex with each simplex having a unique filtration value. However we conjecture that, even if m is not small, Ψ remains small for a large class of simplicial complexes of practical interest. This conjecture is supported by the following experiment (and also Lemma 5). We considered a set of points obtained by sampling a Klein bottle in R5 and constructed its Rips filtration (see Section 4 for definition) using libraries provided by the GUDHI project [Pro15]. We computed Γ0 and Ψ for various values of t. The resulting simplicial complex has n = 10, 000 vertices, dimension d = 17 and has m = 10, 508, 486 simplices of which k = 27, 286 are maximal. We record in Table 2, the values of |ST| and |CSD| for the various filtration ranges of the Rips complex constructed above. Figure 4 shows a graphical illustration of the data. avg We note from Table 2 that Γ0 is significantly smaller than k, and also that Γ0 is much smaller than Γ0 . Also, from Figure 4, it is clear that there is a gap of an order of magnitude between |CSD| and |ST|. Next, we note that Ψ is remarkably smaller than m (even notably smaller than n). This implies that all operations can be efficiently implemented using CSD. More importantly, we remark that Ψavg = |CSD|/n is at most 77.8 in the above experiment. Finally, we observe that despite increasing t at a rapid rate, |CSD| grows very slowly after t = 100. This is because the set of all possible filtration values of the Rips complex is small. Therefore, even for small values of t the simplicial complex and its filtration is accurately captured by CSD. Local Sensitivity of the Critical Simplex Diagram It is worth noting that while the cost of basic operations using Γ0 and Ψ, the actual   are bounded  ⋆ cost is bounded by parameters such as mini | Aℓi | , mini | Aℓi | , and Zv (the set of all maxi17 t 0 10 25 100 500 2,000 10,000 25,000 100,000 1,000,000 10,000,000 No 0 1 2 3 4 5 6 7 8 9 10 |ST| 10,508,486 10,508,486 10,508,486 10,508,486 10,508,486 10,508,486 10,508,486 10,508,486 10,508,486 10,508,486 10,508,486 |CSD| 179,521 490,071 618,003 728,245 765,583 774,496 777,373 778,151 778,319 778,343 778,343 Γ0 115 115 115 115 115 115 115 115 115 115 115 avg Γ0 17.9 17.9 17.9 17.9 17.9 17.9 17.9 17.9 17.9 17.9 17.9 Ψavg 17.9 49.0 61.8 72.8 76.5 77.4 77.7 77.8 77.8 77.8 77.8 Ψ 115 329 429 723 839 860 865 865 866 866 866 log10 |ST| Table 2: Values of |CSD|, Γ0 , Ψ, and Ψavg for the simplicial complex generated from the above avg data set with increasing values of t. Additionally, we provide Γ0 which is the expected number of maximal simplices that a vertex contains and Ψavg which is the average size of Ai . log10 |ST| 7.1 900 6.9 800 6.7 700 6.5 Ψ 6.3 600 6.1 500 log10 |CSD| log10 |CSD| 5.9 Ψ 400 5.7 300 5.5 200 5.3 100 5.1 000 0 1 2 3 log10 t 4 5 6 7 Figure 4: Values of log10 |ST|, log10 |CSD|, and Ψ for the simplicial complex generated from above data set with increasing values of t. The blue curve corresponds to log10 |CSD| on the left y axis plotted against log10 t on the x-axis. The red curve corresponds to Ψ on the right y axis plotted against log10 t on the x-axis. The green curve(line) corresponds to log10 |ST| on the left y axis plotted against log10 t on the x-axis. mal simplices that contain the vertex v which has been introduced in the Insertion paragraph on in Section 3.4.3) to get a better estimate   the cost of these operations. These parameters are indeed local. To begin with, mini | A⋆ℓi | captures the local information about a simplex σ sharing a vertex with other maximal simplices of the complex. More precisely, it is the minimum, over all the vertices of σ, of the largest number of maximal simplices that contain the 18   vertex. If σ has a vertex which is contained in a few maximal simplices then, mini | A⋆ℓi | is  small. Similarly, mini | Aℓi | is the minimum, over all the vertices of σ, of the largest number of critical simplices that contain the vertex. This value depends not only on the structure of the filtration function but also on the filtration range. Finally, Zv captures another local property of a simplex σ. Therefore, CSD is sensitive to the local structure of the complex. Robustness in Modification We now demonstrate the robustness of CSD, i.e., its ability to perform queries correctly and efficiently even when it might have stored redundant data such as simplices which are not critical or multiple copies of the same simplex with different filtration values. Consider modifying the filtration value of some simplex σ ∈ K from f (σ) to sσ (< f (σ)). In the case of ST, we will have to modify the filtration value inside the node containing σ and additionally check (and modify if needed) its faces in decreasing order of dimension. This requires time Θ(2dσ dσ (log n + log t)). However, in the case of CSD, we can lazy insert σ into CSD in time O(dσ log Ψ), and the data structure is robust to such an insertion. This is because, all the operations can be performed correctly and with the same efficiency up to constant additive factors in the worst case after a lazy insertion. This is even true if some previously critical simplices need to be removed due to the lazy insertion of σ. For instance, consider the is critical query on some simplex τ. If τ was a face of σ before modifying f (σ) then, the minimal filtration value of the nodes in Aτ correctly gives the filtration value of τ as sσ will now be one of the entries in Aτ . Otherwise, if τ was not a face of σ, then the filtration value of τ remains unchanged, as the lazy insertion of σ has not introduced a new simplex, but only a new filtration value to an existing simplex. Therefore, we can think of using the data structure to manipulate simplicial complexes in very short time through a collection of lazy insertions and perform a clean-up operation at the end of the collection of lazy insertions, or even think of performing the cleanup operation in parallel to the lazy insertions. We remark here that if we lazy insert r simplices then in the worst case, Ψ grows to r + Ψ. In other words, the presence of redundant simplices, implies that the efficiency will now depend on r + Ψ instead of Ψ, but the redundancy will not affect the correctness of the operations. 3.6 A Sequence of Representations for Simplicial Complexes and their Filtrations Boissonnat et al. [BKT17] in their paper on Simplex Array List described a sequence of data structures, each more powerful than the previous ones (but also bulkier). In that sequence of data structures hΛi, we had Λi = i-SAL (SAL referred to earlier in this paper is equal to 1-SAL). Furthermore, they note that in the ith element of the sequence, every node which is not a leaf (sink) in the data structure corresponds to a unique i-simplex in the simplicial complex. Also for all i-SAL, i ∈ N, they state that it is a NFA recognizing all the simplices in the complex. As one moves along the sequence, the size of the data structure blows up by a factor of d at each step. But in return, there is a gain in the efficiency of searching for simplices as the membership query depends on Γi which decreases as i increases. We note here that CSD described in this paper is exactly the same as 0-SAL, when t = 0 (we ignore the structure of the connected component, which is a path in SAL but a star in CSD). Therefore, CSD supercedes 0-SAL. There is no change in representation of a simplex between SAL and CSD; instead we only store more simplices (i.e, all critical simplices) in CSD. 19 Therefore, in the same vein as hΛi, we can define a sequence of data structures, each more powerful than the previous ones (but also bulkier). More formally, consider the sequence of data structures hΠi, where Π0 = CSD and Πi = t S i-SAL( M j ), for all i ∈ N. Furthermore, j=0 for all i ∈ N, we will refer to the data structure Πi by the name i-CSD (we will continue to refer to 0-CSD as CSD). As we move along the sequence Π, the size of the data structure blows up by a factor of d at each step. But in return, we gain efficiency in searching for simplices as the membership query depends on Γi which decreases as i increases. Additionally, we gain efficiency in accessing filtration value of a simplex as the complexity no longer depends on Ψ = Ψ0 but on a smaller parameter, Ψi , which is the maximum number of critical cofaces that any i-simplex can have in the complex. Marc Glisse and Sivaprasad S. implemented SAL [GS] for Data Set mentioned in Section 3.4, and then performed insertion and removal of random simplices, and contracted randomly chosen edges. They observed that 1-SAL outperformed 0-SAL in low dimensions. However, 0SAL performed better than 1-SAL in higher dimensions. Therefore, in a similar vein, it would be worth exploring for which class of simplicial complexes, i-CSD is the best data structure in the CSD family (for every i ∈ N). 4 Construction of Flag Complexes Recall that the flag complex of an undirected graph G is defined as an abstract simplicial complex, whose simplices are the sets of vertices in the cliques of G. Let ( P, k · k) be a metric space where P is a discrete point-set. Given a positive real number r > 0, the Rips complex is the abstract simplicial complex Rr ( P) where a simplex σ ∈ Rr ( P) if and only if k p − qk ≤ 2r for every pair of vertices of σ. Note that the Rips complex is a special case of a flag complex. Rips filtrations are widely used in Topological Data Analysis since they are easy to compute and they allow to robustly reconstruct the homology of a sample shape via the computation of its persistence diagram [CCG+ 09]. In this section, we will only consider a specific filtration for flag complexes which is of significant interest as it includes the Rips filtration. The filtration value of a vertex is 0. The filtration value of every edge e in the complex, denoted f (e), is given as part of the input. The filtration value of a simplex of higher dimension is equal to the maximum of the filtration values of all the edges in the simplex. 4.1 Edge-Deletion Algorithm for Construction of Flag Complexes Let G be the (weighted) graph of the simplicial complex K. Let ∆ denote the maximum degree of the vertices of G. To represent K using ST, Boissonnat and Maria [BM14] propose to compute and insert the ℓ-skeleton of K into ST and to incrementally increase ℓ from 1 to d. Therefore, the time to construct the ST representing the flag complex is O(md log n). To represent K using CSD, we propose an edge-deletion algorithm, which is significantly faster than the construction algorithm for ST. We recall that in Section 3.1 we defined Mh to denote the set of critical simplices in the complex with filtration value h. For the following algorithm, we will assume that all the edge weights are distinct. 20 Preprocessing Step We first compute all the maximal cliques in G in time O(k · nω ) [MU04], where ω < 2.38 [Gal14] is the matrix multiplication exponent, i.e., nω is the time needed to multiply two n × n matrices. We store these maximal simplices in a Prefix Tree (like MxST of [BKT17]). The filtration value given to the edges provides a natural ordering to the edges of the complex. We consider edges in descending order of their filtration value. Let ei be the edge with the ith highest filtration value. Set i = 1. Step 1 In this step, we would like to compute M f (ei ) in order to build the CSD of the complex. We observe that a clique in G containing the edge ei is maximal if and only if the vertices of the clique form a critical simplex in M f (ei ) . In the above observation we used the assumption that all the edge weights  are distinct. We list all the maximal simplices containing  in the graph the edge ei in time O M f (ei ) ∆ω , by using the algorithm presented by Makino and Uno [MU04] on a subgraph of G in the following way. We build an induced subgraph H of G that contains the vertices of edge ei and all the vertices which are adjacent to both vertices of ei . We note that every maximal clique in H is a maximal clique in G containing edge ei , and vice versa. Therefore, if we run Makino and Uno’s algorithm on H (which contains at most ∆ + 1 vertices), we obtain all the maximal cliques in G containing edge ei .   Step 2 Next, we recognize the maximal simplices of K in M f (ei ) in time O M f (ei ) d log n by checking each simplex σ in M f (ei ) with the Prefix tree built in the preprocessing step in time O(dσ log n) per simplex. We remark here that all the simplices in M f (e1 ) are maximal simplices in K, since e1 has the largest filtration value. Step 3 We perform lazy insertion of the simplices in M f (ei ) into the CSD and since we have identified the maximal simplices in M f (ei ) , we know whether to insert them in A⋆j or not, for     each A j . This takes time O M f (ei ) d log Ψ = O M f (ei ) d2 log n . Step 4 Finally, we remove ei from G, increment i by 1, and repeat the procedure from step 1 until G has no edges left.  This entire construction takes time O(| M |(∆ω + d2 log n)) = O | M |n2.38 , which is significantly better than that of constructing a representation of K by ST as | M | can be considerably (exponentially) smaller than m. Finally, we remark that if we lose the distinctness assumption on the edge weights, then some of the maximal cliques of H listed in Step 1 may not correspond to critical simplices, and thus we will need to perform the operation is critical after constructing the CSD and remove the star trees not corresponding to any of the critical simplices. 5 Construction of Relaxed Delaunay Complexes Let Q be a finite subset of a metric space ( P, k · k) where P is a discrete point-set. Given a relaxation parameter ρ ≥ 0, we define the notion of being ‘witnessed’ as follows. A simplex σ = {q0 , . . . , qdσ } ⊆ Q belongs to Delρ ( Q, P) [dS08, BDG15] if and only if there exists x ∈ P 21 that strongly ρ-witnesses σ, i.e. such that for all qi ∈ σ, and for all q ∈ Q the following holds: k x − qi k ≤ k x − qk + ρ. The parameter ρ defines a filtration, which has been used in topological data analysis. More explicitly, the filtration value of a simplex σ in Delρ ( Q, P) is the smallest ρ′ ≤ ρ, such that ′ σ is in Delρ ( Q, P). For this entire section, we assume that the filtration range is JtK (obtained after appropriate scaling). We define a matrix D of size | P| × | Q| as follows. For every x ∈ P and ℓ ∈ [| Q|] let D ( x, ℓ) denote the ℓth nearest neighbor of x in Q (ties are broken arbitrarily). For every x ∈ P, i ∈ JtK, let ℓix be the largest integer such that k x− D ( x, 1)k − k x − D ( x, ℓix )k ≤ ρi/t. Let σxi = { D ( x, 1), D ( x, 2), . . . , D ( x, ℓix )} and let W = σxi x ∈ P, i ∈ JtK . We note that the set M of critical simplices in the complex is contained in W. Lemma 6. M ⊆ W. Proof. Let τ = {v0 , . . . vdτ } be a critical simplex in M with filtration value f (τ ). By definition of Delρ ( Q, P), we have that there exists a point x ∈ P which ( f (τ )ρ/t) -strongly witnesses τ. Since τ is critical, we have that for every q ∈ Q \ τ, the following holds: ∀i ∈ Jdτ K, |k x − vi k − k x − qk| > ρ f (τ )/t. Therefore, we have that for every i ∈ [dτ + 1], D ( x, ℓix ) ∈ τ, or more precisely, σxdτ +1 = τ. The above lemma provides a characterization of Delρ ( Q, P): it can have at most | P|(d + 1) critical simplices (where d is the dimension of Delρ ( Q, P)). We note here that typically P is a relatively small set. For example, in the experiments performed by Boissonnat and Maria (Table 1 of [BM14]), we note that the cardinality of P is about a few ten thousands while the number of simplices in the complex is over a hundred million. Therefore, this provides practical evidence of the compact representation of Delρ ( Q, P) through CSD. Under the assumption that for any x, ℓ, D ( x, ℓ) could be computed in O(1) time (i.e., D is computed as part of the preprocessing), Boissonnat and Maria [BM14] described an algorithm to construct the ST representation of the relaxed witness complex. Their algorithm can be ρ easily adapted to construct Delw ( Q, P) in time O(tmd log n). In the case of CSD, we propose a new matrix-parsing algorithm which builds Delρ ( Q, P) in time O(| P|d2 log Ψ) (assuming an oracle to access D). It is easy to see that all the simplices in W can be constructed in O(|W |d log n) = O(| P|d2 log n) time by sequentially computing the simplices σxi for all the x ∈ P, i.e., by parsing the matrix D one row at a time. We lazy insert all the simplices in W to the CSD in time O(| P|d2 log Ψ). We finish the construction by performing a clean-up operation to remove the redundant simplices (i.e., non-critical simplices) that were inserted. 6 Conclusion In this paper, we introduce a new data structure called the Critical Simplex Diagram (CSD) to represent filtrations of simplicial complexes. In this data structure, we store only those simplices which are critical with respect to the filtration value, i.e., we store a simplex if and only 22 if all its cofaces are of a (strictly) higher filtration value than the filtration value of the simplex itself. We then show how to efficiently perform basic operations on simplicial complexes by only storing these (critical) simplices. This is summarized in Table 1. Finally, we showed how to (quickly) construct the CSD representation of flag complexes and relaxed Delaunay complexes. As a future direction of research, we would like to develop algorithms for computing persistent homology of a filtration using the CSD representation. This is a very important question, as computing persistence is at the heart of topological data analysis. On the other hand, it is open to obtain better bounds on Ψ and Γi for specific complexes such as the Rips complex or the relaxed Delaunay complex by assuming some notion of geometric regularity. Also, it would be interesting to obtain lower bounds on the various query times (such as membership, insertion/removal), by assuming an optimal storage of O(κd log n) (κ = | M | is the number of critical simplices). From the standpoint of practice, we would like to find fast construction algorithms under the CSD representation for other simplicial complexes of interest such as the alpha complex and the relaxed witness complex. Finally, we would like to implement this data structure and check its performance versus the Simplex Tree in practice. Acknowledgements We would like to thank the anonymous reviewers whose comments helped us improve the presentation of the paper. References [ALS12] Dominique Attali, André Lieutier, and David Salinas. Efficient data structure for representing and simplifying simplicial complexes in high dimensions. Int. J. Comput. Geometry Appl., 22(4):279–304, 2012. [BDG15] Jean-Daniel Boissonnat, Ramsay Dyer, and Arijit Ghosh. A probabilistic approach to reducing algebraic complexity of delaunay triangulations. In Algorithms - ESA 2015 - 23rd Annual European Symposium, Patras, Greece, September 14-16, 2015, Proceedings, pages 595–606, 2015. [BKT17] Jean-Daniel Boissonnat, Karthik C. S., and Sébastien Tavenas. Building efficient and compact data structures for simplicial complexes. Algorithmica, 79(2):530–567, 2017. [BM14] Jean-Daniel Boissonnat and Clément Maria. The simplex tree: An efficient data structure for general simplicial complexes. Algorithmica, 70(3):406–427, 2014. [CCG+ 09] Frédéric Chazal, David Cohen-Steiner, Marc Glisse, Leonidas J. Guibas, and Steve Oudot. Proximity of persistence modules and their diagrams. In Proceedings of the 25th ACM Symposium on Computational Geometry, Aarhus, Denmark, June 8-10, 2009, pages 237–246, 2009. [DFW14] Tamal K. Dey, Fengtao Fan, and Yusu Wang. Computing topological persistence for simplicial maps. In 30th Annual Symposium on Computational Geometry, SOCG’14, Kyoto, Japan, June 08 - 11, 2014, page 345, 2014. 23 [dS08] Vin de Silva. A weak characterisation of the delaunay triangulation. Geometriae Dedicata, 135(1):39–64, 2008. [Dur03] Guillermo Durán. Some new results on circle graphs. Matemática Contemporânea, 2003. [EH10] Herbert Edelsbrunner and John Harer. Computational Topology - an Introduction. American Mathematical Society, 2010. [ELS10] David Eppstein, Maarten Löffler, and Darren Strash. Listing all maximal cliques in sparse graphs in near-optimal time. In Algorithms and Computation - 21st International Symposium, ISAAC 2010, Jeju Island, Korea, December 15-17, 2010, Proceedings, Part I, pages 403–414, 2010. [Gal14] François Le Gall. Powers of tensors and fast matrix multiplication. In International Symposium on Symbolic and Algebraic Computation, ISSAC’14, Kobe, Japan, July 23-25, 2014, pages 296–303, 2014. [Gav74] Fanica Gavril. Algorithms on circular-arc graphs. Networks, 4(4):357–369, 1974. [GKS13] Martin Grohe, Stephan Kreutzer, and Sebastian Siebertz. Characterisations of nowhere dense graphs (invited talk). In IARCS Annual Conference on Foundations of Software Technology and Theoretical Computer Science, FSTTCS 2013, December 1214, 2013, Guwahati, India, pages 21–40, 2013. [Gol80] Martin Charles Golumbic. Algorithmic graph theory and perfect graphs. Computer science and applied mathematics. Academic Press, New York, 1980. [GS] M. Glisse and S. Sivaprasad. Private communication. [Hed73] Stephen T. Hedetniemi. Hereditary properties of graphs. Journal of Combinatorial Theory, Series B, 14(1):94 – 99, 1973. [MU04] Kazuhisa Makino and Takeaki Uno. New algorithms for enumerating all maximal cliques. In Algorithm Theory - SWAT 2004, 9th Scandinavian Workshop on Algorithm Theory, Humlebaek, Denmark, July 8-10, 2004, Proceedings, pages 260–272, 2004. [Pri95] Erich Prisner. Graphs with few cliques. In 7th Quadrennial International Conference on the Theory and Applications of Graphs, Graph Theory, Combinatorics, and Applications, pages 945–956, 1995. [Pro15] The GUDHI Project. GUDHI User and Reference Manual. GUDHI Editorial Board, 2015. [RS07] Bill Rosgen and Lorna Stewart. Complexity results on graphs with few cliques. Discrete Mathematics & Theoretical Computer Science, 9(1), 2007. [Spi03] J.P. Spinrad. Efficient Graph Representations.: The Fields Institute for Research in Mathematical Sciences. Fields Institute monographs. American Mathematical Soc., 2003. 24
8cs.DS
How Well Can Generative Adversarial Networks Learn Densities: A Nonparametric View arXiv:1712.08244v2 [stat.ML] 16 Feb 2018 Tengyuan Liang∗ University of Chicago Abstract. We study in this paper the rate of convergence for learning densities under the Generative Adversarial Networks (GAN) framework, borrowing insights from nonparametric statistics. We introduce an improved GAN estimator that achieves a faster rate, through simultaneously leveraging the level of smoothness in the target density and the evaluation metric, which in theory remedies the mode collapse problem reported in the literature. A minimax lower bound is constructed to show that when the dimension is large, the exponent in the rate for the new GAN estimator is near optimal. One can view our results as answering in a quantitative way how well GAN learns a wide range of densities with different smoothness properties, under a hierarchy of evaluation metrics. As a byproduct, we also obtain improved generalization bounds for GAN with deeper ReLU discriminator network. Key words and phrases: Generative adversarial networks, nonparametric statistics, density estimation, Sobolev spaces, oracle inequality, neural network learning. 1. INTRODUCTION Generative Adversarial Networks (GANs) [Goodfellow et al., 2014, Li et al., 2015, Arjovsky et al., 2017, Dziugaite et al., 2015] have stood out as an important unsupervised method for learning and efficient sampling from a complicated, multi-modal target data distribution. Despite its celebrated empirical success in image tasks, there are many theoretical questions to be answered [Liu et al., 2017, Arora and Zhang, 2017, Arora et al., 2017a]. One convenient formulation of the GAN framework [Arjovsky et al., 2017, Li et al., 2015, Dziugaite et al., 2015, Liu et al., 2017] solves the following minimax problem, at the population level, min max E f (Y ) − E f (X). µ∼µG f ∈FD Y ∼µ X∼ν In plain language, given a target distribution ν, one seeks for a distribution µ from a probability distribution generator class µG , such that it minimizes the loss incurred by the best discriminator function inside the discriminator class FD . In practice, both the generator class and the discriminator class are represented by neural networks. µG quantifies the transformed distributions realized ∗ (e-mail: [email protected]) 1 file: paper.tex date: February 20, 2018 by a network with random inputs (either Gaussian or uniform distribution), and FD represents the functions that are realizable by a certain neural network architecture. We refer the readers to Liu et al. [2017] for other more general formulations of GANs. In practice, one only has access to finite samples of the real data distribution ν. Denote ν̃n to beP a measure estimate based on n i.i.d. samples from ν, where the empirical density dν̂n (x)/dx = n 1 i=1 δXi (x) is typically used. Given the samples, the GAN solves the following problem n (1.1) µ̃n = arg min max E f (Y ) − E f (X). µ∼µG f ∈FD Y ∼µ X∼ν̃n Two fundamental yet basic questions that puzzle machine learning theorists are: (1) how well does GAN learn the densities statistically, overlooking the optimization difficulty? (2) how well does the iterative optimization dynamics of solving the minimax problem approximate the optimal solution? In the statistics literature, density estimation has been a central topic in nonparametric statistics [Nemirovski, 2000, Tsybakov, 2009, Wassermann, 2006]. The minimax optimal rate of convergence has been understood fairly well, for a wide range of density function classes quantified by its smoothness. We would like to point out a simple yet convincing connection between two fields: in nonparametric statistics, the model grows in size to accommodate the complexity of the data, which is reminiscent of the model complexity in GANs, and more generally in the deep neural networks. The current paper studies the GAN framework for learning densities from a nonparametric point of view. The focus of the current paper is not on the optimization side of how to solve for µ̃n efficiently, rather on the statistical front: how well µ̃n estimates a wide range of nonparametric distributions ν under a wide collection of objective metrics, and how to improve the GAN procedure with better theoretical guarantee such as rate of convergence. Note the GAN framework mentioned above is flexible. Define the following metric induced by the function class F, dF (µ, ν) := max E f (Y ) − E f (X). f ∈F Y ∼µ X∼ν If F contains all Lipschitz-1 functions, then dF (µ, ν) is the Wasserstein-1 metric (Wasserstein-GAN [Arjovsky et al., 2017]). When F represents all functions bounded by 1, then dF (µ, ν) is the total variation metric (Radon metric). Let H be a reproducing kernel Hilbert space (RKHS) and k(·, ·) be its kernel. If F consists of functions in the closure of the span of the set {k(·, x), x ∈ Ω}, then dF (µ, ν) = kd(µ − ν)/dxkH (MMD-GAN [Dziugaite et al., 2015, Li et al., 2015]). 1.1 Contributions We summarize the main contributions here. Before introducing the results, let’s mention the Sobolev spaces formally defined in Def. 1 and 2. We use W α,p (L) to denote the Sobolev space with smoothness α ≥ 0, with ℓp -Sobolev norm bounded by L, for p = 2, ∞. Denote the Wasserstein-1 metric as W (µ, ν). Consider the density function that lies in Sobolev space with smoothness parameter α  FR := ν : dν(x)/dx ∈ W α,2 (L) and the discriminator function class FD = W β,2 (L) with smoothness β. As α, β varies, FR describes a wide range of nonparametric densities, and FD provides a rich hierarchy of critic metrics. Let n be the sample size, d be the dimension. 2 Smoothness motivates new procedures. We introduce a new GAN estimator µ̃n based on a regularized/smoothed version of the empirical measure ν̃n , which enjoys the rate approximation error }| { z − α+β E dFD (µ̃n , ν) − min dFD (µ, ν) - n 2(α+β)+d . µ∈µG In contrast, as long as α > a considerably slower rate β d/(2β)−1 , the GAN estimator µ̂n with empirical measure ν̂n only achieves β 1 E dFD (µ̂n , ν) − min dFD (µ, ν) - n− d + n− 2 , µ∈µG which doesn’t adapt to the smoothness of the target measure ν. Remark that the regularized/smoothed empirical measure estimate ν̃n can theoretically be viewed as a remedy to the known mode-collapse problem [Arora et al., 2017b] reported in GAN. Our improved theoretical rates complement the reported findings in practice, that introducing “instance noise” to smooth the empirical measure fulfills the goal of stabilizing GANs [Arjovsky and Bottou, 2017, Sønderby et al., 2016]. Nonparametric estimation with GAN framework. The GAN framework for nonparametric density estimation enjoys the upper bound     α+β − 2(α+β)+d − βd − 21 E d (µ̃ , ν) − min d (µ, ν) min n sup ,n +n . FD n FD µ∈µG ν∈FR One may wonder whether this rate can be significantly improved by other approaches. We show that for any procedure νn based on n samples, the minimax lower bound under the metric dFD reads α+β 1 inf sup dFD (νn , ν) % n− 2α+d + n− 2 . νn ν∈F R In the case when d is large, the exponent in the upper bound and the minimax lower bounds are α+β α+β . very close to each other, in the sense that 2α+d = (1 + O(1/d)) 2(α+β)+d In the case when both the generator and discriminator are realized by neural networks. We establish the following results using the insights gained from above. Networks can learn densities. We make progress on answering how well generative adversarial networks learn nonparametric densities dν(x)/dx ∈ W α,∞ (L) with smoothness parameter α, under the Wasserstein metric. Consider the GAN estimator µ̃n in (1.1). Assume that the discriminator neural network can approximate functions in W 1,∞ (1) within error ǫ, and the generator neural network can approximate densities in W α,∞ (L) within ǫ. Then µ̃n learns the true distribution ν with accuracy   α+1 sup E W (µ̃n , ν) ≤ C · ǫ + n− 2α+2+d . dν/dx∈W α,∞ (L) In addition, for all estimators νn based on n samples, the minimax rate cannot be smaller than inf sup νn dν/dx∈W α,∞ (L) α+1 E W (νn , ν) ≥ c · n− 2α+d . 3 Here C, c > 0 are constants independent of n. Note that by Yarotsky [2017], one can approximate W k,∞(1) within ǫ accuracy by ReLU networks with log(1/ǫ) depth and poly(1/ǫ) units for integer k. The formal and more general statment can be found in Thm. 3.1. Generalization error for deeper ReLU discriminator networks. Let FD = F (ℓ) (V ) be the collection of functions realized by the feedforward ReLU network with depth ℓ, where for each unit in the network, the vector w of weights associated with that unit has kwk1 ≤ V . Let the true density dν/dx ∈ W α,2 (L). Then there exist a regularized/smoothed GAN estimator µ̃n that satisfies the upper bound, α+1 1 E dFD (µ̃n , ν) − min dFD (µ, ν) ≤ C · L(d + 1) 2 V ℓ n− 2α+2+d . µ∈µG This improves significantly upon the known bound on µ̂n obtained using empirical density — which 1 1 d is C · (log d) 2ℓ (2V )(ℓ+1)/2 n− 2ℓ [Anthony and Bartlett, 2009] — as long as α > 2(ℓ−1) − 1, which allows for better guarantee for deeper discriminator networks. 1.2 Preliminaries Let’s introduce the notations, and function spaces used in this paper. During the discussion, we restrict the feature space to be Ω = [0, 1]d . We use µ, ν to denote the measure, and the RadonNikodym derivatives dµ(x)/dx, dν(x)/dx to denote the corresponding density functions. kf kp := 1/p R p denotes the ℓp -norm under the Lebesgue measure, for 1 ≤ p ≤ ∞. With slight Ω |f (x)| dx abuse of notation, for probability measures µ, ν we denote kµkp := kdµ/dxkp and similarly for kµ − νkp = kdµ/dx − dν/dxkp . For vector w, kwkp denotes the vector ℓp -norm. Definition 1 (Sobolev space: k ∈ N). For integer k, define the Sobolev space W k,p (L) (p = 2, ∞)     X W k,2 (L) := f ∈ Ω → R : ( kD (α) f k22 )1/2 ≤ L ,   |α|≤k   W k,∞(L) := f ∈ Ω → R : max kD (α) f k∞ ≤ L , |α|≤k where α is a multi-index and D (α) denotes the α-weak derivative. The definition naturally extends to fractional α ∈ R through the Bessel potential, with Ff (ξ) : R → C denotes the Fourier transform of f , and F −1 as its inverse. Definition 2 (Sobolev space: α ∈ R). For α ∈ R, the Sobolev space W α,2 (L) definition extends to non-integer α, i o h n α ≤L . W α,2 (L) := f ∈ Ω → R : F −1 (1 + |ξ|2 ) 2 Ff (ξ) 2 Another equivalent definition of Sobolev space for p = 2 is through the coefficients of the generalized Fourier series, which is also referred to as the Sobolev ellipsoid. Definition 3 (Sobolev ellipsoid). Let θ = {θξ , ξ = (ξ1 , . . . , ξd ) ∈ Nd } collects the coefficients of the generalized Fourier series, define   d   X X Θα (L) := θ ∈ Nd → R : ξi2 )α θξ2 ≤ L2 . (1 +   d ξ∈N 4 i=1 It is clear that Θα (L) (frequency domain) is an equivalent representation of W α,2 (L) (spatial domain) in L2 (Nd ) for trigonometric Fourier series. For more details on Sobolev spaces, we refer to Nemirovski [2000], Tsybakov [2009], Nickl and Pötscher [2007]. α Denote A(n) - nα , if lim loglogA(n) n ≤ α, holding other parameters fixed, similarly A(n) % n if n→∞ lim n→∞ log A(n) log n ≥ α. Denote A(n) ≍ nα if A(n) - nα and A(n) % nα . [K] := {0, 1, . . . , K} denotes the index set, for any K ∈ N. 2. A NONPARAMETRIC VIEW OF THE GAN FRAMEWORK 2.1 An oracle inequality The following oracle inequality holds for GAN. Theorem 2.1 (Oracle inequality for GAN). Let F be any critic function class. Denote µn as the solution (w.r.t. the empirical estimate νn ) to GAN with generator µG and discriminator FD µn = arg min max E f (Y ) − E f (X). µ∼µG f ∈FD Y ∼µ X∼νn Then the following decompositions hold for any distribution ν, (2.1) approx. err. stat. err. z }| { z }| { dFD (µn , ν) ≤ min dFD (µ, ν) + dFD (ν, νn ) + dFD (νn , ν), µ∈µG (2.2) discriminator approx. err. generator approx. err. stat. err. }| { z z }| { }| { z ′ kf − f k + d (ν, ν ) + d (ν , ν) . dF (µn , ν) ≤ min dFD (µ, ν) + (1 + kνn k1 ) · max min ∞ F n F n D ′ µ∈µG f ∈F f ∈FD Let’s remark on the decompositions. Eqn. (2.1) use dFD as the objective evaluation metric. The first term is the best approximation error within the generator class, even if we have population access to the true measure ν. The second term is the statistical error, also called the generalization error, due to the fact that we have only finite n-samples. Eqn. (2.2) employs a different dF as the objective metric, while using the mis-matched discriminator class FD in the GAN procedure. The first term describes the approximation error induced by the generator, the second term corresponds to how well the discriminator serves as a surrogate for the objective metric, and the third term is the statistical error. Using the above theorem, choose FD as the critic metric, we need to study the excess loss E dFD (µn , ν) − min dFD (µ, ν) ≤ 2 E dFD (ν, νn ). µ∈µG P We will start with a crude bound when dνn (x)/dx = n1 ni=1 δXi (x) is chosen as the empirical density. It turns out that one can significantly improve this bound through choosing a better “regularized” or “smoothed” version of empirical measure, in the context of learning nonparametric densities. The empirical measure is not optimal because one can leverage the complexity/smoothness of the measure ν, and the complexity of FD to improve upon the generalization error. 5 2.2 Upper bound for arbitrary density Let’s start with a simple bound on E dFD (ν, νn ) with νn = ν̂n , the empirical measure. We will illustrate why this is suboptimal to feed to GAN to learn smooth densities, and further how to improve by employing a regularized estimate ν̃n as a plug-in for GAN. Lemma 2.1 (Arbitrary density). Take dν̂n (x)/dx = 1 n Pn i=1 δXi (x), then n 1X E dFD (ν, ν̂n ) ≤ 2 E E sup ǫi f (Xi ). ν ⊗n ǫ f ∈FD n (2.3) i=1 Assuming supf ∈FD kf k∞ ≤ 1, one has the standard entropy integral bound, E dFD (ν, ν̂n ) ≤ 2 E inf ν ⊗n 0<δ<1/2 where kf kn := p 1/n Pn 2 i=1 f (Xi ) ! √ Z 8 2 1/2 p log N (ǫ, FD , k · kn )dǫ , 4δ + √ n δ is the empirical ℓ2 -metric on data {Xi }ni=1 . The above lemma is a standard symmetrization followed by the Dudley entropy integral. When applying the symmetrization lemma, one often discard the distribution information about ν, and thus end up with distribution-independent guarantees. The reason is that one typically bound the empirical ℓ2 -covering number by ℓ∞ -covering number on the function class (independent of Xi ) " n 2 1X ′ f (Xi ) − f ′ (Xi ) kf − f kn = n i=1 #1/2 ≤ sup kf (x) − f ′ (x)k = kf − f ′ k∞ , x which implies log N (ǫ, FD , k · kn ) ≤ log N (ǫ, FD , k · k∞ ). Plugging in the entropy estimate log N (ǫ, FD , k·k∞ ) for various functional classes (Nickl and Pötscher [2007] and reference therein), one can easily derive the following corollary. If FD denotes L-Lipschitz function (Wasserstein- Corollary 2.1 (Rates for arbitrary density). GAN) on Rd , d ≥ 2, one has 1 E dFD (µ̂n , ν) − min dFD (µ, ν) ≤ 2 E dFD (ν, ν̂n ) - n− d . µ∈µG If FD denotes Sobolev space W β,2 (L) on Rd , one has β log n E dFD (µ̂n , ν) − min dFD (µ, ν) ≤ 2 E dFD (ν, ν̂n ) - n− d + √ . µ∈µG n It is easy to see that overlooking the distributional information — by simply going through symmetrization and empirical processes theory — can lead to suboptimal result when the true density is smooth. Roughly speaking, the symmetrization approach treats the true density as a highly non-smooth one with α = 0 (say the empirical density). Next, we will investigate how to improve GAN when the true density lies in Sobolev spaces W α,2 (L), α > 0. 6 2.3 Smoothness helps: improved upper bound for Sobolev spaces Now we show that one can achieve faster rates in the GAN framework for density estimation, simultaneously leveraging the smoothness information in the density dν and the metric FD . Suppose the density function dν(x)/dx ∈ W α,2 (L), and FD = W β,2 (L). Claim that there exist ṽn , a smoothed/regularized version of empirical measure such that plugging into GAN will result in a faster rate that adapts to the smoothness of the truePdensity. Remark that in practice, one n 1 can take ṽn as a kernel density estimate dṽn (x)/dx = nh i=1 K((Xi − x)/h), where sampling a mini-batch of data from ν̃n is just as simple for stochastic gradient updates in GAN optimization. Theorem 2.2 (Nonparametric estimation with GAN framework). Consider the density function class that lies in Sobolev space with smoothness parameter α, and the discriminator function class with smoothness β,   dν(x) α,2 FR := ν : ∈ W (L) , FD = W β,2 (L). dx Then there exist a smoothed version of empirical measure ν̃n that satisfies sup E dFD (ν, ν̃n ) - n α+β − 2(α+β)+d . ν∈FR Remark 2.1. Theorem 2.1 tells us the rate of convergence satisfies the following upper bound   − α+β sup E dFD (µ̃n , ν) − min dFD (µ, ν) ≤ 2 sup E dFD (ν, ν̃n ) - n 2(α+β)+d . ν∈FR µ∈µG dν/dx∈W α,2 (L) β Compare with the bound in Corollary 2.1, E dFD (ν, ν̂n ) - n− d + β < d/2, if the true density is mildly smooth as long as α> log √ n, n one can see that when β2 , d/2 − β this nonparametric upper bound achieves a faster rate than the symmetrization bound which ignores the smoothness of the distribution. Remark in the real applications of GAN, the dimension d is rather large (in images usually d > 103 ), and β is fairly small for a strong metric (β = 1 in Wasserstein GAN), so this condition is satisfied for any α > 0.002. In summary, we write out the explicit rate of convergence,    n− 21 , if β ≥ d2 β −β if β < d2 and α < d/2β−1 inf sup E dFD (µ̃n , ν) − min dFD (µ, ν) - n d , . α+β µ∈µG µ̃n ν∈FR  − 2(α+β)+d β d n , if β < 2 and α ≥ d/2β−1 One final remark is that the level of smoothing in ν̃n is more aggressive than that in classic nonα − 2α+d parametric regression literature (which results in a slower rate n ), as we can utilize at the same time the smoothness information in the discriminator metric FD . Let’s broaden the discussions slightly by considering different base measures π(x) beyond the Lebesgue measure, and the generalized Fourier basis. One can think of π(x) as the uniform measure on [0, 1]d or the product Gaussian measure. An equivalent formulation of the GAN problem that 7 translates learning a distribution dµ(x) = g(x)dπ(x) to learning the importance score/density ratio function g(x) with respect to a base measure π(x), x ∈ X , can be viewed as Z Z dν(y) dµ(x) dπ(x) − f (y) dπ(y) min max E f (X) − E f (Y ) = min max f (x) µ∼µG f ∈FD µ∼µG f ∈FD X∼µ Y ∼ν dπ(x) dπ(y) dµ dν = min max hf, giπ − hf, hiπ , where g = ,h = , g∈FG f ∈FD dπ dπ R hf, giπ := f (x)g(x)dπ(x), and FG := {g : g = dµ/dπ, µ ∈ µG }. Consider the generalized Fourier basis {ψξ , ξ ∈ Nd } w.r.t the base measure π(x) that satisfies hψξ , ψξ iπ = 1, and hψξ , ψξ ′ iπ = 1 for ξ 6= ξ ′ , where ξ is the multi-index. P For any function g(x), one can represent the function in the generalized Fourier basis g(x) = ξ∈Nd θξ (g)ψξ (x), where θ(g) ∈ Nd denotes the coefficients of g. The Sobolev ellipsoid — the coefficients θ(g) lies in — quantifies the smoothness of the function g. As a special case, when the base measure is uniform distribution on [0, 1]d , θ(g) ∈ Θα (L) ⇔ g ∈ W α,2 (L). In general, for any base measure π(x) and its corresponding Fourier series {ψξ , ξ ∈ Nd }, one can easily extend Theorem 2.2 using Sobolev ellipsoid Θα (L). Corollary 2.2. Assume the generalized Fourier basis are bounded maxξ kψξ (x)k∞ ≤ C. Consider the density function class with smoothness α, and the discriminator function class FD with smoothness β  FR := ν : dν/dπ = g, and θ(g) ∈ Θα,2 (L) , n o FD := f : θ(f ) ∈ Θβ,2 (L) . Then there exist a smoothed version of empirical measure ν̃n that satisfies sup E dFD (ν, ν̃n ) - n α+β − 2(α+β)+d . ν∈FR 2.4 Minimax lower bound Can the rate obtained by GAN framework be significantly improved by any other procedure? We consider in this section the minimax lower bound for the intrinsic difficulty of nonparametric estimation under the GAN discriminator metric. Here we consider a nonparametric function estimation problem on the Sobolev ellipsoid Θα (L), which is statistically equivalent to the density estimation problem over the Sobolev space W α,2 (L) asymptotically [Tsybakov, 2009]. A separate lower bound for the density estimation within the smaller Hölder class P W α,∞ (L) is proved in Thm. 3.1. Consider the problem of estimating the function g(x) = ξ∈Nd θξ (g)ψξ (x), where the coefficients belongs to a Sobolev ellipsoid θ(g) ∈ Θα (L). What one observes are i.i.d normal sequences {Yξ , ξ ∈ Nd } 1 Yξ = θξ (g) + √ Zξ , Zξ ∼ N (0, 1). n (2.4) Based on observations {Yξ , ξ ∈ Nd }, we want to know how well one can estimate g w.r.t the following metric n o dFD (ĝ, g) = sup hf, ĝiπ − hf, giπ , where FD := f : θ(f ) ∈ Θβ (L) . f ∈FD 8 Theorem 2.3 (Minimax lower bound). Consider the function class with smoothness α and the discriminator function class FD with smoothness β n o FR := {ν : dν/dπ = g, and θ(g) ∈ Θα (L)} , FD := f : θ(f ) ∈ Θβ (L) . In the Gaussian sequence model (2.4), for any estimator νn , α+β inf sup dFD (νn , ν) % n− 2α+d . νn ν∈F R Remark 2.2. Let us compare our lower bound with the upper bound in Remark 2.1. When the generator function class is rich enough so that µG contains the ν, the upper bound becomes   inf sup E dFD (µ̃n , ν) = inf sup E dFD (µ̃n , ν) − min dFD (µ, ν) µ∈µG µ̃n ν∈FR µ̃n ν∈FR   α+β − 2(α+β)+d − βd − 21 ≤ 2 inf sup E dFD (ν̃n , ν) - min n ,n +n . ν̃n ν∈FR In contrast the lower bound reads α+β 1 inf sup dFD (νn , ν) % n− 2α+d + n− 2 . νn ν∈F R Remark again, when take as a special case the base measure π(x) being uniform on [0, 1]d , FR = W α,2 (L) and FD = W β,2 (L) are the usual Sobolev spaces. In the case when d is large, the exα+β = ponents in the upper and lower bounds are very close to each other, in the sense that 2α+d α+β (1 + od (1)) 2(α+β)+d . 3. HOW WELL NETWORKS LEARN DENSITIES In this section, we answer in a quantitative way that when both the generator class and the discriminator class represented by deep ReLU networks are rich enough, one do learn the distribution. One can view our results as establishing rate of convergence and fundamental difficulty for learning the distribution under the GAN framework, for a wide range of densities with different smoothness properties. It builds a more detailed theory upon the seminal work of Goodfellow et al. [2014], where they proved that when sample sizes, generator sizes, and discriminator sizes are all infinite, one learns the distribution. 3.1 Deep ReLU networks can learn densities Let’s remark on the universal approximation property of deep networks first before introducing the result. It is well known that deep neural networks are universal approximators [Hornik et al., 1989]. In particular, Yarotsky [2017] constructed a fixed ReLU network architecture, denoted as α (ǫ), that enjoys the following two properties: Frelu • It approximates all functions in W β,∞ (1) in the following sense max min f ∈W β,∞ (1) f ′ ∈F β,∞ (ǫ) relu kf − f ′ k∞ ≤ ǫ. • It has depth at most O(log 1/ǫ) and at most O(ǫ−d/β log 1/ǫ) weights and computation units. 9 With the above in mind, we are ready to state the following theorem. Theorem 3.1. Let α, β ∈ N, n be the sample size, and ǫ > 0 be the approximation accuracy. Let L, M > 0 be some fixed constants. Assume that: A.1 The discriminator network class can approximate the Sobolev space W β,∞ (1), in the sense that maxf ∈W β,∞ (1) minf ′ ∈FD kf − f ′ k∞ ≤ ǫ; A.2 The generator network class can approximate the Sobolev space ν ∈ W α,∞ (L), in the sense that for any true density dν/dx ∈ W α,∞ (L), minµ∈µG kµ − νk∞ ≤ ǫ; A.3 The discriminator network class is not overly complex in the sense that FD ⊂ W β,2 (L) ∩ W 0,∞ (M ). In other words, the weak derivatives are integrable and the function is bounded. Then, there exist a GAN estimator µ̃n that satisfies the upper bound   α+β − 2(α+β)+d − βd − 21 +n ,n (3.1) . sup E dW β,∞ (1) (µ̃n , ν) ≤ C1 ǫ + C2 min n ν∈W α,∞ (1) In addition, the minimax lower bound for any estimator νn based on n samples satisfies,   α+β 1 (3.2) inf sup E dW β,∞ (1) (νn , ν) ≥ C3 n− 2α+d + n− 2 . νn dν/dx∈W α,∞ (L) Here Ci , i = 1, 2, 3 are constants independent of n. Remark 3.1. Note the lower bound here is harder than that in Theorem 2.3 because: (1) the class is in fact Hölder (subset of the Sobolev), W α,∞ (L) ⊂ W α,2 (L), (2) for density estimation directly. Let us make few remarks on the objective metrics and rates here. When β = 1, the objective metric is equivalent to the Wasserstein-1 metric (Lemma 4.2). Therefore with properly chosen α+1 discriminator and generator network GAN enjoys the upper bound n− 2α+2+d , while the minimax α+1 lower bound being n− 2α+d . Consider the following two scenarios: 1. When the dimension d is very large, for a fixed smoothness parameter α, these two rates are very close. In this case, to obtain an ǫ-error in Wasserstein metric, GAN requires exponential d number of samples (in dimension) n = ǫ−(2+ α+1 ) , so does any other procedure as indicated by the lower bound. 2. When the the smoothness parameter scales with the dimension, say α + 1 ≥ d/C0 for some constant C0 > 0, then GAN only requires a polynomial number of samples n = ǫ−(2+C0 ) . In the large dimension setting when d → ∞, any other procedure will require at least n = ǫ−(2+C0 ) as well. When β = 0, the objective metric is the αtotal variation distance. In this case, the rate achieved by GAN is rate optimal for all α, with n− 2α+d . It is also easy to see this as kµ − νk1 ≤ kµ − νk2 , and α the nonparametric estimation rate for ℓ2 -error is known to be n− 2α+d . Remark 3.2. Let us comment on the assumptions used in the theorem. We consider the funcα+β ∨ ( βd ∧ 21 ) and let’s choose tion class realized by ReLU networks. Define c(α, β, d) = 2(α+β)+d ǫ ≍ n−c(α,β,d) . The assumption A.1 on the discriminator network class can be realized by subsuming a specific β,∞ β,∞ fixed architecture [Yarotsky, 2017] as a subclass FD ⊇ Frelu (ǫ), where the network Frelu (ǫ) has 10 d depth O(c(α, β, d) log n), and O∗ (n β c(α,β,d) ) weights and computational units. Roughly, this means that one may need a deep discriminator network (scales logarithmically with number of samples in depth, and polynomially in number of units) to recover the density in a strong sense such as under the Wasserstein metric. The assumption A.2 on the generative network class can also be realized if we reformulate the GAN in an importance sampling way: given uniform samples X ∈ [0, 1]d , the generative network outputs a importance/density score µ(X) realized by function realized by the network. Again, the d c(α,β,d) β,∞ ) weights does the job. deep network µG ⊇ Frelu (ǫ) with depth O(c(α, β, d) log n) and O∗ (n β Note in practice, the generative network learns a transformation of X with µ(X) as the density, instead of assigning the importance score. We do acknowledge that learning the transformation mapping (represented by the network) from the input random measure to the target measure has computational advantage over the importance sampling approach. However, overlooking the computation, output an importance score is also plausible to learn a distribution theoretically. The assumption A.3 can be relaxed. In fact, one can prove a variant of the theorem without assumption 3, in the sense E dW β,∞ (1) (µ̃n , ν) ≤ E dFD (ν̃n , ν) + n−c(α,β,d) . It formalizes the intuition that if we choose a too strict metric as the discriminator (FD too rich), even though we are evaluating on a weaker metric (induced by a smaller function space W β,∞ (1)), there is a price to pay in the rates for choosing the overly complex space FD as discriminator. 3.2 Error rates for deeper ReLU discriminator networks In the GAN formulation, the discriminator class FD is represented by functions realized by a neural network with a certain architecture. In this section, we will apply our theory to obtain bounds for a wide range of feed-forward multi-layer networks with ReLU activation as the discriminator metric. Denote σ(x) = max(x, 0) as the ReLU activation. Consider the following feed-forward multi-layer network: • The network has ℓ layers, input x ∈ [0, 1]d , • There is constant V ≥ 1 such that for each unit in the network, the vector w of weights associated with that unit has kwk1 ≤ V . Mathematically, one can define the function class induced by the network through the recursive definition: F (0) (V ) = {x → xi : x = (x1 , . . . , xd ) ∈ [0, 1]d , i ∈ [d]} ∪ {0, 1}, and for any i ≥ 1,   i−1 X  [ F (i) (V ) = wj σ(fj ) : ∀j, fj ∈ F (k) (V ), kwk1 ≤ V . (3.3)   j k=0 Theorem 3.2 (GAN with ReLU discriminator network). Let FD = F (ℓ) (V ) be the collection of functions realized by the discriminator ReLU network with depth ℓ, and the true density dν(x)/dx ∈ W α,2 (L) lies in a Sobolev space with smoothness parameter α. Then there exist a GAN estimator µ̃n that satisfies the upper bound, (3.4) 1 α+1 E dFD (µ̃n , ν) − min dFD (µ, ν) ≤ CL(d + 1) 2 V ℓ n− 2α+2+d . µ∈µG 11 Remark 3.3. Let’s remark on how our bound improves upon what is known, and when one can improve GAN by using a better estimate than the empirical measure ν̂n . Recall the covering number bound (Thm. 14.17) for deeper networks in Anthony and Bartlett [2009], one knows that log N (ǫ, F (ℓ) 1 (V ), k · kn ) ≤ 2  2ℓ 1 (2V )ℓ(ℓ+1) log(2d + 2). ǫ Plug in the covering number bound into our entropy integral in Lemma 2.1, we know that GAN solution µ̂n with the empirical measure ν̂n as input enjoys (for ℓ ≥ 2)   Z ∞q 1 (ℓ) E dFD (µ̂n , ν) − min dFD (µ, ν) ≤ C inf δ + √ log N (ǫ, F (V ), k · kn )dǫ µ∈µG δ n δ 1 1 ≤ C(log d) 2ℓ (2V )(ℓ+1)/2 n− 2ℓ . (3.5) When compare these two bounds in (3.4) and (3.5), we see that the V ℓ factor occurs in both bounds, but note that our bound is better when α> α+1 1 d − 1 ⇔ n− 2α+2+d < n− 2ℓ . 2(ℓ − 1) More concretely, consider the following two extreme scenarios: 1. Density is rather smooth, say α + 1 ≥ d/(2C0 ) for some fixed C0 , then as long as ℓ ≥ C0 + 1, our bound is better. 2. Network is deep, say ℓ − 1 ≥ d/(2C0 ), then as long as α ≥ C0 − 1, our bound is better. In other words, we do achieve a faster rate to substitute the empirical measure ν̂n by a regularized (smoothed) version ν̃n when learning a smooth density (large α) using GAN with a deeper discriminator network (large ℓ). And our bound enjoys significant advantage when the discriminator network is very deep as the exponent in n doesn’t depends on the depth. Remark that both these two bounds does not depend on the number of computing units explicitly as long as the ℓ1 norm of each unit is bounded, i.e., they are scale sensitive. 4. TECHNICAL PROOFS Proof of Theorem 2.1. For any µ ∈ µG , we know that due to the optimality of GAN dFD (µ, νn ) − dFD (µn , νn ) ≥ 0. Therefore for any µ ∈ µG , dF (µn , ν) ≤ dF (µn , νn ) + dF (νn , ν) triangle inequality kf − f ′ k∞ + dF (νn , ν) ≤ dFD (µn , νn ) + (1 + kνn k1 ) · max min ′ f ∈F f ∈FD kf − f ′ k∞ + dF (νn , ν) ≤ dFD (µ, νn ) + (1 + kνn k1 ) · max min ′ f ∈F f ∈FD optimality of GAN kf − f ′ k∞ + dF (νn , ν) = [dFD (µ, ν) + dFD (ν, νn )] + (1 + kνn k1 ) · max min ′ ≤ min dFD (µ, ν) + (1 + kνn k1 ) · µ∈µG f ∈F f ∈FD kf − f ′ k∞ max min f ∈F f ′ ∈FD 12 + dFD (ν, νn ) + dF (νn , ν), where we use the following fact dF (µ1 , µ2 ) + dF (µ2 , µ3 ) ≥ dF (µ1 , µ3 ) and Z dF (µ, νn ) = max f (dµ(x) − dνn (x)) f ∈F Z ≤ max f ′ (dµ(x) − dνn (x)) + max ′inf kf − f ′ k∞ · kµ − νn k1 ′ f ∈FD = dFD (µ, νn ) + max ′inf kf − f ∈F f ∈FD f ∈F f ∈FD f ′ k∞ · (1 + kνn k1 ) It is easy to bound the following using similar logic dFD (µn , ν) ≤ dFD (µn , νn ) + dFD (νn , ν) ≤ dFD (µ, νn ) + dFD (νn , ν) ≤ min dFD (µ, ν) + dFD (ν, νn ) + dFD (νn , ν). µ∈µG Proof of Corollary 2.1. If FD consists of L-Lipschitz functions (Wasserstein GAN) on Rd , d ≥ 2, plug in the ℓ∞ -covering number bound for Lipschitz functions, log N (ǫ, FD , k · k∞ ) ≤ C E dFD (ν, ν̂n ) ≤ 2  d L , ǫ inf 0<δ<1/2 E dFD (ν, ν̂n ) ≤ O  C d2 n ! √ Z 8 2 1/2 p 4δ + √ log N (ǫ, FD , k · k∞ )dǫ ≤ 16 n δ  1! −d √ !2 1 4 2C d Ln− d , d−2 . This matches the best known bound as in Canas and Rosasco [2012] (Section 2.1.1). Let’s consider when FD denotes Sobolev space W β,2 on Rd . Recall the entropy number estimate for W β,2 [Nickl and Pötscher, 2007], we have   d ∨2 1 β log N (ǫ, FD , k · k∞ ) ≤ C , ǫ   log n − βd . + √ E dFD (ν, ν̂n ) ≤ O n n Remark in addition that the parametric rate Sudakov minoration, n √1 n 1X ǫ E sup ǫi f (Xi ) ≥ sup ǫ f ∈F n 2 ǫ D i=1 is inevitable, which can be easily seen from the r 1 log M(ǫ, FD , k · kn ) ≥√ . n n Proof of Theorem 2.2 and Corollary 2.2. Denote g(x) := dν/dπ as the density ratio, let’s construct the following smoothed version ν̃n , with a cut-off parameter M to be determined 13 later. Define the regularized/smoothed density estimate g̃n (x) := d Y X dν̃n ψξi (xi ), = θ̃ξ (g) dπ d i=1 ξ∈N where based on i.i.d. samples X (1) , X (2) , . . . X (n) ∼ ν ( P (j) n Qd 1 j=1 i=1 ψξi (Xi ), for ξ satisfies kξk∞ ≤ M n θ̃ξ (g) := . 0, otherwise In other words, ν̃n filters out all the high frequency (less smooth) components, when the multi-index ξ has largest coordinate larger than M . Now, for any f ∈ FD , write the Fourier coefficients of f (x) = X θξ (f ) d Y ψξi (xi ). i=1 ξ∈Nd For any ν ∈ FR (or equivalently g ∈ W α,2 (Lα )), we have E dFD (ν, ν̃n ) = E sup hf, g − g̃n iπ f ∈FD X = E sup f ∈FD ξ∈Nd   θξ (f ) θ̃ξ (g) − θξ (g)   X = E sup  f ∈FD ξ∈[M ]d X ≤ E sup f ∈FD ξ∈[M ]d   θξ (f ) θ̃ξ (g) − θξ (g) +  X ξ∈Nd \[M ]  θξ (f ) θ̃ξ (g) − θξ (g) + E sup f ∈FD   θξ (f )θξ (g)  d X θξ (f )θξ (g). ξ∈Nd \[M ]d For the first term, E sup f ∈FD X ξ∈[M ]d ≤ E sup f ∈FD ≤ Lβ E ≤ Lβ   θξ (f ) θ̃ξ (g) − θξ (g)   X  ξ∈[M ] 1/2  1/2   X  2  θξ2 (f ) · θ̃ξ (g) − θξ (g)    d d   X   ξ∈[M ]d   X ξ∈[M ] 1/2 2  θ̃ξ (g) − θξ (g)  1/2 2  E θ̃ξ (g) − θξ (g)  d  ξ∈[M ] r Md ≤ Lβ C n  Jensen’s inequality define C := sup E ψξ2 (X). ξ 14 X∼ν as we know sup f ∈FD X ξ∈[M ]d θξ2 (f ) ≤ X ξ∈[M ]d (1 + kξk22 )β θξ2 (f ) ≤ L2β . Note for trigonometric series supξ EX∼ν ψξ2 (X) ≤ 1. For the second term, the following inequality holds X E sup θξ (f )θξ (g) f ∈FD ξ∈Nd \[M ]d ≤ E sup f ∈FD   X    ξ∈[M ] 1/2  1/2   X  2 2 θξ (f ) · θξ (g)    d d ξ∈[M ] X (1 + M 2 )−β  ξ∈[M ] r 1 . ≤ Lα Lβ 2(α+β) M ≤ sup f ∈FD 1/2  1/2    X (1 + kξk22 )β θξ2 (f ) (1 + M 2 )−α (1 + kξk22 )α θξ2 (g)    d d ξ∈[M ] Combining two terms, we have for any ν ∈ FR (or equivalently g ∈ W α,2 (L)), ( r ) r Md 1 sup E dFD (ν, ν̃n ) ≤ inf Lβ C (4.1) + Lβ Lα M ∈N n M 2(α+β) ν∈FR -n α+β − 2(α+β)+d . 1 And the optimal choice of M ≍ n 2(α+β)+d . Note that this is a more aggressive smoothing scheme than classic nonparametric estimation with smoothness α, due to the fact that we are utilizing the smoothness in the evaluation metric at the same time. Proof of Theorem 2.3. The proof uses the standard Fano’s inequality. Assume that H ≥ 2 and suppose Θ contains Lemma 4.1 (Thm. 2.5 in Tsybakov [2009]). θ0 , θ1 , . . . , θH such that: 1. d(θj , θk ) ≥ 2s > 0, for all j, k ∈ [H] and j 6= k. P 2. H1 H j=1 DKL (Pj , P0 ) ≤ α log H with 0 < α < 1/8 and Pj = Pθj for j ∈ [H]. Then for any estimator θ̂, sup Pθ (d(θ̂, θ) ≥ s) ≥ θ∈Θ √ 1+ H √ H  1 − 2α − r 2α log H  > 0. Let’s construct a mixture of hypothesis on the function space W α,2 (L), and a subset of discriminator functions in W β,2 (L), such that the multiple testing problem among the mixture of hypothesis is hard, and thus the loss induced by the best discriminator among the subset provides a lower 15 bound on the estimation rate. Let’s construct this mixture in the frequency domain. Choose M > 0 to be determined later, denote the hypothesis class of interest to be     X d Ωα = gw (x) = (4.2) cα wξ ψξ (x), w ∈ {0, 1}M ,   d ξ∈[M ] where cα = M d/2 (1 L . + dM 2 )α/2 It is easy to verify that Ωα ⊂ W α,2 (L) because for any gw (x), we have X (1 + kξk22 )α c2α ≤ L2 . ξ∈[M ]d Similarly, let’s consider Λβ ⊂ W β,2 (L)     X d Λβ = fv (x) = cβ vξ ψξ (x), v ∈ {−1, 1}M (4.3) ,   d ξ∈[M ] where cβ = M d/2 (1 L . + dM 2 )β/2 Take any w, w′ , we know that d(gw , gw′ ) := sup hf, gw iπ − hf, gw′ iπ ≥ sup hf, gw − gw′ i f ∈FD = sup cα cβ v X ξ∈[M ]d = cα cβ X ξ∈[M ]d f ∈Λβ vξ (wξ − wξ′ ) I(wξ 6= wξ′ ) = cα cβ ρ(w, w′ ), d where ρ(w, w′ ) denotes the Hamming distance between w and w′ on the hypercube {0, 1}M . Now we need to construct a subset over the hypercube such that for any pairs w, w′ , they are separated in terms of Hamming distance. The Varshamov-Gilbert bound (Lemma 2.9 in Tsybakov [2009]) does the job. We know that there exist a subset {w(0) , . . . , w(H) } ⊂ {0, 1}h such that w(0) = (0, . . . , 0), ρ(w(j) , w(k) ) ≥ log H ≥ h , ∀ j, k ∈ [H], j 6= k, 8 h log 2. 8 In our case h = M d . Now let’s calculate the probability distance Pj , P0 induced by hypothesis w(j) and w(0) , for all j ∈ [H] to show that information theoretically, it is hard to distinguish the mixture of hypothesis. 16 The following holds, DKL (Pj , P0 ) =  n 2 X  (j) (0) 2 wξ − wξ cα 2 d ξ∈[M ] n ≤ c2α M d . 2 If we choose M =  4L2 1 c log 2 dα  1 2α+d 1 · n 2α+d , we know H 1 X DKL (Pj , P0 ) ≤ c log H, for some constant c > 0. H j=1 In this case, for any j 6= k ∈ [H] d(gw(j) , gw(k) ) = cα cβ ρ(w(j) , w(k) ) ≥ α+β L2 Md ≍ n− 2α+d . cα cβ = α+β 8 (1 + dM 2 ) 2 Therefore using Fano’s Lemma, we reach inf sup E dFD (ν̂, ν) = inf sup E ĝ g∈W α,2 (L) ν̂ ν∈FR ≥ inf sup sup f ∈W β,2 (L) ŵ w∈{w (0) ,...,w (H) } ≥ L2 (1 + dM 2 ) α+β 2 hf, ĝ − giπ E d(gŵ , gw ) · inf sup ŵ w∈{w (0) ,...,w (H) } P d(gŵ , gw ) ≥ L2 (1 + dM 2 ) α+β 2 ! α+β % n− 2α+d . Proof of Theorem 3.1. We outline the key steps of the proof. Due to the approximation property of the network class FD to W β,∞ (1), and µG to W α,∞ (1), we know that min kf − f ′ k∞ ≤ ǫ, max f ∈W β,∞ (1) f ′ ∈FD min dFD (µ, ν) = sup kf k1 kµ − νk∞ ≤ M ǫ µ∈µG f ∈FD because FD ⊆ W 0,∞ (M ). Apply the oracle inequality (2.2), one has dW β,∞ (1) (µ̃n , ν) ≤ min dFD (µ, ν) + (1 + kν̃n k1 ) · µ∈µG max min kf − f ′ k∞ f ∈W β,∞ (1) f ′ ∈FD + dFD (ν, ν̂n ) + dW β,∞ (1) (ν̃n , ν), dW β,∞ (1) (µ̃n , ν) − dFD (ν, ν̃n ) ≤ (M + 2)ǫ + dW β,∞ (1) (ν̃n , ν). Here the last step we use the following fact √ − α kν̃n k1 ≤ kν̃n − νk1 + 1 ≤ kν̃n − νk2 + 1 ≤ 1 + L Cn 2(α+β)+d ≤ 2. It is clear that for k ∈ N, W k,∞(1) is a subspace of W k,2 (rk ) under some scaling rk , in the following sense that p rk := 1 + kdk , W k,∞ (1) ⊂ W k,2 (rk ). 17 Therefore for any ν ∈ W α,∞ (1), E dW β,∞ (1) (ν̃n , ν) ≤ E dW β,2(rβ ) (ν̃n , ν) ≤ sup ν∈W α,2 (r α)  E dW β,2 (rβ ) (ν̃n , ν) - min n α+β − 2(α+β)+d ,n − βd +n − 21  =: n−c(α,β,d) where the last line follows from Theorem 2.2. Combine with the approximation error, we reach E dW β,∞ (1) (µ̃n , ν) − E dFD (ν̃n , ν) ≤ (M + 2)ǫ + Cn−c(α,β,d). Under the assumption that FD ⊆ W β,2 (L), then E dFD (ν̃n , ν) ≤ E dW β,2(L) (ν̃n , ν) - n−c(α,β,d) . Putting things together, we have proved E dW β,∞ (1) (µ̃n , ν) ≤ C1 ǫ + C2 n−c(α,β,d) . For the lower bound, the construction of the mixture is slightly different to the construction in Theorem 2.3 (this time the construction is in the spacial domain, and for the density estimation problem). Another difference here lies we need to construct hypothesis in W α,∞ (1) (also called the Hölder space) instead of W α,2 (L). Our construction is motivated from Tsybakov [2009] Page 103 and Theorem 2.8, but note the difference here is that we need to make sure each hypothesis is indeed 1 a valid density function in W α,∞ (1) in Rd . Choose a kernel function K(x) = a exp(− 1−4x 2 )I(|x| < α∨β,∞ 1/2) for some small a > 0 to ensure that K(x) ∈ W (1). Let m be a parameter to be determined later, and denote hn = 1/m. Define the hypothesis class to be       X 1  α md  1+ wξ hn ϕξ (x) , w ∈ {0, 1} , Ωα = gw (x) =   1 + cw ξ∈[m]d     X d Λβ = fv (x) = vξ hβn ϕξ (x), v ∈ {−1, 1}m ,   d ξ∈[m] where ϕξ (x) = d Y K i=1 cw = Z X xi − ξi −1/2 m hn ! , hn = 1/m, wξ hαn ϕξ (x)dx. ξ∈[m]d Let’s bound cw , for any w 0 ≤ cw = X Z ξ∈[m]d wξ hαn ϕξ (x)dx ≤ X Z hα+d n d Y i=1 ξ∈[m]d d d α K (ui ) du ≤ md hα+d n a ≤ a hn ≪ 1/100, and k(gw (x) − g0 (x))/gw (x)k∞ ≤ cw + ad hαn ≪ 1/50. It is easy to verify (1) Ωα ⊂ W α,∞ (L) for some L, and each element in the set is a valid density; (2) Λβ ⊂ W β,∞ (1), as for any multi-index γ, kD (γ) gw (x)k∞ - hα−|γ| , kD (γ) fv (x)k∞ - hnβ−|γ| . n 18 To apply the Fano’s Lemma, let’s first show that the hypothesis are separated in the evaluation metric. Let’s use the same subset {w(0) , . . . , w(H) } ⊂ {0, 1}h claimed by the Varshamov-Gilbert bound ρ(w(j) , w(k) ) ≥ log H ≥ h , ∀ j, k ∈ [H], j 6= k, 8 h log 2. 8 In our case h = md . For the loss function, any w, w′ ∈ {w0 , . . . , wH } d(gw , gw′ ) := sup f ∈W β,∞ (1) = sup hα+β n v = hnα+β+d hf, gw i − hf, gw′ i ≥ sup hf, gw − gw′ i X ξ∈[m]d X ξ∈[m]d vξ (wξ − wξ′ ) I(wξ 6= wξ′ ) Z f ∈Λβ ϕ2ξ (x)dx Z Y d i=1 K 2 (ui ) du ≥ chnα+β+d md ≍ hα+β . n Now let’s show that based n i.i.d. data generated from density gw (x), it is hard to distinguish the hypothesis. Note that for |x| < 1/50, we know that log(1 + x) ≥ x − x2 . Therefore ⊗n DKL (Pw⊗n (j) , Pw (0) ) = nDKL (Pw (j) , Pw (0) )   Z g0 − gw(j) = n − log 1 + gw(j) dx gw(j) Z X Z [g0 − gw(j) ]2 2 dx ≤ 1.01n h2α ≤n n ϕξ (x)dx gw(j) d ξ∈[m] ≤ 1.01n 1 X Z h2α+d n K 2 (ui ) du - nh2α+d md . n i=1 ξ∈[m]d Therefore if we choose m ≍ n− 2α+d , we know d Y 1 H PH ⊗n ⊗n j=1 DKL (Pw (j) , Pw (0) ) ≤ c log H = c′ md . Using α+β the Fano’s Lemma, the lower bound for density estimation is of the order hα+β = n− 2α+d , as n inf sup νn dν/dx∈W α,∞ (L) E dW β,∞ (1) (νn , ν) = inf sup ĝ g∈W α,∞ (L) ≥ inf sup sup E f ∈W β,∞ (1) ŵ w∈{w (0) ,...,w (H) } hf, ĝ − gi E d(gŵ , gw )  α+β  1 ≥ C3 n− 2α+d + n− 2 . Proof of Theorem 3.2. Claim that for any f (x) ∈ F (ℓ) (V ), f is V ℓ -Lipschitz with respect P to the ℓ∞ -metric. Prove through induction. When ℓ = 1, |f (x) − f (y)| = | j wj (xj − yj )| ≤ 19 kwk1 kx − yk∞ ≤ V kx − yk∞ . Assume for general ℓ, the claim is true, let’s prove for f ∈ F (ℓ+1) (V ) |f (x) − f (y)| = X j wj [σ(fj (x)) − σ(fj (y))] ≤ kwk1 max kσ(fj (x)) − σ(fj (y))k j ≤ V max |fj (x) − fj (y)| ≤ V · V ℓ kx − yk∞ = V ℓ+1 kx − yk∞ . j Observe that ∀f ∈ F ℓ (V ), the following inequality holds max kD α f k∞ ≤ V ℓ ,   |α|≤1 X |α|≤1 1/2 kD α f k22  1 ≤ (d + 1) 2 V ℓ .  √ d + 1V ℓ . In other words, f ∈ FD ⊂ W 1,2 √  Now we know that dν(x)/dx ∈ W α,2 (L) and f ∈ FD ⊂ W 1,2 d + 1V ℓ . Due to the oracle inequality 2.1, we know E dFD (µ̃n , ν) − min dFD (µ, ν) ≤ 2 E dFD (ν, ν̃n ) ≤ 2 E dW 1,2 (√d+1V ℓ ) (ν, ν̃n ). µ∈µG Apply Theorem 2.2 (Eqn. (4.1)) with β = 1, Lα = L, Lβ = proof. Lemma 4.2 (Relative Ordering). √ d + 1V ℓ , we can complete the Consider the following two function spaces on Rd FLip,ℓ∞ (L, M ) := {f : |f (x) − f (y)| ≤ Lkx − yk∞ , ∀x, y, and kf k∞ ≤ M }, FLip,ℓ2 (L, M ) := {f : |f (x) − f (y)| ≤ Lkx − yk2 , ∀x, y, and kf k∞ ≤ M }. The following holds true FLip,ℓ∞ (L, M ) ⊆ FLip,ℓ2 (L, M ) ⊆ W 1,∞ (L ∨ M ), √ FLip,ℓ∞ (dL, L) ⊇ FLip,ℓ2 ( dL, L) ⊇ W 1,∞ (L). Proof. Without loss of generality assume the function is differentiable. Then W 1,∞ (L) = {f : |f (x) − f (y)| ≤ Lkx − yk1 , ∀x, y, and kf k∞ ≤ L}. Observe that kx − yk1 ≥ kx − yk2 ≥ kx − yk∞ . Then |f (x) − f√ (y)| ≤ Lkx − yk∞ ≤ Lkx − yk2 ≤ Lkx − yk1 . For the other side√of the inequality, kx − yk1 ≤ dkx − yk2 ≤ dkx − yk∞ , hence |f (x) − f (y)| ≤ Lkx − yk1 ≤ L dkx − yk2 ≤ Ldkx − yk∞ . ACKNOWLEDGEMENT The author thanks Sasha Rakhlin for helpful discussions. 20 REFERENCES Martin Anthony and Peter L Bartlett. Neural network learning: Theoretical foundations. cambridge university press, 2009. Martin Arjovsky and Léon Bottou. Towards principled methods for training generative adversarial networks. arXiv preprint arXiv:1701.04862, 2017. Martin Arjovsky, Soumith Chintala, and Léon Bottou. Wasserstein gan. arXiv preprint arXiv:1701.07875, 2017. Sanjeev Arora and Yi Zhang. Do gans actually learn the distribution? an empirical study. arXiv preprint arXiv:1706.08224, 2017. Sanjeev Arora, Rong Ge, Yingyu Liang, Tengyu Ma, and Yi Zhang. Generalization and equilibrium in generative adversarial nets (gans). arXiv preprint arXiv:1703.00573, 2017a. Sanjeev Arora, Andrej Risteski, and Yi Zhang. Theoretical limitations of encoder-decoder gan architectures. arXiv preprint arXiv:1711.02651, 2017b. Guillermo Canas and Lorenzo Rosasco. Learning probability measures with respect to optimal transport metrics. In Advances in Neural Information Processing Systems, pages 2492–2500, 2012. Gintare Karolina Dziugaite, Daniel M Roy, and Zoubin Ghahramani. Training generative neural networks via maximum mean discrepancy optimization. arXiv preprint arXiv:1505.03906, 2015. Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in neural information processing systems, pages 2672–2680, 2014. Kurt Hornik, Maxwell Stinchcombe, and Halbert White. Multilayer feedforward networks are universal approximators. Neural networks, 2(5):359–366, 1989. Yujia Li, Kevin Swersky, and Rich Zemel. Generative moment matching networks. In Proceedings of the 32nd International Conference on Machine Learning (ICML-15), pages 1718–1727, 2015. Shuang Liu, Olivier Bousquet, and Kamalika Chaudhuri. Approximation and convergence properties of generative adversarial learning. arXiv preprint arXiv:1705.08991, 2017. Arkadi Nemirovski. Topics in non-parametric. Ecole d’Eté de Probabilités de Saint-Flour, 28:85, 2000. Richard Nickl and Benedikt M Pötscher. Bracketing metric entropy rates and empirical central limit theorems for function classes of besov-and sobolev-type. Journal of Theoretical Probability, 20(2):177–199, 2007. Casper Kaae Sønderby, Jose Caballero, Lucas Theis, Wenzhe Shi, and Ferenc Huszár. Amortised map inference for image super-resolution. arXiv preprint arXiv:1610.04490, 2016. Alexandre B Tsybakov. Introduction to nonparametric estimation. Springer Series in Statistics. Springer, New York, 2009. Larry Wassermann. All of nonparametric statistics. Springer Science+ Business Media, New York, 2006. Dmitry Yarotsky. Error bounds for approximations with deep relu networks. Neural Networks, 94:103–114, 2017. 21
10math.ST
Fast and Adaptive Sparse Precision Matrix Estimation in High Dimensions Weidong Liua , Xi Luob,c,d,∗ arXiv:1203.3896v2 [stat.ME] 22 Dec 2016 a Department of Mathematics and Institute of Natural Sciences, Shanghai Jiao Tong University, Shanghai, CHINA b Department of Biostatistics and Center for Statistical Sciences, Brown University, Providence, Rhode Island, USA c Brown Institute for Brain Science, Brown University, Providence, Rhode Island, USA d Initiative for Computation in Brain and Mind, Brown University, Providence, Rhode Island, USA Abstract This paper proposes a new method for estimating sparse precision matrices in the high dimensional setting. It has been popular to study fast computation and adaptive procedures for this problem. We propose a novel approach, called Sparse Column-wise Inverse Operator, to address these two issues. We analyze an adaptive procedure based on cross validation, and establish its convergence rate under the Frobenius norm. The convergence rates under other matrix norms are also established. This method also enjoys the advantage of fast computation for large-scale problems, via a coordinate descent algorithm. Numerical merits are illustrated using both simulated and real datasets. In particular, it performs favorably on an HIV brain tissue dataset and an ADHD resting-state fMRI dataset. Keywords: Adaptivity, Coordinate descent, Cross validation, Gaussian graphical models, Lasso, Convergence rates 1. Introduction Estimating covariance matrices is fundamental in multivariate analysis. It has been popular to estimate the inverse covariance (or precision) matrix in ∗ Corresponding author Email address: [email protected], Phone: Preprint submitted to Journal of Mutlivariate Analysis +1 401 863 6321 (Xi Luo) December 22, 2016 the high dimensional setting, where the number of variables p goes to infinity with the sample size n (more precisely, in this paper, p  n and (log p)/n = o(1)). Inverting the sample covariance matrix has been known to be unstable for estimating the precision matrix. Recent proposals usually formulate this objective as regularized/penalized optimization problems, where regularization is employed to control the sparsity of the precision matrix. Besides the challenge of solving such large optimization problems, there is an important issue on how to choose an appropriate regularization level that is adaptive to the data. To address these two challenges, we propose a fast and adaptive method, and establish the theoretical properties when the regularization level is chosen by cross validation. Let X = (X1 , . . . , Xp )T be a p-variate random vector with a covariance matrix Σ or its corresponding precision matrix Ω := Σ−1 . Suppose we observe independent and identically distributed random samples {X 1 , . . . , X n } from the distribution of X. To encourage a sparse and stable estimate for Ω, regularized/penalized likelihood approaches have been proposed. Here, sparsity means that most of the entries in Ω are exactly zero. Popular penalties include the `1 penalty [1] and its extensions, for example, [2], [3], [4], and [5]. In particular, [3] developed an efficient algorithm, glasso, to compute the penalized likelihood estimator, and its convergence rates were obtained under the Frobenius norm [5] and the elementwise `∞ norm and spectral norm [6]. Other penalties were also studied before. For example, the `1 penalty was replaced by the nonconvex SCAD penalty [7, 8, 9]. Due to the complexity of the penalized likelihood objective, theoretical analysis and computation are rather involved. Moreover, the theory usually relies on some theoretical assumptions of the penalty, and thus it provides limited guidance for applications. Recently, column-wise or neighborhood based procedures have caught much attention, due to the advantages in both computation and analysis. [10] proposed to recover the support of Ω using `1 penalized regression, aka LASSO [1], in a row by row fashion. This can be computed efficiently via path-following coordinate descent [11] for example. A Dantzig selector proposal, replacing the 2 LASSO approach, was proposed recently by [12], and the computation is based on standard solvers for linear programming. [13] proposed a procedure, CLIME, which seeks a sparse precision matrix under a matrix inversion constraint. Their procedure is also solved column by column via linear programming. Compared with the regularized likelihood approaches, their convergence rates were obtained under several matrix norms mentioned before, without imposing the mutual incoherence condition [6], and were improved when X follows polynomial tail distributions. However, all these procedures are computational expensive for very large p, and again these estimators were analyzed based on theoretical choices of the penalty. Cross validation on the other hand has gained popularity for choosing the penalty levels or tuning parameters, because it is adaptive and usually yields superior performance in practice. Unfortunately, the theoretical understanding of cross validation is sparse. For a related problem on estimating sparse covariance matrices, [14] analyzed the performance of covariance thresholding where the threshold is based on cross validation. [15] provided a different approach using self-adaptive thresholding. However, these covariance estimation results cannot be extended to the inverse covariance setting, partly due to the problem complexity. This paper will provide theoretical justification for cross validation when estimating the precision matrix. This result is made possible because we propose a new column-wise procedure that is easy to compute and analyze. To the best of our knowledge, this paper is among the first to provide theoretical justification of cross validation for sparse precision matrix estimation. The contributions of this paper are several folds. First, we propose a novel and penalized column-wise procedure, called Sparse Columnwise Inverse Operator (SCIO), for estimating the precision matrix Ω. Second, we establish the theoretical justification under mild conditions when its penalty is chosen by cross validation. The theory for cross validation is summarized as follows. A matrix is called sp -sparse if there are at most sp non-zero elements on each row. It is shown that the error between our cross validated estimator Ω̂ and Ω satisfies 1 kΩ̂ − Ωk2F /p = OP (sp (log p)/n), where k · kF is the Frobenius norm. Third, 3 theoretical guarantees for the SCIO estimator are also obtained under other matrix norms, for example the element-wise `∞ norm which achieves graphical model selection [16]. Fourth, we provide a fast and simple algorithm for computing the estimator. Because our algorithm exploits the advantages of conjugate gradient and coordinate descent, and thus it provides superior performance in computational speed and cost. In particular, we reduce two nested loops in glasso [3] to only one. An R package of our method, scio, has been developed, and is publicly available on CRAN. The rest of the paper is organized as follows. In Section 2, after basic notations and definitions are introduced, we present the SCIO estimator. Finite sample convergence rates are established with the penalty level chosen both by theory in Section 3 and by cross validation in Section 4. The algorithm for solving SCIO is introduced in Section 5. Its numerical merits are illustrated using simulated and real datasets. Further discussions on the connections and differences of our results with other related work are given in Section 6. The supplementary material includes additional results for the numerical examples in Section 5 and the proof of the main results. The notations in this paper are collected here. Throughout, for a vector qP Pp p 2 a = (a1 , . . . , ap )T ∈ IRp , define |a|1 = j=1 |aj | and |a|2 = j=1 aj . All vectors are column vectors. For a matrix A = (aij ) ∈ IRp×q , we define the elementwise l∞ norm |A|∞ = max1≤i≤p,1≤j≤q |aij |, the spectral norm kAk2 = Pp sup|x|2 ≤1 |Ax|2 , the matrix `1 norm kAkL1 = max1≤j≤q i=1 |aij |, the matrix qP Pp 2 ∞ norm kAk∞ = max1≤i≤q j=1 |aij |, the Frobenius norm kAkF = i,j aij , Pp Pq and the elementwise `1 norm kAk1 = i=1 j=1 |aij |. Ai,· and A·,j denote the ith row and jth column respectively. I denotes an identity matrix. 1 {·} is the indicator function. The transpose of A is denoted by AT . For any two  P  matrices A and B of proper sizes, hA, Bi = i AT B . For any two index ii 0 0 sets T and T and a matrix A, we use AT T 0 to denote the |T | × |T | matrix with 0 rows and columns of A indexed by T and T respectively. The notation A  0 means that A is positive definite. For two real sequences {an } and {bn }, write an = O(bn ) if there exists a constant C such that |an | ≤ C|bn | holds for large 4 n, an = o(bn ) if limn→∞ an /bn = 0, and an  bn if an = O(bn ) and bn = O(an ). Write an = OP (bn ) if an = O(bn ) holds with the probability going to 1. The constants C, C0 , C1 , . . . may represent different values at each appearance. 2. Methodology Our estimator is motivated by adding the `1 penalty [1] to a column loss function, which is related to conjugate descent and a constrained minimization approach CLIME [13]. The technical derivations that lead to the estimator is provided in the supplementary material. Denote the sample covariance matrix by Σ̂. Let a vector β̂ i be the solution to the following equation: β̂ i = arg min β∈IRp n1 2 o β T Σ̂β − eTi β + λni |β|1 , (1) where β̂ i = (β̂i1 , . . . , β̂ip )T , ei is the ith column of a p × p identity matrix, and λni > 0 is a tuning parameter. The tuning parameter could be different from column to column, adapting to different magnitude and sparsity of each column. One can formulate a precision matrix estimate where each column is the corresponding β̂ i . However, the resulting matrix may not be symmetric. Similar to a symmetrization step employed in CLIME, we define the SCIO estimator Ω̂ = (ω̂ij )p×p , using the following symmetrization step, ω̂ij = ω̂ji = β̂ij 1{|β̂ij | < |β̂ji |} + β̂ji 1{|β̂ij | ≥ |β̂ji |}. (2) As we will establish in Section 3, similar to the results of CLIME, the convergence rates shall not change if the diagonal of the sample covariance Σ̂ is added by a small positive amount, as long as in the order of n−1/2 log1/2 p. With this modification, (1) is then strictly convex and has a unique solution. In Section 5, we will present an efficient coordinate descent algorithm to solve it. The SCIO estimator, like other penalized estimators, depends on the choice of λni . We allow λni to be different from column to column, so that it is possible to adapt to each column’s magnitude and sparsity, as we will illustrate in Section 4. More importantly, due to the simplified column loss function (1), 5 we are able to establish, in Section 4, the theoretical guarantees when λni is chosen by cross validation. In comparison, the theory of cross validation for glasso [3] and CLIME [13] has not been established before, to the best of our knowledge. 3. Theoretical guarantees 3.1. Conditions Let Si be the support of Ω·,i , the ith column of Ω = (ωij )p×p . Define the sp -sparse matrices class n U = Ω0: max 1≤j≤p p X i=1 1{ωij 6= 0} ≤ sp , kΩkL1 ≤ Mp , o c−1 0 ≤ Λmin (Ω) ≤ Λmax (Ω) ≤ c0 , where c0 is a positive constant, Λmin (Ω) and Λmax (Ω) are the minimum and maximum eigenvalues of Ω respectively. The sparsity sp is allowed to grow with p, as long as it satisfies the following condition. (C1). Suppose that Ω ∈ U with sp = o r n log p  (3) and −1 max ΣSic Si (ΣSi Si ) 1≤i≤p ∞ ≤1−α (4) for some 0 < α < 1. As we will see from Theorem 1, condition (3) is required for proving the consistency. Condition (4) is in the same spirit as the mutual incoherence or irrepresentable condition for glasso [6], but it is slightly relaxed, see Remark 2. In general, this type of conditions is believed to be almost necessary for penalization methods to recover support. Let Y = (Y1 , . . . , Yp )T = ΩX − Ωµ where µ = EX. The covariance matrix of Y is thus Ω. The second condition is on the moments of X and Y . 6 (C2). (Exponential-type tails) Suppose that log p = o(n). There exist positive numbers η > 0 and K > 0 such that  E exp η(Xi − µi )2 ≤ K,  E exp ηYi2 ≤ K for all 1 ≤ i ≤ p. (C2*). (Polynomial-type tails) Suppose that for some γ, c1 > 0, p ≤ c1 nγ , and for some δ > 0 E|Xi − µi |4γ+4+δ ≤ K, E|Yi |4γ+4+δ ≤ K for all i. We will assume either one of these two types of tails in our main analysis. These two conditions are standard for analyzing sparse precision matrix estimation, see [13] and references within. 3.2. Convergence rates of Ω̂ − Ω The first theorem is on the convergence rate under the spectral norm. It implies the convergence rates of eigenvalues and eigenvectors, which are essential in principle component analysis for example. The convergence rate under the spectral norm may also be important for classification, for example linear/quadratic discriminant analysis as we illustrate in Section 5. Theorem 1. Let λni = C0 p log p/n with C0 being a sufficiently large number. Under (C1), and (C2) (or (C2∗ )), we have Ω̂ − Ω 2 ≤ CMp sp r log p n  with probability greater than 1 − O p−1 (or 1 − O(p−1 + n−δ/8 ) under (C2*)), where C > 0 depends only on c0 , η, C0 and K (or c0 , c1 , γ, δ, C0 and K under (C2*)). Remark 1. If Mp sp n−1/2 log1/2 p = o(1), then Ω̂ is positive definite with probability tending to one. We can also revise Ω̂ to Ω̂τ with Ω̂τ = Ω̂ + τ I, 7 where τ = (|Λmin (Ω̂)| + n−1/2 )1{Λmin (Ω̂) ≤ 0}. By Theorem 1, assuming τ ≤ CMp sp n−1/2 log1/2 p, we have with probability greater than 1 − O(p−1 ) (or 1 − O(p−1 + n−δ/8 )) that Ω̂τ − Ω 2 ≤ CMp sp r log p . n Such a simple perturbation will make the revised estimator Ω̂τ to have a larger minimal eigenvalue, for stability concerns. The later results on support recovery and other norms will also hold under such a small perturbation. Remark 2. [6] imposed the following irrepresentable condition on glasso: for some 0 < α < 1, −1 ΓΨc Ψ (ΓΨΨ ) ∞ ≤ 1 − α, (5) where Ψ is the support of Ω, Γ = Σ ⊗ Σ, and ⊗ denotes the Kronecker matrix product. To make things concrete, we now compare our conditions using the examples given in [6]: 1. In the diamond graph, let p = 4, σii = 1, σ23 = 0, σ14 = 2ρ2 and σij = ρ for all i 6= j, (i, j) 6= (2, 3) and (2, 4). For this matrix, (5) is reduced to 4|ρ|(|ρ| + 1) < 1 and so it requires ρ ∈ (−0.208, 0.208). Our relaxed condition (4) only needs ρ ∈ (−0.5, 0.5). 2. In the star graph, let p = 4, σii = 1, σ1,j = ρ for j = 2, 3, 4, σij = ρ2 for 1 < i < j ≤ 4. For this model, (5) requires |ρ|(|ρ| + 2) < 1 (i.e. ρ ∈ (−0.4142, 0.4142)), while our condition (4) holds for all ρ ∈ (−1, 1). We have the following result on the convergence rates under the element-wise l∞ norm and the Frobenius norm. Theorem 2. Under the conditions of Theorem 1, we have with probability greater than 1 − O(p−1 ) under (C2) (or 1 − O(p−1 + n−δ/8 ) under (C2*)) r log p Ω̂ − Ω ≤ CMp n ∞ (6) and 1 Ω̂ − Ω p 2 F 8 ≤ Csp log p . n (7) Remark 3. The convergence rate under the Frobenius norm does not depend on Mp . In comparison, [17] obtained the minimax lower bound, when X ∼ N (µ, Σ), 2 1 log p min max E Ω̂ − Ω ≥ CMp2 sp . (8) p Ω̂ Ω∈U n F They also showed that this rate is achieved by sequentially running two CLIME estimators, where the second CLIME estimator uses the first CLIME estimate as input. Though CLIME allows a weaker sparsity condition where our `0 ball bound sp in U is replaced by an `q ball bound (0 ≤ q < 1), our rate in (7) is faster than CLIME, because Mp2 in (8) could grow with p. The faster rate is due to the fact that we consider the condition (4). Under a slightly stronger condition (5) (see Remark 2), [6] proved that the glasso estimator Ω̂glasso has the following convergence rate 1 Ω̂glasso − Ω p where κΓ = (ΓΨΨ ) −1 L1 2 F = OP  κ2Γ sp log p n  , (9) . Our convergence rate is also faster than theirs in (9) if κΓ → ∞. 3.3. Support recovery As discussed in the introduction, support recovery is related to Gaussian graphical models. The support of Ω is recovered by SCIO, with high probability by the following theorem. Recall Ψ = {(i, j) : ωij 6= 0} be the support of Ω, and similarly Ψ̂ = {(i, j) : ω̂ij 6= 0}. The next theorem gives the result on support recovery. Theorem 3. (i). Under the conditions of Theorem 1, we have Ψ̂ ⊆ Ψ with probability greater than 1 − O(p−1 ) under (C2) (or 1 − O(p−1 + n−δ/8 ) under (C2*)). (ii). In addition, suppose that for a sufficiently large number C > 0, r log p min |ωij | ≥ CMp . (10) n (i,j)∈Ψ Then under the conditions of Theorem 1, we have Ψ̂ = Ψ with probability greater than 1 − O(p−1 ) under (C2) (or 1 − O(p−1 + n−δ/8 ) under (C2*)). 9 The condition (10) on the signal strength is standard for support recovery, see [6], [13] for example. We also note that the CLIME method [13] requires an additional thresholding step for support recovery, while SCIO does not need this step. 4. Theory for data-driven penalty This section analyzes a cross validation scheme for choosing the tuning parameter λni , and we establish the theoretical justification of this data-driven procedure. We consider the following cross validation method for simplicity, similar to the one analyzed in [14]. Divide the sample {X k ; 1 ≤ k ≤ n} into two subsamples at random. Let n1 and n2 = n − n1 be the two sample sizes of the l l random splits satisfying n1  n2  n, and let Σ̂1 , Σ̂2 be the sample covariance matrices from the two samples n1 and n2 respectively in the lth split, for l = l 1, . . . , H, where H is a fixed integer. For each i, let β̂ i (λ) be the estimator minimizing the average out-of-sample SCIO loss, over λ,  H  1 X 1 l T l l T l R̂i (λ) = (β̂ (λ)) Σ̂2 β̂ i (λ) − ei β̂ i (λ) H v=1 2 i (11) l where β̂ i (λ) is calculated from the n1 samples with a tuning parameter λ to be determined. For implementation purposes, instead of searching for continuous λ, we will divide the interval [0, 4] by a grid λ0 < λ1 < · · · < λN , where λi = 4i N. The number 4 comes from the CLIME constraint, see the supplementary material. The tuning parameter on the grid is chosen by, for each i, λ̂i = arg min R̂i (λj ). (12) 0≤j≤N It is important to note that the size N should be sufficiently large but not too large, see the first two conditions on N in Theorem 4, and the convergence rate will then hold even if we only perform cross validation on a grid. The choice of λ̂i could be different for estimating each column of the precision matrix using the column loss function (11). This allows the procedure to adapt to the 10 magnitude and sparsity of each column, compared with the standard glasso estimator with a single choice of λ for the whole matrix. Though it is possible to specify different λ for each column (even each entry) in glasso, searching over all possible combinations of λ’s over high dimensional grids, using a non-columnwise loss (e.g. the likelihood), is computationally untrackable. Our column loss thus provides a simple and computationally trackable alternative for choosing adaptive λ. As described before, the complexity of the likelihood function may make it difficult to analyze the glasso estimator using cross validation. Though CLIME uses a constrained approach for estimation, its constrained objective function cannot be directly used for cross validation. [13] proposed to use the likelihood function as the cross validation loss, which makes it difficult to establish the theory of cross validated CLIME. For a different setting of estimating the covariance matrix, [14] obtained the convergence rate under the Frobenius norm, using covariance thresholding. The threshold is also based on sample splitting like ours. However, to the best of our knowledge, it has been an open problem on establishing the theoretical justification of cross validation when estimating the precision matrix. Theorem 4 below fills the gap, showing that the estimator based on λ̂i from (12) attains the optimal rate under the Frobenius norm. For simplicity, we set H = 1 as in [14]. Our theory adopts the following condition on the sub-Gaussian distribution, which was use in [18] for example. (C3). There exist positive numbers η 0 > 0 and K 0 > 0 such that  max E exp η 0 (v T (X − µ))2 ≤ K 0 |v|2 =1 This condition is slightly stronger than (C2), because our next theorem adapts to unknown Ω using cross validation, instead of the theoretical choice λni . It is easy to see that (C3) holds for the multivariate normal distribution as a special case. 1 1 1 1 Denote the unsymmetrized Ω̂1 := (ω̂ij1 ) = (β̂ 1 (λ̂1 ), . . . , β̂ p (λ̂p )) and recall 11 1 the symmetrized matrix Ω̂ as 1 1 1 1 1 1 1 1 ω̂ij = ω̂ji = ω̂ij1 1{|ω̂ij1 | < |ω̂ji1 |} + ω̂ji1 1{|ω̂ij1 | ≥ |ω̂ji1 |}. 1 1 The following theorem shows that the estimator Ω̂ = (ω̂ij ) attains the minimax optimal rate under the Frobenius norm. Theorem 4. Under the conditions log N = O(log p), (C3), we have as n, p → ∞, 1 1 Ω̂ − Ω p 2 F = OP  log p sp n  p n/ log p = o(N ), and . The convergence rate using cross validation is the same as (7) in Theorem 2 with the theoretical choice of λ. Using similar arguments in Theorem 4 of [14], this result can be extended to multiple folds H > 1. To the best of our knowledge, Theorem 4 is the first result on the theoretical justification of cross validation when estimating the sparse precision matrix. 5. Numerical examples 5.1. Algorithm Recall that the SCIO estimator is obtained by applying symmetrization (2) to the solution from (1), where each column β̂ i is given by the following   1 T β i Σ̂β i − eTi β i + λ |β i |1 β̂ i = arg min 2 β i ∈IRp (13) for any λ > 0. We propose to employ an iterative coordinate descent algorithm to solve (13) for each i. In contrast, the R package glasso employs an outside loop over the columns of the precision matrix, while having another inside loop over the coordinates of each column. Our algorithm does not need an outside loop because our loss function is column-wise. The iterative coordinate descent algorithm for each i goes as follows. In each iteration, we fix all but one coordinate in β, and optimize over that fixed coordinate. Without loss of generality, we consider optimizing over the pth 12 coordinate βp while all other coordinates of β (denoted by β −p ) are fixed. The solution is in an explicit form by the following simple proposition. The solution when fixing other coordinates is similar, simply by permuting the matrix. We then loop through the coordinates until the updates are smaller than a userspecified threshold, say 10−4 . Proposition 1. Let the subvector partition β = β −p , βp accordingly as follows  Σ̂ =  Σ̂12 Σ̂12 Σ̂22 Fixing β −p , the minimizer of (13) is βp = T  T Σ̂11  and partition Σ̂  .  1 {p = i} − β T−p Σ̂12 , λ /Σ̂22 where the soft thresholding rule T (x, λ) = sign(x) max(|x| − λ, 0). We implement this algorithm in an R package, scio, available on CRAN. All the following computation is performed using R on an AMD Opteron processor (2.6 GHz) with 32 Gb memory. The glasso and CLIME estimators are computed using its R packages glasso (version 1.7) and clime (version 0.4.1) respectively. The path-following strategy with warm-starts [11] is enabled in all methods. 5.2. Simulations In this section, we compare the performance with glasso and CLIME on several measures using simulated data. In order to compare the adaptivity of the procedures, the covariance matrices that generate the data all contain two block diagonals of different magnitude, where the second block is 4 times the first one. Similar examples were used in [15] in comparing adaptive covariance estimation. The first block is generated from the following models respectively. 1. decay: ωij = 0.6|i−j| . 13 2. sparse: Let the prototype Ω0 = O + δI, where each off-diagonal entry in O is generated independently, and equals to 0.5 with probability 0.1 and 0 with probability 0.9. δ is chosen such that the conditional number (the ratio of maximal and minimal singular values of a matrix) equals to p. Finally, the block matrix is standardized to have unit diagonals. 3. block: A block diagonal matrix with block size 5 where each block has off-diagonal entries equal to 0.5 and diagonal 1. The resulting matrix is then randomly permuted. 100 independent and identically distributed observations constituting a training data set are generated from each multivariate Gaussian covariance model with mean zero, and 100 additional observations are generated from the same model as a validating data set. Using the training data alone, a series of penalized estimators with 50 different tuning parameters λ is computed. For a fair comparison, we first pick the tuning parameters in glasso, CLIME, and SCIO to produce the smallest Bregman loss on the validation sample. The Bregman loss is defined by L(Σ, Ω) = hΩ, Σi − log det(Ω). We also compare with our cross validation scheme in Section 4, where the cross validation loss is the column-wise adaptive loss (11). The resulting estimator is denoted by SCIOcv. We consider different values of p = 50, 100, 200, 400, 800, 1600, and replicate 100 times. Table 1 compares the estimation performance of SCIO, SCIOcv, CLIME, and glasso under the spectral norm and the Frobenius norm. It shows that SCIO and SCIOcv almost uniformly outperform all other methods under both norms. SCIO has better performance when p ≤ 400, while SCIOcv has better performance when p ≥ 800. The glasso estimator has the worst performance overall, but it has slightly improved performance than other methods in the block model for p = 200 and 400. The CLIME estimator has slightly worse performance than our estimators overall, except for a few cases. As discussed before, support recovery carries important consequences for 14 15 SCIO 10.00 11.89 12.88 13.63 14.13 14.15 SCIO 16.22 27.48 42.93 65.61 97.52 138.09 p 50 100 200 400 800 1600 p 50 100 200 400 800 1600 14.12 14.10 14.09 12.91 12.29 11.62 CLIME 136.90 96.09 66.60 45.12 29.58 18.54 SCIOcv 137.74 97.25 68.65 42.80 28.40 19.25 CLIME Decay 14.12 14.05 13.87 13.46 12.68 11.24 SCIOcv Decay 147.11 102.67 68.10 47.00 30.92 20.18 glasso 14.83 14.71 14.07 13.84 13.11 12.10 glasso All standard errors of the results are smaller than 0.1. 36.65 24.34 83.85 59.08 20.90 15.48 11.60 8.31 5.57 4.03 SCIOcv 20.94 15.60 11.63 8.43 6.54 5.70 CLIME 82.87 57.55 38.99 24.67 14.84 7.95 SCIOcv 84.50 59.97 40.67 26.60 18.48 12.66 CLIME Sparse Frobenius Norm 12.93 6.71 SCIO 20.94 15.58 10.88 7.93 4.51 2.73 SCIO Sparse Spectral Norm 96.90 66.30 37.76 26.11 14.91 8.14 glasso 21.61 16.08 11.11 8.48 5.70 3.86 glasso 125.85 88.98 62.91 44.49 30.83 16.10 SCIO 9.97 9.96 9.92 9.88 9.63 7.24 SCIO 10.15 10.01 10.31 10.05 125.64 88.78 62.73 44.23 31.02 20.98 9.13 8.03 CLIME 125.41 88.63 65.38 44.92 28.72 17.58 CLIME Block SCIOcv 9.96 9.95 9.91 9.85 9.78 9.55 SCIOcv Block 137.27 96.42 62.54 44.19 31.15 21.68 glasso 10.68 10.63 9.87 9.83 9.77 9.61 glasso Table 1: Comparison of average losses of SCIO, SCIOcv, CLIME, and glasso over 100 simulation runs. The best performance is highlighted in bold. graphical model estimation. The frequencies of correct zero/nonzero identification are summarized in Table 1 of the supplementary material. In there, the SCIO and SCIOcv estimates are sparser than the CLIME and glasso estimates in general. To further illustrate this, we plot the heatmaps of support recovery in Figure 1 using p = 100 as a representing example. These heatmaps confirm that the SCIO estimates usually contain less zeros than glasso and CLIME. By visual inspection, these SCIO estimates also tend to be closer to the truth, especially under the sparse model. In particular, they adapt to different magnitude. In contrast, glasso yields some interference patterns and artificial stripes, especially under the sparse model. 5.3. A genetic dataset on HIV-1 associated neurocognitive disorders Antiretroviral therapy (ART) has greatly reduced mortality and morbidity of HIV patients; however, HIV-1 associated neurocognitive disorders (HAND) are becoming common, which cause greatly degradation of life quality. We here apply our graphical models to a gene expression dataset [19] to study how their genetic interactions/pathways are altered between treated and untreated HAND patients, and compare with other methods using classification. The supplementary material includes the full description of the dataset, the modeling approach, and additional results. Figure 3a compares classification accuracy between treated and untreated HAND. The results comparing HAND and controls are not shown because all methods have a constant area-under-the-curve value 1. Because the number of nonzero off-diagonal elements may depend on the different scales of the penalization parameters in each method, we plot the classification accuracy against the average percentages of nonzero off-diagonals of these two classes (treated and untreated), i.e. the average percentages of connected edges in two recovered graphical models for the treated and untreated respectively. The SCIOcv estimators (not shown) only differs from SCIO on how to pick λ in a data-driven way, and thus it has the identical performance as SCIO under the same λ. This figure shows that in most cases SCIO outperforms glasso and CLIME when 16 Figure 1: Heatmaps of support recovery over 100 simulation runs (black is 100/100, white is 0/100). Decay Model (a) Truth (b) SCIO (c) SCIOcv (d) CLIME (e) glasso (i) CLIME (j) glasso (n) CLIME (o) glasso Sparse Model (f) Truth (g) SCIO (h) SCIOcv Block Model (k) Truth (l) SCIO (m) SCIOcv 17 both methods use the same number of connected edges. The SCIO estimators are stable in classification performance even if the number of connected edges increases. We are not able to plot the performance of glasso with more than 14% connected edges (corresponding to small penalization parameters), because the glasso package does not converge within 120 hours. CLIME shows decreased performance when the number of connected edges increases. As a comparison with other classification algorithms, we use the same data to compare with a few other classification methods, including random forest [20], AIC penalized logistic regression, and `1 penalized logistic regression with 5-fold cross validation. Their classification accuracies are 78.6%, 90.9% and 45.6% respectively. Our classification rule compares favorably with these competing methods on this dataset. Figure 3b compares the running times against the percentages of connected edges. Because it is known that path-following algorithms may compute a sequence of solutions much faster than for a single one, we use 50 log-spaced penalization parameters from the largest (0% edges) to the designated percentages of edges, including 5%, 10%, 14%, 20%, 30%, 40%, 50% and 60%. As reported before, we are unable to plot the running times for glasso beyond 14% due to nonconvergence. SCIO takes about 2 seconds more than glasso when computing for 5% edges, but is much faster than glasso for 10% and more. For example, it compares favorably in the 14% case where SCIO takes only a quarter of the time of glasso. In general, the running time of SCIO grows linearly with the number of connected edges, while glasso shows exponential growth in computation time. CLIME is the slowest among all methods. Figure 1 of the supplementary material compares the performance of support recovery, and it shows similar advantages of SCIO as in the simulations. 5.4. An fMRI dataset on attention deficit hyperactivity disorders Attention Deficit Hyperactivity Disorder (ADHD) causes substantial impairment among about 10% of school-age children in United States. A neuroimaging study showed that the correlations between brain regions are different between 18 Figure 2: Comparison of classification accuracy and running times using SCIO, CLIME and glasso for the HIV dataset. Red solid lines are SCIO, green dash lines are CLIME, and blue 200 150 100 SCIO Glasso CLIME 0 50 Running time (seconds) 1.0 0.9 0.8 0.7 0.6 Classification accuracy dotted lines are glasso. 0 10 20 30 40 50 60 0 Percent of connected edges 10 20 30 40 50 60 Percent of connected edges (a) Classification Accuracy (b) Running times typically developed children and children with such disorders [21]. The description of the data and additional results are provided in the supplementary material. In there, we compare the performance of support recovery using the data from each subject, and the results suggest that SCIO has competitive performance with CLIME and glasso in recovering brain connectivities for both healthy and ADHD children. Figure 3 compares the running times of SCIO, CLIME, and glasso. Similar to the procedure described before, for each subject, we use path following algorithms in all methods up to the designated edge percentages, including 10%, 20%, 30%, 40%, 50% and 60%. This plot shows that the running times of SCIO grows almost linearly, and it is about 2 times faster than glasso with 60% connected edges. CLIME again is the slowest among all methods. 6. Discussion It is possible to achieve adaptive estimation via other approaches. During the preparation of this paper, it comes to our attention that recently [22] applied 19 Figure 3: Comparison of average (± 1 SE) running times for the ADHD dataset. The red solid line with circle marks is SCIO, the green dashed line with crosses is CLIME, and the 300 250 200 50 100 150 SCIO Glasso CLIME 0 Running time (seconds) 350 blue dotted line with triangles is glasso. 10 20 30 40 50 60 Percent of connected edges a new adaptive penalized regression procedure, Scale Lasso, to the inverse covariance matrix estimation. [17] proposed an improved CLIME estimator, which runs the CLIME estimation sequentially twice. We instead analyzed cross validation as an alternative approach for this goal because cross validation remains to be popular among practitioners. It would be interesting to study the theory of cross validation for these other estimators, and to study if these adaptive approaches can also be applied to our loss. Choosing the tuning parameters is an important problem in the practice of penalization procedures, though most of the prior theoretical results are based on some theoretical assumptions of the tuning parameters. This paper is among the first to demonstrate that a cross validated estimator for the problem of precision matrix estimation achieves the n−1/2 log1/2 p rate under the Frobenius norm. This rate may not be improved in general, because it should be minimax optimal [17], though a rigorous justification is needed. We also note that the distribution condition (C3) in Theorem 4 is slightly stronger than (C2) and (C2∗ ). It is an interesting problem to study if the result in Theorem 4 can be extended to more general distributions. Moreover, it would be interesting to 20 study whether minimax rates can also be achieved under other matrix norms, such as the operator norm, using cross validation. The rate for support recovery in Theorem 3 also coincides with the minimax optimal rate in [17]. However, U together with (4) is actually a smaller class than theirs. It would be interesting to explore if their minimax rate can be improved in this important sub-class. It would also be interesting to study if our results can be extended to their general matrix class. We employ the `1 norm to enforce sparsity due to computational concerns. It has been pointed out before that the `1 penalty inheritably introduces biases, and thus it would be interesting to replace the `1 norm by other penalty forms, such as Adaptive Lasso [23] or SCAD [9]. Such extensions should be easy to implement because our loss is column-wise, similar to penalized regression. We are currently implementing these variants for future releases of our R package. There are several other interesting directions. It would be interesting to study the precision matrix estimation under the setting that the data are generated from statistical models, while the covariance estimation problem under this setting was studied by [24]. It is also of interest to consider extending SCIO to the nonparanormal family distributions [25]. Finally, this paper only considers the setting that all the data are observed. It is an interesting problem to study the inverse covariance matrix estimation when some observations are missing. It turns out that the SCIO procedure can also be applied to the missing data setting, with additional modifications. Due to the space limitation, we will report these results elsewhere. 7. Supplementary material Supplementary material online includes the motivation of our estimator, additional descriptions of the numerical examples, and proof of the main results. 21 8. Acknowledgment We would like to thank the Associate Editor and two anonymous referees for their very helpful comments, which have led to improved presentation of this paper. Weidong Liu was supported by the National Natural Science Foundation of China grants 11201298 and 11322107, the Program for Professor of Special Appointment (Eastern Scholar) at Shanghai Institutions of Higher Learning, Shanghai Pujiang Program, Foundation for the Author of National Excellent Doctoral Dissertation of China and a grant from Australian Research Council. Xi Luo was partially supported by the National Institutes of Health grants P01AA019072, P20GM103645, P30AI042853, R01NS052470, and S10OD016366, a Brown University Research Seed award, a Brown Institute for Brain Science Pilot award, a Brown University faculty start-up fund, and a developmental research award from Lifespan/Brown/Tufts Center for AIDS Research. References [1] R. Tibshirani, Regression shrinkage and selection via the lasso, Journal of the Royal Statistical Society. Series B (Methodological) 58 (1) (1996) 267–288. [2] M. Yuan, Y. Lin, Model selection and estimation in the gaussian graphical model, Boimetrika 94 (1) (2007) 19–35. [3] J. Friedman, T. Hastie, R. Tibshirani, Sparse inverse covariance estimation with the graphical lasso, Biostatistics 9 (3) (2008) 432–441. [4] A. d’Aspremont, O. Banerjee, L. El Ghaoui, First-order methods for sparse covariance selection, SIAM Journal on Matrix Analysis and Applications 30 (1) (2008) 56–66. [5] A. J. Rothman, P. J. Bickel, E. Levina, J. Zhu, Sparse permutation invariant covariance estimation, Electron. J. Stat. 2 (2008) 494–515. doi:10.1214/08-EJS176. 22 [6] P. Ravikumar, M. J. Wainwright, G. Raskutti, B. Yu, et al., High-dimensional covariance estimation by minimizing `1 -penalized logdeterminant divergence, Electronic Journal of Statistics 5 (2011) 935–980. [7] J. Fan, R. Li, Variable selection via nonconcave penalized likelihood and its oracle properties, J. Amer. Statist. Assoc. 96 (2001) 1348–1360. [8] C. Lam, J. Fan, Sparsistency and rates of convergence in large covariance matrix estimation, The Annals of Statistics 37 (6B) (2009) 4254–4278. [9] J. Fan, Y. Feng, Y. Wu, Network exploration via the adaptive lasso and scad penalties, Annals of Applied Statistics 3 (2009) 521–541. [10] N. Meinshausen, P. Bühlmann, High-dimensional graphs and variable selection with the lasso, The Annals of Statistics 34 (3) (2006) 1436–1462. [11] J. Friedman, T. Hastie, R. Tibshirani, Regularization paths for generalized linear models via coordinate descent, Journal of statistical software 33 (1) (2010) 1–22. [12] M. Yuan, High dimensional inverse covariance matrix estimation via linear programming, The Journal of Machine Learning Research 11 (2010) 2261– 2286. [13] T. Cai, W. Liu, X. Luo, A constrained `1 minimization approach to sparse precision matrix estimation, Journal of the American Statistical Association 106 (494) (2011) 594–607. [14] P. J. Bickel, E. Levina, Covariance regularization by thresholding, Annals of Statistics 36 (6) (2008) 2577–2604. doi:DOI 10.1214/08-AOS600. [15] T. Cai, W. Liu, Adaptive thresholding for sparse covariance matrix estimation, Journal of the American Statistical Association 106 (494) (2011) 672–684. [16] S. L. Lauritzen, Graphical models, Oxford University Press, 1996. 23 [17] T. T. Cai, W. Liu, H. H. Zhou, Estimating sparse precision matrix: Optimal rates of convergence and adaptive estimation, Annals of Statistics, to appear. [18] T. Cai, C. Zhang, H. Zhou, Optimal rates of convergence for covariance matrix estimation, Ann. Statist 38 (2010) 2118–2144. [19] A. Borjabad, S. Morgello, W. Chao, S.-Y. Kim, A. I. Brooks, J. Murray, M. J. Potash, D. J. Volsky, Significant effects of antiretroviral therapy on global gene expression in brain tissues of patients with hiv-1-associated neurocognitive disorders, PLoS pathogens 7 (9) (2011) e1002213. [20] L. Breiman, Random forests, Machine learning 45 (1) (2001) 5–32. [21] D. P. Dickstein, C. Gorrostieta, H. Ombao, L. D. Goldberg, A. C. Brazel, C. J. Gable, C. Kelly, D. G. Gee, X.-N. Zuo, F. X. Castellanos, et al., Fronto-temporal spontaneous resting state functional connectivity in pediatric bipolar disorder, Biological psychiatry 68 (9) (2010) 839–846. [22] T. Sun, C.-H. Zhang, Sparse matrix inversion with scaled lasso, The Journal of Machine Learning Research 14 (1) (2013) 3385–3418. [23] S. Zhou, S. van de Geer, P. Bühlmann, Adaptive lasso for high dimensional regression and gaussian graphical modeling, arXiv preprint arXiv:0903.2515. [24] X. Luo, Recovering model structures from large low rank and sparse covariance matrix estimation, arXiv preprint arXiv:1111.1133. [25] H. Liu, J. Lafferty, L. Wasserman, The nonparanormal: Semiparametric estimation of high dimensional undirected graphs, The Journal of Machine Learning Research 10 (2009) 2295–2328. 24 Supplementary Material for “Fast and Adaptive Sparse Precision Matrix Estimation in High Dimensions” Weidong Liu and Xi Luo∗ September 21, 2014 This supplementary material provides the derivation of the method, additional numerical results, and proof of the main results in the main text. 1 Methodology For simplicity, we start with a population covariance matrix Σ, and we define a covariance loss function for every column i = 1, 2, . . . , p, 1 fi (Σ, B) = β Ti Σβ i − eTi β i , (1) 2  where B = β 1 , β 2 , . . . , β p , and each β i is a column vector. Each function fi in (1) is strictly convex in β i as Σ is strictly positive-definite; more importantly, the minimal values of each fi are achieved at β i ’s that satisfy the following equality, for each i, Σβ i − ei = 0. (2) The quadratic function (1) is of the same form as the iterative conjugate gradient method that solves a linear system like (2). It is also straightforward to see that each column of the precision matrix Ω satisfies these equalities, and thus minimizing all the loss functions in (1). In fact, Ω is the unique solution of (2) if Σ is full rank, which can be seen by the inversion formula ω i = Σ−1 ei = Ωei . 1 Certainly, the functions in (1) and the inversion formula cannot be directly applied to data, because the population covariance Σ is usually unknown. Thus, we replace with the sample covariance matrix Σ̂, to produce the sample based loss function of (1): 1 fi (Σ̂, B) = β Ti Σ̂β i − eTi β i . 2 One intuition is to minimize the above function, for every i, to produce an estimator for Ω. However, this is not possible because there may be multiple solutions if Σ̂ is not full rank. Moreover, it does not utilize the sparsity assumption of Ω. We will address these two issues momentarily. Motivated by recent developments on using the `1 norm in sparse precision matrix estimation (Friedman, Hastie, and Tibshirani, 2008; Cai, Liu and Luo, 2011), we add the `1 penalty to the column loss function 1 T β i Σ̂β i − eTi β i + λni |β i |1 2 (3) for i = 1, 2, . . . , p, where the penalization parameter λni > 0 and is allowed to be different from column to column, in order to adapt to the magnitude and sparsity of each column. Due to the shrinkage effect of the `1 penalty, some coordinates of β i may be shrunk to zero exactly. The loss function (3) is connected to the CLIME estimator (Cai, Liu and Luo, 2011). By taking the subgradient of (3), the minimal values satisfy the following constraint for i = 1, 2, . . . , p, Σ̂β − ei ≤ λni (4) ∞ which is exactly the CLIME constraint. 2 2.1 Numerical examples Simulations Table 1 lists the frequencies of correct zero/nonzero identification by SCIO, SCIOcv, CLIME, and glasso, as discussed in the main text. 2 3 glasso SCIO 96.00(2.28) 95.18(2.83) 83.55(2.66) 31.09(10.94) 62.98(1.73) 20.02(0.11) 33.83(1.41) 20.00(0.01) 25.50(0.79) 20.00(0.00) 12.82(0.52) 20.00(0.00) Block SCIOcv CLIME glasso 58.26(5.12) 98.50(1.17) 62.45(6.20) 41.94(3.33) 85.56(3.07) 48.98(3.48) 30.11(1.70) 39.17(2.27) 38.81(3.11) 24.63(0.75) 23.70(0.72) 32.15(2.02) 22.47(0.36) 19.99(0.02) 52.19(0.56) 21.42(0.22) 19.98(0.02) 47.98(0.31) SCIO 98.71(1.22) 77.73(2.12) 41.20(1.68) 10.68(0.39) 2.44(0.00) 1.24(0.00) p 50 100 200 400 800 1600 glasso 35.92(2.32) 26.44(1.37) 16.15(3.46) 8.81(0.37) 15.43(0.24) 12.13(0.25) TP% Sparse SCIOcv CLIME 93.27(2.75) 99.88(0.39) 75.73(2.50) 97.05(1.06) 29.78(1.33) 62.99(3.58) 12.03(0.44) 24.17(2.17) 5.02(0.16) 2.41(0.01) 1.87(0.05) 1.23(0.80) Decay SCIOcv CLIME 21.60(1.65) 37.21(2.91) 13.77(0.76) 21.54(1.37) 9.92(0.38) 12.76(0.32) 7.84(0.18) 3.46(0.00) 6.81(0.08) 3.40(0.00) 6.32(0.05) 3.36(0.00) p SCIO 50 98.57(0.72) 100 99.71(0.13) 200 99.98(0.02) 400 100.00(0.00) 800 100.00(0.00) 1600 100.00(0.00) SCIO 24.19(2.24) 12.67(0.52) 10.14(0.26) 7.14(0.78) 3.40(0.00) 3.37(0.00) Block SCIOcv CLIME glasso 95.67(0.98) 86.69(2.16) 87.40(5.12) 98.69(0.32) 95.97(0.65) 96.72(1.27) 99.71(0.07) 99.67(0.86) 99.03(0.36) 99.94(0.01) 99.98(0.01) 99.68(0.11) 99.98(0.00) 100.0(0.00) 95.85(0.06) 99.99(0.00) 100.0(0.00) 97.20(0.02) TN% Sparse SCIOcv CLIME glasso SCIO 97.73(0.54) 64.60(7.20) 83.16(2.45) 80.60(1.93) 98.73(0.20) 79.51(3.89) 86.69(1.16) 97.34(2.44) 99.42(0.07) 93.70(1.49) 90.55(0.66) 99.97(0.12) 99.72(0.03) 98.62(0.27) 95.60(0.44) 100.00(0.01) 99.86(0.01) 100.0(0.00) 94.20(0.38) 100.00(0.00) 99.95(0.00) 100.0(0.00) 96.72(0.26) 100.00(0.00) Decay SCIOcv CLIME glasso SCIO 97.22(0.84) 88.84(2.40) 76.18(3.06) 85.16(1.62) 98.97(0.21) 96.55(0.68) 86.03(1.60) 91.40(0.44) 99.61(0.06) 99.40(0.08) 94.97(2.20) 96.11(0.29) 99.84(0.02) 100.0(0.00) 98.90(0.16) 98.66(0.06) 99.94(0.01) 100.0(0.00) 95.29(0.06) 100.00(0.00) 99.98(0.00) 100.0(0.00) 97.41(0.11) 100.00(0.00) Table 1: Comparison of average support recovery (SD) of SCIO, SCIOcv, CLIME, and glasso over 100 simulation runs. 2.2 A genetic dataset on HIV-1 associated neurocognitive disorders Borjabad et al (2011) analyzed gene expression arrays on post-mortem brain tissues. They showed that patients with HAND on antiretroviral therapy have many fewer and milder gene expression changes than untreated patients, and these genes are postulated to regulate several important genetic pathways. Their dataset is publicly available from Gene Expression Ominibus (GEO) under the serial number GSE28160. We here apply our method to study how their genetic interactions/pathways are altered between treated and untreated patients, and compare with other methods using classification, due to lack of the golden truth. This dataset contains gene expression profiles of post-mortem brain tissues under two biological replications. The first replication contains 6 control (healthy) samples, 7 treated HAND samples, and 8 untreated HAND samples; the second replication contains 3 controls, 5 treated, and 6 untreated. The data are preprocessed by GEO and then log-transformed using Bioconductor in R. We will use the first replications as a training set, and test the performance of classifying 3 classes on the second replications. The class label is denoted by q, where q = 1, 2, 3 for control, treated and untreated respectively. The model building procedure is similar to Cai, Liu and Luo (2011). On the training data, we first compare pair-wise mean differences between 3 classes for each gene using Wilcoxon’s tests, and select the top 100 genes with the most significant p-values in testing any pair of classes. Based on these 100 genes and the training data, we estimate the inverse covariance matrix Ω̂q for each class q using SCIO, CLIME, and glasso. To classify a new observation X from the testing dataset, we employ a classification score for each pair of class (q, q 0 ), which is defined as the log-likelihood difference (ignoring constant factors) T  T  sq,q0 (X) = − X − X q Ω̂q X − X q + X − X q0 Ω̂q0 X − X q0     + log det Ω̂q − log det Ω̂q0 where X j is the mean vector for class j using the training data, j = q, q 0 and q 6= q 0 . This score is essentially the logarithm of the likelihood ratios under two estimated multivariate normals. Because each class has almost the same number of observations in the training, we will assign the label q if sq,q0 > 0 and q 0 otherwise. 4 Figure 1 plots the support maps with a representing case of 10% connected edges using both SCIO, CLIME, and glasso. Each label has different connection patterns as shown by all these methods, and all methods share similar patterns by visual inspection. However, it should be noted that glasso tends to have stripes in the support, which is also observed in simulations. 2.3 An fMRI dataset on attention deficit hyperactivity disorders The ADHD-200 project (http://fcon 1000.projects.nitrc.org/indi/adhd200/) released a resting-state fMRI dataset of healthy controls and ADHD children. We apply our method using the data in one of the participating center, Kennedy Krieger Institute. There are 61 typically-developing controls (HC), and 22 ADHD cases. The fMRI data were preprocessed by from neurobureau (http://www.nitrc.org/plugins/mwiki/index.php/neurobureau:AthenaPipeline), and the preprocessing steps are described on the same website. After preprocessing, we have 148 time points from each of 116 brain regions, for each subject. We will use the data of each subject to estimate the precision matrix. We choose the precision matrix instead of the covariance because it is more relevant to direct connections rather than indirect ones. 3 Proof of the main results To prove the main results, we need the following lemmas. The first one comes from (28) and (33) in Cai, Liu and Luo (2011). Lemma 1 Let Σ = (σij )p×p and the sample covariance Σ̂ = (σ̂ij )p×p . We have for some C > 0, r  log p  1/2 1/2 = O(p−1 ) P max {|σ̂ij − σij |/(σii σjj )} ≥ C 1≤i,j≤p n under (C2), and P  max {|σ̂ij − 1≤i,j≤p 1/2 1/2 σij |/(σii σjj )} ≥C under (C2∗ ). 5 r log p  = O(p−1 + n−δ/8 ) n Figure 1: Comparison of support recovered by SCIO, CLIME, and glasso for the HIV dataset, when 10% of the edges are connected. Nonzeros are in black. (a) Control–SCIO (b) Treated–SCIO (c) Untreated–SCIO (d) Control–CLIME (e) Treated–CLIME (f) Untreated–CLIME (g) Control–glasso (h) Treated–glasso (i) Untreated–glasso 6 Figure 2: Comparison of support recovered by SCIO, CLIME, and glasso for the ADHD dataset, when 30% of the edges are connected. Black is nonzero over 100% of subjects, and white is 0%. (a) ADHD–SCIO (b) ADHD–CLIME (c) ADHD–glasso (d) Control–SCIO (e) Control–CLIME (f) Control–glasso 7 Let Ω = (ωij ) = (ω 1 , . . . , ω p ), Si be the support of ω i and ω Si = (ωji ; j ∈ Si ) . We will also need the following lemma from Cai, Liu and Zhou (2011). T Lemma 2 Assume c−1 ≤ Λmin (Ω) ≤ Λmax (Ω) ≤ c0 . We have for some 0 C > 0, r  log p  = O(p−1 ) P max |Σ̂Si ×Si ω Si − eSi |∞ ≥ C 1≤i≤p n if (C2) holds; P  max |Σ̂Si ×Si ω Si − eSi |∞ ≥ C 1≤i≤p if (C2*) holds. r log p  = O(p−1 + n−δ/8 ) n Proof of Theorem 1. For the solution β̂ i , it satisfies that Σ̂β̂ i − ei = −λni Ẑ i , where Ẑ i =: (Ẑ1i , . . . , Ẑpi )T is the subdifferential ∂|β̂ i |1 satisfying  1, β̂ji > 0;  Ẑji = −1, β̂ji < 0;  ∈ [−1, 1], β̂ji = 0. o Define β̂ i be the solution of the following optimization problem: n1 o o β̂ i = arg min β T Σ̂β − eTi β + λni |β|1 , supp(β)⊆Si 2 o where supp(β) denotes the support of β. We will show that β̂ i = β̂ i with high probability. o o Let Ẑ Si is the subdifferential ∂|β̂ i |1 on Si . We define the vector Z̃ i = (Z̃1i , . . . , Z̃pi )T by letting Z̃ji = Ẑjio for j ∈ Si and o Z̃ji = −λ−1 ni (Σ̂β̂ i )j for j ∈ Sic . By Lemma 3 proved momentarily, for j ∈ Sic and some r < 1, |Z̃ji | ≤ r < 1 8 (5) with probability greater than 1 − O(p−1 ) under (C2) (or 1 − O(p−1 + n−δ/8 ) under (C2∗ )). By this primal-dual witness construction and (9), the theorem is proved. The following lemma is employed when proving Theorem 1. Lemma 3 With probability greater than 1 − O(p−1 ) under (C2) (or 1 − O(p−1 + n−δ/8 ) under (C2∗ )), we have |Z̃ji | < 1 − α/2 uniformly for j ∈ Sic . Proof. By the definition of Z̃ i , we have o Σ̂Si Si β̂ Si − eSi = −λni Z̃ Si (6) and o Σ̂Sic Si β̂ Si = −λni Z̃ Sic . (7) Write (6) as o o ΣSi Si (β̂ Si − ω Si ) + (Σ̂Si Si − ΣSi Si )(β̂ Si − ω Si ) + Σ̂Si Si ω Si − eSi = −λni Z̃ Si . This implies that   o o . (8) + e ω ) − Σ̂ − ω )( β̂ − Σ − ( Σ̂ − λ Z̃ β̂ Si − ω Si = Σ−1 S S S S S S S S S n S Si i i i i i i i i i i Si Si By (3) of the main text, Lemma 1 and Lemma 2, we have with probability greater than 1 − O(p−1 ) (or 1 − O(p−1 + n−δ/8 )), q o o |β̂ Si − ω Si |2 ≤ C sp log p/n + o(1)|β̂ Si − ω Si |2 . This implies that o |β̂ Si − ω Si |2 ≤ C q sp log p/n. 9 (9) By (7) and the above equation, we have o 1 1 Σ̂Sic Si (β̂ Si − ω Si ) + (Σ̂Sic Si − ΣSic Si )ω Si λn λn o 1 = (Σ̂Sic Si − ΣSic Si )(β̂ Si − ω Si ) − ΣSic Si Σ−1 Si Si Z̃ Si λn o 1 − ΣSic Si Σ−1 Si Si (Σ̂Si Si − ΣSi Si )(β̂ Si − ω Si ) λn 1 − ΣSic Si Σ−1 Si Si (Σ̂Si Si ω Si − eSi ) λn 1 + (Σ̂Sic Si − ΣSic Si )ω Si . λn −Z̃ Sic = −1 c Since kΣSic Si Σ−1 Si Si k∞ ≤ 1 − α and |Z̃ Si |∞ ≤ 1, we have |ΣSi Si ΣSi Si Z̃ Si |∞ ≤ 1 − α. By (9) and Lemma 1, we obtain that with probability greater than 1 − O(p−1 ) (or 1 − O(p−1 + n−δ/8 )) o |(Σ̂Sic Si − ΣSic Si )(β̂ Si − ω Si )|∞ ≤ Csp log p/n. (10) This, together with Lemma 2, implies (5). o Proof of Theorems 2 and 3. By the proof of Theorem 1, we have β̂ i = β̂ i . Reorganize terms to yield that   (11) β̂ i − ω i = Σ−1 − λn Ẑ i − (Σ̂ − Σ)(β̂ i − ω i ) − Σ̂ω i + ei . By (9) and Lemma 1, we obtain that with probability greater than 1−O(p−1 ) (or 1 − O(p−1 + n−δ/8 )), |(Σ̂ − Σ)(β̂ i − ω i )|∞ ≤ Csp log p/n. (12) Thus, |β̂ i − ω i |∞ ≤ CMp r log p . n P This proves (6). By (9) and the inequality kΩ̂ − Ωk2F ≤ 2 pj=1 |β̂ i − ω i |22 , we obtain (7). Theorem 3 (i) follows from the proof of Theorem 1. Theorem 3 (ii) follows from Theorem 2 and the lower bound condition on min(i,j)∈Ψ |ωij |. 10 Proof of Theorem 4. Let β̂ i = arg min β∈IRp n1 2 β T Σ̂11 β − eTi β + λni |β|1 o p with the theoretical λni = C log p/n ∈ {λi , 1 ≤ i ≤ N } and C is sufficiently large. Then by the proofs of Theorem 1 and 2, we have with probability greater than 1 − O(p−1 ), max |β̂ i − ω i |22 ≤ Csp 1≤i≤p log p . n 1 By the definition of β̂ i with the cross validated λ̂i , we have 1 1 1 1 1 T 1 1 (β̂ i ) Σ̂2 β̂ i − eTi β̂ i ≤ (β̂ i )T Σ̂2 β̂ i − eTi β̂ i . 2 2 1 Set D i = β̂ i − ω i and D oi = β̂ i − ω i . This implies that 1 1 1 h(Σ̂2 − Σ)D i , D i i + hΣD i , D i i + 2hΣ̂2 ω i − ei , β̂ i − β̂ i i 1 ≤ h(Σ̂2 − Σ)D oi , D oi i + hΣD oi , D oi i. Lemma 4 proved later yields that 1 |h(Σ̂2 − Σ)D i , D i i| = OP (1)|D i |22 r log N n and 1 hΣ̂2 ω ·i − 1 ei , β̂ i − β̂ i i = 1 OP (1)|β̂ i − β̂ i |2 r log N . n Thus, |D i |22 ≤ OP r log N  n (|D i |2 + |β̂ i − ω i |2 ) + |D oi |22 . This proves the theorem. The following lemma is needed for proving Theorem 4. 11 Lemma 4 For any vector v with |v|2 = 1, we have ! r 1 log N max |h(Σ̂2 − Σ)v, vi| = OP 1≤i≤N n and max 1≤i≤N 1 |hΣ̂2 ω i − ei , vi| = OP r log N n ! . (13) (14) Proof. We will use the following identity 1 1 h(Σ̂2 − Σ)v, vi = h(Σ−1/2 Σ̂2 Σ−1/2 − I)Σ1/2 v, Σ1/2 vi 1 1 where Σ̃2 = = h(Σ−1/2 Σ̃2 Σ−1/2 − I)Σ1/2 v, Σ1/2 vi + (v T X̄ − v T µ)2 , 1 n2 Pn2 k=1 (X k 1 h(Σ̃2 − µ)(X k − µ)T . We have n2 1 X − Σ)v, vi = (v T (X k − µ))2 − v T Σv. n2 k=1 By (C3) and the exponential inequality in Lemma 1, for any M > 0, there exists some C > 0 such that r n2  1 X log N  = O(N −M ), (v T (X k − µ))2 − v T Σv ≥ C max P 1≤i≤N n2 k=1 n r  log N  max P |v T X̄ − v T µ| ≥ C = O(N −M ). 1≤i≤N n Hence, (13) is proved. (14) follows from the exponential inequality in Lemma 2. Proof of Proposition 1. The objective is equivalent to (after neglecting constant terms with respect to βp ) 1 βp β T−p Σ̂12 + βp2 Σ̂22 − βp 1 {p = i} + λ |βp | . 2 The minimizer then should have a subgradient equal to zero, β T−p Σ̂12 + βp Σ̂22 − 1 {p = i} + λ∂ |βp | = 0. Thus the solution is the thresholding rule   βp = T 1 {p = i} − β T−p Σ̂12 , λ /Σ̂22 . 12 References [1] Borjabad, A., Morgello, S., Chao, W., Kim, S.-Y., Brooks, A.I., Murray, J., Potash, M.J., and Volsky, D.J. (2011). Significant effects of antiretroviral therapy on global gene expression in brain tissues of patients with HIV-1-associated neurocognitive disorders. PLoS Pathog 7(9): e1002213. [2] Cai, T., Liu, W. and Luo, X. (2011), A constrained `1 minimization approach to sparse precision matrix estimation. Journal of the American Statistical Association, 106, 594-607. [3] Cai, T., Liu, W. and Zhou, H.H. (2011). Estimating sparse precision matrix: Optimal rates of convergence and adaptive estimation, Annals of Statistics, to appear. [4] Friedman, J., Hastie, T. and Tibshirani, R. (2008). Sparse inverse covariance estimation with the graphical lasso. Biostatistics 9: 432-441. 13
10math.ST
Applications of multisymmetric syzygies in invariant theory arXiv:1612.00302v1 [math.AC] 1 Dec 2016 M. Domokos∗ Abstract A presentation by generators and relations of the nth symmetric power B of a commutative algebra A over a field of characteristic zero or greater than n is given. This is applied to get information on a minimal homogeneous generating system of B (in the graded case). The known result that in characteristic zero the algebra B is isomorphic to the coordinate ring of the scheme of n-dimensional representations of A is also recovered. The special case when A is the two-variable polynomial algebra and n = 3 is applied to find generators and relations of an algebra of invariants of the symmetric group of degree four that was studied in connection with the problem of classifying sets of four unit vectors in the Euclidean space. Key words: symmetric product, generators and relations, multisymmetric polynomials, trace identities, Cayley-Hamilton theorem MSC: 13A50, 16R30 1 Introduction Let n be a positive integer and let A be a commutative K-algebra (with identity 1), where K is a field of characteristic zero or char(K) > n. Denote by T n (A) the nth tensor power of A on which the symmetric group Sn acts by permuting the tensor factors, and write T n (A)Sn for the subalgebra of Sn -invariants. First we give a presentation of this commutative K-algebra in terms of generators and relations. Note that even if this algebra is finitely generated, we have to take a redundant (typically infinite) generating system that allows a simple description of the relations. MTA Alfréd Rényi Institute of Mathematics, 1053 Budapest, Reáltanoda utca 13-15, Hungary, E-mail address: [email protected] ∗ Supported by National Research, Development and Innovation Office, NKFIH K 119934. 1 2 M. Domokos The key step is to pay attention to a K-vector space basis of T n (A)Sn which comes together with a rule to rewrite products of the generators of T n (A)Sn into normal form. The rewriting algorithm is furnished by relations that come uniformly from one master relation. This yields the desired presentation of T n (A)Sn , see Theorem 1. As an application we deduce information on a minimal generating system of T n (A)Sn in the case when A is graded, see Corollary 1 and Corollary 2. This has relevance for instance for the study of polynomial invariants associated with representations of wreath products, see Section 3. Since the master relation mentioned above comes from the Cayley-Hamilton identity of matrices, as a corollary of Theorem 1 we obtain Corollary 4 asserting that T n (A)Sn is isomorphic to the subalgebra O(rep(A, n))GL(n,K) of GL(n, K)-invariants in the coordinate ring of the scheme of n-dimensional representations of A (where A is a finitely generated K-algebra and char(K) = 0). This latter result is due to Vaccarino [30, Theorem 4.1.3], who proved it by a different approach. In Section 5 we turn to a very concrete application of Theorem 1. Its special case when A = k[x1 , x2 ] is a two-variable polynomial ring was used in [10], [11] to derive generators of the ideal of relations among a minimal generating system of T 3 (A)S3 . This is applied here to give a minimal presentation of the ring of invariants RS4 of the permutation representation of the symmetric group S4 associated with the action of S4 on the set of two-element subsets of the set {1, 2, 3, 4}. This ring of invariants was studied before by Aslaksen, Chan and Gulliksen [2] because of its relevance for classifying sets of four unit vectors in an euclidean space. A minimal generating system of RS4 was computed in [2]. Here we get simultaneously the generators and relations essentially as a consequence of the minimal presentation of T 3 (K[x1 , x2 ])S3 mentioned above. We note that the ring of invariants RS4 fits into a series that has relevance for the graph isomorphism problem, and has been studied for example in [28]. Acknowledgements I thank Wai-kit Yeung for a question about the topic of Section 4 that inspired me to formulate Theorem 1. 2 Generators and relations for symmetric tensor powers of a commutative algebra Choose a subset M ⊂ A such that 1 ∈ / M and {1} ∪ M is a K-vector space basis in A. For w ∈ M set [w] := w ⊗ 1 ⊗ · · · ⊗ 1 + 1 ⊗ w ⊗ 1 ⊗ · · ·⊗ 1 + · · · + 1 ⊗ · · · ⊗ 1 ⊗ w. (1) Proposition 1. The products [w1 ] · · · [wr ] with r ≤ n, wi ∈ M constitute a K-vector space basis of T n (A)Sn . Proof. The elements w1 ⊗ · · · ⊗ wn with wi ∈ {1} ∪ M constitute a basis in T n (A), and Sn permutes these basis vectors. For a multiset {w1 , . . . , wr } with r ≤ n, wi ∈ M , Applications of multisymmetric syzygies in invariant theory 3 denote by O{w1 ,...,wr } the Sn -orbit sum of the monomial w1 ⊗ · · · ⊗ wr ⊗ 1 ⊗ · · · ⊗ 1, and call r its height. Clearly these elements constitute a basis in T n (A)Sn . Assume that the multiset {w1 , . . . , wr } contains d distinct elements with multiplicities r1 , . . . , rd (so r1 + · · · + rd = r), then expanding [w1 ] · · · [wr ] as a linear combination of the above basis elements, the coefficient of O{w1 ,...,wr } is r1 ! · · · rd !, and all other basis elements contributing have strictly smaller height. This clearly shows the claim. Remark 1. The special case when A = K[x1 , . . . , xm ] is a polynomial ring and M is the set of monomials appears in [15, Proposition 2.5’], [3] (see [4] for the interpretation needed here), and [10]. A formally different but related statement is Lemma 3.2 in [30]. Take commuting indeterminates Tw (w ∈ M ), and write F for the commutative polynomial algebra F := K[Tw | w ∈ M ]. Write ϕ : F → T n (A)Sn for the K-algebra homomorphism given by Tw 7→ [w] for all w ∈ M . To a multiset {w1 , . . . , wn+1 } of n + 1 elements from M we associate anSelement S Ψ{w1 ...,wn+1 } ∈ F as follows. Write Pn+1 for the set of partitions λ = λ1 . . . λh of the set {1, . . . , n + 1} into the disjoint union of non-empty subsets λi , and denote h(λ ) = h the number of parts of the partition λ . Set Ψ{w1 ,...,wn+1 } = ∑ λ ∈Pn+1 h(λ )  (−1)h(λ ) ∏ (|λi | − 1)! · T∏s∈λ i i=1 ws  , where for a general element a ∈ A (say for a = ∏s∈λi ws ) we write Ta := c0 n + ∑ cw Tw w∈M provided that a = c0 + ∑w∈M cw w, with c0 , cw ∈ K. Theorem 1. The K-algebra homomorphism ϕ is surjective onto T n (A)Sn , and its kernel is the ideal generated by the Ψ{w1 ,...,wn+1 } , where {w1 , . . . , wn+1 } ranges over all multisets of n + 1 elements in M . Proof. Surjectivity of ϕ follows from Proposition 1. The fact that Ψ{w1 ,...,wn+1 } belongs to ker(ϕ ) follows from the Cayley-Hamilton identity. Let Y (1), . . . ,Y (n + 1) be n × n matrices over an arbitrary commutative ring. For a permutation π ∈ Sn+1 with cycle decomposition π = (i1 · · · id ) · · · ( j1 . . . je ) set Trπ = Tr(Y (i1 ) · · ·Y (id )) · · · Tr(Y ( j1 ) · · ·Y ( je )). 4 M. Domokos Then we have the equality ∑ π ∈Sn+1 sign(π )Trπ = 0 (2) called the fundamental trace identity of n × n matrices. This can be proved by multilinearizing the Cayley-Hamilton identity to get an identity multilinear in the n matrix variables Y (1), . . . ,Y (n), and then multiplying by Y (n + 1) and taking the trace; see for example [23], [21], [13] for details. For a ∈ A denote by ã the diagonal n × n matrix whose ith diagonal entry is 1 ⊗ · · · ⊗ 1 ⊗ a ⊗ 1 ⊗ · · ·⊗ 1 (the ith tensor factor is a). The substitution Y (i) 7→ w̃i (i = 1, . . . , n + 1) in (2) yields that ϕ (Ψ{w1 ,...,wn+1 } ) = 0. The coefficient in Ψ{w1 ,...,wn+1 } of the term Tw1 · · · Twn+1 is (−1)n+1 , and all other terms are products of at most n variables Tu . Therefore the relation ϕ (Ψ{w1 ,...,wn+1 } ) = 0 can be used to rewrite [w1 ] · · · [wn+1 ] as a linear combination of products of at most n invariants of the form [u] (where u ∈ M ). So these relations are sufficient to rewrite an arbitrary product of the generators [w] in terms of the basis given by Proposition 1. This implies our statement about the kernel of ϕ . Remark 2. (i) The ideal of relations among the generators of the algebra of multisymmetric polynomials (i.e. the special case T n (A)Sn with A = K[x1 , . . . , xm ]) has been studied by several authors, see [16], [17], [18], [7], [5], [6], [29]. Slightly more generally, the case of Theorem 1 when A is the qth Veronese subalgebra of the mvariable polynomial algebra K[x1 , . . . , xm ] was given in Theorem 2.5 of [10] (whose approach is close to an argument for a different result in [3]). The above proof is a generalization to arbitrary commutative A of the proof of Theorem 2.5 in [10]. (ii) Although the presentation of T n (A)Sn given in Theorem 1 is infinite, in certain cases an a priori upper bound for the degrees of relations in a minimal presentation is available, and a finite presentation can be obtained from the infinite presentation above (see for instance [10, Theorem 3.2], building on [8]). Based on this procedure even a minimal presentation is worked out in [11] for T 3 (K[x1 , . . . , xm ])S3 . Suppose that A is generated as a K-algebra by the elements a1 , . . . , am . Take the m-variable polynomial algebra K[x1 , . . . , xm ] and denote by ρ : K[x1 , . . . , xn ] → A the K-algebra surjection given by ρ (xi ) = ai for i = 1, . . . , m. This induces a Kalgebra surjection T n (ρ ) : T n (K[x1 , . . . , xm ]) → T n (A) in the obvious way. Since T n (ρ ) is Sn -equivariant and char(K) does not divide |Sn |, we deduce that it restricts to a K-algebra surjections T n (ρ ) : T n (K[x1 , . . . , xm ])Sn → T n (A)Sn . Since the algebra T n (K[x1 , . . . , xm ])Sn is classically known to be generated by [xi1 . . . xid ] where d ≤ n, 1 ≤ i1 ≤ · · · ≤ id ≤ m (see [25], [19], [20], Chapter II.3 in [31], [27], and for a characteristic free statement see [12], [24] or [30, Corollary 3.14]), we obtain the following known fact: Proposition 2. The K-algebra T n (A)Sn is generated by {[ai1 . . . aid ] | d ≤ n, 1 ≤ i1 ≤ · · · ≤ id ≤ m}. Applications of multisymmetric syzygies in invariant theory 5 Remark 3. Proposition 2 follows also directly from Theorem 1, since the relation ϕ (Ψ{w1 ,...,wn+1 } ) = 0 can be used to rewrite [w1 · · · wn+1 ] as a linear combination of products of invariants of the form [u] where u is a proper subproduct of w1 · · · wn+1 . Moreover, when A = k[x1 , . . . , xm ] is a polynomial ring, the above generating set is minimal. For a general commutative K-algebra A the generating set in Proposition 2 may not be minimal. As an application of Theorem 1 we shall derive some information on a minimal homogeneous generating system of T n (A)Sn when A is graded. We L L shall work with graded algebras R = ∞ d>0 Rd . d=0 Rd , where R0 = K. Set R+ := We say that a homogeneous r ∈ R+ is indecomposable if r ∈ / (R+ )2 ; that is, r is not contained in the subalgebra generated by lower degree elements. Corollary 1. Let A be a graded algebra whose minimal positive degree homogeneous component has degree q. (i) Suppose that b is a non-zero homogeneous element in A with deg(b) < (n + 1)q. Then [b] is an indecomposable element in the graded algebra T n (A)Sn (whose grading is induced by the grading on A). (ii) Suppose that B is a K-linearly independent subset of A consisting of homogeneous elements of positive degree strictly less than (n + 1)q. Then the set {[b] | b ∈ B} is part of a minimal homogeneous K-algebra generating system of T n (A)Sn . Proof. Obviously (i) is a special case of (ii), so we shall prove (ii). Extend the set B to a subset M ⊂ A such that 1. M consists of homogeneous elements of positive degree; 2. {1} ∪ M is a K-vector space basis of A. This is possible by the assumptions. Consider the corresponding (infinite) presentation of A by generators and relations given in Theorem 1. Endow F with a grading such that deg(Tw ) = deg(w) for all w ∈ M . According to Theorem 1 the ideal ker(ϕ ) is generated by Ψ{w1 ,...,wn+1 } , where {w1 , . . . , wn+1 } ranges over all multisets of n + 1 elements in M . Clearly Ψ{w1 ,...,wn+1 } ∈ F is homogeneous of degree deg(w1 ) + · · · + deg(wn+1 ). For each wi we have deg(wi ) ≥ q, implying deg(w1 ) + · · · + deg(wn+1 ) ≥ (n + 1)q > deg(b) for all b ∈ B. Consequently ker(ϕ ) is a homogeneous ideal generated by elements of degree strictly greater than deg(b) for any b ∈ B. By the graded Nakayama Lemma (see for example [9, Lemma 3.5.1]) it is sufficient to show that the cosets {b + (A+ )2 | b ∈ B} are K-linearly independent in the factor space A/(A+ )2 . This is equivalent to the condition that if h= ∑ cb Tb ∈ ker(ϕ ) + (F+)2 for some cb ∈ K, (3) b∈B then all coefficients cb are zero, that is, h = 0. The ideals ker(ϕ ) and (F+ )2 are homogeneous, and since all non-zero homogeneous components of ker(ϕ ) have degree strictly grater than deg(b) for all b ∈ B, we deduce from (3) that h ∈ (F+ )2 . 6 M. Domokos Now h is a linear combination of the variables in the polynomial ring F (in possibly infinitely many variables), so this leads to the conclusion h = 0. Proposition 2 and Corollary 1 have the following immediate corollary: Corollary 2. Suppose that A is a graded algebra generated by homogeneous elements of the same positive degree q. Let B be the union of K-vector space bases of the positive degree homogeneous components of A of degree strictly less than (n + 1)q (for example, B may consist of a set of products of length at most n of the generators of A). Then {[b] | b ∈ B} is a minimal homogeneous K-algebra generating system of T n (A)Sn . 3 Wreath products Corollary 1 and Corollary 2 can be applied in invariant theory, one of whose basic targets is to find a minimal homogeneous K-algebra generating system in an algebra of polynomial invariants S(V )G . Here G is a group acting on a finite dimensional vector space V via linear transformations, and S(V ) is the symmetric tensor algebra of V (i.e. a polynomial algebra with a basis of V as the variables) endowed with the induced G-action via K-algebra automorphisms, and S(V )G is the subalgebra consisting of the elements fixed by G. For a group G and a positive integer n the wreath product G ≀ Sn is defined as the semidirect product H ⋊ Sn , where H = G × · · · × G is the direct product of n copies of G, and conjugation by σ ∈ Sn yields the corresponding permutation of the direct factors of H. Given a G-module V there is a natural G ≀ Sn -module structure on V n = V ⊕ · · · ⊕ V (n direct summands) given by (g1 , . . . , gn , σ ) · (v1 , . . . , vn ) = (g1 · vσ −1 (1) , . . . , gn · vσ −1 (n) ). (4) Consider the corresponding algebra S(V n )G≀Sn of polynomial invariants. Clearly we have S(V n )G≀Sn ⊆ S(V n )H ⊆ S(V n ). Since H is normal in G ≀ Sn , the subalgebra S(V n )H ⊆ S(V n ) is Sn -stable, and S(V n )G≀Sn = (S(V n )H )Sn . With the usual identification S(V n ) = T n (S(V )) we obtain S(V n )H = S(V n )G×···×G = T n (S(V )G ), and formula (4) shows that the action on S(V n ) corresponds to the action on T n (S(V )) via permutation of the tensor factors. We conclude the identification S(V n )G≀Sn = T n (S(V )G )Sn . Therefore Corollary 1 and Corollary 2 have the following consequence: Corollary 3. Let q denote the minimal positive degree of a homogeneous element in S(V )G , and let B be the union of K-vector space bases of the homogeneous components of S(V )G of positive degree strictly less than (n + 1)q. Applications of multisymmetric syzygies in invariant theory 7 (i) Then {[b] | b ∈ B} is part of a minimal homogeneous K-algebra generating system of S(V n )G≀Sn . (ii) Assume in addition that S(V )G is generated by its homogeneous component of degree q. Then {[b] | b ∈ B} is a minimal homogeneous K-algebra generating system of S(V n )G≀Sn . Example 1. (i) Let G be the special linear group SLq (K) acting by left multiplication on the space V = K q×r of q × r matrices. Then by classical invariant theory (see [31]) we know that S(V )G is generated by the determinants of q × q minors, all having degree q, so Corollary 3 (ii) applies for S(V n )G≀Sn . (ii) Let G be the cyclic group of order q acting by multiplication by a primitive qth root of 1 on V = K m . In this case the ring S(V n )G≀Sn can be interpreted as the ring of vector invariants of some pseudo-reflection group. Note that [10, Theorem 2.5 (ii)] is a special case of Corollary 3 (ii). 4 The scheme of semisimple representations of A In this section we need to assume that char(K) = 0. Choose K-algebra generators a1 , . . . , am of A, and consider the K-algebra surjection π : Khx1 , . . . , xm i → A, xi 7→ ai from the free associative K-algebra. Take m generic n × n matrices X(1), . . . , X(m) (their mn2 entries are indeterminates in an mn2 -variable polyno(r) mial algebra K[xi j | 1 ≤ i, j ≤ n, r = 1, . . . , m]). Take the factor of this polynomial algebra by the ideal generated by all entries of f (X(1), . . . , X(m)), where f ranges over ker(π ) (in particular, the entries of X(r)X(s) − X(s)X(r) are among the generators of this ideal). This algebra is the coordinate ring O(rep(A, n)) of the scheme rep(A, n) of n-dimensional representations of A (by definition of this scheme). Denote by Y (1), . . . ,Y (m) the images in the n × n matrix algebra over O(rep(A, n)) of the generic matrices X(1), . . . , X(m). Then the K-algebra surjection ρ : Khx1 , . . . , xm i → O(rep(A, n))n×n given by xi 7→ Y (i) factors through a K-algebra homomorphism ρ̄ : A → O(rep(A, n))n×n . Recall that the conjugation action of the general linear group GL(n, K) on n × n matrices induces an action (via K-algebra automorphisms) on O(rep(A, n)). Consider the K-algebra homomorphism γ : F → O(rep(A, n)) given by Tw 7→ Tr(ρ̄ (w)). Corollary 4. The K-algebra homomorphism γ factors through an isomorphism γ : T n (A)Sn → O(rep(A, n))GL(n,K) (so γ = γ ◦ ϕ ). Proof. Since the fundamental trace identity holds for matrices over the commutative ring O(rep(A, n)), we conclude that all the Ψ{w1 ,...,wn+1 } belong to ker(γ ). By Theorem 1 these elements generate the ideal ker(ϕ ), hence ker(γ ) ⊇ ker(ϕ ), implying the existence of a K-algebra homomorphism γ with γ = γ ◦ ϕ . The homomorphism γ (and hence γ ) is surjective onto O(rep(A, n))GL(n,K) because the algebra of GL(n, K)-invariants is generated by traces of monomials in the 8 M. Domokos generic matrices Y (1), . . . ,Y (m) (this follows from [26] since the characteristic of K is zero, hence GL(n, K) is linearly reductive). (r) Define β : K[xi j | 1 ≤ i, j ≤ n, r = 1, . . . , m] → T n (A) as the K-algebra homomorphism given by X(r) 7→ a˜r (we use the notation of the proof of Theorem 1, so a˜r is a diagonal n × n matrix over T n (A) whose jth diagonal entry is 1 ⊗ · · · ⊗ 1 ⊗ ar ⊗ 1 ⊗ · · · ⊗ 1 (the jth tensor factor is ar ). Since f (a˜1 , . . . , a˜m ) = 0 for any f ∈ ker(π ), we conclude that β factors through a homomorphism β : O(rep(A, n)) → T n (A) inducing Y (i) 7→ ãi . It is easy to see that β (γ ([w]) = β (Tr(ρ̄ (w))) = [w], hence β ◦ γ is the identity map on T n (A)Sn . This shows that γ is surjective as well, and hence it is an isomorphism. The isomorphism T n (A)Sn ∼ = O(rep(A, n))GL(n,K) is a result of Vaccarino [30, Theorem 4.1.3]. The proof given above is different, and it is an adaptation of the proof of [10, Theorem 4.1]. The special case when A is a polynomial ring is discussed also in [14] and [22]. Motivated by [1] we call O(rep(A, n))GL(n,K) the coordinate ring of the scheme of semisimple n-dimensional representations of A. 5 The symmetric group acting on pairs  Write [n] 2 for the set of two-element subsets of {1, . . . , n}. The symmetric group Sn acts on the n2 -variable polynomial algebra   [n] Rn = K[x{i, j} | {i, j} ∈ ] 2 as σ · x{i, j} = x{σ (i),σ ( j)} for σ ∈ Sn . The subalgebra RSnn was studied for two reasons, the first comes from graph theory. Given a simple graph Γ with vertex set {1, . . . , n} and a polynomial f ∈ Rn denote by f (Γ ) the value of f under the substitution ( 1 if {i, j} is an edge in Γ x{i, j} 7→ 0 otherwise. Suppose that f1 , . . . , fr generate the K-algebra RSnn . The following statement is well known (see for examle [9, Lemma 5.5.1]): Proposition 3. The graphs Γ and Γ ′ on the vertex set {1, . . . , n} are isomorphic if and only if fi (Γ ) = fi (Γ ′ ) for all i = 1, . . . , r. The second motivation to study RSnn comes from the problem of classifying sets of n unit vectors in the Euclidean space Rm . We refer to [2] for the details (see also [9, Section 5.10.2]). Applications of multisymmetric syzygies in invariant theory 9 From now on we focus on the case n = 4 and set R := R4 . For our purposes a more convenient generating system of R is x1 , x2 , x3 , z1 , z2 , z3 where x1 = x{1,2} + x{3,4}, x2 = x{1,3} + x{2,4}, x3 = x{1,4} + x{2,3} z1 = x{1,2} − x{3,4}, z2 = x{1,3} − x{2,4}, z3 = x{1,4} − x{2,3}. We shall use the notation of Section 2. Take for A the polynomial algebra K[x, z]. Identify T 3 (A) with R as follows: x1 = x ⊗ 1 ⊗ 1, x2 = 1 ⊗ x ⊗ 1, x3 = 1 ⊗ 1 ⊗ x z1 = z ⊗ 1 ⊗ 1, z2 = 1 ⊗ z ⊗ 1, z3 = 1 ⊗ 1 ⊗ z. Consequently we have x1 + x2 + x3 = [x], z21 + z22 + z23 = [z2 ], x1 z21 + x2 z22 + x3 z23 = [xz2 ], etc. Theorem 2. (i) The algebra RS4 is generated by the ten elements [x], [x2 ], [x3 ], [z2 ], [z4 ], [z6 ], [xz2 ], [x2 z2 ], [xz4 ], z1 z2 z3 . (ii) Consider the surjective K-algebra homomorphism φ from the ten-variable polynomial algebra F = K[Tw , S | w ∈ {x, x2 , x3 , y, y2 , y3 , xy, x2 y, xy2 }] onto RS4 given by φ (S) = z1 z2 z3 and φ (Tw ) = [ψ (w)], where ψ : K[x, y] → K[x, z] is the K-algebra homomorphism mapping x 7→ x and y 7→ z2 . The kernel of φ is minimally generated (as an ideal) by the element 1 1 1 S2 − Ty3 + Ty2 Ty − Ty3 3 2 6 (5) and the five elements (given explicitly in the proof) J3,2 , J2,3 , J4,2 , J3,3 , J2,4 . (6) Proof. Denote by H the abelian normal subgroup of S4 consisting of the three double transpositions and the identity. The variables x1 , x2 , x3 are H-invariant whereas z1 , z2 , z3 span H-invariant subspaces on which H acts via its three non-trivial characters. It follows that the subalgebra RH is generated by x1 , x2 , x3 , z21 , z22 , z23 , z1 z2 z3 . 10 M. Domokos Denote by P the subalgebra of RH generated by the six algebraically independent elements x1 , x2 , x3 , z21 , z22 , z23 . The square of the remaining generator z1 z2 z3 belongs to P, hence RH = P ⊕ Pz1 z2 z3 (7) is a rank two free P-module. Since H is normal, RH is an S4 -stable subalgebra of R, and the action of S4 on RH factors through an action of S4 /H ∼ = S3 . More concretely, S4 permutes the elements x1 , x2 , x3 and it permutes the elements z1 , z2 , z3 up to sign. In fact z1 z2 z3 is S4 -invariant (as one can easily check) and there exists a surjective group homomorphism π : S4 → S3 (with kernel H) such that for any g ∈ S4 we have g · xi = xπ (g)(i) , g · z2i = z2π (g)(i) (i = 1, 2, 3). This shows in particular that P is an S3 = S4 /H-stable subalgebra of RH , and since z1 z2 z3 is S3 -invariant, we deduce from (7) that RS4 = (RH )S3 = PS3 ⊕ PS3 z1 z2 z3 (8) is a rank two PS3 -module. Denote by φ ′ the restriction of φ to the nine-variable polynomial algebra F ′ = K[Tw | w ∈ {x, x2 , x3 , y, y2 , y3 , xy, x2 y, xy2 }]. Then φ ′ : F ′ → PS3 is a K-algebra homomorphism. The K-algebra homomorphism ψ : K[x, y] → K[x, z] induces an isomorphism ψ̃ : T 3 (K[x, y]) → P, xi 7→ xi , yi 7→ z2i , i = 1, 2, 3 (where we identify T 3 (K[x, y]) with K[x1 , x2 , x3 , y1 , y2 , y3 ] similarly to the identification of T 3 (K[x, z]) and R). Therefore we have φ ′ = ψ̃ ◦ µ (9) where µ stands for the K-algebra surjection µ : F ′ → T 3 (K[x, y])S3 , Tw 7→ [w] for w ∈ {x, x2 , x3 , y, y2 , y3 , xy, x2 y, xy2 } studied in [10] and [11]. In particular, since T 3 (K[x, y])S3 is known to be minimally generated by the elements [w] with w ∈ {x, x2 , x3 , y, y2 , y3 , xy, x2 y, xy2 }, the K-algebra homomorphisms µ and hence φ ′ are surjective onto T 3 (K[x, y])S3 , respectively onto PS3 . By (8) statement (i) of Theorem 2 follows. Moreover, by (9) we have ker(φ ′ ) = ker(µ ). It was explained first in [10] how to deduce from a special case of Theorem 1 a minimal generating system of ker(µ ). Later in [11] a natural action of the general linear group GL2 (K) was taken into account and it was proved that ker(µ ) is minimally generated as a GL2 (K)-ideal by J3,2 and J4,2 given as follows: Applications of multisymmetric syzygies in invariant theory 11 J3,2 = 6Tx2 y Txy − 3Txy2 Tx2 − 2Tx2 y Tx Ty + Txy2 Tx2 − 4Txy2 Tx + 2Txy Tx2 Ty − 3Tx3 Ty2 + 4Tx2 Tx Ty2 − Tx3 Ty2 + Tx3 Ty2 − Tx2 Tx Ty2 J4,2 = 6Tx22 y + Txy2 Tx2 − 3Txy2 Tx2 − 6Tx3 Txy2 + 2Tx2 Txy2 Tx + 4Tx3 Txy Ty − 2Tx2 Txy Tx Ty + 2Txy Tx3 Ty − 4Tx2 y Tx2 Ty − Tx22 Ty2 + Tx22 Ty2 + 4Tx2 Tx2 Ty2 − Tx2 Tx2 Ty2 − Tx4 Ty2 − 2Tx3 Tx Ty2 The GL2 (K)-submodule of ker(µ ) generated by J3,2 is two-dimensional with Kbasis J3,2 , J2,3 where J2,3 = 6Txy2 Txy − 3Tx2 y Ty2 − 2Txy2 Tx Ty + Tx2 y Ty2 − 4Txy2 Ty + 2Txy Ty2 Tx − 3Ty3 Tx2 + 4Ty2 Ty Tx2 − Ty3 Tx2 + Ty3 Tx2 − Ty2 Ty Tx2 . The GL2 (K)-submodule of ker(µ ) generated by J4,2 is three-dimensional with Kbasis J4,2 , J3,3 , J2,4 where J3,3 = 3Tx2 y Txy2 − Txy Tx2 Ty2 + Txy3 + Txy Tx2 Ty2 − 5Txy2 Tx Ty − 3Tx3 Ty3 + 2Txy Txy2 Tx + Tx2 Tx Ty3 − 3Tx2 Txy2 Ty + 2Tx2 y Txy Ty + 3Tx2 Tx Ty2 Ty + Tx3 Ty2 Ty + Tx2 Txy Ty2 − Tx3 Ty2 Ty + 2Tx2 Txy Ty2 − Tx2 Tx Ty3 − 3Tx Tx2 y Ty2 J2,4 = 6Txy2 2 + Txy2 Ty2 − 3Txy2 Ty2 − 6Ty3 Tx2 y + 2Ty2 Tx2 y Ty + 4Ty3 Txy Tx − 2Ty2 Txy Tx Ty + 2Txy Ty3 Tx − 4Txy2 Ty2 Tx − Ty22 Tx2 + Ty22 Tx2 + 4Ty2 Ty2 Tx2 − Ty2 Ty2 Tx2 − Ty4 Tx2 − 2Ty3 Ty Tx2 . Relation (5) is just Newton’s formula expressing the third elementary symmetric polynomial of z21 , z22 , z23 in terms of their power sum symmetric functions. It follows from (8) that relation (5) together with ker(φ ′ ) generate the ideal ker(φ ). Since (6) is a minimal generating system of the ideal ker(µ ) = ker(ϕ ′ ) by [10], [11], the elements (6) together with (5) constitute a minimal homogeneous generating system of ker(φ ). Relation (5) shows that the generator φ (Ty3 ) = [z6 ] of RS4 is redundant. Consider the subalgebra F1 = K[Tw , S | w ∈ {x, x2 , x3 , y, y2 , xy, x2 y, xy2 }] of F in Theorem 2. A minimal presentation of RS4 in terms of generators and relations is as follows: Corollary 5. (i) The algebra RS4 is minimally generated by the nine elements [x], [x2 ], [x3 ], [z2 ], [z4 ], [xz2 ], [x2 z2 ], [xz4 ], z1 z2 z3 . 12 M. Domokos (ii) The kernel of the surjective K-algebra homomorphism φ |F1 : F1 → RS4 is minimally generated (as an ideal) by the five elements J˜3,2 , J˜2,3 , J˜4,2 , J˜3,3 , J˜2,4 obtained from the elements (6) via the substitution 3 1 Ty3 7→ 3S2 + Ty2 Ty − Ty3 . 2 2 Remark 4. A minimal generating system (as well as the so-called Hironaka decomposition) of RS4 was given by Aslaksen, Chan and Gulliksen [2, Theorem 4] by different methods. The authors also mention that they found the basic syzygies (relations) among the generators with the aid of computer, but the relations turned out to be quiet complicated, and so they left it out from their paper. References 1. M. Artin, On Azumaya algebras and finite dimensional representations of rings, J. Algebra 11 (1969), 532–563. 2. H. Aslaksen, S.-P. Chan and T. Gulliksen, Invatiants of Sn and the shape of sets of vectors, Applicable Algebra in Engineering, Communication and Computing 7 (1996), 53-57. 3. A. Berele, Trace identities for diagonal and upper triangular matrices, International J. Algebra and Computation 6 (1996), 645-654. 4. A. Berele and A. Regev, Some results on trace cocharacters, J. Algebra 176 (1995), 10131024. 5. E. Briand, Polynômes multisymétriques, Ph. D. dissertation, Université de Rennes I and Universidad de Cantabria, October 2002. 6. V. M. Bukhshtaber and E. G. Rees, Rings of continuous functions, symmetric products, and Frobenius algebras, (in Russian), Uspekhi Mat. Nauk 59 (2004), 125–144. 7. J. Dalbec, Multisymmetric functions, Beiträge Algebra Geom. 40 (1999), 27–51. 8. H. Derksen, Degree bounds for syzygies of invariants, Adv. Math. 185 (2004), 207-214. 9. H. Derksen and G. Kemper, Computational Invariant Theory, 1st edition, Springer-Verlag, Berlin, 2002. 10. M. Domokos, Vector invariants of a class of pseudo-reflection groups and multisymmetric syzygies, J. Lie Theory 19 (2009), 507-525. 11. M. Domokos and A. Puskás, Multisymmetric polynomials in dimension three, J. Algebra 356 (2012), 283-303. 12. P. Fleischmann, A new degree bound for vector invariants of symmetric groups, Trans. Amer. Math. Soc. 350 (1998), 1703-1712. 13. E. Formanek, The polynomial identities and invariants of n × n matrices, Regional Conference Series in Mathematics 78, American Math. Soc., 1991. 14. W. L. Gan and V. Ginzburg, Almost-commuting variety, D-modules, and Cherednik algebras, Int. Math. Research Papers 2006:2 (2006), 1-54. 15. I. M. Gelfand, M. K. Kapranov and A. V. Zelevinsky, Discriminants, Resultants, and Multidimensional Determinants, Birkhauser, Boston, 1994. Applications of multisymmetric syzygies in invariant theory 13 16. Fr. Junker, Die Relationen, welche zwischen den elementaren symmetrischen Functionen bestehen, Math. Ann. 38 (1891), 91-114. 17. Fr. Junker, Ueber symmetrische Functionen von mehreren Reihen von Veränderlichen, Math. Ann. 43 (1893), 225-270. 18. Fr. Junker, Die symmetrischen Functionen und die Relationen zwischen den Elementarfunctionen derselben, Math. Ann. 45 (1894), 1-84. 19. P. A. MacMahon, Combinatory Analysis, Vol II, Cambridge Univ. Press, 1916. 20. E. Noether, Der Endlichkeitssatz der Invarianten endlicher Gruppen, Math. Ann. 77 (1915), 89-92. 21. C. Procesi, The invariant theory of n × n matrices, Adv. Math. 19 (1976), 306–381. 22. C. Procesi, Invariants of commuting matrices, arXiv:1501.05190. 23. Yu. P. Razmyslov, Trace identities of full matrix algebras over a field of characteristic zero, (in Russian), Izv. Akad. Nauk. SSSR Ser. Mat. 38 (1974), 723-756. 24. D. Rydh, A minimal set of generators for the ring of multisymmetric functions, Ann. Inst. Fourier (Grenoble) 57 (2007), 1741-1769. 25. L. Schläfli, Über die Resultante eines Systemes mehrerer algebraischer Gleichungen, Vienna Academy Denkschriften 4 (1852). 26. K. S. Sibirskiı̆, Algebraic invariants for a set ofmatrices, (in Russian), Sib. Math. Zhurnal 9 (1968), 152–164. 27. S. A. Stepanov, Polynomial invariants of finite groups over fields of prime characteristic, (in Russian), Diskret. Mat. 11 (1999), 3-14. 28. N. M. Thiéry, Algebraic invariants of graphs; a study based on computer exploration, SIGSAM Bulletin 34 (2000), 9-20. 29. F. Vaccarino, The ring of multisymmetric functions, Ann. Inst. Fourier (Grenoble) 55 (2005), 717-731. 30. F. Vaccarino, Moduli of linear representations, symmetric products and the non commutative Hilbert scheme, Geometric methods in representation theory. II, 437-458, Sémin. Congr., 24-II, Soc. Math. France, Paris, 2012. 31. H. Weyl, The Classical Groups, Princeton University Press, 1939.
0math.AC
arXiv:1706.07147v1 [cs.LG] 22 Jun 2017 A Useful Motif for Flexible Task Learning in an Embodied Two-Dimensional Visual Environment Kevin T. Feigelis Department of Physics Stanford University Stanford, CA 94305 [email protected] Daniel L. K. Yamins Departments of Psychology and Computer Science Stanford Neurosciences Institute Stanford University Stanford, CA 94305 [email protected] Abstract Animals (especially humans) have an amazing ability to learn new tasks quickly, and switch between them flexibly. How brains support this ability is largely unknown, both neuroscientifically and algorithmically. One reasonable supposition is that modules drawing on an underlying general-purpose sensory representation are dynamically allocated on a per-task basis. Recent results from neuroscience and artificial intelligence suggest the role of the general purpose visual representation may be played by a deep convolutional neural network, and give some clues how task modules based on such a representation might be discovered and constructed. In this work, we investigate module architectures in an embodied two-dimensional touchscreen environment, in which an agent’s learning must occur via interactions with an environment that emits images and rewards, and accepts touches as input. This environment is designed to capture the physical structure of the task environments that are commonly deployed in visual neuroscience and psychophysics. We show that in this context, very simple changes in the nonlinear activations used by such a module can significantly influence how fast it is at learning visual tasks and how suitable it is for switching to new tasks. 1 Introduction In the course of everyday functioning, animals (including humans) are constantly faced with realworld environments in which they are required to shift unpredictably between multiple, sometimes unfamiliar, tasks [4]. They are nonetheless able to flexibly adapt existing decision schemas or build new ones in response to these challenges [3]. How brains support such flexible learning and task switching is largely unknown, both neuroscientifically and algorithmically [30]. One reasonable supposition is that this problem is solved in a modular fashion, in which simple modules [2] specialized for individual tasks are dynamically allocated on top of a largely-fixed general-purpose underlying sensory representation [17]. The general-purpose representation is likely to be large, complex, and learned comparatively slowly with significant amounts of training data. In contrast, the task modules reading out and deploying information from the base representation should be lightweight and easy to learn. In the case of visually-driven tasks, results from neuroscience and computer vision suggest the role of the general purpose visual representation may be played by the ventral visual stream, modeled as a deep convolutional neural network [11, 32]. A wide variety of relevant visual tasks can be read-out with simple, often linear, decoders, based on features at combinations of levels in such networks [25]. However, how the putative ventral-stream representation might be deployed in an efficient dynamic fashion remains far from obvious. a) b) image(t): fixed visual backbone reward(t-1): 0.5 ... reward program + action history (ax , ay) agent stream {x, y} choice sampling policy reward prediction learned module touch(t): Figure 1: The Touchstream environment. a. The Touchstream environment is a simple GUIlike testbed for posing visual tasks to a continual reinforcement learning agent. It consists of two interacting components, a screen server that emits images and rewards, and an agent that accepts images and rewards and emits touch actions, e.g. positions in a two-dimensional grid of the same shape as the input image. b. The agent is a neural network with a fixed visual backbone and modules drawing on this backbone that learn to interact with the Touchstream so as to maximize long-term reward that is received. On each timestep, the agent produces an estimate of rewards in the next one or several timesteps, conditional on the action it chooses at that timestep and in the recent past, in the form of a reward heatmap. Using a simple exploration policy, the agent chooses its next action based on this heatmap. In this work, our goal is evaluate what types of module architectural motifs enable the agent to efficiently learn new Touchstream tasks. Work on lifelong (or continual) learning [21, 27], reinforcement learning [13, 18, 31], neural modules [2, 17], and decision making [5, 12] have addressed many aspects of these questions, including how to learn new tasks without destroying the ability to solve older tasks, how to parse a novel task into more familiar subtasks, and how to determine when a task is new in the first place. In this work, we investigate a somewhat different question — namely, how the local architectural motifs deployed in a module can influence how efficient a system is at learning and switching between tasks. We find that some simple motifs (e.g. low-order polynomial nonlinearities and sign-symmetric concatenations) significantly outperform more standard neural network nonlinearities (e.g. ReLus), needing fewer training examples and fewer neurons to achieve high levels of performance. Our work is situated in an embodied system [1] that is designed to capture the physical structure of the task environments that are commonly deployed in visual neuroscience and psychophysics. Specifically, we model a two-dimensional touchscreen, in which an agent’s learning must occur via interactions with an environment that emits images and rewards, and accepts touches as input. It has been shown that mice, rats, macaques and (of course) humans can operate touchscreens to learn operant behaviors [16, 24]. Building on work that has had success mapping neural networks to real neural data in the context of static visual representations [33, 6, 22], our goal is to produce models of dynamic task learning that are sufficiently concrete that they can help build bridges between general theories and architectures from artificial intelligence, and specific experimental results in empirically measurable animal behaviors and neural responses. 2 The Touchstream Environment The Touchstream environment consists of two components, a screen server and an agent, interacting over an extended temporal sequence (Fig. 1a). At each timestep t, the screen server emits an image it and a non-negative reward rt . Conversely, the agent accepts images and rewards as input and on the next timestep emits an action at in response. The action space available to the agent consists of a pixel grid of the same shape as the input image. The screen server runs a program computing it and rt as a function of the history of agent actions {a0 , . . . , at−1 }, images {r0 , . . . , it−1 } and rewards {r0 , . . . , rt−1 }. The agent is a neural network (Fig. 1b), composed of a visual backend with fixed weights, together with a recurrent module whose parameters are learned by interaction with the Touchstream (see section 3 for more details on model architectures) . This setup is meant to mimic a touch-based GUI-like environment such as those used in visual psychology or neuroscience experiments involving both humans and non-human animals [16, 24]. The screen server is a stand-in for the experimentalist, showing visual stimuli and using rewards to 2 a) stimulus-response b) match-to-sample c) localization image: or sample then match then reward map: Figure 2: Tasks. Illustration of how the taskstream environment captures a variety of tasks commonly used in visual psychophysics experiments. The top row shows the image output of the screen server, while the bottom illustrates the reward map for the task, with red indicating high reward and blue indicating low reward. a. A binary Stimulus-Response task in which the reward function is defined by associating the left half of the screen with the first class, and the right hand side of the screen with the second class. The agent recieves an image frame containing one of the two classes, and must respond by touching the image on the correct side to receive a reward. This type of SR task can be generalized to more classes by, e.g., further sectioning of the screen. b. The Match-To-Sample task displays a sample stimulus screen of a single class instance to the agent, which may be touched anywhere to proceed to the following match screen. This next screen displays several smaller images, one of which depicts the same class as the sample screen, while the rest are distractor classes. The agent is rewarded for touching within the correct class box. c. Localization is a single image containing an instance of one unique class. The agent is rewarded by first touching two opposing corners of the object, which defines a bounding box. The correct touch on the second screen depends on the action chosen on the first screen, which is indicated with a small yellow box (this box is purely illustrative and not actually part of the reward map). elicit behavior from the subject in response to the stimuli. The agent is analogous to the experimental subject, a participant who cannot receive verbal instructions but is assumed to want to maximize the aggregate reward it receives from the environment. In principle, the screen server program can be anything, encoding a wide variety of two-dimensional visual tasks or dynamically-switching sequences of tasks. In this work, we evaluate a small set of tasks analogous to those used in simple human or monkey experiments, including Stimulus-Response and Match-to-Sample categorization tasks, and object localization tasks. Stimulus-Response Tasks: The Stimulus-Response (SR) paradigm is a simple way to physically embody discrete categorization tasks that are commonly used in the animal (and human) neuroscience literature [14]. In the Touchstream environment, the N -way SR task assumes that input images are divided into N classes, and that the screen is correspondingly divided into N regions b1 , . . . , bN . A reward of 1 is returned if the agent’s touch is inside the region associated with the class identity of shown image (e.g. at ∈ bclass(it ) ), and 0 otherwise. For example, in a two-way SR discrimination task (Fig. 2a), the agent might be rewarded if it touches the left half of the screen after being shown of a dog, and the right half after being shown an image of a butterfly. The SR task can be dialed in difficulty by increasing the number of image classes or the complexity of the class regions. Multiple classes can be introduced all at once, or curricularization could be achieved by (e.g.) slowly interleaving new classes into the corpus while the reward boundaries are morphed accordingly. The present study examines the following three SR variants: two-way binary classification with left/right decision boundaries, four-way double-binary classification in which two pairs of classes define two independent left/right decision boundaries, and four-way classification in which the reward surface splits the Touchstream GUI into quarters. Image categories used are drawn from the Image-Net 2012 ILSVR classification challenge dataset [10]. Each class has 1300 unique training instances, and 50 unique validation instances. Match-To-Sample Tasks: Another common approach to assessing visual categorization abilities is the Match-To-Sample (MTS) paradigm [23]. An MTS trial is a pair of image frames (Fig. 2b). A trial begins by presenting the agent with a unique ‘sample’ screen depicting an image of a single class instance. The agent is allowed to touch anywhere within the GUI to advance to the next frame and receives no reward for this frame. Presented next is the ’match’ screen, which displays to the agent multiple small images on a blank background, each containing a fixed template image of one of N classes, one of which is of the class shown on sample screen. After this frame, the server returns 3 reward of 1 if the agent touches somewhere inside the rectangular region occupied by the image of the class shown in the first image, and 0 otherwise. The MTS paradigm incorporates the need for working memory and more localized structure. Along with standard binary discrimination, we consider variants of the MTS task which make the match screen less stereotypical, either with more distractor classes, with random vertical translations of the match images, with random interchanging of the lateral placement of the two classes, or all perturbations simultaneously (see supplementary materials for more information about specific tasks). Localization Tasks: In both the SR and MTS tasks, the reward value of a given action is independent of actions taken on previous steps. To go beyond this situation, we also explore a two-step localization task (Fig. 2c), using synthetic images containing a single main salient object placed on a complex background (similar to images used in [33, 32]). Each trial of this task has two steps, and the agent is rewarded after the second step by an amount proportionate to the Intersection over Union (IoU) value of box implied by the agent’s touches, relative to the ground truth bounding box. No reward is dispensed on the first touch of the sequence. Bounded Memory and Horizon: The tasks described above require bounded memory and have a fixed horizon. That is, a perfect solution always exists within kf timesteps from any point, and requires only knowledge of the previous kb past steps, for kb ≤ 1 and kf ≤ 2. (Specifically, kb = 0, kf = 1 for SR, kb = kf = 1 for MTS, and kb = 1, kf = 2 for localization). For more complex visual tasks such as object segmentation, these numbers will be larger (and potentially unbounded) or vary in a complex way between trials, but for the present work we avoid those complications. 3 Module Architectures In what follows, we will denote the two-dimensional pixel grid action space as A. We define a module M to be a neural network whose inputs are a history over kb timesteps of (i) the agent’s actions, and (ii) the activations of a fixed visual backbone model; and which outputs reward prediction maps across action space for the next kf timesteps. That is: MP : [Ct , ht−1 ] 7−→ (m1 , m2 , . . . , mkf ) where Ct is the history (Ct−kb , . . . , Ct ) of outputs of the backbone visual model, ht−1 is the history (at−kb . . . , at−1 ) of previously chosen actions, and each mi ∈ map(A, [0, 1]) — that is, a map from action space to reward space. P are the learnable parameters of the module network. In this work, we chose the visual backbone model be the output of the fc6 layer of the VGG-16 network pretrained on ImageNet [29]. The parameters P of the modules are learned by stochastic gradient descent on reward prediction error, with map mj compared to the true reward j timesteps after the action was taken. Having produced a reward prediction map, the agent chooses its action for the next timestep by normalizing the predictions across the action space on each of the kf timesteps into kf separate probability distributions, and sampling from the distribution in the frame that has maximum variance (see supplementary info for details). We chose this policy because it lead to better final results on our very large action space in comparison to a large variety of more standard reinforcement learning policy alternatives (e.g. -greedy), although the rank order of the comparison results reported below appeared to be robust to choice of action policy. Although the minimimal required values of kb and kf are different from the various tasks in this work, in all the investigations below, we take kb = 1 and kf = 2 — the maximum values of these across tasks — and require architectures to learn on their own when it is safe to ignore information from the past and when it is irrelevant to predict past a certain point in the future. “Obvious Solutions” The main question we seek to address here is: what architectural motif should the module MP be? The key considerations for such a module are that it should be (i) easy to learn parameters P , requiring comparatively few training examples, (ii) easy to learn from, meaning that a new task related to an old one should be able to more quickly build its module by reusing components of old ones, and (iii) general, e.g. having the above two properties for all or most tasks of interest. How should such a structure be found? As an intuition-building example, it’s useful to note that many of the tasks we address here have “obvious solutions” — that is, easily written-down analytic expressions that correctly solve the task. 4 Consider the case of a 2-way SR task like the one in Fig. 1a. Given verbal instructions describing this task, a human might solve this task by allocating a module to compute the following function: M [C](ax ) = ReLu(W C) · ReLu(−ax ) + ReLu(−W C) · ReLu(ax ) (1) where ax is the x-component of the action a ∈ A, and W is a length-|C| vector expressing the dog/butterfuly class boundary (bias term omitted for clarity). Since kb = 0 for this task, the formula doesn’t depend on previous action history h at all. Given the ability to recall W from long-term memory, this formula will allow the human to solve the task nearly instantly. In fact, even if the weight matrix is not known, imposing the structure in eq. 1 allows W to be learned quickly, as illustrated by the learning curve shown as a black line in Fig. 3. By narrowing down the decision surface considerably with a “right” decision structure, the learnable parameters of the module must simply construct the category boundary, which, for a good visual feature representation (such as VGG-16), is comparatively trivial and converges to a nearly-perfect solution extremely quickly. reward The agents modeled in the present work do not have have the language capabilities to receive verbal instruc“Obvious” formula CReZ-CReS tion that direct the allocation of “obvious” task-specific layout structures LRS so flexibly. Nonetheless, it is possiLS ble to glean a few basic ideas from this example that are generally useful (Fig. 4). First, the module has an early bottleneck; that is, the highLR dimensional general feature representation is reduced to a small number of dimensions (in this case, from 4096 to 1) before being combined with the action parameter a. Second, the module is multiplicative, in that interaction betraining trials (x 1000) tween action features and visual feaFigure 3: The “obvious” solution to a two-way SR task, using the tures involves a multiplication operformula in eq. 1, leads to the black line learning curve shown above. ation. Thirdly, the module has two Results for the more generic early-bottleneck modules motifs are sign-symmetric terms, accounting for the flip symmetry in the action-reward shown for comparison. relationship across the vertical axis. It turns out that early bottlenecks, multiplication and signsymmetry can be built into a very simple general design that can be learned entirely from scratch, leading to efficient learning not just for the binary SR task but for a variety of visual decision problems. Generic Motifs We define several possible generic motifs which implement some or all of these three basic ideas. Specifically: • The LRS Module: This is a standard MLP using a nonlinearity that concatenates a multiplicative square term to the standard ReLu nonlinearity, e.g. x 7→ ReLu(x) ⊕ x2 := RS(x) where ⊕ denotes vector concatenation. Thus, after one layer, the features are of the form ReLu(W · x + b) ⊕ (W · x + b)2 for some (learnable) tensors W, b. After two layers of the LRS motif, crossproducts emerge between the elements of the original input x. We define the (n0 , n1 , . . . , nk )-LRS module as the network which bottlenecks its input to dimension n0 , combines with actions, and then performs k LRS layers of size n1 , . . . , nk , respectively. That is, z = ReLu(W0 · C + b0 ) l1 = RS(W1 (z ⊕ a) + b1 ) li = RS(Wi li−1 + bi ) for i > 1 where Wi is of shape (ni−1 , ni ), and b is of shape ni . The core motivation for the LRS motif is that the “obvious” architecture for the SR task, described above, is special case of a (1, 2, 2)-LRS module. 5 t-2 t-1 CNN t (ax , ay) t-2 CNN t-1 t (ax , ay) Figure 4: a. Late bottleneck (LBX) module which concatenates actions directly with visual features. b. Early bottleneck module, which reduces the number of visual dimensions before action concatenation. • The LX Modules: For comparison and control, we define “LX” modules to be same as the LRS module, but with the RS activation function replaced by various other, mostly more standard, nonlinear activation functions (the “X”s). For example, we test the squaring nonlinearity by itself without the ReLu concatenated, which we denoted the LS module. We also test the ReLu nonlinearity alone, denoted as the LR module, as well as a tanh nonlinearity (the LT module), and a sigmoid nonlinearity (the LSig module). Additionally, we also test more recently explored activations such elu (the LE module) [8], and the Concatenated ReLu (the LCRe module) [28] are tested. • The LBX Modules: “Late-Bottleneck” modules using the same nonlinearities “X” as above, except actions are combined with visual features before any bottlenecking has been done. This is just a standard MLP in which actions are concatenated onto the visual features at the beginning. If the visual backbone model output is of size N , the input to such a module will be of size N + 2 per timestep, since action space A is 2D. • The CReZ-LRS Module: An LRS module where the ReLu nonlinearity in the bottleneck layer (denoted z above) is replaced by the CReLu nonlinearity defined by x 7→ ReLu(x)⊕ReLu(−x). Motivating this addition to the LRS motif, is that the symmetric nature of the “obvious” SR architecture is captured explicitly through this sign-symmetric transformation on visual features. • The CReZ-CReS Module: This uses the same CReLu bottleneck nonlinearity as above, except the RS activations in the following layers are replaced by a nonlinearity which concatenates the squares of each of the CReLu components, e.g. x 7→ ReLu(x) ⊕ ReLu(−x) ⊕ ReLu2 (x) ⊕ ReLu2 (−x) := CReS(x) The LRS motif can be seen as a subset of this module, using only the first component of the CReS nonlinearity, and whichever square term is nonzero following rectification. From the point of the Universal Approximation Theorem (UAT) [9], these motifs have equivalent expressivity, in that one could approximate (e.g.) the square non-linearity with a sufficiently large LBX module. However, the UAT makes no guarantees about learning efficiency or network size. Crucially for the results of paper, the types of nonlinearities needed to capture task demands in the Touchstream environment make some of these motifs significantly more efficient than others. 4 Experiments We compared the LRS, LX, LBX, CReZ-LRS, and CReZ-CReS modules on twelve variants of the SR, MTS, and localization tasks. Weights were initialized using the Xavier algorithm [15], and were learned using the ADAM optimizer [20] with parameters β1 = 0.9 and β2 = 0.999 and  = 1e − 8. Learning rates were optimized on a per-task per-architecture basis in a cross-validated fashion. For each architecture and task, we ran optimizations from five different weight initializations to obtain mean and and standard error due to initial condition variability. For the LBX modules, we measured the performance of modules of three different sizes (small, medium and large). Throughout, the small LBX version is equivalent in size to the small early bottleneck modules, whereas the medium and large versions are much larger. Our main results are that: 6 • Small early-bottleneck modules using the squaring operation in their nonlinearity (CReZ-CReS, CReZ-LRS, LRS, and LS) learn the tasks substantially more quickly than the other architectures at comparable or larger sizes, and often attain a higher final performance levels. • The small early-bottleneck module with the sign-symmetric early nonlinearity (LCre) is less efficient than modules with the square nonlinearity, but is substantially better than architectures with neither the early bottleneck nor the square nonlinearity. • The CReZ-CReS module, which combines the early bottleneck, the squaring nonlinearity, and sign-symmetric concatenation, is the most efficient on all but one task (Fig. 5), while the CreZ-LRS module, which is generally the second most efficient, wins in one task by a very small margin. In other words, the main features that lead the “obvious” architecture to do well in the binary SR task are both individually helpful, and combine usefully, across a variety of visual tasks. SR Experiment Details: For this task the CReZ-CReS, CReZ-LRS, LRS, LX, and small LBX architectures had 8 units per layer, while the medium and large LBX had 128 and 512 units, respectively. We find that on Stimulus-Response Tasks with left versus right decision boundaries (Fig. 5a), all models aside from the smallest LBX eventually achieve reasonably high maximum reward. Typically, we find that the (small-sized) non-squaring LX modules have performance better than the medium-sized but worse than the large-sized LBX modules, except in the case of the four-way quadrant variant of the SR task, where all non-squaring LX fail to converge to a solution within the alotted timeframe (Fig. 5b). In contrast, the small-sized CReZ-CReS, CReZ-LRS, LRS, and LS modules however learn this task with few training examples, resulting in reward prediction maps such as those in Fig. 5f (left). MTS Experiment Details: For this task the CReZ-CReS, CReZ-LRS, LRS, LX, and small LBX architectures had 32 units per layer, while the medium and large LBX had 128 and 512 units, respectively. Fig. 5c offers a glimpse at characteristic learning curves observed for more challenging tasks (e.g. a four-way MTS variant). CreZ-CReS, LRS ,and LS are seen to achieve peak performance within the initial stages of learning, whereas all other modules follow a sigmoid-like trajectory. Non-sterotyped match screens are observed to present difficulties to the small and medium LBX modules, in contrast to the squaring modules which solve these as efficiently as stationary versions while maintaining a high degree of precision (Fig. 5f, middle). We note from both MTS and SR heatmaps that at the beginning of a trial, the LRS is confident in its ability to receive a reward at time kf = 2 with zero knowledge of what the next frame may be. Localization Experiment Details: In this task the CReZ-CReS, CReZ-LRS, LRS, LX, and small LBX architectures had 128 units per layer, while the medium and large LBX had 512 and 1024 units, respectively. IoU curves in Fig. 5d show little difference between any of the LBR models despite size, and that the only models to consistently achieve an IoU above 0.4 are the CReZ-CReS, LRS, and CReZ-LRS (unshown). To give context for the IoU values, we note all of the earlybottlenecked modules are able to equal or outperform a baseline SVR trained using supervised methods to directly regress bounding boxes using the same VGG features (0.369 IoU). Inspecting the prediction heatmaps for the LRS module in this task (Fig. 5f, right) shows that the reward uncertainty frontier is well-localized. Basic Task-Switching: Next, we tested these modules under basic task-switching conditions to determine their suitability for redeployment. We chose to contrast the performance of the LRS and largest LBR modules which were both initially trained on the two-way SR task. These are then repurposed to solve the same task but with class boundaries reversed, the same task but with two entirely new categories, and the four-way double binary version. We repeat this experiment using the two-way MTS task as well. After switching, we hold all kf output map weights fixed for both models. The LRS further has its n1 and n2 layer weights fixed, whereas the LBR is tested both with and without holding its second fully-connected layer constant. In all cases the LRS is immediately able to adapt to the new class boundaries and learn the new tasks quicker than one trained from scratch (Fig. 6). Consistent with results in other contexts, the LBR module however is unable to easily use its prior experience in learning the new task, while holding its second FC layer constant actually hinders its ability to learn the new tasks. These patterns are maintained for the more complex switch to double binary task (Fig. 6b) and the Match-To-Sample task (Fig. 6c), with the large LBR model even failing to converge within the short timeframe needed to study switching behavior. In conclusion, we find that the mapping functions developed by the LRS 7 Reward a. 2-way SR b. 4-way stationary SR c. 4-way 4-shown Permuted MTS d. Localization CReZ-CReS LRS LS LR LBR-small LBR-med LBR-large Training trials (x1000) Normalized Validation AUC e. 2-way SR 1.0 4-way double binary SR 4-way stationary SR 0.9 2-way stationary MTS 0.8 2-way vert. motion MTS 0.7 2-way horiz. flip MTS 2-way motion/flip MTS 0.6 4-way 2-shown MTS 0.5 4-way 2-shown vert-motion MTS 0.4 4-way 4-shown stationary MTS 0.3 4-way 4-shown permuted MTS 2-Way SR 4-way 2-shown vert. motion MTS ll all sma ig-s m LBS LBT - d med -me LBT - LBS ig LSig -sm all LBR LT LBE -sm all LBT -larg e ig-la rge LBS d sma ll LBC Re- med -me LBE LBR - LE LR med LBC Re- e larg e LBR - rge -larg e-la LBE LBC R LS LCR e LRS CR e f. Z-C Re S CR eZLR S Localization Localization Figure 5: Learning curves. Reward obtained over the course of training for modules on a. two-way Stimulus-Response, b. four-way SR, c. four-way MTS with four randomly ordered match options, and d. Localization. Solid lines represent mean and shaded area represents standard errors, taken over training runs with different weight initializations. For clarity, only a subset of the tested nonlinearities are displayed. e. Area Under the learning Curve (AUC) for all twelve task variants of each task we implemented, normalized by the value obtained for the highest performing model. Modules are shown ordered by mean performance across tasks. f. Heatmaps for current and next time steps learned by LRS module for two-way Stimulus-Response (left), four-way two-shown Match-To-Sample with random vertical motion (center), and Localization (right). 8 4-way SR MTS Reward Binary SR LRS orig. rev. new LBR orig. v1 rev. v1 new v2 rev. v2 new Training trials (x500) Figure 6: Basic Task Switching in SR and MTS tasks when the class boundaries are either reversed or two new classes introduced. a. Binary SR task. For the binary SR task, blue line (“orig.”) is the LRS module’s original training curve, green line (“rev.”) indicates the training curve for the LRS module with reversed-class boundary after task switching, while red line (“new”) indicates the training curves for the LRS module with a new category boundary. Also shown are reversed and new boundary task switching results for late-bottleneck Relu (LBR) module, with either both FC layers in the module relearned (“v1”) or just the first layer relearned with the second layer is held fixed (“v2”). b. Analogous results for a 4-way SR task; note that no “reversed” condition exists for this task. c. Analogous results for the binary MTS task. on a base task may be rapidly transfered to new LRS modules learning tasks with similar reward functions. As yet, we have not yet tested the CreZ-CreS or CreZ-LRS modules in the task switching context, nor have we performed any experiments with task-switching in the context of the localization task. We plan to do these experiments in the near future. 5 Conclusion and Future Directions In this work, we introduced a two-dimensional embodied framework that mimics the physical setup of an experimental touchscreen environment, with the eventual goal of allowing direct comparison between learning characteristics of embodied models, and real animals in neuroscience experiments, which are necessarily embodied. We showed that simple module structures building on a fixed visual backbone can learn a selection of tasks posed during typical visual neuroscience experiments, using a basic reinforcement learning scheme. Moreover, we found that the choice of nonlinearity in the module can have significant effects on the ability of the module to learn quickly and switch tasks efficiently. This is fundamentally because, in our task space, many “natural” interactions between action space and visual features are multiplicative. To allow module structures to remain small (and thus quickly learned and repurposed for new tasks), it is useful for this natural multiplicative interaction to be directly available in the module architecture. The fact that the squared and concatenated sign-symmetric nonlinearities (LS, LRS, CreZ-LRS and CreZ-CreS) are superior to other nonlinearities in our experiments is likely tied to the spatial structure of the two-dimensional embodied environment in which it is situated. Real neuroscience or psychophysics experiments are actually embodied, and our results suggest that the nature of the embodiment might be an important consideration when making detailed models of real experimental data. However, the relevance of our results to other more general task-learning and switching situations is, by the same token, limited by the extent to which other decision and task switching processes are themselves embodied in spatial-like environments. It is very likely that other architectures are even better than CReZ-CReS. For instance, it is plausible that modules that generate convolutional weights that can be applied across images might lead to better localization results. In general, expanding to other module structures such as those as in [2, 17, 19] would be of interest. Finding a way to incorporate text inputs (that is, “experimental instructions”), would also be of significant interest: the early gap between the blue and black learning curves Fig. 3 illustrates how important the linguistic advantage remains (the late gap being due in part to the suboptimal action sampling policy used by generic architectures.) While finding better module motifs is an important task, an equally crucial future step from a purely computational point of view will be to integrate insights from this work into more full-stack continuallearning procedure. Specifically, future work will need to address issues of: more sophisticated robust task-switching beyond the very simple tests we’ve done here; when to declare a new module needed 9 (presumably when a previously stable high-confidence module suddenly stops predicting the reward); how to grow new modules in an efficient manner relative to existing modules [27, 7]; and how to consolidate modules when appropriate (e.g. when a series of tasks previously understand as separate can be solved by a single smaller structure). Though CReZ-CReS may be more effective than other motifs on the metrics we measure, that does not necessarily mean that is better description of what really happens in brains. To determine if it is, a core goal core for our future work will need to involve: • obtaining behavioral data from human and animals, and comparing it to the predictions made by the various motifs, seeing which (if any) best predicts learning rate and curve shape patterns in the data, using techniques like those deployed to match non-embodied model behavior to monkey and human behavior [24], and/or • obtaining neural data from animals and comparing response patterns to internal states of the model over learning time, extending techniques like those used in modeling the ventral visual stream [33, 32]. It will be especially interesting to compare data between two species with obviously differential levels of task learning flexibility, e.g. mice vs rats (using techniques like those in [26]) or monkeys vs humay (using techniques like those in [24]), to see whether differences in local computational circuit architecture might explain intraspecies differences. References [1] Michael L Anderson. Embodied cognition: A field guide. Artificial intelligence, 149(1):91–130, 2003. [2] Jacob Andreas, Marcus Rohrbach, Trevor Darrell, and Dan Klein. Deep compositional question answering with neural module networks. CoRR, abs/1511.02799, 2015. [3] Michael A Arbib. Schema theory. The Encyclopedia of Artificial Intelligence, 2:1427–1443, 1992. [4] Matthew M Botvinick and Jonathan D Cohen. The computational and neural basis of cognitive control: charted territory and new frontiers. Cognitive science, 38(6):1249–1285, 2014. [5] Bingni W. Brunton, Matthew M. Botvinick, and Carlos D. Brody. Rats and humans can optimally accumulate evidence for decision-making. Science, 340(6128):95–98, 2013. [6] Charles F Cadieu, Ha Hong, Daniel LK Yamins, Nicolas Pinto, Diego Ardila, Ethan A Solomon, Najib J Majaj, and James J DiCarlo. Deep neural networks rival the representation of primate it cortex for core visual object recognition. PLoS computational biology, 10(12):e1003963, 2014. [7] Tianqi Chen, Ian J. Goodfellow, and Jonathon Shlens. Net2net: Accelerating learning via knowledge transfer. CoRR, abs/1511.05641, 2015. [8] Djork-Arné Clevert, Thomas Unterthiner, and Sepp Hochreiter. Fast and accurate deep network learning by exponential linear units (elus). CoRR, abs/1511.07289, 2015. [9] George Cybenko. Approximation by superpositions of a sigmoidal function. Mathematics of Control, Signals, and Systems (MCSS), 2(4):303–314, 1989. [10] J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei. Imagenet: A large-scale hierarchical image database. In IEEE CVPR, 2009. [11] J. J. DiCarlo, D. Zoccolan, and N. C. Rust. How does the brain solve visual object recognition? Neuron, 73(3):415–34, 2012. [12] Bradley B Doll, Katherine D Duncan, Dylan A Simon, Daphna Shohamy, and Nathaniel D Daw. Modelbased choices involve prospective neural activity. Nature neuroscience, 18(5):767–772, 2015. [13] Yan Duan, John Schulman, Xi Chen, Peter L. Bartlett, Ilya Sutskever, and Pieter Abbeel. Rl$ˆ2$: Fast reinforcement learning via slow reinforcement learning. CoRR, abs/1611.02779, 2016. [14] David Gaffan and Susan Harrison. Inferotemporal-frontal disconnection and fornix transection in visuomotor conditional learning by monkeys. Behavioural Brain Research, 31(2):149 – 163, 1988. [15] Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In Aistats, volume 9, pages 249–256, 2010. 10 [16] Alexa E Horner, Christopher J Heath, Martha Hvoslef-Eide, Brianne A Kent, Chi Hun Kim, Simon RO Nilsson, Johan Alsiö, Charlotte A Oomen, Andrew Holmes, Lisa M Saksida, et al. The touchscreen operant platform for testing learning and memory in rats and mice. Nature protocols, 8(10):1961–1984, 2013. [17] R. Hu, J. Andreas, M. Rohrbach, T. Darrell, and K. Saenko. Learning to Reason: End-to-End Module Networks for Visual Question Answering. ArXiv e-prints, 2017. [18] Max Jaderberg, Volodymyr Mnih, Wojciech Marian Czarnecki, Tom Schaul, Joel Z. Leibo, David Silver, and Koray Kavukcuoglu. Reinforcement learning with unsupervised auxiliary tasks. CoRR, abs/1611.05397, 2016. [19] J. Johnson, B. Hariharan, L. van der Maaten, J. Hoffman, L. Fei-Fei, C. L. Zitnick, and R. Girshick. Inferring and Executing Programs for Visual Reasoning. ArXiv e-prints, May 2017. [20] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. CoRR, abs/1412.6980, 2014. [21] James Kirkpatrick, Razvan Pascanu, Neil C. Rabinowitz, Joel Veness, Guillaume Desjardins, Andrei A. Rusu, Kieran Milan, John Quan, Tiago Ramalho, Agnieszka Grabska-Barwinska, Demis Hassabis, Claudia Clopath, Dharshan Kumaran, and Raia Hadsell. Overcoming catastrophic forgetting in neural networks. CoRR, abs/1612.00796, 2016. [22] Lane McIntosh, Niru Maheswaranathan, Aran Nayebi, Surya Ganguli, and Stephen Baccus. Deep learning models of the retinal response to natural scenes. In Advances in Neural Information Processing Systems, pages 1361–1369, 2016. [23] Elisabeth A. Murray and Mortimer Mishkin. Object recognition and location memory in monkeys with excitotoxic lesions of the amygdala and hippocampus. Journal of Neuroscience, 18(16):6568–6582, 1998. [24] R. Rajalingham, K. Schmidt, and J. J. DiCarlo. Comparison of object recognition behavior in human and monkey. J. Neurosci., 35(35), 2015. [25] Ali S Razavian, Hossein Azizpour, Josephine Sullivan, and Stefan Carlsson. Cnn features off-the-shelf: an astounding baseline for recognition. In Computer Vision and Pattern Recognition Workshops (CVPRW), 2014 IEEE Conference on, pages 512–519. IEEE, 2014. [26] T Rogerson, J Maxey, P Jercog, T Kim, S Eisman, B Ahanonu, B Grewe, J Li, and M Schnizter. Ca1 hippocampal ensemble neural activity reveals associative representations in the hippocampus of mice acquiring a bi-conditional learning task. In Society for Neuroscience, 2016. [27] Andrei A. Rusu, Neil C. Rabinowitz, Guillaume Desjardins, Hubert Soyer, James Kirkpatrick, Koray Kavukcuoglu, Razvan Pascanu, and Raia Hadsell. Progressive neural networks. CoRR, abs/1606.04671, 2016. [28] Wenling Shang, Kihyuk Sohn, Diogo Almeida, and Honglak Lee. Understanding and improving convolutional neural networks via concatenated rectified linear units. CoRR, abs/1603.05201, 2016. [29] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. [30] Anthony D Wagner, Daniel L Schacter, Michael Rotte, Wilma Koutstaal, Anat Maril, Anders M Dale, Bruce R Rosen, and Randy L Buckner. Building memories: remembering and forgetting of verbal experiences as predicted by brain activity. Science, 281(5380):1188–1191, 1998. [31] Jane X. Wang, Zeb Kurth-Nelson, Dhruva Tirumala, Hubert Soyer, Joel Z. Leibo, Rémi Munos, Charles Blundell, Dharshan Kumaran, and Matt Botvinick. Learning to reinforcement learn. CoRR, abs/1611.05763, 2016. [32] D Yamins, H Hong, C F Cadieu, E A Solomon, D Seibert, and J J DiCarlo. Performance-optimized hierarchical models predict neural responses in higher visual cortex. Proceedings of the National Academy of Sciences, 2014. [33] Daniel LK Yamins and James J DiCarlo. Using goal-driven deep learning models to understand sensory cortex. Nature neuroscience, 19(3):356–365, 2016. 11 Supplementary Material A Datasets Four unique object classes are taken from the Image-Net 2012 ILSVR classification challenge dataset to be used in Stimulus-Response and Match-To-Sample experiments: Boston Terrier, Monarch Butterfly, Race Car, and Panda Bear. Two-way classification on these tasks uses Boston Terriers and Monarch Butterflies, except in switching experiments where the models are repurposed to classify Race Cars versus Panda Bears. A synthetic dataset containing 100,000 unique training images and 50,000 unique validation images was generated for the Localization task. This consisted of 59 unique classes of 3-D objects rendered on top of complex natural scene backgrounds. Each image is generated using a one of these objects with randomly sampled size, spatial translation, and orientation with respect to a random background. All images are preprocessed by taking a randomly cropped 224x224 segment, and subtracting the mean RGB pixel values for the 2012 ILSVR classification challenge dataset. B MTS Methods Class template images for the match screen were held fixed at 100x100 pixels. These contain a stereotypical face-centered and centrally-located example of the class in question. For all variants of the MTS task, we keep a six pixel buffer between the edges of the screen and the match images, and a twelve pixel buffer between the adjascent edges of the match images themselves. Variants without vertical motion have the match images vertically centered on the screen. For two-way classification, we make the task more challenging in three ways. We consider (i) translating each match image by a random number of pixels (but so that the image still is within the buffer), (ii) randomly flipping the horizontal location of the match images between trials, and (iii) both of these in tandem. Four-way classification has variants which either show two or four class options on the match screen. If the match screen contains two classes, they are always randomized horizontally (otherwise the agent would always be rewarded for touching a single side). In addition to this task, we also study a more challenging variant by introducing similar vertical motion as above. On four-shown variants, we can increase complexity by randomly permuting the match screen orderings between trials. C Task Evaluation Metrics Five runs per model were conducted on each task. Every 1000 training trials, the model’s performance on SR and MTS tasks was taken as the average reward obtained on the validation set. Localization calculates its reward as the Intersection over Union (IoU) value between ground truth bounding box B and predicted bounding box B̂ as IoU = Area(B ∩ B̂) Area(B ∪ B̂) No reward is given to the agent if the IoU value is below 0.5. Rewards and IoUs are averaged across runs for each model, and Area under the Curve (AUC) values were calculated using a trapezoidal integration routine on the valitidation reward trajectories. D D.1 Modules Learnable Parameter Count Table S1 lists the total number of learable parameters for each model across all three base task paradigms. "X" Architechtures include squaring, ReLu, tanh, sigmoid, and elu actvations. CReLu has a different number of parameters due to concatenation. 12 Table S1: Number of module parameters Base-task SR MTS LOC D.2 CReZCReS 66,108 269,028 1,149,828 CReZLRS 65,916 266,724 1,116,036 LRS LX LCre 65,852 265,700 1,102,222 65,756 264,548 1,084,046 65,852 265,700 1,099,652 LBXSmall 65,684 263,492 1,067,534 LBXMed 1,066,244 1,066,244 4,466,702 LBXLarge 4,461,572 4,461,572 9,457,678 LBCreSmall 65,780 264,644 1,083,140 LBCreMed 10,83140 1,083,140 4,725,764 LBCreLarge 4,725,764 4,725,764 10,500,100 Action Subsampling All modules presented use actions as features at some point within their architecture, and predict a reward for kf timesteps conditioned on these actions. At each timestep, the agent is provided with a random subsample of the complete 224x224 = 50176 pixel action space such that a ∼ U (0, 224). For SR and MTS tasks, the agent receives 1000 unique action samples, and is increased to 5000 for localization. Only these subsamples participate in reward prediction and action sampling at this timestep. The sampled action is the only one to be stored for future time steps or appear in gradient updates. Models learn by minimizing the sum of Cross Entropies of all kf predicted rewards. D.3 Action Choice Policy The output of the network at time t are kf reward maps m(x), contstructed by computing the expected reward obtained for each subsampled action, given current visual input and history Ct and action choice history ht−1 . j=N m(x) = {E [rt |aj , ht−1 , Ct ]}j=1 samples Where each expected value is calculated as E [rt |aj , ht−1 , Ct ] = X ri P (rt = ri |aj , ht−1 , Ct ) i For the present study, SR and MTS tasks have ri ∈ {0.0, 1.0}, and localization uses ri ∈ {0.0, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0} The action itself is chosen by sampling the map with the largest variance. k f at ∼ VarArgmaxj=1 {Dist[Norm[mj ]]}, where N orm[m] = m − min m(x) x∈A removes the minimum of the map, and m x∈A m(x) Dist[m] = P ensures it is a probability distribution and VarArgmax is an operator which chooses the input with largest variance. In experimenting with different exploration policies, we found that this sampling procedure was empirically superior. Random -greedy for instance is inefficient for large-action spaces, and becomes more efficient at the end of learning rather than at the beginning (an important distinction when considering task-switching). An alternate version of -greedy was devised in which it defaulted to our sampling policy rather than random choice, but performance still lacked. Other sampling policies were also attempted – such as paramaterizing the map as a Boltzmann distribution rather than weighted uniform – although this resulted in poor sampling since a larger proportion of probability mass is devoted to poor action choices. D.4 Hyperparameters Learning rates for the ADAM optimizer were chosen on a per-task basis through cross-validation on a grid between [10−4 ,10−3 ] for each architecture. Values used in the present study may be seen in Table S2. 13 Table S2: Module learning rates CReZ-CReS CReZ-LRS LRS LS LR LT LSig LE LCre LBR-small LBR-med LBR-large LBT-small LBT-med LBT-large LBSig-small LBSig-med LBSig-large LBE-small LBE-med LBE-large LBCre-small LBCre-med LBCre-large E 2-way SR 4-way swap SR 4-way stationary SR 2-way stationary MTS 2-way vertmotion MTS 2-way horiz flip MTS 2-way motion/flip MTS 4-way 2-shown MTS 10−3 10−3 10−3 10−3 10−3 10−3 10−3 10−3 10−3 10−3 10−3 10−3 10−4 10−4 10−4 10−4 10−4 10−4 10−3 10−3 10−4 10−3 10−3 10−4 10−3 10−3 10−3 10−3 10−3 10−3 10−3 10−3 10−3 10−3 10−3 10−3 10−4 10−4 10−4 10−4 10−4 10−4 10−3 10−3 10−4 10−3 10−3 10−4 10−3 10−3 10−3 10−3 10−3 10−3 10−3 10−4 10−3 10−3 10−3 10−4 10−4 10−4 10−4 10−4 10−4 10−4 10−3 10−3 10−3 10−3 10−3 10−4 5·10−4 5·10−4 10−3 10−3 10−3 10−3 10−3 10−3 10−3 10−3 10−4 10−4 10−3 10−3 10−4 10−3 10−3 10−4 10−3 10−4 10−4 10−3 10−4 10−4 5·10−4 5·10−4 10−3 10−3 10−3 10−4 10−4 10−3 10−3 10−3 10−4 10−4 10−3 10−3 10−4 10−3 10−3 10−4 10−3 10−4 10−4 10−3 10−4 10−4 5·10−4 5·10−4 10−3 10−3 10−3 10−3 10−3 10−3 10−3 10−3 10−4 10−4 10−3 10−3 10−4 10−3 10−3 10−4 10−3 10−4 10−4 10−4 10−4 10−4 5·10−4 5·10−4 10−3 10−3 10−3 10−3 10−3 10−3 10−3 10−3 10−4 10−4 10−3 10−3 10−4 10−3 10−3 10−4 10−3 10−4 10−4 10−3 10−4 10−4 5·10−4 5·10−4 10−3 10−3 10−3 10−3 10−3 10−3 10−3 10−3 10−4 10−4 10−3 10−3 10−4 10−3 10−3 10−4 10−3 10−4 10−4 10−3 10−4 10−4 4-way 2-shown vertmotion MTS 5·10−4 5·10−4 10−3 10−3 10−3 10−3 10−3 10−3 10−3 10−3 10−4 10−4 10−3 10−3 10−4 10−3 10−3 10−4 10−3 10−4 10−4 10−3 10−4 10−4 4-way 4-shown stationary MTS 5·10−4 5·10−4 10−3 10−3 10−3 10−4 10−4 10−3 10−3 10−3 10−4 10−4 10−4 10−4 10−4 10−4 10−4 10−4 10−3 10−3 10−4 10−3 10−3 10−4 4-way 4-shown permuted MTS LOC 5·10−4 5·10−4 2·10−4 2·10−4 10−3 10−4 10−4 10−3 10−3 10−3 10−4 10−4 10−4 10−4 10−4 10−3 10−4 10−4 10−3 10−4 10−4 10−3 10−4 10−4 10−4 10−4 10−4 10−4 10−4 10−4 10−4 10−4 10−4 10−4 10−4 10−4 10−4 10−4 10−4 10−4 10−4 10−4 10−4 10−4 10−4 10−4 10−4 10−4 Additional Learning Curves Learning trajectories for eight additional tasks are provided in Figure S1. Modules capable of convergence on a task were run until this was achieved, but AUC values for a given task are calculated at the point in time when the majority of models converge. 14 Reward 4-way swap SR 2-way stationary MTS 2-way vert-motion MTS 2-way horiz-flip MTS 2-way motion/flip MTS 4-way 2-shown MTS CReZ-CReS LRS LS LR LB-small LB-med LB-large 4-way 2-shown vert-motion MTS 4-way 4-shown stationary MTS Training trials (x1000) Figure S1: Learning curves. for a. four-way double binary SR, b. two-way stationary MTS, c. two-way MTS with random vertical motion, d. two-way MTS with random horizontal match image flips, e. two-way MTS with random vertical motion and horizontal flips, f. four-way two-shown MTS, g. four-way two-shown MTS with vertical motion, and h. four-way four-shown MTS with stationary ordering. 15
2cs.AI
Near-Optimal Disjoint-Path Facility Location Through Set Cover by Pairs ∗ David S. Johnson Nick Duffield arXiv:1611.01210v1 [cs.DS] 3 Nov 2016 Howard Karloff ¶ †† † Lee Breslau Yu Gu k ‡ Ilias Diakonikolas MohammadTaghi Hajiaghayi Mauricio G. C. Resende ‡‡ § ∗∗ Subhabrata Sen ‡ November 7, 2016 Abstract In this paper we consider two special cases of the “cover-by-pairs” optimization problem that arise when we need to place facilities so that each customer is served by two facilities that reach it by disjoint shortest paths. These problems arise in a network traffic monitoring scheme proposed by Breslau et al. and have potential applications to content distribution. The “set-disjoint” variant applies to networks that use the OSPF routing protocol, and the “pathdisjoint” variant applies when MPLS routing is enabled, making better solutions possible at the cost of greater operational expense. Although we can prove that no polynomial-time algorithm can guarantee good solutions for either version, we are able to provide heuristics that do very well in practice on instances with real-world network structure. Fast implementations of the heuristics, made possible by exploiting mathematical observations about the relationship between the network instances and the corresponding instances of the cover-by-pairs problem, allow us to perform an extensive experimental evaluation of the heuristics and what the solutions they produce tell us about the effectiveness of the proposed monitoring scheme. For the set-disjoint variant, we validate our claim of near-optimality via a new lower-bounding integer programming formulation. Although computing this lower bound requires solving the NP-hard Hitting Set problem and can underestimate the optimal value by a linear factor in the worst case, it can be computed quickly by CPLEX, and it equals the optimal solution value for all the instances in our extensive testbed. 1. Introduction This paper studies two new facility location problems relevant to questions of Internet traffic monitoring and content distribution. These problems differ from their more standard predecessors in that each customer must be served by two facilities rather than one. In addition, the service routes must be shortest paths and vertex-disjoint. ∗ Copyright 2016 AT&T Intellectual Property. All rights reserved. Died March 8, 2016. This work was performed when the author was an employee of AT&T Labs-Research. ‡ AT&T Labs-Research, 1 AT&T Way, Bedminster, NJ 07921. § School of Informatics, University of Edinburgh, 10 Crichton Street, Edinburgh EH8 9AB, Scotland. This work was performed when the author was a student at Columbia University, and was partially supported by AT&T. ¶ Department of Electrical and Computer Engineering, Texas A&M University, College Station, TX 77843. This work was performed when the author was an employee of AT&T Labs-Research. k Amazon Web Services, 1200 12th Avenue South, Seattle, WA 98144. This work was performed when the author was a student at the University of Massachusetts, and was partially supported by AT&T. ∗∗ Computer Science Department, University of Maryland, A.V. Williams Bldg., Room 3249, College Park, MD 20742. This work was performed when the author was an employee of AT&T Labs-Research. †† This work was performed when the author was an employee of AT&T Labs-Research. ‡‡ Amazon.com, 300 Boren Avenue North, Seattle, WA 98109. This work was performed when the author was an employee of AT&T Labs-Research. † 1 More specifically, suppose we are given a network modeled as an arc-weighted, strongly connected directed graph G = (V, A), together with sets C ⊆ F ⊆ V , where C is the set of customer locations and F is the set of potential facility locations. For each pair (c, f ), c ∈ C and f ∈ F , let P (c, f ) be the set of all shortest paths from c to f in G, which is nonempty by our strong connectivity assumption (and would be so for typical computer networks). Definition 1. Suppose c ∈ C is a customer location and {f1 , f2 } is a pair of potential facility locations in F − {c}. Then {f1 , f2 } covers c in a pathwise-disjoint fashion if there exist paths p1 ∈ P (c, f1 ) and p2 ∈ P (c, f2 ) that have no common vertex except c. Such a pair covers c in a setwise-disjoint fashion if no path in P (c, f1 ) shares a vertex (other than c) with any path in P (c, f2 ). Definition 2. A subset F 0 ⊆ F is called a pathwise-disjoint (respectively, setwise-disjoint) cover for C if, for every c ∈ C − F 0 , there is a pair {f1 , f2 } ⊆ F 0 − {c} such that {f1 , f2 } covers c in a pathwise-disjoint (respectively, setwise-disjoint) fashion. (Note that if c ∈ F 0 , we are assuming that c covers itself, and hence the set C is a valid cover for itself.) The two problems we study are defined as follows: Definition 3. In Pathwise-Disjoint Facility Location (PDFL), we are given G, C, F , and asked to find a pathwise-disjoint cover of minimum size for C. Setwise-Disjoint Facility Location (SDFL) is the same problem except that the cover must be setwise-disjoint. The Pathwise- and Setwise-Disjoint Facility Location problems arise in a variety of networking contexts. Our primary motivation for studying them comes from a scheme proposed in Gu et al. (2008) for active monitoring of end-to-end network performance, which we shall describe in Section 2. However, both variants have a simple alternative motivation in terms of an idealized content distribution problem, which we shall use to help motivate the definitions. Suppose we wish to distribute data, such as video-on-demand, over a network that connects our service hubs but does not provide a rapid method for repairing link or vertex failures. Suppose further that the service interruptions caused by such failures would be costly to us, and that we want our distribution process to be relatively robust against them. A common standard of robustness is immunity to any single vertex or link failure (as for instance might result from an accidental cable cut). To guarantee such resilience, we would need to place multiple copies of our data source in the network, but because of the costs of hosting such copies, we would like to minimize the number of such hosting sites that we deploy, rather than placing a copy of the data at each service hub. Pathwise-Disjoint Facility Location models this application as follows. The network G = (V, A) is the underlying fiber network linking various service hubs, with the directions of the arcs all reversed, so that P (c, f ) is the set of all shortest paths from f to c in the original network, rather than those from c to f . The set C of customer locations is the set of service hubs that need access to the data. The set F of facility locations is the set of potential sites where the data can be hosted, which we assume includes the service hubs and possibly other network vertices. If we assume the standard Internet default that shortest paths should be used for routing, the sets P (c, f ) now correspond to the paths in the fiber network over which we can route content from facility f to customer c 6= f . If we further assume that link capacity is not an issue, then the pathwise-disjoint cover of minimum size for C represents the minimum-cost choice of hosting locations for our data, subject to the constraint that no single vertex or link failure can disconnect a (nonfailed) service hub from all the data sources. Setwise-Disjoint Facility Location models the variant of this application in which we do not have control over the routing, but instead must rely on the network to do our routing for us. Many Internet Service Providers (ISP’s) route packets within their networks using a shortestpath protocol such as OSPF or IS-IS. In such protocols, packets must be routed along shortest paths, where the weight (length) of an arc is set by the network managers so as to balance traffic and optimize other performance metrics. If there is more than one shortest path leaving a given router for a given destination, then the traffic is split evenly between the alternatives. This can 2 be of further help in balancing traffic, and so traffic engineers may specifically set weights that yield multiple shortest paths between key routers. The actual splitting is performed based on computing hash functions of entries in a packet’s header (such as the source and destination IP addresses). These functions are themselves randomly chosen, are subject to change at short notice, and are typically not available to us. Thus when there are multiple shortest paths, although contemporaneous packets from a given router to the same destination are likely to follow the same path, the actual route chosen may not be readily predictable. All we know is that it must be a member of the set P (c, f ) of all shortest paths from c to f . This means that the only way to guarantee vertex-disjoint paths to a customer c from two facility locations f and f 0 is to restrict attention to pairs (f, f 0 ) such that the corresponding shortest path sets intersect only in c, and consequently our problem becomes a Setwise-Disjoint Facility Location problem. In this paper, we analyze the complexity of the PDFL and SDFL problems and propose and test algorithms for them. A first observation is that both problems can be viewed as special cases of Set Cover By Pairs (SCP), first described in Hassin and Segev (2005). Set Cover By Pairs (SCP): Given a ground set U of elements, a set S of cover objects, and a set T of triples (u, s, t), where u ∈ U and s, t ∈ S, find a minimum-cardinality covering subset S 0 ⊆ S for U , where S 0 covers U if for each u ∈ U , there are s, t ∈ S 0 such that (u, s, t) ∈ T . PDFL and SDFL can be formulated as SCP by taking U = C, S = F , and T = {(c, c, c) : c ∈ C} ∪ { (c, f , f ) : 1 2 c∈ / {f1 , f2 } and {f1 , f2 } covers c in a pathwise-disjoint (setwise-disjoint) fashion }. We prove, subject to a complexity assumption, that no polynomial-time algorithm can approx1− imate SCP to within a factor which is 2log n for any  > 0. The best previous hardness bound for SCP was just Set Cover-hardness (Hassin and Segev, 2005), which implies that no o(log n) approximation algorithm can exist unless P = NP (Raz and Safra, 1997). We then show that SDFL is just as hard to approximate as SCP, and that PDFL is at least as hard to approximate as Set Cover. These complexity results (assuming their widely-believed hypotheses) rule out both polynomialtime heuristics that are guaranteed to find good covers and the existence of good lower bounds on the optimal cover size that can be computed in polynomial time. Nevertheless, there still may exist algorithms and lower bounds that are useful “in practice.” In this paper we describe and experimentally evaluate our candidates for both. We test four main heuristics. Each uses as a subroutine a standard randomized greedy heuristic (Greedy) that actually solves the general SCP problem. The first of our main algorithms, Greedy(400), is the variant of Greedy that performs 400 randomized runs and returns the best solution found. The second is a genetic algorithm (Genetic) that uses Greedy as a subroutine. The third and fourth, Single Hitting Set (SHS) and Double Hitting Set (DHS), apply only in the Setwise-Disjoint case, exploiting the graph structure in ways that are unavailable to us in the path-disjoint case. The quality of the solutions that the heuristics produce can, for small instances, be evaluated by applying a commercial optimization package (CPLEXTM Version 11 in our case) to an integer programming formulation of the derived instances of SCP. This is usually feasible when |F | ≤ 150, although running times grow dramatically with graph size. For the set-disjoint case we introduce a new lower bound that exploits the graphical nature of our problem to create an instance of the Hitting Set problem (a dual to Set Cover) whose optimal solution value can be no greater than the optimal solution value for our problem. Although this lower bound can underestimate the optimal by a linear factor in the worst case, and its computation requires solving an NP-hard problem, it turns out to be easily computed using CPLEX and to give surprisingly good bounds on all our test instances. In fact, it yielded the optimal solution value for all of them, since for each instance at least one of our heuristics produced a solution whose value matched the bound. 3 Moreover, when restricted to our test instances with optimized OSPF weights, the Hitting Set solution itself was a feasible (and hence optimal) solution to our original problem. For the PathDisjoint case, our only lower bound is the comparatively weak one of considering the variant of the problem where we drop the requirement that the paths be shortest paths. The optimum for the resulting problem can be computed in linear time, but is substantially below the optimal PDFL solution, where the latter can be computed. However, for these instances, it at least shows us the penalty imposed by our restriction to shortest paths. For larger instances, we can use our Genetic algorithm to provide some idea of how much we might be able to improve on Greedy(400) if time were not an issue. A final algorithmic challenge was that of constructing the derived SCP instances needed by all our heuristics. This involves exploiting shortest path graphs to determine the (often quite large) sets of relevant triples. Significant algorithmic ingenuity is needed to prevent this computation from being a major bottleneck, and we will describe the mathematical observations and algorithmic techniques that make this possible. 1.1. Outline The remainder of the paper is organized as follows: In Section 2 we describe the network monitoring application that motivated our study. In Section 3 we present our complexity results. In Section 4 we present the lower bounds we use for evaluating our cover-creating heuristics, and our algorithms for computing them. This includes the integer programming formulations for computing the true optima for our problems from their Cover-by-Pairs formulations. In Section 5 we describe the heuristics we have devised, as well as the (nontrivial) algorithms we use to convert our problems to their Cover-by-Pairs formulations. Our test instances are described in Section 6, and our experiments and their results are summarized in Section 7. We conclude in Section 8 with a discussion of further research directions, including preliminary results for significant variants on our problems, such as the cases where not all members of C need be in F , and where facility locations have costs and we wish to find a minimum-cost cover. 1.2. Related Work This paper is, in part, the journal version of a conference paper (Breslau et al., 2011). However, it contains substantial amounts of new material, including the new SDFL lower bound and related algorithms, a faster version of the Genetic algorithm, details of the omitted proofs, key implementation details of our algorithms, and more detailed experimental results and analysis, including an expansion of the experimental testbed to contain significantly larger synthetic and real-world instances. The only previous work on Set Cover by Pairs, as far as we know, is that of Hassin and Segev (2005), which is theoretical rather than experimental. That paper considers two applications that were significantly different from those introduced here, and, from a worst-case point of view, much easier to approximate. The paper also introduces a variant of the Greedy algorithm studied here for the general SCP problem and analyzes its (poor) worst-case behavior. 2. Our Motivating Application: Host Placement for End-to-End Monitoring In this section, we describe the monitoring application of Gu et al. (2008) that motivated this paper, an application that is more realistic than the content distribution application mentioned in the previous section, but also more complicated. We describe it in some detail here to better motivate our study, and also to present a key new lemma that is actually needed to guarantee that the proposed monitoring scheme provides valid results. Suppose we are an Internet Service Provider (ISP) and provide “virtual private network” (VPN) service to some of our customers. In such a service, we agree to send traffic between various locations 4 specified by the customer, promising to provide a certain level of service on the connections, but not specifying the actual route the packets will take. (The actual routing will be done so as to optimize the utilization of our network, subject to the promised levels of service.) Our network is a digraph G = (V, A), in which the vertices correspond to routers and the arcs to the links between routers. A key service quality metric is packet loss rate (the fraction of packets on a path that fail to reach their destination). Let p(r1 , r2 ) denote the probability that a packet sent from router r1 to router r2 will successfully arrive. Our goal is to obtain estimates for p(ri , rj ) for a collection of customer paths Pri ,rj . Note that, in contrast to our content distribution application, we here do not worry about links’ failing (which would cause re-routing), but merely about their underperforming. One way to measure the loss rate on the path in our network from router r1 to router r2 is to attach extra equipment to the routers, use the equipment at r1 to send special measurement packets to r2 , and use the equipment at r2 to count how many of the packets arrive. If N packets are sent and N 0 arrive, then N 0 /N should be a good estimate for p(r1 , r2 ), assuming N is sufficiently large. Unfortunately, the process of authorizing, installing, and maintaining the extra equipment can be time-consuming and expensive. Thus, this scheme may not be practical in a large network with hundreds or thousands of distinct path endpoints. For this reason, Gu et al. (2008) proposed an alternative scheme that may yield a substantial reduction in the total amount of monitoring equipment needed. Figure 1: The centralized monitoring scheme of Gu et al. (2008). In this new scheme, all the monitoring is initiated from a single special measurement vertex M , as originally proposed in Burch and Chase (2005) and Breslau et al. (2006). See Figure 1. To measure loss on the path from vertex r1 to vertex r2 , the equipment at M sends a packet on a circular path that first goes from M to r1 (the hop-on path), then traverses the path from r1 to r2 , and finally returns from r2 to M (the hop-off path). Let us make the following assumptions: 1. Packets are only dropped by arcs, not by vertices. (This is a close approximation to reality in modern-day networks, where an arc models the system consisting of the physical wire/fiber connecting its endpoints, together with the line card at each of its ends.) 2. The three paths PM,r1 , Pr1 ,r2 , and Pr2 ,M are pairwise arc-disjoint. (As we shall show below, this will typically be true under shortest-path routing.) 3. Loss rates on different arcs are independent of each other. (This is somewhat less realistic, but is approximately true except in heavily-loaded networks.) Then if N packets are sent on the circular path PM,r1 ,r2 ,M , the expected number N 0 of packets successfully making the roundtrip will be N 0 = N p(M, r1 )p(r1 , r2 )p(r2 , M ). Thus if we measure N 0 and have good estimates for p(M, r1 ) and p(r2 , M ), we will have the estimate p(r1 , r2 ) = N 0 /N . p(M, r1 )p(r2 , M ) 5 Figure 2: Scheme of Gu et al. (2008) for measuring loss rate of hop-on and hop-off paths. Thus we have reduced the problem of measuring the loss rates for a collection of paths between arbitrary vertices to that of measuring the loss rates on a collection of round-trip paths and estimating the loss rates for a collection of hop-on and hop-off paths, all of which either begin or end at M . Breslau et al. (2006) proposed that these loss rates for a given path endpoint r be estimated by sending packets along an (M, r, M )p circuit and, if, here, N packets were sent and N 0 received, concluding that p(M, r) = p(r, M ) = N 0 /N . Unfortunately, this assumes that Internet performance is symmetric, which it definitely is not. A quite accurate way to measure the loss rates would of course be to put equipment at both ends of each of the hop-on and hop-off paths, but this method would require installing equipment at just as many routers as in the original scheme for measuring the Pr1 ,r2 paths directly – indeed at one more vertex, since now we need equipment at M . Setwise- and Pathwise-Disjoint Facility Location arise in the context of a “tomographic” method proposed by Gu et al. (2008) for estimating loss rates on hop-on and hop-off paths in a potentially much more efficient fashion. In terms of the facility location problems, the set C of “customer” vertices will consist of the endpoints of the original paths whose loss rates we wish to estimate. The set F of “facility locations” will be these plus those additional vertices that are capable of hosting monitoring equipment. In this context, we will call F the set of (potential) monitoring vertices. Assuming as before that we are in a shortest-path routing regime such as OSPF or IS-IS, the set P (r, m) is the set of all legal routes from r to m. We have already observed that, if we install equipment at r itself, it is straightforward to estimate the loss rates p(M, r) (for the hop-on path to r) and p(r, M ) (for the hop-off path from r) – simply send packets between M and r and counting the number of them that successfully arrive at their destinations. Suppose r is a path endpoint without equipment and (m1 , m2 ) is a pair of monitoring vertices that cover r in a pathwise-disjoint fashion. We will now explain how, by installing monitoring equipment at m1 and m2 , we can estimate both loss rates. See Figure 2. Assuming we are allowed to specify the routing paths from r to m1 and m2 , the fact that m1 and m2 cover r in a pathwise-disjoint fashion means that we can pick legal routing paths P1 and P2 from r to m1 and m2 , respectively, that are vertex-disjoint except for r (and hence arc-disjoint). Moreover, as we shall see, we also have that the two paths P1 and P2 are arc-disjoint from the path P from M to r, which itself is arc-disjoint from the path P 0 from r to M (under reasonable assumptions). This is a consequence of the following lemma, whose additional assumptions have to do with the arc weights used by OSPF and IS-IS in their shortest path computations. These weights are set by traffic engineers to help balance traffic loads and normally obey certain restrictions. First, they are positive integers. Second, in practice networks are typically symmetric directed graphs, in that the 6 Figure 3: Illustration for proof of Lemma 1. digraph contains an arc (a, b), then it must also contain arc (b, a), and we assume that the weights w for our digraph are themselves symmetric, in that for every arc (a, b), we have w(a, b) = w(b, a). In real world networks, the weights typically are symmetric, and even networks with asymmetric weights have very few arcs where w(a, b) 6= w(b, a). Lemma 1. Suppose we are given a symmetric directed graph G = (V, A), a weight function w on the arcs that is symmetric and positive, and three vertices a, b, c. If Pa,b and Pb,c are shortest-weight paths in this digraph from a to b and b to c, respectively, then they are arc-disjoint. Proof. Suppose that, contrary to the Lemma, Pa,b and Pb,c share a common arc (x, y). Then the path Pa,b can be broken up into a path Pa,x followed by arc (x, y) followed by a path Py,b , where a and x may possibly be the same node, as may y and b. Similarly the path Pb,c can be broken up into a path Pb,x followed by arc (x, y) followed by a path Py,c . See Figure 3. Note that each of the subpaths of these paths must themselves be shortest paths between their endpoints since the overall path is itself a shortest path. For instance the path Px,b that is the concatenation of (x, y) with Py,b is a shortest path from x to b. Let us extend the definition of w to paths P by letting w(P ) be the sum of the weights of the arcs in P . Then, for instance, w(Px,b ) = w(x, y) + w(Py,b ). If we let Pb,y be the path from b to y obtained by reversing the path Py,b , then, since weights are symmetric, we must have w(Pb,y ) = w(Py,b ) = w(Px,b ) − w(x, y) = w(Pb,x ) − w(x, y). But now consider the path from b to c obtained by concatenating the two paths Pb,y and Py,c . It has length w(Pb,y ) + w(Py,c ) = w(Pb,x ) − w(x, y) + w(Py,c ). On the other hand, by hypothesis, the shortest path from b to c has length w(Pb,x ) + w(x, y) + w(Py,c ), and is hence 2w(x, y) longer than the length of this Pb,y plus Py,c path. Since by hypothesis w(x, y) > 0, this is a contradiction.  The basic idea of the technique of Gu et al. (2008) for estimating the loss rate p(M, r) using these paths is to send multicast packets from M to r along path P , replicate them at r, and then send the copies along paths P1 and P2 to m1 and m2 , respectively. After this, m1 and m2 report back to M (using a guaranteed-delivery service such as TCP) as to which packets arrived. Based on this information, M estimates p(M, r). The loss rate p(r, M ) can be estimated by sending packets along the (M, r, M ) loop and counting the number that arrive back at M , using the fact that the 7 loss rate for the loop should be p(M, r)p(r, M ). (We note that a result like Lemma 1 is needed if this method is to provide reliable estimates, a fact not observed in Gu et al. (2008), which contained no such result.) This scheme may require two monitoring hosts to measure the hop-on and hop-off rates for a path endpoint r, rather than the single one that would be required if we placed the monitoring equipment at vertex r itself. However, the scheme has the potential advantage that a given monitoring vertex can be re-used to handle many different path endpoints. Thus there could be a substantial net overall savings in the total number of monitoring vertices used, and hence in equipment and operational cost. As stated, the problem of finding a minimum-sized set of monitoring vertices at which to place equipment so that we can estimate loss rates for all hop-on and hop-off paths is simply our original Pathwise-Disjoint Facility Location problem. In practice, however, we will most-likely have to rely on the ISP’s routing protocol (OSPF or IS-IS) to deliver our packets, and so, as with our the first application, will face the Setwise-Disjoint Facility Location problem. It should be noted that, in contrast to that first application, the necessity for vertex-disjoint paths from r to m1 and m2 , rather than simply arc-disjoint paths, is less clear, since by the previous lemma we can only guarantee that these paths are arc-disjoint from the path from M to r. This is a meaningless distinction in the Setwise-Disjoint case, however, in light of the following lemma. Lemma 2. Suppose P (c, f ) and P (c, f 0 ) are the sets of all shortest paths from vertex c to vertices f and f 0 , respectively, in a given digraph G. Then no path in P (c, f ) shares an arc with any path in P (c, f 0 ) if and only if no path in P (c, f ) shares a vertex other than c with any path in P (c, f 0 ). Proof. The no-shared-vertex case trivially implies the no-shared-arc case, so let us assume that there are no shared arcs and argue that there are also no shared vertices other than c. Suppose there were a shared vertex x 6= c. Then there is a shortest path P from c to f that is the concatenation of a path Pc,x from c to x with a path Px,f from x to f , both themselves shortest paths, and a 0 from c to x with a path P 0 shortest path P 0 from c to f 0 that is the concatenation of a path Pc,x x,f 0 0 0 must have the same from x to f , both themselves shortest paths. But then the paths Pc,x and Pc,x 0 length. Thus the path P 00 that is the concatenation of Pc,x with Px,f 0 is a shortest path from c to 0 0 f , and must be contained in P (c, f ). Moreover, since x 6= c, the path Pc,x contains at least one arc a. Thus the path P 00 ∈ P (c, f 0 ) shares the arc a with the path P ∈ P (c, f ), a contradiction.  A detailed description of the implementation of this scheme and the formulas used for estimating p(M, r) and p(r, M ) is presented in Gu et al. (2008). 3. Complexity In this section we investigate the computational complexity of Pathwise- and Setwise-Disjoint Facility Location, covering both general hardness results and a polynomial-time solvable special case. 3.1. Hardness of Approximation We first observe that the more general Set Cover by Pairs problem is not only NP-hard, but also strongly inapproximable in the worst-case. Let n = |U |. Hassin and Segev (2005) observed that SCP is at least as hard to approximate as Set Cover, which cannot be approximated to within a o(log n) factor unless P = NP (Raz and Safra, 1997). We can prove much a stronger inapproximability result (albeit with a slightly stronger complexity assumption). Theorem 3. If NP 6⊆ DTIME(nO(polylog(n)) ), no polynomial-time algorithm can be guaranteed to 1− find a solution to SCP that is within a factor of 2log n of optimal for any  > 0. 8 Proof. The theorem follows via an approximation-preserving transformation from the MinRep problem of Kortsarz, who showed the above inapproximability bound to hold for MinRep (Kortsarz, 2001). The reader may readily confirm that, for the type of approximation bound being proved here, it suffices for the transformation to provide a one-to-one correspondence between solutions for the source and target instances (and their values) and take polynomial time (which also causes the blow-up in the size of the constructed instance to be bounded by a polynomial). In MinRep, we are given a bipartite graph G with vertex set V = A ∪ B and edge set E, where |A| = |B| = kq for positive integers k, q, together with partitions of the vertex sets on each side of the bipartite graph into k groups of q vertices, A1 through Ak on the left and B1 through Bk on the right. We are also given an integer K. We ask whether there is a subset V 0 ⊆ V with |V 0 | ≤ K such that for every pair (Ai , Bj ), 1 ≤ i, j ≤ k, if G contains an edge between a vertex in Ai and one in Bj , then so does the subgraph induced by V 0 . We transform MinRep to SCP by letting the items to be covered be the pairs (Ai , Bj ) where G contains an edge between a member of Ai and a member of Bj . The set of covering objects is V , with the item (Ai , Bj ) covered by all pairs {u, v} ⊆ V in which u ∈ Ai , v ∈ Bj , and (u, v) ∈ E. There is then a one-to-one correspondence between SCP cover sets and subsets V 0 meeting the MinRep requirements, with the two sets having the same size. Hence any approximation guarantee for SCP implies an equally good guarantee for MinRep, and so SCP must be at least as hard to approximate.  Theorem 4. The special cases PDFL and SDFL retain much of the complexity of SCP: 1. SDFL is at least as hard to approximate as SCP. 2. PDFL is at least as hard to approximate as Set Cover. Proof. We shall initially prove the results without the restriction that C ⊆ F , and then sketch how the proofs can be modified (by appropriate replication) to enforce the restriction. For Claim 1, we will show how to transform an arbitrary instance of SCP into an equivalent instance of SDFL. Suppose the given instance of SCP consists of sets U = {u1 , . . . , up } and S = {s1 , . . . , sq } and relation T ⊆ U × S × S. By the definition of SCP, we may assume without loss of generality that if (u, si , sj ) ∈ T , then i ≤ j. In the corresponding instance of SDFL, there are four types of vertices. 1. For each u ∈ U , a customer vertex cu ∈ C. 2. For each u ∈ U , a connector vertex xu . 3. For each s ∈ S, a facility location vertex fs ∈ F . 4. For each pair (si , sj ), 1 ≤ i < j ≤ q, a pair vertex vsi ,sj . There are four types of edges, all having length 1. (The constructed digraph is symmetric, so instead of constructing both (a, b) and (b, a), we just construct one undirected edge {a, b}.) 1. For each customer vertex cu ∈ C, an edge {cu , xu }. 2. For each connector vertex xu and each facility location vertex fs , an edge {xu , fs }. 3. For each pair (si , sj ), i < j, an edge between cu and vsi ,sj unless (u, si , sj ) ∈ T . 4. For each pair (si , sj ), 1 ≤ i < j ≤ q, the two edges {vsi ,sj , fsi } and {vsi ,sj , fsj }. We claim that F 0 ⊆ F is a feasible cover for the constructed SDFL instance if and only if = {s : fs ∈ F 0 } is a feasible cover for the original SCP instance. Note that in the constructed digraph, there is a path of length two between each customer vertex cu and each facility location vertex fsi , i.e., hcu , xu , fsi i, and this is the shortest possible path. Thus P (cu , fsi ) consists precisely S0 9 of this path, together with all paths hcu , vsi ,sj , fsi i where i ≤ j and (u, si , sj ) ∈ / T and all paths hcu , vsj ,si , fsi i where i > j and (u, sj , si ) ∈ / T . Thus the only vertex that a path in P (cu , fsi ) can possibly share with a path in P (cu , fsj ), i ≤ j, other than cu itself, is vsi ,sj , which will be in shortest paths from cu to fsi and to fsj if and only if (u, si , sj ) ∈ / T . Hence a pair {si , sj } will cover an element u in the SCP instance if and only if the pair {fsi , fsj } jointly covers the customer vertex cu in the constructed SDFL instance, so the optimal solution values for the two instances coincide. To get an equivalent instance in which C ⊆ F , we replicate the above construction |S| + 1 times, while, for each s ∈ S, identifying the |S| + 1 copies of vertex fs . We then add the |S| + 1 copies of each customer vertex cu to F to obtain a new set F+ of facilities, one that now contains all the customer vertices in our expanded instance. Let F 0 be an optimal solution to our original instance. Note that it remains an optimal solution to the expanded instance. Thus if F+0 is an optimal solution to this new instance, we must have |F+0 | ≤ |F 0 | ≤ |F | = |S| < |S| + 1. Thus at least one of the |S| + 1 copies of our original instance fails to have any of its customer vertices in F+0 . This implies that F ∩ F+0 must be a feasible solution for that copy, and so |F+0 | ≥ |F 0 |. But this implies that |F+0 | = |F 0 |. So the optimal solution value for our expanded instance still equals that for the original instance of SCP. Moreover, the expanded instance can be constructed in polynomial time and has size within a polynomial factor of the size of the original SCP instance. Hence the inapproximability result for SCP carries over to SDFL. For Claim 2, we again prove the result without the restriction that C ⊆ F . The extension to the case where the restriction holds follows by a replication construction similar to that given in the proof of Claim 1. Our transformation is from Set Cover, which we already know cannot be approximated to within a o(log n) factor unless P = NP (Raz and Safra, 1997). Given a Set Cover instance, we construct an instance of PDFL whose optimal solution differs from the optimal solution to the Set Cover instance by at most 1. Thus a polynomial-time o(log n) approximation for our problem would imply one for Set Cover. An instance of Set Cover consists of a ground set U = {u1 , . . . , un } and a collection C = {C1 , . . . , Cm } of subsets of U . Assume without loss of generality that ∪C∈C C = U . Our constructed graph has four types of vertices: 1. For each i, 1 ≤ i ≤ n, a customer vertex ci ∈ C. 2. For each i, 1 ≤ i ≤ n, a connector vertex xi . 3. For each j, 0 ≤ j ≤ m, a potential facility vertex fj ∈ F . Note that f0 is an added facility, not corresponding to any member of C. 4. A universal connector vertex x0 . There are four types of (undirected) edges, all having length 1: 1. For 1 ≤ i ≤ n, an edge {ci , xi }. 2. For each i, j, 1 ≤ i ≤ n and 1 ≤ j ≤ m, such that ui ∈ Cj , an edge {xi , fj }. 3. For each i, 1 ≤ i ≤ n, an edge {ci , x0 }. 4. For each j, 0 ≤ j ≤ m, an edge {x0 , fj }. Note that for each pair i, j, 1 ≤ i ≤ n and 1 ≤ j ≤ m, there is a path of length two from ci to fj through x0 , and this is the shortest possible path. Thus for each such i, j, P (ci , fj ) contains only paths of length two. More precisely, by construction, if ui ∈ / Cj it contains just the path hci , x0 , fj i, and otherwise it contains that path plus the path hci , xi , Cj i. Suppose first that C 0 is a feasible solution to our Set Cover instance. Then it is easy to see that {f0 } ∪ {fj : Cj ∈ C 0 } is a feasible solution for our problem. Each ci is covered by f0 and an fj such that ui ∈ Fj , which must exist because C 0 is a cover. Thus the optimum for our constructed instance is at most one more than the Set Cover optimum. 10 Conversely, suppose that F 0 ⊆ F is a feasible solution for our constructed instance. For each customer vertex ci , there must be at least one vertex in F 0 that does not equal f0 , and so F 0 − {f0 } must be a set cover for the original instance. Thus the optimum for the original instance is at most the optimum for our constructed instance. As in the proof of Claim 1, we can now, by replication, construct an instance of PDFL where all customers are facilities, and the optimum value remains unchanged. Consequently, the two optima are within one of each other, which implies that a polynomial-time algorithm with o(log n) approximation guarantee for PDFL would yield one for Set Cover as well.  3.2. The Special Case of Trees In this section, we consider networks derived from trees, where for a given tree T = (V, E) the corresponding network is the symmetric directed graph G = (V, A), with both (u, v) and (v, u) in A whenever {u, v} ∈ E. We first note that, for such instances, the two problems PDFL and SDFL coincide. This follows from the fact that for every ordered pair v, w of vertices, there is exactly one simple path from u to v, which is of course the shortest path, and so the shortest path is unique. More interestingly, the problems can be solved in polynomial (in fact, linear) time. Indeed, the optimal solution has a simple combinatorial characterization, and can be constructed by a simple tree traversal. Theorem 5. The following procedure constructs an optimum cover under PDFL. 1. While T contains a leaf vertex v that is not a customer, delete v. 2. Return the set F ∗ of leaves of the residual tree as our cover. Proof. Note that in the residual tree, all leaves are customers and hence facility locations, so F ∗ ⊆ F , as required. Every customer in F ∗ is already covered by itself. If there is any customer v ∈ / F ∗ , it must be an internal vertex of the residual tree, and hence there must be at least two edges incident on v in the residual tree. Each such edge must lie on a path to a leaf of the residual tree, and those paths can contain no common vertex other than v because we are dealing with a tree. But all leaves of the residual tree are in F 0 , so this means that v has vertex-disjoint shortest paths to at least two members of F 0 and hence is covered by F 0 .  4. Algorithms The complexity results of the previous section rule out (assuming widely-believed hypotheses) both polynomial-time heuristics that are guaranteed to find good covers and the existence of good lower bounds on the optimal solution value that can be computed in polynomial time. Nevertheless, there still may exist algorithms and lower bounds that are useful “in practice.” In this section and the next, we describe our candidates for both, beginning with lower bounds, which provide us with a standard of comparison for evaluating the quality of the solutions our heuristics provide. 4.1. Optimal Solutions Using Mixed Integer Programming. The best standard of comparison is, of course, the optimal solution value. It is feasible to compute this for small instances using mixed integer linear programming, by essentially viewing our instances of PDFL and SDFL as Set Cover by Pairs instances, modified to account for the fact that a customer, in its role as a facility, can cover itself. This allows us to leverage general purpose commercial software for solving our problems. Our MIP formulation is simple and straightforward. It has a zero-one variable xf for each facility f ∈ F , where xf = 1 if f is chosen for our cover. In addition, we have a real nonnegative variable yf,f 0 for each pair {f, f 0 } of facilities, subject to the constraints that yf,f 0 ≤ xf and yf,f 0 ≤ xf 0 . Note that these together imply that yf,f 0 can be positive only if both xf and xf 0 equal 1 (i.e., are 11 in the chosen cover). To guarantee that the chosen set is a cover, we have the following constraints, one for each facility c ∈ C. X yf,f 0 ≥ 1 (1) xc + 0 0 f,f :{f,f } covers c where “covers” is interpreted as “covers in a path-disjoint fashion” P for PDFL and as “covers in a set-disjoint fashion” for SDFL. The goal of our MIP is to minimize f ∈F xf . We derive the MIP instances from the corresponding PDFL/SDFL instances using the “triple generation” algorithms described at the end of this section, and then attempt to solve them using the version 11.0 CPLEXTM MIP solver. This MIP approach proved practical for a wide range of “small” instances, enabling us to find optimal solutions to all but two of the instances in our test set with |F | ≤ 150. Our detailed experimental results will be summarized in Section 7. 4.2. A Hitting Set Lower Bound For larger instances of the set-disjoint variant of our problem (SDFL), our standard of comparison is derived from a new lower bound, based on the construction of a special instance of the NP-hard Hitting Set problem that CPLEX finds it particularly easy to solve. The bound depends on the following simple lemma. Lemma 6. Suppose G = (V, A) is an arc-weighted directed graph, and u, v, w are distinct vertices in V . Let Pv be a shortest path from u to v, and let x be the first vertex encountered on this path. If there is a shortest path Pw from u to w that shares a common vertex other than u with Pv , then there is a shortest path Pw0 from u to w that contains x. Proof. Let y be the first vertex in Pw , other than u, that is also in Pv . If y = x, we are done, so suppose not. Divide Pv into subpaths Pv,1 from u to y and Pv,2 from y to v. Note that x remains the first vertex encountered in Pv,1 . Similarly divide Pw into subpaths Pw,1 from u to y and Pw,2 from y to w. Note that all these paths must be shortest paths from their sources to their destinations. Thus, in particular, Pv,1 and Pw,1 must have the same length since they are both paths from u to y. Hence, the concatenated path Pw0 = Pv,1 Pw,2 must be a shortest path from u to w, and it contains x.  For a given customer c, let N (c) denote the set of all vertices x such that (c, x) ∈ A – the neighbors of c. For each facility f 6= c, let N (c, f ) be that subset of nodes of N (c) that are included on shortest paths from c to f . As a consequence of Lemma 6, a pair {f1 , f2 } will cover c in a setwise-disjoint fashion if and only if N (c, f1 ) ∩ N (c, f2 ) is empty. Thus a necessary (although not T sufficient) condition for F 0 ⊆ F to contain a pair {f1 , f2 } that covers c is that f ∈F 0 N (c, f ) = ∅. We can use this observation to construct an integer program whose feasible set contains all legal setwise-disjoint covers, and hence whose optimal solution provides a lower bound on the size of the optimal set-disjoint cover. As in the MIP for an optimal solution, we have zero-one variables xf for P all f ∈ F , with xf = 1 meaning that facility f is in our chosen cover, and we wish to minimize f ∈F xf . Now, however, these are the only variables, and we have a different type of constraint, one for each pair of a customer c and a neighbor x of c: X xc + xf ≥ 1. (2) f 6=c and x∈N / (c,f ) This IP can be viewed as a “Hitting Set” problem, where a facility “hits” a pair (c, x) if x∈ / N (c, f ) or if f = c. For this reason, we call the optimal solution to the IP the hitting set lower bound (HSLB). It is easy to see that computing this bound is NP-hard. Thus its computation is likely to require exponential time in the worst case, and our SDFL hardness of approximation result, which only applies to polynomial-time algorithms, is not applicable. Nevertheless, the Hitting Set Lower Bound can be quite bad: In the worst case it can underestimate the optimal solution value 12 Figure 4: Instances where the HSLB underestimates the optimal cover size by a factor of n/3. by a linear factor. See Figure 4, which depicts a scheme for instances where the HSLB is too low by a factor of n/3. In this figure there are n + 3 facility vertices, f1 , f2 , f3 , plus the customer vertices c1 through cn , together with three additional vertices (v1 , v2 , v3 ) that are the neighbors of the customer vertices. Each (undirected) edge in the figure represents a pair of oppositely directed arcs of length 1. Note that for each neighbor vertex v, there is one of the fi whose shortest paths from the customer vertices ci do not contain v. Thus, for n > 3, the solution to the HSLB integer program is the set {f1 , f2 , f3 }, for a lower bound of 3. On the other hand, for each ci and each pair of facilities {fj , fk } ⊆ {f1 , f2 , f3 }, we have N (ci , fj ) ∩ N (ci , fk ) 6= ∅ since it contains one of the neighbor vertices. Thus no pair of these vertices covers any customer vertex. In addition, for any customer vertex ch other than ci , all three neighbor vertices are on shortest paths from ci to ch , so no other customer vertex can help cover ci either. Thus all the customer vertices must cover themselves, and hence the optimal cover has size n. Fortunately, the kind of structure occurring in Figure 4, where |N (c, f )|/|N (c)| = 2/3 for all customer/facility pairs, does not tend to occur in practice. Because of the way networks are designed and the way OSPF weights are typically set, the number of shortest path ties is typically limited, and the ratios |N (c, f )|/|N (c)| are much smaller. In part because of this, the hitting set lower bound is quite good in practice. Indeed, as we shall see in Section 7, the HSLB equaled the optimal solution value for all our SDFL test instances. The solution to the IP was also often a feasible (and hence optimal) solution to the original SDFL instance. Moreover, the hitting set instances themselves turn out to be relatively easy for CPLEX to solve, so we were able to obtain HSLBs for all our SDFL test instances in reasonable time, and usually get optimal solutions as a welcome side-effect.. In light of these observations, we will also include our HSLB code in our comparisons of solution-finding heuristics, albeit one that either produces an optimal solution or no solution at all. 4.3. An Unconstrained Path-Disjoint Lower Bound The previous lower bound applied only to the set-disjoint variant of our problem, and required a linear programming package to compute. For the path-disjoint variant (PDFL), the best polynomialtime computable lower bound we currently have is not nearly as strong in practice, but can be computed in linear time. It applies only to networks that are symmetric directed graphs and hence can be modeled as undirected graphs, but, as remarked above, most real world networks have this property. It equals the minimum cover size for the variant of PDFL where we drop the constraint 13 Figure 5: Decomposition into biconnected components. that our paths be shortest paths, and only insist that they be vertex-disjoint. Let us call the task of finding such a cover as the unconstrained path-disjoint facility location problem (UPDFL). The algorithm for solving the UPDFL problem relies on three observations. 1. Any undirected graph can be decomposed in linear time into its 2-connected components, the resulting structure being treelike, with the 2-connected components playing the role of vertices. (See Figure 5.) 2. If our network is 2-connected, then any pair of facility locations in it will cover all the customers it contains. 3. We already have an easily modifiable algorithm for PDFL on trees (see Section 3.2). The first observation is attributed to Hopcroft in (Aho et al., 1974), which describes the algorithm in detail. To see the tree structure more clearly, call a vertex an articulation point if deleting it from the graph breaks the graph into two or more separate connected components, and consider the graph t(G) derived from G as follows. The vertices of t(G) are the leaves, the articulation points, and for each 2-connected component C, a new vertex vC representing the component. The edges consist of all original edges that did not connect two vertices in the same 2-connected component, together with edges {u, vC } for every pair of an articulation point v and a 2-connected component C that contains it. This graph cannot contain a cycle. If it did, such a cycle would have to contain at least two vertices, each representing either a vertex not in any 2-connected component or a maximal 2-connected set. However, the existence of the cycle would imply that the set consisting of all the vertices and 2-connected components represented in the cycle would itself be 2-connected, a contradiction. Thus t(G) has no cycles, and is a connected graph since by assumption G is. Hence it is a tree. The proofs of observations (2) and (3) go as follows: Proof of Observation 2. By definition, if a graph G is 2-connected and u and v are distinct vertices of G, then G contains two paths joining u to v whose only common vertices are u and v themselves. Let u and v be two facility locations in our 2-connected graph G, and let c be a customer vertex in G. If c ∈ {u, v} we are done, so we assume it is distinct from both. Let P1 (u) and P2 (u) be two vertex-disjoint paths from u to c, and similarly, let P1 (v) and P2 (v) be two vertex-disjoint paths from v to c. Such paths exist by the definition of 2-connectivity. We are done 14 if either of P1 (v) and P2 (v) is vertex-disjoint from one of P1 (u) and P2 (u). So assume that both P1 (v) and P2 (v) intersect both of P1 (u) and P2 (u). At most one of them can contain the vertex u, so assume without loss of generality that P1 (v) does not contain u, and let w be the first vertex it contains that is an internal vertex of one of P1 (u) and P2 (u), say, without loss of generality, P1 (u). Then the path that starts with v, proceeds along P1 (v) until it hits w, and then proceeds along P1 (u) until it reaches c, is vertex-disjoint from P2 (u), and once again u and v cover c, and this holds for all cases.  Proof of Observation 3. Here is the needed modified version of the algorithm of Section 3.2. We assume there is at least one customer, as otherwise the empty set is an optimal cover. Call a 2-connected component a leaf component if it contains only one articulation point. As usual, call a vertex a leaf if it has degree 1. Note that no leaf can be contained in a 2-connected component, and that all nonleaf vertices that are not in a 2-connected components are articulation points. The internal vertices of a 2-connected component are all its vertices that are not articulation points. As in the algorithm of Section 3.2, we start with a pruning process. If a vertex is a leaf in the current graph and not a customer, delete it to get a new “current graph.” Similarly, if a leaf component has no internal vertices that are customers, delete all its internal vertices, leaving only its (single) articulation point. After the pruning is complete, the final graph G∗ is such that every leaf is a customer and every leaf component contains an internal customer. There are two cases to consider: 1. G∗ contains no leaves or leaf components. 2. G∗ contains a leaf or leaf component. The first case implies that G∗ is a 2-connected graph. By assumption, it must contain at least one customer. If just one, say v, then {v} is an optimal cover. If more than one, then no single facility can cover all of them, so pick any two customer vertices, say u and v, and {u, v} will be an optimal cover by our second observation. For the second case, first note that since all the leaves are now customers, they must be in any optimal cover. Similarly, any cover must contain at least one facility in the interior to each leaf component. To see this, let v be the articulation point for the component, and c an interior point of the component that is a customer. If our purported cover contains no facilities interior to the component, there must be two paths to c from facilities it does contain, but all such paths must now contain v 6= c, and hence cannot be vertex-disjoint. Let F ∗ be a set consisting of all the leaves, together with one internal customer from each remaining leaf component. By the above argument, we know that the optimal cover must be at least of size |F ∗ |. We now argue that F ∗ itself is a cover, and hence an optimal one. Consider any customer vertex in G∗ that is not in F ∗ and the corresponding vertex v in the underlying tree t(G∗ ). This is v itself if v is an articulation point or a vertex not contained in any 2-connected component, and otherwise is vC for the 2-connected component for which v is an internal vertex. Note that every leaf of this tree either is a member F ∗ or corresponds to a 2-connected component containing a member. Thus if v corresponds to a nonleaf of the tree, it must be covered by F ∗ , since it has vertex-disjoint paths to at least two leaves. The only other possibility is if v is an internal vertex of a leaf component C of G∗ . But then F ∗ must contain a vertex f 6= v that is one of C’s internal facility locations, since it contains at least one and does not contain v. Let u be the single articulation point in C. By our second observation, there are vertex-disjoint paths in C from v to to f and u. Since u itself must be connected to some leaf outside of C, this means that v has vertex-disjoint paths to two members of F ∗ . Thus F ∗ is an optimal cover.  As with the Hitting Set Lower Bound for SDFL, the UPDFL lower bound for PDFL is quite bad in the worst case. For such examples we can restrict ourselves to 2-connected graphs, since, as implied by the arguments above, there is no advantage to allowing nonshortest paths except between vertices in the same 2-connected component. So consider the 2-connected graph schematized in Figure 6, where the ellipsis stands for N − 3 additional connected vertex pairs in the middle row. 15 Figure 6: Instances where the UPDFL lower bound underestimates the optimal cover size by a factor that is linear in n. The filled-in vertices are the only customers/facilities. Here the filled-in vertices are the customers and the empty vertices are neither customers nor facilities. There are N customers in the middle row, and every PDFL cover must include all of them, since any shortest path to a target customer in the row from any other customer vertex (in the row above it or below it) has to go though the vertex connected to the target on its left. However, an optimal UPDFL cover consists simply of the two customers at the top and bottom of the figure, since the length-6 path from the top customer to each middle customer shares no vertices with the length-2 path to it from the bottom customer. The total number of vertices is n = 7N + 2, and so the N/2 ratio between the size of the two covers is linear in n. Note that this is also a lower bound on how large a penalty we can experience by limiting ourselves to shortest paths. For any given instance, if there is a gap between the UPDFL lower bound and the PDFL cover we construct, that gap is the sum of (1) the amount by which the number of monitors used in our constructed solution exceeds the optimal number, plus (2) the penalty (in excess monitors needed) for restricting ourselves to shortest paths. (There may also, of course, be penalties for not using shortest paths, such as added congestion and lessened monitoring accuracy.) 5. Heuristics 5.1. Greedy Heuristic The simplest, and most general, heuristic that we tested is a straightforward greedy heuristic, denoted by Greedy in what follows. This is a heuristic for solving the problem described by the MIP in Section 4.1, and can be applied both to path-disjoint and set-disjoint versions of the problem. It consists of three phases. 1. Construct the triples {(c, f, f 0 ) : {f, f 0 } covers c in a path-disjoint (set-disjoint) fashion} and store them in appropriate data structures. 2. Initialize our cover F 0 ⊆ F to the empty set. Then, as long as F 0 does not cover all c ∈ C, find an f ∈ F − F 0 such that F 0 ∪ {f } covers a maximum number of additional elements. Since all customers are facilities, there is guaranteed to be a facility that will cover at least one more customer. 3. Minimalize the cover by testing each facility in the cover in turn to see if its removal would still leave a valid cover, and if so remove it. 16 Note that, except for the fact that we allow a customer to cover itself, this is essentially a greedy algorithm for the Set Cover by Pairs problem. It differs from the “Greedy” algorithm of Hassin and Segev (2005) for that problem, however. The latter does not include a minimalization phase, and in its growth phase it chooses the best pair to add. It is hence likely to be significantly slower and less effective in practice than our greedy variant. Our implementation of Greedy uses randomized tie-breaking. It also allows two options for starting the construction phase: either take a pair that covers the maximum number of customers, or take a random customer, which at least covers itself. We also allow two options for the minimalization phase: either consider facilities in the reverse of the order in which they were added to the cover, or consider them in random order. None of these options (or combinations of options) seems to dominate any of the others, so here our primary tests cover a multiple-run variant on Greedy (Greedy(400)), which performs 400 runs and returns the best solution found. In those 400 runs, we cycle through the four option combinations, using each for 100 runs. Multiple runs help amortize the cost of triple generation. The latter takes time Ω(|C| · |F | · |F |) and typically yields a set T of triples that is substantially smaller than the |C|·|F |·|F |/2 upper bound, whereas the time for one construction/minimalization cycle is O(|T | + |F |2 ). Moreover, as we shall see, the actual overall running times are not large enough to represent an obstacle in the proposed applications, where the time to deploy a solution will greatly exceed the time to compute it. Our experiments will, however, explore the tradeoffs between robustness and number of iterations. Aside from the triple-generation, which will be described in Section 5.5, the implementation of Greedy is fairly straightforward, with two exceptions. First, to avoid the multiple cache misses that would occur if we did many random accesses into the list of triples (c, f, f 0 ), we keep three copies of that list, one sorted by the customer c, one by the larger-indexed of f and f 0 , and one by the smaller, with pointers into the start of the portion for each choice of the sorting key. The list indexed by c is constructed as part of the triple generation process. The other two lists can be computed in linear time by first precomputing how many triples there are for each key and reserving space for them in the corresponding list, and then maintaining appropriate counters while the lists are being constructed. The relevant portions of the lists for each facility f are accessed at most four times, once at the start, once when (and if) f is added to the cover, once in preparation for minimalization, and once when (and if) f is deleted. Another detail: Because we are storing the data three times, we trade a bit of time to save space, by running the triple generation code twice. The first run is used to compute the number of triples, which then allows us to reserve the correct amount of space for each list of triples, rather than simply pre-allocating room for the maximum number |C| · |F | · (|F | − 1) of triples. Our second nonobvious implementation detail consists of the data structures used to handle minimalization, where we need an efficient way of noticing when facilities are required, that is, can no longer be deleted. Let us call a pair of facilities {f, f 0 } valid for a customer c if the pair covers c in the appropriate fashion, and both its members are still in our current cover. A facility f can become required for one of two reasons: 1. f is also a customer and there are no longer any valid pairs for it. 2. There is a customer c such that every valid pair for c contains f . In order to determine when these situations occur, we keep track of two types of counts. First, for each customer c, we keep track of the current number mycount(c) of valid pairs for c. This makes it easy to check when the first of the above two conditions occurs. Second, for each customer/facility pair (c, f ), we keep track of the current number covercount(c, f ) of valid pairs for c that contain f . This information is then stored in a set of linked lists, one for each customer c and number n of pairs, where the list for (c, n) contains all those facilities f with covercount(c, f ) = n. To determine whether the second condition occurs, we simply look at the lists for (c, mycount(c)) for all customers with mycount(c) less than the size of the current cover, since for a cover of size s, there can be at most s − 1 valid pairs containing the same facility. It is not difficult to see that 17 the total time for maintaining the data structures is O(|T |), and the total time for spotting all the changes from nonrequired to required is at most |C| times the number of deletions, which is O(|C| · |F |). 5.2. Genetic Algorithm Genetic algorithms are variants on local search that mimic the evolutionary process of survival of the fittest. Our genetic algorithm, called Genetic in what follows, uses the “random key” evolutionary strategy proposed by Bean (1994), as modified by Gonçalves and Resende (2011) so as to bias the choices of parents and the operation of crossovers. In this approach, the “chromosomes” that do the evolving are not solutions themselves, but “random-key” vectors from which solutions can be derived. (This is in contrast to traditional genetic algorithms, in which the chromosomes are the solutions themselves.) As with Greedy which it uses as a subroutine, our Genetic algorithm applies to the MIP formulation of the set-disjoint and path-disjoint versions of the problem, and does not directly exploit any graph-theoretical properties of the underlying network. Let the set of facilities F = {f1 , f2 , . . . , fk }. In Genetic, each chromosome is a 0-1 vector (gene 1 , . . . , gene k ) of length k. We derive a solution (cover) F 0 from such a chromosome as follows: Start with F 0 = {fi : gene i = 1, 1 ≤ i ≤ k}. If F 0 is already a cover, halt. Otherwise, complete F 0 to a cover using our basic Greedy algorithm (without randomization or minimalization). The “fitness” of the chromosome is then the size of the resulting cover F 0 . The overall genetic algorithm starts by creating a population of p randomly generated chromosomes, in which each gene has an equal probability of being 0 or 1. The population then evolves in a sequence of generations. In each generation we start by computing the solution for each member of the population, yielding its fitness. The top 15% of the population by fitness (the “elite” members) automatically pass on to the next generation’s population. In addition, to provide diversity, 10% of the next generation consists of randomly generated chromosomes, like those generated initially. For the remaining 75%, we repeat the following “biased crossover” construction: Pick a random member (x1 , x2 , . . . , xk ) of the top 15% of the current generation’s population and a random member (y1 , y2 , . . . , yk ) of the remaining 85%. The “child” (z1 , z2 , . . . , zk ) of this pairing is determined as follows: For each i, independently, set zi = xi with probability 70%, and otherwise set zi = yi . This scheme insures that the best solution always survives into the next generation, where it may continue as champion or be dethroned by a better solution. Generations are continued until q have gone by without any improvement in the fitness (cardinality) of the best solution, which we then output. Our code includes the option of minimalizing this final solution, but in practice this never has helped. In our results for Genetic we typically took p = min{300, |F |} and q = |V |. For these and the other parameters of the algorithm (top 15%, etc.) we chose values based on preliminary experimentation and on intuition derived from applications of this approach to other problems. They appear to yield a good tradeoff between running time and quality of solution for our application, but we make no claim as to their optimality. In our experiments, Genetic did not prove competitive for the set-disjoint case. The much faster heuristics of the next two sections, which exploit the properties of that case, found optimal solutions for all our test instances. In the path-disjoint case, where, for our larger test instances, multiple-iteration Greedy is the only competition, and where we have no readily-computable lower bound that is as good as HSLB is for the set-disjoint case, Genetic can at least give us some idea of the extent to which Greedy(400) can be improved upon. 5.3. The Single Hitting Set Heuristic (SHS) This section describes a simple heuristic that applies to the set-disjoint variant of our problem (SDFL), and is based on Lemma 6 and our Hitting Set lower bound for that variant. Instead of optimally solving the NP-hard Hitting Set problem described in Section 4.2, we find a notnecessarily optimal solution using a straightforward greedy hitting set heuristic: Let X ⊆ F denote 18 the hitting set we are building, initially the empty set. While X is not a valid hitting set, repeatedly add that facility that hits the most as-yet-unhit (customer,neighbor) pairs, ties broken randomly, where a facility f hits a pair (c, v) if either f = c or v ∈ / N (c, f ). Once X is a valid hitting set, we check whether it is also a valid cover of all the customers and, if not, we extend it to one using Greedy, this time including randomization and minimalization. (Minimalization is applied even if X is itself already a cover.) As in Greedy(400) we use this simple heuristic in a multi-iteration scheme, where we take the best solution found. This allows us to exploit the variance introduced by all the randomization – in addition to all the randomized tie-breaking, we also alternate between reverse delete and randomized delete in the minimalization phases. We shall denote this scheme by SHS(k), where k is the number of iterations, again typically 400. Since SHS(k) is a polynomial-time algorithm, Theorem 4 implies that we cannot prove a polylogarithmic worst-case performance guarantee for it unless a widely-believed conjecture is false. However, in practice the initial hitting set X is typically close to a cover, and so the following provides an informative bound. Theorem 7. For a given instance I of SDFL based on a graph G = (V, A), let OPT(I) be an optimal cover, and suppose we run SHS one time, with X(I) being the hitting set generated and SHS(I) being the final cover. Then, if we set ∆ = |SHS(I)| − |X(I)|, the number of facilities that needed to be added (removed) to turn X into a minimalized cover, we have SHS(I) ≤ (ln(|A|) + 1) · OPT(I) + ∆. Proof. This follows from the fact that the optimal solution to the hitting set problem of Section 4.2 is a lower bound on OPT(I), together with the result of Johnson (1974) and Lovász (1975) that the greedy algorithm for Set Cover (and hence for Hitting Set) has worst-case ratio at most ln n + 1, where n is the size of the set being covered/hit.  Note that the ln n + 1 bound for the greedy Hitting Set heuristic is essentially the best possible guarantee for a polynomial-time algorithm for this problem, as follows from Bellare et al. (1993), Feige (1998), and Alon et al. (2006). In practice, however, the greedy Hitting Set heuristic typically returns a set of size much closer than this to the optimal, often only a singledigit percentage above optimal. As we shall see, the performance of SHS(k) is similarly good. 5.4. The Double Hitting Set Heuristic (DHS) This section describes a second heuristic for SDFL that exploits Lemma 6, as well as the way OSPF weights tend to be set. It involves computing two hitting sets rather than one, but is a good match for SHS, in that both heuristics perform very well and neither consistently dominates the other. As remarked above, while OSPF can split traffic in the case of multiple shortest c → f paths, the amount of splitting that occurs in practice seems to be limited. The following two definitions provide a new way to quantify this effect. Definition 4. A potential facility location f is good for customer vertex c if f 6= c and |N (c, f )| = 1, that is, all shortest c → f paths leave c via the same arc. If there is just one shortest c → f path, clearly f is good for c, but f may be good for c even when there are many c → f paths. Note that if f is good for c, then, under OSPF, there can be no splitting at c of the traffic from c to f , although splitting at later vertices in the path would be possible. Definition 5. Let t be an integer, 1 ≤ t ≤ |F |. A customer vertex c is t-good if there are t or more good potential facility locations f for c (and t-bad otherwise). 19 For our test instances, inspired or derived from real-world networks and models, a large majority of the customers tend to be t-good, even for t ∼ |F |/2, and almost all are 1-good. Our Double Hitting Set heuristic (DHS) takes t as a parameter, and is designed to cover the t-good customers nearly optimally, via a union X ∪ Y of two hitting sets, leaving the t-bad customers, if any, to be covered via the Greedy algorithm. Let Ct denote the set of all t-good customers. For a given t, we shall, when it makes a difference, denote the algorithm by DHSt . The first step of DHSt is to choose one good potential facility location f ∈ F for each c ∈ Ct , without choosing too many vertices in total. For each such c, let Sc be the set consisting of c plus all the good potential facility locations for c. By the definition of t-good and the fact that C ⊆ F , we must have |Sc | ≥ t + 1 ≥ 1. We want to choose a small set X ⊆ F such that X ∩ Sc 6= ∅ for all t-good customers c. In other words, we want an X that hits (intersects) all such sets Sc . We again settle for using the standard greedy Hitting Set heuristic, as described in the previous section, to construct a hitting set X that we hope is near-optimal. Next, let C 0 ⊆ Ct be the set of t-good customers c covered by X, either because c ∈ X or because there exist distinct f1 , f2 ∈ X such that c is covered by {f1 , f2 } in a setwise disjoint fashion. Let C 00 = Ct − C 0 , and for each customer c ∈ C 00 , choose a facility fc ∈ X ∩ Sc . Note that by definition of C 00 , we have fc 6= c, so let xc ∈ N (c) be the unique neighbor of c which is on all shortest paths from c to fc . This choice is unique since the fact that fc ∈ Sc implies that fc is good for c, and so by definition all shortest paths from c to f leave c through the same arc. Our second Hitting Set problem is designed so any solution Y will, for each c ∈ C 00 , contain either c itself or a facility f 6= c such that {fc , f } covers c is a setwise disjoint fashion. The Hitting Set problem is specified as follows. For each such customer vertex c, let Fc consist of c together with all potential facility locations f 6= c for which all shortest c → f paths avoid xc . Note that by Lemma 6, for any f ∈ Fc (other than c itself), the fact that fc is good for c and the definition of xc together imply that the pair {fc , f } will cover c in the desired fashion. We thus have the following: Lemma 8. Given X as above, any hitting set Y of {Fc : c ∈ C 00 } is such that X ∪ Y is a cover of C 0 ∪ C 00 = Ct , the set of all the t-good customer nodes c. For the DHS algorithm, we also use the greedy Hitting Set heuristic to produce Y . At this point, we have a cover X ∪ Y for Ct . DHS concludes by using Greedy to extend X ∪ Y to a minimalized cover F 0 of all the customers, not just the t-good ones. As with SHS, we will consider multi-iteration schemes, DHSt (k), where we perform k independent runs of DHSt , in each using randomized tie breaking when running the greedy Hitting Set heuristic and the final Greedy completion phase, and alternating between reverse and random deletes in the minimalization phases. Our main experiments will be with DHS1 (400) and DHSb|F |/2c (400), which seemed somewhat complementary in our initial, single-iteration trials. For simplicity, we shall denote the latter by DHSH (400) (with the H standing for “half”). As with SHS(k), since DHSt (k) is a polynomial-time algorithm, Theorem 4 implies that we cannot prove a polylogarithmic worst-case performance guarantee for it unless a widely-believed conjecture is false. However, in practice the initial hitting set X is typically quite small, and often there are very few t-bad customers, so meaningful bounds are possible. Theorem 9. Suppose 1 ≤ t ≤ |F |, and let I be an instance of SDFL with at least one t-good customer. Let OPTt (I) be the size of an optimal cover for the set Ct of all t-good customers in I. Suppose we run DHSt one time on I, with X(I) and Y (I) being the two hitting sets generated, which, as observed constitute a cover of Ct . Then, |X ∪ Y | ≤ (ln(|Ct |) + 1) · OPTt (I) + |X| and, if t ≥ |F |/3, we have |X ∪ Y | ≤ (3.47 · ln(|Ct |) + 2) · OPTt (I) Note that, for our implementation choice of t = b|F |/2c, we have t ≥ |F |/3 as long as |F | ≥ 2. Also, the cover of all of C produced by DHSt can exceed |X ∪ Y | by at most the number |C − Ct | 20 of t-bad customers, so if almost all customers are t-good, the above bounds will reflect the overall performance of DHS. Finally, note that the logarithm here is of |C| or something less, whereas for the analogous Theorem 7 for SHS, the logarithm was over the potentially much larger |A|, which might affect the relative constant factors in the bounds. Proof. Observe that the sets Fc in our second hitting set constitute a subset of those used in our Hitting Set lower bound, restricted to the t-good customers. Thus the optimal hitting set for this second problem cannot be larger than OPTt (I). Thus, by the results of Johnson (1974) and Lovász (1975) and the fact that, by assumption, Ct 6= ∅, we have |Y | ≤ (1 + ln |C|) · OPTt (I), and the first claim follows. We cannot apply the same argument to the set X, since in constructing X we restricted attention to good potential facility locations, and OPTt (I) need not be so restricted. However, a different argument applies when t ≥ |F |/3, which will lead to the proof of our P second claim. This choice of t means that, for each t-good vertex c, |Sc | ≥ |F |/3. Therefore, c is t-good |Sc | ≥ |Ct | · |F |/3, and so some potential facility location f must be in at least |Ct |/3 of the sets. Consequently, the greedy choice must hit at least that many sets. By essentially the same argument, it must hit at least 1/3 of the remaining unhit sets each time it makes a choice, and so must have completed constructing its hitting set X after y steps, where (2/3)y |C| < 1. This means it suffices that y > ln(|C|)/ ln(3/2) > 2.47 · ln(|C|), and so |X| ≤ 1 + 2.47 · ln(|C|). The second claim follows.  5.5. Triple Generation. All our cover-generation algorithms require the generation of the set of relevant triples (c, f1 , f2 ) (set-disjoint or path-disjoint) used by our basic Greedy algorithm – the algorithms other than Greedy, either use it as a core-subroutine (Genetic) or as a fallback device to complete the cover they generate (SHS and DHS). Because this set is potentially of size Θ(|C| · |F |2 ), and would naively take significantly more time than that to generate, its computation typically constitutes a significant portion of the running time. In this section we show how the time can be reduced to O(|V |3 ) for real-world networks, in both the set- and path-disjoint cases. In what follows, let n = |V | and m = |A|. For real-world data networks, we may assume that m ≤ an for some relatively small constant a. We also have that |C| ≤ |F | ≤ n, although both |C| and |F | may be proportional to n. Let TS and TP be the sets of triples needed by Greedy in the set-disjoint and path-disjoint cases, respectively. Let us first consider the set-disjoint case. A triple (c, f1 , f2 ) is in TS if c ∈ C, f1 , f2 ∈ F , and no shortest path from c to f1 shares any vertex other than c with any shortest path from c to f2 . The naive way to test this would be to construct, for each fi , the set Si of vertices on shortest paths from c to fi , and then testing whether Si ∩ Sj = {c}. These sets could conceivably be of size proportional to n, yielding a running time that could be proportional to |C||F |2 n, so the best we can say about the running time of such an algorithm is that it is O(n4 ). However, recall from Lemma 6 that if Si ∩Sj contains some vertex other than c, then it contains a vertex that is a neighbor of c. Thus we may restrict attention to the sets Ni of vertices adjacent to c that are on shortest paths to fi . To compute these sets we first construct a shortest path graph from c to all other vertices in time O(m log n), and then for each facility f we can compute Ni by a single backward traversal of the shortest path graph from f in time O(m). For each pair fi , fj , the intersection test can then be performed in time O(outdegree(c)). Amortized over all customers P in C, the tests for a given pair fi , fj take time O( c∈C outdegree(c)) = O(m). Thus we get an overall time bound of O(m log n|C| + m|F | · |C| + m|F |2 ) = O(n2 m) under our assumptions that m is O(n). For the pathwise-disjoint problem, the naive algorithm is even worse, since for a given triple c, f1 , f2 , there may be exponentially many paths of potential length Ω(n) to compare. Here we must be more clever. We first observe that we can actually reduce the test to a simple network flow problem, by augmenting the shortest path graph with a new vertex t, adding arcs from f1 and f2 to t, giving all vertices and edges capacity one, and asking whether there is a flow of value 2 from 21 c to t. Next, we observe that this is a particularly easy flow problem, which can be solved in linear time as follows. As before, for a given customer c we begin by computing a shortest path graph from c to all other vertices in time O(m log n), to be amortized over all facilities. Set the capacities of all the arcs to 1. We then add a new vertex t, and edges of length and capacity 1 from all facilities f to t. To handle a given candidate pair (f1 , f2 ), we pick some shortest path from c to f1 using the shortest path graph, and extend it to a shortest path from c to t by adding the link from f1 to t. This yields a flow of 1 from c to t. Now add a link of capacity 1 from f2 to t. There will be disjoint paths from c to f1 and to f2 if and only if there is now a flow of value 2 from c to t, and such a flow will exist if and only if there is an augmenting path from c to t in the graph. This can be found in linear time by a breadth-first search in the residual graph, where each arc (u, v) in the first path is replaced by an arc (v, u) of capacity 1. Finally, we observe that, having fixed the shortest path to t through f1 and constructed the residual graph, we can actually solve the network flow problems for all pairs (f1 , fi ) in parallel with a single breadth-first search. The overall running time thus becomes O(m log n|C| + m|C| · |F |) = O(n2 m), once again O(n3 ), assuming m = O(n). What we have just described is actually the algorithm for generating path-disjoint triples when “disjoint” only means “arc-disjoint.” To get vertex-disjointness as well, one replaces each vertex v in the shortest path graph be a directed arc (vin , vout ), with each arc (u, v) replaced by (u, vin ) and each arc (v, u) replaced by (vout , u). In conclusion, we note that for our HSLB code in the set-disjoint case, some of the above work can be avoided, as the triples need only be considered implicitly. To construct the Hitting Set linear program, we need only consider (customer,neighbor,facility) triples, at an amortized cost (and space) of O(mn). The same triples can be reused in the verification phase, where we check to see whether the computed hitting set is actually a feasible solution to our problem, although now O(mn2 ) time may be required. 6. Network Test Instances We tested our algorithms on both synthetic and real-world instances. The two classes modeled different types of data networks and had distinctly different characteristics, enabling us to test the generality of our methods. In this section we will discuss each type of instance, and compare the structural properties of the resulting testbeds. 6.1. Synthetic LAN/WAN Instances Our 630 synthetic instances were designed to reflect the structure of large real-world local- and wide-area networks (LAN’s and WAN’s) and were sized so that we could study the scalability of our algorithms and the solutions they produce. They were generated via the following four-step process. 1. A transit-stub skeleton graph is generated using the Georgia Tech Internetwork Topology Models (GT-ITM) package (Calvert et al., 1997). We generated 10 graphs each for parameter settings that yielded |V | = 50, 100, 190, 220, 250, 300, 558, 984. (The value of |V | is an indirect result of one’s choice of the allowed input parameters.) 2. Traffic demand is generated between all pairs of vertices in the skeleton graph using a gravitational model (described below) with the shortest path metric. 3. Using the heuristic network design algorithms of Buriol et al. (2007), we determine link capacities and OSPF link weights such that all traffic can be routed in a balanced way on the resulting network using the OSPF routing protocol. Links with no traffic routed on them are deleted. 22 Figure 7: A transit stub network with three transit domains and 16 stub domains. 4. For specified numbers of customer and facility location vertices, the sets C ⊆ F are then randomly generated. 6.1.1. Step 1: Transit-Stub Skeleton Graphs Transit-stub graphs (Calvert et al., 1997) are hierarchical graphs made up of transit vertex components and stub vertex components. The stub node components can be thought of as access networks while the transit node components make up the backbone of the network. See Figure 7. The GT-ITM package provides a parameterized method for generating such graphs randomly. The relevant papers and documentation are not totally consistent or clear, and the following description is our best guess as to how the networks are generated, based on the documentation and our inspection of selected outputs. The generation process involves many parameters, but we based our generation on the settings used in the illustrative example identified as “file t100” in the documentation file itm-doc.txt available at http://www.cc.gatech.edu/projects/gtitm/, varying only the parameters T , NT , S, NS , which determine the number of vertices. The constructed graphs consist of T ·NT transit vertices assigned randomly to T transit domains. It is required that T ≥ 1 and NT ≥ 1, and it appears that the generation process starts by placing one transit vertex in each transit domain so that none are empty. In addition, there are S · T · NT stub domains (one per transit vertex), and S · NS · T · NT stub vertices, assigned randomly to the stub domains. Again we must have S ≥ 1 and NS ≥ 1 and it appears that the generation process starts by placing one stub vertex in each stub domain. Edges appear to be added to the network as follows: • Each transit domain has an average of two edges to other transit domains. The endpoints of each edge are chosen randomly from the transit vertices in the two relevant domains. If the chosen edges fail to connect all the transit domains, they are deleted and the experiment is repeated until we do get a connected graph. • Each transit vertex is associated with an average of S stub domains, and is connected by an edge to a random member of each. • For each pair of vertices within a given transit domain, there is an edge with probability 0.6. If the resulting choices do not make the transit domain connected, the experiment is repeated until a connected graph results. 23 T 1 1 2 2 2 2 3 4 NT 2 4 5 5 5 6 6 6 S 3 3 3 3 3 3 3 4 NS 8 8 6 7 8 8 8 10 |V | 50 100 190 220 250 300 558 984 Average |A| 91.1 177.2 284.6 360.2 435.0 531.6 1172.2 2083.3 Average Degree 3.6 3.5 3.0 3.3 3.5 3.5 4.2 4.2 Table 1: Input parameters and measured statistics of generated transit-stub graphs. • For each pair of vertices within a given stub domain, there is an edge with probability 0.42. If the resulting choices do not make the stub domain connected, the experiment is repeated until a connected graph results. In addition, it appears that the code also adds a few extra edges between stub domains or between stub and transit domains, even though there should be none, given the parameter settings we chose. We deduce this from the fact that, although the above description suggests that the largest 2-connected component should be of size max(NS , T · NT ), we typically find that the largest is two to four times larger than that. Note that this process yields a network with a fixed number T · NT · S · NS vertices, but a random number of edges (some of which may be deleted in Step 3). Before proceeding to Step 2, we convert our graphs to symmetric directed graphs by replacing each edge {u, v} with the two arcs (u, v) and (v, u). Since the original graph was designed to be connected, this directed graph will be strongly connected. The GT-ITM generator also produces a length l(u, v) for each edge {u, v}, which we use in Step 3. We generated 10 graphs each for eight different sets of parameters, chosen to yield increasing values for |V |, from 50 to 984. In Table 1 we present the parameter choices, the corresponding values for |V |, the final average number of edges and the average degree (when the graph is viewed as undirected). The graphs for instances with up to 558 vertices were generated by the 32-bit version of the GT-ITM code, which is apparently no longer supported. Those for the graphs with 984 vertices, which we generated more recently, were produced using the new, 64-bit code from Version 2.33 on ns-allinone, downloaded from http://sourceforge.net/projects/nsnam/files/. This version apparently has a bug, in that the parameters for the edge densities seem to be ignored. Consequently, both the stub and transit domains start out as complete graphs, and their sparsification, while still substantial, is due only to the Step 3 deletions, described in more detail below. 6.1.2. Step 2: Traffic Demands The traffic demands are created via a randomized “gravitational” method from Fortz and Thorup (2000). We first generate random numbers o(v) and d(v) for each vertex v, chosen independently and uniformly from the interval (0, 1). Here “o” stands for origin and “d” for destination. Then, for each pair of vertices (u, v), we compute D(u, v), the shortest length (in edges) of a path from u to v. Let Dmax be the largest of these distances. Then, for any ordered pair (u, v) of distinct vertices, we choose a random number r(u, v) ∈ (0, 1) and set the traffic demand from u to v to be the (nonzero) value   − t(u, v) = r(u, v) · o(u) · d(v) · e D(u,v) Dmax . Note that, since our network is strongly connected, all of this traffic can be routed. 24 6.1.3. Step 3: OSPF Weights We next choose OSPF weights and arc capacities that allow for an efficient routing of the traffic specified by the matrix t(u, v) : u, v ∈ V . To do this, we apply the survivable IP network design tool developed by Buriol et al. and described in Buriol et al. (2007). The tool takes as input the skeleton graph and the traffic matrix. For each arc (u, v), it produces an integer OSPF weight w(u, v) in the range [0, 30] and an integer capacity c(u, v), such that if all traffic is routed according to the OSPF weights (with traffic splitting if there is more than one shortest path from one vertex to another), no arc will have traffic load exceeding 85% of its capacity. P It does this while attempting to minimize the total arc cost (u,v) l(u, v) · c(u, v). The optimization is done via a biased random key genetic algorithm, using a population of size 50 and run for 100 iterations. For more details, see Buriol et al. (2007). (Running with larger parameter values would likely produce lower-cost solutions to the design problem, but this would increase the running time, and our goal here is simply to produce a sparse network on which the demand can be routed.) Note that any arc (u, v) that is on some shortest path for the computed OSPF weights must have nonzero capacity c(u, v), since every traffic demand is nonzero and so every shortest path must carry some traffic. We thus can safely delete all capacity-zero arcs from our network. In order to insure that our graphs remain symmetric, however, we only delete a capacity-zero arc (a, b) if its partner (b, a) also has zero capacity. 6.1.4. Step 4: Customers and Potential Facility Locations For each of our 80 skeleton graphs (10 for each of our eight sets of GT-ITB parameters), we generated seven networks, differing in their choices of the sets C ⊆ F of customer vertices and potential facility locations. The sizes were chosen as a set of fixed fractions of the set V of vertices. Let (Cx,Fy) denote the set of instances with |C| = d|V |/xe and |F | = d|V |/ye. For each graph we generated one instance of each of the following types: (C1,F1), (C2,F2), (C4,F4), (C8,F8), (C2,F1), (C4,F1), and (C8,F1). Our synthetic instance testbed thus contains a total of 560 instances, each consisting of a network, OSPF weights (which determine the shortest paths in the network), and the sets C and F . The full set of synthetic instances is available from author Resende, and currently can be downloaded from http://mauricio.resende.info/covering-by-pairs/. 6.2. Real-World ISP-Based Instances The 70 real-world instances in our testbed were derived from 10 proprietary Tier-1 Internet Service Provider (ISP) backbone networks and many of them use actual OSPF weights. Because of the proprietary nature of these instances, we will not be able to report as detailed and precise results about them, although we shall summarize how they differ from the synthetic instances, and how the results for the two instance types compare. The ISP networks ranged in size from a little more than 100 routers to over 5000, each with between 3.5|V | and 4.3|V | arcs (similar to the range for our synthetic instances). We shall denote them by R100a, R100b, R200, R300, R500, R700, R1000, R1400, R3000, and R5500. where the number following the R is the number of routers, rounded to the nearest multiple of 100. (Because of their proprietary nature, these instances cannot be made publicly available.) For four of these instances (R100a, R100b, R200, and R500), we only had information about the topology, but not the roles of the routers. For each of these, we constructed 16 instances, starting with the case in which F = C = V . The other instances also had F = V , but C was a random sample of roughly 1/2, 1/4, or 1/8 of the vertices. Following our notation for the synthetic instances, we shall refer to these four alternatives as (C1,F1), (C2,F1), (C4,F1), and (C8,F1). In addition to the single (C1,F1) instance, we generated five distinct instances for each alternative from (C1,F2), (C1,F4), (C1,F8), based on different random choices for C. 25 For R300, R700, R1000, R1400, R3000, and R5500, where we have more detailed information about the roles played by the routers, we constructed instances, one for each topology, that took those roles into account: routers most closely associated with network customers (access routers, etc.) served as the customer vertices, and the potential facility locations consisted of these, together with all other routers except for the backbone routers (thus modeling the likely situation in which extra monitoring equipment cannot easily be connected to the backbone routers). The number of customer vertices ranged between 50% and 93% of the total, and the number of vertices that were neither customers nor potential facility locations ranged from 2% to 41%. 6.3. Instance Properties Our synthetic instances reflect the structure of real-world LANs and WANs, and consist of many, relatively small 2-connected components. For instances with |V | ≥ 100, the largest 2-connected component averages around 12% of the vertices (112.5 vertices for our |V | = 984 instances). In contrast, the Tier-1 ISP instances consist of one very large 2-connected component, typically containing over 95% of the vertices, with small 2-connected components hanging off of it, most of size 2. One consequence of this difference in topology is differing numbers of triples for the two instance types. For a given instance with a set C of customers and a set F of potential facility locations, there are |C|(|F | − 1)(|F | − 2)/2 potential triples (c, f, f 0 ), each one containing a customer c and two distinct potential facility locations in F − {c}, For our synthetic instances, only a relatively small fraction of the potential triples are actually valid triples in the set-disjoint case. For each class (Cx, F y), the percentage of valid triples declines as N increases, until it appears to stabilize somewhere between 4 and 5%. See Table 2. The ISP-based instances yield substantially more set-disjoint triples than the synthetic ones of the same size. The percentage of valid triples, with one exception, ranges between 20 and 35%, the exception being R1000, which at 11.2% still has more than double the percentage for the large synthetic instances. See Table 3. Note that, because of the cubic growth in the number of potential triples, the actual number of triples can become quite large. For our largest instance, R5500, there are over 5.7 billion valid triples in the set-disjoint case. The choice of arc weights also has an effect on our instances. The optimized weights of our synthetic instances lead to relatively few shortest-path ties, and so the pathwise-disjoint instances typically have only 5 to 6% more valid triples than the corresponding set-disjoint instances. The weights in the ISP instances were constrained by a variety of factors in addition to traffic balancing, and yield far more ties. As a result, the number of path-disjoint triples exceeds the number of setdisjoint triples by from 24 to 335%, that latter occurring for our anomalous R1000 instance. We also measured the effect of relaxing the constraints on our path-disjoint instances, by requiring only that the paths be arc-disjoint, not vertex-disjoint. (Although vertex-disjointness adds robustness to our monitoring application, the mathematics of the application only requires arcdisjointness.) Here the effects were relatively minor for both synthetic and ISP-based instances, typically yielding an increase of less than 2% in the number of valid triples. Instance R1000 was again the major exception, yielding an increase of 15%, to reach a total of more than half the maximum possible number of triples. Finally, to further explore the effect of increased numbers of ties in the set-disjoint case, we considered modified versions of our instances in which all edge weights are set to 1. As might be expected for such weights, the number of set-disjoint triples drops substantially for almost all our synthetic and ISP-based instances (the only exception again being instance R1000, where we saw a 16% increase). 7. Summary of Experimental Results This section evaluates our algorithms in three areas. • Accuracy: How close to optimal were the solutions provided by each of heuristics Greedy, 26 Synthetic Instances 100 190 220 250 300 558 984 Average Number of Triples in Thousands C1,F1 12.9 57.8 224.8 340 487 756 4,111 19,954 C2,F1 6.3 31.6 119.1 184 270 375 2,070 10,310 3.5 15.1 53.6 92 118 185 1,131 5,136 C4,F1 C8,F1 2.2 7.5 28.0 44 59 98 471 2,642 C2,F2 1.5 6.7 26.9 43 55 93 507 2,438 C4,F4 0.2 0.8 3.7 5 8 11 62 299 C8,F8 0.0 0.1 0.4 1 1 1 6 38 Average Percent of Total Number of Possible Triples for Set-Disjoint Instances C1,F1 21.99 11.92 6.66 6.48 6.30 5.65 4.76 4.20 C2,F1 21.58 13.02 7.05 7.00 6.98 5.61 4.79 4.34 C4,F1 22.63 12.43 6.28 7.00 6.09 5.53 5.22 4.33 C8,F1 26.42 11.92 6.56 6.60 5.94 5.80 4.35 4.45 11.33 6.48 6.59 5.73 5.65 4.72 4.12 C2,F2 22.03 C4,F4 22.03 11.30 7.20 6.50 6.82 5.63 4.64 4.07 C8,F8 20.10 15.23 7.32 7.24 6.99 5.57 3.83 4.16 Average Percent Increase in Triples for Pathwise-Disjoint Instances over Set-Disjoint Ones C1,F1 6.94 6.63 4.96 5.99 3.88 6.68 4.29 5.60 C2,F1 6.93 5.73 5.05 5.10 3.25 5.99 4.09 4.90 C4,F1 7.52 5.00 4.87 6.08 3.84 7.10 2.74 4.23 C8,F1 5.28 5.14 3.93 7.49 3.26 5.60 3.37 2.88 C2,F2 8.32 7.13 4.36 5.37 4.50 6.62 3.88 6.15 3.99 6.98 7.46 8.12 4.38 7.60 4.97 5.69 C4,F4 C8,F8 17.71 7.20 5.61 3.32 1.98 5.63 4.62 6.15 Average Percent Decrease in Triples for Equal-Weights on Set-Disjoint Instances C1,F1 16.88 13.82 9.07 10.29 14.53 13.22 26.89 31.13 15.12 10.48 9.67 15.11 14.89 26.68 31.09 C2,F1 15.48 C4,F1 11.82 15.48 9.52 9.79 14.50 14.44 30.95 32.24 C8,F1 22.68 8.64 4.92 7.68 12.71 15.31 24.03 39.41 14.27 4.47 13.34 11.84 11.26 26.48 30.23 C2,F2 13.81 C4,F4 13.60 13.03 7.46 9.13 20.49 3.16 24.81 32.15 C8,F8 8.35 17.06 5.55 19.95 14.86 4.89 27.72 37.81 Class 50 Table 2: Average numbers of triples for synthetic instances, the percentage of all possible triples that these numbers represent, the percentage increases in numbers of triples for the arc-disjoint version of pathwise-disjoint instances, and for equal-weight instances. 27 ISP-Based Instances Class R100a R100b R200 R300 R500 R700 R1000 R1400 R3000 R5500 Average Number of Triples in Millions C1,F1 0.22 0.36 1.44 2.47 17.7 22.0 47.2 134 816 8,156 C2,F1 0.11 0.18 0.73 8.8 C4,F1 0.06 0.09 0.36 4.4 0.03 0.05 0.20 2.2 C8,F1 Average Percent of Total Number of Possible Triples for Set-Disjoint Instances C1,F1 30.0 34.0 25.6 33.7 23.9 28.2 11.2 21.4 35.0 20.9 C2,F1 30.1 34.1 26.0 23.5 C4,F1 32.2 32.7 25.4 23.6 C8,F1 26.5 32.8 27.0 23.3 Average Percent Increase in Triples for Pathwise-Disjoint Instances over Set-Disjoint Ones C1,F1 43.6 40.1 59.8 41.7 24.9 31.0 335.6 33.0 25.9 101.7 42.6 39.9 58.4 25.3 C2,F1 C4,F1 41.2 46.5 63.6 26.7 C8,F1 53.4 36.2 56.8 24.0 Average Percent Increase in Triples for Arc-Disjoint over Vertex Disjoint Instances C1,F1 1.0 1.3 1.3 .1 1.8 .3 15.5 1.5 .1 5.5 C2,F1 1.0 1.3 1.2 1.9 1.4 1.4 1.3 1.9 C4,F1 C8,F1 .8 1.6 1.3 .9 Average Percent of Total Number of Possible Triples for Arc-Path-Disjoint Instances C1,F1 43.5 48.3 41.5 47.8 30.3 37.0 56.4 28.9 44.1 44.3 C2,F1 43.2 48.3 41.6 30.0 46.2 48.4 42.0 30.4 C4,F1 C8,F1 40.9 45.1 42.4 29.2 Average Percent Decrease in Triples for Equal-Weights on Set-Disjoint Instances C1,F1 27.4 16.0 4.9 29.4 14.2 31.6 -16.7 15.7 55.1 58.7 C2,F1 26.1 16.1 5.7 13.7 C4,F1 27.0 11.9 6.3 12.0 30.1 15.3 2.7 16.9 C8,F1 Table 3: Average percentage of valid triples for real world instances, the percentage increases in numbers of triples for the vertex- and arc-disjoint versions of pathwise-disjoint instances, and for equal-weight instances. 28 SHS, and DHS? For small instances, for which the exact optimal can be computed using CPLEX, we can compare to that. In the set-disjoint case, where the SHS lower bound turns out to equal the optimal solution value for all our instances, we can compare to that. For large path-disjoint instances, we have no good, readily computable, standard of comparison. We consider two options. First, we can compare the results to the (very weak but linear-time computable) lower bound obtained when one requires only that paths be vertex-disjoint, not that they be shortest paths. Second, we can evaluate the results for Greedy(400) in the path-disjoint case by attempting to improve on them using the Genetic algorithm and large amounts of computing time. (Note that Genetic optimally solved all the bad set-disjoint instances for Greedy(400) except R5500, which is too big for Genetic to handle.) • Running Time: How fast are the algorithms? Our runs were primarily performed on two machines. We used a shared-memory machine with 1.5 Ghz Itanium processors and 256 Gigabytes of random access memory, running SUSE LINUX with kernel 2.6.16.60-0.81.2default, for the heuristic runs on instance R5500, where 80 gigabytes of main memory were needed because of the large number of triples involved. In the text this will be referred to as “our slower machine.” The remainder of our runs were primarily performed on a shared memory multiprocessor machine with 24 2.7 Ghz Intel Xeon processors and 50 gigabytes of random access memory running CentOS Linux with kernel 2.6.32-431.11.2.el6.x86 64Linux. In addition, we did some confirmatory runs on a MacBook Pro with a 2.4 Ghz dual-core Intel i5 processor and 8 gigabytes of RAM, running Mac OS 10.9.4 and with Gurobi 5.6 replacing CPLEX 11.0 as our MIP solver. When we report running times, we give the sum of the system and user times, and will specify the machine used. (Each algorithm run used only a single processor/core of the respective machine.) All our codes were written in C, and compiled using gcc. Unless otherwise stated, the running times reported are for code compiled with no optimization flags set, although, where appropriate, we will indicate the kinds of speedups one might expect using -O2 optimization. It should be noted that on none of these machines were running times precisely repeatable. Differences of 20% or more on duplicate runs were not uncommon. So our running time reports can provide only order-of-magnitude information, and can provide evidence that one code is faster than another only if the differences are substantial and hold across many instances. • Solution Quality (Cost Reduction): The first two measures address the quality of the algorithms. This one addresses what they tell us about the applications. Even an optimal solution will not be enough to justify the proposed monitoring scheme of Gu et al. (2008) if it does not provide a significant savings over the default solution that simply takes all customers (which for our instances are themselves facility locations) and is likely to yield more reliable measurements. We also consider how much further improvement is obtainable when going from the setwise-disjoint to the pathwise-disjoint versions of the problem. 7.1. 7.1.1. Accuracy and Running Times for the Set-Disjoint Case Optimization via our MIP Code In Table 4, we summarize the results for our MIP optimization code on our synthetic and ISP-based set-disjoint instances. All the runs were performed on the faster of our two Linux machines. The first section of the table reports how many of the 10 instances of each type that the code was able to solve within a 24-hour time bound. For |V | = 190, we eventually solved the missing (C4,F1) and (C8,F1) instances, although the longest (C4,F1) took slightly more than a week. We also solved the two missing (C4,F1) instances based on the ISP-based R200 instances, although the longer took over a week. On the other hand, for 299 of the 383 solved instances, MIP took less than 10 minutes. The second section of the table reports the worst running times (system time plus user time, rounded to the nearest second) for the classes where all instances were solved in less than 24 29 Synthetic Instances ISP-Based Instances Class 50 100 190 220 250 300 558 984 R100a R100b R200 Number of Instances Solved in Less Than 24 Hours by MIP (C1,F1) 10 10 10 1 1 1 (C2,F1) 10 10 10 5 5 (C4,F1) 10 10 9 5 5 3 (C8,F1) 10 10 9 5 5 5 (C2,F2) 10 10 10 10 10 10 (C4,F4) 10 10 10 10 10 10 10 10 (C8,F8) 10 10 10 10 10 10 10 10 Worst Running Times (in Seconds) for Instances of Each Completed Class (C1,F1) 20 89 23 518 42,998 0 0 74 (C2,F1) 18 86 1725 8 1 (C4,F1) 36 46 291 92 (C8,F1) 35 803 13 46 33,789 (C2,F2) 0 0 0 0 2 25 (C4,F4) 0 0 0 0 0 0 0 227 (C8,F8) 0 0 0 0 0 0 0 0 Table 4: Results for our MIP optimization code on set-disjoint instances. hours. For our testbed in general, the code tends to run into trouble as the number of customers grows beyond 100, with exceptions when the number of facilities is also relatively small. Its running times seem clearly to be growing in exponential fashion as |C| increases. Note also that, when all vertices are potential facility locations, reducing the number that are also customers can actually make the instance harder. 7.1.2. Lower Bounds and Solutions via our HSLB Code Fortunately, the exponential behavior of our MIP code is not an insurmountable difficulty in the case of our set-disjoint instances. Not only did our HSLB code produce a lower bound that equals the optimal solution value for all our instances, but the hitting set it constructed was always itself a feasible, and hence optimal, solution. Moreover, it took no more than 4 seconds on any instance besides R5500, for which it only took 22 seconds. In general, it was far faster than any of our heuristics, often by a factor of 100 or more, even though it involves finding an optimal solution to an instance of the NP-hard Hitting Set problem. Moreover, its space requirements are much less than those of our heuristics, given that the (Customer,Neighbor,Facility) triples it stores are far fewer in number than the standard (Customer,Facility,Facility) triples required by the heuristics (and stored by them in triplicate). Consequently, for our largest instance, R5500, it required just over 1 GB, whereas the heuristics need in excess of 65 GB. 7.1.3. The Heuristics As for the heuristics, the “best-of-400-iterations” versions of Greedy, SHS, and our two variants on DHS also all performed well in general on our test bed, although two instances were seriously problematical for at least one of them. The best solutions found (over 400 runs) by SHS were optimal for all the instances in our testbeds, both synthetic and ISP-based. DHSH and Greedy performed almost as well. The former failed to produce an optimal solution for just two instances, on one missing optimal by just a little, but on the other missing by a lot. Its solution for one of our (C1,F1), |V | = 984 synthetic instances was one facility larger than optimal, but its solution for the ISP-based instance R1000 was off by more than a factor of 3. Greedy was optimal for all our synthetic instances and all but three 30 Algorithm HSLB Triple Gen SHS DHS1 DHSH Greedy HSLB Triple Gen SHS DHS1 DHSH Greedy R200 R300 R500 R700 R1000 R1400 R3000 Linux Machine(s), Compiled without Optimization 0.1 0.1 0.4 0.3 1 1 4 0.1 0.2 0.9 1.4 4 8 41 7.3 4.7 68.3 32.0 125 361 452 7.2 6.7 73.1 37.9 147 389 524 8.4 11.6 74.1 75.8 396 730 1165 11.8 14.0 116.1 90.9 578 704 2171 MacBook Pro, Compiled with Optimization 0.8 0.7 1.2 1.0 1 1 3 0.5 0.5 0.8 0.9 2 3 14 2.2 2.0 17.7 8.8 32 94 179 2.4 2.5 19.0 13.4 44 113 265 2.5 2.3 19.8 14.9 130 119 277 3.2 4.1 30.3 25.9 188 198 866 R5500* 23 1,800 23,170 24,560 47,970 70,100 14 - Table 5: Running times in seconds for triple construction, full 400-iteration heuristic runs, and HSLB computations. *For R5500, all Linux times except those for HSLB are on the slower of our two machines, because of memory constraints, and for 80-iteration runs. Memory constraints also prevented running anything except HSLB on the MacBook Pro for this instance. of our ISP-based instances. It was slightly worse than DHSH on R1000 and off by a factor of 2.2 on R5500. Its third nonoptimality was minor, consisting of a solution with one more facility than optimal on the second of five (C2,F1) variants on R500. Although DHS1 found optimal solutions on all our ISP-based instances, if failed to find optimal solutions for seventeen of our synthetic instances, six of the ones with |V | = 558 and eleven of those with |V | = 984, including the one that on which DHSH failed. On twelve it was off by one facility, on four it was off by two, and on one it was off by five. In no case, however, was the discrepancy greater than 3.3%. The better of the DHSH and DHS1 solutions was always optimal. To further compare these heuristics, let us consider two other metrics, running time and robustness, together with the tradeoffs between the two. See Table 5, which reports the running times in seconds for the 400-iteration versions of our heuristics on our faster Linux machine (80-iteration runs on our slower machine for R5500, which would not fit on the faster machine), and on our MacBook Pro, where Gurobi 5.6 replaced CPLEX 11.0 as our MIP solver, and we compiled with the -O2 optimization flag set. The instances covered are the largest ones in our testbed for each ISP topology with |V | ≥ 200, i.e., the single instance for each topology where we knew the OSPF weights and router types, and the (C1,F1) instance for each of the instances where we optimized the weights ourselves. For comparison purposes, the table also breaks out the time devoted to constructing the triples used by the heuristics, and the times for our code that computes the HSLB and determines whether the optimal hitting set produced is a feasible solution. Running times for our synthetic instances of similar sizes were roughly comparable. The algorithms are typically ranked SHS, DHS1 DHSH , Greedy in order of increased running times for both machines, although there are minor inversions for a few instances. The large differences typically seen between DHSH and DHS1 on the Linux machines occurred for only one instance (R1000) on the MacBook Pro runs. The fact that, for the smaller instances, the running times for HSLB and triple generation are larger on the optimized MacBook Pro runs than on the unoptimized Linux runs is attributable to larger system times for triple construction. For the (facility,neighbor,facility) triples used in computing the HSLB, the system time was roughly 0.7 seconds, independent of instance size, on the MacBook Pro, versus 0.1 seconds on the Linux machine, and the differences in system times for computing standard triples in our heuristics were similar. It is interesting to note that, on both machines, the growth in user time for triple construction appears to be somewhat slower than our theoretical bound of Θ(|V |3 ), although no firm conclusions can be 31 k 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 N = 100 0.77855704 0.60577044 0.47103323 0.36603234 0.28425652 0.22060891 0.17110232 0.13261956 0.10272511 0.07951729 0.06151216 0.04755251 0.03673647 0.02836164 0.02188134 N = 200 0.60615106 0.36695782 0.22187230 0.13397967 0.08080177 0.04866829 0.02927600 0.01758795 0.01055245 0.00632300 0.00378375 0.00226124 0.00134957 0.00080438 0.00047879 N = 400 0.36741911 0.13465804 0.04922732 0.01795055 0.00652893 0.00236860 0.00085708 0.00030934 0.00011135 0.00003998 0.00001432 0.00000511 0.00000182 0.00000065 0.00000023 N = 800 0.13499680 0.01813279 0.00242333 0.00032222 0.00004263 0.00000561 0.00000073 0.00000010 0.00000001 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 N=1600 0.01822414 0.00032880 0.00000587 0.00000010 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 Table 6: Probabilities of failure to find an optimal solution in N independent runs when the probability of finding one in 400 runs is k/400. drawn given the differences in topology and weight settings for the various instances. The general take-away from these results, however, is that all of our algorithms have running times that would be practical in the context of our proposed applications, where the time for implementing a solution will still greatly exceed the time to compute it. The main obstacle to practicality is the memory requirement for instances significantly larger than R3000, and in the final section of this paper, we will discuss ways that this memory requirement might be reduced while keeping running times practical. Of course, although running time is not a substantial obstacle, it is always worthwhile to find ways to reduce it (beyond simply using optimized compilation). One obvious way would be to perform fewer than 400 iterations. Conversely, we might want give up running time and perform more iterations, if that would improve the robustness of our results. How robust are they? In the context of our experiments, let k be the number of runs (out of our 400) that returned an optimal solution. We can then roughly estimate the probability of finding an optimal solution to be k/400, and the probability that such a solution will not be found if we perform another N independent random runs is ((400 − k)/400)N . Table 6 gives the probabilities for 1 ≤ k ≤ 15 and N ∈ {100, 200, 400, 800, 1600}. Using this table, we can evaluate the likely robustness of our heuristics, based on the instances with the smallest values of k for each heuristic. If we want to reduce the failure probability to, say, 0.1%, we would need to have observed a 400-iteration success count of 2 if we were going to perform 1600 iterations, 4 if 800 iterations, 7 if 400 iterations, 14 if 200 iterations, and more than 15 if 100 iterations (actually, a count of 27 would suffice in this case). Given that the counts given by single 400-iteration runs give noisy estimate of the true probabilities, it might be safer to inflate the above count thresholds in practice. To help us evaluate our four heuristics in this context, Table 7 gives the 15 smallest success counts for each, both for synthetic and ISP-based instances, together with derived counts for an algorithm DHS1H , which performs 200 runs each for DHS1 and DHSH , and reports the best solution overall. Note that the entries for the derived heuristic are not simply the averages of the values for DHS1 and DHSH in the same row of the table, since these may represent counts for different instances – the hardest instances for one of the two need not be the same as those for the other. The counts tend to be higher for our ISP-based instances, since 15 represents over 21% of our 70 instances of that type, whereas it represents only about 2.4% of our 630 synthetic instances, Based on the results in the table, one can conclude that Greedy is the most robust for synthetic instances, with SHS almost as good. Neither DHS1 nor DHSH is competitive for such instances, and their combination seems less robust than DHSH , the better of the two, by itself. In contrast, 32 k 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 SHS 10 10 13 16 39 47 52 57 57 60 64 65 65 67 67 Synthetic Instances DHS1 DHSH DHS1H 0 0 0.0 0 1 0.5 0 1 1.0 0 4 2.0 0 4 2.0 0 5 2.5 0 5 3.5 0 6 3.5 0 8 4.0 0 8 4.0 0 9 4.5 0 9 5.0 0 10 5.0 0 10 5.5 0 10 6.0 Greedy 10 19 29 50 52 55 61 65 66 69 72 74 79 80 82 SHS 1 25 27 35 68 73 80 91 95 101 110 136 139 163 177 ISP-Based Instances DHS1 DHSH DHS1H 3 0 6.0 5 0 8.5 13 0 20.5 23 1 21.0 37 7 26.5 40 14 40.0 44 28 41.5 49 30 44.0 60 44 58.0 67 46 68.0 68 56 79.5 80 68 87.0 100 93 100.0 107 100 100.0 123 100 103.5 Greedy 0 0 7 7 29 29 33 35 53 57 66 85 88 89 98 Table 7: The 15 smallest numbers of optimal solutions found in 400 independent runs over synthetic and ISP-based instances. for the ISP-based instances, the combination is distinctly more robust than either DHS1 or DHSH alone, and also dominates Greedy, although SHS is the best overall, having only one count less than 25. The corresponding instance, where SHS found an optimal solution only once in 400 times, is troublesome, however. This suggests performing a hybrid of SHS with one of our other three heuristics (again running each 200 times and taking the best). If we blend with Greedy, the smallest counts are 61 (synthetic) and 6.0 (ISP-based). Blending with DHS1 yields corresponding smallest counts of 34.5 and 9.0, and blending with DHSH yields smallest counts of 46.5 and 10.0. The last choice would seem to be the best overall, as 400 total iterations should likely be enough to keep the failure rate for all instances less than 0.1%, and, depending on the accuracy of our sample, 200 iterations might suffice. All three blends, however, offer significant improvements in robustness over any of the individual heuristics. 7.1.4. Challenging HSLB: Equal-Weight Edges Given the fact that our HSLB code produced hitting sets that were optimal solutions for all 700 instances in our set-disjoint testbed, one might wonder why we should bother with heuristics at all for the set-disjoint case. Perhaps instances where the HSLB is smaller than the optimal solution value, or where the HSLB solution is otherwise infeasible, simply do not arise in practice, possibly because of the restricted topologies in real world LAN/WANs and ISP networks, or because edge weights are optimized to manage traffic. To investigate the latter possibility, we repeated our experiments with all the weights set to 1 – not a very good choice for traffic management, but certainly a natural default, and one that yields a major change in the set of triples in the derived “cover-by-pairs” instances, as observed in Section 6.3. With these instances, the hitting sets constructed by our HSLB code were still legal and hence optimal covers for all 70 of our ISP-based instances. However, for 51 of our 630 synthetic instances, the hitting set was not a legal cover, and for nine of these, the best solution found by our 400iteration SHS run was still larger than the computed lower bound (although never by more than 2.1%). These were all (C1,F1) instances, five with |V | = 984, three with |V | = 558, and one with |V | = 250, and in all nine cases, the HSLB nevertheless continued to equal the optimal solution size. The optimal solutions for these nine were not found by any of our 400-iteration runs of DHS1 or DHSH . As in our experiments on the synthetic instances in our standard testbed, it was Greedy that proved to have the best synergies with SHS. Our 400-iteration runs of Greedy 33 Synthetic Instances ISP-Based Instances Class 50 100 190 220 250 300 558 984 R100a R100b R200 Number of Instances Solved in Less Than 24 Hours by MIP (C1,F1) 10 10 10 10 10 1 1 1 (C2,F1) 10 10 9 5 5 (C4,F1) 10 10 8 5 5 3 (C8,F1) 10 10 9 5 5 5 (C2,F2) 10 10 10 10 10 10 (C4,F4) 10 10 10 10 10 10 10 10 (C8,F8) 10 10 10 10 10 10 10 10 Worst Running Times (in Seconds) for Instances of Each Completed Class (C1,F1) 21 9 28 19,362 78,660 0 0 146 (C2,F1) 18 212 17 21 (C4,F1) 35 818 335 474 (C8,F1) 25 321 50 644 40,739 (C2,F2) 0 0 0 0 4 13 (C4,F4) 0 0 0 0 0 0 0 8106 (C8,F8) 0 0 0 0 0 0 0 0 Table 8: Results for our MIP optimization code on vertex-disjoint instances. found solutions matching the HSLB for three of the 984’s, for one of the 558’s, and for the 250. For the remaining four instances, we needed to increase the number of iterations. For the two remaining 984’s, 4000-iteration runs of SHS found solutions matching the HSLB. For one of the two remaining 558’s, a 100,000-iteration run of Greedy found a lower-bound matching solution (three times), although a 200,000-iteration of SHS failed to find any. For the other remaining 558, a 100,000-iteration run of SHS found a lower-bound matching solution (twice), although a 200,000-iteration run of Greedy failed to find any. Thus the track record of HSLB equaling the optimal solution value for “real world” WAN and ISP topologies remains unblemished. We can conclude, however, that we should not count on our HSLB code always producing feasible optimal solutions, and that SHS and Greedy remain valuable, and complementary, backups. 7.2. 7.2.1. Accuracy and Running Times for the Path-Disjoint Case Optimization via our MIP Code Table 8 summarizes our optimization results for the path-disjoint versions of our instances, and shares the format of Table 4, which covered the set-disjoint versions. Once again, we report the number of instances of each class that were solved to optimality within 24 hours, and, for each class with all instances so solved, the worst running time encountered, as a measure of robustness. Note that we were able to solve about the same number of instances of each type within the 24-hour time bound as we did in the set-disjoint case, with the worst time for each type usually slightly worse. In more extended runs, we were able to compute the optimum for the one missing |V | = 190, (C2,F1) synthetic instance (in 39 hours), and the two missing R200, (C4,F1) ISP-based instances (in 49 and 77 hours). The results for the arc-disjoint versions of our path-disjoint instances were roughly the same as reported in Table 8 for the vertex-disjoint versions. We were able to solve essentially the same types of instances as before, with times that were roughly equivalent. The maximum for each class tended to be shorter for the arc-disjoint versions, although not so often as to provide a statistically meaningful distinction. 34 Algorithm R200 R300 R500 R700 R1000 R1400 Linux Machine(s), Compiled without Optimization Path-disjoint Triple Gen 1.0 1.2 6.9 8.2 56 72 Arc-disjoint Triple Gen 0.7 0.6 4.9 5.4 33 39 Set-disjoint Triple Gen 0.1 0.2 0.9 1.4 4 8 Path-disjoint Greedy(400) 19.7 22.6 154.8 130.3 715 664 Arc-disjoint Greedy(400) 20.3 20.3 154.3 96.1 767 548 Set-disjoint Greedy(400) 11.8 14.0 116.1 90.9 578 704 MacBook Pro, Compiled with Optimization Path-disjoint Triple Gen 0.7 0.7 2.7 3.5 17 24 0.6 0.6 1.5 1.8 9 10 Arc-disjoint Triple Gen Set-disjoint Triple Gen 0.5 0.5 0.8 0.9 2 3 Path-disjoint Greedy(400) 4.6 5.4 38.3 35.8 239 224 Arc-disjoint Greedy(400) 4.4 5.2 36.3 32.7 254 198 Set-disjoint Greedy(400) 3.2 4.1 30.3 25.9 188 198 R3000 R5500* 558 262 41 3612 2801 2171 17,400 11,200 1,800 79,000 68,500 70,100 347 95 14 1865 1360 866 - Table 9: Running times in seconds for triple construction and Greedy(400) runs on path-disjoint instances (both vertex- and arc-disjoint versions), with results for set-disjoint instances included for comparison. *For R5500, all Linux times except those for HSLB are on the slower of our two machines, because of memory constraints, and for 80-iteration runs. 7.2.2. Heuristic Results In evaluating heuristics for the path-disjoint case, we suffer from several limitations in comparison to the set-disjoint case. First, the HSLB no longer applies, so we do not have a good standard of comparison for those instances that our MIP approach failed to solve. Second, we cannot use SHS or either of our DHS heuristics, which only apply to the set-disjoint case, and so only have Greedy(400) and its higher-iteration variants (including Genetic) to consider. Fortunately, Greedy(400) seems to do very well. It finds the optimal solution on all the instances for which that is known, and we have not been able to find any better solutions than the ones it provides on any of the instances for which the optimum is not known. In particular, we performed 1000-generation runs of our Genetic algorithm, on each of these instances, and only matched the Greedy(400) solutions on each. We had hopes that, if anything could improve on Greedy(400), then Genetic would, based on results we obtained in the set-disjoint case. There, Genetic found optimal solutions for two of the three ISP-based instances where Greedy(400) failed to find the optimum (the third was R5500, which was far too large for Genetic to handle). Most impressively, for R1000 it found the optimum, whereas the best of even 100,000 independent runs of Greedy was over three times optimal. The failure of Genetic to find any improvements in the path-disjoint case thus at least suggests that our Greedy(400) path-disjoint results might indeed be optimal across the board. The results were also robust. For each of our 720 synthetic instances, the best solution found was found at least 20 times out of 400. For each of our 69 ISP-based instances other than R5500, the best solution found was found at least four times out of 400 (and for all but one, the count was 34 or greater). The best solution for R5500 was found 72 times out of 80. For the arc-disjoint versions of our path-disjoint instances, the results were again similar, both as to accuracy and robustness. For every instance where the optimum was known, Greedy(400) found it. For all 720 synthetic instances, the best solution found was found at least 34 times out of 400. For all 69 ISP-bases instances other than R5500, the best solution found was found at least six times out of 400 (and for all but one, the count was 41 or greater). The instance with the low count was the same for both vertex- and arc-disjoint versions of the problem. The best solution for R5500 was found 79 times out of 80. As to running times, see Table 9, which mimics Table 5 in covering the maximum-customer 35 versions of our ISP-based instances with more than 200 vertices, and both the times for triplegeneration and the overall Greedy(400) times. As before, we present running times for unoptimized code on our Linux machines and optimized code on our MacBook Pro. We list times for both the vertex- and arc-disjoint versions of our path-disjoint instances, and, for comparison purposes, copy from Table 5 the corresponding times for our set-disjoint instances. Recalling from Table 3 that the number of triples associated with an instances increases as one goes from set-disjoint to vertex-disjoint to arc-disjoint instances, one might expect running times to behave similarly, but this is not the case. For triple generation, the arc-disjoint triples take less time to generate than the vertex-disjoint ones. The explanation for relative triple-generation running times is algorithmic. As described in Section 5.5, the path-disjoint constructions should take longer than the set-disjoint ones because they need an extra network-flow step, and the vertex-disjoint constructions take longer than the arc-disjoint ones because they need to add an extra edge for each vertex in order to insure vertex-disjointness as well as arc-disjointness. Note, however, that, as with the set-disjoint case, the time for vertex- and arc-disjoint triple generation again may well be growing at slightly less than the cubic rate of our worst-case analysis. Our overall running times also do not precisely track triple counts The times for the pathdisjoint versions of the instances are indeed significantly slower than for the set-disjoint versions (except in the case of R1400), but once again the arc-disjoint times tend to be faster than those for the vertex-disjoint versions. Further study will be needed to understand these discrepancies. 7.3. Cost Reduction In this section we consider the savings our heuristics can provide over simply choosing the cover consisting of the set C of all customer vertices, which is always a feasible solution, and would be the default solution for network path monitoring if we did not use our proposed monitoring scheme. We first consider the results for our synthetic instances. Table 10 presents our results for the seven classes of instances for each value of |V | ∈ {984, 558, 300, 190, 100}. (For space reasons, we omit the results for |V | ∈ {250, 220, 50}, but they do not evince any strikingly different behavior.) For each algorithm and instance class, we give both the average percentage of customers that are in the covers produced by the algorithm, and (in parentheses) the percentage reduction over the results in the column to the left. Here “Greedy” stands for Greedy(400), the algorithm that takes the best of 400 independent runs of Greedy. “Opt” stands for the cover produced by our HSLB code for set-disjoint instances, which for these instances was always optimal. “DP” stands for the optimum when we do not require our vertex-disjoint paths to be shortest paths, as computed by the linear-time dynamic programming algorithm described in Section 3.2. This value is not relevant to either of our applications, but does provide a lower bound on what is possible in the path-disjoint case. These results clearly show that using our scheme for disjoint path monitoring offers a substantial reduction in the number of vertices needed to cover all the customers. In the set-disjoint case, the reduction is typically by a factor of 4 or more for the (C1,F1) instances, in which all vertices are customers, and grows to a factor of 6 when |V | ∈ {558, 984}. As the proportion of vertices that are customers is reduced for a given value of |V |, the savings decreases, but is always more than 29%. Perhaps not surprisingly, when not all vertices are customers, the reduction is greater in the (Ck,F1) classes, where all vertices are potential facility locations, than in the (Ck,Fk) classes, where the only potential facility locations are the customers themselves. Note that, as remarked before, Greedy(400) finds optimal set-disjoint solutions in all cases, so we omit the parenthetical “percentage reduction” column for Opt. Going from the set-disjoint to the path-disjoint instances requiring vertex-disjointness typically offers a significant reduction (up to 7% in the (C1,F1) classes with |V | ∈ {558, 984}), although the percentage reduction declines with |V | and |C|. Only requiring arc-disjoint paths often yields a small additional improvement, although typically less than 1%. Allowing unbounded vertex-disjoint paths would allow a much more significant reduction, up to almost 40% in one case, and typically more for the (Ck,Fk) classes, k ≥ 2, than in the corresponding (Ck,F1) classes, although the actual 36 Set-Disjoint Path-Disjoint Arc-Disjoint Greedy 15.1 (0.0) 23.1 (0.4) 23.9 (0.2) 37.4 (0.3) 38.3 (0.2) 55.1 (0.0) 57.1 (0.1) Class (C1,F1) (C2,F1) (C2,F2) (C4,F1) (C4,F4) (C8,F1) (C8,F8) |C| 984 492 492 246 246 123 123 Greedy 16.2 (83.8) 24.0 (76.0) 25.7 (74.3) 37.9 (62.1) 40.1 (59.9) 55.4 (44.6) 58.2 (41.8) Opt 16.2 24.0 25.7 37.9 40.1 55.4 58.2 Vertex-Disjoint Greedy 15.1 (7.1) 23.2 (3.6) 23.9 (6.9) 37.5 (1.1) 38.4 (4.4) 55.1 (0.6) 57.2 (1.8) 558 (C1,F1) (C2,F1) (C2,F2) (C4,F1) (C4,F4) (C8,F1) (C8,F8) 558 279 279 140 140 70 70 16.0 24.6 25.8 37.8 42.1 56.3 60.0 (84.0) (75.4) (74.2) (62.2) (57.9) (43.7) (40.0) 16.0 24.6 25.8 37.8 42.1 56.3 60.0 14.9 23.6 24.5 37.1 41.2 56.1 59.1 ( ( ( ( ( ( ( 7.3) 4.2) 5.3) 1.7) 2.2) 0.3) 1.4) 14.9 23.5 24.4 37.1 41.1 56.1 58.7 ( ( ( ( ( ( ( 0.0) 0.2) 0.1) 0.0) 0.3) 0.0) 0.7) 10.7 19.6 19.2 34.4 34.6 53.0 54.7 (28.3) (16.7) (21.4) ( 7.3) (15.7)) ( 5.6) ( 6.8) 300 (C1,F1) (C2,F1) (C2,F2) (C4,F1) (C4,F4) (C8,F1) (C8,F8) 300 150 150 75 75 38 38 24.0 33.7 36.1 49.1 50.8 64.5 68.4 (76.0) (66.3) (63.9) (50.9) (49.2) (35.5) (31.6) 24.0 33.7 36.1 49.1 50.8 64.5 68.4 23.0 32.6 34.8 47.7 50.0 63.7 68.4 ( ( ( ( ( ( ( 4.2) 3.2) 3.5) 2.7) 1.6) 1.2) 0.0) 23.0 32.6 34.8 47.7 49.9 63.7 68.4 ( ( ( ( ( ( ( 0.0) 0.0) 0.0) 0.0) 0.3) 0.0) 0.0) 14.9 25.2 24.7 41.1 40.5 58.4 57.4 (35.5) (22.7) (29.1) (14.0) (18.7) ( 8.3) (16.2) 190 (C1,F1) (C2,F1) (C2,F2) (C4,F1) (C4,F4) (C8,F1) (C8,F8) 190 95 95 48 48 24 24 28.7 40.3 41.7 55.8 55.4 67.1 70.8 (71.3) (59.7) (58.3) (44.2) (44.6) (32.9) (29.2) 28.7 40.3 41.7 55.8 55.4 67.1 70.8 27.7 39.6 40.2 55.2 54.4 66.7 70.8 ( ( ( ( ( ( ( 3.5) 1.8) 3.5) 1.1) 1.9) 0.6) 0.0) 27.7 39.6 40.1 55.2 54.4 66.7 70.8 ( ( ( ( ( ( ( 0.0) 0.0) 0.3) 0.0) 0.0) 0.0) 0.0) 21.0 33.4 33.2 51.7 47.7 60.4 61.2 (24.3) (15.7) (17.3) ( 6.4) (12.3) ( 9.4) (13.5) 100 (C1,F1) (C2,F1) (C2,F2) (C4,F1) (C4,F4) (C8,F1) (C8,F8) 100 50 50 25 25 13 13 24.1 34.2 35.4 46.8 49.2 61.5 63.8 (75.9) (65.8) (64.6) (53.2) (50.8) (38.5) (36.2) 24.1 34.2 35.4 46.8 49.2 61.5 63.8 23.6 34.0 34.4 46.4 48.4 61.5 62.3 ( ( ( ( ( ( ( 2.1) 0.6) 2.8) 0.9) 1.6) 0.0) 2.4) 23.6 34.0 34.4 46.4 48.4 61.5 61.5 ( ( ( ( ( ( ( 0.0) 0.0) 0.0) 0.0) 0.0) 0.0) 1.2) 14.3 23.4 22.6 38.4 37.2 48.5 47.7 (39.4) (31.2) (34.3) (17.2) (23.1) (21.3) (22.5) |V | 984 Unbounded DP 10.7 (29.2) 19.1 (17.1) 19.0 (20.6) 34.2 ( 8.5) 33.3 (13.0) 52.3 ( 5.2) 51.2 (10.3) Table 10: Average percentages of customer vertices in algorithmically generated covers for all seven classes of our |V | ∈ {984, 558, 300, 190, 100} synthetic instances. Entries in parentheses are the percentage reduction in cover size from the results in the preceding column. 37 Set-Disjoint Instance R5500 R3000 R1400 R1000 R700 R500 R300 R200 R100a R100b Approx |C| 3200 1500 900 900 500 500 200 200 100 100 Greedy 37.7 (62.3) 1.8 (98.2) 14.3 (85.7) 35.5 (64.5) 4.9 (95.1) 13.9 (86.1) 4.1 (95.9) 7.6 (92.4) 10.9 (89.1) 10.9 (89.1) Opt 17.0 (55.0) 1.8 ( 0.0) 14.3 ( 0.0) 10.1 (71.5) 4.9 ( 0.0) 13.9 ( 0.0) 4.1 ( 0.0) 7.6 ( 0.0) 10.9 ( 0.0) 10.9 ( 0.0) Path-Disjoint Vertex-Disjoint Arc-Disjoint Greedy Greedy 2.8 (83.5) 2.8 ( 0.0) 1.3 (25.9) 1.3 ( 0.0) 3.2 (77.6) 3.2 ( 0.0) 3.8 (62.0) 3.8 ( 0.0) 2.8 (43.5) 2.8 ( 0.0) 12.4 (10.8) 12.4 ( 0.0) 3.6 (11.1) 3.6 ( 0.0) 6.7 (11.8) 6.7 ( 0.0) 7.8 (28.6) 7.8 ( 0.0) 7.8 (28.6) 7.8 ( 0.0) Unbounded DP 0.6 (80.0) 0.1 (90.0) 0.3 (90.0) 0.9 (77.1) 0.6 (76.9) 1.9 (84.8) 2.7 (25.0) 2.2 (66.7) 4.7 (40.0) 4.7 (40.0) Table 11: Average percentages of customer vertices in algorithmically generated covers for our 10 ISP-based instances. Entries in parentheses are the percentage reduction in cover size from the results in the preceding column. sizes of the covers still remain lower in the latter case. The results for our ISP-based instances are presented in Table 11, where we only include the (C1,F1) versions of those instances where we did not know the types of routers and so could not deduce what the actual sets F and C should be. The resulting value |C|/|V | = 1 is reasonably close to the corresponding values for the instances where we can estimate the actual sets F and C; for these the ratio ranges from about 0.6 to 0.9. Because the instances where we do have this information are proprietary, the column labeled by “|C|” only lists the value of C rounded to the nearest 100. The average cover sizes reported, however, are given as percentages of the true value of |C|. Note that in this table we do include a parenthetical improvement column for Opt over Greedy(400), since here there are improvements for two of the instances. As we can see, the effectiveness of our disjoint path monitoring scheme is even more substantial for these instances than for our synthetic ones. The best point of comparison is to the (C1,F1) variants of the latter, where the smallest ratio of set-disjoint cover size to |C| was roughly 16%. Here the largest percentage is 17%, and four of the ten are less than 10%, with the percentage for R3000 being just 1.8%. Moreover, going to the path-disjoint case now offers major improvements, in comparison to the at-most 7.3% improvement for our synthetic instances. Here the range is from 10.8% to 83.5%, and now all but one of our instances have covers with size less than 8% of |C|. Allowing arc-disjoint paths offers no further improvement. However, if one could consider arbitrarily long vertex-disjoint paths, even more substantial reductions are possible. Now half the instances have covers with size less than 1% of |C|. This should not be a surprise, however. As we already observed in Section 6.3, typically 95% or more of the vertices in our ISP-based instances are in a single large 2-connected component. By the definition of 2-connectedness, any two vertices in such a component will constitute a cover. Additional vertices are only needed to handle the few additional small components hanging off the large one. 8. Further Results and Directions The problems described here can be generalized in a variety of directions, for two of which we already have some preliminary results. 1. Variants of SDFL and PDFL in which we omit the requirement that every customer vertex also be a potential facility location (i.e., that C ⊆ F ). In our monitoring application, it might well be the case that some of the customer vertices are housed in locations that do not have enough free physical space to house our monitoring equipment, or are in leased space into which we do not have permission to add additional equipment. 38 2. Variants in which for each vertex a given nonnegative cost must be paid if that vertex is used as a facility, and our goal is to minimize total cost. Note that the second variant includes the first as a special case, since we can simply set the cost of each member of F to be 1 and the cost of all other vertices to be |F | + 1. Most of our algorithms and lower bounds carry over more-or-less directly to both types of generalization, with the two exceptions being the linear-time algorithms of Section 5 and Section 4.3 for computing the optimum covers in the special case of trees and our general lower bound for the path-disjoint case. Linear-time algorithms still exist for both of these tasks, but the simple combinatorial characterizations that previously sufficed must now be replaced by dynamic programs of some complexity. Our other algorithms and lower bounds carry over with almost no change for the first type of generalization. For the second type, the integer programs for computing the optimum and for computing the Hitting Set lower bound must change their objective functions so that the variables xf are multiplied by the corresponding costs. And the various cover-constructing heuristics must modify their greedy choices by taking costs into account, for instance by choosing the f ∈ F which yields the highest ratio (increase in coverage)/(cost of f ). One question that arises for the first type of variant that was not an issue in our original version of the problems is the question of feasibility. In the original version, where C ⊆ F , there was always a feasible cover, mainly the set C itself, with each customer covering itself. When not all customers are potential facility locations, it may be that no cover exists. Thus the first question one must ask is whether such a cover exists. This will be true if and only if the full set F is a valid cover, a property that can easily be checked in O(n2 m) tine by generating the corresponding SCP problem and verifying that there is a valid triple for each customer. We leave the empirical testing of our algorithms for these generalizations of SDFL and PDFL for further research. At present the variety of potential instance classes is too large for any one or two choices to provide meaningful insights, although future research into potential applications may identify particular instance classes whose practical relevance justifies such study. Acknowledgment David S. Johnson, the lead author of this paper, passed away on March 8, 2016. David’s co-authors dedicate this paper to his memory. The authors thank David Applegate for helpful discussions and in particular for simplifying the statement and proof of Theorem 5. The authors also thank Rodrigo Toso for implementing the version of Genetic used in the experiments. References A. V. Aho, J. E. Hopcroft, and J. D. Ullman. The design and analysis of computer algorithms. Addison-Wesley Publishing Company, Reading, Massachusetts, 1974. N. Alon, D. Moshkovitz, and S. Safra. Algorithmic construction of sets for k-restrictions. ACM Transactions on Algorithms, 2:153–177, 2006. J. Bean. Genetics and random keys for sequencing and optimization. ORSA Journal on Computing, 6:154–160, 1994. M. Bellare, S. Goldwasser, C. Lund, and A. Russell. Efficient probabilistic checkable proofs and applications to approximation. In Proceedings of the 25th Annual ACM Symposium on the Theory of Computing, pages 294–304, New York, NY, 1993. ACM. L. Breslau, C. Chase, N. Duffield, B. Fenner, Y. Mao, and S. Sen. Vmscope – A virtual multicast VPN performance monitor. In ACM SIGCOMM Workshop on Internet Network Management (INM), pages 59–64, 2006. 39 L. Breslau, I. Diakonikolas, N. Duffield, Y. Gu, M. Hajiaghayi, D. S. Johnson, H. Karloff, M. G. C. Resende, and S. Sen. Disjoint-path facility location: Theory and practice. In Proceedings of the 11th Annual Workshop on Algorithm Engineering and Experimentation (ALENEX), pages 60–74, 2011. H. Burch and C. Chase. Monitoring link delays with one measurement host. SIGMETRICS Performance Evaluation Review, 33(3):10–17, 2005. L. S. Buriol, M. G. C. Resende, and M. Thorup. Survivable IP network design with OSPF routing. Networks, 49(1):51–64, 2007. K. Calvert, M. Doar, and E. Zegura. Modeling internet topology. IEEE Communications Magazine, 35(6):160–163, 1997. U. Feige. A threshold of ln n for approximating set cover. Journal of the ACM, 45:634–652, 1998. Preliminary version in Proceedings of the 28th Annual ACM Symposium on the Theory of Computing, ACM, New York, 1996, 314–318. B. Fortz and M. Thorup. Internet traffic engineering by optimizing OSPF weights. In Proceedings of INFOCOM 2000: 19th Annual Joint Conference of the IEEE Computer and Communications Societies, pages 519–528. IEEE, 2000. J. F. Gonçalves and M. G. C. Resende. Biased random-key genetic algorithms for combinatorial optimization. Journal of Heuristics, 17:487–525, 2011. Y. Gu, L. Breslau, N. Duffield, and S. Sen. GRE encapsulated multicast probing: A scalable technique for measuring one-way loss. In IEEE Infocom 2008: The 27th Conference on Computer Communications, pages 1651–1659, New York, NY, 2008. IEEE Communications Society. R. Hassin and D. Segev. The set cover with pairs problem. In FSTTCS 2005: Proceedings of the 25th International Conference on Foundations of Software Technology and Theoretical Computer Science, volume 3821 of Lecture Notes in Computer Science, pages 164–176, Berlin, 2005. Springer-Verlag. D. S. Johnson. Approximation algorithms for combinatorial problems. Journal of Computer and System Sciences, 9:256–278, 1974. G. Kortsarz. On the hardness of approximating spanners. Algorithmica, 30:432–450, 2001. L. Lovász. On the ratio of optimal integral and fractional covers. Discrete Mathematics, 13:383–390, 1975. R. Raz and S. Safra. A sub-constant error-probability low-degree test, and a sub-constant errorprobability PCP characterization of NP. In Proceedings of the 29th Annual ACM Symposium on the Theory of Computing, pages 475–484, New York, NY, 1997. ACM. 40
8cs.DS
Towards Applicative Relational Programming H. Ibrahim and M.H. van Emden arXiv:cs/0602099v1 [cs.PL] 28 Feb 2006 16 March 1992 Abstract Functional programming comes in two flavours: one where “functions are first-class citizens” (we call this applicative) and one which is based on equations (we call this declarative). In relational programming clauses play the role of equations. Hence Prolog is declarative. The purpose of this paper is to provide in relational programming a mathematical basis for the relational analog of applicative functional programming. We use the cylindric semantics of first-order logic due to Tarski and provide a new notation for the required cylinders that we call tables. We define the Table/Relation Algebra with operators sufficient to translate Horn clauses into algebraic form. We establish basic mathematical properties of these operators. We show how relations can be first-class citizens, and devise mechanisms for modularity, for local scoping of predicates, and for exporting/importing relations between programs. 1 Applicative versus declarative definitions Some functional programming systems are applicative; others declarative. Relational programming, on the other hand, only exists in declarative form. In this section we explain how we use this terminology, and argue that relational programming should also have both declarative and applicative forms. 1.1 In functional programming There are two ways for defining functions in functional programming, one using λ-expressions and the other using equations. Consider for example the higher-order function “twice”. It can be denoted by the λ-expression “λf.λx.f (f x)”; we call this an applicative definition. This function can also be defined in a declarative style, that is, by asserting as true certain equations, as follows: twice F = g(F) g(F) X = F (F X) The characteristics of each style can be summarized in the first two columns of table 1. In the applicative style, functions can be results of functions, can be bound to variables, and so on. Hence they are much like other types of values. This is not the case in the declarative style. As a result, it is sometimes said that in the applicative style, functions are “first-class citizens.” Furthermore, it can be shown that the two styles have complementary strengths, namely local scoping and modularity in the applicative one, and a natural expression of recursion and selection in the declarative one. Thus it is valuable for a programmer to have both available and to be able to switch effortlessly between the two. In functional programming, the theory of such a combination has been developed and practical applications have been reported [1, 7] 1.2 In relational programming “Relational programming” is a natural counterpart for functional programming, with relations instead of function as basic entities. Logic programming, the best developed form of relational programming, is exclusively based on Horn clauses, which constitute a declarative paradigm. As the third column of table 1 suggests, a major problem in relational programming is the absence of an applicative language in which 1 2 Characteristics − P aradigms implicit element at a time declarative explicit whole function/relation applicative f unctional relational equations definite clauses λ − calculus ? Table 1: Classifying functional and relational definitions. relations can be first-class citizens. This paper develops the basis for such a language, keeping in mind the importance of it being first-order, and easily intertranslatable. 2 The meaning of Horn clauses As basis for applicative relational programming, we use an algebraic view of the meaning of Horn clauses. The following example serves as introduction. Consider the clause for relational composition: p(X, Z) ← q(X, Y ), r(Y, Z). Relation p is defined by means of operations on q, r, and the tuples of variables. We make these operations explicit by appealing to cylindric set algebra [4, 5]. Accordingly, a Horn clause can be interpreted as a relational inclusion where the right-hand side is a projection of the intersection of cylinders on the relations in the condition part. Consider, for example, the geometric interpretation of the clause as illustrated in figure 1. Figure 1: A geometric interpretation of relational composition: p contains the projection of the intersection of the cylinders on q and r. This can be expressed by a formula using the operators of T RA introduced in this paper. As a preview, we list the formula here: p ⊃ (X, Z)/(q : (X, Y ) ∩ r : (Y, Z)), where “:” is relational application yielding a cylinder, “∩” is intersection, and “/” is relational projection. To allows local scoping through λ-binding, we want to have p, q, and r as relational variables. This also allows minimization operators, such as µ [3], to apply as well. The result will be relation-valued expressions in a first-order setting. 2.1 Relational semantics for first-order logic. Truth-functional semantics for first-order logic is an assignment of a truth value to a closed formula, where this assignment is relative to a given interpretation that assigns meanings to constants, function symbols, and predicate symbols. Relational semantics assigns a meaning to a formula that may have free variables; i.e. an open formula. It gives as meaning the relation consisting of the tuples of individuals that, if assigned to the free variables in the formula, would give a true closed formula according to truth-functional semantics. For example, the meaning with respect to an interpretation I of the formula q(X, Y ) under relational semantics is the binary relation r = {(α, β)|q(α, β) is variable-free and true in I} For the benefit of further examples, suppose that the universe of discourse is {a, b, c}1 and that r = {(a, b), (b, c), (c, a)}. Note that the meaning of a relation under relational semantics is invariant under renaming of free variables. As a result, relational semantics is not a homeomorphism between the algebra of formulas and 1 The above footnote applies here also. 3 the algebra of relations. For example, if it were a homeomorphism, then the meaning of q(X, Y ) ∧ q(Y, Z) would be the intersection of the meanings of the conjuncts. Hence it would be r ∩ r = r. However, it should be the composition of r with itself according to the algebra of binary relations. Therefore we need something else: cylindric semantics, introduced in the following. Tarski’s cylinders. Tarski introduced a device that leads to a semantics for formulas that is a homeomorphism. Consider relations that are subsets of D1 × · · · × Dn (call this the domain product) and consider a relation b (call it the base) that is a subset of Dj1 × · · · × Djk where the selector, J = {j1 , . . . , jk } is a subset of {1, . . . , n}. Then πJ−1 (b) = {(x1 , . . . , xn )|xi ∈ Di , i = 1, . . . , n and (xj1 , . . . , xjk ) ∈ b} is the cylinder with base b, domain product D1 × · · · × Dn , and selector J. A cylinder, being a set of tuples of the same length, is always a relation. But a relation is not always a cylinder. For example, take a domain product with n equal to 3, D1 = D2 = D3 = {a, b, c}, with selector equal to {1, 2}, and with base r = {(a, b), (b, c), (c, a)}. Then the cylinder specified by these properties is { (a, b, a), (a, b, b), (a, b, c), (b, c, a), (b, c, b), (b, c, c), (1) (c, a, a), (c, a, b), (c, a, c) } Rather than to assign to a formula as meaning a relation according to relational semantics, Tarski assigns a cylinder on this relation. He assumes an enumeration of all variables in the language. This gives a set J = {j1 , . . . , jk } of integers for a formula with k free variables. The semantics according to Tarski then assigns to the formula as meaning the cylinder determined by J as selector on the base that is the relation obtained by relational semantics. Such a semantics is a homeomorphism where conjunction corresponds to intersection. Other syntactic constructs correspond to other operations in what Tarski calls “cylindric set algebra.” To return to our example, suppose X, Y , and Z are the only variables in the language (hence n = 3), and are enumerated in this order. Then the free variables of q(X, Y ) correspond to the selector J = {1, 2}. According to Tarski, the meaning of q(X, Y ) is then cylinder 1. The free variables of q(Y, Z) correspond to the selector J = {2, 3}. According to cylindric semantics, the meaning of q(Y, Z) is then { (a, a, b), (b, a, b), (c, a, b), (a, b, c), (b, b, c), (c, b, c), (a, c, a), (b, c, a), (c, c, a) } (2) The meaning of q(X, Y )∧q(Y, Z) is the intersection of these two cylinders, that is, {(a, b, c), (b, c, a), (c, a, b)}. According to Tarski, the meaning of ∃Y.q(X, Y ) ∧ q(Y, Z) is obtained by projecting this with selector J = {1, 3}. The result is {(a, c), (b, a), (c, b)}, which is the relational composition of r with itself. In this paper we define an algebra operating on cylinders and relations that allows us to translate to algebraic form the definite clauses of Prolog. We call it TRA, for Table/Relation Algebra. The current example serves to give a preview of this translation. Let a relational composition be defined by the clause p(X, Z) ← q(X, Y ), q(Y, Z). In classical syntax this is (∃Y.q(X, Y ) ∧ q(Y, Z)) ⊃ p(X, Z). As we just observed, the condition has as meaning the projection on (X,Z) of the intersection of the cylinders denoted by q(X, Y ) and q(Y, Z). In general, we shall see that a definite clause asserts, interpreted in terms of TRA, that the meaning of the conclusion includes the projection (determined by the variables in the conclusion) of the intersection of the cylinders that are the meanings of the conditions. 4 2.2 Cylinders defined as tables. It is rare to be able to list, as a set of tuples, a cylinder that is a meaning of a formula; the language usually has infinitely many variables, so that the tuples are very long. Moreover, there are often infinitely many tuples in the cylinder. But there is no problem specifying such a cylinder, as we only need to specify the base relation and the selector (the domain product is usually implicitly understood). For example, cylinder 1 can be specified by the set of substitutions {{X = a, Y = b}, {X = b, Y = c}, {X = c, Y = a}}, as this specifies that the base relation of the cylinder is {(a, b), (b, c), (c, a)} and that the selector is {1, 2}, which corresponds to the variables X and Y in the enumeration. Sets of substitutions of this type, where the substituted variables in each are the same, play a central role in this paper. Observe, in the first place, that a table is a natural notation for such a set of substitutions. The right-hand sides make up the lines of the table, while the left-hand sides need not be repeated, hence can be the headings of the table’s columns; see table 2. Because of this, we call such sets of substitutions “tables.” X a b c Y b c a Table 2: A table for cylinder 1. In the second place, observe that the set of answers to a Prolog query is a table. For example, suppose that the logic program P is the set of facts {q(a, b), q(b, c), q(c, a)}. The query ?– q(X, Y ) produces table 2 as set of answer substitutions. 3 The Table/Relation Algebra (TRA) TRA is an algebra of operations on relations, tables, queries, and logic programs. It facilitates translation to and from definite clause form, and also facilitates scoping and modularity. We define an n-ary relation over a Herbrand universe H to be a set of n-tuples of elements of H. Prolog’s answer substitutions for the set of variables in a query can be regarded as a set of equations in solved form; i.e. all left-hand sides are variables that occur only there [6]. Restricting the solved forms to have a common set of variables as left-hand sides makes it natural to present a set of answer substitutions as a table. Hence we define an n-ary table to be a set of sets of equations in solved form, where each set of equations in the table has the same set of n variables as left-hand sides. The reason for calling the concept just defined “table” is that these sets of equations can be most economically represented in print as a table where the left-hand sides are the headings of the columns (analogous to the attributes of relational data models) and the right-hand sides are the entries of the table. A difference with the relational data model is that in our concept of table the entries can be terms of any complexity containing variables without any restriction. 3.1 Tables as queries on logic programs. Tables, as defined above, can be obtained, in logic programming, as follows: Definition 1 Let P be a logic program, let Q be a query, and let T be an SLD-tree for P and Q. Then the expression (Q where P ) has as value the table of the answer substitutions associated with all the success leaves of T . 5 When in Prolog a query Q fails for a logic program P , there are no answer substitutions and the table (Q where P ) is empty. We use the symbol ⊥ (bottom) for all of the empty tables {}. We use another special symbol ⊤ (top) for the table consisting only of the empty answer substitution {{}}, which results from a successful SLD-derivation starting in a query with no variables. The following lemmas follow from the definition of “where”. Lemma 1 θ ∈ (Q where P ) implies that θ is a correct answer substitution for {Q} ∪ P. Lemma 2 For every correct answer substitution θ for {Q} ∪ P , ∃ η ∈ (Q where P ) such that θ is an instance (with respect to the Herbrand universe) of η. Lemma 3 The value of (Q where P ) does not depend on the SLD-tree T in definition 1. 3.2 Intersection of tables Tables are a convenient notation for cylinders. As the intersection of cylinders is important, we need to define intersection between tables. Let θ1 and θ2 be answer substitutions to the queries G1 and G2 respectively, and consider the query ?– G1 , G2 . When G1 and G2 have a common variable, θ1 ∪ θ2 is not in solved form and may not be solvable. However, as Colmerauer [2] observed, the solved form of θ1 ∪ θ2 , if it exists, is an answer substitution for the query ?– G1 , G2 . Hence: Definition 2 The intersection operation of tables S and T is def S ∩ T = {φ(s ∪ t) | s ∈ S, t ∈ T, and ψ(s ∪ t)}. Here ψ(s) means that its argument set of equations is solvable; φ(s) is only defined when s is solvable and then it denotes the solved form of s. For example, if relation q, as defined in a program P , is {(a, b), (b, c), (c, d), (d, e)}, then the result of the query ((← q(X, Y )) where P ) ∩ ((← q(Y, Z)) where P ) is table 3. X a b c Y b c d Z c d e Table 3: A table from intersection of two tables. The reason for choosing the name “intersection” and the symbol “∩” is given by the following Theorem 1 For all tables S and T, S ∩ T is the set intersection of S and T regarded as cylinders (hence relations, hence sets). It is easy to verify the following properties about the intersection of tables: Theorem 2 ∩ is associative and commutative. ∩ has a unique null element, which is ⊥ and a unique unit element, which is ⊤. Theorem 3 For any program P and goal statements G1 , G2 and G which consists of all goals in G1 and G2 , we have (G1 where P ) ∩ (G2 where P ) = (G where P ). 6 Modularity The previous theorem suggests using the combination of where and ∩ as a modular compositional tool, as in the following example: ((← F1 , F2 ) where P ) ∩ ((← G) where Q). Thus we see that within the same table it can be specified of each goal with respect to which program it is defined. 3.3 From relations to tables We often need to get a table out of a relation, rather than from a program by posing a query. For this we define the relational application operator “:”. We introduce its definition through a heuristic development. Let r be the n-ary relation {(a1 , . . . , an ), (b1 , . . . , bn ), (c1 , . . . , cn )}. A table “most like” r can be easily constructed by adding as a heading a set of n distinct variables, say X1 , . . . , Xn , as in table 4. This table X1 a1 b1 c1 ··· ··· ··· ··· Xn an bn cn Table 4: A table “most like” r. can then be identified using an arbitrary predicate symbol, say p, as follows: (← p(X1 , . . . , Xn )) where {p(e1 , . . . , en ) | (e1 , . . . , en ) ∈ r}. The obvious generalization of allowing any terms t1 , . . . , tn instead of the distinct variables suggests def r : (t1 , . . . , tn ) = (← p(t1 , . . . , tn )) where {p(e1 , . . . , en ) | (e1 , . . . , en ) ∈ r}. Though correct, its arbitrary and auxiliary predicate p is undesirable. It is easily verifiable that this definition is equivalent, operationally, to: Definition 3 The application operation of an n-ary relation r to a tuple (t1 , . . . , tn ) of terms is def r : (t1 , . . . , tn ) = {φ({t1 = e1 , . . . , tn = en }) | (e1 , . . . , en ) ∈ r and ψ({t1 = e1 , . . . , tn = en })}. 3.4 From tables to relations Just as we defined the application operator to get tables from relations, we define a projection operation to get relations back from tables. This operation should not merely discard the table’s “headings”2, as suggested in [9]. Instead, we present another heuristic development to define it properly. Let T be the previous table 4. Now, {(X1 θ, . . . , Xn θ) | θ ∈ T } is the relation resulting from discarding the heading; i.e. r above. To generalize, we first let {j1 , . . . , jk } be a subset of {1, . . . , n}. Then, {(Xj1 θ, . . . , Xjk θ) | θ ∈ T } is a projection of r over the (j1 , . . . , jk ) columns. Hence, projection is a way of getting a relation from a table. Secondly, allow any tuple (t1 , . . . , tk ) of terms instead of the variables (Xj1 , . . . , Xjk ) and consider {(t1 θ, . . . , tk θ) | θ ∈ T }. Since for an arbitrary table T any θ ∈ T may contain variables, the result must further be grounded in order to obtain a relation. Hence the final definition: Definition 4 The projection operation (denoted /) of a table T over a tuple of terms (t1 , . . . , tn ) is def (t1 , . . . , tn )/T = ξ({(t1 θ, . . . , tn θ) | θ ∈ T }), where ξ(x) is the set of variable-free instances of the expression x. 2 One reason is, as mentioned before, that our table’s contents include variables, whereas the elements of a relation’s tuples are variable-free. 7 3.5 Are project and apply inverses? Now that we have operations from tables to relations and vice versa, one may wonder whether these are each other’s inverses. The short answer is, in general, “no”, because ((t1 , . . . , tn )/T ) : (t1 , . . . , tn ) is not always the table T . Take, for example, the case that t1 , . . . , tn have no variables. Then the above expression is ⊤ whenever T is not ⊥. But the absence of variables in t1 , . . . , tn is a rather pathological case. When we add restrictions, we can say that, in a sense, “/” and “:” are each other’s inverses, as shown by the following theorems. Theorem 4 For all tables T and all terms t1 , . . . , tn in which all the variables, and no other ones, in T ’s heading occur, we have ((t1 , . . . , tn )/T ) : (t1 , . . . , tn ) = ξ(T ). For an inverse in the other direction, compare the n-ary relation r with (t1 , . . . , tn )/(r : (t1 , . . . , tn )). That this expression does not always equal r is shown by (c, d)/({(a, b)} : (c, d)) = {}, where a, b, c and d are constants. This example suggests: Theorem 5 For all n-ary relations r and all terms t1 , . . . , tn , we have (t1 , . . . , tn )/(r : (t1 , . . . , tn )) ⊆ r. However, by strengthening the restrictions, we can have equality instead of inclusion. Theorem 6 For all n-ary relations r and all distinct variables x1 , . . . , xn , we have (x1 , . . . , xn )/(r : (x1 , . . . , xn )) = r. 3.6 Translation of definite clauses to TRA It should be clear now that the operators of TRA correspond closely to the operations hidden in definite Horn clauses, according to cylindric semantics. This simplifies the translation of definite clauses to TRA, and we therefore omit an explicit description of it. The principle of the translation is that each definite clause states that the relation denoted by the predicate symbol in the conclusion includes the projection (on the tuple of the terms in the conclusion) of the intersection of the tables denoted by the conditions. The operations of TRA are general enough to translate the definite clauses of pure Prolog. Example. We illustrate the translation by an example that is a typical Prolog program. It gives a quicksort program from an ordinary list to a difference list. The Prolog program is: qsort([ ],U-U). qsort([X|Xs],U-W) :partition(X,Xs,Y1,Y2),qsort(Y1,U-[X|V]),qsort(Y2,V-W). The TRA version is: qsort ⊇ (([ ], U − U )/⊤) ∪ (([X|Xs], U − W ) / (((← partition(X, Xs, Y 1, Y 2)) where P ) ∩(qsort : (Y 1, U − [X|V ])) ∩(qsort : (Y 2, V − W )))). 8 qsort is a relational variable and is not part of the language of clausal logic. But all terms, and the atomic formula that is the first argument of where, are in clausal logic. The entire expression states an inclusion between relations and may or may not be satisfied, depending on the value of qsort. It may be shown that there is a least relation as value for qsort that satisfies the inclusion. The inclusion serves as definition of this least relation. The applicative relational program has the following advantages: 1. The where expression has a table as value and can be replaced by any other expression with the same value; see item 3. In particular, the identifier partition is local to the where expression. The declarative Horn clause formalism does not provide locality for predicate names. 2. The identifier qsort is a variable and is not a predicate symbol. Hence a minimization operator, like µ of [3], can be applied to the entire inclusion with respect to qsort. The result is a relation-valued expression that can, for example, be the operator argument of the relational application “:”. The identifier qsort is then local to this operator. In this way any number of levels of locality can be built, just as in applicative functional programming. 3. Combining a selection/minimization operator with the functional λ-abstraction and application operators yields an import/export facility for relations between program modules. As an example, replace P above with (λorder.P )(νleq.Orderings), where order is a relational variable in P used to define the order of partitioning, Orderings is a program that defines different orders, and “ν” is the minimization operator that selects one of the relations (leq) defined in a program module (Orderings). The effect of all this is exporting the leq relation from program Orderings, and importing it into program P as the order of partitioning, yielding an ascending, or descending, qsort relation. 4 Related work This paper is a continuation of a line of research going back as far as the work of Peirce and of Schroeder in the 19th century on algebra of relations. These algebras were not adequate to serve as basis for a semantics for full first-order predicate logic. In the 1930’s Tarski provided cylindric set algebra, which remedied this shortcoming. The simplicity of definite clauses, although covered by Tarski’s work, suggest the independent treatment given in this paper. After Tarski’s work, the next most important step was the paper by de Bakker and de Roever [3]. By restricting themselves to binary relations, they took their starting point before Tarski. They elucidated the mechanisms of defining binary relations, especially the use of the minimization operator. TRA facilitates extending of the definition techniques of de Bakker and de Roever to include the type of algebra introduced by Tarski. There are some relations to recent work that do not seem to be part of a grand design. Codd’s relational calculus is declarative in spirit, whereas his relational algebra is applicative in spirit. Both seem to us to be improved upon by the earlier work by Tarski. However, TRA can be viewed as a relational algebra counterpart for the Datalog query language, when substituted for Codd’s relational calculus. Our where expressions were inspired by Nait-Abdallah’s ions. The main difference is that Nait-Abdallah’s work is syntactic, concentrating on rewriting rules. Our work is also related to higher-order logic programming by having the same objectives, but a different approach; see the concluding remarks. Finally, applicative programming constitutes important related work [8], as mentioned in the introduction. 5 Conclusions We have characterized distinctions between the applicative and declarative paradigms in functional programming. We have noted that relational programming exists only in declarative form. We have developed 9 a relational algebra (TRA) useful as a mathematical basis for applicative relational programming. The operations of TRA are chosen in such a way that the definite clauses of Prolog have a simple translation. Relations can be first-class citizens. One of the most powerful paradigms in computing is “functions as first-class citizens” [8]. This in reaction to languages where functions are more restricted in their use than, say, numbers. Certain functional programming languages have demonstrated the advantages of having functions as first-class citizens. Prolog, the only relational programming language, does not have relation-valued expressions of any kind. We have shown that relations can be first-class citizens. Modular logic programming. We have shown how to support modularity and local scoping for relations, which is a deficiency in declarative logic programming. We have devised a mechanism that facilitates the exportation and importation of relations between programs. Higher-order logic is not needed, at least not to provide the desirable programming features implied by having functions and relations as first-class citizens. In functional programming, a function is said to be higher-order when it takes a function as argument or produces one as result. A logic is said to be higherorder when one can quantify over function or predicate symbols. These two senses of “higher-order” do not coincide. This is proved by the existence of formalizations of λ-calculus in first-order logic. A constant of logic can denote any individual, including a function. Therefore, a first-order variable, one ranging over individuals, can range over functions. In that sense, our expressions contain first-order variables that range over relations. This is an important point, as first-order logic is more tractable, theoretically and practically, than higher-order logic. 6 Acknowledgments Thanks to J.H.M. Lee for his careful reading of an earlier version of this work. Generous support was provided by the British Columbia Advanced Systems Institute, the Institute of Robotics and Intelligent Systems, the Canadian Institute for Advanced Research, the Laboratory for Automation, Communication and Information Systems Research, and the Natural Science and Engineering Research Council of Canada. References [1] M.H.M. Cheng. Lambda-equational Logic Programming. PhD thesis, University of Waterloo, 1987. [2] Alain Colmerauer. Prolog and infinite trees. In Logic Programming, pages 231–251. Academic Press, 1982. [3] J.W. de Bakker and W.P. de Roever. A calculus for recursive program schemes. In M. Nivat, editor, Automata, Languages, and Programming, 1973. [4] L. Henkin, J. D. Monk, A. Tarski, H. Andréka, and I. Németi. Cylindric Set Algebras, volume 883 of Springer Lecture Notes in Mathematics. Springer-Verlag, 1981. [5] Leon Henkin, J. Donald Monk, and Alfred Tarski. Cylindric Algebras, Parts I,II. Studies in Logic and the Foundations of Mathematics. North-Holland, 1985. [6] Alberto Martelli and Ugo Montanari. An efficient unification algorithm. ACM Transactions of Programming Languages and Systems, 4:258–282, 1982. [7] B.E. Richards. Contributions to functional programming in logic. Master’s thesis, University of Victoria, 1990. 10 [8] Joseph E. Stoy. Denotational Semantics: The Scott-Strachey approach to Programming Language Theory. MIT Press, 1977. [9] Jeffrey D. Ullman. Principles of Database and Knowledge-Base Systems. Computer Science Press, 1988.
6cs.PL
Does Phase Matter For Monaural Source Separation? arXiv:1711.00913v1 [cs.SD] 2 Nov 2017 Mohit Dubey Oberlin College and Conservatory [email protected] Garrett Kenyon Los Alamos National Laboratory [email protected] Nils Carlson New Mexico Institute of Mining and Technology [email protected] Austin Thresher New Mexico Consortium [email protected] Abstract The "cocktail party" problem of fully separating multiple sources from a single channel audio waveform remains unsolved. Current biological understanding of neural encoding suggests that phase information is preserved and utilized at every stage of the auditory pathway. However, current computational approaches primarily discard phase information in order to mask amplitude spectrograms of sound. In this paper, we seek to address whether preserving phase information in spectral representations of sound provides better results in monaural separation of vocals from a musical track by using a neurally plausible sparse generative model. Our results demonstrate that preserving phase information reduces artifacts in the separated tracks, as quantified by the signal to artifact ratio (GSAR). Furthermore, our proposed method achieves state-of-the-art performance for source separation, as quantified by a mean signal to interference ratio (GSIR) of 19.46. 1 Introduction The "cocktail party problem" - isolating a sound-stream of interest from a complex or noisy mixture - remains one of the most important unsolved problems in signal processing. While it is well understood that the human (mammalian) auditory system is an expert at solving this problem, even without binaural or visual cues, it is still unclear how a similar solution can be implemented computationally. In biological systems, it is understood that bottom-up grouping of similar sounds (harmonic stacks), top-down attention towards sounds of interest ("voice" vs. "guitar"), as well as amplitude fluctuations of sounds in similar frequency bands (vibrato/tremolo) are all useful processes for blind monaural source segregation [1]. The extreme degree of overcompleteness of the auditory cortex when compared to the cochlea implies that sparse encoding of auditory information is another key part of the neural solution [2]. Current understanding of neural auditory encoding consists of two distinct theories: "place theory" and "volley theory". In place theory, different frequencies of sound are encoded in different physical locations, as seen in the spectral tuning of the cochlea and the resulting tonotopic map that propagates all the way up to the primary auditory cortex (A1) [3]. In volley theory, the frequency and phase of a sound wave are encoded by neuronal spikes that coincide with a regular point on that wave, a process known as "phase-locking" [4]. Research on the mammalian auditory pathway has shown that "phase locking" in the auditory nerve can operate at frequencies up to 4 - 6 kHz (depending on the animal) and is preserved throughout the auditory pathway to A1 at frequencies up to ~200 Hz, allowing for phase-locking to the fundamental frequencies of the human voice and many musical instruments [5]. The preservation of phase information throughout the auditory path is useful in binaural source separation as well as speech processing, as A1 cortical neurons have been 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. shown to phase-lock to a sequence of phonemes [5] [6]. A1 cortical neurons in cats have also been shown to convey more abstract auditory information than structured spectro-temporal patterns, implying that A1 receptive fields are complex and well tuned for monaural source separation [7]. In recent years, multifarious computational approaches have tried to solve the blind monaural cocktail party problem including robust PCA [8], Recurrent Neural Networks [9], Convolutional Denoising Autoencoders [10], and Non-Negative Matrix Factorization [11]. A large majority of these implementations separate sources by using some form of "masking" of amplitude power spectra, discarding all phase information from the original sound during training [12] and only preserving time-frequency bins that (up to some threshold) contain the source of interest. A recent work utilizing a Fully Complex Deep Neural Network (FDCNN) has shown that preserving both the real and imaginary parts of the Fourier representations of musical sound during training provides better results compared to a non-complex DNN, especially when a sparseness penalty is also employed [13]. While the current literature has provided insight into discriminative modeling for monaural source separation, it is still not clear whether preserving phase information (as the brain does) assists in learning the underlying generators of distinct sound sources in a sparse encoding. The idea of sparse approximation is based on the principle that the brain uses as few active neurons as possible to represent a signal as accurately as possible. It has been shown that by learning sparse representations of static images or movies, networks converge on features similar to the receptive fields of simple cells in the primate primary visual cortex [14] [15] [16]. Analogously, one might expect to learn features similar to the spectrotemporal receptive fields present in the primary auditory cortex when learning on phase-rich spectrotemporal representations of auditory input. This analogy has been explored using the locally competitive algorithm (LCA) on time-dependent power spectral and cochlear representations of speech and music with the resulting features exhibiting many of the properties of physiological receptive fields [17] including phase information [18]. In this paper we demonstrate that preserving phase information in learning a sparse generative model of musical data results in better separation of vocals from a musical track. We trained three sparse representations on musical audio using a convolutional locally competitive sparse coding algorithm using PetaVision (https://github.com/PetaVision): one preserving phase, two discarding phase. We judged the relative success of the results on the source separation task based on the SDR (Signal-to-Distortion), SIR (Signal-to-Interference), and SAR (Signal-to-Artifact) ratios [19]. 2 Methods Our models were trained using the MIR-1K dataset [20] which consists of 1000 song clips ranging from 4 to 16 seconds sampled at 16 kHZ. The clips are taken from recordings of male and female amateur singers singing along to 110 Chinese karaoke tracks. The vocal and non-vocal tracks are stored in separate stereo channels, making the dataset ideal for monaural source separation studies. For this study, we shortened all of the clips to 2 seconds for computational ease. The dataset was divided into 950 training and 50 testing examples which were both randomly sorted, such that multiple male and female singers were present throughout. For the resultant training and testing sets, single channel mixtures were created with the vocals and non-vocals mixed equally and sampled at 16 kHZ. Spectral representations of the vocals, non-vocals, and mixtures for both train and test sets were generated using a 512 point short time Fourier transform (STFT) with 50 percent overlap and a Hanning Window, resulting in 256 independent frequency bins up to 8 kHz and 128 time bins. Phase information (both real and imaginary parts) were stored in one case, while only the modulus amplitude was stored in the other (no phase information). Logically, the phase rich representations contain twice the amount of information as the representation without phase. To avoid this bias, a third pair of train and test sets was also generated without phase information using the same short time Fourier transform (STFT) but with twice the number of independent frequency bins (512). 2 All three datasets of vocal and non-vocal mixtures were then trained identically using the Locally Competitive Algorithm (LCA), which functions by minimizing the error between input and reconstruction while also minimizing the activity of elements used in the representation. This is expressed mathematically as the minimization of an energy function, → − − E( I , φ, → a ) = min → − { a , φ}  − 1 → − − || I − φ→ a ||2 + λ||→ a ||1 2  (1) → − − where I represents the input, → a represents activation values for the basis vectors φ, and λ represents the threshold or "sparsity penalty". Approximate minimization of the energy function for a given two second "sound image" is accomplished by numerically solving the ordinary differential equation that results from taking the partial derivative of the energy with respect to activation coefficients, while a minimum of the energy function with respect to the basis vectors is accomplished by iterative stochastic gradient descent using a local Hebbian rule with momentum. In order to obtain a more neurally plausible network, our implementation deploys horizontal competition between elements − a = T (u), where T (u) is a in the hidden layer, by inserting membrane potentials u such that → du soft-threshold function, and dt is the derivative of the energy function with respect to the activation coefficients (as in Rozell et al. [16]) . To locate the optimum threshold for our datasets, we first trained our network for two epochs on the mixed training set (phase only) at multiple threshold values. We then added Gaussian noise to the training set and used the resulting sparse codes to denoise the data. Through this method, we found that the optimum threshold for our network was around .625, resulting in average sparsity of approximately 2.8 percent (see Figure 1). Figure 1: Normalized denoising error for various thresholds (labeled) plotted by average sparsity. Each network was trained for four epochs on the respective training set (Phase, No Phase, No Phase x2) using a display period of 1000 timesteps, a dictionary size of 8192 features (2x overcomplete) and stride of 2. Each feature represented the entire frequency dimension and 128 ms of sound. The resultant dictionaries were used to write out sparse codes for the training and testing sets of the three mixtures. Once sparse codes were generated for the three datasets, a linear classifier was implemented in Petavision to separate out vocals and non-vocals from the mixtures. The classifier was initialized with the features trained during the sparse coding procedure and allowed to adapt for 40 epochs through the training set. All other parameters including the threshold and learning rate were held 3 Table 1: Results on Test Set Run GSIR GSAR GNSDR Phase No Phase No Phase x 2 Denoised 12.12 ± 9.12 12.76 ± 12.07 14.84 ± 13.26 19.46 ± 8.61 −3.51 ± 5.92 −9.72 ± 4.36 −10.95 ± 4.50 2.88 ± 5.54 1.49 ± 3.02 1.35 ± 4.01 1.86 ± 3.88 5.21 ± 2.77 constant from the sparse coding procedure. The resulting features were used to separate vocals and non-vocals on the three testing sets and the resulting stems were used to calculate the GSIR, GSAR, and GNSDR, as shown in [8]. A fourth set of stems were generated by running the phase-rich results through the classifier again to denoise the separated vocal and non-vocal tracks, providing the best possible results for our blind monaural source separation technique (Denoised). 3 Results Non-Vocals Vocals Performance results for each of the datasets are provided in Table 1. GSIR measures the remaining interference between the sources, GSAR indicates the artifacts caused by the separation algorithm and GNSDR measures how distorted the separated sources are and is considered the overall performance evaluation for source separation. While it is clear that GNSDR and GSIR show no general improvements with phase information included, the GSAR is noticeably higher for the phase results. This implies that including phase information introduces fewer artifacts during the source separation process, even when more frequency bins are used to account for the loss of information. Furthermore, our mean SIR value of 19.46 for the denoised audio indicates very high separation quality that is state of the art compared to other published methods [8][12][13]. Original Phase No Phase Figure 2: Spectrograms of non-vocals and vocals for phase and no-phase of a sample from the test set. While phase reconstructs less high-frequencies, no-phase adds energy in spurious places (artifacts). 4 Conclusion Using a generative sparse coding model we have demonstrated that preserving phase information results in fewer artifacts on musical source separation tasks. In addition, we have introduced a new method for separating musical sources that achieves state of the art separation quality. In the future, we plan to run source separation experiments on other auditory data (speech, instrumental music, etc.) as well as explore the benefits of hierarchical sparse coding in source separation. Acknowledgments This work was funded by NSF and the DARPA UPSIDE program. 4 References [1] McDermott, J. H. (2009). "The cocktail party problem." Current Biology, 19(22), 1024-1027. Retrieved June 8, 2017. [2] Chechik, Gal, Michael J. Anderson, Omer Bar-Yosef, Eric D. Young, Naftali Tishby, and Israel Nelken. "Reduction of Information Redundancy in the Ascending Auditory Pathway." Neuron 51 (2006): 359-68. Print. [3] Oxenham, A. J. (2013). "Revisiting place and temporal theories of pitch." Acoustic Science and Technology,34(6), 388-396. [4] Joris, P. X. (2004). "Neural Processing of Amplitude-Modulated Sounds." Physiological Reviews, 84(2), 541-577. doi:10.1152/physrev.00029.2003 [5] Nourski, K. V., and Brugge, J. F. (2011). "Representation of temporal sound features in the human auditory cortex." Reviews in the Neurosciences, 22(2). doi:10.1515/rns.2011.016 [6] Wang, R., Perreau-Guimaraes, M., Carvalhaes, C., and Suppes, P. (2012). "Using phase to recognize English phonemes and their distinctive features in the brain." Proceedings of the National Academy of Sciences of the United States of America, 109(50), 20685-20690. http://doi.org/10.1073/pnas.1217500109 [7] Chechik, G., and Nelken, I. (2012). "Auditory abstraction from spectro-temporal features to coding auditory entities." Proceedings of the National Academy of Sciences of the United States of America, 109(46), 1896818973. http://doi.org/10.1073/pnas.1111242109 [8] P. S. Huang, S. D. Chen, P. Smaragdis and M. Hasegawa-Johnson, "Singing-voice separation from monaural recordings using robust principal component analysis," 2012 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Kyoto, 2012, pp. 57-60. doi: 10.1109/ICASSP.2012.6287816 [9] P. S. Huang, M. Kim, M. Hasegawa-Johnson and P. Smaragdis, "Joint Optimization of Masks and Deep Recurrent Neural Networks for Monaural Source Separation," in IEEE/ACM Transactions on Audio, Speech, and Language Processing, vol. 23, no. 12, pp. 2136-2147, Dec. 2015. Doi: 10.1109/TASLP.2015.2468583 [10] Grais, E. M., and Plumbley, M. D. (2017). "Single Channel Audio Source Separation using Convolutional Denoising Autoencoders." ArXiv. Retrieved from https://arxiv.org/abs/1703.08019. [11] T. Barker and T. Virtanen, "Blind Separation of Audio Mixtures Through Nonnegative Tensor Factorization of Modulation Spectrograms," in IEEE/ACM Transactions on Audio, Speech, and Language Processing, vol. 24, no. 12, pp. 2377-2389, Dec. 2016. [12] Simpson, A. J., Roma, G., and Plumbley, M. D. (2015). "Deep Karaoke: Extracting Vocals from Musical Mixtures Using a Convolutional Deep Neural Network." ArXiv. doi: arXiv:1504.04658 [13] Y. S. Lee, C. Y. Wang, S. F. Wang, J. C. Wang and C. H. Wu, "Fully complex deep neural network for phase-incorporating monaural source separation," 2017 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), New Orleans, LA, 2017, pp. 281-285. [14] B. Olshausen and D. Field, "Emergence of simple-cell receptive field properties by learning a sparse code for natural images," in Nature, vol. 681, p. 607-609, 1996. [15] B. Olshausen, "Highly overcomplete sparse coding." SPIE 2013 [16] C. Rozell, et al., "Sparse coding via thresholding and local competition in neural circuits," in Neural Computation, 2008. [17] Carlson NL, Ming VL, DeWeese MR (2012), "Sparse Codes for Speech Predict Spectrotemporal Receptive Fields in the Inferior Colliculus." PLoS Comput Biol 8(7): e1002594. doi:10.1371/journal.pcbi.1002594 [18] Dubey, M. L., Shultz, P. F., and Kenyon, G. T. (2016, March). Learning phase-rich features from streaming auditory images. In Image Analysis and Interpretation (SSIAI), 2016 IEEE Southwest Symposium on (pp. 73-76). IEEE. [19] E. Vincent, R. Gribonval and C. Fevotte, "Performance measurement in blind audio source separation," in IEEE Transactions on Audio, Speech, and Language Processing, vol. 14, no. 4, pp. 1462-1469, July 2006. doi: 10.1109/TSA.2005.858005 [20] Chao-Ling Hsu and Jyh-Shing Roger Jang, "On the Improvement of Singing Voice Separation for Monaural Recordings Using the MIR-1K Dataset," IEEE Trans. Audio, Speech, and Language Processing, volume 18, issue 2, p.p 310-319, 2010. 5
9cs.NE
Sliding Suffix Tree Andrej Brodnik1,2 and Matevž Jekovec1 1 2 University of Ljubljana, Faculty of Computer and Information Science, SI {andrej.brodnik,matevz.jekovec}@fri.uni-lj.si University of Primorska, Faculty of Mathematics, Natural Sciences and Information Technologies, SI [email protected] arXiv:1801.07449v2 [cs.DS] 14 Feb 2018 Abstract We consider a sliding window W over a stream of characters from some alphabet of constant size. The user wants to perform deterministic substring matching on the current sliding window content and obtain positions of the matches. We present an indexed version of the sliding window based on a suffix tree. The data structure of size Θ(|W |) has optimal time queries Θ(m + occ) and amortized constant time updates, where m is the length of the query string and occ is the number of its occurrences. 1998 ACM Subject Classification F.2.2 Nonnumerical Algorithms and Problems, E.1 DATA STRUCTURES, F.1.2 Modes of Computation Keywords and phrases suffix tree, online pattern matching, sliding window, lowest common ancestor Digital Object Identifier 10.4230/LIPIcs.CVIT.2016.23 1 Introduction and Related Work Text indexing and big data in general is a well studied computer science and engineering field. A specially intriguing area is (infinite) streams of data which are too big to fit onto disk, and consequently, cannot be indexed in the traditional way (e.g. by using FM-index [5]). In practice, data streams are processed on-the-fly by efficient, carefully engineered filters. An excerpt of the data called text features are stored for later usage, while the original stream data is discarded. In our research, we consider an infinite stream of characters where the main memory holds the most recent characters in the stream in terms of sliding window. At any moment, a user wants to find all occurrences of the given substring in the current window. In general, to answer the query, we could construct an automaton from a query using KMP [9] or Boyer-Moore [1], and then feed the stream to the constructed automaton. This however requires that all queries are known in advance. On the other hand, if the query arrives on-the-fly, the automaton needs to be constructed from scratch. In both cases we need to scan the whole window which requires linear time in the size of a window. A better possibility would be to run Ukkonen’s online suffix tree construction algorithm [11] and construct the suffix tree. When the query arrives, we inject a delimiter character to finalize the suffix tree construction and perform the query on the constructed tree. However, finalizing might take, in the worst case, linear time in the size of the window. In this paper we show how to construct and maintain an indexed version of the sliding window allowing a user to find occurrences of a substring in optimal time and space. This is the first data structure for on-the-fly text indexing which requires amortized constant time for updates and worst case optimal time for queries. © Andrej Brodnik and Matevž Jekovec; licensed under Creative Commons License CC-BY 42nd Conference on Very Important Topics (CVIT 2016). Editors: John Q. Open and Joan R. Acces; Article No. 23; pp. 23:1–23:9 Leibniz International Proceedings in Informatics Schloss Dagstuhl – Leibniz-Zentrum für Informatik, Dagstuhl Publishing, Germany 23:2 Sliding Suffix Tree In the following section we define the notation and preliminary data structures and algorithms. In Section 3 we formally present a sliding suffix tree and we conclude in Section 4 with discussion and open problems. 2 Notation and Preliminaries Capital letters A, B, C . . . denote strings and lower case letters i, j . . . integers except for c which denotes an arbitrary character. Further, lower case Greek letters α, β . . . represent nodes in a tree, and calligraphic capital letters T , L, and A tree-based data structures. We denote concatenation of two strings by simply writing one string beside the other, e.g. AB and the length of a string A as |A|. By A[i : j] we denote a substring of A starting at position i and ending at j inclusive, where 1 ≤ i ≤ j ≤ |A|. Suffix of A starting at i is A[i :] and a prefix of A ending at j is A[: j] both inclusive. We denote by W the sliding window over an infinite input stream of characters which are from an alphabet of constant size. By n, we denote the number of all characters read so far. To store a suffix starting at the current position, we store the current n. At any later time n0 , we can retrieve the content of this suffix as W [n − (n0 − |W |) :], where n − n0 < |W |, for the suffix to be present in W . 2.1 Suffix Tree, Suffix Links Tree, and Lowest Common Ancestor A suffix tree is a dictionary containing each suffix of the text as a key with its position in the text as its value. The data structure is implemented as a PATRICIA tree, where each internal node stores a skip value and the first (discriminative) character of the incoming edge, whereas each leaf stores the position of the suffix in the text. We denote by |α| a string depth operation of some node α in a suffix tree and define it as a sum of all skip values from the root to α. Each edge implicitly contains a label which is a substring of a suffix starting and ending at the string depth of the originating and the string depth of the terminating node respectively. We say a node α spells out string A, where A is a concatenation of all labels from the root to α. Or more formally, take a leaf in a subtree of α and let it store position i of a suffix, then A = W [i − (n − |W |) : i + |α| − (n − |W |)]. Next, let A and A0 be strings which are spelled out by nodes α and α0 respectively. We define a suffix link as an edge from node α0 to α, if A = A0 [2 :], and denote this by α = suffix_link(α0 ). If we follow suffix links from α0 i times, we write this as suffix_link(α0 )i . We define a suffix links tree as follows. For each internal node in a suffix tree let there be a node in a suffix links tree. For each suffix link from α0 to α in the suffix tree, α is a parent of α0 in the suffix links tree. Consequently, following a suffix link from α0 i times is the same as finding the ith ancestor of α0 in the suffix links tree. The lowest common ancestor (LCA) of nodes α and α0 in a tree is the deepest node which is an ancestor of both α and α0 . The first constant time, linear space LCA algorithm was presented in [7] and later simplified by [10]. The dynamic version of the data structure still running in constant time and linear space was introduced in [3]. We will use this result to perform constant time LCA lookups and maintain it in amortized constant time. 2.2 Ukkonen’s online suffix tree construction algorithm In [11] Ukkonen presented a suffix tree construction algorithm which builds the data structure in a single pass. During the construction, the algorithm maintains the following invariants in amortized constant time: A. Brodnik and M. Jekovec 23:3 implicit buffer B which corresponds to the longest repeated suffix of the text processed so far, the active node β which represents a node where we end up by navigating B in the suffix tree constructed so far, i.e. B is a prefix of a string spelled out by β. The execution of the algorithm can be viewed as an automaton with two states. In the buffering state, the automaton reads a character c from the input stream and implicitly extends all labels of leaves by c. Then, it checks whether c matches the next character of the prefix of length |B| + 1 spelled out by β. If it does, c is appended to B and the automaton remains in the buffering state reading the next character. When |B| = |β|, a child in direction of c becomes a new active node. On the other hand, if character c does not match, automaton switches to the expanding state. First it inserts a new branch in direction of c with a single leaf storing the suffix position n − |B|. If |B| = |β|, the new branch is added as a child to β. Otherwise, if |B| < |β| the incoming edge of β is split such that the string depth of the newly inserted internal node is |B|, and the new branch is added to this node. Once the branch is inserted, the first character is removed from B obtaining new B 0 = B[2 :]. A new active node corresponding to B 0 is found in the following way. Let α denote the parent of the original active node β. Then the new active node β 0 is a node obtained by navigating suffix B 0 [|α| :] from a node suffix_link(α). When β 0 is obtained, c is reconsidered. If a branch in direction of c exists, the automaton switches to buffering state. Otherwise, it remains in the expanding state and repeats the new branch insertion. Each time the expanding state is re-entered, B is shortened for one character. In the worst case, if c does not occur in the text yet, the suffix links will be followed all the way up to the root node, and c will be added as a new child to the root node. In this case the implicit buffer B will be an empty string. We say the currently constructed suffix tree is unfinalized, until B is completely emptied. Moreover, there are exactly |B| leaves missing in the unfinalized tree and these correspond to suffixes of B. For finite texts we finalize the suffix tree at the end by appending a unique character $ which forces the algorithm to empty B and finalize the tree. For infinite streams however, there is no final character. Consequently, we need to support: 1. Queries: When performing queries, we need to report the occurrences both in the partially constructed suffix tree and in B. 2. Maintenance: The original Ukkonen’s algorithm supports adding a new character to the indexed text. When a window is shifted, we also remove the oldest (longest) suffix from the text. 3 Sliding Suffix Tree The sliding suffix tree is an indexed version of the current sliding window content W . Formally, we define two operations: find(W , Q) — returns all positions of the query string Q in W . shift(W , c) — appends a character c to W and removes the oldest character from W . Initially, W is empty and until the length of W reaches the desired size, shift operation only appends new characters. The sliding suffix tree is built on top of Ukkonen’s online suffix tree construction algorithm. We maintain a possibly unfinalized suffix tree T including implicit buffer B and active node β (Fig. 1 on the left). Figure 1 on the right illustrates the position of W and B in a stream. CVIT 2016 23:4 Sliding Suffix Tree Notice B is always a proper suffix of W . Additionally, we maintain a suffix links tree of T , L, with auxiliary data structure A required for constant time LCA on L. B β W 1 B ... occ1 occ2 occ3 n ... Figure 1 On the left: Illustration of partially constructed suffix tree T with implicit buffer B and active node β. On the right: Illustration of the stream, the sliding window W , the implicit buffer B, and three cases for positions of the query strings occ1 , occ2 , and occ3 . In the next two subsections we show how to perform the find operation in time Θ(|Q|+occ) in the worst case and the shift operation in constant amortized time. As a model of computation, we use the standard RAM model. 3.1 Queries To find all occurrences of query Q in W , we first navigate Q in T . Let TQ correspond to a subtree rooted at the node at which we finished the navigation. Leaves of TQ make up the first part of the resulting set. In Figure 1 occ1 corresponds to such occurrence. Also, position of occ2 in the same figure will be contained in one of the leaves of TQ , since T contains all suffixes that start at the beginning of W up to the beginning of B. The second part of the resulting set are the missing leaves of TQ due to the unfinalized state of T . Intuitively, these leaves correspond to suffixes of B which start with Q. occ3 in Figure 1 illustrates one such position. Obviously, if |B| < |Q| there are no matches of Q in B and we solely return the leaves of TQ . If |B| = |Q|, we test whether the active node β is the same node as the root of TQ . If it is, we add one additional occurrence at position n − |B| to the resulting set. The case |B| > |Q| requires special attention. One solution would be to scan B for Q using KMP or similar approaches. But since |B| = O(|W |) in the worst case, we cannot afford the scan. In the remainder of this subsection we show how to determine the missing leaves in time O(|Q| + occ). First, we claim that the navigated subtree TQ always exists, if there are any occurrences of Q to be found in B. I Lemma 1. If Q exists in buffer B, then a subtree TQ exists by navigating the query Q in T. Proof. If Q exists somewhere in B, then Q is a substring of a string spelled out by β. From the property of the suffix tree, by following the suffix links from β we will find a node which spells out a string with Q at the beginning. This node is a root of TQ . J To consider occurrences of Q in B where |B| > |Q|, we determine the relation of each node in TQ to β. Since |TQ | = O(occ) we can afford this operation, if we spend at most constant time per node. We proceed depending on whether β is an internal node of T or not. I Lemma 2. Let β be the active node of T , and let β be an internal node. String Q is located in B at position i, iff suffix_link(β)i is a node in TQ . A. Brodnik and M. Jekovec 23:5 Proof. (⇒) We need to prove that a node corresponding to a suffix of B which starts with Q exists in TQ since T is not finalized. Recall the expanding state of Ukkonen’s algorithm. At each call, the operation adds a leaf and possibly an internal node, whereas the existing internal nodes are left untouched. Since β is an internal node, no changes will be made either to it or the nodes visited when recursively following the suffix link from β, since they are also internal nodes. Therefore, a node corresponding to a suffix of B which begins with Q exists in TQ , if such a suffix exists in B. (⇐) By definition of β, B is a prefix of a string which β spells out. β is also an internal node, so it will always contain an outgoing suffix link (in case |β| = 1, let the suffix link point to the root node). When following the suffix link of β, each time we implicitly remove one character from the beginning of B. Suppose we follow the suffix link i times and reach a node which is a member of TQ . By definition of the suffix tree, each node in TQ spells out a string which starts with Q. Therefore, our reached node corresponds to a suffix of B at position i and starts with Q. J By using the lowest common ancestor operation (LCA) we can check in constant time whether a node is reachable from another node by following the suffix links in T . If α is an ancestor of β in L (i.e. the LCA of α and β in L is α), then α is reachable by following the suffix links from β in T . To determine all occurrences of Q in B in time O(|TQ |), for each candidate node α in TQ we find its LCA with β in L. If the LCA is α and α is an ith ancestor of β in L, then by Lemma 2 Q is located in B at position i. If β is a leaf of T , we cannot use the approach described above, because leaves do not have usable suffix links. We find occurrences of Q in B by exposing a repetitive pattern P inside B. I Lemma 3 (The Buffer Pumping Lemma). The buffer B is extended by a new character c during Ukkonen’s suffix tree construction algorithm without inflicting the expansion of a tree, iff c corresponds to the next character in a repetitive pattern P inside B. Proof. (⇒) Since c does not inflict the expansion of a tree, Bc occurred in the text before. Let x denote the position of last such occurrence as illustrated on Figure 2. Notice that B starting at x and B starting at n − |B| overlap. Consequently, character c = W [x − (n − |W |) + |B| + 1] and in turn B is a concatenation of patterns P , B = P k P 0 where k = b |B| |P | c and the last repetition P 0 might be empty. (⇐) Given B and a repetitive pattern P , we can extend B by a new character c = P [(|B| + 1 mod |P |) + 1]. The expansion of the tree will not occur because Bc was present in the text before and consequently a corresponding edge in partially constructed suffix tree will exist. J I Corollary 4. Let there be a single leaf in the subtree obtained when navigating B in T and let x be the position stored in this leaf. The repetitive pattern P inside B is W [x − (n − |W |) : n − |B|]. Proof. Since the leaf storing x is the only leaf in the obtained subtree, there are exactly two occurrences of B in the text. The first one at position x and the second one at position n − |B|. If |P | > |B|, then B is a prefix of P , because the leaf spelling out P was obtained by navigating B. If |P | < |B|, then B = P k P 0 due to the buffer pumping lemma. J With the help of the lemma and the corollary above we can efficiently determine the positions of Q in B by exposing the repetitive property of the pattern P inside B. Depending on the length |P |, two cases are possible as illustrated in Figure 2. If |P | ≤ |Q| (Fig. 2.a), CVIT 2016 23:6 Sliding Suffix Tree Figure 2 Structure of B relative to P when β is a leaf. Subfigures a) and b) illustrate cases for |P | ≤ |Q| and |P | > |Q| respectively. Below each subfigure is an illustration of query Q relative to y and z respectively. we scan for Q in B up to position 2|Q| − 1 inside B and for each such occurrence of Q at some position y we add occurrences y, y + |P |, y + 2|P |, . . . to the resulting set until we reach n − |Q|. We require O(|Q| + occ) time in the worst case. If |P | > |Q| (Fig. 2.b), we visit the leaves of TQ and consider the suffixes starting inside the interval x : n − |B| − 1 of the stream. For each such occurrence z, we add z + |P |, z + 2|P | . . . to the resulting set until we reach n − |Q|. We spend O(occ) time in the worst case. The data structure we used consists of (T , L, A), where T requires O(|W |) space in the worst case (i.e. |B| = 0) and assuming an alphabet of constant size. Next, L contains the same number of nodes as T and is oblivious to the alphabet size, so the space complexity has the same upper bound. Finally, A used for constant time LCA queries on L requires linear space in terms of the number of nodes in L. This brings us to the following theorem. I Theorem 5. A user can find all occurrences of query Q in a sliding suffix tree of size O(|W |) in time Θ(|Q| + occ). 3.2 Maintenance To shift window W , we read a character c and add it to our data structure and at the same time remove the oldest (longest) stored suffix. During the maintenance no queries can be performed. To add a character, we first execute the original Ukkonen algorithm as described in subsection 2.2. During the expanding state we add to T either one node (a new leaf is added to the active node) or two nodes (the incoming edge of the active node is split and a new leaf is added). Since L contains only internal nodes of T , it remains unchanged in the first case and in the second case, a node is also added to L as follows. When the expanding state is visited the first time, a new internal node γT0 is added to T . We also add a new node γL0 to L. At this point no suffix link originating in γT0 has been set, so γL0 does not have a parent in L yet. In the next step either an expanding state is A. Brodnik and M. Jekovec 23:7 re-entered or a buffering state is entered. If the expanding state is re-entered, we repeat the procedure obtaining new nodes γT and γL . Now, a suffix link is created from γT0 to γT and consequently a parent of γL0 becomes γL . If the buffering state is entered, either a root node or a node containing the matched character is reached. Instead of creating new nodes in T and L as we did in the expanding state, we create a suffix link to an existing node in T and set the parent of a node in L accordingly. Adding a suffix to T requires constant amortized time [11]. During the re-entrances to the expanding state, a chain of nodes was formed in L which was finally attached to the existing node in constant time when the buffering state was entered. For updating A, attaching a chain of nodes to a tree requires linear time in the length of a chain [3]. By amortizing all expanding calls, adding a new character takes amortized constant time. To remove the oldest stored suffix from T , we first find the corresponding leaf (e.g. by following a linked list of all leaves). If the leaf’s parent has three or more children, the parent remains unchanged and we just remove the leaf from T . Since leaves of T are not present in L, L and consequently A remain unchanged. On the other hand, if the leaf’s parent has exactly two children, we remove the leaf from T and also its parent γT from T and γL from L. To remove γT we merge its incoming and the remaining outgoing edges. Due to the following lemma, we can also safely remove γL since it is always a leaf in L. I Lemma 6. Let γT be a node with two children in T , where one child is a leaf storing a position of the longest suffix n − |W |. Then, γT is not a terminating node of any suffix link. Proof by contradiction. Assume there is a node γT0 in T with a suffix link pointing to γT . Since γT has two children, γT0 has at most two children, because γT0 contains a subset of nodes of γT . Observe the child of γT storing the position n − |W | i.e. it spells out W . One child in γT0 should then spell out W prepended by some character. Since W is already the longest suffix which exists in the window, a longer suffix and its corresponding leaf do not exist. Then, only one child of γT0 remains and due to path compression γT0 does not exist in T which contradicts the initial assumption. J In the moment of removal, the removed leaf or its parent can be an active node β. If this is the case, then B was a prefix of the removed suffix. Recall that at any time, B corresponds to the longest repeated suffix of the window. Since the oldest suffix is removed by shifting the window, a new longest repeated suffix is consequently shortened for one character by updating B to B[2 :]. To find a new β and an edge corresponding to the updated B, we simply follow the suffix link of the β’s parent and navigate the remainder of B from the obtained node. The navigation time is amortized over all expanding calls, so finding a new β requires amortized constant time. To remove a leaf from L and A we require constant time in the worst case [3]. During the shift operation, no additional data structures are used. Consequently, the space complexity of the sliding suffix tree remains asymptotically unchanged. We conclude with the following theorem. I Theorem 7. The sliding suffix tree of size O(|W |) can be shifted in amortized Θ(1) time. 4 Conclusions and Open Problems In this paper we presented a sliding suffix tree for performing online substring queries on a stream. By extending Ukkonen’s online suffix tree construction algorithm, the presented data CVIT 2016 23:8 Sliding Suffix Tree structure supports queries in optimal Θ(m + occ) time for alphabets of constant size while maintaining amortized constant time updates, where m is the length of the query string and occ the number of occurrences. An open question remains whether the data structure can be updated in worst case constant time. There is a well known linear time suffix sorting lower bound [4], but to our knowledge, no per-character lower bound has been explored. Ukkonen’s algorithm requires, by design, an amortized constant time for updates due to the implicit buffer of unfinalized nodes. To the best of our knowledge, no other online suffix tree construction algorithm has been developed without the implicit buffer. In this paper, we assumed a constant size of the alphabet Σ in asymptotic times for queries and updates. For arbitrary size of Σ, the current implementation of T data structure requires an additional factor of lg |Σ| time to determine a child at each step and maintain the same space complexity whereas L and A data structures are oblivious to |Σ|. An interesting question is whether the same asymptotic times can be achieved for integer alphabets as was done in [4] for texts of fixed length. In our case |Σ| = O(|W |), but the alphabet can change in time. Streaming algorithms are common in heavy throughput environments, therefore it seems feasible to involve parallelism. Recently, two methods were introduced for performing finegrained parallel queries on suffix trees [2, 8]. Both methods perform queries on static data structures only and perhaps supporting the shift operation used by the sliding suffix tree might be feasible. From a more coarse-grained parallelism point of view, the current query and update operations must be executed atomically. An interesting design question is whether the data structure could be designed in a mutable way, so a query and an update can be performed simultaneously, if different parts of the data structure are involved. Finally, the presented data structure, while theoretically feasible, should also be competitive in practice. From our point of view, the main issue with tree-based data structures used in the sliding suffix tree is space consumption. The majority of the size accounts for the auxiliary data structure used for constant time lowest common ancestor. Some work on practical lowest common ancestor data structures has already been done in [6]. We believe that once the data structure is succinctly implemented, it should present a viable alternative to existing solutions. References 1 2 3 4 Robert S. Boyer and J. Strother Moore. A fast string searching algorithm. Communications of the ACM, 20(10):762–772, oct 1977. URL: http://dl.acm.org/citation.cfm? id=359842.359859, doi:10.1145/359842.359859. Anders Roy Christiansen and Martin Farach-Colton. Parallel Lookups in String Indexes. In Shunsuke Inenaga, Kunihiko Sadakane, and Tetsuya Sakai, editors, String Processing and Information Retrieval: 23rd International Symposium, SPIRE 2016, Beppu, Japan, October 18-20, 2016, Proceedings, pages 61–67. Springer International Publishing, Cham, 2016. URL: https://doi.org/10.1007/978-3-319-46049-9{_}6, doi:10.1007/ 978-3-319-46049-9_6. Richard Cole and Ramesh Hariharan. Dynamic LCA Queries on Trees. SIAM Journal on Computing, 34(4):894–923, 2005. URL: https://doi.org/10.1137/S0097539700370539, doi:10.1137/S0097539700370539. Martin Farach-Colton, Paolo Ferragina, and S. Muthukrishnan. On the sorting-complexity of suffix tree construction. Journal of the ACM, 47(6):987–1011, nov 2000. URL: http: //dl.acm.org/citation.cfm?id=355541.355547, doi:10.1145/355541.355547. A. Brodnik and M. Jekovec 5 6 7 8 9 10 11 23:9 Paolo Ferragina and Giovanni Manzini. Opportunistic data structures with applications. In Foundations of Computer Science, 2000. 41st Annual Symposium on, pages 390–398, 2000. doi:10.1109/SFCS.2000.892127. Johannes Fischer and Volker Heun. Theoretical and Practical Improvements on the RMQProblem, with Applications to LCA and LCE. In Moshe Lewenstein and Gabriel Valiente, editors, Combinatorial Pattern Matching, pages 36–48, Berlin, Heidelberg, 2006. Springer Berlin Heidelberg. Dov Harel and Robert Endre Tarjan. Fast Algorithms for Finding Nearest Common Ancestors. SIAM Journal on Computing, 13(2):338–355, 1984. URL: https://doi.org/10. 1137/0213024, doi:10.1137/0213024. Matevž Jekovec and Andrej Brodnik. Parallel Query in the Suffix Tree. Technical report, University of Ljubljana, Faculty of Computer and Information Science, sep 2015. URL: http://arxiv.org/abs/1509.06167, arXiv:1509.06167. Donald Knuth, J Morris Jr., and V Pratt. Fast Pattern Matching in Strings. SIAM Journal on Computing, 6(2):323–350, 1977. URL: http://dx.doi.org/10.1137/0206024, doi:10.1137/0206024. Baruch Schieber and Uzi Vishkin. On Finding Lowest Common Ancestors: Simplification and Parallelization. SIAM Journal on Computing, 17(6):1253–1262, 1988. URL: https: //doi.org/10.1137/0217079, doi:10.1137/0217079. Esko Ukkonen. On-Line Construction of Suffix Trees. Algorithmica, 14(3):249–260, 1995. CVIT 2016
8cs.DS
A STATE OF THE ART OF URBAN RECONSTRUCTION: STREET, STREET NETWORK, VEGETATION, URBAN FEATURE Rémi Cura A , Julien Perret A , Nicolas Paparoditis A A Université Paris-Est, IGN, SRIG, COGIT & MATIS, 73 avenue de Paris, 94160 Saint Mandé, France first name.last [email protected] arXiv:1803.04332v1 [cs.OH] 18 Jan 2018 ABSTRACT: World population is raising, especially the part of people living in cities. With increased population and complex roles regarding their inhabitants and their surroundings, cities concentrate difficulties for design, planning and analysis. These tasks require a way to reconstruct/model a city. Traditionally, much attention has been given to buildings reconstruction, yet an essential part of city were neglected: streets. Streets reconstruction has been seldom researched. Streets are also complex compositions of urban features, and have a unique role for transportation (as they comprise roads). We aim at completing the recent state of the art for building reconstruction (Musialski et al., 2012b) by considering all other aspect of urban reconstruction. We introduce the need for city models (Sec. 1.). Because reconstruction always necessitates data, we first analyse which data are available (Sec. 2. on page 4). We then expose a state of the art of street reconstruction (Sec. 5. on page 9), street network reconstruction (Sec. 6. on page 11), urban features reconstruction/modelling (vegetation (Sec. 7. on page 13), and urban objects reconstruction/modelling (Sec. 8. on page 15). Although reconstruction strategies vary widely, we can order them by the role the model plays, from data driven approach, to model-based approach, to inverse procedural modelling and model catalogue matching. The main challenges seems to come from the complex nature of urban environnement and from the limitations of the available data. Urban features have strong relationships, between them, and to their surrounding, as well as in hierarchical relations. Procedural modelling has the power to express these relations, and could be applied to the reconstruction of urban features via the Inverse Procedural Modelling paradigm. 1.1.2 Tensions are building up Building Demographic pressure. : concentration of population While the number of cities is growing, cities are also getting bigger: 40% of city inhabitants are living in cities over 1 million inhabitants. The growth of cities is partially absorbed by the constitution of megacities. 10% of world population lives in megacities (23 cities that are bigger than 10 millions), and this should increase to 13.5% until 2025. Street feature Vegetation Street Network Road/ Street Data-driven Model-driven Procedural modelling Inverse Procedural modelling Catalogue matching Figure 1: A subjective transverse classification of reconstruction methods by role of model. 1. 1.1 INTRODUCTION Context 1.1.1 Total population living in cities is growing World population is increasing fast. A recent survey (United Nations, 2012) shows that 52% of Mankind already lives in urban area . These urban areas are expected to absorb more than the demographic augmentation, with new cities reaching the million of inhabitants every year in Africa and Asia. The cities not only grow by number of inhabitants but also by the area they occupy. The urban land use is expected to increase in the order of 100 000’s km2 in the next decade (Seto et al., 2011). Social pressure Cities also concentrate inequalities, which are rising in the country where the urbanisation is expected to be the most significant (OECD (2010), p.37). Environmental pressure High densities in cities imply careful management of environment of a city. The necessary fluxes (in and out) are massive. Although some of these fluxes are natural, they are also heavily impacted by cities (water, air, heat, etc.). Crisis management Concentration also makes crisis management much more difficult. Natural hazard (flood, earthquake, power cut) have more potent effects when hitting a city as they concern more people, and as the very density and complexity of city infrastructures might leave them more vulnerable. Cities growing very fast may outgrow their infrastructures. Moreover, cities importance also makes them more susceptible to human-related hazard (epidemic, toxic dispersion). 1.1.3 Need for urbanism and city planning For about one century the field of urbanism has been dedicated to tackle those problems. The new challenges and the change of scale of the problem necessitate new tools. 1.3.2 3D model for entertainment (See Fig. 2) The important place the cities have in our lives logically pervades into the 1.2.1 Need for city modelling Urbanists traditionally use method- collective images used by the entertainment industry. ologies from social sciences. The advance of computer science and engineering has given them simulations tools to model beThereby many films pictures real or imagined cities, in particular to haviours and even test planning scenarios. Planing is spread across support special effects. The game industry needs are even bigger, several entities, public or private, as well as the inhabitants. This partly because the recent trend toward Massively Multiplayer makes communication an important aspect of city planing. MoreOnline Role-Playing Game (MMORPG). Such games often induce over, the representation of situations and scenario is essential for massive open cities with believable animated agents. Interestingly, the decision process as well as for the elaboration of the planning. the city simulation games are similar in nature to serious training tools used to prepare emergency response, crisis management and 1.2.2 A new tools: the city model 2D maps have been the police deployment. tool of choice, and can now advantageously be completed by structured 3D city models created from various information. 1.4 What is a city 1.2.3 Answer part of the needs This new model and the 3D nature brings in turn several new applications (see (Niggeler, 2009) Defining properly a city is difficult, as it would involves historical (fr. and ge.). The Figure 2 (inspired from (Niggeler, 2009)) gives and social criterias. In this work, we consider that a city is a an overview of some applications for a city model. densely populated and socially complex place fulfilling certain functions to its surroundings. 1.3 Applications 1.2 Stakes Real & subjective distance Soft Mobility Traffic simulation for pedestrian/bicycle/ handicap public transport simulation Transport traffic simulation for vehicle air and noise pollution visibility/ obstacle annalysis temperature, air quality advertising impact Visual Impact sight analysis real estate transaction Urbanism & Architecture Simulation Analysis Test Control of regulation/ taxation/Local Planning Regulations case study/simulation green energy energy consumption wireless network flood site selection heritage/territory visit Communication tourism promotion Virtual tourism VideoFilm solar ressource Energy & Environment GeoMarketing 1.5 Challenges Reconstructing 3D city model is vital for many applications that are necessary to manage and plan cities, easing the life of Billions of citizens. 1.5.1 Reconstructing a multi-level complex of objects Some of the reasons that make city modelling particularly challenging can be derived from the definition we used for city: A city is a set of connected components interacting with each other. In this way the road network usually influences building placement. The social complexity accounts for various uses of space and therefore various types of buildings (constructed for various usage and through the time). The dense population use multi modal transportation networks which share part of space (e.g. bicycle and cars). pervasive gaming Security Entertainment decision support situational awarness real time intervention game serious game Figure 2: Example of potential usages of a city model. 1.3.1 Urbanism-related applications (See Fig. 2) City modelling is widely used for urban planning and understanding. Having detailed city models is an asset for visualisation and simulation, permitting to test planning scenarios (new and transformation), analysing various impacts and properties (noise, pollution, light propagation, flood, power cut, epidemic, toxic dispersion, water management, temperature), or design transportation system. Being a place of spatial and social concentration, a city is very sensible to environment issues. Monitoring and simulating air quality (Moussafir et al., 2013), temperature, wind speed, solar exposition, water cycle and so is important both for social reasons (perceived cleanness, perceived lightness), for energetical reasons (urban heating or cooling), as well as for health (being of high density, cities are more prone to epidemics). Cities models are also used for tourism and communication as a part of the larger Virtual Reality (VR) trend. Similarly, digital mapping is used as a simpler VR application, permitting to help in a GPS-based navigation system, or simply browse pictures of the roadside. Such a layered nature incite us to decompose the city reconstruction problem into connected problems: the reconstruction of buildings (which we defer to (Musialski et al., 2012b)) , the reconstruction of streets (Section 5.) , the reconstruction of street network (Section 6.) , the reconstruction of urban vegetation (Section 7.) and the reconstruction of urban objects (Section 8.). 1.5.2 Multi scale The spatial extend of a city model is large (typically in the order of the 100 to 10000km2 ), yet many important part of the design are small (e.g. a curb is around 0.1m high but strictly defines radically different space usages: pedestrian vs vehicle). 1.5.3 Automation Manual modelling as been the tool of choice for a long time but can only be applied to small parts. Therefore city reconstruction must use automatic or interactive tools. Yet the more automatic a process is, the more it relies on data quality, which is particularly problematic in an environment where aerial data is of reduced use and land data is heavily occluded. 1.5.4 Cluttering Urban environment is so dense and cluttered that usually the data is only partial (e.g. a tree hides a part of a building facade). This is illustrated in figure 3. 1.5.5 Many object categories Cities contains many objects (”object” being used in a wide acceptance) that forms complex patterns of relations. For instance streets markings follow complex rules that enforce the highway code. The consequence is very important for this work. Indeed most modelling methods have the potential to be used in reconstruction process via the inverse procedural modelling paradigm, and thus we include these modelling methods in this state of the art. 1.6.3 Scope In this work we focus on the reconstruction of the morphological characteristics of a city, because a full city modelling would also require to model the social and economical phenomenon, which is way out of our scope. Figure 3: On this street Lidar point cloud, trees are clearly masking building facades, creating occlusion. 1.6 City reconstruction/modelling 1.6.1 City reconstruction Several research communities have been interested in city reconstruction. It has proved to be a challenging and highly interdisciplinary set of problems, with many major practical applications. One could think the upper bound of city reconstruction problem is to have partial models of how an existing city looks as well as how it works, sometime trough time. Geometrical models we focus on the methods to obtain models of cities. We limit the possible usages and data type to the most common. For instance we do not describe audio feature, even if it is an essential piece for realism (that can also limit the need for visual details (Mastoropoulou et al., 2005)). We focus on geometrical models. Not only buildings Most of the works in city reconstruction have been focused on buildings reconstruction (Musialski et al., 2012b; Klavdianos et al., 2013). Yet a city is far from being only an aggregate of buildings. Paris, one of the densest city in the world, is a good example. About 70% of the surface is not occupied by buildings. The streets occupy 40% and the places 5%. We can explain this by the fact that a city is by definition a place of complex social interactions, therefore a need for a common medium is essential and must exist: the road network and the streets. However understanding the functioning of a city is out of our scope and this state of the art focus on reconstructing its physical components. The expression ”city reconstruction” and ”city modelling” are used alike to designate our problem by different research communities. Both convey the same idea of a partial view of reality, along with some knowledge about its structure (reconstruction) and/or behaviour (modelling). More practically, the model is designed to be browsed through digital imaging (which according to (Ramilo, 2005), is more efficient that a real life scaled model). To be precise usually the goal is not exactly city reconstruction but more the reconstruction of a specific urban space with some of its structuring properties and the abstraction of key characteristics. 1.6.2 A link between modelling and reconstruction The term ”modelling” seems to be more used in the Computer Graphic community, while the term reconstruction seems to be more employed in the Photogrammetry and Remote Sensing community. We use both because there is a point of convergence. Trying to reconstruct a city and its components always involves an implicit model (or hypothesis) determined by the choices of algorithms and constraints (e.g. most of the time building are implicitly considered like locally planar blocks, mostly vertical). We observe a trend in reconstruction to use more abstract knowledge, like semantic consideration (e.g trying to reconstruct buildings parts with traditional stereo reconstruction as well as primitive fitting (Lafarge et al., 2010)). In the same time, while modelling is not exclusively dedicated to depict real world objects, it is still possible to use modelling methods to get a model as close to the reality as possible. It has traditionally been done with human feedback (a 3D artist uses pictures of an object and dedicated software to draw it in 3D), but a recent trend tries to do it automatically: the inverse procedural modelling paradigm (See Sec. 3.2 on page 8) . Figure 4: Synthetic 3D city model. When urban features are coherent (top), the model is a great deal more realistic than without any objects (bottom left), or even with the same amount of objects but un-organised (bottom right). Moreover, a crude perceptive example (Figure 4) shows the importance of de road network, street, vegetation, urban objects. A real street view of Toulouse city (Fig 5 on the next page) with urban objects highlighted shows the diversity and importance of street objects. Almost all the applications of city modelling (See Figure 2 on the preceding page) benefit as well from such additions. Another clue of the importance of non-building elements for city modelling can be given by analysis of City GML (Kolbe et al., 2005), the leading current standard to represent city. Building is only one City GML module among a dozen other (transportation, vegetation, urban furniture ...). No transport simulation Crowd and traffic simulation is out of the scope of this work. However, such simulation necessitate Please note that this classification is based on common usage rather than on strict mathematical differences. From a mathematical point of view, Lidar, image and raster data are of same nature (2D lattices, i.e. regularly sampled values), and the definition of vectors data is vague (parametrized shapes with semantic, the types of shape and parameters varying). Figure 5: importance objets reconstruction of specific data which we will briefly cover. Reader can refer to the recent state of the art of (Duives et al., 2013) for more details about traffic simulation. Moreover the boundaries may be fuzzy. For example it is possible to create an image from a Lidar pointcloud (sensor view, See Fig. 8 on the next page), and a pointcloud from multi-images (Structure From Motion, SFM, see Carrivick et al. (2016) for a recent book about sfm and geoscience ). Similarly, a conservative two-way conversion between raster and vector data is possible under certain assumptions (2.5D). In the next sections we introduce each of this available data. Each section is illustrated by real data for a street of Toulouse city (France), from mobile mapping (Paparoditis et al. (2012)), or from aerial images (French mapping agency, IGN). 2.1 1.7 Lidar data Plan Reconstruction always necessitates data representing the city, we first analyse which data are available (2.). City is composed of many components, and many methods from different research community try to reconstruct them. We first propose a transcomponents classification of reconstruction approaches (3.). We then dress independent state of the art for each category of city components being reconstructed, such as street reconstruction (Section 5. on page 9), street network reconstruction ( 6. on page 11), urban features reconstruction/modelling (vegetation ( 7. on page 13), and urban objects reconstruction/modelling 8. on page 15). This simple ordering is necessary due to the wide differences between methods. For each of this categories, we propose several ways to classify the state of the art methods, to allow a multi-level understanding of the field. We conclude this work by giving perspectives about the evolution of city reconstruction. 2. INPUT DATA We analyse what data are available for city components reconstruction. These data can be ordered from less structured (Lidar data, vector data) to more structured (image data, raster data), and from less abstract (Lidar data, image data) to more abstract (raster data, vector data). (See Figure 6) Figure 6: Available data types for city components reconstruction, ordered from less to more abstract, and from less to more structured. 2.1.1 Intro Light Detection And Ranging (LIDAR, noted ”Lidar” for readability) data are becoming more and more available to the point of being common. Their interest is partly due to the complementary nature they offer to images, making them extremely popular in urban reconstruction. In particular, they offer easy access to 3D coordinates. A Lidar device uses active sensing, and can be fix or embedded on mobile objects (plan, drone, vehicles, train, etc.). Figure 7 illustrates a point cloud from a terrestrial Lidar. 2.1.2 Principle The Lidar principle is simple and very similar to a Laser measuring tape. The device emits a short light impulsion (i.e. active sensing) from a know position in a known direction at a precisely known time. This light signal flies for some time, hits an obstacle and is partially reflected backward to the device. The device receives this reflected signal. Then it analyses the time of flight, and given the speed of light in air, it can compute the distance from the device to the obstacle. This gives the precise 3D position of the obstacle, hence a 3D point. The magnitude (i.e amplitude of signal) of the return impulse is also extracted, quantifying the ability of the obstacle to efficiently reflect light (at the Lidar frequency, for a given input angle). Intuitively, a street furniture of polished metal will reflect much more light than a rugged stone wall. 2.1.3 Data volume Such sensing is made at high frequency (0.1 to 1 Mpts/s), making the data volume huge and barely tractable in practice. Yet, even at several millions of point per second, we are short of a typical HD video-film acquisition data rate (1200*1800 pixels, 25 times per second). However, the data volume is much more difficult to manage with Lidar data than image data (See Cura et al. (2016) for more details about point cloud management). One has to remember than photography have been invented two centuries ago, and that digital imaging has been researched for several decades. In opposition dense 3D point clouds and Lidar processing are much newer. The industry still lacks standard formats, powerful viewers and editors, and mature compressions (for example : (Mongus et al., 2011). The link to the compressive sensing theory (Baraniuk et al., 2011) does not seem to have attracted much interest either). All in all, the main issue with Lidar data is no more its volume, but the lack of management framework as a whole (See Cura et al. (2016)). Figure 7: Street Lidar Point cloud ( intensity tone from blue to white to red). 2.1.4 Details and facts Lidar can be airborne (several points per square meter, precision of 0.1 to 1m) or ground based (for stationary station: precision less than 1mm, for vehicle: precision around 0.1 to 1cm). More sophisticated methods allow to acquire and store the full waveform of the return signal, which can be used to extract multiple points per waveform (e.g. one point for the forest canopy, one point for the forest mid level and one point for the ground) (Mallet, 2010). Other recent technologies propose multi-spectrums Lidar (Hakala et al., 2012; Wallace et al., 2012), but these remain in laboratories for the moment. It is important to note that LIDAR data is an accurate and sparse sampling of 3D objects by nature (e.g. the size of error is small compared to the distance between points). As such, their sparse and 3D nature is complementary to the high density and 2D nature of images. an image is equivalent (dual) to the traditional 3D point cloud, and can be used as a 3D depth map. However it is not commonly used because working in image space disables the possibility to use classic Euclidian distances. There is no straight relation between 3D distance and pixel distance (2 points separated by 6 meters in 3D world may be separated by any number of pixels). 2.2 Images 0.95 2.2.1 Introduction Images are very common data for urban reconstruction, partly because they are widely available and have been used in computer science for a long time, and also because they are so similar to how we view our environment. Images can be street view images (See Figure 9) or aerial images (See Figure 10). Efficient image processing is made possible by the very regular nature of image data (in particular, pixel neighbourhood is known) and dedicated powerful graphics hardware (Graphics Cards with dedicated in silico parallel processing pipelines). 2.2.2 Principle Image sensing is an approximation of the complex nature of the light signal emitted/reflected by an object at a given time. A camera is only a receiving sensors, making it a passive method. The camera has an array of photo-sensible sensors. Each sensor counts the number of photons arriving during a given time, thus gives an average intensity of light signal over a short time. Matrices of coloured filters allow acquiring the intensity of different parts of the light spectrum (e.g. (Red,Green,Blue) colours). 2.2.3 Aerial image We differentiate aerial images (See Figure 10) from street images as the cameras are usually significantly different. Figure 8: Lidar points can be seen as images (sensor image) as the acquisition process is regular. It is possible to create an image from the Lidar device point of view (sensor image, see Figure 8), because the device physically acquires points following a very regular pattern (lines, grids). Such Aerial images (satellite and viewed from planes) have extensive geographic coverage because of the near uniform acquisition process and many satellites available. In urban context, they tend to have massive occlusion because street canyons are occluding parts of the city. Several passes with different acquisition angles and directions can help reduce this problem (Garcia-Dorado and Aliaga, 2013). Figure 9: Street View (360 degrees panoramic) . It is common to use multiple images to create sparse point clouds using a method called ”structure from motion” (SfM). Such point cloud can then be densified through dense matching. However such point-clouds are very different from those obtained by Lidar. Due to instrinsic 3D reconstruction ambiguities, errors and noise are typically higher, and point sets are sparser in uniform area (e.g. a white texture-less wall). This differences partially explains why many methods are specific to Lidar pointcloud or SfM pointcloud. (Musialski et al., 2012a, Sec. 2.2) give an introduction to SFM. 2.3 Raster data Figure 10: Aerial image data. Radiometric quality is generally high and distortion low. These images are precisely geolocated (i.e. we precisely know from where and in which direction the image was taken in relation to known ground features). Other spectrum than human-visible colours are often available and give precious information (e.g. near infra-red for tree detection). Pixel width is typically between 0.1 and 1 meter. 2.2.4 Street image Street views (9) are usually taken from the ground by a person or a dedicated vehicle circulating the streets. These images allow seeing in great detail buildings façades and streets. Geolocation of images is done trough GPS and inertia sensors, but a centimetric registration of those images is still an open problem. It may be hard to coherently use multiple images because of the level of change and imprecision. Spatial coherence is difficult to obtain because of the registration challenge, temporal coherence because significant parts of the images may be occluded by moving objects, and radiometric coherence (colours) because the lighting conditions may change very quickly (e.g. moving from shadow to direct sun light). The pixel size varies with the depth of the image but can be estimated from 1 to 10cm average, and the data volume is very sizeable (thousands of images per hour). Figure 11: Raster Digital Terrain Model (DTM) data. 2.3.1 Introduction In Geographical Information Science (GIS), a raster dataset is a regularly sampled 2D distribution (i.e an image) draped over a portion of ground ( i.e viewed from above). This image can contain colors channel (RGB), but also any sampled field values. The information contained can then simply be a visual texture (an ortho-photography, making it close to images (Section 2.2). But it can also be more abstract, giving for example some geometric information (the estimated height of roofs in a given area), or semantic information (the probability that the space the pixels cover are made of vegetation), or even statistical (an estimation of the average income distribution over a city). The Figure 11 shows a raster representing the ground elevation. 2.3.2 Level Of Details (LOD) Rasters can be very large images (covering large ground with many small pixels). Thus they typically require a Level Of Details (LOD ) approach. A raster can be tiled (regularly cut into smaller pieces) to access only a part of interest, and/or used at varied resolution (e.g. pyramid representation of the JPEG 2000 standard). Note that point cloud can also use LOD approach (See Cura et al. (2016)). 2.3.3 Details Rasters are prone to quantization errors (intuitively, it is hard to represent a curve with rectangular pixels). They also have an obvious limitation: they can represent a 2.5D surface but not all 3D form or volume. Full 3D volume can be obtained with voxel grids, but these does not seem to be as used as plain rasters. 2.4.3 Obtaining vectors Vectors are not a direct result of sensing, but an interpretation of reality. Such interpretation can be automatic or done by human. Thus vector data can be obtained by an analysis of direct sensing data, which is a part of the objectives of the remote sensing research community (e.g road extraction (Bar Hillel et al., 2012)). It is important to note that raster can be more semantically abstract than images and Lidar because they can sample any distribution. Thus the values can represent other things than direct sensing data (e.g. a land use map). Vectors can also be man-drawn (using aerial images in background), produced by field survey (involving a positional device to map the objects), or extracted from pre-existing maps (vectorisation). 2.4 Vector data Vectors are not regular by nature (no information about neighbourhood), however using the attributes one can create a so called ”topological model”, which allows to create a graph structure over vectors. For instance a road axis network is composed of road axis (vector) with topological information (axis i and j are connected at node n). A typical example would be that for each vector an attributes gives its connected vectors with some orientation information. This data structure is harder to manage and to use but allows minimizing data duplication. Using such a data structure enable different applications like traffic simulation, or advanced spatialrelationship analysis. 3. APPROACHES FOR RECONSTRUCTION / MODELLING In this section, we first propose a transverse classification of methods reconstructing/modelling the different urban aspects. Then, we give pointers for procedural modelling, grammar, and inverse procedural modelling. Figure 12: Vector data: various vector types forming a map. 2.4.1 Intro Vector Data are classical data in map making (See Figure 12 which illustrates a number of vector data forming a map). Intuitively, vector data are arbitrary (mostly 2D) simple parametrized shapes with attributes, and often associated visualisation rules. Usually the shapes are limited to points, poly-lines and polygons with holes. More generic forms like curve (arc of circles,Bezier curves, splines) , or 3D primitives (meshes, triangulated networks) are less common. Attributes are values attached to a shape. For instance a tree could be represented as a polygon for the boundary of its trunk at ground height, along with the attribute ”tree species” (e.g. ”Platanus”) and ”height of the tree” (e.g. ”12.4”). Vectors are closely associated with maps, therefore they are often used in complex visualisation rules. For instance a point with a text attribute can be visualised as a label (text on map). 2.4.2 Abstract data Vector data are usually more abstract than the other data by nature and by usage. By nature because both images and lidar point clouds can be represented losslessly with vectors. However vector data is irregular by nature (no information on neighbourhood). As a consequence representing images as grid of rectangle vectors is of reduced interest. Vector data are also traditionally more abstract by usage. For instance a 2D polygon would be very classically used to represent a building footprint. In this case this polygon is already a simplified model of the building. Given the height, we could extrude the footprint to create a simple building volume. 3.1 Transverse reconstruction method classification 3.1.1 Reconstruction strategies ordered by model importance In the rest of this chapter, we consider a short state of the art for each aspect of urban modelling/reconstruction (building reconstruction (Sec. 4.), street reconstruction (Sec. 5.), street network reconstruction (Sec. 6.), urban features reconstruction/modelling (vegetation (Sec. 7.), and urban objects reconstruction/modelling (Sec. 8.). These aspects are very different in nature, type of data used, and type of results. Therefore we propose several classifications for the methods of each aspects. Each classification is intended as a way to compare methods. All methods deal with the reconstruction of one aspect of urban model, we propose a transverse classification of these methods. We choose to classify reconstruction strategies by the role the model play in the reconstruction method. At one end of the spectrum, the strategy of direct reconstruction from sensing data (e.g. triangulate a point cloud for instance). In this strategy, the model has a very small role, as it is mostly implicit. At the other end of the spectrum, the strategy of catalogue matching. In this case the reconstruction strategy is to identify which model represents best the data, therefore, the model play a very large role. This classification is illustrated in Figure 1 on page 1. Data-driven reconstruction Some methods reconstruct directly from sensing data (low level reconstruction, data-driven), for instance reconstructing the ground surface, the building approximate geometry, the road network from image, etc. Similarly, points or pixels classification can be seen as low level reconstruction. These methods have the advantage to rely on an implicit model which may be very generic. Yet, the sensing data is often sparse and of relative low quality considering the scale of the considered objects. Moreover, low level reconstruction methods seems to be ill adapted to output structured/complex results (for instance a facade organisation, a hierarchical road network, a graph of parts of a man made object, etc.). Model-driven reconstruction A way to simplify a problem too wide is to add constraints and knowledge about it. Some of the methods therefore add strong hypothesis about the object to reconstruct, typically exploiting prior knowledge (road slope and turning radius is constrained by civil engineering rules, trees tends to grow to maximise exposition to sun light, etc.), and hypothesis of symmetries. These prior knowledge are then expressed as strong models (Template, pattern, etc), and the reconstruction is much more modeldriven (top-down). For instance when reconstructing road markings of pedestrian crossing, we can use the hypothesis that each strip is a rectangle, and that related strips are parallel with a regular spacing. Procedural modelling However template and pattern become difficult to use when the reconstructed objects follow complex patterns and/or hierarchical patterns. In this case, procedural model offers a powerful and adaptable way to construct such results (for instance, expressing a tree procedurally). 3.1.2 Additional considerations for reconstruction strategies Interaction Independently of the strategy used to reconstruct object, a user interaction is often necessary. This is especially the case when input data can not be really trusted, or when the reconstruction method strongly relies on model (procedural modelling for instance). Controlling grammar is difficult and dedicated methods may have to be tailored (for instance, using brush to describe the different parts of a city; or a street network may be generated basing its morphology onto the surroundings). Updating database and fusion Most of the methods we presented are straightforward modelling/reconstruction methods working on sensing data. However, for real life application (especially street network reconstruction), one may use not only sensing data, but also a previous coarser results. For instance an incomplete road network is completed with road extracted from sensing data. These methods are still about reconstruction, but they may also contains supplementary parts such as data fusion, data qualification, etc. 3.2 Procedural modelling and grammar In the procedural modelling paradigm, a model is not defined by a set a parameters, but by a set of rules that can be combined, for instance in a grammar, to model complex objects. This type of modelling has a very high descriptive power, which can be hinted by the fact that grammars are at the very basis of how we express ourselves, and at the veryc ore of computer science. We recommend the read of the seminal article of Parish and Müller (2001); Müller et al. (2006) for an introduction to shape grammar (The Figure 13 is extracted from Parish and Müller (2001)). When reconstructed objects have important and structuring relationship, a grammar is a good tool to formalise these while keeping a strong modelling power (for instance, using a facade grammar, shutters would necessarily be created and linked to a window). Moreover grammar are very hierarchical by nature, which suits well a number of aspects of urban reconstruction, as both natural and man-made object express . Inverse Procedural Modelling Procedural modelling and grammar modelling have great modelling power, but are hard to use in reconstruction. Indeed, they can be used to create a model, but are hard to adapt to model something in particular. In this case the paradigm of Inverse Procedural Modelling is necessary, that is given a model and observations of the object to be reconstructed, what are the parameters and rules of the model that best suits the observations (for instance, given a pedestrian crossing detection, what is its orientation, width, number of bands, etc.). The number of parameters to consider is extremely large, and this, in addition to sparse and noisy observations, may lead to an intractable problem. Catalogue matching In some case, the objects to reconstruct are very well known and may have very little variations. Thus, we can adopt a catalogue matching strategy. Instead of reconstructing an object, we use observations of the object to find the model that is the best match in a large model database. For instance, using a streetview we detect a urban furniture. The image is matched to a database of 3D model of street furniture. The best model is then scaled and oriented. Please note that in this case, the model almost totally determine the result. This allows to decompose the reconstruction problem: First find which street object is where, possibly determining some of its properties, such as its orientation. Then, find or generate a similar 3D model and populate the reconstructed street with it. Figure 13: An example of usage of shape grammar from the seminal article of Parish and Müller (2001). 3.3 Inverse procedural modelling Inverse procedural modelling is the paradigm where a procedural model is fitted to observations. It is important to note that we do not only look for the parameters of the model, but also for the rules used in the model (i.e. the number of parameters is not fixed). For instance in the case of a facade grammar, we do not only look for the number of floors, but for the rules that will be used to generate these floors (for instance, create window with balcony and shutter). 4. BUILDINGS AND FAÇADES Building reconstruction has received much attention in the past decade. Thus, methods have focused on diverse parts of buildings reconstruction (facade reconstruction, roof reconstruction, indoor reconstruction, etc.). Different types of building may also be reconstructed using different methods (Manhattan /Atlanta /Planar-hinged building type (GarciaDorado and Aliaga, 2013) or suburban house (Lin et al., 2013)). Some methods focus on large scale solution, efficient visualization, Level Of Detail feature, etc. The methods used are so diverse that the author of the recent state of the art (Musialski et al., 2012a) have chosen a straight order by goal and data input. Klavdianos et al. (2013) also establish a building reconstruction state of the art. Figure 14: Illustration of Musialski et al. (2012a) illustrating building reconstruction. We refer to the Figure 14 extracted from (Musialski et al., 2012a) for a quick overview of different approaches for building reconstruction. In this work we chose to not develop this topic, as it is covered by recent states of the arts articles for building reconstruction. We note that many of the strategies explained in these articles could be used for the reconstruction of other objects. We also feel that the building reconstruction community has pioneered many advanced articles about shape grammar and inverse procedural modelling. 5. STREET Figure 15: One of Paris street. 5.1 Introduction to street reconstruction 5.1.1 Challenges for street reconstruction Streets are essential components of a city model. As the medium pervading all other structures and objects they are complex. First the geometric nature of streets is specific, detailed and not normalized. Second, a street is a complex arrangement of objects that are interrelated and have their own structure. For instance a pedestrian crossing is located in relation to traffic light and is a structured composition of markings bands. Third, streets are objects that are strongly defined by the uses the inhabitants of the city make for it, in particular regarding their displacement. Thus, a street organisation is partly guided by these functions, and as such, street reconstruction should provide an ouput compatible with this functions. Streets are complex, even for human Streets are so familiar places that we specialise very early in using them during childhood. However one can remember the complexity of the task when travelling in another country. There, every aspect of a street can be different. Children have to be taught a long time where and when to walk, not speaking about driving rules, or using the public transportation system, which are even more complex tasks. In this spirit, people with even a light intellectual or physical disability may have significant trouble navigating the public transportation system, which is based on streets. Street for traffic An essential function of street is multi modal navigation (vehicle, public transport, bikes and pedestrian). Such navigation uses network level features (Section 6.) which have great impact at the street level organisation. For instance the sole purpose of street markings is to support traffics. Being on the ground they are prone to occlusion and wear, but there use is strictly regulated (e.g. France reference document is 65 pages long, (French Ministry, 2012)). Streets are used for several transportation methods (pedestrian, bike, public transport, vehicle) that are mixed (e.g. a pedestrian crossing is shared between pedestrians and vehicles).These methods shapes in turn the streets, which add to the complexity of it, and increases the difficulty to reconstruct the street. Streets are organised Streets are challenging to model because they form a partially organized structure (typically organised relatively to the central axis), yet are much less locally regular than a building (in particular, the relations are more generalised, like intrinsic partial symmetry vs extrinsic, see (Mitra et al., 2012), ch. 7). Also, the street components have strong relations between them, which makes difficult to model a small area at time (in opposition to building which can reasonably be defined as dissociated from the other close buildings). For example, reconstructing a pedestrian crossing usually implies there would be another in the next hundreds of meters. Some street features may follow a partial symmetry (bollards for instance), a pattern (pedestrian crossing markings bands), or be organised in inter-related hierarchy (lane markings and traffic light) . Streets are hard to sense Lastly the data collection is difficult. Aerial sensing may be impeded by buildings, and the street geometry and features make it difficult to avoid large occlusions due to traffic, people, trees... In opposition to building, whose main feature (door, windows, etc) are large (1m), street are partially organised by kerb (separator between road and sidewalk) which are much smaller (0.1m). The necessary geometric precision is even greater when considering slope and water drainage. Related work There are been remarkably few works on reconstructing streets, even if streets contribution to a city model is evident. We can conjecture that this is partly due to the fact that data to the required precision (less than 0.1m for a basic curb) has been only recently available in urban environment. Also, the geometric nature (streets are not necessary blocky and have irregular shapes), the diverse and complex arrangement of objects (markings, signs, furniture), and the dependency on many research fields (object detection & segmentation, pattern recognition, paving and texturing, intrinsic symmetry detection) makes the problem challenging. However the simulation industry has used dedicated data models (for instance, RoadXML1 or OpenDrive2 ), which characteristically 1 www.road-xml.org 2 www.opendrive.org include network aspect, surface material and 3D representation, along with road objects and road related objects. Powerful specialised softwares allow to design intersections in all their aspects (lane size & position, traffic regulation depending on the traffic throughput, regulatory material) in the construction and CAD field. These software are not included in this state of the art, as we were not able to test them. They also seem to be more designed oriented than reconstruction oriented. Street are also part of a street network, this constraint needs to be enforced at all time, but can provide precious information (e.g. traffic direction(s), thus orientation of traffic signs, etc.). Therefore some methods for street network modelling can also be partially applied to model streets. Even if it has been a common practice, modelling streets like the complimentary space of buildings is not sufficient (Cornelis et al., 2008) for many applications, and in many cases simply erroneous (e.g. private garden, places, parks). 5.2 Modelling the geometry of the street One should model the detailed geometry of the street and curb (which is typically varying to separate pedestrian crossings or driveway entrances). This is counter-intuitively difficult. Such process cannot rely on Manhattan-like hypothesis, and must deal with the precision issue. 5.2.1 Modelling geometry using primitives Some road model from road network modelling methods can be applied (See Section 6. on the next page) For instance road geometry can be modelled as 3D clothoid (McCrae and Singh, 2009; Galin et al., 2010; Applegate et al., 2011; Bertails-Descoubes, 2012), arc and line pieces (Wilkie et al., 2012), polynomial model (Hervieu and Soheilian, 2013), B-Spline (local only) (Wedel et al., 2009), using road profile (Despine and Baillard, 2011), or using brute mesh (Cabral et al., 2009). 5.2.2 Modelling geometry using 2D/3D grids The street / road / ground model can also be far less constrained, and simply be a 2D or 3D grid. This is very similar to having a raster with a semantic label such as road/no road. In this case the mode is implicit (for instance you cannot say directly that the road is of width X at this place). This type of low level modelling as been especially used for autonomous vehicles (see Bar Hillel et al. (2012) for a state of the art on road and lane detection for autonomous vehicle. There are several ways to label the space as in or outside road. In mobile mapping, one can use a direct approach based on the expected height profile of the road, both from Lidar (Yu et al. (2007)). Cornelis et al. (2008) carve space and so model more the free space than the road. Another way to create these maps of road surface is to classify 2D rasters representing the scene viewed from above (Fischler et al. (1981)). This raster can come from various sources, such as aerial image, aerial lidar, or be the result of another process of mobile mapping data (Serna and Marcotegui (2014)). The classification process to decide if a pixel of such a raster is to be labelled as road or not is often contextual, in the sense that the value of this pixel may not be sufficient, but the neighbours values may also be required. For this reason, the classification process is often only the first step of a more complex workflow (Montoya-Zegarra et al. (2014); Boyko and Funkhouser (2011)) that will use implicit hypothesis about a road geometry. For instance, citeBoyko2011 use an active contour to find limit of road, which implicitly model the road border as smooth. The fact that the road is part of a network provides another contextual information that can be leveraged (See part 6.). However reaching the required precision might be difficult. In fact, even with massive terrestrial data, automatically dealing with occlusion to get a coherent street geometry is still an open problem (Hervieu and Soheilian, 2013; Serna and Marcotegui, 2013). 5.3 Object detection, primitive extraction But street are also a subtle arrangement of related objects. Street objects (like vegetation (Section 7.), street furnitures and markings (Section 8.) are hard to deal with individually. Detection is already a hard problem, reconstruction is even harder. Detecting objects in street is challenging due to variety of objects and occlusion. (Golovinskiy et al., 2009) use a four steps method to detect objects in street Lidar: localisation of objects, segmentation, feature extraction and classification for a small amount of objects. Beside comprehensive testing and proposing several alternatives regarding classification methods, they also reach the same conclusion about the importance of relations between objects and use ad-hoc features to this end (”contextual feature”). (Zhang et al., 2010) demonstrate the possibility to perform urban segmentation based on depth map extracted from video. Local features are extracted from depth map (height, planarity, distance to camera), then a random forest classifier followed by a graph cut minimization methods output a labelled segmentation. (Yu et al., 2011a) focus more on segmentation with a basic classification, but their method could be used as primary step for detailed classification. Similarly, (Lafarge et al., 2013) automatically extract primitives (e.g. plan cylinder, torus, etc.) from point cloud obtained by SfM. Their goal is more toward mesh compression and partial holes filling, but such primitives could also be used for object segmentation. Although the core of their method is a planar-based residential house reconstruction, (Lin et al., 2013) also detect objects (mailbox, plant, road sign, streetlight, waste bin) using an adapted version of (Zhang et al., 2010). Whatever the method, the number of types of object detected is small (about 10) and the error rate varies a lot depending on type of objects. The research field of façade reconstruction had the same type problem. The trend to resolve it has been toward leveraging the organisation and relations of objects (contextual information). Therefore we include in this state of the art a prospective consideration of street related object relation detection and analysis. 5.4 Relation between objects At the street level it is possible to leverage the pattern and interrelation of this object to gain critical information about objects. The Figure 4 on page 3 clearly shows that street objects are strongly organised (top), to the point where removing this organisation (bottom right) negate the purpose of these objects. Defining and retrieving relations amongst objects is an old and multidisciplinary problem. (Clementini and Laurini, 2008) review related references in linguistic, philosophy, psychology, Geographical Information System (GIS), Image processing and qualitative spatial reasoning. They propose a common evaluation framework. More related to the GIS community, (Steiniger and Weibel, 2007) present a coherent typology of spatial relations applied to cartographic generalisation. Their typology is general enough to be applied outside of this field. In a recent state of the art, (Touya et al., 2014) describe in great details previous works in the GIS field and propose a new taxonomy along with several use cases to illustrate the relations. Extracting such relations is a difficult problem, and could be related to Extrinsic/intrinsic symmetries (Mitra et al., 2012). The real world relations are fuzzy like in the method used by (Vanegas et al., 2013), where alignment and parallelism spatial relationship in aerial images are defined in a fuzzy way. More generally, complex pattern of objects may need a full grammar to be represented ( See Section 3.2 on page 8). 5.5 Texture synthesis When the objective is to get a photo-realist 3D model, a possible strategy is to use real or synthetic images and drape them on a geometric street model. This texturing process (or draping) is a major bottleneck for reconstructing a large number of streets. Such textures are hard to design, and if using data from sensing, they have to be cleaned. (Cornelis et al., 2008) uses multi-images to blur the detected vehicles and replace them by detailed 3D model. They also use texture map to efficiently store the road and buildings aspects. A state of the art of texture synthesis and deformation is out of the scope of this article (interested reader could refer to (Wei et al., 2009)). To pick a few, (Cabral et al., 2009) uses generic texture deformation by auto-similarity maps to adapt to the geometric deformation. Also, although the focus is not the same, (Ijiri et al., 2008) could be used to generate sometime complex pavement pattern of streets ground. 5.6 Conclusion about street reconstruction Street reconstruction is a difficult problem, which is essential for urban reconstruction, but seems to have been much less studied that building reconstruction. However a large amount of work has been done on road reconstruction, in particular using remote sensing data such as image and aerial lidar. However these methods only reconstruct one aspect of a street (geometry, transport related information, street feature, etc.), and may be of limited precision. We note that street functions (transportation) and features (objects) are closely interrelated, which indicates the need of a global method taking both into account. It seems that streets are strongly determined by their transportation function. As such, the role each street plays in the more global street network is a key factor that has to be taken into account when reconstructing this street. This indicates the necessity to have a multi-scale approach, both at street and street network scale. Street objects have complex organisation (pattern, symmetry), are interrelated, and may also depend on street morphology. This indicates that a very powerful approach able to model hierarchical patterns is needed. Procedural and/or grammar approach appear to be good candidates for this task. 6. STREET NETWORK In this section we introduce challenges and stakes of street network reconstruction, then propose three classifications of street network reconstruction methods. The first classification is by the type of road network that is outputted. The second classification is by the type of input used. The last classification is by the type of road model used. Overall, the type of road network output range from simple network to hierarchical network to fully attributed network for traffic simulation. The input can be from example/template, procedurally (without or with interface), specifying constraints or using GIS data. Popular procedural methods are L-system, Agent-based simulation, and templates. ((Kelly and McCabe, 2006), page 12). 6.1 Introduction to street network reconstruction Street network modelling is of particular importance for city modelling. A city organisation relies so heavily on street network that it is often the first step of the city modelling process(e.g. CityEngine (ESRI, n.d.)). Street are also connected and form a network regulated by traffic laws and many related signs, thus having a specific nature which must be taken into account to enable traffic simulation. The street network then becomes a complex graph which exhibit a partial fractal nature (Frankhauser, 2008). Reconstructing becomes then much more difficult because the support as well as the connectivity information must be retrieved and coherent. 6.1.1 Challenges in street network reconstruction In urban planning designing the properties of the road network is essential for the city growth and for a good interfacing with city surroundings, which makes it a topic of important consequences. The financial and environment-related impacts are also enormous (e.g. road network is commonly used to open up neighbourhood, which can significantly increase land price. On the opposite a major urban road can negatively separate a neighbourhood into disconnected pieces, thus weakening the urban fabric). The street network is the support of several forms of transport which are entangled. This fact has important repercussions on city reconstruction. A street with major vehicle traffic and bus lanes will be morphologically and functionally very different from a pedestrian street. Moreover, reconstructing a city without street network would be pointless because the street network is the very object that links every others and assure the connectivity of the urban fabric. 6.1.2 Why reconstruct street network Reconstructing the street network is essential for numerous applications, being for direct use (navigation), or for indirect information (e.g. gives complementary information about a street that could be used for street morphological properties evaluation for realism or environmental simulation). Real world road network maintenance and construction is a massive industry (around 0.5% of GDP in Europe, according to (European Union Road Federation (2012), pages 29-30). At such it is not surprising that major COmputer Assisted Design (CAD) software companies like Bentley3 and Autodesk4 propose advanced products to create/renovate road networks. These software features would probably place them at the state of the art, however we could not find enough detailed information to discuss them furthermore. We note than for procedural city modelling, constructing the street network is often the first task ((Parish and Müller, 2001) and subsequent shape-grammar based city modelling), because street structures the city. 6.1.3 Street network and road network Most of the methods we consider reconstruct road network, and not necessary road network in urban environment, even less street network (that is also reconstruction street features, street objects, etc. ). As such, these methods focus on reconstructing a network for vehicle, although streets contains other network, such as pedestrian network. Yet pedestrian network can be inferred from road and building (Ballester et al. (2011)), or semi-automatically created with ad-hoc tool (Yirci et al. (2013)) and then updated afterward using GPS trajectories (Park et al. (2015)). We added methods performing road network reconstruction to this state of the art as they may be applied for streets. 3 www.bentley.com/ 4 www.autodesk.com/ 6.2 A classification of road network reconstruction methods In this section we propose three classification of street network reconstruction methods: by targeted road network model complexity, by Input type and by road type. and a specialised solving system allow the system to generate an optimal path for the road taking into account the geometry and the nature of the terrain (constructing bridges or tunnels along the way). 6.2.1 Classification by targeted road network model complexity We propose a first ordering of related article by the type of road network they output. Input data can be even more abstract as in (Despine and Baillard, 2011; Wilkie et al., 2012), where they use polylines with attributes. The challenges are then as much to filter and correct input as to use methods to generate a complete road network data suitable for traffic simulation. Flat road network Some methods are suited to design flat road network (Applegate et al., 2011; Galin et al., 2010; McCrae and Singh, 2009; Merrell and Manocha, 2011). These roads may adapt to terrain geometry and/or constraint (lake, slope, forbidden area), modelling if necessary bridges, tunnel, over passes, etc. 6.2.3 Classification by geometry representation of roads We can also classify the methods for street network reconstruction by the way they model the road surface. hierarchical road network Yet road network is intrinsically hierarchical (motorway, primary way, etc.), procedural methods are particularly adapted for this. For instance, (Parish and Müller, 2001; Chen et al., 2008; Galin et al., 2011; Lipp et al., 2011; Yang et al., 2013) use multi scale methods, but usually only consider the graphical aspect. The clothoid is a popular way to model road. This is due to the fact that clothoids are mathematical curves along which curvature varies linearly, thus conducting to a pleasant acceleration while driving. Dut to this property, clothoids have been used by civil engineer for a long time to construct actual roads. Clothoid can be extended to piece-wise clothoid or super-clothoid (BertailsDescoubes, 2012). In urban environment, acceleration constraints are often less important that historical heritage or global city layout, thus the model iseems to be less used. Road network with traffic information Lastly methods can output a complete road network with full navigation attributes for traffic simulation and/or visualisation (Despine and Baillard, 2011; Wilkie et al., 2012). These methods are more focused on filtering, correcting errors, constructing a multi-layer data model ( global topological network, lane network for traffic, geometry+texture for visualisation). Another popular parametric model is based on arcs (circular arc: (Wilkie et al., 2012), parabolic arcs: (Despine and Baillard, 2011), or just polylines: (Parish and Müller, 2001)). See (Wilkie et al. (2012), pages 2-3) for more geometric primitives for road modelling. 6.2.2 Classification by Input type Methods about street network reconstruction can also be ordered given their data input type. 6.2.4 Other methods that could be applied to road network reconstruction Some methods are adapted to model 3D network like a road network but where tested on other fields. First some methods directly reconstruct road network using results from sensing, such as aerial Lidar (Wang and Weng (2013)), aerial image and radar (Chu He et al. (2013)), GPS traces (Ahmed et al. (2014); Kuntzsch et al. (2015)), or even mobile mapping (Mueller et al. (2011)). For instance (Merrell and Manocha, 2011) is a very general procedural modelling method that analyse an input shape (geometric constraint) in order to create a new bigger procedural model, respecting some user defined constraints. In a different direction, (Krecklau and Kobbelt, 2011) propose a custom grammar adapted to interconnected structures. By defining potential attachment points, and geometrical queries able to find potential connections, there grammar allows to model different kind of interconnections. This may be naturally extended to road network modelling, taking advantage of the connectivity that defines a road network. (Merrell and Manocha, 2011) is example-based (a given model is analysed, then extrapolated to bigger model). A template also plays a role in (Parish and Müller, 2001) to determine the global pattern of road configuration (e.g. dominant grid-pattern as Manhattan, or dominant radial pattern as Paris). Similarly, templates are used for high level road network configuration in (Yang et al., 2013), but more importantly to design minor roads (indirectly). The principal weakness of procedural generation is control (See Section 3.2). Thus many methods try to deal with this by providing interfaces. In (Applegate et al., 2011; McCrae and Singh, 2009) user directly sketches road path in 2D and a 3D clothoid is fitted to the correct elevation and the land is properly dug. In (Lipp et al., 2011) a user directly edits the network graph with advanced operations (copy-past, insertion, rotation, translation) that preserve the graph properties. (Yang et al., 2013) propose some control via constraint layers (e.g. a lake surface, or a given type of organisation for an area). Similarly, many methods use constraints as input. Typically mechanisms permit to define area where road network is constrained, for instance in parks and/or river. (Chen et al., 2008; Parish and Müller, 2001; Lipp et al., 2011). It is different for (Galin et al., 2010, 2011) where the constraints system is at the hearth of the method. In these articles, custom cost functions, special constrains (park, highway without intersection) 6.3 Conclusion The street network is essential for urban reconstruction, as it defines many aspects of the city, and is paramount in the way streets are used. Even more important, the street network is a structuring element for a city, similarly to how the street axis is structuring for street. This indicates that an urban model could be based upon the street network. Most methods focus on road network, few consider urban environment, and no method reconstruct a real street network, including pedestrian network, and vehicle network. In the same spirit, not all methods produce a hierarchical network, even fewer with geometry and traffic information. The difficulty seems to be coming from the fact that a streets network is a graph embedded in 3D, which makes it much more abstract than the sensing information, hence the complexity. In particular, the intersections, bridges, tunnel, fly-over are supplementary difficulties. Because o this complexity, many methods have to rely on user inputs. This indicates that having an interactive editing capabilities of the street network is important and necessary. Some aspects of street network are impossible to determine without street features. For instance the number of lanes has to be inferred from markings, the connectivity of the network from traffic lights and traffic signs, etc. This seems to indicate that a street network reconstruction has to be done at two scales: at the network scale and at the street scale. 7. URBAN VEGETATION RECONSTRUCTION In this section, we introduce why reconstructing urban vegetation is an important part of urban modelling, and which challenges it creates. We then discuss vegetation reconstruction and the various strategies and scale at which it can be done, then we propose three classifications of vegetation reconstruction methods. 7.1 7.1.1 Introduction Why reconstruct vegetation in urban area Vegetation plays an important role for city The vegetation has been primordial for Mankind for a long time. Forests occupy a large part of land surface (30% in France). It is then not a surprise that the vegetation is very common and plays a very important role in cities. The vegetation in cities has a significant influence on noise propagation, air quality and temperature, water cycle, and also has a significant impact on human social behaviour. Each of these aspects covers a vital part of urban planning, be it for comfort (temperature, air quality, human behaviour), or for technical management advantages (water cycle, noise, wind). Vegetation play an important part for city modelling In a pure 3D reconstruction, the vegetation is important for realism and because it is geometrically so different from its surrounding (a sparse organic spherical form, as opposed to the locally planar and compact rectangular form of buildings or streets). As such, methods devised for buildings reconstruction are usually suboptimal at best for tree modelling. Because trees are large and recognisable, they alter much the perception of a street. Vegetation is a multi-scale complex ecosystem Vegetation is often a whole ecosystem, with several species living together. Like many living organisms, plants exhibit a fascinating multi-scale nature with fractal-like properties. Therefore one must define up to which scale the reconstruction process should stop. To the best of our knowledge the current state of the art for trees is at the branch scale, with reconstructed trees having a similar leaf organisation as the model (Pirk et al., 2012), but not an exact leaf to leaf reconstruction. However a recent work on small plants suggests a future move toward the leaf scale (Li et al., 2013). Concerning the vegetation reconstruction, most of the works reconstruct the vegetation in the form of a distribution of species. The large number and scaling challenge The vegetation uses large amount of city surface, and in streets each tree may occupy a large volume. Moreover, the scaling problem is evident when considering that each tree may have hundred of branches, and there are hundred of thousands of trees. Modelling trees at city scale At the city scale, a specific modelling strategy may be needed for trees, as any use of the tree models must introduce a reasonable hardware requirement. To this end, a solution is to have several models for the same tree with different level of details. Trees have a fractal nature, which can be leveraged to allow the efficient modelling of large areas with many trees. A less detailed model can be rendered when the tree is far from the viewer, while the more precise model is showed when the tree is close. (Livny et al., 2011) produce different levels of details for every model of trees. Similarly, the popular XFrog5 can also be used to produce levels of details. When the trees are regrouped, one could also rely on tailored methods to allow realistic and fast visualisation (e.g. (Bruneton and Neyret, 2012)). Vegetation is hard to sense Another point is that trees are by nature occluding elements from an aerial point of view. This stems from the tendency of the trees to capture sun light coming from above, hence they limiting the picturing. For this reason, removing the trees for correct façade reconstruction is a very classical problem in terrestrial laser and image processing. Vegetation is very present in city As a numerical example, about 5% of Paris surface is dedicated to parks, that is not taking into account the two small forest that are officially within Paris (bois de Vincenne and Bois de Boulogne). The number of trees in streets is above 250 000 in Paris. This means that in average there are trees every few dozen meters in Paris streets. Tree reconstruction is also challenging because the sensors (image, Lidar) give information about surfaces, which is fine for a building, but may fail to pass the tree crown to get the branching structure (full wave or hyperspectral Lidar somehow mitigates this). Vegetation reconstruction is useful for other methods Even when reconstruction of vegetation is not explicitly wanted, it can be of great help to have a vegetation model (possibly implicit) for reconstructing other objects occluded by vegetation. Another important use of vegetation is for landmark maps. In such context the large visual space a tree occupies is precious because it is easily recognised.( See (Soheilian et al., 2013) for a state of the art of landmark based localisation, and (Brenner, 2010) for a localisation using exclusively trees). A global state of the art on vegetation modelling and reconstruction is out of scope of this work; therefore we will only give an overview of vegetation modelling and focus on its use in urban context. We also included some method for tree modelling, as these could potentially be used for tree reconstruction using an Inverse Procedural Modelling paradigm. 7.1.2 Challenges in urban vegetation reconstruction Reconstructing the vegetation in an urban environment is challenging for several reasons, some due to the nature of the vegetation (multiscale, ecosystem), some more technical (sensing data precision and completeness, scaling). 7.2 Vegetation reconstruction In this section, we briefly introduce the strategies for vegetation reconstrution, then consider the different scales to which the vegetation can be reconstructed. We then propose three classifications of methods for vegetation reconstruction. 7.2.1 Strategies for vegetation reconstruction 5 http://xfrog.com Focussed on trees Vegetation reconstruction usually focuses on tree reconstruction, even though some methods output an ecosystem type rather than a tree species (Gong (2002)). Orthogonally new Lidar technologies allow accessing more tree properties. For instance (Hakala et al., 2012; Wallace et al., 2012) recover tree properties and canopy properties using multi spectrum Lidar technology. A more model oriented reconstruction The strategies for vegetation reconstruction are slightly different from typical strategies for man-made objects reconstruction (including buildings and façades). This is due to the fact that tree species evolve slowly and have been known for centuries, along with key properties of each species. Moreover, urban tree species are much more limited (order of magnitude : 100) than potential street furniture types for instance (order of magnitude : 10000). For these reasons, and because of the multi-scale problem, top down approaches (model oriented) seems to be much more popular than bottom up approach (data oriented). That is, most model have strong hypothesis and model which are fitted to sensing, rather than directly using sensing to reconstruct trees from scratch. This is quite different from building reconstruction, where building styles can be mixed, and each building does not necessarily fully enforces a style. Tree reconstruction or tree growing There are two main approaches to reconstruct the vegetation in cities: an analytical approach, where we try to retrieve direct morphological information about the tree to reconstruct it as is, and a more synthetic approach where we try to retrieve general information about the tree (species, height, crown seize), then synthesize it using growth model and known parameters of the species. 7.2.2 Choosing a scale for reconstruction Vegetation is multiscale, therefore, before reconstructing, the targeted level of detail has to be chosen. Forest Forest management is a century old tradition. Therefore forest models have been developed, such as group of trees species repartition, possibly with their age, height, crown size, etc. These are used for forest exploitation, land planning and so. Such models are commonly obtained by field surveys, along with information obtained from remote sensing technologies (aerial images, Lidar) (Gong, 2002). For example (Watt et al., 2013) use full-wave ground Lidar to estimate two exploitation-related characteristics of a patch of forest. Patch of trees It is also common to model homogeneous patches of ecosystem, with a larger scope than tree alone, sometimes involving plants modelling. This allows height/species/spatial statistical distribution analysis. Individual tree Tree models have been actively researched, including tree growth characteristics and species specificities. Procedural modelling methods are especially popular. Individual plant Plant modelling is also an age old tradition (Van Gogh, 1888), with many applications in design and entertainment. More recently plant reconstruction has also been tackled (Li et al. (2013)). 7.3 Classifications of urban vegetation reconstruction methods We propose three classification of methods related to vegetation reconstruction. 7.3.1 Classification by input data type We classify the vegetation reconstruction method based on the input they use, from dedicated Lidar to more generic remote sensing, to interactive feedback (human interaction). Input data for tree modeling can be point clouds from Lidar tailored acquisition (Preuksakarn et al., 2010; Livny et al., 2011) or general acquisition (Livny et al., 2010), as well as point clouds from dense matching (Li et al., 2013). Some methods also use aerial images (Iovan et al., 2013), or semantic maps (Beneš et al., 2011). Some methods are based on constraints on the tree growth (Pirk et al., 2012; Runions et al., 2007; Talton et al., 2011). Lastly, many methods rely on user feedback but may be automated by using remote sensing data inputs (Krecklau et al., 2012, 2010; Lintermann and Deussen, 1999). 7.3.2 Classification by modelling method We propose another classification of tree reconstruction following the modelling method they use, from procedural methods to L system to generic grammars. Individual tree modeling is a mature research interest. It has been historically focused on procedural methods. Mature interactive commercial solutions such as XFrog (Lintermann and Deussen, 1999) exist and are widespread. In most cases the trees are modelled procedurally, possibly using parametrised shapes like generalized cylinders (Bloomenthal, 1985; Li et al., 2013; Pirk et al., 2012; Preuksakarn et al., 2010; Xfrog, 2014). Explicit grammar systems are also popular, in particular the LSystem grammar (Deussen et al., 1998). More general grammars have been extended to produce trees along with more rectangular objects (Krecklau et al., 2012, 2010). See Section 3.2 for more details about procedural modelling. 7.3.3 Classification by Reconstruction strategy The last classification of the reconstruction methods we propose is by reconstruction strategy, from direct from data, to analyse-synthesis to inverse procedural modelling to whole urban ecosystem design. Reconstruction strategies can be straightforward (Livny et al., 2010; Preuksakarn et al., 2010) from direct remote sensing data. It requires however high quality data and has not been experimented on city scale. However the reconstructed trees can have similar look and properties as the real one up to the level of group of leafs (Livny et al., 2011), or even the leaf level (Li et al., 2013). Other methods focus on an analysis-synthesis approach. The goal is to retrieve a number of properties of the tree (species, height), along with constraints introduced by its surrounding, then use a realistic growth method to obtain a tree model hopefully close to the real tree. (Runions et al., 2007) use a space constraint approach to model the competition for space, while (Talton et al., 2011) constrain the tree leaf coverage by a bitmask, and (Pirk et al., 2012) add solid object constraints as well as shadow influence. (Iovan et al., 2013) use images to detect and classify urban trees, then use the extracted parameters as well as space constraints to grow plausible urban trees. (Beneš et al., 2011) are even more generic and introduce manrelated constraints on a city area: in some part of the city vegetation growth is strictly controlled (trees species and spatial repartition), in other the control is less strict. Trees are also spreading over time. The system is then evolved over a period of time to generate 3D space + time tree repartition and visualisation. 7.4 Conclusion for urban vegetation reconstruction Vegetation is important for city modelling, both by its sheer presence, the roles it plays (temperature, pollution, noise, water, human perception, etc.), and its interest for urban modelling (street morphology, occlusion, landmark for registration). Yet, the vegetation is hard to reconstruct (complexity, multi-scale, volume), and most methods focus on trees. Because vegetation exhibit a regular and hierarchical nature, procedural modelling methods seem to be very indicated. We note that the vegetation strongly depends on other urban features. Plant species will be influenced by the typology of area (residential, industrial, etc.), plant growing will be influenced by buildings, and realistic trees will most likely be pruned, therefore being influenced by road surface, and some road feature (road surface, traffic light, traffic sign). 8. 8.1 (e.g. traffic signs are almost pure 2D). The material used can also complicate data sensing (glass, shiny metal, reflective paint). However such man-made objects typically expose strong regularities, symmetries, as well as a dominant plan-based structure which can be used by methods to improve reconstruction. 8.1.4 Reconstructing urban features As always in a reconstruction problem, we have to define up to which scale the objects are to be reconstructed. For instance when reconstructing a street bench, shall we simply reconstruct the bench type and orientation, or shall we reconstruct it as several plans with texture, or shall we reconstruct each plank composing it, or shall we even reconstruct how the plank were bolted together, etc. It seems that this level of reconstruction is dictated by the quantity and precision of input data, as well as how much the method is model driven. This problem is especially pregnant in streets, were the most precise data (order of magnitude of 0.01 m) are limitating, as well as the large occlusions. URBAN FEATURES introduction to urban feature reconstruction We consider only man-made urban feature reconstruction (See Section 7. on page 13 for vegetation). We found few methods dedicated to urban feature reconstruction (street furniture, markings, etc.). Therefore we also integrate generic methods for man-made object reconstruction in this state of the art. We consider that these methods could also be applied on street objects. Urban features comprises urban furniture (e.g. barrier), markings (e.g. lane separator markings), but also features of the street such as local height of sidewalk limit, etc. 8.1.1 Importance of street features for city A city contains large amounts of street features, such a street furnitures, markings, etc. These are important by their number (over 1 million in Paris), by their diversity (over 13000 references on a site like (ArchiExpo, 2014)), and above all by the functions they fulfil (information, security, decoration, etc.). Street furnitures are seldom randomly placed and chosen, but instead are essential tools for the complex social interactions that a city host. Figure 4 on page 3 shows well how position and relations are important for urban features. Virtually any human behaviour in a city relies on street objects, essentially because street objects regulate transport (information, rules, isolation, whatever the modality) and play a role into managing the city (waste, water collection). 8.1.2 Importance of urban feature modelling Modelling urban feature is then essential for traffic simulation, and also for realism (some piece of street furniture have achieved a landmark status, like Curitiba bus stations6 in Brazil). Street furnitures can also be extracted to form a landmark map, thus assisting in the georeferencing of a vehicle or user with basic sensors ((Hofmann and Brenner, 2009)). Street feature also strongly separate urban space (between sidewalk and roadway for instance). 8.1.3 Challenges for urban feature reconstruction Reconstructing urban features is difficult because of their relatively small size, essentially disabling any air sensing, and making it difficult to have precise and complete data (e.g., only a part of a parking meter would be on a street view or on a Lidar acquisition). The geometrical complexity may be high or deceptively simple 6 https://en.wikipedia.org/wiki/Rede_Integrada_de_ Transporte Of course this level of reconstruction also depends on the intended applications, a proper generalisation is often necessary for performance reasons (trying to render the nails in the hundred of thousands of Paris street furnitures would most likely fail and be useless). 8.1.5 Input types Traditionally street feature reconstruction methods use street lidar and images (Golovinskiy et al., 2009; Soheilian et al., 2013). In the more general object reconstruction field, other methods use noisy point cloud from images or color and depths devices (RGBD camera, like the Kinect) ((Stuckler et al., 2012)). Even farther, some methods directly use 3D models ((Shapira et al., 2009)) to analyse structure and match it against a database. Some methods inputs are even more abstract, like a set of relations among objects ((Yeh et al., 2012)), or interactive user inputs ((Gal et al., 2009)). 8.1.6 Hypothesis on street features Street objects will most likely be severely occluded during sensing. Therefore, making hypothesis is necessary. For many methods the hypothesis are to exploit regularity of man made object by using combination of simple geometric primitives (plane, sphere, cone, cylinder ...) with strong common properties (e.g planes will tend to be parallel or orthogonal, axes of primitives will tend to be collinear ), and symmetries. (Lau et al., 2011; Umetani et al., 2012) add another level of constraint by stating that the object can be fabricated (e.g joins between parts must have adequate resistance and the global object must be stable). On another level (Yeh et al., 2012; GrzesiakKopec and Ogorzalek, 2013) use relationships between objects to define constraints that the reconstructed objects must satisfy. 8.1.7 Strategies for urban feature reconstruction Because precise street feature reconstruction is quite new and connects to many research communities, we include methods with very different inputs which could be used for street feature reconstruction, even if not explicitly stated by the corresponding articles. Some methods reconstruct directly street features (low level reconstruction), but the sensing data is sparse and often of relative low quality considering the scale of the considered objects. As it is often the case a way to simplify a problem too wide is to add constraints and knowledge about it. Some of the approach therefore add strong hypothesis about the object to reconstruct (Section 8.2.1). Because reconstructing directly street feature may not be feasible, some approaches turn to classical segmentation/classification methods (Section 8.2.2). man-made objects (and even vegetation (Section7.) Such grammars have a great generative power, but one has to resolve an inverse problem to use them for reconstruction. This allows to decompose the reconstruction problem: First find which street object is where, possibly determining some of its properties, such as its orientation. Second, find or generate a similar 3D model and populate the reconstructed street with it. This problem is solved via the Inverse procedural Modeling methodology (See Section 3.3). However, finding the exact corresponding model from incomplete data for a street feature may be challenging (see introduction of this section). Therefore other methods are based on object structure analysis, decomposing it into parts. The reconstruction is then facilitated by the possibility to switch parts of the object as well as complete missing parts by a similar one (Section 8.2.3). Introduction Given the occlusion in data, it may not be possible or satisfactory to reconstruct objects directly. Therefore many methods chose a two steps approach, where the first step detects and classifies objects in the input data. The second step can then be adapted to each object type. For each object type the options are either to reconstruct it directly using tailored methods or to populate the street with a model of this object. Another more radical approach, which we could call extreme classification, relies on an extensive catalogue of objects. The reconstruction process amount then to find the model in the catalogue that is the closest to the sensed object, then use the catalogue model as the reconstruction. 8.2 8.2.1 State of the art Low level reconstruction Intro There is a great body of literature about generic surface reconstruction, bet it flat or curved. A naive approach could be to use these methods to directly reconstruct the street objects. However due to the massive amount of occlusion (a street feature is commonly occluded halfway), strong hypothesis about the object nature are necessary. Also, these methods do not provide semantic information about the reconstructed object (e.g a reconstructed poll wont be identified as a poll but as a cylinder). 8.2.2 Object reconstruction Compared to low level reconstruction Section 8.2.1 , these methods can be fitted to each objects, and the inserted models are cleaner than model reconstructed from scratch. A complete example of this workflow is given by (Cornelis et al., 2008). They use video streams from a street vehicle to reconstruct a 3D map of a city. Along the way they detect cars on the side of the road (3D bounding boxes). Ultimately, they insert into the 3D city model clean 3D car models in these bounding boxes. This greatly improves accuracy of reconstruction and realism of city model. Classification is a transverse problem in many computer science fields. Street objects classification must be adapted to challenging input data (scale, occlusion, sparse data). Also, as stated in the introduction of this section, the number and types of street features is important. This proves to be a major obstacle for machine learning methods which rely on training data. In these training data some uncommon objects may be statistically overwhelmed by more common (and similar) objects (see (Golovinskiy et al., 2009)). Direct surface reconstruction (Bessmeltsev et al., 2012) propose a method to directly generate surfaces from 3D lines as input. The extreme data sparsity is similar to what may be available in street feature reconstruction. The authors interestingly make an hypothesis about what type of surface could be expected from a man-designed object. Another set of difficulties is added by the second step, which imposes not only to classify objects, but also to measure parameters to correctly insert models (orientation, state, potentially more parameters for parametrised objects). Using a noisy point cloud (Guillemot et al., 2012) make hypothesis on repetitions in the data to reconstruct a better surface. Their method defines local patches as small set of points. When reconstructing the surface of a patch they use the local information as well as informations of similar looking patch elsewhere in the point cloud. We order the related methods by the detection / segmentation / classification task, the feature extraction task and the matching task. Such order is only practical because many methods mix these categories. In classification literature the word feature is often used instead of descriptor. We choose here to use the word descriptor to not introduce confusion with the topic (Urban/street feature reconstruction). Simple geometric primitives With dense noisy point clouds of man made objects, (Li et al., 2011) assume that an object consists of regular geometric primitives globally aligned. So, they iteratively detect the primitives with the associated points that support it. Then they extract and enforce global relations among these primitives and remove the associated points from point cloud, before iterating on the reduced point cloud. ((Labatut et al., 2009; Lafarge et al., 2013)) propose other primitive-based approaches applied to buildings which may be transposed to street features reconstruction. The goal of the two works is to extract a mixture of geometric primitives and free-form mesh from noisy stereo-based point clouds. One relies on a binary space partition tree and a RANSAC detection method while the other uses a sophisticated energy-based Jump-Diffusion process. Shape grammars The shape grammars like the one defined by (Krecklau and Kobbelt, 2011) generalise the simple geometric primitives. They are by construction well adapted to represent Detection, segmentation, classification In an influential article, (Golovinskiy et al., 2009) use street Lidar input to demonstrate the full localisation/segmentation/classification pipeline. They test multiple classifiers methods and descriptors, and perform an experiment on large scale real world data. Their method detects around twenty different object types. (Shao et al., 2012) also illustrate a full pipeline but not in a street object context. They use interactively segmented colors and depth images (RGBD). The extracted objects are then matched against a database of 3D models. These models are inserted using an optimisation process to determinate their size and position. In order to tackle the scale problem, (Yu et al., 2011b) propose a segmentation of a massive city point cloud into ground and façades, and potential objects. The work of (Lippow et al., 2008) adapt to the many type of objects to detect (in the computer vision field). Their method learns an AND/OR probabilistic tree for a category of object in annotated images. Such trees are then used for detection, not of one object, but of the category of this object. Some usages do not necessitate accurate object reconstruction. For instance (Hofmann and Brenner, 2009; Soheilian et al., 2013) detect poles (respectively streets signs and markings) based on simple geometric model in order to create a landmark map which can then be used to cheaply localise other data. Timofte and Van Gool (2011) focus on manhole detetection and reconstruction using a mix of 2D and 3D methods for image processing. Similarly, building in real time such localisation map with 3D semantic voxels (Stuckler et al., 2012) significantly improves the registration of their colors + depth images data (RGBD). These voxel maps may also be used for more abstract task like humanrobot communication. Descriptor extraction The task of classification is often very sensitive to the choice of descriptors of an object. A good descriptor should reduce the amount of data necessary to describe the objects, but not reduce the information much. Furthermore, the descriptors must be chosen to be differentiating between object types. A good choice of descriptors increases recognition rate and reduces errors. We refer to the appropriate articles for the classical descriptors used by (Cornelis et al., 2008; Stuckler et al., 2012; Shao et al., 2012; Soheilian et al., 2013) (Implicit Shape Model, simple local RGBD descriptors, many descriptors selected through Random Forest, image and contour-based). Concerning the shape-matching methods, the choice of descriptor is of the essence. The method performance, speed, scaling and accuracy strongly rely on it. (Papadakis et al., 2007) use descriptors based on spherical projection, (Shao et al., 2011) use depth feature as well as geometric primitives, (Eitz et al., 2012) use adapted Gabor filters. For noisy point cloud data, The work of (Kalogerakis et al., 2009) who extract lines of curvature may also be used as a descriptor for street feature. According to the authors, this curvature-based descriptor is specific to man made objects. (Golovinskiy et al., 2009) outline that contextual (i.e. relational) descriptors are of great use for object classification. In that way, (Vanegas et al., 2013) propose a fuzzy relational descriptor that may be adapted to noisy and incomplete data. Using aerial images, the proposed method extracts fuzzy spatial relations between objects like alignment and parallelism. A very complete generalisation of these kinds of relationships is given in (Mitra et al., 2012). This state of the art provides numerous useful reflections about the presence of total or partial symmetry in man made objects. For example, (Xu et al., 2012) propose a method to compute partial symmetries at multiple scales. Such relations could be used as high level descriptors. Model matching To the best of our knowledge no matching system against a 3D model database has yet been applied to street feature reconstruction. However such systems have been developed in the field of model matching. These methods may be transposed to the field of street feature reconstruction, as demonstrated by (Shao et al., 2012) for indoor objects. In fact, most of the presented shape matching methods use 2D sketch produced by a user. Nevertheless such an input could be conceptually replaced by the sensing data of street feature. The pipeline of (Papadakis et al., 2007; Shao et al., 2011; Eitz et al., 2012; Shao et al., 2012) is similar and can be decomposed into an off-line data base creation step, and an on-line query step. First the methods extract descriptors for thousand of 3D objects and constitute a database associating object model with their descriptors. During the on-line step, an user input of a 2D drawing is analysed, the same descriptors are computed and the methods search the 3D models in the database that have the closest descriptors to the user input. The result is a list of matching shapes from database, with a matching score. Howsoever these methods differ by the choice of descriptors, the validation ((Eitz et al., 2012) analyse the best way to perform dimension reduction (i.e. translating optimally a 3D model into 2D views)), and the reconstruction step (only performed by (Shao et al., 2012))). (Jain et al., 2012) also perform shape matching, but in a fundamentally different way. The goal of the author is to automatically transfer materials (i.e. texture, colours and lightning) to a 3D model by matching its different parts with a 3D model database. The authors also follow the two steps that are the constitution of a database of 3D models, and then a query step. The originality is that the database is a graph of parts of models that is automatically computed based on similarities of parts (spatial, geometrical, material-wise). Querying the database then amounts to compute the graph for the queried 3D model, then add this graph to the database graph and use a loopy belief propagation algorithm to perform inference. Interestingly such method introduces the use of structural information about objects. This information is pivotal to estimate the material of each parts. 8.2.3 Object structure analysis Man made objects are constituted of parts having (potentially hierarchical) relations (symmetry, fixed angles, etc). This relations describe the object structure. Intro Object structure analysis may be of great help in street feature reconstruction, and this at two scales. At the part scale (decomposing an object into structured parts, e.g. a street light may be a cylinder (pole) and a sphere (light bubble)), and at the multi object scale (decomposing multi objects into structured objects e.g. a dashed marking line may be described as a repetition of aligned small pieces of plain lines.) Such structure analysis may be useful at the object scale, because analysing the redundancy, structure and organisation of an object allows to extract higher level information about it. It can then be used to compensate noisy or incomplete data ((Shen et al., 2012) do this in a reverse way)(e.g sensing only the front part of a pole may be sufficient if we have the information that poles follow a rotational symmetry). Moreover, a strong structural information and presence of symmetries (Mitra et al., 2012) is typical of man-made objects and may be used as descriptors for classification/matching (Shapira et al., 2009). Alternatively, such regularities allow for compression and Levels Of Detail ((Jang et al., 2006)). This also gives an information orthogonal to pure geometric comparison: it allows to measure how similar the structure of two objects is, rather than their geometry. For instance, a motor bike and a bycicle are structurally similar, but may have very different geometries. Secondly, some methods that leverage structure of object may be generalised at the multi-object scale, i.e. finding and using the structural relations between objects, that are known to structure the layout of objects in a street ( See Section 5.). How to detect symmetries Analysing the structure of a 3D object is complex because it involves unsupervised segmentation as well as a relation extraction between parts. Among the relations used in the methods (generalised), similarities are popular. A typical approximate symmetry pipeline is given in (Mitra et al., 2006), where the input is a 3D model (which could also be a dense 3D pointcloud). In a first step they get random sample points from the surface, and perform pairwise symmetry parameters estimation by taking into account a patch around the points. Then, in the space of the found pairwise-transformation, a clustering is performed to extract dominant transformations. The supports for this transformation are then computed by region growing from the sampled points. (Xu et al., 2012) improve this process by adopting a multi-scale classification. The authors of (Li et al., 2011) choose another direction and perform the equivalent of relation clustering with a custom graph simplifying algorithm. Whereas partial symmetries are covered in (Mitra et al., 2012) as a generalised case of symmetries, (Vanegas et al., 2013) incorporate them in the fuzzy logic theory. Exploiting ad-hoc fuzzy operators, they propose a way to compute fuzzy parallelism, fuzzy alignment, etc. The work of (Cullen and O’Sullivan, 2011) generalise more the symmetry concept by constructing a tree of symmetry compositions representing a pattern. This method is very close to a procedural expression. After having computed such trees for two patterns, they can be merged to create a hybrid pattern that mixes the two input patterns. Other methods use touching relation to extract structure. (Shapira et al., 2009) use a custom descriptor based on local diameter of the object. They use it to iteratively fit Gaussian mixtures in order to find parts, then build a graph representing the relations between parts. They can then perform parts matching taking into account the context of the parts to match. (Jain et al., 2012) extract structure by contact and symmetry analysis, and use it for matching or for generation of hybrid models by genetic evolution. (Lau et al., 2011) retrieve an even more complex structure as they perform inverse procedural modelling (See Section 3.3). They analyse contacts between parts of an input 3D model, parsing it into a graph of connections. Then they use a custom grammar to express this graph by inverse procedural modelling. Using the grammar with the extracted rules and parameters generate a fabricatable 3D model. For completeness sake we mention that some methods consider the decomposition of object into parts as a preprocess step that has already been performed ((Chaudhuri et al., 2011; Xu et al., 2012; Shen et al., 2012)). Using the structure At the object scale having such a structural description of objects allow (Shen et al., 2012) to match parts of 3D model on noisy and sparse RGBD point cloud. The authors of (Chaudhuri et al., 2011) tackle another problem by suggesting parts when building a 3D model from scratch. Yet their method may be used to complete occlusions resulting from street feature sensing. Expressing the object structure is not necessary if the goal is to respect symmetry relations between parts of 3D models when editing (structure preserving editing). For instance (Gal et al., 2009; Bokeloh et al., 2011, 2012) analyse a 3D model to detect symmetries (respectively more general patterns), which produce a set of constraints that are linearised, allowing to edit the shape interactively while computing a solution respecting the constraints by propagating the changes and minimising an energy locally (respectively minimising an energy). At the multiple objects scale, (Krecklau and Kobbelt, 2011) propose an extension to their grammar that add the possibility to model interconnected structures, which are common in street. However using such grammar would require to extract relations and patterns amongst street objects. In the same field (GrzesiakKopec and Ogorzalek, 2013) adapt a shape grammar to resolve a layout problem. Other methods uses these high level data that model the relationship between objects. Still, in all the article we present these relational data are user input and are not extracted (with the exception of (Fisher et al., 2012)). Putting in leverage these relations allows to use powerful optimisation methods to generate a good placement for furniture in a room in ((Yu et al., 2011a)). One limitation is that the number of objects is fixed. (Yeh et al., 2012) remove this restriction by proposing a similar method that uses another advanced optimisation framework to find conjointly the number of objects, as well as their position and orientation. Those two methods could be used in street object reconstruction by resolving an inverse problem : given noisy observations and relations, find an optimal objects reconstruction. Interestingly, (Fisher et al., 2012) directly extract relationships between objects from a clean 3D indoor scene using Bayesian networks and Gaussian mixtures. In a further step they generate a new scene with objects matched from database satisfying the extracted relationships. The relationship between street features is discussed in detail in the section 5.. 8.3 Conclusion Urban features are important (number, role). Urban features are strongly dependent on context (a same white marking could have totally different meanings if it were on the road surface or on the sidewalk). Reconstruction is difficult because data is sparse, yet because the objects are man-made, many hypothesis can be made. When this is not sufficient, user interaction is necessary. Many reconstruction strategies are possible, from direct reconstruction, to model oriented reconstruction, to procedural modelling and grammar, to use of catalogues of objects. 9. CONCLUSION In this chapter we tried to consider all aspects of urban modelling/reconstruction (street, street network, vegetation, urban feature). Each one of this aspect has a dedicated conclusion ( Sec. 5.6 on page 11,Sec. 6.3 on page 12,Sec. 7.4 on page 15, Sec. 8.3 ) There are common elements for all these aspects of urban reconstruction. The first element is that each aspect is important for urban reconstruction. We can not simply reconstruct buildings to reconstruct a city, other aspects also have to be reconstructed. The second element is that reconstruction is difficult for each aspect, the challenges come from the complex nature of urban environnement and from the limitations of available data. The third element is that all the aspects of urban reconstruction seem to be linked. Street network reconstruction require information about urban feature, which are influenced by street morphology, which influence urban vegetation. The last element is that many strategies are available to reconstruct each aspect, from direct reconstruction to procedural modelling. (Inverse) Procedural modelling seems to have potential to reconstruct all the aspects. 10. ACKNOWLEDGMENT This article is an extract of Cura (2016) (chap. 1). We thank Prof.Peter Van Oosterom and Prof.Christian Heipke for their extensive review. 11. BIBLIOGRAPHY References Ahmed, M., Karagiorgou, S., Pfoser, D. and Wenk, C., 2014. A comparison and evaluation of map construction algorithms using vehicle tracking data. Geoinformatica 19(3), pp. 601–632. Applegate, C. S., Laycock, S. D. and Day, A. M., 2011. A sketchbased system for highway design. In: Proceedings of the Eighth Eurographics Symposium on Sketch-Based Interfaces and Modeling, SBIM ’11, ACM, New York, NY, USA, pp. 55–62. ArchiExpo, 2014. ArchiExpo - Public spaces. http://www. archiexpo.com/cat/public-spaces-O.html. Ballester, M. G., Pérez, M. R. and Stuiver, J., 2011. Automatic pedestrian network generation. In: Proceedings 14th AGILE International Conference on GIS, pp. 1–13. Bar Hillel, A., Lerner, R., Levi, D. and Raz, G., 2012. Recent progress in road and lane detection: A survey. Machine Vision and Applications. Baraniuk, R., Davenport, M., Duarte, M., Hegde, c., Laska, J., Sheikh, M. and Yin, W., 2011. An Introduction to Compressive Sensing. Connexions, Rice University, Houston, Texas, p. 118. Beneš, B., Št’ava, O., Měch, R. and Miller, G., 2011. Guided procedural modeling. In: Computer Graphics Forum, Vol. 30, pp. 325–334. Bertails-Descoubes, F., 2012. Super-Clothoids. Comp. Graph. Forum 31(2pt2), pp. 509–518. Bessmeltsev, M., Wang, C., Sheffer, A. and Singh, K., 2012. Design-driven quadrangulation of closed 3D curves. ACM Trans. Graph. 31(6), pp. 178:1–178:11. Bloomenthal, J., 1985. Modeling the mighty maple. In: ACM SIGGRAPH Computer Graphics, Vol. 19, pp. 305–311. Bokeloh, M., Wand, M., Koltun, V. and Seidel, H. P., 2011. Patternaware shape deformation using sliding dockers. ACM Transactions on Graphics (TOG) 30(6), pp. 123. Bokeloh, M., Wand, M., Seidel, H.-P. and Koltun, V., 2012. An algebraic model for parameterized shape editing. ACM Trans. Graph. 31(4), pp. 78:1–78:10. Boyko, A. and Funkhouser, T., 2011. Extracting roads from dense point clouds in large scale urban environment. ISPRS Journal of Photogrammetry and Remote Sensing 66(6), pp. S2–S12. Brenner, C., 2010. Vehicle localization using landmarks obtained by a lidar mobile mapping system. Proceedings of the ISPRS Annals of the Photogrammetry 38, pp. 139–144. Bruneton, É. and Neyret, F., 2012. Real-time Realistic Rendering and Lighting of Forests. Comput. Graph. Forum. Cabral, M., Lefebvre, S., Dachsbacher, C. and Drettakis, G., 2009. Structure-Preserving Reshape for Textured Architectural Scenes. In: Computer Graphics Forum, Vol. 28, pp. 469–480. Carrivick, J. L., Smith, M. W. and Quincey, D. J., 2016. Structure from Motion in the Geosciences. John Wiley & Sons. Chaudhuri, S., Kalogerakis, E., Guibas, L. and Koltun, V., 2011. Probabilistic reasoning for assembly-based 3D modeling. In: ACM Transactions on Graphics (TOG), Vol. 30, p. 35. Chen, G., Esch, G., Wonka, P., Müller, P. and Zhang, E., 2008. Interactive procedural street modeling. ACM Transactions on Graphics 27(3), pp. Article 103: 1–10. Chu He, Fang Yang, Sha Yin, Xinping Deng and Mingsheng Liao, 2013. Stereoscopic Road Network Extraction by DecisionLevel Fusion of Optical and SAR Imagery. IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing 6(5), pp. 2221–2228. Clementini, E. and Laurini, R., 2008. Un cadre conceptuel pour modéliser les relations spatiales. Revue des Nouvelles Technologies de l’Information (RNTI) 14, pp. 1–17. Cornelis, N., Leibe, B., Cornelis, K. and Van Gool, L., 2008. 3d urban scene modeling integrating recognition and reconstruction. International Journal of Computer Vision 78(2), pp. 121–141. Cullen, B. and O’Sullivan, C., 2011. A caching approach to realtime procedural generation of cities from GIS data. Journal of WSCG 19(3), pp. 119–126. Cura, R., 2016. Inverse procedural Street Modelling : from interactive to automatic reconstruction. PhD thesis, Universite Paris Est. Cura, R., Perret, J. and Paparoditis, N., 2016. A scalable and multi-purpose point cloud server (PCS) for easier and faster point cloud data management and processing. ISPRS Journal of Photogrammetry and Remote Sensing. Despine, G. and Baillard, C., 2011. Realistic Road Modelling for Driving Simulators using GIS Data. In: A. Ruas (ed.), Advances in Cartography and GIScience. Volume 2, Lecture Notes in Geoinformation and Cartography, Springer Berlin Heidelberg, pp. 431–448. Deussen, O., Hanrahan, P., Lintermann, B., Mech, R., Pharr, M. and Prusinkiewicz, P., 1998. Realistic modeling and rendering of plant ecosystems. In: Proceedings of the 25th Annual Conference on Computer Graphics and Interactive Techniques, ACM, pp. 275–286. Duives, D. C., Daamen, W. and Hoogendoorn, S. P., 2013. Stateof-the-art crowd motion simulation models. Transportation Research Part C: Emerging Technologies 37, pp. 193–209. Eitz, M., Richter, R., Boubekeur, T., Hildebrand, K. and Alexa, M., 2012. Sketch-Based Shape Retrieval. ACM Trans. Graph. (Proc. SIGGRAPH). European Union Road Federation, 2012. European road statistic 2012. Technical report, ERF, Belgium. Fischler, M. A., Tenenbaum, J. M. and Wolf, H. C., 1981. Detection of roads and linear structures in low-resolution aerial imagery using a multisource knowledge integration technique. Computer graphics and image processing 15(3), pp. 201–223. Fisher, M., Ritchie, D., Savva, M., Funkhouser, T. and Hanrahan, P., 2012. Example-based synthesis of 3d object arrangements. ACM Transactions on Graphics (TOG) 31(6), pp. 135. Frankhauser, P., 2008. Fractal Geometry for Measuring and Modelling Urban Patterns. In: S. Albeverio, D. Andrey, P. Giordano and A. Vancheri (eds), The Dynamics of Complex Urban Systems, Physica-Verlag HD, Heidelberg, pp. 213–243. Gal, R., Sorkine, O., Mitra, N. J. and Cohen-Or, D., 2009. iWIRES: An analyze-and-edit approach to shape manipulation. In: ACM Transactions on Graphics (TOG), Vol. 28, p. 33. Galin, E., Peytavie, A., Guérin, E. and Beneš, B., 2011. Authoring Hierarchical Road Networks. In: Computer Graphics Forum, Vol. 30, pp. 2021–2030. Galin, E., Peytavie, A., Maréchal, N. and Guérin, E., 2010. Procedural generation of roads. In: Computer Graphics Forum, Vol. 29, pp. 429–438. Garcia-Dorado, I. and Aliaga, D. G., 2013. Automatic modeling of planar-hinged buildings. In: Eurographics 2013-Short Papers, pp. 89–92. Golovinskiy, A., Kim, V. G. and Funkhouser, T., 2009. Shapebased recognition of 3d point clouds in urban environments. In: Computer Vision, 2009 IEEE 12th International Conference on, pp. 2154–2161. Gong, P., 2002. Photo Ecometrics for Natural Resource Monitoring. In: A. G. Fabbri, G. Gaál and R. B. McCammon (eds), Deposit and Geoenvironmental Models for Resource Exploitation and Environmental Security, Nato Science Partnership Subseries: 2 (closed), Springer Netherlands, pp. 65–80. Grzesiak-Kopec, K. and Ogorzalek, M., 2013. Intelligent 3D layout design with shape grammars. In: 2013 The 6th International Conference on Human System Interaction (HSI), pp. 265–270. Guillemot, T., Almansa, A. and Boubekeur, T., 2012. Non Local Point Set Surfaces. In: Proceedings of the International Conference on 3D Imaging, Moldeing, Processing, Visualization and Transmission (3DIMPVT). Hakala, T., Suomalainen, J., Kaasalainen, S. and Chen, Y., 2012. Full waveform hyperspectral LiDAR for terrestrial laser scanning. Optics Express 20(7), pp. 7119–7127. Hervieu, A. and Soheilian, B., 2013. Semi-automatic road/pavement modeling using mobile laser scanning. ISPRS Volume II-3/W3, pp. 31. Hofmann, S. and Brenner, C., 2009. Quality assessment of automatically generated feature maps for future driver assistance systems. In: Proceedings of the 17th ACM SIGSPATIAL International Conference on Advances in Geographic Information Systems, GIS ’09, ACM, New York, NY, USA, pp. 500–503. Ijiri, T., Mech, R., Igarashi, T. and Miller, G., 2008. An Examplebased Procedural System for Element Arrangement. In: Computer Graphics Forum, Vol. 27, pp. 429–436. Iovan, C., Cournede, P.-H., Guyard, T., Bayol, B., Boldo, D. and Cord, M., 2013. Model-Based Analysis–Synthesis for Realistic Tree Reconstruction and Growth Simulation. IEEE Transactions on Geoscience and Remote Sensing pp. 1–1. Jain, A., Thormählen, T., Ritschel, T. and Seidel, H.-P., 2012. Material memex: Automatic material suggestions for 3D objects. ACM Trans. Graph. 31(6), pp. 143:1–143:8. Jang, J., Wonka, P., Ribarsky, W. and Shaw, C. D., 2006. Punctuated simplification of man-made objects. The Visual Computer 22(2), pp. 136–145. Kalogerakis, E., Nowrouzezahrai, D., Simari, P. and Singh, K., 2009. Extracting lines of curvature from noisy point clouds. Computer-Aided Design 41(4), pp. 282–292. Kelly, G. and McCabe, H., 2006. A survey of procedural techniques for city generation. ITB Journal 14, pp. 87–130. Klavdianos, P., Zhang, Q. and Izquierdo, E., 2013. A concise survey for 3D reconstruction of building fa\ccades. In: Image Analysis for Multimedia Interactive Services (WIAMIS), 2013 14th International Workshop on, pp. 1–4. Kolbe, T. H., Gröger, G. and Plümer, L., 2005. CityGML – Interoperable Access to 3D City Models. In: Proceedings of the First International Symposium on Geo-Information for Disaster Management, Springer Verlag, pp. 21–23. Krecklau, L. and Kobbelt, L., 2011. Procedural modeling of interconnected structures. In: Computer Graphics Forum, Vol. 30, pp. 335–344. Krecklau, L., Manthei, C. and Kobbelt, L., 2012. Procedural Interpolation of Historical City Maps. EUROGRAPHICS. Krecklau, L., Pavic, D. and Kobbelt, L., 2010. Generalized Use of Non-Terminal Symbols for Procedural Modeling. Comput. Graph. Forum 29(8), pp. 2291–2303. Kuntzsch, C., Sester, M. and Brenner, C., 2015. Generative models for road network reconstruction. International Journal of Geographical Information Science pp. 1–28. Labatut, P., Pons, J. P. and Keriven, R., 2009. Hierarchical shapebased surface reconstruction for dense multi-view stereo. In: Computer Vision Workshops (ICCV Workshops), 2009 IEEE 12th International Conference on, pp. 1598–1605. Lafarge, F., Keriven, R., Brédif, M. and Hiep, V., 2010. Hybrid multi-view reconstruction by jump-diffusion. In: Computer Vision and Pattern Recognition (CVPR), 2010 IEEE Conference on, pp. 350–357. Lafarge, F., Keriven, R., Brédif, M. and Hiep, V., 2013. A Hybrid Multiview Stereo Algorithm for Modeling Urban Scenes. IEEE Transactions on Pattern Analysis and Machine Intelligence 35(1), pp. 5–17. Lau, M., Ohgawara, A., Mitani, J. and Igarashi, T., 2011. Converting 3D furniture models to fabricatable parts and connectors. ACM Press, p. 1. Li, Y., Bao, F., Zhang, E., Kobayashi, Y. and Wonka, P., 2011. Geometry synthesis on surfaces using field-guided shape grammars. Visualization and Computer Graphics, IEEE Transactions on 17(2), pp. 231–243. Li, Y., Fan, X., Mitra, N. J., Chamovitz, D., Cohen-Or, D. and Chen, B., 2013. Analyzing Growing Plants from 4D Point Cloud Data. ACM Trans. Graph. 32(6), pp. 157:1–157:10. Lin, H., Gao, J., Zhou, Y., Lu, G., Ye, M., Zhang, C., Liu, L. and Yang, R., 2013. Semantic Decomposition and Reconstruction of Residential Scenes from LiDAR Data. ACM Transactions on Graphics,(Proc. of SIGGRAPH 2013). Lintermann, B. and Deussen, O., 1999. Interactive modeling of plants. Computer Graphics and Applications, IEEE 19(1), pp. 56–65. Lipp, M., Scherzer, D., Wonka, P. and Wimmer, M., 2011. Interactive modeling of city layouts using layers of procedural content. In: Computer Graphics Forum, Vol. 30, pp. 345–354. Lippow, M. A., Kaelbling, L. P. and Lozano-Perez, T., 2008. Learning grammatical models for object recognition. In: Logic and Probability for Scene Interpretation, Ser. Dagstuhl Seminar Proceedings. Livny, Y., Pirk, S., Cheng, Z., Yan, F., Deussen, O., Cohen-Or, D. and Chen, B., 2011. Texture-lobes for Tree Modelling. In: ACM SIGGRAPH 2011 Papers, SIGGRAPH ’11, ACM, New York, NY, USA, pp. 53:1–53:10. Livny, Y., Yan, F., Olson, M., Chen, B., Zhang, H. and El-Sana, J., 2010. Automatic reconstruction of tree skeletal structures from point clouds. In: ACM Transactions on Graphics (TOG), Vol. 29, ACM, p. 151. Mallet, C., 2010. Analyse de données lidar à Retour d’Onde Complète pour la classification en milieu urbain. PhD thesis, Telecom Paristech IGN Matis. Mastoropoulou, G., Debattista, K., Chalmers, A. and Troscianko, T., 2005. The influence of sound effects on the perceived smoothness of rendered animations. In: Proceedings of the 2nd Symposium on Applied Perception in Graphics and Visualization, ACM, pp. 9–15. McCrae, J. and Singh, K., 2009. Sketching piecewise clothoid curves. Computers & Graphics 33(4), pp. 452–461. Merrell, P. and Manocha, D., 2011. Model synthesis: A general procedural modeling algorithm. Visualization and Computer Graphics, IEEE Transactions on (99), pp. 1–1. Mitra, N. J., Guibas, L. J. and Pauly, M., 2006. Partial and approximate symmetry detection for 3D geometry. ACM Transactions on Graphics (TOG) 25(3), pp. 560–568. Mitra, N. J., Pauly, M., Wand, M. and Ceylan, D., 2012. Symmetry in 3D Geometry: Extraction and Applications. In: EUROGRAPHICS State-of-the-Art Report. Mongus, d., Rupnik, b. and Zalik, B., 2011. Comparison of Algorithms for lossless LiDAR Data Compression. Geospatial Crossroads GI Forum ’11, Wichmann, H, [S.l.]. Montoya-Zegarra, J. A., Wegner, J. D., ’ubor Ladicky, L. and Schindler, K., 2014. Mind the gap: Modeling local and global context in (road) networks. In: German Conference on Pattern Recognition (GCPR), Springer, pp. 212–223. Moussafir, J., Olry, C., Nibart, M., Albergel, A., Armand, P., Duchenne, C., Mahe, F., Thobois, L. and Oldrini, O., 2013. Aircity, a very High-resolution 3D Atmospheric Dispersion Modeling System for Paris. In: 15th Int. Conf. on Harmonisation within Atmospheric Dispersion Modelling for Regulatory Purposes. Mueller, A., Himmelsbach, M., Luettel, T., Hundelshausen, F. V. and Wuensche, H.-J., 2011. GIS-based topological robot localization through LIDAR crossroad detection. In: Intelligent Transportation Systems (ITSC), 2011 14th International IEEE Conference on, IEEE, pp. 2001–2008. Müller, P., Vereenooghe, T., Wonka, P., Paap, I. and Van Gool, L., 2006. Procedural 3D reconstruction of Puuc buildings in Xkipche. In: Eurographics Symposium on Virtual Reality, Archaeology and Cultural Heritage (VAST), pp. 139–146. Musialski, P., Wimmer, M. and Wonka, P., 2012a. Interactive Coherence-Based Façade Modeling. Computer Graphics Forum (Proceedings of EUROGRAPHICS 2012) 31(2), pp. to appear. Musialski, P., Wonka, P., Aliaga, D. G., Wimmer, M., van Gool, L. and Purgathofer, W., 2012b. A Survey of Urban Reconstruction. In: EUROGRAPHICS 2012 State of the Art Reports, EG STARs, Eurographics Association, pp. 1–28. Niggeler, L., 2009. Genève en 3D: une nouvelle dimension pour gérer son territoire (Genf erschliesst mit 3D eine neue Dimension für die Verwaltung seines Hoheitsgebiets),(3D Geneva : a new dimension to manage territory). http://www.cadastre.ch/internet/cadastre/ fr/home/docu/publication/F006.html. OECD, 2010. Tackling Inequalities in Brazil, China, India and South Africa. Organisation for Economic Co-operation and Development, Paris. Papadakis, P., Pratikakis, I., Perantonis, S. and Theoharis, T., 2007. Efficient 3D shape matching and retrieval using a concrete radialized spherical projection representation. Pattern Recognition 40(9), pp. 2437–2452. Paparoditis, N., Papelard, J.-P., Cannelle, B., Devaux, A., Soheilian, B., David, N. and Houzay, E., 2012. Stereopolis II: A multi-purpose and multi-sensor 3D mobile mapping system for street visualisation and 3D metrology. Revue française de photogrammétrie et de télédétection 200(1), pp. 69–79. Parish, Y. I. H. and Müller, P., 2001. Procedural modeling of cities. In: Proceedings of the 28th Annual Conference on Computer Graphics and Interactive Techniques, pp. 301–308. Park, S., Bang, Y. and Yu, K., 2015. Techniques for Updating Pedestrian Network Data Including Facilities and Obstructions Information for Transportation of Vulnerable People. Sensors 15(9), pp. 24466–24486. Pirk, S., Stava, O., Kratt, J., Said, M. A. M., Neubert, B., M\vech, R., Benes, B. and Deussen, O., 2012. Plastic trees: Interactive self-adapting botanical tree models. ACM Transactions on Graphics (TOG) 31(4), pp. 50. Preuksakarn, C., Boudon, F., Ferraro, P., Durand, J.-B., Nikinmaa, E. and Godin, C., 2010. Reconstructing Plant Architecture from 3D Laser scanner data. In: 6th International Workshop on Functional-Structural Plant Models, Davis, United States, pp. 12–17. Ramilo, R., 2005. The Visual Perception and Human Cognition of Urban Environments Using Semantic Scales. Technical report. Runions, A., Lane, B. and Prusinkiewicz, P., 2007. Modeling Trees with a Space Colonization Algorithm. In: Proceedings of the Third Eurographics Conference on Natural Phenomena, NPH’07, Eurographics Association, Prague, Czech Republic, pp. 63–70. Serna, A. and Marcotegui, B., 2013. Urban accessibility diagnosis from mobile laser scanning data. ISPRS Journal of Photogrammetry and Remote Sensing 84, pp. 23–32. Serna, A. and Marcotegui, B., 2014. Detection, segmentation and classification of 3D urban objects using mathematical morphology and supervised learning. ISPRS Journal of Photogrammetry and Remote Sensing p. 34. Seto, K. C., Fragkias, M., Güneralp, B. and Reilly, M. K., 2011. A Meta-Analysis of Global Urban Land Expansion. PLoS ONE 6(8), pp. e23777. Shao, T., Xu, W., Yin, K., Wang, J., Zhou, K. and Guo, B., 2011. Discriminative Sketch-based 3D Model Retrieval via Robust Shape Matching. In: Computer Graphics Forum, Vol. 30. Shao, T., Xu, W., Zhou, K., Wang, J., Li, D. and Guo, B., 2012. An interactive approach to semantic modeling of indoor scenes with an RGBD camera. ACM Trans. Graph. 31(6), pp. 136:1– 136:11. Shapira, L., Shalom, S., Shamir, A., Cohen-Or, D. and Zhang, H., 2009. Contextual Part Analogies in 3D Objects. International Journal of Computer Vision 89(2-3), pp. 309–326. Shen, C.-H., Fu, H., Chen, K. and Hu, S.-M., 2012. Structure recovery by part assembly. ACM Trans. Graph. 31(6), pp. 180:1– 180:11. Soheilian, B., Tournaire, O., Paparoditis, N., Vallet, B. and Papelard, J.-P., 2013. Generation of an integrated 3D city model with visual landmarks for autonomous navigation in dense urban areas. In: 2013 IEEE Intelligent Vehicles Symposium (IV), pp. 304–309. Steiniger, S. and Weibel, R., 2007. Relations among map objects in cartographic generalization. Cartography and Geographic Information Science 34(3), pp. 175–197. Stuckler, J., Biresev, N. and Behnke, S., 2012. Semantic mapping using object-class segmentation of RGB-D images. In: Intelligent Robots and Systems (IROS), 2012 IEEE/RSJ International Conference on, IEEE, pp. 3005–3010. Talton, J. O., Lou, Y., Lesser, S., Duke, J., Měch, R. and Koltun, V., 2011. Metropolis procedural modeling. ACM Trans. Graph. 30(2), pp. 11:1–11:14. Timofte, R. and Van Gool, L., 2011. Multi-view manhole detection, recognition, and 3d localisation. In: Computer Vision Workshops (ICCV Workshops), 2011 IEEE International Conference on, IEEE, pp. 188–195. Touya, G., Bucher, B., Falquet, G., Jaara, K. and Steiniger, S., 2014. Modelling Geographic Relationships in Automated Environments. In: Abstracting Geographic Information in a Data Rich World, Methodologies and Applications of Map Generalisation, springer edn, Lecture Notes in Geoinformation and Cartography, Dirk Burghardt, · Cécile Duchêne, · William Mackaness. Umetani, N., Igarashi, T. and Mitra, N. J., 2012. Guided exploration of physically valid shapes for furniture design. ACM Transactions on Graphics. United Nations, 2012. World Urbanization Prospects: The 2011 Revision. Technical report, United Nations. Van Gogh, V., 1888. Les Tournesols. Vanegas, M. C., Bloch, I. and Inglada, J., 2013. Alignment and Parallelism for the Description of High-Resolution Remote Sensing Images. IEEE Transactions on Geoscience and Remote Sensing 51(6), pp. 3542–3557. Wallace, A., Nichol, C. and Woodhouse, I., 2012. Recovery of Forest Canopy Parameters by Inversion of Multispectral LiDAR Data. Remote Sensing 4(12), pp. 509–531. Wang, G. and Weng, Q., 2013. Remote Sensing of Natural Resources. CRC Press. Watt, M. S., Adams, T., Marshall, H., Pont, D., Lee, J., Crawley, D. and Watt, P., 2013. Modelling variation in Pinus radiata stem volume and outerwood stress-wave velocity from LiDAR metrics. New Zealand Journal of Forestry Science 43(1), pp. 1. Wedel, A., Badino, H., Rabe, C., Loose, H., Franke, U. and Cremers, D., 2009. B-Spline Modeling of Road Surfaces With an Application to Free-Space Estimation. IEEE Transactions on Intelligent Transportation Systems 10(4), pp. 572–583. Wei, L.-Y., Lefebvre, S., Kwatra, V. and Turk, G., 2009. State of the Art in Example-based Texture Synthesis. In: Eurographics 2009, State of the Art Report, EG-STAR, Eurographics Association. Wilkie, D., Sewall, J., Lin, M. C. and Lin, M. C., 2012. Transforming GIS Data into Functional Road Models for Large-Scale Traffic Simulation. IEEE Transactions on Visualization and Computer Graphics 18(6), pp. 890–901. Xfrog, 2014. Xfrog - 3D Trees and 3D Plants for CG Artists. http://xfrog.com/. Xu, K., Zhang, H., Cohen-Or, D. and Chen, B., 2012. Fit and diverse: Set evolution for inspiring 3D shape galleries. ACM Transactions on Graphics (TOG) 31(4), pp. 57. Yang, Y.-L., Wang, J., Vouga, E. and Wonka, P., 2013. Urban Pattern: Layout Design by Hierarchical Domain Splitting. ACM Trans. Graph. 32(6), pp. 181:1–181:12. Yeh, Y.-T., Yang, L., Watson, M., Goodman, N. D. and Hanrahan, P., 2012. Synthesizing open worlds with constraints using locally annealed reversible jump MCMC. ACM Trans. Graph. 31(4), pp. 56:1–56:11. Yirci, M., Brédif, M., Perret, J. and Paparoditis, N., 2013. 2D Arrangement-based Hierarchical Spatial Partitioning: An Application to Pedestrian Network Generation. In: Proceedings of the Sixth ACM SIGSPATIAL International Workshop on Computational Transportation Science, ACM, p. 31. Yu, L.-F., Yeung, S.-K., Tang, C.-K., Terzopoulos, D., Chan, T. F. and Osher, S. J., 2011a. Make it home : Automatic Optimization of Furniture Arrangement. ACM Press, p. 1. Yu, S.-J., Sukumar, S. R., Koschan, A. F., Page, D. L. and Abidi, M. A., 2007. 3D reconstruction of road surfaces using an integrated multi-sensory approach. Optics and Lasers in Engineering 45(7), pp. 808–818. Yu, Z., Xu, C., Liu, J., Au, O. C. and Tang, X., 2011b. Automatic object segmentation from large scale 3D urban point clouds through manifold embedded mode seeking. In: Proceedings of the 19th ACM International Conference on Multimedia, pp. 1297–1300. Zhang, C., Wang, L. and Yang, R., 2010. Semantic segmentation of urban scenes using dense depth maps. In: Computer Vision–ECCV 2010, Springer, pp. 708–721.
1cs.CV
From LZ77 to the Run-Length Encoded Burrows-Wheeler Transform, and Back Alberto Policriti1,2 and Nicola Prezza3? arXiv:1702.01340v1 [cs.DS] 4 Feb 2017 1 University of Udine, Department of Informatics, Mathematics, and Physics, Italy 2 Institute of Applied Genomics, Udine, Italy 3 Technical University of Denmark, DTU Compute Abstract. The Lempel-Ziv factorization (LZ77) and the Run-Length encoded BurrowsWheeler Transform (RLBWT) are two important tools in text compression and indexing, being their sizes z and r closely related to the amount of text self-repetitiveness. In this paper we consider the problem of converting the two representations into each other within a working space proportional to the input and the output. Let n be the text length. We show that RLBW T can be converted to LZ77 in O(n log r) time and O(r) words of working space. Conversely, we provide an algorithm to convert LZ77 to RLBW T in O n(log r + log z) time and O(r + z) words of working space. Note that r and z can be constant if the text is highly repetitive, and our algorithms can operate with (up to) exponentially less space than naive solutions based on full decompression. 1 Introduction The field of compressed computation—i.e. computation on compressed representations of the data without first fully decompressing it—is lately receiving much attention due to the ever-growing rate at which data is accumulating in archives such as the web or genomic databases. Being able to operate directly on the compressed data can make an enormous difference, considering that repetitive collections, such as sets of same-species genomes or software repositories, can be compressed at rates that often exceed 1000x. In such cases, this set of techniques makes it possible to perform most of the computation directly in primary memory and enables the possibility of manipulating huge datasets even on resource-limited machines. Central in the field of compressed computation are compressed data structures such as compressed full-text indexes, geometry (e.g. 2D range search), trees, graphs. The compression of these structures (in particular those designed for unstructured data) is based on an array of techniques which include entropy compression, Lempel-Ziv parsings [1, 2] (LZ77/LZ78), grammar compression [3], and the Burrows-Wheeler transform [4] (BWT). Grammar compression, Run-Length encoding of the BWT [5, 6] (RLBWT), and LZ77 have been shown superior in the task of compressing highly-repetitive data and, as a consequence, much research is lately focusing on these three techniques. In this paper we address a central point in compressed computation: can we convert between different compressed representations of a text while using an amount of working space proportional to the input/output? Being able to perform such task would, for ? Part of this work was done while the author was a PhD student at the University of Udine, Italy. Work supported by the Danish Research Council (DFF-4005-00267) instance, open the possibility of converting between compressed data structures (e.g. self-indexes) based on different compressors, all within compressed working space. It is not the fist time that this problem has been addressed. In [7] the author shows how to convert the LZ77 encoding of a text into a grammar-based encoding, while in [8,9] the opposite direction (though pointing to LZ78 instead of LZ77) is considered. In [10] the authors consider the conversions between LZ78 and run-length encoding of the text. Note that LZ77 and run-length encoding of the BWT are much more powerful than LZ78 and run-length encoding of the text, respectively, so methods addressing conversion between LZ77 and RLBWT would be of much higher interest. In this work we show how to efficiently solve this problem in space proportional to the sizes of these two compressed representations. See the Definitions section for a formal definition of RLBW T (T ) and LZ77(T ) as a list of r pairs and z triples, respectively. Let RLBW T (T ) → LZ77(T ) denote the computation of the list LZ77(T ) using as input the list RLBW T (T ) (analogously for the opposite direction). The following results are illustrated below: (1) We can compute RLBW T (T ) → LZ77(T ) in O(n log r) time and O(r) words of working space  (2) We can compute LZ77(T ) → RLBW T (T ) in O n(log r + log z) time and O(r + z) words of working space Result (1) is based on our own recent work [11] and requires space proportional to the input only as output is streamed to disk. Result (2) requires space proportional to the input plus the output, since data structures based on both compressors are used in main memory. In order to achieve result (2), we show how we can (locally) decompress LZ77(T ) while incrementally building a run-length BWT data structure of the reversed text. Extracting text from LZ77 is a computationally expensive task, as it requires a time proportional to the parse height h per extracted character [12] (with h as large as √ n, in the worst case). The key ingredient of our solution is to use the run-length BWT data structure itself to efficiently extract text from LZ77(T ). 2 Basics Since we work with both LZ77 [1] and the Burrows-Wheeler transform [4] (see below for definitions), we assume that our text T contains both LZ and BWT terminator characters. More specifically, let T be of the form T = #T 0 $ ∈ Σ n , with T 0 ∈ (Σ \ {$, #})n−2 , where $ is the LZ77-terminator, and #—lexicographically smaller than all elements in Σ—is the BWT-terminator. Note that adding the two terminator characters to our text increases only by two the number of LZ77 factors and by at most four the number of BWT runs. The Burrows-Wheeler Transform [4] BW T (T ) is a permutation of T defined as follows. Sort all cyclic permutations of T in a conceptual matrix M ∈ Σ n×n . BW T (T ) is the last column of M . With F and L we will denote the first and last column of M , respectively, and we will say F-positions and L-positions to refer to positions on these two columns. On compressible texts, BW T (T ) exhibits some remarkable properties that permit to boost compression. In particular, it can be shown [6] that repetitions in T generate equal-letter runs in BW T (T ). We can efficiently represent this transform as the list of pairs RLBW T (T ) = hλi , ci ii=1,...,rT where λi > 0 is the length of the maximal i-th ci -run, ci ∈ Σ. Equivalently, RLBW T (T ) ← − λr is the shortest list of pairs hλi , ci ii=1,...,rT satisfying BW T (T ) = cλ1 1 cλ2 2 . . . crTT . Let T − } (in practical cases be the reverse of T . To simplify notation we define r = max{rT , r← T − holds [13], and this definition simplifies notation). rT ≈ r← T With RLBW T + (T ) we denote a run-length encoded BWT data structure on the text T , taking O(r) words of space and supporting insert, rank, select, and access operation on the BWT. Using these operations, functions LF and FL (mapping Lpositions to F-positions and vice versa) and function extend (turning RLBW T + (T ) into RLBW T + (aT ) for some a ∈ Σ) can be supported in O(log r) time. We leave to the next sections details concerning the particular implementation of this data structure. ← − We recall that BW T ( T ) can be built online with an algorithm that reads T -characters left-to-right and inserts them in a dynamic string data structure [14, 15]. Briefly, letting a ∈ Σ, the algorithm is based on the idea of backward-searching the extended reversed ← − ← − ← − text Ta in the BWT index for T . This operation leads to the F-position l where Ta ← − should appear among all sorted T ’s suffixes. At this point, it is sufficient to insert # at ← − ← − position l in BW T ( T ) and replace the old # with a to obtain BW T (Ta). The LZ77 parsing [1] (or factorization) of a text T is the sequence of phrases (or factors) LZ77(T ) = hπi , λi , ci ii=1,...,z where πi ∈ {0, . . . , n−1}∪{⊥} and ⊥ stands for “undefined”, λi ∈ {0, . . . , n−2}, ci ∈ Σ, and: 1. T = ω1 c1 . . . ωz cz , with ωi =  if λi = 0 and ωi = T [πi , . . . , πi + λi − 1] otherwise. 2. For any i = 1, . . . , z, the string ωi is the longest occurring at least twice in ω1 c1 . . . ωi . 3 From RLBWT to LZ77 Our algorithm to compute RLBW T (T ) → LZ77(T ) is based on the result [11]: an algorithm to compute—in O(r) words of working space and O(n log r) time—LZ77(T ) using T as input. The data structure at the core of this result is a dynamic run-length compressed string: Theorem 1. [11, 16] Let S ∈ Σ n and let r̄ be the number of equal-letter runs in S. There exists a data structure taking O(r̄) words of space and supporting rank, select, access, and insert operations on S in O(log r̄) time. ← − The algorithm works in two steps, during the first of which builds RLBW T + ( T ) by inserting left-to-right T -characters in a dynamic RLBW T represented with the data structure of Theorem 1—using the procedure sketched in the previous section. In the second step, the procedure scans T once more left-to-right while searching (reversed) ← − LZ77 phrases in RLBW T + ( T ). At the same time, a dynamic suffix array sampling is created by storing, for each BWT equal-letter run, the two most external (i.e. leftmost and rightmost in the run) text positions seen up to the current position; the key property proved in [11] is that this sparse suffix array sampling is sufficient to locate LZ77 phrase boundaries and sources. LZ77 phrases are outputted in text order, therefore they can be directly streamed to output. The total size of the suffix array sampling never exceeds 2r. From Theorem 1, all operations (insert, LF-mapping, access) are supported in O(log r) time and the structure takes O(r) words of space. The claimed space/time bounds of the algorithm easily follow. Note that, using the algorithm described in [11], we can only perform the conversion ← − RLBW T + ( T ) → LZ77(T ). Our full procedure to achieve conversion RLBW T (T ) → LZ77(T ) consists of the following three steps: 1. convert RLBW T (T ) to RLBW T + (T ), i.e. we add support for rank/select/access queries on RLBW T (T ); ← − 2. compute RLBW T + ( T ) using RLBW T + (T ); ← − 3. run the algorithm described in [11] and compute LZ77(T ) using RLBW T + ( T ). Let RLBW T (T ) = hλi , ci ii=1,...,r (see the previous section). Step 1 can be performed by just inserting characters cλ1 1 cλ2 2 . . . cλr r (in this order) in the dynamic run-length encoded string data structure of Theorem 1. Step 2 is performed by extracting characters T [0], T [1], . . . , T [n − 1] from RLBW T + (T ) and inserting them (in this order) in a dynamic RLBW T data structure with the BWT construction algorithm sketched in the Section (2). Since this algorithm builds the RLBW T of the reversed text, the final result ← − is RLBW T + ( T ). We can state our first result: Theorem 2. Conversion RLBW T (T ) → LZ77(T ) can be performed in O(n log r) time and O(r) words of working space. Proof. We use the dynamic RLBWT structure of Theorem 1 to implement components ← − RLBW T + (T ) and RLBW T + ( T ). Step 1 requires n insert operations in RLBW T + (T ), and terminates therefore in O(n log r) time. Since the string we are building contains rT runs, this step uses O(r) words of working space. Step 2 calls n extend and FL queries on dynamic RLBWTs. extend requires a constant number of rank and insert operations [15]. FL function requires just an access and a rank on the F column and a select on the L column. From Theorem 1, all these operations are supported in O(log r) time, so also step 2 terminates in O(n log r) time. Recall that r is defined to be the maximum ← − between the number of runs in BW T (T ) and BW T ( T ). Since in this step we are build← − ing RLBW T + ( T ) using RLBW T + (T ), the overall space is bounded by O(r) words. Finally, step 3 terminates in O(n log r) time while using O(r) words of space [11]. The claimed bounds for our algorithm to compute RLBW T (T ) → LZ77(T ) follow. 4 From LZ77 to RLBWT Our strategy to convert LZ77(T ) to RLBW T (T ) consists of the following steps: ← − 1. extract T [0], T [1], . . . , T [n − 1] from LZ77(T ) and build RLBW T + ( T ); ← − 2. convert RLBW T + ( T ) to RLBW T + (T ); 3. extract equal-letter runs from RLBW T + (T ) and stream RLBW T (T ) to the output. Step 2 is analogous to step 2 discussed in the previous section. Step 3 requires reading characters RLBW T + (T )[0], ..., RLBW T + (T )[n − 1] (access queries on RLBW T + (T )) and keeping in memory a character storing last run’s head and a counter keeping track of last run’s length. Whenever we open a new run, we stream last run’s head and length to the output. The problematic step is the first. As mentioned in the introduction, extracting a character from LZ77(T ) requires to follow a chain of character copies. In the worst case, the length h of this chain—also called the parse height (see [12] for a formal definition)— √ ← − can be as large as n. Our observation is that, since we are building RLBW T + ( T ), we can use this component to efficiently extract text from LZ77(T ): while decoding factor hπv , λv , cv i, we convert πv to a position on the RLBWT and extract λv characters from it. The main challenge in efficiently achieving this goal is to convert text positions to RLBWT positions (taking into account that the RLBWT is dynamic and therefore changes in size and content). 4.1 Dynamic functions ← − Considering that RLBW T + ( T ) is built incrementally, we need a data structure to encode a function Z : {π1 , ..., πz } → {0, ..., n − 1} mapping those text positions that are the source of some LZ77 phrase to their corresponding RLBW T positions. Moreover, the data structure must be dynamic, that is it must support the following three operations (see below the list for a description of how these operations will be used): – map: Z(i). Compute the image of i – expand: Z.expand(j). Set Z(i) to Z(i) + 1 for every i such that Z(i) ≥ j – assign: Z(i) ← j. Call Z.expand(j) and set Z(i) to j To keep the notation simple and light, we use the same symbol Z for the function as well as for the data structure representing it. We say that Z(i) is defined if, for some j, we executed an assign operation Z(i) ← j at some previous stage of the computation. For technical reasons that will be clear later, we restrict our attention to the case where we execute assign operations Z(i) ← j for increasing values of i, i.e. if Z(i1 ) ← j1 , . . . , Z(iq ) ← jq is the sequence (in temporal order) of the calls to assign on Z, then i1 < · · · < iq . This case will be sufficient in our case and, in particular, i1 , . . . , iq will be the sorted non-null phrases sources π1 , . . . , πz . Finally, we assume that Z(i) is always called when Z(i) has already been defined—again, this will be the case in our algorithm. Intuitively, Z.expand(j) will be used when we insert T [i] at position j in the partial ← − RLBW T + ( T ) and j is not associated with any phrase source (i.e. i 6= πv for all v = ← − 1, . . . , z). When we insert T [i] at position j in the partial RLBW T + ( T ) and i = πv for some v = 1, . . . , z (possibly more than one), Z(i) ← j will be used. The existence and associated query-costs of the data structure Z are proved in the following lemma. Lemma 1. Letting z be the number of phrases in the LZ77 parsing of T , there exists a data structure taking O(z) words of space and supporting map, expand, and assign operations on Z : {π1 , ..., πz } → {0, ..., n − 1} in O(log z) time Proof. First of all notice that, since LZ77(T ) is our input, we know beforehand the domain D = {π | hπ, λ, ci ∈ LZ77(T ) ∧ π 6= ⊥} of Z. We can therefore map the domain to rank space and restrict our attention to functions Z 0 : {0, ..., d − 1} → {0, ..., n − 1}, with d = |D| ≤ z. To compute Z(i) we map 0 ≤ i < n to a rank 0 ≤ i0 < d by binarysearching a precomputed array containing the sorted values of D and return Z 0 (i0 ). Similarly, Z(i) ← j is implemented by executing Z 0 (i0 ) ← j (with i0 defined as above), and Z.expand(j) simply as Z 0 .expand(j). We use a dynamic gap-encoded bitvector C marking (by setting a bit) those positions j such that j = Z(i) for some i. A dynamic gap-encoded bitvector with b bits set can easily be implemented using a red-black tree such that it takes O(b) words of space and supports insert, rank, select, and access operations in O(log b) time; see [11] for such a reduction. Upon initialization of Z, C is empty. Let k be the number of bits set in C at some step of the computation. We can furthermore restrict our attention to surjective functions Z 00 : {0, ..., d − 1} → {0, ..., k − 1} as follows. Z 0 (i0 ) (map) returns C.select1 (Z 00 (i0 )). The assign operation Z 0 (i0 ) ← j requires the insert operation C.insert(1, j) followed by the execution of Z 00 (i0 ) ← C.rank1 (j). Operation Z 0 .expand(j) is implemented with C.insert(0, j). To conclude, since we restrict our attention to the case where—when calling Z(i) ← j—argument i is greater than all i0 such that Z(i0 ) is defined, we will execute assign operations Z 00 (i0 ) ← j 00 for increasing values of i0 = 0, 1, . . . , d − 1. In particular, at each assign Z 00 (i0 ) ← j 00 , i0 = k will be the current domain size. We therefore focus on a new operation, append, denoted as Z 00 .append(j 00 ) and whose effect is Z 00 (k) ← j 00 . We are left with the problem of finding a data structure for a dynamic permutation Z 00 : {0, ..., k − 1} → {0, ..., k − 1} with support for map and append operations. Note that both domain and codomain size (k) are incremented by one after every append operation. Example 1. Let k = 5 and Z 00 be the permutation h3, 1, 0, 4, 2i. After Z 00 .append(2), k increases to 6 and Z 00 turns into the permutation h4, 1, 0, 5, 3, 2i. Note that Z 00 .append(j 00 ) has the following effect on the permutation: all numbers larger than or equal to j 00 are incremented by one, and j 00 is appended at the end of the permutation. To implement the dynamic permutation Z 00 , we use a red-black tree T . We associate to each internal tree node x a counter storing the number of leaves contained in the subtree rooted in x. Let m be the size of the tree. The tree supports two operations: – T .insert(j). Insert a new leaf at position j, i.e. the new leaf will be the j-th leaf to be visited in the in-order traversal of the tree. This operation can be implemented using subtree-size counters to guide the insertion. After the leaf has been inserted, we need to re-balance the tree (if necessary) and update at most O(log m) subtree-size counters. The procedure returns (a pointer to) the tree leaf x just inserted. Overall, T .insert(j) takes O(log m) time – T .locate(x). Take as input a leaf in the red-black tree and return the (0-based) rank of the leaf among all leaves in the in-order traversal of the tree. T .locate(x) requires climbing the tree from x to the root and use subtree-size counters to retrieve the desired value, and therefore runs in O(log m) time. At this point, the dynamic permutation Z 00 is implemented using the tree described above and a vector N of red-black tree leaves supporting append operations (i.e. insert at the end of the vector). N can be implemented with a simple vector of words with initial capacity 1. Every time we need to add an element beyond the capacity of N , we re-allocate 2|N | words for the array. N supports therefore constant-time access and amortized constant-time append operations. Starting with empty T and N , we implement operations on Z 00 as follows: – Z 00 .map(i) returns T .locate(N [i]) – Z 00 .append(j) is implemented by calling N.append(T .insert(j)) Taking into account all components used to implement our original dynamic function Z, we get the bounds of our lemma. ← − The algorithm The steps of our algorithm to compute RLBW T + ( T ) from LZ77(T ) are the following: 1. sort D = {π | hπ, λ, ci ∈ LZ77(T ) ∧ π 6= ⊥}; 2. process hπv , λv , cv iv=1,...,z from the first to last triple as follows. When processing hπv , λv , cv i: (a) use our dynamic function Z to convert text position πv to RLBWT position j 0 = Z(πv ) (b) extract λv characters from RLBWT starting from position j 0 by using the LF function; at the same time, extend RLBWT with the extracted characters. (c) when inserting a character at position j of the RLBWT, if j corresponds to some text position i ∈ D, then update Z accordingly by setting Z(i) ← j. If, instead, j does not correspond to any text position in D, execute Z.expand(j). Our algorithm is outlined below as Algorithm 1. Follows a detailed description of the pseudocode and a result stating its complexity. In Lines 1-5 we initialize all structures and variables. In order: we compute and sort set D of phrase sources, we initialize current text position i (i is the position of the character to be read), we initialize an empty RLBWT data structure (we will build ← − RLBW T + ( T ) online), and we create an empty dynamic function data structure Z. In Line 6 we enter the main loop iterating over LZ77 factors. If the current phrase’s source is not empty (i.e. if the phrase copies a previous portion of the text), we need to extract λv characters from the RLBWT. First, in Line 8 we retrieve the RLBWT position j 0 corresponding to text position πv with a map query on Z. Note that, if πv 6= ⊥, then i > πv and therefore Z(πv ) is defined (see next). We are ready to extract characters from RLBWT. For λv times, we repeat the following procedure (Lines 10-19). We read the l-th character from the source of the v-th phrase (Line 10) and insert it in the RLBWT (Line 11). Importantly, the extend operation at Line 11 returns the RLBWT position j at which the new character is inserted; RLBWT position j correspond to text position i. We now have to check if i is the source of some LZ77 phrase. If this is the case (Line 12), then we link text position i to RLBWT position j by calling a assign query on Z (Line 13). If, on the other hand, i is not the source of any phrase, then we call a expand query on Z on the codomain element j. Note that, after the extend query at Line 11, RLBWT positions after the j-th are shifted by one. If j 0 is one of such positions, then we increment it (Line 17). Finally, we increment text position i (Line 19). At this point, we finished copying characters from the v-th phrase’s source (or we did not do anything if the v-th phrase consists of only one character). We therefore extend the RLBWT with the v-th trailing character (Line 20), and (as done before) associate text position i to RLBWT position j if i is the source of some phrase (Lines 21-24). We conclude the main loop by incrementing the current position i on the text (Line 25). Once all characters ← − have been extracted from LZ77, RLBWT is a run-length BWT structure on T . At Line 26 we convert it to RLBW T + (T ) (see previous section) and return it as a series of pairs hλv , cv iv=1,...,r . Theorem 3. Algorithm 1 converts LZ77(T ) → RLBW T (T ) in O(n(log r + log z)) time and O(r + z) words of working space Proof. Sorting set D takes O(z log z) ⊆ O(n log z) time. Overall, we perform O(z) map/assign and n expand queries on Z. All these operations take globally O(n log z) ← − time. We use the structure of Theorem 1 to implement RLBW T + (T ) and RLBW T + ( T ). ← − We perform n access, extend, and LF queries on RLBW T + ( T ). This takes overall ← − O(n log r) time. Finally, inverting RLBW T + ( T ) at Line 26 takes O(n log r) time and O(r) words of space (see previous section). We keep in memory the following structures: ← − D, Z, RLBW T + ( T ), and RLBW T + (T ). The bounds of our theorem easily follow. 5 Conclusions In this paper we presented space-efficient algorithms converting between two compressed file representations—the run-length Burrows-Wheeler transform (RLBWT) and the LempelZiv 77 parsing (LZ77)—using a working space proportional to the input and the output. Both representations can be significantly (up to exponentially) smaller than the text; our solutions are therefore particularly useful in those cases in which the text does not fit in main memory but its compressed representation does. Another application of the results discussed in this paper is the optimal-space construction of compressed self-indexes based on these compression techniques (e.g. [13]) taking as input the RLBWT/LZ77 compressed file. Algorithm 1: lz77 to rlbwt(hπv , λv , cv iv=1,...,z ) input : LZ77 factorization LZ77(T ) = hπv , λv , cv iv=1,...,z of a text T output: RLBWT representation hλv , cv iv=1,...,r of T 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 D ← {π | hπ, λ, ci ∈ LZ77(T ) ∧ π 6= ⊥}; /* Phrase sources sort(D); /* Sort phrase sources i ← 0; /* Current position on T RLBW T ← ; /* Init empty RLBWT of reversed text Z ← ∅; /* Init empty dynamic function structure for v = 1, . . . , z do if πv = 6 ⊥ then j 0 ← Z(πv ); for l = 1, . . . , λv do c ← RLBW T [j 0 ]; j ← RLBW T.extend(c); if i ∈ D then Z(i) ← j; else Z.expand(j); if j ≤ j 0 then j 0 ← j 0 + 1; j 0 ← RLBW T.LF (j 0 ); i ← i + 1; j ← RLBW T.extend(cv ); */ */ */ */ */ /* Map text position to RLBWT position */ /* read char from source */ /* left-extend reverse text’s RLBWT */ /* j is the image of i */ /* j does not have counter-image */ /* new char falls before j 0 */ /* Advance text position */ /* Extend with trailing character */ if i ∈ D then Z(i) ← j; else Z.expand(j); i ← i + 1; return reverse(RLBW T ); /* Advance text position */ /* Build and return RLBW T (T ) */ We point out two possible developments of our ideas. First of all, our algorithms rely heavily on dynamic data structures. On the experimental side, it has been recently shown [17] that algorithms based on compressed dynamic strings can be hundreds of times slower than others not making use of dynamism (despite offering very similar theoretical guarantees). This is due to factors ranging from cache misses to memory fragmentation; dynamic structures inherently incur into these problems as they need to perform a large number of memory allocations and de-allocations. A possible strategy for overcoming these difficulties is to build the RLBWT by merging two static RLBWTs while using a working space proportional to the output size. A second improvement over 1 our results concerns theoretical running times. We note that our algorithms perform a number of steps proportional to the size n of the text. Considering that the compressed file could be exponentially smaller than the text, it is natural to ask whether it is possible to perform the same tasks in a time proportional to r + z. This seems to be a much more difficult goal due to the intrinsic differences among the two compressors—one is based on suffix sorting, while the other on replacement of repetitions with pointers. References 1. Ziv, J., Lempel, A.: A universal algorithm for sequential data compression. IEEE Transactions on information theory 23(3) (1977) 337–343 2. Ziv, J., Lempel, A.: Compression of individual sequences via variable-rate coding. Information Theory, IEEE Transactions on 24(5) (1978) 530–536 3. Charikar, M., Lehman, E., Liu, D., Panigrahy, R., Prabhakaran, M., Sahai, A., Shelat, A.: The smallest grammar problem. Information Theory, IEEE Transactions on 51(7) (2005) 2554–2576 4. Burrows, M., Wheeler, D.J.: A block-sorting lossless data compression algorithm. (1994) 5. Sirén, J., Välimäki, N., Mäkinen, V., Navarro, G.: Run-length compressed indexes are superior for highly repetitive sequence collections. In: String Processing and Information Retrieval, Springer (2009) 164–175 6. Sirén, J., et al.: Compressed full-text indexes for highly repetitive collections. PhD thesis, Helsingin yliopisto (2012) 7. Rytter, W.: Application of Lempel-Ziv factorization to the approximation of grammar-based compression. Theoretical Computer Science 302(1) (2003) 211–222 8. Bannai, H., Inenaga, S., Takeda, M.: Efficient LZ78 factorization of grammar compressed text. In: String Processing and Information Retrieval, Springer (2012) 86–98 9. Bannai, H., Gawrychowski, P., Inenaga, S., Takeda, M.: Converting SLP to LZ78 in almost Linear Time. In: Combinatorial Pattern Matching, Springer (2013) 38–49 10. Tamakoshi, Y., Tomohiro, I., Inenaga, S., Bannai, H., Takeda, M.: From run length encoding to LZ78 and back again. In: Data Compression Conference (DCC), 2013, IEEE (2013) 143–152 11. Policriti, A., Prezza, N.: Computing LZ77 in Run-Compressed Space. In: Data Compression Conference (DCC), 2016, IEEE (2016) 12. Kreft, S., Navarro, G.: On compressing and indexing repetitive sequences. Theoretical Computer Science 483 (2013) 115–133 13. Belazzougui, D., Cunial, F., Gagie, T., Prezza, N., Raffinot, M.: Composite repetition-aware data structures. In: Proc. CPM. (2015) 26–39 14. Hon, W.K., Lam, T.W., Sadakane, K., Sung, W.K., Yiu, S.M.: A space and time efficient algorithm for constructing compressed suffix arrays. Algorithmica 48(1) (2007) 23–36 15. Chan, H.L., Hon, W.K., Lam, T.W., Sadakane, K.: Compressed indexes for dynamic text collections. ACM Transactions on Algorithms (TALG) 3(2) (2007) 21 16. Mäkinen, V., Navarro, G., Sirén, J., Välimäki, N.: Storage and retrieval of highly repetitive sequence collections. Journal of Computational Biology 17(3) (2010) 281–308 17. Prezza, N.: A Framework of Dynamic Data Structures for String Processing. arXiv preprint arXiv:1701.07238 (2017)
8cs.DS
arXiv:1609.03624v1 [math.GR] 12 Sep 2016 ROST INVARIANT ON THE CENTER, REVISITED SKIP GARIBALDI AND ALEXANDER S. MERKURJEV Abstract. The Rost invariant of the Galois cohomology of a simple simply connected algebraic group over a field F is defined regardless of the characteristic of F , but unfortunately some formulas for it are only known with some hypothesis on the the characteristic. We improve those formulas by (1) removing the hypothesis on the characteristic and (2) removing an ad hoc pairing that appears in the original formulas. As a preliminary step of independent interest, we also extend the classification of invariants of quasi-trivial tori to all fields. 1. Introduction Cohomological invariants provide an important tool to distinguish elements of Galois cohomology groups such as H 1 (F, G) where G is a semisimple algebraic group. In case G is simple and simply connected there are no non-constant invariants with values in H d (∗, Q/Z(d − 1)) for d < 3. For d = 3, modulo constants the group of invariants H 1 (∗, G) → H 3 (∗, Q/Z(2)) is finite cyclic with a canonical generator known as the Rost invariant and denoted by rG ; this was shown by Markus Rost in the 1990s and full details can be found in [GMS03]. Rost’s theorem raised the questions: How to calculate the Rost invariant of a class in H 1 (F, G)? What is a formula for it? At least for G of inner type An there is an obvious candidate for rG , which is certainly equal to mrG for some m relatively prime to n + 1. The papers [MPT02] and [GQM07] studied the composition (1.1) r G H 3 (F, Q/Z(2)) H 1 (F, C) → H 1 (F, G) −→ for C the center of G, and under some assumptions on char F , computed the composition in terms of the value of m for type A. Eventually the value of m was determined in [GQM11]. The main result is Theorem 1.2, which gives a formula for (1.1) which does not depend on the type of G nor on char F . This improves on the results of [MPT02] and [GQM07] by removing the hypothesis on the characteristic and avoiding the ad hoc typeby-type arguments used in those papers. We do rely on [GQM11] for the computation of m for type A, but nothing more. The strategy is to (1) extend the determination of invariants of quasi-trivial tori from [MPT02] to all fields (see Theorem 3.7), (2) to follow the general outline of [GQM07] to reduce to the case of type A, and (3) to avoid the ad hoc formulas used in previous work by giving a formula independent of the Killing-Cartan type of G. 2010 Mathematics Subject Classification. 20G15 (Primary); 11E72 (Secondary). The work of the second author has been supported by the NSF grant DMS #1160206. 1 2 SKIP GARIBALDI AND ALEXANDER S. MERKURJEV Specifically, there is a canonically defined element t◦G ∈ H 2 (F, C ◦ ), where C ◦ denotes the dual multiplicative group scheme of C in a sense defined below, and a natural cup product H 1 (F, C) ⊗ H 2 (F, C ◦ ) → H 3(F, Q/Z(2)). We prove: Theorem 1.2. Let G be a semisimple and simply connected algebraic group over a field F , C ⊂ G the center of G. Let t◦G be the image of the Tits class tG under ρ̂∗ : H 2 (F, C) → H 2 (F, C ◦ ). Then the diagram H 1 (F, C) i∗ / H 1 (F, G) PPP PPP PPP rG −t◦G ∪ PPP'  H 3 (F, Q/Z(2)) commutes. This result then gives a general statement for all invariants H 1 (∗, G) → H 3 (∗, Q/Z(2)), which we state precisely in Theorem 6.4 below. 2. Cohomology of groups of multiplicative type Let F be a field and M a group scheme of multiplicative type over F . Then M is uniquely determined by the Galois module M ∗ of characters over Fsep . In particular, we have × M(Fsep ) = Hom(M ∗ , Fsep ). If M is a torus T , then T ∗ is a Galois lattice and we set T∗ = Hom(T ∗ , Z). We have (2.1) × T (Fsep ) = T∗ ⊗ Fsep . If M is a finite group scheme C of multiplicative type, we set C∗ := Hom(C ∗ , Q/Z), so we have a perfect pairing of Galois modules (2.2) C∗ ⊗ C ∗ → Q/Z. Write C ◦ for the group of multiplicative type over F with the character module C∗ . We call C ◦ the group dual to C. Example 2.3. We write µn for the sub-group-scheme of Gm of n-th roots of unity. The restriction of the natural generator of G∗m (the identity Gm → Gm ) generates µ∗n and thereby identifies µ∗n with Z/nZ. From which µ∗n = Z/nZ via the pairing (2.2), hence µ◦n = µn . The change-of-sites map α : Spec(F )fppf → Spec(F )ét yields a functor α∗ : Shfppf (F ) → Shét (F ) between the categories of sheaves over F and an exact functor Rα∗ : D + Shfppf (F ) → D + Shét (F ) between derived categories. ROST INVARIANT ON THE CENTER, REVISITED 3 Every group M of multiplicative type can be viewed as a sheaf of abelian groups either in the étale or fppf topology. We have α∗ (M) = M for every group M of multiplicative type. If M is smooth, we have Ri α∗ (M) = 0 for i > 0 by [Mil80, Proof of Theorem 3.9]. It follows that Rα∗ (M) = M, hence i i i Hét (F, M) = Hét (F, Rα∗ (M)) = Hfppf (F, M) for M smooth. If 1→C→T →S→1 is an exact sequence of algebraic groups with C a finite group of multiplicative type and T and S tori, this sequence is exact in the fppf-topology but not in the étale topology (unless C is smooth). Applying Rα∗ to the exact triangle C → T → S → C[1] in D + Shfppf (F ), we get an exact triangle Rα∗ (C) → T (Fsep ) → S(Fsep ) → Rα∗ (C)[1] in D + Shét (F ) since Rα∗ (T ) = T (Fsep ) and the same for S. In other words, (2.4) Rα∗ (C) = cone(T (Fsep ) → S(Fsep ))[−1]. × placed Recall that Z(1) is the complex in D + Shét (F ) with only one nonzero term Fsep × in degree 1, i.e., Z(1) = Fsep [−1]. Set L C∗ (1) := C∗ ⊗ Z(1), L C ∗ (1) := C ∗ ⊗ Z(1), where the derived tensor product is taken in the derived category D + Shét (F ). If T is an algebraic torus, we write L T∗ (1) := T∗ ⊗ Z(1) = T∗ ⊗ Z(1) = T (Fsep )[−1]. Tensoring the exact sequence 0 → T∗ → S∗ → C∗ → 0 with Z(1) and using (2.1), we get an exact triangle C∗ (1) → T (Fsep ) → S(Fsep ) → C∗ (1)[1]. It follows from (2.4) that C∗ (1) = Rα∗ (C) and therefore, i i i Hfppf (F, C) = Hét (F, Rα∗ (C)) = Hét (F, C∗ (1)). Recall that we also have i+1 i i (F, T ) = Hét (F, T∗ (1)). (F, T ) = Hét Hfppf 4 SKIP GARIBALDI AND ALEXANDER S. MERKURJEV Remark 2.5. There is a canonical isomorphism (see [Mer16, §4c]) × C∗ (1) ≃ C(Fsep ) ⊕ (C∗ ⊗ Fsep )[−1] The second term in the direct sum vanishes if char(F ) does not divide the order of C∗ or if F is perfect. i Important. To simplify notation we will write H i (F, C) for H i (F, C∗ (1)) = Hfppf (F, C) i ◦ i ∗ i ◦ and H (F, C ) for H (F, C (1)) = Hfppf (F, C ). Every C-torsor E over F has a class c(E) ∈ H 1 (F, C). Example 2.6. Taking colimits of the connecting homomorphism arising from the sequences 1 → Gm → GLd → PGLd → 1 or 1 → µd → SLd → PGLd → 1 — which are exact in the fppf topology — gives isomorphisms H 2 (K, Gm ) ≃ Br(K) and H 2 (K, µn ) ≃ n Br(K) as in [GS06, 4.4.5]1, which we use. We use the motivic complex Z(2) of étale sheaves over F defined in [Lic87] and [Lic90]. L Set Q/Z(2) := Q/Z ⊗ Z(2). The complex Q/Z(2) is the direct sum of two complexes. The first complex is given by the locally constant étale sheaf (placed in degree 0) the colimit over n prime to char(F ) of the Galois modules µ⊗2 := µn ⊗ µn . The second n complex is nontrivial only in the case p = char(F ) > 0 and it is defined as colim Wn Ω2log [−2] n Wn Ω2log the sheaf of logarithmic de Rham-Witt differentials (see [Kah96]). with Note that H i (F, Q/Z(2)) ≃ H i+1 (F, Z(2)) for i ≥ 3. Twisting (2.2) we get the pairings L C∗ (1) ⊗ C ∗ (1) → Q/Z(2) and (2.7) H i (F, C) ⊗ H j (F, C ◦ ) → H i+j (F, Q/Z(2)). If S is a torus over F , we have S∗ (1) = S∗ ⊗ Gm [−1] = S[−1] and the pairings S∗ ⊗ S ∗ → Z, (2.8) L S∗ (1) ⊗ S ∗ (1) → Z(2) and H i (F, S) ⊗ H j (F, S ◦ ) → H i+j+2 (F, Z(2)) = H i+j+1(F, Q/Z(2)) if i + j ≥ 2. Let 1→C→T →S→1 be an exact sequence with T and S tori and C finite. Dualizing we get an exact sequence of dual groups (2.9) 1This 1 → C ◦ → S ◦ → T ◦ → 1. reference assumes char F does not divide n, because it uses H 1 to denote Galois cohomology. With our notation, their arguments go through with no change. ROST INVARIANT ON THE CENTER, REVISITED 5 We have the homomorphisms ϕ : S(F ) → H 1 (F, C), ψ : H 2 (F, C ◦ ) → H 2 (F, S ◦). Proposition 2.10. For every a ∈ S(F ) and b ∈ H 2 (F, C ◦ ), we have ϕ(a) ∪ b = a ∪ ψ(b) in H 3 (F, Q/Z(2)). Here the cup products are taken with respect to the pairings (2.7) and (2.8) respectively. Proof. The pairing S∗ ⊗ S ∗ → Z extends uniquely to a pairing S∗ ⊗ T ∗ → Q. We have then a morphism of exact triangles L S∗ (1) ⊗ S ∗ (1) / L S∗ (1) ⊗ T ∗ (1) / L S∗ (1) ⊗ C ∗ (1) / L S∗ (1) ⊗ S ∗ (1)[1] s  Z(2) /  Q(2) /  Q/Z(2) /  Z(2)[1] and a commutative diagram H 1 (F, S∗ (1)) ⊗ H 2 (F, C ∗ (1)) / H 1 (F, S∗ (1)) ⊗ H 2 (F, S ∗ (1)[1])  3 H (F, Q/Z(2)) /  3 H (F, Z(2)[1]) and therefore, a commutative diagram H 0 (F, S) ⊗ H 2 (F, C ◦ ) / H 0 (F, S) ⊗ H 2 (F, S ◦ )   H 3 (F, Q/Z(2)) H 3 (F, Q/Z(2)). L L On the other hand, the composition S∗ (1) ⊗ C ∗ (1) → C∗ (1) ⊗ C ∗ (1) → Q/Z(2) coincides with s. Therefore, we have a commutative diagram H 1 (F, S∗ (1)) ⊗ H 2 (F, C ∗ (1))  / H 1 (F, C∗(1)) ⊗ H 2 (F, C ∗ (1))  H 3 (F, Q/Z(2)) H 3 (F, Q/Z(2)) and therefore, a diagram H 0 (F, S) ⊗ H 2 (F, C ◦ )  H 3 (F, Q/Z(2)) The result follows. / H 1 (F, C) ⊗ H 2 (F, C ◦ )  H 3 (F, Q/Z(2)).  6 SKIP GARIBALDI AND ALEXANDER S. MERKURJEV Remark 2.11. We have used that the diagram H i (A[a]) ⊗ H j (B[b]) H i+j (A[a] ⊗ B[b]) / H i+a (A) ⊗ H j+b(B) / H i+j+a+b(A ⊗ B) is (−1)ib -commutative for all complexes A and B. Let A be an étale algebra over F and C a finite group scheme of multiplicative type over A. Then C ′ := RA/F (C) is a finite group of multiplicative type over F . Moreover, C ′ ◦ ≃ RA/F (C ◦ ) and there are canonical isomorphisms ∼ ∼ ◦ ι : H i (A, C) → H i (F, C ′ ) and ι◦ : H i (A, C ◦ ) → H i (F, C ′ ). Lemma 2.12. We have ι(x) ∪ ι◦ (y) = NA/F (x ∪ y) in H i+j (F, Q/Z(2)) for every x ∈ H i (A, C) and y ∈ H j (A, C ◦ ). Proof. The group scheme CA′ is naturally isomorphic to the product C1 × C2 × · · · × Cs of group schemes over A with C1 = C. Let π : CA′ → C be the natural projection. Similarly, C ′ ◦ ≃ C1◦ × C2◦ × · · · × Cs◦ . Write ε : C ◦ → CA′ ◦ for the natural embedding. Then the inverse of ι coincides with the composition π∗ res H i (F, C ′ ) −→ H i (A, CA′ ) −→ H i (A, C) and ι◦ coincides with the composition ε∗ ◦ NA/F ◦ H i (A, C ◦ ) − → H i (A, C ′ A ) −−−→ H i (F, C ′ ). Since π ∗ (ι(x)) = x, we have res(ι(x)) = (x, x2 , . . . xs ) for some xi . On the other hand, ε∗ (y) = (y, 0, . . . , 0), hence res(ι(x)) ∪ ε∗ (y) = x ∪ y. (2.13) Finally, ι(x) ∪ ι◦ (y) = ι(x) ∪ NA/F (ε∗ (y)) = NA/F res(ι(x)) ∪ ε∗ (y)  by the projection formula = NA/F (x ∪ y) by (2.13).  Lemma 2.14 (Projection formula). Let f : C → C ′ be a homomorphism of finite group schemes of multiplicative type. For a ∈ H m (F, C), the diagram H k (F, C ′ ◦ ) ∪f∗ (a) / H k+m(F, Q/Z(2)) f∗  H k (F, C ◦ ) commutes. ∪a / H k+m(F, Q/Z(2)) ROST INVARIANT ON THE CENTER, REVISITED 7 Proof. The pairing used in the diagram are induced by the pairings C ∗ ⊗ C∗ → Q/Z and C ′ ∗ ⊗ C∗′ → Q/Z. The (obvious) projection formula for these pairing reads hf ∗(x), yi = hx, f∗ (y)i for x ∈ C ′ ∗ and y ∈ C∗ .  3. Invariants of quasi-trivial tori 3a. Cohomological invariants. For a field F write H j (F ) for the cohomology group H j (F, Q/Z(j − 1)), where j ≥ 1 (see [GMS03]). In particular, H 1 (F ) is the character group of continuous homomorphisms ΓF → Q/Z and H 2 (F ) is the Brauer group Br(F ). The assignment K 7→ H j (K) is functorial with respect to arbitrary field extensions. If K ′ /K is a finite field extension, we have a well-defined norm map NK ′ /K : H j (K ′ ) → H j (K). The graded group H ∗(F ) is a (left) module over the Milnor ring K∗ (F ). Definition 3.1. Let A be a functor from the category of field extensions of F to pointed sets. A degree d cohomological invariant of A is a collection of maps of pointed sets ιK : A(K) → H d (K) for all field extensions K/F , functorial in K. The degree d cohomological invariants of G form an abelian group denoted by Invd (A). If L/F is a field extension, we have a restriction homomorphism Invd (A) → Invd (AL ), where GL is the restriction of G to the category of field extensions of L. If the functor A factors through the category of groups, we further consider the subgroup Invdh (A) of Invd (A) consisting of those invariants ι such that ιK is a group homomorphism for every K. Example 3.2. If G is an algebraic group over F , we can view G as a functor taking a field extension K to the group G(K) of K-points of G; in this case we consider Invdh (G). We have also another functor H 1 (G) : K → H 1 (K, G) and we consider Invd (G). If G is commutative, then H 1 (K, G) is a group for every K, and we also consider Invdh (H 1 (G)). 3b. Residues. Our goal is to prove Theorem 3.7 concerning the group Invdh (T ) for T a quasi-split torus. Such invariants of order not divisible by char(F ) we determined in [MPT02]. We modify the method from [MPT02] so that it works in general. The difficulty is that the groups H j (K) do not form a cycle module, because the residue homomorphisms need not exist. If K is a field with discrete valuation v and residue field κ(v), write H j (F )nr,v for the subgroup of all elements of H j (F ) that are split by finite separable extensions K/F such that v admits an unramified extension to K. Note that every element in H j (F )nr,v of order not divisible by char(F ) belongs to H j (F )nr,v . There are residue homomorphisms (see [GMS03] or [Kat82]) ∂v : H j (K)nr,v → H j−1(κ(v)). 8 SKIP GARIBALDI AND ALEXANDER S. MERKURJEV Example 3.3. Let K = F (t) and let v be the discrete valuation associated with t. Then κ(v) = F and ∂v (t · hK ) = h for all h ∈ H j−1(F ). Lemma 3.4. Let K ′ /K be a field extension and let v ′ be a discrete valuation on K ′ unramified over its restriction v on K. Then the diagram H j (K)nr,v ∂v  ∂v′ H j (K ′ )nr,v′ / / H j−1 (κ(v))  H j−1(κ(v ′ )) commutes. 3c. Invariants of tori. Let A be an étale F -algebra and T A the corresponding quasi-split torus, i.e., T A (K) = (A ⊗F K)× for every field extension K/F . If B is another étale F -algebra, then T A×B = T A × T B and Invdh (T A×B ) ≃ Invdh (T A ) ⊕ Invdh (T B ). Write A as a product of fields: A = L1 × L2 × · · · × Ls . Set H i (A) := H i (L1 ) ⊕ H i (L2 ) ⊕ · · · ⊕ H i (Ls ). For d ≥ 2 define a homomorphism αA : H d−1 (A) → Invdh (T A ) as follows. If h ∈ H d−1 (A), then the invariant αA (h) is defined by αA (h)(t) = NA⊗K/K (t · hA⊗K ) ∈ H d (K) for a field extension K/F and t ∈ T A (K) = (A ⊗F K)× . Remark 3.5. In the notation of the previous section, (T A )◦ ≃ T A , and we have H d−1 (F, (T A )◦ ) = H d−1 (F, T A ) = H d−1 (A, Gm ) = H d−1 (A). The pairing (2.8) for the torus T A , i = 0, and j = 2, A× ⊗ H 2 (A) = T A (F ) ⊗ H 2 (F, (T A )◦ ) → H 3 (F ), takes t ⊗ h to NA/F (t ∪ hA ) = αA (h)(t). In other words, the map αA coincides with the map H 2 (F, (T A )◦ ) → Inv3h (T A ) given by the cup product. Note that every element h ∈ H d−1 (A) is split by an étale extension of A, hence the invariant αA (h) vanishes when restricted to Fsep . Question 3.6. Do all invariants in Invdh (T A ) vanish when restricted to Fsep ? ROST INVARIANT ON THE CENTER, REVISITED 9 The answer is “yes” when char F = 0. Indeed, for any prime p 6= char F and for F separably closed, the zero map is the only invariant T A (∗) → H d (∗, Qp /Zp (d − 1)) that is a homomorphism of groups [Mer99, Prop. 2.5]. The main result of this section is: Theorem 3.7. The sequence αA res A 0 → H d−1 (A) −→ Invdh (T A ) −→ Invdh (Tsep ) is exact. ∼ fd f d (T A ) := ker res, we claim that αA : H d−1 (A) → That is, defining Inv Invh (T A ). h A The torus T is embedded into the affine space A(A) as an open set. Let Z A be the closed complement A(A) \ T A and let S A be the smooth locus of Z A (see [MPT02]). Then S A is a smooth scheme over A. In fact, S A is a quasi-split torus over A of the A-algebra A′ such that A × A′ ≃ A ⊗F A. We have A = L1 × L2 × · · · × Ls , where the Li ’s are finite separable field extensions of F , and the connected components of S A (as well as the irreducible components of Z A ) are in 1-1 correspondence with the factors Li . Let vi for i = 1, 2, . . . , s be the discrete valuation of the function field F (T A ) corresponding to the ith connected component Si of S A , or equivalently, to the ith irreducible component Zi of Z A . The residue field of vi is equal to the function field F (Zi ) = F (Si ). We then have the residue homomorphisms ∂i : H d (F (T A ))nr,vi → H d−1 (F (Zi )) = H d−1 (F (Si )). e d (F (T A )) for the kernel of the natural homomorphism H d (F (T A )) → H d (Fsep (T A )). Write H e d (F (T A )) ⊂ Since every extension of the valuation vi to Fsep (T A ) is unramified, we have H d A A H (F (T ))nr,vi for all i. Write F (S ) for the product of F (Si ) over all i. The sum of the e d (F (T A )) yields a homomorphism restrictions of the maps ∂i on H e d (F (T A )) → H d−1 (F (S A )). ∂A : H d f (T A ) to the generic element ggen of T A over the function field F (T A ), Applying u ∈ Inv h we get a cohomology class u(ggen ) ∈ H d (F (T A )). By assumption on u, we have u(ggen ) ∈ e d (F (T A )). Applying ∂ A , we get a homomorphism H f d (T A ) → H d−1 (F (S A )), β A : Inv h u 7→ ∂ A (u(ggen )). If B is another étale F -algebra. We have (see [MPT02]) S A×B = S A × T B + T A × S B . In particular, F (S A ) ⊂ F (S A×B ) ⊃ F (S B ). Lemma 3.4 then gives: 10 SKIP GARIBALDI AND ALEXANDER S. MERKURJEV Lemma 3.8. The diagram f d (T A ) ⊕ Inv f d (T B ) β Inv h h commutes. f d (T A×B ) Inv h A ⊕β B / H d−1 (F (S A )) ⊕ H d−1 (F (S B )) β A×B  / H d−1 (F (S A×B )) Recall that S A is a smooth scheme over A with an A-point. It follows that A ⊂ F (S A ) and the natural homomorphism H j (A) → H j (F (S A )) is injective by [GMS03, Proposition A.10]. We shall view H j (A) as a subgroup of H j (F (S A )). Let A = L1 × L2 × · · · × Ls be the decomposition of an étale F -algebra A into a product of fields. The height of A is the maximum of the degrees [Li : F ]. The height of A is 1 if and only if A is split. The following proposition will be proved by induction on the height of A. Proposition 3.9. The image of the homomorphism β A is contained in H d−1 (A). Proof. By Lemma 3.8 we may assume that A = L is a field. If L = F , we have S A = Spec F , so A = F (S A ) and the statement is clear. Suppose L 6= F . The algebra L is a canonical direct factor of L ⊗F L. It follows that the homomorphism β L is a direct summand of β L⊗L . Since the height of the L-algebra L⊗F L is less than the height of A, by the induction hypothesis, Im(β L⊗L ) ⊂ H d−1 (L⊗L). It follows that Im(β L ) ⊂ H d−1 (L).  It follows from Proposition 3.9 that we can view β A as a homomorphism f d (T A ) → H d−1 (A). β A : Inv h We will show that αA and β A are isomorphisms inverse to each other. First consider the simplest case. Lemma 3.10. The maps αA and β A are isomorphisms inverse to each other in the case A = F. Proof. If A = F , we have T A = Gm . The generic element ggen is equal to t ∈ F (t)× = F (Gm ). Let h ∈ H d−1 (A) = H d−1 (F ). Then the invariant αF (h) takes t to t · h ∈ e d (F (t)). By example 3.3, β F (αF (h)) = ∂v (t · h) = h, i.e., the composition β F ◦ αF is the H identity. It suffices to show that αF is surjective. f d (Gm ). We consider t as an element of the complete field L := F ((t)) and Take u ∈ Inv h let x = uL (t) ∈ H d (L). By assumption, x is split by the maximal unramified extension L′ := Fsep ((t)) of L. By a theorem of Kato [Kat82],  x ∈ Ker H d (L) → H d (L′ ) = H d (F ) ⊕ t · H d−1 (F ), ROST INVARIANT ON THE CENTER, REVISITED 11 i.e., x = h′L + t · hL for some h′ ∈ H d (F ) and h ∈ H d−1 (F ). Let K/F be a field extension. We want to compute uK (a) ∈ H d (K) for an element a ∈ K × . Consider the field homomorphism ϕ : L → M := K((t)) taking a power series f (t) to f (at). By functoriality, uM (at) = uM (ϕ(t)) = ϕ∗ (uL (t)) = ϕ∗ (x) = ϕ∗ (h′L + t · hL ) = h′M + (at) · hM , therefore, uM (a) = uM (at) − uM (t) = (h′M + (at) · hM ) − (h′M + t · hM ) = a · hM . It follows that u(a) = a · hK since the homomorphism H d (K) → H d (M) is injective by [GMS03, Proposition A.9]. We have proved that u = αA (h), i.e., αA is surjective.  Lemma 3.11. The homomorphism β A is injective. Proof. The proof is similar to the proof of Proposition 3.9. We induct on the height of A. The right vertical homomorphism in Lemma 3.8 is isomorphic to the direct sum of the two homomorphisms H d−1 (F (S A )) → H d−1 (F (S A × T B )) and H d−1 (F (S B )) → H d−1 (F (T A × S B )). Both homomorphisms are injective by [GMS03, Proposition A.10]. It follows from Lemma 3.8 that we may assume that A = L is a field. The case L = F follows from Lemma 3.10, so we may assume that L 6= F . The homomorphism β L is a direct summand of β L⊗L . The latter is injective by the induction hypothesis, hence so is β L .  Lemma 3.12. The composition β A ◦ αA is the identity. Proof. We again induct by the height of A. By Lemma 3.8 that we may assume that A = L is a field. The case L = F follows from Lemma 3.10, so we may assume that L 6= F . The homomorphisms αL and β L are direct summands of αL⊗L and β L⊗L respectively. The composition β L⊗L ◦ αL⊗L is the identity by the induction hypothesis, hence β A ◦ αA is also the identity.  It follows from Lemma 3.11 and Lemma 3.12 that αA and β A are isomorphisms inverse to each other. This completes the proof of Theorem 3.7. 4. Invariants of groups of multiplicative type In this section, C denotes a group of multiplicative type over F such that there exists an exact sequence 1→C→T →S→1 such that S and T are quasi-trivial tori. For example, this holds if C is the center of a simply connected semisimple group G over F , such as µn . In that case, C is isomorphic to the center of the quasi-split inner form Gq of G, and we take T to be any quasi-trivial maximal torus in Gq . Then T ∗ is the weight lattice Λw and S ∗ ≃ Λr , where the Galois action permutes the fundamental weights and simple roots respectively. 12 SKIP GARIBALDI AND ALEXANDER S. MERKURJEV f 3 (H 1 (C)) is given by the cup product via the Proposition 4.1. Every invariant in Inv h pairing (2.7) with a unique element in H 2 (F, C ◦ ). Proof. Since H 1 (K, T ) = 1 for every K, the connecting homomorphism S(K) → H 1 (K, C) is surjective for every K and therefore the natural homomorphism Inv3h (H 1 (C)) → Inv3h (S) is injective. Consider the diagram H 2 (F, C ◦ )   / H 2 (F, S ◦ )  f 3 (H 1 (C))   Inv h /  / H 2 (F, T ◦ ) ≀ f 3 (S) Inv h /  ≀ f 3 (T ), Inv h where the vertical homomorphisms are given by cup products and the top row comes from the exact sequence (2.9); it is exact since H 1 (K, T ◦ ) = 1 for every field extension K/F . f 3 to the sequence T (K) → S(K) → H 1 (K, C); The bottom row comes from applying Inv h it is a complex. The vertical arrows are cup products, and the middle and right ones are isomorphisms by Theorem 3.7 and Remark 3.5. The diagram commutes by Proposition 2.10. By diagram chase, the left vertical map is an isomorphism.  Note that the group H 2 (F, T ) is a direct sum of the Brauer groups of finite extensions of F . Therefore, we have the following, a coarser version of [Gar12, Prop. 7]: ` Lemma 4.2. The homomorphism H 2 (F, C) → Br(K), where the direct sum is taken over all field extensions K/F and all characters of C over K, is injective. Remark 4.3. The group G becomes quasi-split over the function field F (X) of the variety X of Borel subgroups of G, so F (X) kills tG . But the kernel of H 2 (F, C) → H 2 (F (X), C) need not be generated by tG , as can be seen by taking G of inner type Dn for n divisible by 4. 5. Root system preliminaries 5a. Notation. Let V be a real vector space and R ⊂ V a root system (which we assume is reduced). Write Λr ⊂ Λw for the root and weight lattices respectively. For every root α ∈ R, the reflection sα with respect to α is given by the formula (5.1) sα (x) = x − α∨ (x) · α, for every x ∈ V , where α∨ ∈ V ∗ := HomR (V, R) is the coroot dual to α. Write R∨ ⊂ V ∗ for the dual root system and Λ∨r ⊂ Λ∨w for the corresponding lattices. We have Λ∨r = (Λw )∗ := Hom(Λw , Z) and Λ∨w = (Λr )∗ . The Weyl group W of R is a normal subgroup of the automorphism group Aut(R) of the root system R. The factor group Aut(R)/W is isomorphic to the automorphism group Aut(Dyn(R)) of the Dynkin diagram of R. There is a unique Aut(R)-invariant ROST INVARIANT ON THE CENTER, REVISITED 13 scalar product ( , ) on V normalized so that square-length dα∨ := (α, α) of short roots in every irreducible component of R is equal to 1. The formula (5.1) yields an equality α∨(x) = 2(α, x) (α, α) for all x ∈ V and α ∈ R. We may repeat this construction with the dual root system R∨ , defining (, )∨ on V ∗ so that the square-length dα := (α∨ , α∨)∨ is 1 for short coroots α∨ (equivalently, long roots α). 5b. The map ϕ. Proposition 5.2. There is a unique R-linear map ϕ : V ∗ → V such that ϕ(α∨ ) = α for all short α∨ . Furthermore, ϕ is Aut(R)-invariant, ϕ(α∨ ) = dα α for all α∨ ∈ R∨ , ϕ(Λ∨w ) ⊆ Λw , and ϕ(Λ∨r ) ⊆ Λr . Analogous statements hold for ϕ∨ : V → V ∗ . If R is irreducible, then ϕϕ∨ : V ∗ → V ∗ and ϕ∨ ϕ : V → V are multiplication by dα for α a short root. Proof. Define ϕ∨ by hϕ∨ (x), yi = 2(x, y) for x, y ∈ V and ϕ by hx′ , ϕ(y ′)i = 2(x′ , y ′)∨ for x′ , y ′ ∈ V ∗ . We have hϕ∨ (α), xi = 2(α, x) = (α, α) · α∨ (x) = dα∨ · α∨ (x), hence ϕ∨ (α) = dα∨ · α∨ . And similarly for ϕ. For uniqueness of ϕ and ϕ∨ , it suffices to note that the short roots generate V ∗ , which is obvious because they generate a subspace that is invariant under the Weyl group. Let x ∈ Λw . By definition, 2(x, α) Z ∋ α∨ (x) = (α, α) for all α ∈ R. It follows that hϕ∨ (x), αi = 2(x, α) ∈ Z since (α, α) ∈ Z. Therefore, ϕ(x) ∈ Λ∨w . For each root β ∈ R, ϕ∨ ϕ(β ∨) = dβ dβ ∨ β ∨ and similarly for ϕϕ∨ . As R is irreducible, either all roots have the same length (in which case dβ dβ ∨ = 1) or there are two lengths and β and β ∨ have different lengths (in which case dβ dβ ∨ is the square-length of a long root); in either case the product equals dα as claimed.  Remark 5.3. If the root system R is simply laced, then ϕ gives isomorphisms from V ∗ , Λ∨w , and Λ∨r to V , Λw , and Λr respectively that agree with the canonical bijection R∨ → R defined by α∨ ↔ α. Example 5.4. For α∨ a simple coroot, we write P fα∨ for the corresponding fundamental ∨ ′ dominant weight of R . Consider an element x = xβ β ∨ where β ranges over the simple 1 roots. As (fα∨, β ∨ )∨ = 2 hfα∨ , βi(β ∨ , β ∨)∨ , we have (fα∨ , x′ )∨ = xα (fα∨ , α∨ )∨ = 12 dα xα . That is, hϕ(fα∨ ), x′ i = dα xα = hdα fα , x′ i for all x′ , and we conclude that ϕ(fα∨ ) = dα fα . 14 SKIP GARIBALDI AND ALEXANDER S. MERKURJEV Remark 5.5. Let q ∈ S 2 (Λw )W be the only quadratic form on Λ∨r that is equal to 1 on every short coroot in every component of R∨ . It is shown in [Mer16, Lemma 2.1] that the polar form p of q in Λw ⊗ Λw in fact belongs to Λr ⊗ Λw . Then the restriction of ϕ on Λ∨w coincides with the composition id⊗p Λ∨w −−→ Λ∨w ⊗ (Λr ⊗ Λw ) = (Λ∨w ⊗ Λr ) ⊗ Λw → Λw . 5c. The map ρ. Write ∆ := Λw /Λr and ∆∨ := Λ∨w /Λ∨r . Note that ∆ and ∆∨ are dual to each other with respect to the pairing ∆ ⊗ ∆∨ → Q/Z. The group W acts trivially on ∆ and ∆∨ , hence ∆ and ∆∨ are Aut(Dyn(R))-modules. The homomorphism ϕ yields an Aut(Dyn(R))-equivariant homomorphism ρ : ∆∨ → ∆. The map ρ is an isomorphism if R is simply laced (because ϕ is an isomorphism) or if Λw = Λr . Similarly, ρ = 0 iff ϕ(Λ∨w ) ⊆ Λr , iff p ∈ Λr ⊗ Λr . Example 5.6. Suppose R has type Cn for some n ≥ 3. Consulting the tables in [Bou02], fn∨ , the fundamental weight of R∨ dual to the unique long simple root αn , is the only fundamental weight of R∨ not in the root lattice. As αn is long, dαn = 1, so ϕ(fn∨ ) = fn , which belongs to Λr iff n is even. That is, ρ = 0 iff n is even; for n odd, ρ is an isomorphism. Example 5.7. Suppose R has type Bn for some n ≥ 2. For the unique short simple root αn , dαn = 2, and ϕ(fn∨ ) = 2fn is in Λr . For 1 ≤ i < n, ϕ(fi∨ ) = fi ∈ Λr . We find that ρ = 0 regardless of n. Thus we have determined ker ρ for every irreducible root system. Example 5.8. Suppose R is irreducible and char k = dα for some short root α. Then for G, G∨ simple simply connected with root system R, R∨ respectively, there is a “very special” isogeny π : G → G∨ . The restriction of π to a maximal torus in G induces a Z-linear map on the cocharacter lattices π∗ : Λ∨r → Λr , which, by [CGP15, Prop. 7.1.5] or [Ste63, 10.1], equals ϕ. In case R = Bn , π is the composition of the natural map G = Spin2n+1 → SO2n+1 with the natural (characteristic 2 only) map SO2n+1 → Sp2n . As π vanishes on the center of G, it follows that ρ = 0 as in Example 5.7. Similarly, in case R = Cn , one can recover Example 5.6 by noting that the composition π : G = Sp2n → Spin2n+1 with the spin representation Spin2n+1 ֒→ GL2n is the irreducible representation of G with highest weight fn by [Ste63, §11]. ∼ Example 5.9. For R = An−1 , define ψ : ∆ → Z/nZ via ψ(f1 ) = 1/n ∈ Q/Z. As ∼ hf1 , f1∨ i = (n − 1)/n ∈ Q, defining ψ ∨ : ∆∨ → Z/nZ via ψ ∨ (f1 ) = −1/n ∈ Q/Z gives a ROST INVARIANT ON THE CENTER, REVISITED 15 commutative diagram h , i ∆ ⊗ ∆∨ ψ⊗ψ∨ ≀  / Q/Z 8 ♣ ♣ ♣♣ ♣♣♣ ♣ ♣ ♣♣ natural Z/nZ ⊗ Z/nZ ∨ i.e., ψ is the isomorphism induced by ψ and the natural pairings. Furthermore, although ρ is induced by the canonical isomorphism R∨ ≃ R, the previous discussion shows that the diagram (5.10) ∆∨ ρ ψ∨ ≀ /  Z/nZ ∆ ψ ≀ −1 /  Z/nZ commutes, where the bottom arrow is multiplication by −1. (The action of Aut(R) on ∆ interchanges f1 and fn−1 . Defining instead ψ(−f1 ) = ψ(fn−1 ) = 1/n, also gives the same commutative diagram (5.10). That is, the commutativity of (5.10) is invariant under Aut(R).) 6. Statement of the main result 6a. The map ρ. Let G be a simply connected semisimple group with root system R. Let C be the center of G. Then C ∗ = Λw /Λr = ∆ and C∗ = Λ∨w /Λ∨r = ∆∨ , and we get from §5c a homomorphism ρ = ρG : C∗ → C ∗ of Galois modules. Therefore, we have a group homomorphism ρ̂ = ρ̂G : C → C ◦ . Note that ρ̂ is an isomorphism if R is simply laced. 6b. The Tits class. Let G be a simply connected group over F with center C. Write tG for the Tits class tG ∈ H 2 (F, C). By definition, tG = −∂(ξG ), where ∂ : H 1 (F, G/C) → H 2 (F, C) is the connecting map for the exact sequence 1 → C → G → G/C → 1 and ξG ∈ H 1 (F, G/C) is the unique class such that the twisted group ξ G is quasi-split. 6c. Rost invariant for an absolutely simple group. Let G be a simply connected group over F . Recall (see [GMS03]) that, for G absolutely simple, Rost defined an invariant rG ∈ Inv3 (H 1 (G)) called the Rost invariant, i.e., a map rG : H 1 (F, G) → H 3 (F, Q/Z(2)) that is functorial in F . Lemma 6.1. If G is an absolutely simple and simply connected algebraic group, then o(rG ) · tG = 0. 16 SKIP GARIBALDI AND ALEXANDER S. MERKURJEV Proof. The order o(rG ) of rG is calculated in [GMS03], and in each case it is a multiple of the order of tG .  As mentioned in [Gil00, §2.3], there are several definitions of the Rost invariant that may differ by a sign. In [GQM11], Gille and Quéguiner proved that for the definition of the Rost invariant rG they choose, in the case G = SL1 (A) for a central simple algebra A of degree n over F , the value of rG on the image of the class aF ×n ∈ F × /F ×n = H 1 (F, µn ) in H 1 (F, G) is equal to (a) ∪ [A] if n is not divisible by char(F ) and to −(a) ∪ [A] if n is a power of p = char(F ) > 0. We propose to normalize the Rost invariant by multiplying the p-primary component of the Rost invariant (of all groups) by −1 in the case p = char(F ) > 0. Thus the formula rG (aF ×n ) = (a) ∪ [A] holds now in all cases. 6d. The main theorem. For G semisimple and simply connected over F , there is an isomorphism (6.2) ∼ ψ: G → n Y RFi /F (Gi ), i=1 where the Fi are finite separable extensions of F and Gi is an absolutely simple and simply connected Fi -group. The product of the corestrictions of the rGi (in the sense of [GMS03, p. 34]) is then an invariant of H 1 (G), which we also denote Q by rG and call the Rost invariant of G. The map ψ identifies the centerP C of G with P 2 i RFi /F (Ci ) for Ci the 2 center of Gi , and the Tits class tG ∈ H (F, C) with tGi ∈ H (Fi , Ci ). The composition rG ◦i∗ is a group homomorphism by [MPT02, Corollary 1.8] or [Gar01, Lemma 7.1]. That is, the composition rG ◦i∗ in Theorem 1.2 taken over all field extensions of F can be viewed not only as an invariant of H 1 (C), but as an element of Inv3h (H 1 (C) as in Definition 3.1. Over a separable closure of F , the inclusion of C into G factors through a maximal split torus and hence this invariant is trivial by Hilbert Theorem 90. By Proposition 4.1 the composition is given by the cup product with a unique element in H 2 (F, C ◦ ). We will prove Theorem 1.2, which says that this element is equal to −t◦G . 6e. Alternative formulation. Alternatively, we could formulate the main theorem as follows. The group of invariants Inv3 (H 1 (G)) is a sum of n cyclic groups with generators (the corestrictions of) the rGi ’s, and in view of Lemma 6.1 we may define a homomorphism X X (6.3) Inv3 (H 1 (G)) → H 2 (F, C) via ni rGi 7→ −ni tGi . Theorem 6.4. For every invariant s : H 1 (∗, G) → H 3 (∗, Q/Z(2)), the composition H 1 (∗, C) → H 1 (∗, G) → H 3 (∗, Q/Z(2)) equals the cup product with the image of s under the composition Inv3 (H 1 (G)) → H 2 (F, C) → H 2 (F, C ◦ ). This will follow immediately from the main theorem, which we will prove over the course of the next few sections. ROST INVARIANT ON THE CENTER, REVISITED 17 7. Rost invariant of transfers The following statement is straightforward. Lemma 7.1. Let A be an étale F -algebra and G a simply connected semisimple group scheme over A, C the center of G. Then C ′ := RA/F (C) is the center of G′ := RA/F (G) and C ′ ◦ ≃ RA/F (C ◦ ), and the diagram H i (A, C) ρ̂∗G / H i (A, C ◦ ) ≀ ≀  H i (F, C ′ ) ρ̂∗G′ /  H i (F, C ′◦ ) commutes. Lemma 7.2. Let G be a simply connected semisimple group scheme over an étale F algebra A. Set C ′ := RA/F (C) and G′ := RA/F (G). Then the image of tG under the ∼ isomorphism H 2 (A, C) → H 2 (F, C ′ ) is equal to tG′ . Proof. The corestriction of a quasi-split group is quasi-split.  Lemma 7.3. Let G be a simply connected semisimple algebraic group scheme over an étale F -algebra A. If Theorem 1.2 holds for G, then it also holds for RA/F (G). Proof. Let C be the center of G and G′ := RA/F (G). The group C ′ := RA/F (C) is the center of G′ . Let x ∈ H 1 (A, C) and let x′ ∈ H 1 (F, C ′ ) be the image of x under the ∼ isomorphism ν : H 1 (A, C) → H 1 (F, C ′ ). We have ∗ rG′ (i′ (x′ )) = rG′ (ν(i∗ (x))) = NA/F (rG (i∗ (x)) by [GMS03, Proposition 9.8] = NA/F (−t◦G ∪ x) by Theorem 1.2 for x = −t◦G′ ∪ x′ by Lemmas 2.12, 7.1 and 7.2.  If Theorem 1.2 holds for semisimple groups G1 and G2 , then it also holds for the group G1 × G2 . Combining this with Lemma 7.3, reduces the proof of Theorem 1.2 to the case where G is absolutely almost simple. 8. Rost invariant for groups of type A In this section, we will prove Theorem 1.2 for G absolutely simple of type An−1 for each n ≥ 2. ∼ 8a. Inner type. Suppose G has inner type. Then there is an isomorphism ψ : G → SL1 (A), where A is a central simple algebra of degree n over F . The map ψ restricts to ∼ ∼ an isomorphism C → µn , identifying C ∗ with Z/nZ, and induces ψ ◦ : C ◦ → µn . The connecting homomorphism arising from the Kummer sequence 1 → µn → Gm → Gm → 1 gives an isomorphism H 1 (K, µn ) ≃ K × /K ×n for every extension K/F . 18 SKIP GARIBALDI AND ALEXANDER S. MERKURJEV For each field extension K/F , the isomorphism ψ identifies the map H 1 (K, C) → H 1 (K, G) with the obvious map K × /K ×n = H 1 (K, µn ) → H 1 (K, SL1 (A)) = K × / Nrd(A× K ). 2 Further, ψ(tG ) ∈ H (K, µn ) is the Brauer class [A] of A as in [KMRT98, pp. 378, 426]. The commutative diagrams in Example 5.9 show that, for c ∈ H 1 (K, C), the cup product −t◦G ∪ c equals the cup product −ψ ∨ (t◦G ) ∪ ψ(c), where −ψ ∨ (t◦G ) = ψ(tG ) = [A]. That is, Theorem 1.2 claims that the composition (8.1) ψ−1 H 1 (K, µn ) −−→ H 1 (K, C) → H 1 (K, G) → H 3 (K, Q/Z(2)) equals the cup product with [A]. Let p be a prime integer and write m for the largest power of p dividing n. As the composition (8.1) is a group homomorphism, it suffices to verify Theorem 1.2 on each p-primary component rG (x)p of the Rost invariant with values in Qp /Zp (2). Suppose first that p does not divide char(F ). In this case, it was determined in [GQM11, Theorem 1.1] that the p-component of the Rost invariant of G is given by the formula rG (x)p = [A]p ∪ (x) ∈ H 3 (K, Qp /Zp (2)) for every x ∈ K × , where the cup product is taken with respect to the natural pairing H 2 (K, µm ) ⊗ H 1 (K, µm) → H 3 (K, Qp /Zp (2)) induced by µn ⊗ µn → Q/Z(2) and [A]p is the p-primary component of the class of A in the Brauer group Br(K) = H 2 (K, Q/Z(1)). Thus, Theorem 1.2 holds in this case. Now let p = char(F ) > 0. Consider the sheaf νm (j) in the étale topology over F defined by νm (j)(L) = Kj (L). The natural morphisms Z(j) → νm (j)[−j] for j ≤ 2 are consistent with the products, hence we have a commutative diagram L (Z/mZ)(1) ⊗ (Z/mZ)(1) (Z/mZ)(2) / ≀ ≀  νm (1)[−1] ⊗ νm (1)[−1]  νm (2)[−2]. / Therefore, we have a commutative diagram H 2 (F, µm ) ⊗ H 1 (F, µm ) / H 3 (F, Q/Z(2)) ≀ ≀  H 1 (F, νm (1)) ⊗ H 0 (F, νm (1)) /  H 1 (F, νm (2)) (see Remark 2.11 after Proposition 2.10). The bottom arrow is given by the cup product map × ×m ) → H 3 (F, Q/Z(2)) m Br(F ) ⊗ (F /F (see [GQM11, 4D]). It is shown in [GQM11, Theorem 1.1] that the p-component of the Rost invariant of G is given by the formula rG (x)p = [A]p ∪ (x) = θ∗ ([A]p ∪ (x)) ∈ H 3 (K, Qp /Zp (2)) ROST INVARIANT ON THE CENTER, REVISITED 19 for every x ∈ K × . (The formula in [GQM11] contains an additional minus sign, but it does not appear here due to the adjustment in the definition of rG in §6c.) 8b. Outer type. Now suppose that G has outer type An−1 . There is an isomorphism ∼ ψ : G → SU(B, τ ), where B is a central simple algebra of degree n over a separable quadratic field extension K/F with an involution τ of the second kind (τ restricts to a nontrivial automorphism of K/F ). The map ψ identifies C with µn,[K], and C = C ◦ . Suppose first that n is odd. Since GK ≃ SL1 (B), the theorem holds over K. As K has degree 2 over F and C has odd exponent, the natural map H 1 (F, C) → H 1 (K, C) is injective, hence the theorem holds over F by the following general lemma. Lemma 8.2. Let LQ 1 , L2 , . . . , Ls be field extensions of F such that the natural homomor2 phism H (F, C) → i H 2 (Li , C) is injective. If Theorem 1.2 holds for G over all fields Li , then it also holds over F . Proof. The left vertical map in Theorem 1.2 is multiplication by some element h ∈ H 2 (F, C ◦ ). We need to show that h = −t◦G . This equality holds over all fields Li , hence it holds over F by the injectivity assumption.  So we may assume that n is even. Then H 1 (F, C) is isomorphic to a factor group of the group of pairs (a, z) ∈ F × × K × such that NK/F (z) = an and H 2 (F, C) is isomorphic to a subgroup of Br(F ) ⊕ Br(K) of all pairs (v, u) such that vK = mu and NK/F (u) = 0, see [MPT02, pp. 795, 796]. Suppose that B is split; we follow the argument in [KMRT98, 31.44]. Then SU(B, τ ) = SU(h), where h is a hermitian form of trivial discriminant on a vector K-space of dimension n for the quadratic extension K/F . Let q(v) := h(v, v) be the associated quadratic form on V viewed as a 2n-dimensional F -space. The quadratic form q is nondegenerate, and we can view SU(h) as a subgroup of H := Spin(V, q). The Dynkin index of G in rH H is 1, hence the the composition H 1 (K, G) → H 1 (K, H) −→ H 3 (K) equals the Rost invariant of G. Then rH is given by the Arason invariant. A computation shows that the image of the pair (a, z) representing an element x ∈ H 1 (F, C) under the composition r G H 1 (F, C) → H 1 (F, G) −→ H 3 (F ) coincides with [D] ∪ x, where D is the class of the discriminant algebra of h. On the other hand, [D] ∪ x coincides with the cup product of x with the Tits class tG = −t◦G represented by the pair ([D], 0) in H 2 (F, C ◦ ), proving Theorem 1.2 in this case. Now drop the assumption that B is split. As for the n odd case, the theorem holds over K. Note that there is an injective map H 2 (F, C) → Br(F ) ⊕ Br(K). Let X = RK/F (SB(B)). By [MT95, 2.4.6], the map Br(F ) → Br(F (X)) is injective, hence the natural homomorphism H 2 (F, C) → H 2 (F, CF (X) ) ⊕ H 2 (F, CK ) is injective. The theorem holds over K and by the preceding paragraph the theorem holds over F (X). Therefore, by Lemma 8.2, the theorem holds over F . 20 SKIP GARIBALDI AND ALEXANDER S. MERKURJEV 9. Conclusion of the proof of Theorem 1.2 Choose a system of simple roots Π of G. Write Πr for the subset of Π consisting of all simple roots whose fundamental weight belongs to Λr and let Π′ := Π \ Πr . Inspection of the Dynkin diagram shows that all connected component of Π′ have type A. Every element of Πr is fixed by every automorphism of the Dynkin diagram, hence is fixed by the ∗-action of the absolute Galois group of F on Π. It follows that the variety X of parabolic subgroups of Gsep of type Π′ is defined over F . By [MT95], the kernel of the restriction map Br(K) → Br(K(X)) for every field extension K/F is generated by the Tits algebras associated with the classes in C ∗ of the fundamental weights fα corresponding to the simple roots α ∈ Πr . But fα ∈ Λr , so these Tits algebras are split [Tit71], hence the restriction map Br(K) → Br(K(X)) is injective and, by Lemma 4.2, the natural homomorphism H 2 (F, C) → H 2 (F (X), C) is injective. In view of Lemma 8.2, it suffices to prove Theorem 1.2 over the field F (X), i.e., we may assume that G has a parabolic subgroup of type Π′ . As shown in [GQM07], there is a simply connected subgroup G′ ⊂ G with Dynkin diagram Π′ . We write R′ ⊂ R for the root system of G′ . The center C ′ of G′ contains C. Write j for the embedding homomorphism C → C ′ and j ◦ for the C ′◦ → C ◦ . Qdual Q ′ ′ Let G = i Gi with Gi simply connected simple groups, C = Ci , where Ci is the center of Gi , Π′i ⊂ Π the system of simple roots of Gi . Write ji◦ for the composition Ci′◦ → C ′◦ → C ◦ . Lemma 9.1. The map ji∗ : H 2 (F, C) → H 2 (F, Ci′ ) takes the Tits class tG to tG′i . Proof #1. It suffices to check that j ∗ (tG ) = tG′ , for the projection H 2 (F, C ′ ) → H 2 (F, Ci′) sends tG′ 7→ tG′i . There is a rank |Πr | split torus S in G whose centralizer is S · G′ . Arguing as in Tits’s Witt-type Theorem [Tit66, 2.7.1, 2.7.2(d)], one sees that the quasi-split inner form of G is obtained by twisting G by a 1-cocycle γ with values in CG (S)/C, equivalently, in G′ /C. Clearly, twisting G′ by γ gives the quasi-split inner form of G′ . The Tits class tG is defined to be −∂G (γ) where ∂G is the connecting homomorphism H 1 (F, G/C) → H 2 (F, C) induced by the exact sequence 1 → C → G → G/C → 1 and similarly for G′ and C ′ . The diagram H 1 (F, G′/C) / H 1 (F, G/C) ∂G / H 2 (F, C) j∗  H 1 (F, G′ /C ′ ) ∂G′ /  H 2(F, C ′ ) commutes trivially, so j ∗ (tG ) = j ∗ (−∂G (γ)) = −∂G′ (γ) = tG′ as claimed.  Proof #2. For each χ ∈ T ∗ , define F (χ) to be the subfield of Fsep of elements fixed by the stabilizer of χ under the Galois action. Note that because G is absolutely almost simple, the ∗-action fixes Πr elementwise, F (χ) equals the field extension F (χ|T ′ ) defined ROST INVARIANT ON THE CENTER, REVISITED 21 analogously for χ ∈ (T ′ )∗ . The diagram H 2(F, C) j∗ / H 2 (F, C ′ ) PPP PPPχ|C PPP χ|C ′ PPP '  H 2 (F (χ), Gm ) commutes. Now Q χ|C ′ (tG′ − j ∗ (tG )) = χ|C ′ (tG′ ) − χ|C (tG ), which is zero for all χ ∈ T ∗ by [Tit71, §5.5]. As χ∈(T ′ )∗ χ|C ′ is injective by [Gar12, Prop. 7], tG′ = j ∗ (tG ) as claimed.  The diagram Π′i is simply laced. Write di for the square-length of α∨ ∈ R∨ for α ∈ Π′i . Lemma 9.2. The homomorphism ρ̂G : C → C ◦ coincides with the composition j ρ̂ ′ G C− → C ′ −− → C ′◦ = Y Q (ji ◦ )di Ci′◦ −−i−−−→ C ◦ , i where ji is the composition C → C ′ → Ci′ . Proof. For every simple root α ∈ Π write fα for the corresponding fundamental weight. Write Λ′r and Λ′w for the root and weight lattices respectively of the root system R′ . Let Φ := {fα , α ∈ Πr }. Then Φ is a Z-basis for the kernel of the natural surjection Λw → Λ′w . If α ∈ Π′ , we write α′ for the image of α and fα′ for the image of fα under this surjection. All α′ (respectively, fα′ ) form the system of simple roots (respectively, fundamental weights) of R′ . If α ∈ Π′ , the image α′ ∨ of α∨ under the inclusion Λ′r ∨ ֒→ Λr ∨ is a simple coroot of R′ . If V is the real vector space of R, then R′ ⊂ V ′ := V / span(Φ) and R′ ∨ ⊂ V ′ ∗ ⊂ V ∗ . Let x ∈ Λ∨w , i.e., hx, αi ∈ Z for all α ∈ Π. Since P Φ ⊂ Λr , we have aα := hx, fα i ∈ Z for all α ∈ Πr . Then the linear form x′ := x − α∈Πr aα α∨ vanishes on the subspace of V spanned by Φ, hence x′ ∈ Λ′w ∨ . We then have a well defined homomorphism ∨ s : Λ∨w → Λ′w , x 7→ x′ . P If α ∈ Π′ , then hx′ , αi = hx′ , α′ i. It follows that if x′ = α∈Π bα fα∨ in Λ∨w for bα = hx′ , αi ∈ P Z, then x′ = α∈Π′ bα fα′ ∨ in Λ′w ∨ . Since Φ ⊂ Λr , we have a surjective homomorphism (9.3) ∗ C ′ = Λ′w /Λ′r = Λw / span(Φ, Π′ ) → Λw /Λr = C ∗ dual to the inclusion of C into C ′ . The dual homomorphism ∨ ∨ C∗ = Λ∨w /Λ∨r → Λ′w /Λ′r = C∗′ is induced by s. 22 SKIP GARIBALDI AND ALEXANDER S. MERKURJEV Consider the diagram ϕ Λ∨w ΛO w / s t  ϕ′ Λ′w∨ Λ′w , / where the map t is defined by t(fα′ ) = dα fα for all α ∈ Π′ and the maps ϕ and ϕ′ are defined in Proposition 5.2. It suffices to prove that Im(t ◦ ϕ′ ◦ s − ϕ) ⊂ Λr . Consider the other diagram ρ Λ∨w ΛO w / O t t∨ ρ′ Λ′w∨ / Λ′w , where t∨ (fα′ ∨ ) = fα∨ for all α ∈ Π′ . This diagram is commutative. Indeed, ∨ ∨ (ρ ◦ t∨ )(fα′ ) = ρ(fα∨ ) = dα fα = t(fα′ ) = (t ◦ ρ′ )(fα′ ), where the second equality is by Example 5.4. (Recall that the root system R′ is simply laced, hence ρ′ (fα′ ∨ ) = fα′ .) We claim that (t∨ ◦ s)(x) − x ∈ span(Φ∨ ) + Λ∨r for every x ∈ Λ∨w , where Φ∨ := {fα∨ , α ∈ Πr }. Indeed, in the notation of (9.3) we have X aα α∨ (t∨ ◦ s)(x) − x = t∨ (x′ ) − x = t∨ (x′ ) − x′ − = t∨ X  ′∨ bα fα − bα fα∨ X =− α∈Πr bα fα∨ − α∈Π α∈Π′ X X − X aα α∨ α∈Πr ∨ aα α ∈ span(Φ∨ ) + Λ∨r . α∈Πr α∈Πr It follows from the claim that   (t ◦ ρ′ ◦ s)(x) − ρ(x) = (ρ ◦ t∨ ◦ s)(x) − ρ(x) = ρ (t∨ ◦ s)(x) − x ∈ ρ span(Φ∨ ) + Λ∨r . As ρ(fα∨ ) = dα fα ∈ Λr for all fα ∈ Φ, this is contained in Λr , proving the claim. Lemmas 9.1 and 9.2 yield: P Corollary 9.4. t◦G = i di · ji◦∗ (t◦G′ ). i Lemma 9.5. The diagram Q H 1 (F, G′) 1  H (F, G) rG / 3 i H 1 (F, G′i )  P di ·rG′ i H (F, Q/Z(2))  ROST INVARIANT ON THE CENTER, REVISITED 23 commutes. r G Proof. The composition H 1 (F, G′i ) → H 1 (F, G) −→ H 3 (F, Q/Z(2)) coincides with the th k multiple of the Rost invariant rG′i , where k is the order of the cokernel of the map Q(G) → Q(G′i ) of infinite cyclic groups generated by positive definite quadratic forms qG and qG′i on the lattices of coroots normalized so that the forms have value 1 on the short coroots (see [GMS03]). Recall that all coroots of G′i have the same length, hence qG′i has value 1 on all coroots of G′i . Therefore, k coincides with di , the square-length of all coroots of G′i viewed as coroots of G.  Write each G′i = RLi /F (Hi ) for Li a separable field extension of F and Hi a simply connected absolutely simple algebraic group of type A over Li . Theorem 1.2 is proved for ′ such groups in §8. By Lemma 7.3, TheoremQ 1.2 holds for the group for G′ . Q G1 i and ′ hence Q 1 1 ′ 1 ′ (F, C) and let y ∈ H (F, G), xi ∈ H (F, C ) = H (F, Ci ) and yi′ ∈ Q Let1 x ∈ H H (F, G′i ) denote its images under the natural maps. We find X rG (y) = di · rG′i (yi ) by Lemma 9.5 i = X = X di · (−t◦G′i ∪ x′i ) by the main theorem for all G′i i di · ji◦∗ (−t◦G′i ) ∪ x by Lemma 2.14 i = −t◦G ∪ x by Corollary 9.4. This completes the proof of Theorem 1.2. 10. Concrete formulas In this section, we deduce the explicit formulas for the restriction of the Rost invariant to the center given in [MPT02] and [GQM07]. Note that the explicit formulas given in those references required ad hoc definitions for the cup product, whereas here the formulas are deduced from Theorem 1.2. 10a. The pairing induced by ρ. The map ρ defines a bilinear pairing ∆∨ ⊗ ∆∨ → Q/Z via (10.1) id⊗ρ ∆∨ ⊗ ∆∨ −−→ ∆∨ ⊗ ∆ → Q/Z. We now determine this pairing for each simple root system R. For R with different root lengths, ρ is zero and hence (10.1) is zero unless R = Cn for odd n ≥ 3. In that case (and also for R = E7 ), ∆ ≃ Z/2 ≃ ∆∨ and ρ is the unique isomorphism, so (10.1) amounts to the product map x ⊗ y 7→ xy. Therefore we may assume that R has only one root length. If ∆∨ is cyclic, we pick a fundamental dominant weight fi∨ that generates ∆∨ and the pairing (10.1) is determined by the image of fi∨ ⊗ fi∨ , which is the coefficient (in Q/Z) of the simple root αi∨ appearing in the expression for fi∨ in terms of simple roots. By 24 SKIP GARIBALDI AND ALEXANDER S. MERKURJEV hypothesis on R, the canonical isomorphism R ≃ R∨ is an isometry, and in particular this coefficient is the same as the coefficient for αi in fi , which can be looked up in [Bou02]. For R = An , we have ∆∨ ≃ Z/(n + 1) generated by f1∨ and f1∨ ⊗ f1∨ 7→ n/(n + 1), cf. Example 5.10. For R = Dn for odd n > 4, ∆∨ ≃ Z/4 generated by fn∨ and fn∨ ⊗ fn∨ 7→ n/4. For R = E6 , we have ∆∨ ≃ Z/3 generated by f1∨ and f1∨ ⊗ f1∨ 7→ 1/3. ∨ For R = Dn for even n ≥ 4, ∆∨ is isomorphic to Z/2 ⊕ Z/2 generated by fn−1 , fn∨ . The ∨ ∨ ∨ ∨ tables show that fn−1 ⊗ fn−1 and fn∨ ⊗ fn∨ map to n/4 whereas fn∨ ⊗ fn−1 and fn−1 ⊗ fn∨ map to (n − 2)/4. That is, viewing (10.1) as a bilinear form on F2 ⊕ F2 , for n ≡ 0 mod 4 it is the wedge product (which is hyperbolic) and for n ≡ 2 mod 4 it is the unique (up to isomorphism) metabolic form that is not hyperbolic. 10b. The cup product on C. Let G be a simple simply connected algebraic group over F with center C. The pairing (10.1) reads as follows: id⊗ρ C∗ ⊗ C∗ −−→ C∗ ⊗ C ∗ → Q/Z. L Twisting (tensoring with Z(1) ⊗ Z(1)) we get a composition L L C∗ (1) ⊗ C∗ (1) → C∗ (1) ⊗ C ∗ (1) → Q/Z(2), where the second map was already defined in (2.7). Therefore, we have a pairing (10.2) H 1 (F, C) ⊗ H 2 (F, C) → H 1 (F, C) ⊗ H 2 (F, C ◦ ) → H 3 (F, Q/Z(2)). This pairing takes x ⊗ tG to x ∪ t◦G for every x ∈ H 1 (F, C). Thus, Theorem 1.2 states that the composition rG ◦ i∗ takes x to x ∪ tG , where the cup-product is taken with respect to the pairing (10.2) induced by (10.1). Combining this observation with the computation of (10.1) recovers the formulas given in [MPT02] and [GQM07]. References [Bou02] [CGP15] [Gar01] [Gar12] [Gil00] [GMS03] [GQM07] [GQM11] N. Bourbaki, Lie groups and Lie algebras: Chapters 4–6, Springer-Verlag, Berlin, 2002. B. Conrad, O. Gabber, and G. Prasad, Pseudo-reductive groups, 2nd ed., Cambridge University Press, 2015. S. Garibaldi, The Rost invariant has trivial kernel for quasi-split groups of low rank, Comm. Math. Helv. 76 (2001), no. 4, 684–711. , Outer automorphisms of algebraic groups and determining groups by their maximal tori, Michigan Math. J. 61 (2012), no. 2, 227–237. P. Gille, Invariants cohomologiques de Rost en caractéristique positive, K-Theory 21 (2000), 57–100. S. Garibaldi, A. Merkurjev, and J-P. Serre, Cohomological invariants in Galois cohomology, American Mathematical Society, Providence, RI, 2003. S. Garibaldi and A. Quéguiner-Mathieu, Restricting the Rost invariant to the center, Algebra i Analiz 19 (2007), no. 2, 52–73. MR 2333896 (2008f:12009) Philippe Gille and Anne Quéguiner-Mathieu, Formules pour l’invariant de Rost, Algebra Number Theory 5 (2011), no. 1, 1–35. MR 2833783 ROST INVARIANT ON THE CENTER, REVISITED [GS06] 25 Philippe Gille and Tamás Szamuely, Central simple algebras and Galois cohomology, Cambridge Studies in Advanced Mathematics, vol. 101, Cambridge University Press, Cambridge, 2006. MR 2266528 (2007k:16033) [Kah96] B. Kahn, Applications of weight-two motivic cohomology, Doc. Math. 1 (1996), No. 17, 395– 416. MR 98b:14007 [Kat82] K. Kato, Galois cohomology of complete discrete valuation fields, Algebraic K-theory, Part II (Oberwolfach, 1980), Springer, Berlin, 1982, pp. 215–238. MR 84k:12006 [KMRT98] M.-A. Knus, A. Merkurjev, M. Rost, and J.-P. Tignol, The book of involutions, American Mathematical Society, Providence, RI, 1998, With a preface in French by J. Tits. [Lic87] S. Lichtenbaum, The construction of weight-two arithmetic cohomology, Invent. Math. 88 (1987), no. 1, 183–215. MR 88d:14011 [Lic90] , New results on weight-two motivic cohomology, The Grothendieck Festschrift, Vol. III, Birkhäuser Boston, Boston, MA, 1990, pp. 35–55. MR 92m:14030 [Mer99] Alexander Merkurjev, Invariants of algebraic groups, J. Reine Angew. Math. 508 (1999), 127–156. MR MR1676873 (2000g:20089) [Mer16] A. S. Merkurjev, Weight two motivic cohomology of classifying spaces for semisimple groups, Amer. J. Math. 138 (2016), no. 3, 763–792. [Mil80] J. S. Milne, Étale cohomology, Princeton University Press, Princeton, N.J., 1980. MR 81j:14002 [MPT02] A. S. Merkurjev, R. Parimala, and J.-P. Tignol, Invariants of quasitrivial tori and the Rost invariant, Algebra i Analiz 14 (2002), no. 5, 110–151. MR MR1970336 (2004c:11045) [MT95] A. S. Merkurjev and J.-P. Tignol, The multipliers of similitudes and the Brauer group of homogeneous varieties, J. Reine Angew. Math. 461 (1995), 13–47. MR MR1324207 (96c:20083) [Ste63] R. Steinberg, Representations of algebraic groups, Nagoya Math. J. 22 (1963), 33–56, [= Collected Papers, pp. 149–172]. [Tit66] J. Tits, Classification of algebraic semisimple groups, Algebraic Groups and Discontinuous Subgroups (Proc. Sympos. Pure Math., Boulder, Colo., 1965) (A. Borel and G. D. Mostow, eds.), vol. 9, Amer. Math. Soc., Providence, R.I., 1966, 1966, pp. 33–62. , Représentations linéaires irréductibles d’un groupe réductif sur un corps quelconque, [Tit71] J. reine angew. Math. 247 (1971), 196–220.
4math.GR
Yihui He Xi’an Jiaotong University Song Han Google Brain / MIT [email protected] [email protected] Abstract Environment: pretrained net Reward=-Error*log(FLOPs) (MobileNet, VGG, NASnet ) Model compression is an effective technique facilitating the deployment of neural network models on mobile devices that have limited computation resources and a tight power budget. However, conventional model compression techniques [19, 20, 23] use hand-crafted features and require domain experts to explore the large design space trading off model size, speed, and accuracy, which is usually suboptimal and time-consuming. In this paper, we propose Automated Deep Compression (ADC) that leverages reinforcement learning in order to efficiently sample the design space and greatly improve the model compression quality. We achieved state-of-the-art model compression results in a fully automated way without any human efforts. Under 4× FLOPs reduction, we achieved 2.7% better accuracy than hand-crafted model compression method for VGG-16 on ImageNet. We applied this automated, push-the-button compression pipeline to MobileNet and achieved a 2× reduction in FLOPs, and a speedup of 1.49× on Titan Xp and 1.65× on an Android phone (Samsung Galaxy S7), with negligible loss of accuracy. ... Agent: DDPG Critic Actor t+2 Compress with Sparsity ratio at (51%) t+1 51% t 26% t-1 66% t-2 embedding st ... arXiv:1802.03494v1 [cs.CV] 10 Feb 2018 ADC: Automated Deep Compression and Acceleration with Reinforcement Learning Figure 1. Overview of our ADC. We process a pretrained net (e.g., MobileNet) in a layer by layer manner. Our agent DDPG receives embedding st from a layer t, and outputs a sparsity ratio at . After the layer is compressed with at , it moves to the next layer t + 1. With all layers the compressed, the approximate model is evaluated on validation images without fine-tuning. Finally, reward R is returned to our agent. to sparsity, which requires fine-grained action space. We come up with continuous compression ratio control with DDPG [30], instead of searching on a discrete space. To mitigate the long training time brought about by reinforcement learning, we propose to reward the agent with approximated model performance without fine-tuning. Our algorithm is very sample efficient: it took one GPU only one hour on CIFAR-10, and eight GPUs only four hours on ImageNet, to search for the best model compression policy. Specifically, our DDPG agent processes a network in a layer by layer manner. For each conv layer t, our agent receives the layer embedding st and outputs a precise compression ratio at . After this layer is compressed with at , the agent moves to the next layer t + 1. With all the layers compressed, the agent will receive a reward related to accuracy and overall compression rate. Finally, the bestexplored model is fine-tuned for a short time (1/10 of the original training epochs) to achieve the best performance. 1. Introduction For many real-world applications, robotics, self-driving car and advertisement ranking, convolutional neural networks are limited by strict latency and size budget. Many works focus on compressing existing networks [28, 19, 23]. However, they all need a hand-crafted compression ratio for each layer, which requires human expertise and has a limited search space. Here, we aim to find a compression policy for a network automatically. We propose to use reinforcement learning for Automated Deep Compression (ADC) that does not require human expertise. While compressing a network, human expertise has to make the design choice on the sparsity for each conv layer, given the required model complexity. We notice that the accuracy of the compressed model is very sensitive 1 We further consider two application scenarios: FLOPsconstrained compression, to achieve the best accuracy given a maximum number of FLOPs, and accuracyguaranteed compression, to achieve the smallest model given no loss of accuracy. The former corresponds to applications such as mobile AI, self-driving cars, and advertisement rankings, which have a tight latency requirement. The latter corresponds to cloud applications for which quality rather than latency is more critical; thus, we suffer no loss of accuracy after compression. In order to achieve FLOPsconstrained compression, we limit the action space (pruning ratio) so that the models compressed by the agent are always below the computation budget while trying to find the best accuracy (Sec. 3.4). For accuracy-guaranteed compression (Sec. 3.5), we come up with a novel reward RF LOP s , which combines accuracy and computation. We can accurately find the limit of compression that does not lose accuracy. Our ADC algorithm is evaluated on ResNet [22], VGG [51], and MobileNet [24] on both CIFAR-10 [32] and ImageNet [13]. We also tested the generalization ability of the compressed model on object detection with Pascal VOC. A series of experiments show that it offers better performance than hand-crafted heuristic policies. Under 4× FLOP reduction, we improve VGG-16 channel decomposition [61] top-5 accuracy by 2.7% and channel pruning [23] top-5 accuracy by 0.3%. We further reduced the FLOPs of 1.0 MobileNet [24] by 2× with 68.8% top-1 accuracy, which is on a better Pareto curve than the 0.75 MobileNet. We achieved a speedup of 1.49× on Titan Xp and 1.65× on the Android phone. policy given by RNN fast exploration continuous action space budget limited search NAS X NT X X N2N X X ADC X X X Table 1. Comparisons of reinforcement learning approaches for searching models (NAS: Neural Architecture Search [65], NT: Network Transformation [7], N2N: Network to Network [3], and ADC: our Automated Deep Compression). Our ADC benefits from reward without finetuning, continuous compression ratio control, accuracy-guaranteed, and FLOPs-constrained compression. N2N [3] also aims to search a compressed model with reinforcement learning. However, their state space is not scalable to ImageNet. As shown in the Table. 1, we demonstrate several merits of our ADC over the others. Our ADC benefits from having no need for an RNN to produce the policy, no need for training to provide the reward, continuous compression ratio control, automatic accuracy-guaranteed compression, and FLOPs-constrained compression options. 3. Methodology Fig. 1 illustrates our Automated Deep Compression agent. We aim to automatically find the sparsity ratio for each layer of a network in order to improve the quality of compression algorithms. The sparsity ratio can drastically affect the compressed model’s performance ([20, 23], Sec. 4.2.1). Motivated by this, we propose to search for sparsity ratios in fine-granularity with reinforcement learning that does not require human expertise. Specifically, we train a DDPG agent that receives a layer embedding st and outputs a fine grained sparsity ratio at for each layer. We efficiently search the state space with the validation accuracy without fine-tuning as the reward, which is a very effective delegate and extremely time-efficient. 2. Related Work CNN Compression and Acceleration. Since the development of optimal brain damage [35, 21], extensive work has been done on CNN compression [20, 19, 40, 15]. Quantization [63, 12, 48] and special conv implementation [42, 55, 33, 4] speed up CNN inherently. Tensor factorization [34, 18, 31, 41] decomposed weights into several pieces. [59, 14, 17] accelerated fully connected layers with truncated SVD. [28] factorized a layer into 1 × 3 and 3 × 1. [61] factorized a layer into 3 × 3 and 1 × 1. Channel pruning [47, 25, 2, 45] removed redundant channels on feature maps. A common problem, however, is how to determine sparsity ratio for each layer. Neural Architecture Search. Many works on searching models with reinforcement learning or genetic algorithms greatly improve CNN [53, 49, 6, 43]. [65] proposed to search transferable network blocks. NASNets have surpassed hand-designed architectures [54, 22, 11] on ImageNet. [7] speeded up exploration via network transformation [9]. Integrating reinforcement learning into model compression becomes natural. Concurrent with our work, 3.1. Problem Definition Model compression is achieved by reducing the number of channels from c to c0 for each convolutional layer, where c0 < c. We studied three compression algorithms. Given a n × c × kh × kw convolutional weight, spatial decomposition [28] factorizes it into n × c0 × kh × 1, c0 × c × 1 × kw . Channel decomposition [61] factorizes it into n × c0 × kh × kw , c0 × c × 1 × 1. Channel pruning [23] shrinks it into n × c0 × kh × kw . Given the underlying network and compression algorithm, our goal is to precisely find the effective number of channels c0 for each layer, which has usually been manually determined in previous studies [28, 36, 23]. 2 3.2. The State Space Algorithm 1 search with constrained FLOPs 1: procedure GETACTION (t) 2: a = µ0 (st ) 3: desired ← desired FLOPs reduction 4: if t == 0 then 5: reduced ← 0 6: rest ← sum(F LOP s[t + 1, ...]) 7: duty ← desired − reduced − rest 8: if duty > 0 then 9: a ← min(a, 1 − duty/F LOP s[t]) 10: reduced ← reduced + (1 − a) ∗ F LOP s[t] 11: return a For each layer t, we have 11 features that characterize the state st : (t, n, c, h, w, stride, k, F LOP s[t], reduced, rest, at−1 ) (1) where t is the layer id, the dimension of the kernel is n×c× k ×k, and the input is c×h×w. F LOP s[t] is the FLOPs of layer t. Reduced is the total number of reduced FLOPs in previous layers. Rest is the number of remaining FLOPs in the following layers. Before being passed to the agent, they are scaled within [0, 1]. Such features are essential for the agent to distinguish one convolutional layer from another (Sec. 4.1.2). 3.5. Accuracy-Guaranteed Compression 3.3. The Action Space By tweaking the reward function, we can accurately find the limit of compression that offers no loss of accuracy. We empirically observe that Error is inversely-proportional to log(F LOP s) [8]. Driven by this, we devise the following reward function: Most of the existing works use discrete space as coarsegrained action space (e.g., {64, 128, 256, 512} for number of channels). Coarse-grained action space might not be a problem for a high-accuracy model architecture search. However, we observed that model compression is very sensitive to sparsity ratio and requires fine-grained action space, leading to an explosion of the number of discrete actions (Sec. 4.2.1). Such large action spaces are difficult to explore efficiently [37]. Discretization also throws away the order: for example, 10% sparsity is more aggressive than 20% and more aggressive than 30%. 0 We propose to use continuous action space a = cc , a ∈ (0, 1], which enables more fine-grained and accurate compression. RF LOP s = −Error · log(F LOP s) This reward function is sensitive to Error; in the meantime, it offers a small incentive for reducing F LOP s. Based on our experiments in Fig. 4.1.5, we note that our agent automatically finds the limit of compression. 3.6. The Agent Illustrated in Fig. 1, the agent receives layer t embedding state st from the environment and then outputs a sparsity ratio, action at . The underlying layer is compressed with ai using a specified compression algorithm (e.g., spatial decomposition [28]). Then the agent moves to the next layer t + 1, and receives the state st+1 . After finishing the final layer T , the reward accuracy is evaluated on the validation set and gets returned to the agent. For fast exploration, we evaluate the reward accuracy without fine-tuning, and it works well (Sec. 4.1.3). We utilize the Deep Deterministic Policy Gradient (DDPG) [37] for continuous control. Truncated normal distribution (T N ) [30] is added to our actor policy µ to construct exploration policy µ0 : 3.4. FLOPs-Constrained Compression By limiting the action space (the sparsity ratio for each layer), we can accurately arrive at the target compression ratio. Following [65, 5, 62], we use the following reward: Rerr = −Error (3) (2) Obviously, this reward offers no incentive for FLOPs reduction, so we need to limit the action space: we allow arbitrary action a at the first few layers; we start to limit the action a when we find that the budget is insufficient even after compressing all the following layers. Algorithm 1 illustrates this process. (For channel pruning, the code will be longer but similar, since removing a filter affects the computation of two layers.) Note that our algorithm is not limited to constraining FLOPs. FLOPs can be replaced by other resources, such as the number of parameters, or even the actual inference time on the mobile device. Based on our experiments (Sec. 4.1.4), since the agent receives no incentive for going below the budget, it can accurately arrive at the target compression ratio. µ0 (st ) ∼ T N (µ(st |θtµ ), σ 2 , 0, 1) (4) µ0 (st ) ∈ (0, 1). σ determines the randomness of policy. We exponentially decay σ during exploitation, illustrated in Fig. 2. Following Block-QNN [62], which uses a variant form of Bellmans Equation [57], each transition in an episode is (st , at , R, st+1 ), where R is the reward after the network is compressed. While updating, baseline function b is incorporated to reduce the variance of gradient estimation, 3 which is an exponential moving average of the previous rewards [64, 7]: (5) Q yi = ri − b + γQ(si+1 , µ(si+1 )|θ ) The discount factor γ is set to 1 to not over-prioritize shortterm rewards [5]. 0.6 0.5 exploration noise (right) acc. rand acc. best acc. rand best acc. exploitation 0.4 0.3 0.2 0.3 0.1 0.2 4. Experimental Results 0.1 For spatial decomposition [28], we use data independent reconstruction (the compression only operates weights and features are not involved [52]). For channel pruning [23], we use max response selection (pruning the weights according to the magnitude [20]), and preserve Batch Normalization [27] layers during pruning instead of merging them into convolutional layers. Our agent first explores 100 episodes with a constant noise σ 0.5, and then exploits 300 episodes with exponentially decayed noise σ (Fig. 2). The learning rate 1e−4 and 1/10 original number of iterations are used for fine-tuning [23]. Our implementation is based on open source projects: Caffe [29] 1 , and TensorFlow [1] 2 . 0 50 100 150 200 250 300 episode (models explored) 350 0.0 400 Figure 2. Validation accuracy and noise decay versus episode, using spatial decomposition on CIFAR-10 under 2×. We explore for 100 episodes with constant noise σ. Then we exploit for 300 episodes with exponentially decayed noise σ. Notice that best accuracy from random exploration plateaus for very long time. Random search cannot find good enough results with limited episodes. (better viewed in color) 30 4.1. CIFAR-10 and Analysis 31.0 25 We conduct extensive experiments and fully analyze our ADC on CIFAR-10 [32], which consists of 50k training and 10k testing 32 × 32 tiny images in ten classes. We split the training images into 45k/5k train/validation. The accuracy reward is obtained on validation images. Our approach is extremely efficient. (e.g., data independent and data dependent spatial decomposition [28] can finish searching within 5 minutes/1 hour respectively3 .) 4.1.1 0.4 0.7 Noise 1 X (yi − Q(si , ai |θQ ))2 N i 0.5 0.8 Accuracy (%) Loss = 0.9 Error (%) 20 18.0 17.5 15 16.0 11.6 10 11.2 10.9 10.7 10.2 layer all 5 0 Comparison with Random Search Theoretically, after a large number of trials, the random search result will be close to the reinforcement learning result. It is unclear how many trials are necessary for the random search to succeed, especially for small networks on CIFAR-10. As shown in Fig. 2, we search sparsity policy for spatial decomposition of Plain-20 under 2×. Before 100 episodes, our ADC behaves the same as random search. Both explore with constant noise σ = 0.5. After 100 episodes, our ADC exploits with exponentially decayed noise σ and start learning. It can find a good model quickly; however, random search plateaus. Exploring 400 episodes is insufficient for the random search to get good enough results, even for a small network on CIFAR-10. stride n c H(W) FLOPs[i]reduced at layer embedding 1 Figure 3. Effectiveness of each layer embedding, evaluated with spatial decomposition for Plain-20 2×. Combining all embeddings together, the performance is even better. (smaller is better) 4.1.2 Effectiveness of Layer Embeddings Layer embedding state st (Sec. 3.2) is essential for ADC to distinguish different convolutional layers. As shown in Fig. 3, we evaluate the effectiveness of each layer embedding, and the combination of all of them with spatial decomposition Plain-20 under 2×. Straightforwardly, with only stride, it is too difficult to distinguish different layers. The performances of n, c, H, W are similar, since their values change together when stride is 2. F LOP s[i], reduced, at−1 and layer index are most effec- 1 https://github.com/yihui-he/channel-pruning 2 https://github.com/pemami4911/deep-rl 3 On single GeForce GTX TITAN Xp GPU and Intel Xeon CPU E52680 4 Model Plain-20 (90.5%) ResNet-56 (92.8%) policies deep (handcraft) shallow (handcraft) uniform (handcraft) ADC (ours) ADC (RF LOP s ) uniform (handcraft) deep (handcraft) ADC (ours) FLOPs (%) 50% 80% 50% val acc. (%) 79.6 83.2 84.0 86.4 90.7 87.5 88.4 90.2 test acc. (%) 79.2 82.9 83.9 86.0 90.5 87.4 88.4 90.1 test acc after ft. (%) 88.3 89.2 89.7 90.2 89.8 91.5 91.9 compression ratio Table 2. Pruning policies comparison of Plain-20, ResNet-56 [22] on CIFAR-10 [32]. For both shallow network Plain-20 and deeper network ResNet-56, our ADC outperforms hand-crafted policies by a large margin. Validation, test, and fine-tuned accuracy are consistent. This enables our efficient exploration without fine-tuning. Though our ADC makes many trials on model architecture, no overfitting is observed. (larger is better) 1.0 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 policies uniform(handcraft,89.7%) shallow(handcraft,89.2%) deep(handcraft,88.3%) ours(90.2%) 0 1 2 3 4 5 6 7 8 9 10 layer 11 12 13 14 15 16 17 18 Figure 4. Comparisons of pruning strategies for Plain-20 under 2×. Uniform policy sets the same compression ratio for each layer uniformly. Shallow and deep policies aggressively prune shallow and deep layers respectively. Our ADC policy looks like sawtooth, which resembles the highly compact bottleneck architecture [22]. It outperforms hand-crafted policies by a large margin. (better viewed in color) tive, since they dynamically change at each layer. at−1 and reduced resemble the RNN used by other architecture search approaches [65, 7], since st is affected by st−1 . In the following experiments, we combine all these embeddings, which makes the performance even better. rameters. As shown in Table 2, the test accuracy and the validation accuracy are very close; there’s no indication of overfitting. 4.1.3 We compared our approach to the three empirical policies [36, 23] illustrated in Fig. 4: uniform sets compression ratio uniformly, shallow and deep aggressively prune shallow and deep layers respectively. Based on sparsity distribution of different networks, a different strategy might be chosen (e.g., VGG-16 favors shallow [23]). In Table. 2, we show our use of reward Rerr to accurately find the sparsity ratios for pruning 50% for Plain-20 and ResNet-56 [22] and compare it with empirical policies. We outperform empirical policies by a large margin. Counterintuitively, the best pruning setting found by our approach differs from empirical ones a lot (Fig. 4). It resembles bottleneck architecture [22], which is highly compact. 4.1.4 Validation, Test, Fine-tuned Accuracy Test versus Fine-tuned Accuracy. We observed a correlation between the final accuracy after fine-tuning and the validation accuracy before fine-tuning [20, 23]. As shown in Table 2, policies that obtained higher validation accuracy correspondingly have higher fine-tuned accuracy. This enables us to predict final model accuracy without training, which results in efficient exploration. Validation versus Test Accuracy. We have separate validation and test sets, and only used the validation set to give the reward function during reinforcement learning. In addition, the compressed models we searched have fewer pa5 FLOPs-Constrained Compression 45 -5.000 -4.500 40 35 channel pruning -4.000 -3.500 30 Error (%) -5.500 -3.000 25 spatial decomp. -2.500 20 -2.000 15 -1.500 10 channel decomp. -1.000 5 -0.500 0 30 40 50 60 70 Compression ratio (%) 80 90 FLOP 20% 25% 64% 25% ∆acc -14.6 -3.58 -2.3 -1.7 -1.4 -11.7 -9.2 -0.0 -6.4 -3.8 -1.1 Table 3. Comparison with handcrafted approaches using channel pruning, spatial decomposition, and channel decomposition. The heuristic approach ranks filters with PCA energy and computation. Our approach could still improve performance. Spatial and channel decomposition are shown here without fine-tuning. For reference, the actual VGG-16 inference time speedup of channel pruning, spatial decomposition, and channel decomposition under 4× FLOP reduction are 2.50×, 1.01× and 1.55× respectively [23]. The baseline VGG-16 has 89.9% top-5 and 70.5% top-1 accuracy. 100 Figure 5. The RF LOP s = −Error · log(F LOP s) manifold, where F LOP s is the desired pruned model computation. RF LOP s focuses on Error, and also offers a small incentive for reducing computation in the meantime. The black curve shows our spatial decomposition searched results on CIFAR-10 [32] by limiting action space (Sec. 3.4). As is shown, the accuracy drops sharply under 80% compression ratio. This reward naturally encourages models that have a compression ratio over 80%. The final model we found have a 90% compression ratio with no degradation. For channel pruning, the final model we found have an 80% compression ratio with no degradation. (better viewed in color) ing is on the center 224 × 224 crop. Our approach is still extremely efficient (searching with data dependent pruning VGG-16 only takes 4 hours 4 ). 4.2.1 4.1.5 policy FP (handcraft) [36] RNP (handcraft) [38] SPP (handcraft) [56] empirical (handcraft) [23] ADC (ours) heuristic (handcraft) [28] ADC (ours) ADC (RF LOP s ) uniform (handcraft) [61] heuristic (handcraft) [61] ADC (ours) Accuracy-Guaranteed Compression Comparison with Heuristic Approach In channel pruning [23] VGG-16 [51]5 , sparsity ratios are carefully tuned (conv5 are skipped, preserving ratio for conv4 and the remaining layers is 1.5 : 1). Consistent with our CIFAR-10 experiments (Sec. 4.1.4), fine-tuned top-5 error of empirical is 0.3% greater than our approach, shown in Table 3. Beyond empirical strategies, a heuristic algorithm [61] was also proposed to improve the sparsity determination in σi each layer. It gives a score of C to each filter i in a neti work, where σi is PCA energy and Ci is the computation it contributes. Then the sparsity ratio is set according to the ranking. The policies are illustrated in Fig. 6. As shown in Table. 3, for both spatial and channel decomposition, we outperform heuristic algorithm by a large margin. Since the heuristic approach uses hand-crafted ranking, the improvement is still limited. For instance, the heuristic approach retains full rank for conv1_1, because it only contributes 0.6% to overall computation. However, ADC is able to figure out that decomposing conv1_1 is not harmful, although its computation contribution is small. For conv5, the empirical analysis shows that the top 50% PCA energy is 80%, which is low compared to more than 90% By using our RF LOP s reward, our agent can automatically find the limit of compression, with little loss of performance. As shown in Fig. 5, we decompose Plain-20 with spatial decomposition. The result we obtained has a 90% compression ratio with little degradation (marked with a red dot). The reward curve in black is obtained using the Rerr reward. Notice that the reward drops sharply if compression goes below 80%. Since our reward RF LOP s focuses on Error and offers very little incentive to compression in the meantime, it prefers the high-performance model with harmless compression. For much more redundant networks, such as VGG-16 on ImageNet, our RF LOP s reward automatically preserves only 64% FLOPs without any degradation (Sec. 4.2.1). To shorten the search time, we obtain the reward using the validation accuracy without fine-tuning. We believe that with fine-tuned accuracy as the reward, the agent will compress more aggressively, since the fine-tuned accuracy is much closer to the original accuracy. 4.2. ImageNet On ImageNet [13], images are resized such that the shorter side is 256. We use 3000 images from the training set for reward evaluation. Only random crop and horizontal flip are used during fine-tuning, limited by Caffe. The test- 4 On 8 GeForce GTX TITAN Xp GPUs and Intel Xeon CPU E5-2680 5 https://github.com/BVLC/caffe/wiki/Model-Zoo#models-used-by- the-vgg-team-in-ilsvrc-2014 6 policies orig(89.9%) uniform(handcraft,83.5%) heuristic(handcraft,86.1%) ours(88.8%) 500 rank 400 baseline 2× handcrafted [23] 4× handcrafted [23] 4× handcrafted [61] 4× ADC (ours) 300 mAP (%) 68.7 68.3 (-0.4) 66.9 (-1.8) 67.8 (-0.9) 68.8 (+0.1) mAP [.5, .95] (%) 36.7 36.7 (-0.0) 35.1 (-1.6) 36.5 (-0.2) 37.2 (+0.5) Table 4. Comparisons of compressed VGG-16 for Faster R-CNN detection on PASCAL VOC 2007. Consistent with recognition performance, the better-compressed model produced by our ADC also results in better performance on object detection task. On TITAN Xp, the actual inference times are 68ms, 56ms ,53ms, 55ms and 61ms respectively. 200 100 co nv 1 co _1 nv 1_2 co nv 2 co _1 nv 2 co _2 nv 3 co _1 nv 3 co _2 nv 3 co _3 nv 4 co _1 nv 4_2 co nv 4 co _3 nv 5 co _1 nv 5 co _2 nv 5_3 0 70.5 layer 70.0 Imagenet Accuracy Figure 6. Comparisons of policies for decomposing VGG16 [51] under 4× FLOPs reduction (top-5 accuracy shown). U nif orm compresses each layer with the same sparsity ratio. Heuristic [61] is based on scoring each filter with PCA energy and computation. Although the differences between the strategies are subtle, we gracefully outperformed The heuristic approach by 2.7%. (better viewed in color) 69.0 68.5 68.0 MobileNet Optimized by ADC MobileNet Optimized by Human Expert MobileNet Un-optimized 67.5 of conv1 to conv3 layers, and their computation contribution is also as low as 3% per layer. [23] even preserves all conv5 channels for 4×, 5× FLOPs reduction. However, ADC is still able to squeeze out some computation from these sensitive layers. These patterns can not be easily discovered by analyzing PCA energy and computation. By investigating the sparsity ratio settings in Fig. 6, we notice that for most layers before conv5, the sparsity ratio difference between policies is only about 3%. For conv5, the difference is around 20%. Although the sparsity ratio differences are subtle, the performance changes drastically (Table 3). Fine-grained action space can be detrimental to compression agents [3] using discrete action space [58, 44]. However, our DDPG agent naturally overcomes this problem with continuous control (Sec. 3.6). 4.2.2 69.5 200 300 400 Million Mult-Adds 500 600 Figure 7. Pruning MobileNet [24]. The original MobileNets are shown as connected black dots. The result obtained by shallow policy is even worse, slightly, than that of the original MobileNets. With our ADC policies, channel pruning greatly boosts MobileNets’ performances. Our RF LOP s reward naturally reduces to 86% FLOPs without degradation. (better viewed in color) (mAP) and mAP[.5, .95] (the primary challenge metric of COCO [39]). Shown in Table. 4, although our compressed model is only 0.6% better than [23] on ImageNet classification, the margin becomes larger on object detection (2.1% better mAP[.5, .95]). Our ADC even surpasses the baseline by 0.5%. We conjecture that this significant gain occurs because of our precise compression policy and the produced compact architecture, which serves as good regularization. Generalization Ability To evaluate the generalization ability of the compressed model for transfer learning on the PASCAL VOC 2007 object detection task [16], we test our compressed VGG-16 (4× FLOP reduction, 1.1% increase of error by channel decomposition, Sec. 4.2.1). We simply use our compressed VGG-16 as the backbone for Faster R-CNN [50], and train with the same setting as the publicly released code6 . The performance is evaluated by both mean Average Precision 4.2.3 Pruning Compact Networks Recently, compactly designed networks [26, 24, 60] emerged for the increasing needs of faster and smaller networks. In this paper, we focus on pruning 1.0 MobileNet [24], a highly compact network consisting of depthwise convolution and pointwise convolution layers. Pre- 6 https://github.com/rbgirshick/py-faster-rcnn 7 1.0 MobileNet 0.75 MobileNet 0.6× ADC (ours) 0.5× ADC (ours) Million MAC top-1 acc. (%) top-5 acc. (%) 569 70.6 89.5 325 68.4 88.2 341 70.1 89.4 285 68.8 88.6 GPU latency speed (ms) 455 fps 2.20 (1 ×) 571 fps 1.75 (1.25×) 581 fps 1.72 (1.28×) 658 fps 1.52 (1.44×) Android total (ms) sep. 1×1 (ms) depth.3×3 (ms) 76.4 26.1 107.1 51.6 26.2 82.2 47.1 21.1 72.6 40.8 19.8 65.1 speed 9.3 fps (1 ×) 12.2 fps (1.30×) 13.8 fps (1.48×) 15.4 fps (1.65×) memory (VSS) 226MB 187MB 177MB 151MB Table 5. Comparisons for pruning MobileNet [24] under different speedup ratios. Previous attempts using hand-crafted policy to prune MobileNets lead to significant accuracy degradation [36]. With our ADC pruning policy, the pruned models greatly improve MobileNets. In addition, we also gain gracefully inference time speed up on GPU. (Inference time is tested on GeForce GTX TITAN Xp with a mini batch size of 50 (the reported latency is amortized latency for each image), CUDA 8 [46] and cuDNN 6 [10].) On an Android phone, the speed-up is even better than on GPU. We achieved 1.87× speed up for 1 × 1 convolution layers and 1.65× speed up overall, under 2× FLOPs reduction. Our pruned models are faster and more accurate than 0.75 MobileNet. vious attempts using hand-crafted policy to prune MobileNets led to significant accuracy degradation [36]. Pruning 1.0 MobileNet to 75.5% original parameters results in 67.2% top-1 accuracy7 , which is even worse than the original 0.75 MobileNet (61.9% parameters with 68.4% top1 accuracy). However, our ADC pruning policy significantly improves pruning quality: ADC-pruned MobileNet achieved 68.8% Top-1 accuracy with 285 FLOPs compared to the original 0.75 MobileNet’s 68.4% Top-1 accuracy with 325 FLOPs, all evaluated on ImageNet. As shown in Fig. 7, empirical policy shallow [23] is slightly worse than that of the original MobileNets under 2× FLOPs reduction. With our ADC pruning policy, the pruned models gracefully improve MobileNets. For 2× FLOPs reduction, we arrive at 68.8% top-1 accuracy, improving empirical policy from 67.5%. With RF LOP s reward, we prune 14% computation without any degradation. As shown in Table. 5, we gain visible inference time improvement on GPU. Our 0.6× pruned model achieve 1.28× real time speed up, with only 0.1% increase of top-5 error. Also note that limited by Caffe, the augmentation we used during fine-tuning is weaker than [24]. We further test our pruned model on an Android phone8 . The speed up is even better. We achieved 1.87× speed up for 1×1 convolution layers and 1.65× speed up overall, under 2× FLOPs reduction. There’s no much real time speed up for depthwise convolution. Notice that, though depthwise convolutional layers contribute far less computation, they still consume a lot of time. Efficient implementation of depthwise convolution is difficult due to the small ratio of computation over memory fetch. The compressed models also consume less memory (VSS, Virtual Set Size). MobileNets are already highly compact. It is hard for hand-crafted policies to gain speed-up. Our ADC’s precise policies are essential for pruning to succeed. We further demonstrate ADC also works on even more compact neural networks, which have architecture that is found by reinforcement learning, such as NASNet [65]. The results are in the appendix. 5. Conclusion Conventional model compression techniques use handcrafted features and require domain experts to explore the large design space and trade off model size, speed, and accuracy, which is usually suboptimal and labor-consuming. In this paper, we propose Automated Deep Compression (ADC), which leverages reinforcement learning to automatically search the design space, greatly improving the model compression quality. We designed two novel reward schemes to perform both FLOPs-constrained compression and accuracy-guaranteed compression. Compelling results have been demonstrated for MobileNet, ResNet, and VGG Net on CIFAR-10, the complex ImageNet. The compressed model generalizes well to object detection on PASCAL VOC. On the Galaxy S7 mobile phone, we pushed the inference speed from 9.3 fps to 15.4 fps. Our ADC technique facilitates deep vision on mobile devices. Acknowledgement We would love to express our appreciation to Quoc Le, Raghu Krishnamoorthi, Mingxing Tan, Pete Warden, Samy Bengio, Jeff Dean, Fei-Fei Li, and Bill Dally for the useful discussions during the course of this research. References [1] M. Abadi, A. Agarwal, P. Barham, E. Brevdo, Z. Chen, C. Citro, G. S. Corrado, A. Davis, J. Dean, M. Devin, S. Ghemawat, I. Goodfellow, A. Harp, G. Irving, M. Isard, Y. Jia, 7 http://machinethink.net/blog/compressing-deep-neural-nets/ 8 With TensorFlow 1.3 32-bit float on Galaxy S7 Edge with Qualcomm Snapdragon 820 SoC. 8 [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] R. Girshick. Fast r-cnn. In Proceedings of the IEEE International Conference on Computer Vision, pages 1440–1448, 2015. 2 [18] Y. Gong, L. Liu, M. Yang, and L. Bourdev. Compressing deep convolutional networks using vector quantization. arXiv preprint arXiv:1412.6115, 2014. 2 [19] S. Han, H. Mao, and W. J. Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. arXiv preprint arXiv:1510.00149, 2015. 1, 2 [20] S. Han, J. Pool, J. Tran, and W. Dally. Learning both weights and connections for efficient neural network. In Advances in Neural Information Processing Systems, pages 1135–1143, 2015. 1, 2, 4, 5 [21] B. Hassibi and D. G. Stork. Second order derivatives for network pruning: Optimal brain surgeon. Morgan Kaufmann, 1993. 2 [22] 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. 2, 5 [23] Y. He, X. Zhang, and J. Sun. Channel pruning for accelerating very deep neural networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1389–1397, 2017. 1, 2, 4, 5, 6, 7, 8, 11 [24] A. G. Howard, M. Zhu, B. Chen, D. Kalenichenko, W. Wang, T. Weyand, M. Andreetto, and H. Adam. Mobilenets: Efficient convolutional neural networks for mobile vision applications. arXiv preprint arXiv:1704.04861, 2017. 2, 7, 8 [25] H. Hu, R. Peng, Y.-W. Tai, and C.-K. Tang. Network trimming: A data-driven neuron pruning approach towards efficient deep architectures. arXiv preprint arXiv:1607.03250, 2016. 2 [26] 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. arXiv preprint arXiv:1602.07360, 2016. 7 [27] S. Ioffe and C. Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015. 4 [28] M. Jaderberg, A. Vedaldi, and A. Zisserman. Speeding up convolutional neural networks with low rank expansions. arXiv preprint arXiv:1405.3866, 2014. 1, 2, 3, 4, 6, 11 [29] Y. Jia, E. Shelhamer, J. Donahue, S. Karayev, J. Long, R. Girshick, S. Guadarrama, and T. Darrell. Caffe: Convolutional architecture for fast feature embedding. In Proceedings of the 22nd ACM international conference on Multimedia, pages 675–678. ACM, 2014. 4 [30] N. Johnson, S. Kotz, and N. Balakrishnan. Continuous univariate probability distributions,(vol. 1), 1994. 1, 3 [31] Y.-D. Kim, E. Park, S. Yoo, T. Choi, L. Yang, and D. Shin. Compression of deep convolutional neural networks for fast and low power mobile applications. arXiv preprint arXiv:1511.06530, 2015. 2 [32] A. Krizhevsky and G. Hinton. Learning multiple layers of features from tiny images. 2009. 2, 4, 5, 6 [33] A. Lavin. Fast algorithms for convolutional neural networks. arXiv preprint arXiv:1509.09308, 2015. 2 R. Jozefowicz, L. Kaiser, M. Kudlur, J. Levenberg, D. Mané, R. Monga, S. Moore, D. Murray, C. Olah, M. Schuster, J. Shlens, B. Steiner, I. Sutskever, K. Talwar, P. Tucker, V. Vanhoucke, V. Vasudevan, F. Viégas, O. Vinyals, P. Warden, M. Wattenberg, M. Wicke, Y. Yu, and X. Zheng. TensorFlow: Large-scale machine learning on heterogeneous systems, 2015. Software available from tensorflow.org. 4 S. Anwar and W. Sung. Compact deep convolutional neural networks with coarse pruning. arXiv preprint arXiv:1610.09639, 2016. 2 A. Ashok, N. Rhinehart, F. Beainy, and K. M. Kitani. N2n learning: Network to network compression via policy gradient reinforcement learning. arXiv preprint arXiv:1709.06030, 2017. 2, 7 H. Bagherinezhad, M. Rastegari, and A. Farhadi. Lcnn: Lookup-based convolutional neural network. arXiv preprint arXiv:1611.06473, 2016. 2 B. Baker, O. Gupta, N. Naik, and R. Raskar. Designing neural network architectures using reinforcement learning. arXiv preprint arXiv:1611.02167, 2016. 3, 4 A. Brock, T. Lim, J. M. Ritchie, and N. Weston. Smash: one-shot model architecture search through hypernetworks. arXiv preprint arXiv:1708.05344, 2017. 2 H. Cai, T. Chen, W. Zhang, Y. Yu, and J. Wang. Reinforcement learning for architecture search by network transformation. arXiv preprint arXiv:1707.04873, 2017. 2, 4, 5 A. Canziani, A. Paszke, and E. Culurciello. An analysis of deep neural network models for practical applications. arXiv preprint arXiv:1605.07678, 2016. 3 T. Chen, I. Goodfellow, and J. Shlens. Net2net: Accelerating learning via knowledge transfer. arXiv preprint arXiv:1511.05641, 2015. 2 S. Chetlur, C. Woolley, P. Vandermersch, J. Cohen, J. Tran, B. Catanzaro, and E. Shelhamer. cudnn: Efficient primitives for deep learning. CoRR, abs/1410.0759, 2014. 8 F. Chollet. Xception: Deep learning with depthwise separable convolutions. arXiv preprint arXiv:1610.02357, 2016. 2 M. Courbariaux and Y. Bengio. Binarynet: Training deep neural networks with weights and activations constrained to+ 1 or-1. arXiv preprint arXiv:1602.02830, 2016. 2 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. 2, 6 E. L. Denton, W. Zaremba, J. Bruna, Y. LeCun, and R. Fergus. Exploiting linear structure within convolutional networks for efficient evaluation. In Advances in Neural Information Processing Systems, pages 1269–1277, 2014. 2 X. Dong, J. Huang, Y. Yang, and S. Yan. More is less: A more complicated network with less inference complexity. arXiv preprint arXiv:1703.08651, 2017. 2 M. Everingham, L. Van Gool, C. K. I. Williams, J. Winn, and A. Zisserman. The PASCAL Visual Object Classes Challenge 2007 (VOC2007) Results. http://www.pascalnetwork.org/challenges/VOC/voc2007/workshop/index.html. 7 9 [51] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. 2, 6, 7 [52] S. Srinivas and R. V. Babu. Data-free parameter pruning for deep neural networks. arXiv preprint arXiv:1507.06149, 2015. 4 [53] K. O. Stanley and R. Miikkulainen. Evolving neural networks through augmenting topologies. Evolutionary computation, 10(2):99–127, 2002. 2 [54] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich. Going deeper with convolutions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1–9, 2015. 2 [55] N. Vasilache, J. Johnson, M. Mathieu, S. Chintala, S. Piantino, and Y. LeCun. Fast convolutional nets with fbfft: A gpu performance evaluation. arXiv preprint arXiv:1412.7580, 2014. 2 [56] H. Wang, Q. Zhang, Y. Wang, and R. Hu. Structured probabilistic pruning for deep convolutional neural network acceleration. arXiv preprint arXiv:1709.06994, 2017. 6 [57] C. J. C. H. Watkins. Learning from delayed rewards. PhD thesis, King’s College, Cambridge, 1989. 3 [58] R. J. Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning, 8(3-4):229–256, 1992. 7 [59] J. Xue, J. Li, and Y. Gong. Restructuring of deep neural network acoustic models with singular value decomposition. In INTERSPEECH, pages 2365–2369, 2013. 2 [60] X. Zhang, X. Zhou, M. Lin, and J. Sun. Shufflenet: An extremely efficient convolutional neural network for mobile devices. arXiv preprint arXiv:1707.01083, 2017. 7 [61] X. Zhang, J. Zou, K. He, and J. Sun. Accelerating very deep convolutional networks for classification and detection. IEEE transactions on pattern analysis and machine intelligence, 38(10):1943–1955, 2016. 2, 6, 7, 11 [62] Z. Zhong, J. Yan, and C.-L. Liu. Practical network blocks design with q-learning. arXiv preprint arXiv:1708.05552, 2017. 3 [63] C. Zhu, S. Han, H. Mao, and W. J. Dally. Trained ternary quantization. arXiv preprint arXiv:1612.01064, 2016. 2 [64] B. Zoph and Q. V. Le. Neural architecture search with reinforcement learning. arXiv preprint arXiv:1611.01578, 2016. 4 [65] B. Zoph, V. Vasudevan, J. Shlens, and Q. V. Le. Learning transferable architectures for scalable image recognition. arXiv preprint arXiv:1707.07012, 2017. 2, 3, 5, 8, 11 [34] V. Lebedev, Y. Ganin, M. Rakhuba, I. Oseledets, and V. Lempitsky. Speeding-up convolutional neural networks using fine-tuned cp-decomposition. arXiv preprint arXiv:1412.6553, 2014. 2 [35] Y. LeCun, J. S. Denker, S. A. Solla, R. E. Howard, and L. D. Jackel. Optimal brain damage. In NIPs, volume 2, pages 598–605, 1989. 2 [36] H. Li, A. Kadav, I. Durdanovic, H. Samet, and H. P. Graf. Pruning filters for efficient convnets. arXiv preprint arXiv:1608.08710, 2016. 2, 5, 6, 8 [37] T. P. Lillicrap, J. J. Hunt, A. Pritzel, N. Heess, T. Erez, Y. Tassa, D. Silver, and D. Wierstra. Continuous control with deep reinforcement learning. arXiv preprint arXiv:1509.02971, 2015. 3 [38] J. Lin, Y. Rao, and J. Lu. Runtime neural pruning. In Advances in Neural Information Processing Systems, pages 2178–2188, 2017. 6 [39] T.-Y. Lin, M. Maire, S. Belongie, J. Hays, P. Perona, D. Ramanan, P. Dollár, and C. L. Zitnick. Microsoft coco: Common objects in context. In European conference on computer vision, pages 740–755. Springer, Cham, 2014. 7 [40] J.-H. Luo, J. Wu, and W. Lin. Thinet: A filter level pruning method for deep neural network compression. arXiv preprint arXiv:1707.06342, 2017. 2 [41] M. Masana, J. van de Weijer, L. Herranz, A. D. Bagdanov, and J. M. Alvarez. Domain-adaptive deep network compression. In The IEEE International Conference on Computer Vision (ICCV), Oct 2017. 2 [42] M. Mathieu, M. Henaff, and Y. LeCun. Fast training of convolutional networks through ffts. arXiv preprint arXiv:1312.5851, 2013. 2 [43] R. Miikkulainen, J. Liang, E. Meyerson, A. Rawal, D. Fink, O. Francon, B. Raju, A. Navruzyan, N. Duffy, and B. Hodjat. Evolving deep neural networks. arXiv preprint arXiv:1703.00548, 2017. 2 [44] V. Mnih, K. Kavukcuoglu, D. Silver, A. A. Rusu, J. Veness, M. G. Bellemare, A. Graves, M. Riedmiller, A. K. Fidjeland, G. Ostrovski, et al. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 2015. 7 [45] P. Molchanov, S. Tyree, T. Karras, T. Aila, and J. Kautz. Pruning convolutional neural networks for resource efficient inference. 2016. 2 [46] J. Nickolls, I. Buck, M. Garland, and K. Skadron. Scalable parallel programming with CUDA. ACM Queue, 6(2):40–53, 2008. 8 [47] A. Polyak and L. Wolf. Channel-level acceleration of deep face representations. IEEE Access, 3:2163–2175, 2015. 2 [48] M. Rastegari, V. Ordonez, J. Redmon, and A. Farhadi. Xnornet: Imagenet classification using binary convolutional neural networks. In European Conference on Computer Vision, pages 525–542. Springer, 2016. 2 [49] E. Real, S. Moore, A. Selle, S. Saxena, Y. L. Suematsu, Q. Le, and A. Kurakin. Large-scale evolution of image classifiers. arXiv preprint arXiv:1703.01041, 2017. 2 [50] S. Ren, K. He, R. Girshick, and J. Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In Advances in neural information processing systems, pages 91–99, 2015. 7 10 Supplementary Materials A. Pruning NASNet ... c kh n c kh kw n kw c (b) channel pruning (a) convolutional layer ... ... n filters ... c filters 1 kw ... c c kh 1 c n c (c) spatial decomposition NASnet (ADC) NASnet 73 ... ... 72 n filters ... c filters 1 ... Imagenet Accuracy n filters ... ... n filters c 75 74 ... We further applied ADC to NASNet [65] with RF LOP s reward. Pruning NASNet is challenging, since it is highly compact already. It has fewer FLOPs than MobileNet, but has more than 3% better Top-1 accuracy on ImageNet. However, with automatic deep compression, we can still squeeze out computation from NASNet-A_Mobile_224 (Fig. 8), because ADC provides finer-grained action space than NAS. ADC is general purpose and works for all convolutional neural networks. We showed the result on MobileNet and NASNet in Fig. 8, both without any loss of accuracy. Due to the time limit, our current accuracy-guaranteed result is without fine-tuning. NASNet has the potential to be more aggressively pruned by allowing fine-tuning. 71 MobileNet (ADC) kh ShuffleNet c MobileNet c c c 1 n kw (d) channel decomposition 70 490 500 510 520 530 540 Million Mult-Adds 550 560 570 Figure 9. Three compression algorithms used in our experiments. Figure 8. ADC makes NASNet more efficient. Although the architecture of NASNet [65] was already very efficient, we can still squeezed out computation from NASNet without losing any accuracy. C. Deep Deterministic Policy Gradient We used the deep deterministic policy gradient (DDPG) for contiguous control of the compression ratio, which is an off-policy actor-critic algorithm (Sec. 3.6). Our actor network µ had two hidden layers, each with 300 units. The final output layer was a sigmoid layer to bound the actions within (0, 1). Our critic network Q also had two hidden layers, each with 300 units. Actions were included in the second hidden layer. We used τ = 0.01 for the soft target updates. We trained with a batch size of 64 and a replay buffer size of 2000. For the exploration noise process, we used truncated normal distribution. Noise σ was initially 0.5 during exploration. During exploitation, it was decayed after each episode (σ ← 0.95 · σ). B. Environments We experimented on three environments (three compression algorithms). Our ADC can also be extended to other environments. For a convolutional layer with filters n × c × kh × kw , we need to determine rank c0 for each algorithm. Channel Pruning. Illustrated in Fig. 9 (b), channel pruning [23] first prunes redundant channels according to the magnitude of each filter. We sort each filter by the L2 norm and remove the filter with the smallest L2 norm. Therefore, the weights become n × c0 × kh × kw . Then linear regression is used to minimize the error on output feature maps and reconstruct the filters. Spatial Decomposition. Illustrated in Fig. 9 (c), spatial decomposition [28] decomposes a layer into c0 × c × kh × 1 and n × c0 × 1 × kw using SVD. Channel Decomposition. Illustrated in Fig. 9 (d), channel decomposition [61] decomposes a layer into c0 × c × kh × kw and n × c0 × 1 × 1 using GSVD. D. FLOPs-constrained for Channel Pruning FLOPs-constrained algorithm 1 for channel pruning is shown in algorithm 2, mentioned in Sec. 3.4. 11 Algorithm 2 search with constrained FLOPs 1: procedure GETACTION (t) 2: if t == T − 1 then 3: return 1 4: desired ← desired FLOPs 5: if t == 0 then 6: reduced ← 0 7: for i = 0; i < T − 1; i++ do 8: input[i] = 0 9: if prunable(i) then 10: output[i] = 0 11: else 12: output[i] = 1 13: preserved ← 0 14: tmp ← 0 15: for i = 0; i < T − 1; i++ do 16: if prunable(i) and t is the next layer of i then 17: tmp ← tmp + F LOP s[i] ∗ input[i] 18: else if i == t then 19: tmp ← tmp + F LOP s[i] ∗ output[i] 20: else 21: preserved ← preserved + F LOP s[i] ∗ input[i] ∗ output[i] 22: a = µ0 (st ) 23: return min(a, (desired − tmp)/preserved) 24: 25: 26: 27: procedure PRUNABLE(i) if the next layer of layer i is a conv layer then return T rue 28: return F alse 12
1cs.CV
th 8 Australasian Congress on Applied Mechanics, ACAM 8 23-26 November 2014, Melbourne, Australia Seismic Earth Pressure Development in Sheet Pile Retaining Walls: A Numerical Study P. Rajeev1*, H. Bui2, N. Sivakugan3 1 Department of Civil and Construction Engineering, Swinburne University of Technology, Australia Department of Civil Engineering, Monash University, Australia 3 School of Engineering & Physical Sciences, James Cook University, Townsville, Qld, Australia 2 *Corresponding author. Email: [email protected] Abstract: The design of retaining walls requires the complete knowledge of the earth pressure distribution behind the wall. Due to the complex soil-structure effect, the estimation of earth pressure is not an easy task; even in the static case. The problem becomes even more complex for the dynamic (i.e., seismic) analysis and design of retaining walls. Several earth pressure models have been developed over the years to integrate the dynamic earth pressure with the static earth pressure and to improve the design of retaining wall in seismic regions. Among all the models, MononobeOkabe (M-O) method is commonly used to estimate the magnitude of seismic earth pressures in retaining walls and is adopted in design practices around the world (e.g., EuroCode and Australian Standards). However, the M-O method has several drawbacks and does not provide reliable estimate of the earth pressure in many instances. This study investigates the accuracy of the M-O method to predict the dynamic earth pressure in sheet pile wall. A 2D plane strain finite element model of the wall-soil system was developed in DIANA. The backfill soil was modelled with Mohr-Coulomb failure criterion while the wall was assumed behave elastically. The numerically predicted dynamic earth pressure was compared with the M-O model prediction. Further, the point of application of total dynamic force was determined and compared with the static case. Finally, the applicability of M-O methods to compute the seismic earth pressure was discussed. Keywords: Seismic earth pressure, retaining wall, elasto-plastic, Mohr-Coulomb, Mononobe-Okabe 1. Introduction Regardless the multitude of studies that have been carried out over the years, the dynamic response of earth-retaining walls is far from being well understood. There is, in current engineering practice, a lack of conclusive information that can be used in design method. The most commonly used methods to design earth-retaining structures under seismic conditions are force-based equilibrium approaches like the pseudo-static analysis (e.g. Mononobe-Okabe [1]) and pseudo-dynamic techniques (Steedman and Zeng [2]), and displacement-based procedures such as the sliding block method (e.g. Richards and Elms [3]). In the limit-state methods of analyses, the wall is considered to displace or deform sufficiently at the base to fully mobilize the shearing strength of the backfill. Even under static conditions, prediction of actual retaining wall pressures and deformations constitute a complicated soil-structure interaction problem. The dynamic response of even the simplest type of retaining wall is therefore a quite complex phenomenon. It depends on the mass and stiffness of the wall, the backfill and the underlying ground, as well as the interaction among these components and the nature of the seismic motions. The purpose of this study was to develop a finite element model to shed light into understanding the dynamic behaviour of sheet pile wall, in particular to find the distribution of dynamic lateral earth pressures. In all the analyses, the soil was assumed to behave as a homogeneous, elasto-plastic medium with a Mohr-Coulomb failure criterion. The wall was assumed to behave as a linear elastic material. The numerical model for the wall and surrounding soil have been developed using DIANA [4], a commercially available finite element program. The results obtained with DIANA were compared with results obtained from pseudo-static analysis using the procedure by Mononobe-Okabe and Wood analytical solutions. 2. Mononobe-Okabe Earth Pressure Models Okabe [5], Mononobe and Matsuo [1] were the pioneers to obtain the active and passive earth pressure coefficients under seismic conditions. It was an extension of Coulomb’s method in the static case for determining the earth pressures by considering the equilibrium of a triangular failure wedge. The method is now commonly known as Mononobe-Okabe method. For active and passive cases, planar rupture surfaces were assumed in the analysis. Figure (1) shows the failure surfaces at active and passive states, and the forces considered in the analysis. The Mononobe-Okabe approach is valuable in providing a good assessment of the magnitude of the peak dynamic force acting on a retaining wall. However, the method is based on three fundamental assumptions: 1. The wall has already deformed outwards sufficiently to generate the minimum (active) earth pressure; 2. A soil wedge, with a planar sliding surface running through the base of the wall, is on the point of failure with a maximum shear strength mobilized along the length the surface; and 3. The soil behind the wall behaves as a rigid body so that acceleration can be assumed to be uniform throughout the backfill at the instant of failure. i . kvW . khW . plane failure surface i Pa kvW ah=khg . khW Pp . . av=kvg plane failure surface Active Passive AE PE . Figure 1: Failure surfaces and the forces considered by Mononobe-Okabe The expression for computing the seismic active and passive earth force, Pae,pe, is given by Pae , pe  K ae , pe  1 H 2 (1  k v ) K ae , pe 2 (1) cos 2 (     )   sin(   ) sin(  i    0.5  2   cos  cos  cos(     ) 1     cos(     ) cos(i   )   2 (2) where, γ is the unit weight of soil, H is the vertical height of the wall, Kae,pe is the seismic active and passive earth pressure coefficient, φ is the soil friction angle, δ is the wall friction angle, β is the wall inclination with respect to vertical, i is the ground inclination with respect to horizontal on both sides of the wall, kh is the seismic acceleration coefficient in the horizontal direction, and kv is the seismic acceleration coefficient in the vertical direction.  kh   1  k v    tan 1  (3) In Mononobe-Okabe analysis, the point of application of the total seismic active or passive force is considered to be at H/3 from base of the wall, but experimental results (Jacobse 1939, Matsuo 1941) [6] show it is slightly above H/3 from base of the wall for seismic active case. Prakash and Basavanna [7] have made an analysis to determine the height of the resultant force in the Mononobe-Okabe analysis. Seed and Whitman [8] recommended that the dynamic component be taken as acting at 0.6H. Mononobe-Okabe analyses show that kv, when taken as one-half to two-thirds the value of kh, affects the total active or passive pressure by less than 10%. Seed and Whitman [8] concluded that vertical accelerations can be ignored when the Mononobe-Okabe method is used to estimate the total pressure for typical wall designs. The Mononobe-Okabe method is very simple and straightforward, has been used by designers for long, because experimental and theoretical studies have shown that it gives satisfactory results in cases where the backfill deforms plastically and the wall movement is large and irreversible (Whitman [9]). However, there are many practical cases, such as massive gravity walls or basement walls braced at top and bottom, where the wall movement is not sufficient to induce a limit state in the soil. 3. Sheet Pile Wall-Soil System Figure 2 shows the soil-wall system that has been studied in this paper. The height of the flexible wall is 6.0 m, with 5 m of embedment. The backfill and foundation soil is assumed to be medium-dense, cohesion-less, compacted fill. Its geotechnical properties are as follows: unit weight: γs = 19.6 kN/m ; effective angle of internal friction: φ’ = 40˚. The water table is assumed located well below the bottom of the wall and thus the analyses are performed assuming dry soil. It is a plane strain problem. 3 The properties of the concrete and of the reinforcing steel used for designing the wall are as follows: 3 ’ concrete unit weight : γc = 23.6 kN/m ; concrete compressive strength: f c = 27.6 MPa; steel yield strength: f’y = 413.4 MPa. 0.5 m Retaining Wall 6m 5m Figure 2: Dimensions of the sheet pile retaining wall The primary parameters governing the dynamic response of the system are the relative flexibility of the wall and retained medium and relative flexibility of the rotational point constrain given by retained soil. The characteristics of the base motion also affect the response. 4. Numerical Model The DIANA finite element model consists of the upper 15 m of the wall-soil system; containing wall and backfill and 4 m of the underlying natural soil below the base of the wall. Laterally, the model is approximately 38.5 m, to include 12 m of existing soil in front of the wall, approximately 26 m of the backfill/existing soil behind the wall and 0.5 m wall thickness (Figure 3). The soil and wall are modelled using eight-node quadrilateral isoparametric plane strain elements. These elements are based on quadratic interpolation of displacement and Gauss integration. An elasto-plastic constitutive model, in conjunction with Mohr-Coulomb failure criterion, is used to model the soil. Plane-strain elements are also used to model the concrete retaining wall as a linear elastic material. The wall/backfill was “numerically constructed” in DIANA similar to the way an actual wall would be constructed. The soil in front of the wall is excavated in two steps, each of 3 m, with the model being brought to static equilibrium after each excavation. Such excavation allowed realistic earth pressure to develop as the wall deformed during the excavation. 12 m 26 m 15 m 9m 38.5 m Figure 3. Annotated DIANA model of the wall-soil system The small strain natural frequency of the DIANA model of the retaining wall-soil system is estimated to be 4.8 Hz (≈ 5.0 Hz). At higher stains, it is expected that the natural frequency of the system will be less than 5 Hz. The cut-off frequency for dynamic analysis was set at 15 Hz. All along the model, the size of the elements varied from 0.25 to 1.0 m in both directions, which was less than one eighth of the shortest wave length that corresponds to the highest frequency of 15 Hz considered in the transient analysis (Kuhlemeyer and Lysmer [10]). Total of 806 elements was used in the model. 4.1. Model Parameters for the Soil The stress-strain behaviour of the soil was modelled using the Mohr-Coulomb constitutive model. The soil input parameters used in the finite element model are given in Table 1. Table 1. DIANA input properties of sand Parameters Poisson’s ratio At-rest pressure coefficient Small strain Young’s modulus (MPa) Effective friction angle 3 Density (kg/m ) value 0.26 0.36 163.13 40º 2000 4.2. Model Parameters for the Wall The concrete wall is modelled to behave linear elastically during the whole analysis. The parameters are required to define the mechanical properties of the wall: density (ρ), elastic modulus (Ec), and Poisson’s ratio (ν). Ec is calculated using following equation: E c  5000 f c' MPa (4) where f’c is compressive strength of concrete. Table 2. DIANA input properties of concrete Parameters Elastic modulus of concrete (MPa) Yield strength of steel (MPa) Young’s modulus of steel (GPa) 3 Density of concrete (kg/m ) Value 30,000 413.400 200 2400 4.3. Damping As stated before, the soil was modelled as an elasto-plastic Mohr-Coulomb material. Inherent in this model is that once the induced dynamic shear stresses exceed the shear strength of the soil, the plastic deformation of the soil introduced considerable hysteretic damping. However, for dynamic stresses less than the shear strength, the soil behaves elastically, without any damping. In order to avoid over damping in large deformation situations, a lower bound damping ratio of one percent of Rayleigh damping was set to the soil at first natural frequency of the system and the predominant frequency of the excitation. 5. Ground Motion To perform the dynamic analysis, three real earthquake acceleration time-histories were selected with varying levels of intensity and they include the 1940 Imperial Valley earthquake (California), the 1999 Chi-Chi earthquake (Taiwan), and the 1995 Hyogoken-Nambu (Japan), corresponding to low, medium and high Peak Ground Acceleration (PGA), respectively. The response of nonlinear dynamic soilstructure system may be strongly affected by the time-domain character (e.g., frequency content, shape, number of pulses of time-history, and response spectrum characteristic) of time-histories even if the spectra of different time-histories are nearly identical. 6. Results and Discussion Dynamic analyses were performed using the acceleration time-histories described above. The results obtained from DIANA were compared with those determined using a pseudo-static method (i.e. following the approach by Mononobe-Okabe). Following Green and Ebeling [11] approach, the dynamically-induced lateral earth pressures acting on the wall were computed by assuming constant stresses within the element. The corresponding lateral earth pressure coefficient (Kj,DIANA) could then be back-calculated at time increment j from DIANA results using the following expression: K j , DIANA  2  Pj , DIANA   H 2  1  k v , j  (5) where, Pj,DIANA is the resultant of force computed by DIANA and acting on the wall, γt is the total unit weight of the backfill, H is the height of the wall, and kv,j is the vertical inertial coefficient (assumed in this study equal to zero). Equation (5) is used to compute KDIANA values at times corresponding to the peaks in the time-history of the horizontal inertial coefficient (kh), which is calculated from acceleration time-history recorded at the midpoint of the sliding wedge in both the active and passive sides. The direction of kh is opposite to direction of the acceleration and acts towards and away from the backfill (more detail can be found in Rajeev [12]). A plot of the computed Kj,DIANA values versus kh is shown in Figure 4. The calculation of Kj,DIANA was carried out at the preselected times, where the maximum acceleration occurs in all three time-histories to cover the entire range of kh. Also shown in this figure are the lateral dynamic earth pressure coefficients (active: KAE; Passive: KPE) computed using the Mononobe-Okabe expressions for the wall-soil system (Okabe [5]; Mononobe [1]) and Wood [12] solution for rigid wall. Following observations were made from the Figure 4. 1. Active pressure coefficient: KDIANA ≈ KMononobe-Okabe , for moderate levels of shaking b. KDIANA < KMononobe-Okabe , for larger levels of shaking a. c. Kaway from backfill > Ktowards backfill d. The computed K values show a general scatter around the curve for the Mononobe-Okabe dynamic active earth pressure curve. 2. Passive pressure coefficient: e. The computed KDIANA values for lower levels of shaking show values significantly lower than the KMononobe-Okabe f. The computed KDIANA increases with level of shaking g. The computed KDIANA values do not show a general scatter around the curve for the Mononobe-Okabe dynamic passive earth pressure curve Figure 4. Comparison of active and passive lateral earth pressure coefficients (KDIANA) backcalculated from DIANA results with values computed using the Mononobe-Okabe and Wood expressions At larger levels of shaking, the Mononobe-Okabe expressions for active pressures failed to predict the induced stresses on the wall. The computed dynamic stresses from numerical analysis are higher than those computed by the Mononobe-Okabe equation for active pressures in the range of small to moderate levels of shaking. At the lower levels of shaking, the passive pressures are not fully mobilized, therefore the K values computed from the DIANA results are smaller than those calculated from the Mononobe-Okabe expressions. When the level of shaking increases, the mobilization of passive pressure also increases, and consequently the K values increase. The points of application of the total and incremental dynamic resultant forces are also important parameters for design and stability assessment of sheet pile wall. Therefore, the vertical distances (Yj) from the base of the retaining wall to the points of application of total dynamic forces (Pj)acting on the wall were computed using the following relation:  h   y   h  j Yj i, j i j i (6) i, j i where, Yj is the vertical distance from the base of the retaining wall to the point of application of the total resultant force acting on the wall at time increment j, yi is the vertical distance from the base of the retaining wall to the centre of element i,  i, j is the average stress acting on the element i and at time increment j, and hi is the length of element i Figure 5 compares the point of application of total dynamic force together with point of application of static force calculated at the end of the construction of the wall. The point of application of static force (0.295%) calculated was below the value (0.33%) calculated using triangular stress distribution along the height, because the stresses below the point of rotation of wall had very large passive stresses. Further, the points of application of dynamic forces for lower levels of shaking show a scatter around 0.25% (H/4), but for larger level of shaking it showed big range of deviation. Figure 5. Point of application of total active dynamic force on sheet pile wall 7. Summary and Conclusions This paper illustrates a preliminary investigation onto the seismic behaviour of flexible sheet pile wall, retaining a dry granular backfill. A finite element model of the system is built using DIANA finite element program. For the soil surrounding the sheet pile was modelled as elasto-plastic material with Mohr-Coulomb failure criterion. The results from this study show that using the Mononobe-Okabe equation to design the sheet pile wall will provide good estimate for dynamic stresses on the active side. Conversely, it will overestimate dynamic stresses in the passive side. Further, the point of application of total dynamic forces in active side is below the point of application of static forces, around 0.25H, because of the large passive pressure beyond the point of rotation of the wall. The conclusions drawn from this study may not apply to retaining wall system of differing geometry and/or material properties. Further research is required to draw more general conclusions regarding the appropriateness of the Mononobe-Okabe method to evaluate the dynamic pressure induced under seismic conditions on the sheet pipe walls. References 1. Mononobe, N., and Matuo, H, 1929, On the determination of earth pressures during earthquakes, Proc. World Engrg, Congr., Tokyo, Japan, vol.9, paper no.388. 2. Steedman, R.S., and Zeng, X, 1990, The influence of phase on the calculation of pseudo-static earth pressure on a retaining wall, Geotechnique, 40 (1), 103-112, 3. Richard, R., and Elms, D.G., 1979, Seismic behavior of gravity retaining walls, J.Geotec Engrg., ASCE, 105 (GT4).Hassiotis, S., Khodair, Y., Roman, E., Dehne, Y., 2006, Lateral Earth Pressure Behind Integral Abutment Walls, Evaluation of Integral Abutments, Vol. 1, pg 113-126. 4. DIANA finite element analysis User’s manual Release 9 TNO DIANA BV. 5. Okabe, S., 1924, General theory of earth pressure and seismic stability of retaining wall and dam, J.Japan Soc. Civ Engrs, Tokyo, Japan, 12(1). 6. Nason J. McCullough, and. Dickenson, S. E., 1998, Estimation of seismically induced lateral deformations for anchored sheetpile bulkheads, Conference proceedings of Geotechnical Earthquake Engineering and Soil Dynamics III, August 3-6, 1998, Seattle, WA, USA. pp 1095-1106. 7. Prakash, S., and Basavanna, B. M., 1969, Earth pressure distribution behind retaining wall during th earthquake, Proc., 4 world Conf. on Earthquake Engrg, Satiago, Chile. 8. Seed, H.B., and Whitman, R.V., 1970, Design of earth retaining structures for dynamic loads, ASCE Spec.Conf. Lateral Stresses in the ground and design of retaining structures,Cornell,pp 103-147. 9. Whitman, R, V., 1990, Seismic design and behavior of gravity retaining walls, Proc., Spec. Conf. on Des. And Constr. Of Earth Retaining Struct., ASCE, New York, N.Y., 817-842. 10. Kuhlemeyer, R. L., and Lysmer, J., 1973, Finite Element Method Accuracy for Wave Propagation Problems, Journal of the Soil Mechanics and Foundations Division , ASCE, Vol. 99 , No. SM5 , Proc. Paper 9703, May, 1973, pp. 421–427.93q J. Soil Mech. and Found. Div. 11. Green, R.A., and Ebeling, R.M., 2002, Seismic analysis of cantilever retaining walls, Phase I, ERDC/ITL TR-02-3, Information technology laboratory, US army corps of engineers, Engineer research and development center, Vicksburg, MS, 2002. 12. Rajeev., 2007, Numerical modeling of seismic behaviour of earth-retaining walls, M.Sc thesis, ROSE School, University of Pavia, Italy. 13. Wood, J. H., 1973, Earthquake-induced soil pressures on structures, Rep. EERL 73-05, Earthquake Engineering Research Laboratory, California Inst. of Technol., Pasadena, Calif.
5cs.CE
Simplified Gating in Long Short-term Memory (LSTM) Recurrent Neural Networks Yuzhen Lu and Fathi M. Salem Circuits, Systems, and Neural Networks (CSANN) Lab Department of Biosystems and Agricultural Engineering || Department of Electrical and Computer Engineering Michigan State University East Lansing, Michigan 48824, USA Abstract – The standard LSTM recurrent neural networks while very powerful in long-range dependency sequence applications have highly complex structure and relatively large (adaptive) parameters. In this work, we present empirical comparison between the standard LSTM recurrent neural network architecture and three new parameter-reduced variants obtained by eliminating combinations of the input signal, bias, and hidden unit signals from individual gating signals. The experiments on two sequence datasets show that the three new variants, called simply as LSTM1, LSTM2, and LSTM3, can achieve comparable performance to the standard LSTM model with less (adaptive) parameters. Index Terms – Recurrent Neural Networks (RNN), Long Short-term Memory (LSTM), Stochastic Gradient Descent I. INTRODUCTION Recurrent neural networks (RNN) have recently shown great promise in tackling various sequence modeling tasks in machine learning, such as automatic speech recognition [1-2], language translation [3-4], and generation of language descriptions for images [5-6]. Simple RNNs, however, are difficult to train using the stochastic gradient decent and have been reported to exhibit the so-called “vanishing” gradient and/or “exploding” gradient phenomena [7-8]. This has limited the ability of simple RNN to learn sequences with relatively long dependencies. To address this limitation, researchers have developed a number of techniques in network architectures and optimization algorithms [9-11], among which the most successful in applications is the Long Short-term Memory (LSTM) units in RNN [9, 12]. A LSTM unit utilizes a “memory” cell that may maintain its state value over a long time, and a gating mechanism that contains three non-linear gates, namely, an input, an output and a forget gate. The gates’ intended role is to regulate the flow of signals into and out of the cell, in order to be effective in regulating long-range dependencies and achieve successful RNN training. Since the inception of the LSTM unit, many modifications have been introduced to improve performance. Gers et al. [13] have introduced “peephole” connections to the LSTM unit that connects the memory cell to the gates so as to infer precise timing of the outputs. Sak et al. [14-15] introduced two recurrent and non-recurrent projection layers between the LSTM units layer and the output layer, which resulted in significantly improved performance in a large vocabulary speech recognition task. Adding more components in the LSTM units architecture, however, may complicate the learning process and hinder understanding of the role of individual components. Recently, researchers proposed a number of simplified variants of the LSTM-based RNN. Cho et al. [3] proposed a two-gate related architecture, called Gated Recurrent Unit (GRU) RNN, in which the input, forget, and output gates are replaced by an update gate and a reset gate. Chung et al. [16] presented performance comparisons between LSTM and GRU RNNs, and observed that the latter performed comparably or even exceeded the former on the specific dataset used. These conclusions, however, still are being further evaluated using more experiments and over broader datasets. In exploring eight architectural variants of the LSTM RNN, Greff et al. [17] found that coupling the input and forget gates, as in the GRU model, and removing peephole connections, did not significantly impair performance. Furthermore, they report that the forget gate and the output activation are critical components. These findings were corroborated by the work of Jozefowicz et al. [18] who evaluated an extensive architectural designs of ten thousand different RNNs. In [18], the authors observed that the output gate was the least important compared to the input and forget gates, and suggested adding a bias of 1 to the forget gate to improve the performance of the LSTM RNN. Zhou et al. [19] proposed a Minimal Gate Unit (MGU), which has a minimum of one gate, namely, the forget gate architecture, created by merging the update and reset gates in the GRU model. Through evaluations on four different sequence data, the authors found that an RNN with the fewer parameters MGU model was at par with the GRU model in terms of (testing) accuracy. The authors, however, did not explicitly perform comparisons against the standard LSTM RNN. Recently, Salem [20] introduced a simple approach to simplifying the standard LSTM model focusing only on the gating signal generation. The gating signals can be used as general control signals to be specified by minimizing the loss function/criterion. Specifically, all three gating equations were retained but their parameters were reduced by eliminating one or more of the signals driving the gates. For simplicity, we shall call these three variants, LSTM1, LSTM2, and LSTM3 and will be detailed in section III below. The paper presents a comparative evaluation of the standard LSTM RNN model with three new LSTM model variants. The evaluation and test results have been demonstrated on two public datasets which reveal that the LSTM model variants are comparable to the standard LSTM RNN model in testing accuracy performance. We remark that these are initial tests and further evaluations and comparisons need to be conducted among the standard LSTM RNN and the three LSTM variants. The remainder of the paper is organized as follows. Section II specifies the standard LSTM RNN architecture with its three gating signals. Section III describes the three LSTM variants, called LSTM1, LSTM2, and LSTM3, respectively. Section IV presents the experiments considered in this study. Section V details the comparative performance results. Finally, section VI summarizes the main conclusions. eqn (6)]. The gates in fact replicate the parameters in the cell. It is observed that the gates serve as control signals and the forms in eqns (1)-(3) are redundant [20]. Here, three simplifications to the standard LSTM result in three LSTM variants we refer to them here as simply, LSTM1, LSTM2, and LSTM3. There variants are obtained by removing signals, and associated parameters in the gating eqns (1)-(3). For uniformity and simplicity, we apply the changes to all the gates identically: 1) The LSTM1 model: No Input Signal Here the input signal and its associated parameter matrix are removed from the gating signals (1)-(3). We thus obtain the new gating equations: II. THE RNN LSTM ARCHITECTURE The LSTM architecture considered here is similar to that in Graves et al. [2, 16-19] but without peep-hole connections. It is referred to as the standard LSTM architecture and will be used for comparison with its simplified LSTM variants [20]. The (dynamic) equations for the LSTM memory blocks are given as follows: it = σ (U i ht −1 + Wi xt + bi ) (1) it = σ (U i ht −1 + bi ) (7) ft = σ (U f ht −1 + b f ) (8) ot = σ (U o ht −1 + bo ) (9) 2) The LSTM2 model: No Input Signal and No Bias ft = σ (U f ht −1 + W f xt + b f ) (2) ot = σ (U o ht −1 + Wo xt + bo ) (3) ct = f t ∗ ct −1 + it ∗ tanh(U c ht −1 + Wc xt + bc ) (4) it = σ (U i ht −1 ) (10) ht = ot ∗ tanh(ct ) (5) ft = σ (U f ht −1 ) (11) ot = σ (U o ht −1 ) (12) In these equations, the (n-d vectors) it , f t and ot are the input gate, forget gate, output gate at time t, eqns (1)-(3). Note that these gate signals include the logistic nonlinearity, , and thus their signals ranges is between 0 and 1. The n-d cell state vector,  , and its n-d activation hidden unit, ℎ , at the current time t, are in eqns (4)-(5). The input vector,  , is an m-d vector, tanh is the hyperbolic tangent function, and * in eqns (4)-(5), denotes a point-wise (Hadamard) multiplication operator. Note that the gates, cell and activation all have the same dimension (n). The parameters of the LSTM model are the matrices (∗ , ∗ ) and biases ( ∗ ) in eqns (1)-(5). The total number of parameters (i.e., the number of all the elements in W∗ , U ∗ and b∗ ), say N , for the standard LSTM, can be calculated to be (6) N = 4 × ( m × n + n 2 + n) where, again, m is the input dimension, and n is the cell dimension. This constitutes a four-fold increase in parameters in comparison to the simple RNN [16-20]. The gating signals contain only the hidden activation unit in all three gates, identically. 3) The LSTM3 model: No Input Signal and No Hidden Unit Signal The gating signals contain only the bias term. Note that, as the bias is adaptive during training, it will include information about the state via the backpropagation learning algorithms or the co-state [24]. it = σ (bi ) (13) ft = σ (b f ) (14) ot = σ (bo ) (15) Compared to the standard LSTM, it can be seen that the three variants results in 3mn , 3(mn + n) and 3( mn + n 2 ) fewer parameters, respectively, and consequently, reducing the computational expense. III. THE RNN LSTM VARIANTS IV. EXPERIMENTS While the LSTM model has demonstrated impressive performance in applications involving sequence-to-sequence relationships, a criticism of the standard LSTM resides in its relatively complex model structure with 3 gating signals and the number of its relatively large number of parameters [see The effectiveness of the three proposed variants were evaluated using two public datasets, MNIST and IMDB. The focus here is to demonstrate the comparative performance of the standard LSTM RNN and the variants rather than to achieve state-of-the-art results. Only the standard LSTM RNN [2, 16-19] was used as a base-line model and compared with its three variants. A. Experiments on the MNIST dataset: This dataset contains 60,000 training set and 10,000 testing set of handwritten images of the digits (0-9). The training set contains the labelled class of the image available for training. Each image has the size of 28×28 pixels. The image data were pre-processed to have zero mean and unit variance. As in the work of Zhou et al. [19], the dataset was organized in two manners to be the input of an LSTM-based network. The first was to reshape each image as a onedimensional vector with pixels scanned row by row, from the top left corner to the bottom right corner. This results in a long sequence input of length 784. The second requires no image reshaping but treated each row of an image as a vector input, thus giving a much shorter input sequence of length 28. The two types of data organization were referred to as pixel-wise and row-wise sequence inputs, respectively. It is noted that the pixel-wise sequence is more time consuming in training. In the two training tasks, 100 hidden units and 100 training epochs were used for the pixel-wise sequencing input, while 50 hidden units and 200 training epochs were used for the row-wise sequencing input. Other network settings were kept the same throughout, including the batch size set to 32, RMSprop optimizer, cross-entropy loss, dynamic learning rate (η) and early stopping strategies. In particular, for the learning rate, it was set to be an exponential function of training loss to speed up training, specifically, η= η0×exp(C), where η0 is a constant coefficient, and C is the training loss. For the pixelwise sequence, two learning rate coefficients η0=1e-3 and 1e-4 were considered as it takes relatively long time to train, while for the row-wise sequence, four η0 values of 1e-2, 1e-3, 1e-4 and 1e-5 were considered. The dynamic learning rate is thus directly related to the training performance. At the initial stage, the training loss is typically large, thus resulting in a large learning rate (η), which in turn increases the stepping of the gradient further from the present parameter location. The learning rate decreases only as the loss functions decreases towards lower loss level and eventually towards an acceptable minima in the parameter space. Thus was found to achieve faster convergence to an acceptable solution. For the early stopping criterion, the training process would be terminated if there was no improvement on the test data over consecutive epochs, in our case we chose 25 epochs. B. Experiments on the IMDB dataset: This dataset consists of 50,000 movie reviews from IMDB, which have been labelled into two classes according to (the reviews) sentiment, positive or negative. Both training and test sets contain 25,000 reviews. These reviews are encoded as a sequence of word indices based on the overall frequency in the dataset. The maximum sequence length was set to 80 among the top 20,000 most common words (longer sequences were truncated while shorter ones were zero-padded at the end). Referring to an example in the Library Keras [21], an embedding layer with the output dimension of 128 was added as an input to the LSTM layer that contained 128 hidden units. The dropout technique [22] was implemented to randomly zero 20% of signals in the embedding layer and 20% of rows in the weight matrices (i.e., U and W) in the LSTM layer. The model was trained for 100 epochs. Other settings remained the same as those in the MNIST data. Training LSTMs for the two datasets were implemented by using the Keras package in conjunction with the Theano library (the implementation code and results are available at: https://github.com/jingweimo/Modified-LSTM). V. RESULTS AND DISCUSSION A. The MNIST dataset: Table I summarizes the accuracies on the test dataset for the pixel-wise sequence. At η0=1e-3, the standard LSTM produced the highest accuracy, while at η0=1e-4, both LSTM1 and LSTM2 achieved accuracies slightly higher than that by the standard LSTM. LSTM3 performed the worst in both cases. TABLE I THE BEST ACCURACIES OF DIFFERENT LSTM NETWORKS ON THE TEST SET AND CORRESPONDING PARAMETER SIZES OF THE LSTM LAYERS Learning coefficient (η0) LSTMs #Params 1e-3 1e-4 Standard 0.9857 0.9727 40,800 LSTM1 0.9609 0.9799 40,500 LSTM2 0.7519 0.9745 40,200 LSTM3 0.4239 0.5696 10,500 Examining the training curves revealed the importance of η0 and the different responses of the LSTMs. As shown in Fig. 1, the standard LSTM performed well in the two cases; while LSTM1 and LSTM2 performed similarly poorly at η0=1e-3, where both suffered serious fluctuations at beginning and dramatically lowered accuracies at the end. However, decreasing η0 to 1e-4 circumvented the problem fairly well for LSTM1 and LSTM2. For LSTM3, both η0=1e-3 and 1e-4 could not achieve successful training because of the fluctuation issue, suggesting that η0 should be decreased further. As shown in Fig. 2 where 200 training epochs were executed, choosing η0=1e-5 provided a steadily increasing accuracy with the highest test accuracy of 0.7404. Despite the accuracy that was still lower than other LSTMs variants. It is expected that the LSTM3 would achieve higher accuracies if longer training time was allowed. In essence LSTM3 has the lowest parameters but needs more training execution epochs to improve (testing) accuracy. The fluctuation phenomenon observed above is a typical issue caused by a large learning rate, and is likely due to numerical instability where the (stochastic) gradient can no longer be approximated, and it can readily be resolved by decreasing the learning coefficient-- however, at the price of slowing down training. From the results, the standard LSTM seemed more resistant to fluctuations in modeling longsequence data than the three variants, more likely due to the suitability of the learning rate coefficient. LSTM3 was the most susceptible to the fluctuation issue, however, and it requires a lower coefficient. Its optimal coefficient in this study appears to be between η0=1e-5 and η0=1e-4. Thus, further investigation may lead to benefits of using the LSTM3 to reap the benefit of its dramatically reduced model parameters (see Table I). Overall, these findings have showed that the three LSTM variants were capable of handling a long-range dependencies sequence comparable to the standard LSTM. Due attention should be paid to tuning the learning rate to achieve higher accuracies. TABLE II THE BEST ACCURACIES OF DIFFERENT LSTM NETWORKS VARIANTS ON THE TEST SET AND THEIR CORRESPONDING PARAMETER SIZES LSTMs Standard LSTM1 LSTM2 LSTM3 Learning rate coefficient (η0) 1e-2 1e-3 1e-4 1e-5 0.9506 0.9816 0.9756 0.9555 0.9820 0.9821 0.9730 0.9580 0.9828 0.9799 0.9723 0.9580 0.9691 0.9762 0.9700 0.9399 # Params 15,800 11,600 11,450 4,100 Among the four η0 values, the η0=1e-3 gave the best results for all the LSTMs except LSTM2 that performed the best at η0 =1e-2. Fig. 3 shows the corresponding learning curves at η0=1e-3. All the LSTMs exhibited similar training pattern profiles, which demonstrated the efficacy of the three LSTM variants. Fig. 1 Accuracies vs. epochs on the train/test datasets obtained by the standard LSTM (top), LSTM1 (middle) and LSTM2 (bottom), with the learning rate coefficients η0 = 1e-3 (left) and η0 = 1e-4 (right). The difference in epochs is due to the response to the implemented early stopping criterion. Fig. 3 Accuracies vs. epochs on the train/test dataset obtained by the standard LSTM (a), LSTM1 (b), LSTM2 (c) and LSTM3 (d) with the learning rate coefficient η0 = 1e-3 . The difference in epochs is due to the response to the early stopping criterion. From the results of the pixel-wise (long) and row-wise (short) sequence data, it is noted that the three LSTM variants, especially LSTM3, performed closely similar to the standard LSTM in handling the short sequence data. Fig. 2 Accuracies vs. epochs on the train/test datasets obtained by the LSTM3 with the learning rate coefficients η0 = 1e-4 (left) and η0 = 1e-5 (right). The difference in epochs is due to the response to the early stopping criterion. Compared to the pixel-wise sequence of length 784, the row-wise sequence form is 28 in length and was much easier (and faster) to train. Table II summarizes the results. All the LSTMs achieved high accuracies at four different η0. The standard LSTM, LSTM1 and LSTM2 performed similarly, where they all slightly outperformed the LSTM3. No fluctuation issues were encountered in all the cases. These experiments have used networks with 50 hidden units. B. The IMDB dataset: For this dataset, the input sequence from the embedding layer to the LSTM layer is of the intermediate length 128. Table III lists the testing results for various learning coefficients. The standard LSTM and the three variants have show similar accuracies, except that LSTM1 and LSTM2 show slightly lower performance at η0 =1e-2. Similar to the row-wise MNIST sequence case study, no noticeable fluctuations have been observed for any of the four values of η0. TABLE III THE BEST ACCURACIES OF DIFFERENT LSTM NETWORKS ON THE TEST SET AND CORRESPONDING PARAMETER SIZES OF THE LSTM LAYERS Learning rate coefficient (η0) # Params LSTMs 1e-2 1e-3 1e-4 1e-5 Standard 0.8467 0.8524 0.8543 0.8552 131,584 LSTM1 0.7772 0.8542 0.8532 0.8550 82,432 LSTM2 0.7912 0.8512 0.8506 0.8510 82,048 LSTM3 0.8279 0.8348 0.8529 0.8548 33,280 The case for η0=1e-5, consistently produced the best results for all the LSTMs and exhibited very similar training/testing profile curves as depicted in Fig. 4. Fig. 4 Accuracies against epochs on the test dataset obtained by the standard LSTM (a), LSTM1 (b), LSTM2 (c) and LSTM3 (d) with the learning rate coefficient η0 = 1e-5 . The main benefit of the three LSTM variants is to reduce the number of parameters involved, and thus reduce the computation expense. This has been confirmed from the experiments and as summarized in the three tables above. The LSTM1 and LSTM2 show small difference in the number of parameters and both contain the hidden unit signal in their gates, which explains their similar performance. The LSTM3 has dramatically reduced parameters size since it only uses the bias, an indirectly contained delayed version of the hidden unit signal via the gradient descent update equations. This may explain their relative lagging performance, especially in long sequences. The actual reduction of parameters is dependent on the structure (i.e., dimension) of input sequences and the number of hidden units in the LSTM layer. VI. CONCLUSIONS In this paper, three simplified LSTMs that were defined by eliminating input signal, bias and/or hidden units from their the gate signals in the standard LSTM RNN, were evaluated on the tasks of modeling sequence data of varied lengths. The results confirmed the utility of the three LSTM variants with reduced parameters, which at proper learning rates were capable of achieving the performance comparable to the standard LSTM model. This work represents a preliminary study, and further work is needed to evaluate the three LSTM variants on more extensive datasets of varied sequence length. REFERENCES [1] A. Graves, Supervised Sequence Labelling with Recurrent Neural Networks, Berlin, Heidelbergz: Springer-Verlag, 2012. [2] A. Graves, “Speech recognition with deep recurrent networks,” in Acoustics, Speech and Signal Processing (ICASSP), 2013 IEEE International Conference on, 2013, pp. 6645-6649. [3] K. Cho, B. van Merienboer, C. Gulcehre, D. Bahdanau, F. Bougares, H. Schwenk, and Y. Bengio, “Learning phrase representations using RNN encoder-decoder for statistical machine translation,” in Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing, Association for Computational Linguistics, 2014, pp. 1724-1734. [4] I. Sutskever, O. Vinyals, and Q. V. Le, “Sequence to sequence learning with neural networks,” in Proceedings of Advances in Neural Information Processing Systems 27, NIPS, 2014, pp. 3104–3112, 2014. [5] A. Karpathy, F. F. Li, “Deep visual-semantic alignments for generating image descriptions,” in Proceedings of IEEE International Conference on Computer Vision and Pattern Recognition, IEEE, 2015, pp. 3128-3137. [6] K. Xu, J. L. Ba, R. Kiros, K. Cho, A. Courville, R. Salakhudinov, R. S. Zemel, and Y. Bengio. “Show, attend and tell: Neural image caption generation with visual attention,” in Proceedings of the 32nd International Conference on Machine Learning, 2015, vol. 37, pp. 2048-2057. [7] Y. Bengio, P. Simard, and P. Frasconi, “Learning long-term dependencies with gradient descent is difficult,” IEEE Transactions on Neural Networks, vol. 5, no. 2, pp. 157–166, 1994. [8] R. Pascanu, T. Mikolov, and Y, Bengio, “On the difficulty of training recurrent neural networks,” in Proceedings of the 30th International Conference on Ma-chine Learning, 2013. JMLR: W&CP volume 28. [9] S. Hochreiter, J. Schmidhuber. “Long short-term memory,” Neural Computation, vol. 9, no. 8, pp. 1735–1780, 1997. [10] Q.V. Le, N. Jaitly, G.E. Hinton, “A simple way to initialize recurrent networks of rectified linear units.” arXiv preprint arXiv: 1504.00941, 2015. [11] J. Martens and I. Sutskever, “Training deep and recurrent neural networks with Hessian-Free optimization.” Neural Networks: Tricks of the Trade, Springer, 2012, pp. pp 479-535. [12] F. A. Gers, J. Schmidhuber, and F. Cummins. “Learning to forget: Continual prediction with LSTM.” in Proceedings of the 9th International Conference on Artificial Neural Networks, IEEE, 1999, vol. 2, pp. 850855. [13] F. A. Gers, N. N. Schraudolph, and J. Schmidhuber. “Learning precise timing with LSTM recurrent networks,” Journal of Machine Learning Research, vol. 3, pp. 115-143, 2003. [14] H. Sak, A. Senior, and F. Beaufays, “Long short-term memory recurrent neural network architectures for large scale acoustic modeling.” ISCA, pp. 338-342, 2014. [15] H. Sak, A. Senior, and F. Beaufays, “Long short-term memory based recurrent neural network architectures for large vocabulary speech recognition,” ArXiv e-prints, 2014. [16] J. Chung, C. Gulcehre, K. Cho, and Y. Bengio. “Empirical evaluation of gated recurrent neural networks on sequence modeling,” arXiv: 1412.3555, 2014. [17] K. Greff, R. K. Srivastava, J. Koutnk, B. R. Steunebrink, and J. Schmidhuber. “LSTM: a search space odyssey,” arXiv: 1503.04069, 2015. [18] R. Jozefowicz, W. Zaremba, and I. Sutskever. “An empirical exploration of recurrent network architectures,” in Proceedings of the 32nd International Conference on Machine Learning, 2015, vol. 37, pp. 23422350, 2015. [19] G.B. Zhou, J. Wu, C.L. Zhang, Z.H. Zhou, “Minimal gated unit for recurrent neural networks,” International Journal of Automation and Computing, pp. 226-234, 2016. [20] F. Salem, `“Reduced Parameterization in Gated Recurrent Neural Networks,” Memorandum 7.11.2016, MSU, Nov 2016. [21] https://github.com/fchollet/keras/blob/master/examples/imdb_lstm.py. [22] W. Zaremba, I. Sutskever, and O. Vinyals, “Recurrent neural network regularization,” arXiv preprint arXiv: 1409.2329, 2014. [23] G. Hinton, N. Srivastava, and K. Swersky. 2012. “Lecture 6a Overview of mini-batch gradient descent,” Coursera Lecture slides. [24] F. Salem, “A Basic Recurrent Neural Network Model,” arXiv. Preprint arXiv: 1612.09022, Dec. 2016.
9cs.NE
Fast Genetic Algorithms Benjamin Doerr∗ Huu Phuoc Le† Régis Makhmara‡ Ta Duy Nguyen§ arXiv:1703.03334v2 [cs.NE] 15 Mar 2017 March 16, 2017 Abstract For genetic algorithms using a bit-string representation of length n, the general recommendation is to take 1/n as mutation rate. In this work, we discuss whether this is really justified for multimodal functions. Taking jump functions and the (1 + 1) evolutionary algorithm as the simplest example, we observe that larger mutation rates give significantly better runtimes. For the Jumpm,n function, any mutation rate between 2/n and m/n leads to a speed-up at least exponential in m compared to the standard choice. The asymptotically best runtime, obtained from using the mutation rate m/n and leading to a speed-up super-exponential in m, is very sensitive to small changes of the mutation rate. Any deviation by a small (1 ± ε) factor leads to a slow-down exponential in m. Consequently, any fixed mutation rate gives strongly sub-optimal results for most jump functions. Building on this observation, we propose to use a random mutation rate α/n, where α is chosen from a power-law distribution. We prove that the (1 + 1) EA with this heavy-tailed mutation rate optimizes any Jumpm,n function in a time that is only a small polynomial (in m) factor above the one stemming from the optimal rate for this m. Our heavy-tailed mutation operator yields similar speed-ups (over the best known performance guarantees) for the vertex cover problem in bipartite graphs and the matching problem in general graphs. Following the example of fast simulated annealing, fast evolution strategies, and fast evolutionary programming, we propose to call genetic algorithms using a heavy-tailed mutation operator fast genetic algorithms. ∗ Laboratoire d’Informatique, École Polytechnique, Palaiseau, France, email: [email protected] † École Polytechnique, Palaiseau, France ‡ Laboratoire d’Informatique, École Polytechnique, Palaiseau, France § École Polytechnique, Palaiseau, France 1 1 Introduction One of the basic variation operators in evolutionary algorithmics is mutation, which is generally understood as a mild modification of a single parent individual. When using a bit-string representation, the most common mutation operator is standard-bit mutation, which flips each bit of the parent bit-string x ∈ {0, 1}n independently with some probability pn . The general recommendation is to use a mutation rate of pn = 1/n. The expected number of bits parent and offspring differ in then is one. pn = 1/n is also the mutation rate which maximizes the probability to create as offspring a Hamming neighbor y of the parent x, that is, y differs from x in exactly one bit. This mutation rate also gives the asymptotically optimal expected optimization times for several simple evolutionary algorithms on classic simple test problems (see Subsection 2 for the details). In this work, we argue that the 1/n recommendation could be the result of an over-fitting to these simple unimodal test problems. As a first indication for this, we determine the optimal mutation rate for optimizing jump functions, which were introduced in [DJW02]. The function Jumpm,n , m ≥ 2, differs from the simple unimodal OneMax function (counting the number of ones in the bit-string) in that the fitness on last m − 1 suboptimal fitness levels is replaced by a very small value. Consequently, an elitist algorithm quickly finds a search point on the thin plateau of local optima, but then needs to flip m bits to jump over the fitness valley to the global optimum. Denote by Tp (m, n) the expected optimization time (number of search points evaluated until the optimum is found) of the (1 + 1) evolutionary algorithm (EA) with mutation rate p on the function Jumpm,n . Extending the result of [DJW02] to arbitrary mutation rates, we observe that for all m = o(n), the classic choice of the mutation rate gives an expected optimization time of T1/n (m, n) = (1 + o(1))enm , where as the choice of pn = m/n leads to an expected optimization time of  e m m Tm/n (m, n) = (1 + o(1)) m n , an improvement super-exponential in m. This is optimal apart from lower order terms, that is, Topt (m, n) := min{Tp (m, n) | p ∈ [0, 1/2]} satisfies Topt = (1 + o(1))Tm/n . This large runtime improvement by choosing an uncommonly large mutation rate may be surprising, but as our proofs reveal there is a good reason for it. It is true that raising the mutation rate from 1/n to m/n decreases the rate of 1-bit flips from roughly 1/e to roughly me−m . However, finding a particular Hamming neighbor is much easier than finding the required distance-m search point. Consequently, the factor me−m slow-down of the 2 roughly n/2 one-bit improvements occurring in a typical optimization process is significantly outnumbered by the factor mm e−m speep-up of finding the m-bit jump to the global optimum. These observations suggest that the traditional choice of the mutation rate, leading to a maximal rate of 1-bit flips, is not ideal. Instead, one should rather optimize the mutation rate with the aim of maximizing the rate of the largest required long-distance jump in the search space. Continuing with the example of the jump functions, however, we also observe that small deviations from the optimal rate lead to significant performance losses. When optimizing the function Jumpm,n with a mutation rate that differs from m/n by a small constant factor in either direction, the expected optimization becomes larger than Tm/n (m, n) ≈ Topt (m, n) by a factor exponential in m. Consequently, there is no good one-size-fits-all mutation rate and finding a good mutation rate for an unknown multimodal problem requires a deep understanding of the fitness landscape. Based on these insights, we propose to use standard-bit mutation not with a fixed rate, but with a rate chosen randomly according to a heavytailed distribution. Such a distribution ensures that the number of bits flipped is not strongly concentrated around its mean, which eases having jumps of all sizes in the search space. More precisely, the heavy-tailed mutation operator we propose first chooses a number α ∈ [1..n/2] according to a power-law distribution Dnβ with (negative) exponent β > 1 and then creates the offspring via standard-bit mutation with rate α/n. This mutation operator shares many desirable properties with the classic operator. For example, the probability that a single bit (or any other constant number of bits) is flipped is constant. This implies that many classic runtime results hold for our new mutation operator as well. Also, any search point can be created from any parent with positive probability. This probability, however, in the worst case is much higher than when using the classic mutation operator. Consequently, the (tight) general O(nn ) runtime bound for the (1 + 1) EA optimizing any pseudo-Boolean function with unique optimum [DJW02] improves to O(nβ 2n ). For our main example for a multimodal landscape, the jump functions, we prove that the (1 + 1) EA with our heavy-tailed mutation operator finds the optimum of any function Jumpm,n with m > β − 1 in expected time  e m m TDβ (m, n) ≤ O(mβ−0.5 (1 + o(1)) m n ), n which is again an improvement super-exponential in m over the classic runtime T1/n (m, n), and only a small polynomial factor of O(mβ−0.5 ) slower than Topt (m, n), the expected runtime stemming from the mutation rate which is optimal for this m. Note that in return for this small polynomial factor loss over the best instance specific mutation rate we obtained a single mutation operator that achieves a near-optimal (apart from this small 3 polynomial factor) performance on all instances. Note further that the restriction m > β − 1 is automatically fulfilled when using a β < 3, which is both a good choice from the view-point of heavy-tailed distributions and in the light of the O(mβ−0.5 ) slow-down factor. We observe that a small polynomial factor slow-down cannot be avoided when aiming at a competitive performance on all instances. We prove a lower bound result showing that no randomized choice D of the mutation rate can give a performance of TD (m, n) = O(m0.5 Topt (m, n)) for all m. Consequently, by choosing β close to 1 we get the essentially the theoretically best performance on all jump functions. Some elementary experiments show that the above runtime improvements are visible already from small problem sizes on. For m = 8, the (1 + 1) EA using the heavy-tailed operator with β = 1.5 was faster than classic choice by a factor of at least 2000 on each instance size n ∈ {20, 30, . . . , 150}. The very precise results above are made possible by regarding the clean test example of the jump functions. However, we observe a similar behavior for two combinatorial optimization problems regarded in the evolutionary computation literature before. One is the problem of computing a minimum vertex cover in complete bipartite graphs. If the partition classes have sizes m and n − m, then the (1 + 1) EA with mutation rate 1/n has an expected optimization time of at least Ω(mnm−1 ) [FHH+ 10]. With our heavy-tailed mutation operator, the optimization time drops to O(nβ 2m ) for all instance with m ≤ n/3. Note that for larger values, our general bound of O(nβ 2n ) also gives a significant improvement over the classic result, though this is maybe less interesting as a performance of O(2n ) could be also obtained with random search. As a second combinatorial optimization problem, we regard the problem of computing a large matching in an arbitrary undirected graph. For this problem, it was shown in [GW03, GW04] that the (1 + 1) EA with mutation rate 1/n finds a matching M with cardinality |M | ≥ OP T /(1 + ε) in time O(n2d1/εe ). When using our  heavy-tailed mutation operator, this e m β−0.5 m+1 bound improves to O (1 + o(1)) m m n , where we used shorthand m := 2d1/εe − 1 and the constants implicit in the asymptotic notation are independent of m. Overall, these results indicate that multimodal optimization problems might need mutation operators that move faster through the search space than standard-bit mutation with mutation rate 1/n. A simple way of achieving this goal that in addition works uniformly well over all required jump sizes is the heavy-tailed mutation operators suggested in this work. To the best of our knowledge, this is the first time that a heavy-tailed mutation operator is proposed for discrete evolutionary algorithms. Heavytailed mutation operators have been regarded before in simulated annealing [SH87a, SH87b], evolutionary programming [YLL99], evolution strate4 gies [YL97] and other subfields of evolutionary computation, however, always in continuous search spaces. Since these algorithms were called fast by their inventors, that is, fast simulated annealing, fast evolutionary programming, and fast evolution strategies, for reasons of consistency we shall call genetic algorithms employing such operators fast genetic algorithms, well aware of the fact that this first scientific work regarding heavy-tailed mutation in discrete search spaces does by far not give a complete picture on this approach. The results obtained in this work, however, indicate that this is a promising direction deserving more research efforts. 2 2.1 Related Work Static Mutation Rates For reasons of space, we cannot discuss the whole literature on what is the right way to choose the mutation rate, that is, the expected fraction of the bit positions in which parent and mutation offspring differ. Restricting ourselves to evolutionary algorithms for discrete optimization problems, the long-standing recommendation, based, e.g., on [Bäc93, Müh92] is that a mutation rate of 1/n, that is, flipping in average one bit, is a good choice. A mutation rate of roughly this order of magnitude is used in many experimental works. Nevertheless, in particular in evolutionary algorithms using crossover, the interplay between mutation and crossover may ask for a different choice of the mutation rate. For example, in algorithms using first crossover and then applying mutation to the crossover offspring, a smaller mutation rate can be used to implicitly reduce the mutation probability, that is, the probability that an individual is subject to mutation at all. The (1 + (λ, λ)) GA [DDE15] works best with a higher mutation rate, because it uses crossover with the parent as repair mechanism after the mutation phase. For simple mutation-based algorithms, which are the best object to study the working principles of mutation in isolation, the following results have been proven. For the (1 + 1) EA, it was shown that p = 1/n is asymptotically the unique best mutation rate for the class of all pseudo-Boolean linear functions [Wit13]. For the LeadingOnes test function, a slightly higher rate of approximately 1.59/n is optimal [BDN10]. For the (1 + λ) EA optimizing OneMax, a mutation rate of 1/n is again optimal, though for larger value of λ any Θ(1/n) mutation rate gives an asymptotically optimal runtime [GW15]. 2.2 Dynamic Mutation Rates Since our heavy-tailed mutation operator can be seen as a dynamic choice of the mutation rate (according to a relatively trivial dynamics), let us quickly 5 review the few results close to ours. There is a general belief that a dynamic choice of the mutation rate can be profitable, typically starting with a higher rate and reducing it during the run of the algorithm. Despite this, dynamic choices of the mutation rate are still not that often seen in today’s applied research. On the theory side, the first work [JW05] analyzing a dynamic choice of the mutation strength proposes to take in iteration t the mutation rate 2(t−1) mod (dlog2 ne−1) /n. In other words, the mutation rates 1/n, 2/n, 4/n, ..., 2dlog2 ne−2 /n are used in a cyclic manner. The (1 + 1) EA using this dynamic mutation rate has an expected runtime larger by a factor of Θ(log n) for several classic test problems. On the other hand, there are problems where this dynamic EA has a polynomial runtime, whereas all static choices of the mutation rate lead to an exponential runtime. We remark without proof that these results would also hold if the mutation rate was chosen in each iteration uniformly at random from the set of these powers of two. We note without formal proof that the arguments used in the proof of Theorem 1 together with Corollary 2 show that either version of this dynamic EA would have a runtime of exp(Ω(m))Topt (m, n) on Jumpm,n for most values of m (namely all that are a small constant factor away from the nearest power of two) and all values of n. For the classic test functions, the following is known. In [BDN10], it was shown that the optimal fitness-dependent choice of the mutation rate for 1 the LeadingOnes test function is p(x) = LeadingOnes(x)+1 when the parent is x. For the (1 + 1) EA, this gives an expected optimization time (apart from lower order terms) of 0.68n2 compared to 0.77n2 for the optimal static mutation rate and 0.86n2 for the static choice 1/n. For the optimization of OneMax using the (1 + 1) EA, a dynamic mutation rate is known to give runtime improvements only of lower order. Surprisingly, for the (1 + λ) EA a dynamic choice of the mutation rate can lead to an asymptotically better log λ runtime [BLS14]. The optimization time of O( nλ log + n log n) when log λ nλ using the static mutation rate of 1/n improves to O( log λ + n log n) when ln(λ) using the dynamic choice p(x) = max{ n ln(en/(n−OneMax(x))) , n1 }. We note without formal proof that for jump functions, a fitness-dependent mutation rate cannot give a significant improvement over the best static mutation as can be seen from our analysis in Section 4. 2.3 Heavy-Tailed Mutation Operators The idea to use heavy-tailed mutation operators is not new in evolutionary computation, and more generally, heuristic optimization. However, it was so far restricted to continuous optimization. Szu and Hartley [SH87a, SH87b] suggested to use a (heavy-tailed) Cauchy distribution instead of Gaussian distributions in simulated annealing and report significant speed-ups. This idea was taken up in evolutionary programming [YLL99], in evolution strate- 6 gies [YL97], estimation of distribution algorithms (EDA) [Pos09], and in natural evolution strategies [SGS11]. However, also some doubts on the general usefulness of heavy-tailed mutations have been raised. Based on mathematical considerations and experiments, it has been suggested that heavy-tailed mutations are useful only if the large variations of these operators take place in a low-dimensional subspace and this space contains the good solutions of the problem [HGAK06]. Otherwise, the curse of dimensionality makes it just too improbable that a long-range mutation finds a better solution. Also, [Rud97] has pointed out that spherical Cauchy distributions lead to the same order of local convergences as Gaussian distributions, whereas non-spherical Cauchy distributions even lead to a slower local convergence. A heavy-tailed mutation EDA was shown to be significantly inferior to BIPOP-CMA-ES via the BBOB algorithm comparison tool [Pos10]. 3 Preliminaries Throughout this paper, we use the following elementary notation. For a, b ∈ R, we write [a..b] := {z ∈ Z | a ≤ z ≤ b} to denote the set of integers in the real interval [a, b]. We denote by N the set of positive integers and by N0 the of non-negative integers. For n, m ∈ N0 with m ≤ n, we write   set Pm n n for the number of subsets of an n-element set that have at := i=0 i ≤m most m elements. For two bit-strings x, y ∈ {0, 1}n of length n, we denote by H(x, y) := {i ∈ [1..n] | xi 6= yi } the Hamming distance of x and y. 3.1 Jump Functions In this work, we investigate the influence of the mutation operator on the performance of genetic algorithms optimizing multimodal functions. We restrict ourselves to pseudo-Boolean functions, that is, functions f : {0, 1}n → R defined on bit-strings of a given length n.P As much as the OneMax test function OneMaxn : {0, 1}n → R; x 7→ ni=1 xi is the prime example to study the optimization on easy unimodal fitness landscapes, the most popular test problem for multimodal landscapes are jump functions. For n ∈ N and m ∈ [1..n], Droste, Jansen, and Wegener [DJW02] define the n-dimensional jump function Jumpm,n : {0, 1}n → R by   m + OneMaxn (x) if OneMaxn (x) ≤ n − m Jumpm,n (x) = or OneMaxn (x) = n   n − OneMaxn (x) otherwise for all x ∈ {0, 1}n . In this paper, we are only interested in the case m ∈ [2..n/2] when Jumpm,n does neither degenerate into OneMaxn nor the local optimum encompasses half the search space or more. 7 Figure 1: The function Jumpm,n for n = 50 and m = 10. Jump functions are a useful object to study how well evolutionary algorithms can leave local optima. With the whole radius-m Hamming sphere around the global optimum forming an inferior local optimum of Jumpm,n , it is very hard for an evolutionary algorithm to not get trapped in this local optimum for a while. Due to the symmetry of the landscape, the only way to leave the local optimum to a better solution is to flip exactly the right m bits. This symmetric and well-understood structure with exactly one fitness valley to be crossed in a typical optimization process makes the jump functions a popular object to study how evolutionary algorithms can cope with local optima. Droste et al. [DJW02] show that the (1 + 1) EA (made precise in the following subsection) with mutation rate p = 1/n takes an expected number of T1/n (m, n) = Θ(nm + n log n) fitness evaluations to find the maximum of Jumpm,n . Here and in the following, all asymptotic notation is to be understood that the implicit constants can be chosen independent of n and m. For a broad class of non-elitist algorithms using a mutation rate of c/n, an upper bound of O(nλ log λ + (n/c)m ) was shown in [DL16] for the optimization time on Jumpm,n . Here c is supposed to be a constant. We are not aware of other runtime analyses for mutation-based algorithms optimizing jump functions. The jump functions family has also been an example to study in a rigorous manner the effectiveness of crossover. The first work in this direction [JW05] shows that a simple (µ + 1) genetic algorithm with appropriate parameter settings can obtain a better runtime than mutation-based algorithms. Very roughly speaking, for m = O(log n) this GA has a runtime of O(4m poly(n)), reducing the runtime dependence on m from Θ(nm ) to 8 single-exponential. While this result was the first mathematically supported indication that crossover can be useful in discrete evolutionary optimization, it has, as the authors point out, the limitation that it applies only to a GA that uses crossover very sparingly, namely with probability at most O(1/mn), which is very different from the typical application of crossover. This dependence was mildly improved to O(m/n) along with allowing wider ranges for other parameters in [KST11]. Interestingly, the research activity on the problem of rigorously proving the usefulness of crossover shifted away from jump functions to real royal road functions [SW04, JW05] (which are still similar to jump functions), simplified Ising models [FW05, Sud05], and the all-pairs shortest path problem [DHK12, DJK+ 13]. Only last year, Dang et al. [DFK+ 16b, DFK+ 16a] by carefully analyzing the population dynamics could show that a simple GA employing crossover and using natural parameter settings can obtain an expected optimization time of O(nm−1 log n) on Jumpm,n for constant m ≥ 3, which is an O(n/ log n) factor speed-up over comparably simple mutation-based EAs. 3.2 The (1 + 1) EA To study the working principles of different mutation operators, we regard the most simple evolutionary algorithm, the (1 + 1) evolutionary algorithm (EA). This is a common approach in the theory of evolutionary algorithms, which is based on the experience that results for this simple EA often are valid in a similar manner for more complicated EAs. Without proof, remark that most of our findings in an analogous manner hold for many elitist mutation-based (µ + λ) EAs. The (1 + 1) EA, given as Algorithm 1, starts with a random search point x ∈ {0, 1}n . In the main optimization loop, it creates a mutation offspring from the parent x, which replaces the parent unless is has an inferior fitness. Since our focus is on how long this EA takes to create an optimal solution, we do not specify a termination criterion. Algorithm 1: The (1+1) EA with static mutation rate p for maximizing f : {0, 1}n → R. 1 2 3 4 Initialization: Sample x ∈ {0, 1}n uniformly at random; Optimization: for t = 1, 2, 3, . . . do Sample y ∈ {0, 1}n by flipping each bit in x with probability p ; //mutation step if f (y) ≥ f (x) then x ← y ; //selection step; As usual in theoretically oriented works in evolutionary computation, as performance measure of an evolutionary algorithm we regard the number of fitness evaluations it took to achieve the desired goal. For this reason, 9 we define Tp (m, n) to be the expected number of fitness evaluations the (1 + 1) EA performs when optimizing the Jumpm,n function until it first evaluates the optimal solution. Since using a mutation rate of more than 1/2 is not very natural (it means creating an offspring that in average is further away from the parent than the average search point), we shall always assume that our mutation rate p is in [0, 1/2]. When p depends on the bit-string length n, as, e.g., in the recommended choice p = 1/n, we shall for the ease of reading usually make this functional dependence not explicit (e.g., by writing p(n)), but simply continue to write p. 4 Static Mutation Rates In this section, we analyze the performance of the (1 + 1) EA on jump functions when employing the standard-bit mutation operator that flips each bit independently with fixed probability p ∈ (0, 1/2]. Our main result is that the mutation rate giving the asymptotically best runtime on Jumpm,n functions is p = m/n, which is far from the standard choice of 1/n when m is large. Moreover, we observe that a small constant factor deviation from the m/n mutation rate immediately incurs a runtime increase by a factor exponential in Ω(m). To obtain these results, we first determine (with sufficient precision) the optimization time of the (1 + 1) EA on Jumpm,n functions. Theorem 1. For all n ∈ N, m ∈ [2..n/2] and p ∈ (0, 1/2], the expected optimization time Tp (m, n) of the (1 + 1) EA with mutation rate p on the n-dimensional test problem Jumpm,n satisfies  1− n ≤m−1  2−n  pm (1 In particular, if p ≤ m n, 1 1 2 ln(n/m) ≤ Tp (m, n) ≤ m + . n−m n−m − p) p (1 − p) p(1 − p)n−1 then 1 1 1 ≤ Tp (m, n) ≤ 3 m . m n−m 2 p (1 − p) p (1 − p)n−m −m T Consequently, for any p ∈ [ n2 , m 1/n (m, n)). n ], Tp (m, n) ≤ O(2 Proof. We partition the search space into the nonempty sets Ai = {x ∈ {0, 1}n | kxk1 = i}, 0 ≤ i ≤ n, which we call levels. We first show the more interesting lower bound. Denote by Ei the expected number of iterations it takes to find the optimum when the initial search point is in level Ai . Denote by αi,j the probability that an iteration starting with a search point in level Ai ends (after mutation and selection) with a search point in level Aj . 10 First, we prove by induction that for all 0 ≤ i ≤ n − m, we have Ei ≥ En−m . This inequality trivially holds for i = n − m. Suppose that it holds for all i ∈ [k + 1..n − m]. We prove that it also holds for i = k. We have Ek = 1 + n−m X αk,j Ej . j=k By our induction hypothesis, (1 − αk,k )Ek ≥ 1 +  n−m X  αk,j En−m , j=k+1 and thus Ek ≥ 1 − αk,k − αk,n 1 + En−m . 1 − αk,k 1 − αk,k −1 Note that En−m = (pm (1 − p)n−m ) p ≤ 12 and k ≤ n − m, we have  En−m αk,n = (1) and αk,n = pn−k (1 − p)k . Hence with p 1−p n−m−k ≤ 1. Together with (1), we obtain Ek ≥ En−m . By induction, we conclude that Ei ≥ En−m for all 0 ≤ i ≤ n − m. Let x denote the random initial search point. Then the above estimate yields Tp (m, n) ≥ n−m X  Pr[x ∈ Ai ]Ei ≥ 1 − n ≤m−1   2−n En−m i=0  = 1− n ≤m−1  2−n  pm (1 1 . − p)n−m To prove the upper bound, we use the fitness level method [Weg01]. Note that the Ai are fitness levels of Jumpm,n , however, the order of increasing fitness is An−1 , An−2 ,..., An−m+1 , A0 , A1 , A2 ,..., An−m , An . For i ∈ [0..n−1], let  n−i n−1 if 0 ≤ i ≤ n − m − 1,   1 p(1 − p) si := pm (1 − p)n−m if i = n − m,   i n−1 if n − m + 1 ≤ i ≤ n − 1. 1 p(1 − p) Then si is a lower bound for the probability that an iteration starting with a search point x ∈ Ai ends with a search point of higher fitness. Thus the 11 fitness level theorem gives the following upper bound for Tp (m, n). Tp (m, n) ≤ = n−1 X 1 si i=0 n−m−1 X i=0 1 1 + m + n−1 (n − i)p(1 − p) p (1 − p)n−m n−1 X i=n−m+1 1 ip(1 − p)n−1 1 2 ln(n/m) ≤ m + , n−m p (1 − p) p(1 − p)n−1 where we used the estimate n X i=m+1 1 i + n−1 X 1 i i=n−m+1 ≤2 n X 1 i Z n ≤2 m i=m+1 1 x dx n = 2(ln n − ln m) = 2 ln m . We now show the second, rougher estimate in our claim. Since m ≤ n2 ,  −n n by the symmetry of the binomial distribution, we have 1− ≤m−1 2 ≥ 12 , 1 m and thus Tp (m, n) ≥ 2pm (1−p) n−m . If p ≤ n , then −1  n   p m−1 1 = 2 ln pm (1 − p)n−m m 1−p   m−1 n  n  m  m ≤ 2 ln ≤ 2 ln ≤ 2, m n−m m n−m  n 3 n − 1 ≥ ln m . Therefore, Tp (m, n) ≤ pm (1−p) since m n−m . From this, we easily compute the exponential runtime gain claimed in the m n−m last sentence of the theorem. Let p ∈ [ n2 , m n ]. Using that x 7→ x (1 − x) is increasing in [0, m/n], we compute 2 ln(n/m) p(1 − p)n−1  T2/n (m, n) Tp (m, n) ≤ ≤ 6e2 2−m . T1/n (m, n) T1/n (m, n) From the precise runtime analysis above, we estimate the runtime stemming from the optimal choice for the mutation rate and argue that it can be obtained from using the mutation rate p = m/n, but not from too many other mutation rates. Corollary 2. The best possible optimization time Topt (m, n) := inf{Tp (m, n) | p ∈ [0, 1/2]} for a static mutation rate satisfies  n−m  n−m 1 nm n nm n ≤ T (m, n) ≤ 3 . opt 2 mm n − m mm n − m 12 These bounds also hold for Tm/n (m, n), whereas for all 0 < ε < 1, any mutation rate p ∈ [0, 1/2] \ [(1 − ε)m/n, (1 + ε)m/n] gives a runtime slower than Topt (m, n) by a factor of at least 61 exp(mε2 /5). Proof. For the upper bound, using Theorem 1 we simply estimate  n−m nm n Topt (m, n) ≤ Tm/n (m, n) ≤ 3 m . m n−m For the lower bound, elementary calculus shows that m n is the unique maxm n−m imum point of x 7→ x (1 − x) in the interval [0, 1]. Therefore, by Theorem 1,  n−m 1 nm n ≤ Topt (m, n). 2 mm n − m For 1 2 ≥ p > (1 + ε) m n , we have Tp (m, n) ≥ 2pm (1 1 ≥ − p)n−m 1 2  (1+ε)m n m  1− (1+ε)m n n−m . 2 Hence, since ex ≥ 1 + x + x2 and 1 − x ≤ e−x for all x ∈ R≥0 , we compute  m  n−m (1+ε)m (1+ε)m  n−m 1 − n n 1 Topt (m, n) mε m ≤ = (1 + ε) 1−  n−m m m 6 Tp (m, n) n−m 1− m n n  m  m 1+ε 1+ε ≤ ≤ ε e 1 + ε + ε2 /2  m  m   ε2 /2 ε2 mε2 = 1− ≤ 1− ≤ exp − . 1 + ε + ε2 /2 5 5 2 Therefore, Tp (m, n) ≥ 61 exp( mε 5 )Topt (m, n). 2 3 m Similarly, for q < (1 − ε) n , by using e−x ≥ 1 − x + x2 − x6 valid for all x ∈ R, we obtain  m  n−m (1−ε)m (1−ε)m 1 − n n 1 Topt (m, n) ≤ m n−m m m 6 Tq (m, n) 1− n n  n−m   mε 1−ε m = (1 − ε)m 1 + ≤ n−m e−ε  m  m ε2 /2 − ε3 /6 1−ε ≤ ≤ 1− 1 − ε + ε2 /2 − ε3 /6 1 − ε + ε2 /2 − ε3 /6     m ε2 mε2 ≤ 1− ≤ exp − . 3 3  2 Therefore, Tq (m, n) ≥ 16 exp mε Topt (m, n). 3 13 5 Design and Analysis of Heavy-tailed Mutation Operators In the previous section, we observed that an asymptotically optimal mutation rate for the Jumpm,n function is m/n rather than the general suggestion of 1/n. However, due to the strong concentration of the number of bits that are flipped, we also observed that a small constant factor deviation from this optimal mutation rate incurs a significant increase in the runtime (exponential in m). From the view-point of algorithms design, this suggests that to get a good performance when optimizing multimodal functions, the algorithm designer needs to know beforehand which multi-bit flips will be needed to escape local optima. This is, clearly, an unrealistic assumption for any real-world optimization problem. To overcome this difficulty, we now design a mutation operator such that the number of bits flipped is not strongly concentrated, but instead follows a heavy-tailed distribution, more precisely, a power-law distribution. We prove that the (1 + 1) EA with this operator, which we shall call (1 + 1) FEAβ , optimizes all Jumpm,n functions with a runtime larger than the optimal runtime Topt (m, n) only by a small factor polynomially bounded in m, which is much better than the exponential (in m) performance loss incurred from missing the optimal static mutation rate by a few percent. We also show that such a small polynomial loss is unavoidable when aiming for an algorithm that shows a good performance on all jump functions. Finally, we show that similar performance gains from using a heavy-tailed mutation operator can also be observed with two combinatorial optimization problems, namely the problem of computing small vertex covers in complete bipartite graphs and the problem of computing large matchings in arbitrary graphs. 5.1 The Heavy-tailed Mutation Operator fmutβ The main reason why only a very carefully chosen mutation rate gave nearoptimal results in Corollary 2 is the strong concentration behavior of the binomial distribution. If we flip bits independently with probability m/n, then with high probability the actual number of bits flipped is strongly concentrated around m. The probability that we flip (1−ε)m/n bits and less, or (1+ε)m/n bits and more, at most 2 exp(−ε2 m/3), that is, is exponentially small in m (this follows directly from classic Chernoff bounds, e.g., [AD11, Corollary 1.10 (a) and (c)]). Hence to obtain a good performance on a wider set of jump functions (that is, with parameter m varying at least by small constant factors), we cannot employ standard-bit mutation with a static mutation rate. To overcome the negative effect of strong concentration and at the same time be structurally close to the established way to performing mutation, 14 we propose to use standard-bit mutation with a mutation rate that is chosen randomly in each iteration according to a power-law distribution with (negative) exponent β greater than 1. This keeps the property of standard-bit mutation with probability 1/n that with constant probability a single bit is flipped. This property is important to have a good performance in easy unimodal parts of the search space, and in particular, to easily approach the global optimum once one has entered its basin of attraction. At the same time, the heavy-tailed choice of the mutation rate ensures that with probability Θ(k −β ), exactly k bits are flipped. Hence this event, necessary to leave a local optimum with (k − 1) Hamming ball around it being part of its basin of attraction, is much more likely than when using the classic mutation operator, which flips k bits only with probability k −Θ(k) . To keep the operator and its analysis simple, we only use mutation rates of type α/n with α ∈ [1..n/2]. We show at the end of this section that no random choice of the mutation rate (including continuous ones) can give a performance on jump functions significantly better than the one stemming from our mutation operator, which justifies this restriction to integer values for α. To ease reading, we shall always write n/2 even in cases where an integer is required, e.g., as boundary of the range of a sum. Of course, in all such cases n/2 is to be understood as bn/2c. β The discrete power-law distribution Dn/2 : Let β > 1 be a conβ stant. Then the discrete power-law distribution Dn/2 on [1..n/2] is defined β as follows. If a random variable X follows the distribution Dn/2 , then β Pr[X = α] = (Cn/2 )−1 α−β β for all α ∈ [1..n/2], where the normalization constant is Cn/2 := Pn/2 −β . i=1 i β Note that Cn/2 is asymptotically equal to ζ(β), the Riemann zeta function ζ evaluated at β. We have β  n −β+1 β ζ(β) − ≤ Cn/2 ≤ ζ(β) β−1 2 for all β > 1. As orientation, e.g., ζ(1.5) ≈ 2.612, ζ(2) ≈ 1.645, and ζ(3) = 1.202 are some known values of the ζ function. The heavy-tailed mutation operator fmutβ : We define the mutation operator fmutβ (with the f again referring to the word fast usually employed when heavy-tailed distributions are used) as follows. When the parent individual is some bit-string x ∈ {0, 1}n , the mutation operator fmutβ first chooses a random mutation rate α/n with α ∈ [1..n/2] chosen according β to the power-law distribution Dn/2 and then creates an offspring by flipping each bit of the parent independently with probability α/n (that is, via standard-bit mutation with rate α/n). The pseudocode for this operator is given in Algorithm 2. 15 Algorithm 2: The heavy-tailed mutation operator fmutβ . 1 2 3 4 Input: x ∈ {0, 1}n Output: y ∈ {0, 1}n obtained from applying standard-bit mutation to x with mutation rate α/n, where α is chosen randomly according to β Dn/2 y ← x; β Choose α ∈ [1..n/2] randomly according to Dn/2 ; 7 for j = 1 to n do if random([0, 1]) · n ≤ α then yj ← 1 − yj ; 8 return y 5 6 We collect some important properties of the heavy-tailed mutation operator. Again, we have to skip some of the proofs. Lemma 3. Let n ∈ N and β > 1. Let x ∈ {0, 1}n and y = fmutβ (x). (i) The probability that x and y differ in exactly one bit, is P1β := β Pr[H(x, y) = 1] = (Cn/2 )−1 Θ(1) with the constants implicit in the Θ(·) independent of n and β. (ii) For any k ∈ [2..n/2] with k > β − 1, the probability that x and y differ β )−1 Ω(k −β ) with the in exactly k bits, is Pkβ := Pr[H(x, y) = k] ≥ (Cn/2 constants implicit in the Θ(·) independent of n, k, and β. (iii) Let z ∈ {0, 1}n . If β − 1 < H(x, z) ≤ n/2 or H(x, z) = 1, −1 β n then Pr[fmutβ (x) = z] = (Cn/2 )−1 Ω(H(x, z)−β ) H(x,z) . Without any assumption on H(x, z), we have Pr[fmutβ (x) = z] ≥ β (Cn/2 )−1 Ω(2−n n−β ). In both cases, the implicit constants can be chosen independent of z, β, and n. (iv) The expected number of bits that x and y   Θ(1) E (H(x, y)) = Θ(ln(n))   Θ(n2−β ) differ in is if β > 2, if β = 2, if 1 < β < 2, where the implicit constants may depend on β. 16 Proof. (i) We have Pr[H(x, y) = 1] = β (Cn/2 )−1     n/2 X i n−1 1 n i 1− n iβ 1 n i=1 = β (Cn/2 )−1 n/2 X 1−β i i=1  i 1− n n−1 . By using (1 − x1 )x ≤ e−1 valid for x 6= 1 and ex ≥ x2 valid for x ≥ 0, we obtain n/2 X i=1 1−β i i(n−1)   n/2 i n−1 X e− n ≤ 1− n iβ−1 i=1 n/2 n/2 X 1 X 2π 2 n2 1 < . ≤ 4 ≤ (n − 1)2 i2 3 iβ+1 i=1 i=1 n−1 Moreover, since 1 − n1 ≥ e−1 for every n ≥ 2, we have  n−1 Pn/2 1 n i i n−1 ≥ 1 − n1 ≥ e−1 . Hence, Pr[H(x, y) = i=1 iβ 1 n 1 − n β 1] = (Cn/2 )−1 Θ(1). (ii) We have = β Cn/2 Since ni k ≤ n/2, n/2 X     k  i n i n−k 1− k n n i=1       n/2   i n−k  1 n  1 X i k−β 1− . n n n nβ−1 k β Pr[H(x, y) = k] = (Cn/2 )−1 k−β i−β i=1 1−  i n−k n ≥ 1−  i k−β n  i n−k n for any i ≤ n/2 and  k−β     n/2   i i n−k 1 X i k−β i n−k ≤ 1− 1− n n n n n i=1 i=1     n 1 X i k−β i n−k ≤ 1− . n n n n 1 X 2n i=1 Exploiting the fact that x 7→ xk−β (1 − x)n−k is unimodal in [0, 1], we 17 approximate the previous expression by an integral as follows.   n   i n−k 1 X i k−β 1− n n n i=1 Z 1 xk−β (1 − x)n−k dx ± n1 max{xk−β (1 − x)n−k | x ∈ [0, 1]} = 0 Z 1  k−β n−k =Θ x (1 − x) dx . 0 Since k > β − 1, this integral is the Beta function B evaluated at (k − β + 1, n − k + 1). Using the well-known relationship to the Gamma function, we compute Γ(k − β + 1)Γ(n − k + 1) Γ(n + 2 − β) (n − k)! (n − k)!Γ(k − β + 1) = Qn+1 . = Qn+1 ( i=k+1 (i − β))Γ(k − β + 1) i=k+1 (i − β) B(k − β + 1, n − k + 1) = Let ε = β − 1 and A = nε Qn i=k (i − ε). We estimate n X n    X ε ln(A) = ε ln(n) + ln(i − ε) = ε ln(n) + ln 1 − + ln(i) i i=k i=k   n X −ε + ln(i) ≤ ε ln(n) + i i=k = ε ln(n) − ε(ln(n) − ln(k) + O(k −1 )) + = ε ln(k) + n X i=k ln(i) + O ε k n X ln(i) i=k n X ≤ ε ln(k) + ln(i) + O(1), i=k Hence, β Pr[H(x, y) = k] ≥ (Cn/2 )−1   n (n − k)!k! β = (Cn/2 )−1 Ω(k −β ) k k β n!O(1) with all asymptotic notation only hiding absolute constants independent of n, k, and β. (iii) The first  part simply follows from (i) and (ii) by noting (a) that there are nk search points z such that H(x, z) = k and (b) that y is uniformly distributed on these when we condition on H(x, y) = H(x, z). For arbitrary z, we use the fact than when the mutation rate is 1/2, then the offspring is uniformly distributed in {0, 1}n . Hence Pr[fmutβ (x) = z | α = n/2] = 2−n and Pr[fmutβ (x) = z] ≥ β (Cn/2 )−1 Ω((n/2)−β )2−n . 18 (iv) Allowing all implicit constants to depend on β in this paragraph, we calculate E (H(x, y)) = n/2 X Pr[α = k] E (H(x, y) | α = k) k=1     n/2 n/2 X X = Θ k −β · k  = Θ  k 1−β  . k=1 k=1 For β < 2, we approximate the sum by the integral and obtain R n/2 Pn/2 1−β 2−β n/2 = Θ( 0 x1−β dx) = Θ( x2−β 0 ) = Θ(n2−β ). For β > 2, k=1 k P 1−β the series k converges, and for β = 2, the sum over the first n/2 terms of the Harmonic series is Θ(ln(n)). Hence,   if β > 2, Θ(1) E (H(x, y)) = Θ(ln(n)) if β = 2,   Θ(n2−β ) if 1 < β < 2. 5.2 Evolutionary Algorithms Using the Heavy-tailed Mutation Operator fmutβ Since we decided to call algorithms using the heavy-tailed mutation operator fmutβ fast evolutionary algorithms, we denote the (1 + 1) EA using the operator fmutβ from now by (1 + 1) FEAβ . We do likewise for any other (µ + λ) EA, which we call (µ + λ) FEAβ when it employs the mutation operator fmutβ . In this first section analyzing the performance of fast EAs, we show that many runtime analyses remain valid for the corresponding fast EA (apart from changes in the leading constant, which in many classic results is not made explicit anyway). An elementary observation is that fast EAs use the mutation rate 1/n with constant probability (Lemma 3 (i)). Consequently, all previous runtime analysis which are robust to interleaving with other mutation steps remain valid for the FEAs (apart from constant factor changes of the runtime). These are, in particular, all analyses of elitist EAs based on the fitness level method [Weg01] and on drift arguments using the fitness as potential function. We list some such results in the following theorem. The reference points to the original work for the non-fast EA. Theorem 4. Let β > 1. (i) The expected runtime of the (1 + 1) FEAβ on the OneMax and LeadingOnes test functions are O(n log n) [Müh92] and O(n2 ) [Rud97], respectively. 19 (ii) The expected runtime of the (1 + 1) FEAβ on the minimum spanning tree problem is O(m2 log(nwmax )) [NW07]. (iii) For all λ ≤ n1−ε , the expected runtime of the (1 + λ) FEAβ log(λ) is O( nλ log + n log n) on OneMax, it is O(n2 /λ) on log(λ) LeadingOnes [JJW05, DK15], and it is O(m2 log(nwmax )/λ) for the minimum spanning tree problem [NW07]. (iv) For all µ ≤ nO(1) , the expected runtime of the (µ + 1) FEAβ is O(µn + n log(n)) for OneMax and O(µn log(n) + n2 ) for LeadingOnes [Wit06]. For the classic (1 + 1) EA with mutation rate 1/n, it is known that it finds the optimum of any pseudo-Boolean fitness function in an expected number of at most nn iterations. This bound is tight in the sense that there are concrete fitness functions for which an expected optimization time of Ω(nn ) could be proven. These are classic results from [DJW02, Theorem 6 to 8]. Moreover, also problems that generally are perceived as easy may have instances where the classic (1 + 1) EA needs nΘ(n) time to find the optimum. This was demonstrated for the minimum makespan scheduling problem [Wit05], see also [NW10, Theorem 7.5 and Lemma 7.8]. While in average (n jobs having random lengths in [0, 1]) the classic (1 + 1) EA approximates the optimum up to an additive error of 1 in time O(n2 ), there are instances of n jobs with processing times in [0, 1] such that the (1 + 1) EA needs time nΩ(n) to only find a solution that is better than 34 times the optimum. The following result shows that fast EAs only have an exponential worstcase runtime as opposed to the super-exponential times just discussed. Theorem 5. Let n ∈ N and β > 1. Consider any fast EA creating at least a constant ratio of its offspring via the fmutβ mutation operator. Then its expected optimization time on any fitness function f : {0, 1}n → R is at β most O(Cn/2 2n nβ ). Proof. The claim follows immediately from Lemma 3 (iii): Since each offspring generated using fmutβ , regardless of the current state of the algorithm, with probability at least Ω(2−n n−β ) is an optimal solution, the expected optimization time is at most the reciprocal of this number. 5.3 Runtime Analysis for the (1 + 1) FEAβ Optimizing Jump Functions We now proceed with analyzing the performance of the (1 + 1) FEAβ on jump functions. We show that the (1 + 1) FEAβ for all m ∈ [2..n/2] with β m > β−1 has an expected optimization time of O(Cn/2 mβ−0.5 Topt (m, n)) for 20 the function Jumpm,n . By a mild abuse of notation, we denote by Tβ (m, n) the expected optimization time of the (1+1) FEAβ on the Jumpm,n function. Theorem 6. Let n ∈ N and β > 1. For all m ∈ [2..n/2] with m > β − 1, the expected optimization time Tβ (m, n) of the (1 + 1) EA with mutation operator fmutβ is β Tβ (m, n) = O(Cn/2 mβ−0.5 Topt (m, n)), where the constants implicit in the big-Oh notation can be chosen independent from β, m and n. We do not discuss the case m ≤ β − 1. For β < 3, this case does not exist, and we do not have any indication that larger values of β are useful. Proof. We use the same notation as in the proof of Theorem 1 and in the statement of Lemma 3. For i ∈ [0..n − 1], let  n−i β  if 0 ≤ i ≤ n − m − 1,  n P1 −1 β n si := Pm if i = n − m, m  i β otherwise. n P1 Then si is a lower bound for the probability that an iteration starting with a search point x ∈ Ai ends with a search point of higher fitness. By the fitness level theorem, we obtain an upper bound for Tβ (m, n) by computing Tβ (m, n) ≤ = n−1 X 1 si i=0 n−m−1 X i=0 n (n − i)P1β +   n β −1 (Pm ) + m n−1 X n β i=n−m+1 iP1 . (2) estimate the second term, we use the Stirling approximation √ Ton+0.5 2πn e−n ≤ n! ≤ enn+0.5 e−n valid for all n ∈ N. Using Lemma 3 and noting that n/(n − m) ≤ 2, we compute   n n! β β −1 O(mβ ) (Pm ) = Cn/2 m m!(n − m)! nn β = O(1)Cn/2 mβ−0.5 m m (n − m)n−m β = O(1)Cn/2 mβ−0.5 Topt (m, n). β Since this term is at least Ω(Cn/2 n2 ), whereas the sum of the first β and third term in (2) is at most O(Cn/2 n log n), we have Tβ (m, n) = β O(Cn/2 mβ−0.5 Topt (m, n)) as claimed. 21 We remark that this runtime analysis is tight, but given that we prove a very similar lower bound in the subsequent section, we omit a proof for this claim. 5.4 A Lower Bound for a Uniformly Good Performance on all Jump Function The runtime analysis of the previous subsection showed that the (1 + 1) EA with the heavy-tailed mutation operator optimizes any Jumpm,n function in an expected time that is only a small polynomial (in m) factor larger than the runtime stemming from the (for this m) optimal mutation rate. When aiming at algorithms that are not custom-tailored for a particular value of m, this is a great improvement over any fixed mutation rate, which gives a runtime slower than Topt (m, n) by a factor exponential in m for many values of m, see Corollary 2. Still, the question remains if this relatively small polynomial factor increase is necessary. In this section, we answer this affirmatively. While taking β = 1+ε can reduce the loss factor to Θ(m0.5+ε ) for any ε > 0, no randomized choice of the mutation probability can uni√ formly obtain a loss factor of m (or lower). To this aim, let us extend the definition of Tβ (m, n) and denote by TD (m, n) the expected number of iterations it takes the (1 + 1) EA to find the optimum of Jumpm,n when in each iteration the mutation rate is chosen randomly according to the distribution D. Theorem 7. Let c > 0 and let n be sufficiently large. Then for every distribution D on [0, 1/2], there exists an m ∈ [2..n/2] such that √ TD (m, n) ≥ c mTopt (m, n). Proof. As in the proof of Theorem 1, we first argue that also when using a random mutation rate p distributed according to D, then the expected optimization time (essentially) is at least the time needed to jump from the second highest fitness level to the optimum. This part of the proof is very similar to Theorem 1. For reasons of completeness, we still give it in the following. We partition the search space into the nonempty level Ai = {x | kxk1 = i}, 0 ≤ i ≤ n and denote by Ei,D the expected number of iterations it takes the algorithm to find the optimum when the starting point is at level Ai . Let αi,j be the probability that one iteration of the algorithm (consisting of mutation and selection) starting at level Ai ends in level Aj . We prove by induction that for 0 ≤ i ≤ n − m, we have Ei,D ≥ En−m,D . This trivially holds for i = n−m. Suppose that it holds for all i such that k+1 ≤ i ≤ n−m. We prove that it also holds for i = k. We have Ek,D = 1 + n−m X j=k 22 αk,j Ej,D . By induction hypothesis,  n−m X (1 − αk,k )Ek,D ≥ 1 +   αk,j  En−m,D , j=k+1 and thus, Ek,D ≥ 1 − αk,k − αk,n 1 + En−m,D . 1 − αk,k 1 − αk,k Let p be distributed according to D.  Then En−m,D =  m n−m −1 n−k k E (p (1 − p) ) and αk,n = E p (1 − p) . Therefore, since p ≤ 12 and k ≤ n − m, we have n−m−k  p n−m−k k−(n−m) ≤1 p (1 − p) = 1−p and thus pn−k (1 − p)k ≤ pm (1 − p)n−m .  Therefore, E pn−k (1 − p)k ≤ E (pm (1 − p)n−m ), that is, En−m,D αk,n ≤ 1, and consequently Ek,D ≥ En−m,D . By induction, we conclude that Ei,D ≥ En−m,D for all 0 ≤ i ≤ n − m. Let x denote the random initial search point. Then the above estimate yields TD (m, n) ≥ n−m X Pr[x ∈ Ai ]Ei,D i=0 ≥     n 1 1− 2−n En−m,D ≥ . ≤m−1 2 E (pm (1 − p)n−m ) Assume that D is such that for all m ∈ [2..n/2], we have TD (m, n) < √ c mTopt (m, n). Then  1 1  m m  m n−m √ 2 E pm (1 − p)n−m > 1− 3c m n n  n holds for all m ∈ [2..n/2]. Multiplying this inequality by m then summing over all m ∈ [2..n/2], we obtain       n/2 n/2 X m n−m n 1 X 1  m m  m n−m n   √ 1− . 2E p (1 − p) > 3c n m m m n m=2 m=2 The left-hand side is less than 2 2 E ((p + (1 − p))n ) = 2. Hence 2> E Pn m m=0 p (1 − p)n−m   n/2 1 X 1  m m  m n−m n √ 1− . 2c n n m m m=2 23 n m  = With Stirling’s approximation, we obtain √ n/2 1 X 1 mm (n − m)n−m 2πnnn √ p 2> √ 2c nn m e mmm e (n − m)(n − m)n−m m=2  X n/2 1 = Ω(log(n)), =Ω m m=2 a contradiction. 5.5 Combinatorial Optimization Problems In this subsection, we show how our heavy-tailed mutation operator improves two existing runtime results for combinatorial optimization problems. Since the main argument in both cases is that some multi-bit flips used in the previous analyses now occur with much higher rate, we do not give (that is, repeat) the full proofs, but only sketch the main arguments. 5.5.1 Maximum Matching Problem Let ε > 0 be a constant. In [GW03, GW04], see also [NW10, Section 6.2], it is proven that the standard (1 + 1) EA in any undirected graph having n edges finds a near-maximal matching of size at least OP T /(1+ε) in expected time O(nm+1 ), where m = 2d 1ε e − 1. We now show that the (1 + 1) FEAβ β improves this bound to O(Cn/2 (e/m)m mβ−0.5 nm+1 ), that is, roughly by a factor of mΘ(m) . Let G = (V, E) be an undirected graph. Let n := |E|. The maximum matching problem consists in finding a largest subset M ∗ of E such no two edges in M ∗ have a vertex in common. This problem can be solved via EAs by taking S = {0, 1}n as search space with each bit encoding whether a given edge is part of the solution or not. For s ∈ S, let ps (v) = max(0, ds (v) − 1) for each vertex v ∈ V , where dsP (v) is the number of edges in s that are incident with v. Then p(s) = v∈V ps (v) is a penalty term measuring how far our solution deviates from being a matching. As fitness function we use f (s) = (−p(s), ksk1 ), which is to be maximized with respect to the lexicographic order. It is easy to see that both the (1 + 1) EA and the (1+1) FEAβ in time O(n log n) reach a search point that is a matching. The key observation in [GW03, GW04] is that if M is some suboptimal matching, then there exists an augmenting path with respect to M whose length is bounded from above by L := 2b|M |/(|M ∗ | − |M |)c + 1. Consequently, by flipping all bits corresponding to edges on this path, we can increase the size of the matching by one. Hence after at most n times flipping the bits of a path of length m, we have a matching of cardinality |M ∗ |/(1 + ε). 24 This takes time O(n · nm ) = O(nm+1 ) for the (1 + 1) EA, giving the result of [GW03, GW04]. For the (1 + 1) FEAβ , by Lemma 3 (iii), this time is        (1 + o(1))e m β−0.5 m+1 β β β n m n . O nCn/2 m = O Cn/2 m m 5.5.2 Vertex Cover Problem Friedrich, Hebbinghaus, Neumann, He and Witt [FHH+ 10] (see also [NW10, Chapter 12]) analyze how evolutionary algorithms compute minimum vertex covers. They observe that already on complete bipartite graphs with partition classes of size m ≤ n/2 and n − m, the standard (1 + 1) EA has an expected optimization time of Ω(mnm−1 + n log n) (to obtain this precise bound, an inspection of their proofs is necessary though). We now show that b nβ 2m ) for m ≤ n/3 the (1+1) FEAβ find the global optimum in only O(Cn/2 β iterations. For m ≥ n/3, our general bound of O(Cn/2 nβ 2n ) gives again a significant improvement over the classic (1 + 1) EA. For reasons of readβ ability, we omit in the following the factor of Cn/2 . Hence the statements may suppress a dependence of the constants on β, however, in all cases this β would be only the factor Cn/2 . Given a finite graph G = (V, E), the vertex cover problem consists of finding a subset V 0 ⊆ V of minimal size such that each edge of the graph has at least one of its vertices in V 0 . If |V | = n, say V = {v1 , . . . , vn }, a candidate solution can be represented by a bit-string x ∈ {0, 1}n with xi = 1 if and only if vi ∈ V 0 . The fitness function (to be maximized) used in [FHH+ 10] is (−f (x),P −g(x)), with f (x) being the number of edges not covered by x, and g(x) = ni=1 xi the number of vertices that x encompasses. Again, fitness values are to be compared with respect to the lexicographical order. This means that solutions covering more edges are always accepted, up to the point where a solution is found that covers all edges; from then on we try to reduce the number of vertices while still covering all edges. Both the standard (1 + 1) EA and the (1 + 1) FEAβ within the first O(n log n) iterations construct a solution containing one of V1 and V2 , that is, being a vertex cover. In another O(n log n) iterations, vertices are removed until the solution is one of V1 or V2 . Both phases can be analyzed by regarding 1-bit flips only. With probability Θ(m/n), this solution is the local optimum V2 . In this case, in a single step all m bits representing the vertices in V1 have to be flipped and at least m other bits representing vertices of V2 have to be flipped for the new solution to be accepted. For the (1 + 1) EA, this happens with probability at most O(n−m ). For the (1 + 1) FEAβ , this happens with probability at least !  −1  n −β  1 m n−m X n − m  1 n−m β Cn/2 , k 2 2 2 k=m 25 as can be seen from regarding only the iterations using a mutation rate of 1/2. Pn−m n−m n−m We notice that /2 is the probability that a binomial k=m k variable Z ∼ B(n − m, 1/2) takes any value of at least m. Since m ≤ n/3, we have n − m ≥ 2n/3, so (n − m)/2 ≥ m. So this probability is at least Pr(Z ≥ E (Z)) ≥ 1/2. Consequently, the probability to switch a soluβ tion containing the other minimal cover, is at least (Cn/2 )−1 (n/2)−β 2−m−1 . From this solution, simple 1-bit flips in O(n log n) time lead to the optimal solution. Hence the expected optimization time is dominated by β Cn/2 (n/2)β 2m+1 , the expected waiting time for switching into the basin of attraction of the global optimum. This proves our claim (with some room to spare). 6 Experiments We ran an implementation of algorithm 2 against the jump function with n varying between 20 and 150. For m = 8, Figure 2 shows the average number of iterations (on 1000 runs) of the algorithm before reaching the optimal value of (1, . . . , 1) ∈ Rn , with different values of the parameter β and along with the “classical” (1 + 1) EA. We observe that small values of β give better results, although no significant performance increase can be seen below β = 1.5 (which is why we depicted only cases with β ≥ 1.5). The runtimes for β = 1.5 uniformly are better than the one of the classic (1 + 1) EA by a factor of 2000. 7 Conclusions In this work, we took a critical look at the performance of simple mutationbased evolutionary algorithms on multimodal fitness landscapes. Guided by the classic example of jump functions, we observed that mutation rates significantly above the usual recommendation of 1/n led to much better results. The proofs of our results suggest that when a multi-bit flip is necessary to leave a local optimum, then so much time is needed to find the right bits to be flipped that it is justified to use a mutation probability high enough that such numbers of bits are sufficiently often touched. The speed-up here greatly outnumbers the slow-down incurred in easy parts of the fitness landscape. Since we also observe that the optimal performance can only be obtained for a very small interval of mutation probabilities, we suggest to choose the mutation probability randomly according to a power-law distribution. We prove that this results in a “one size fits all” mutation operator, giving a nearly optimal performance on all jump functions. We observe that this 26 10 18 10 17 10 16 10 15 iterations 10 14 10 13 10 12 10 11 10 10 classical (1+1) EA fmut, β = 4 fmut, β = 3 fmut, β = 2 fmut, β = 1. 5 10 9 10 8 10 7 10 6 20 40 60 80 n 100 120 140 160 Figure 2: Average number (over 1000 runs) of iterations the (1 + 1) EA took with different mutation operators to find the optimum of Jump8,n . mutation operator gives an asymptotically equal or better (including massively better) performance on many problems that were analyzed rigorously before. Let us remark that heavy-tailed mutation is not restricted to bit-string representations. For combinatorial problems for which a bit-string representation is inconvenient, e.g., permutations, one way of imitating standard-bit mutation is to sample a number k according to a Poisson distribution with expectation 1 and then perform k elementary mutation steps, where an elementary mutation step is some simple modification of a search point, e.g., a random swap of two elements in the case of permutations [STW04]. Obviously, to obtain a heavy-tailed mutation operator one just needs to replace the Poisson distribution with a heavy-tailed distribution, e.g., a power-law distribution as used in this work. We are optimistic that such approaches can lead to similar improvements as observed in this work, but we have not regarded this in detail. Another important step towards understanding heavy-tailed mutation operators would be to gain experience on its performance on real applications. To make it easiest for other researchers to try our new methods, we have put the (simple) code we used in the repository [Git17]. 27 Acknowledgements This research was supported by Labex DigiCosme (project ANR11LABEX0045DIGICOSME) operated by ANR as part of the program “Investissement d’Avenir” Idex ParisSaclay (ANR11IDEX000302) as well as by a public grant as part of the Investissement d’avenir project, reference ANR-11-LABX-0056-LMH, LabEx LMH. References [AD11] Anne Auger and Benjamin Doerr. Theory of Randomized Search Heuristics: Foundations and Recent Developments. Series on theoretical computer science. World Scientific, 2011. [Bäc93] Thomas Bäck. Optimal mutation rates in genetic search. In ICGA, pages 2–8. Morgan Kaufmann, 1993. [BDN10] Süntje Böttcher, Benjamin Doerr, and Frank Neumann. Optimal fixed and adaptive mutation rates for the leadingones problem. In PPSN (1), volume 6238 of Lecture Notes in Computer Science, pages 1–10. Springer, 2010. [BLS14] Golnaz Badkobeh, Per Kristian Lehre, and Dirk Sudholt. Unbiased black-box complexity of parallel search. In Parallel Problem Solving from Nature XIII, Lecture Notes in Computer Science, pages 892–901. Springer, 2014. [DDE15] Benjamin Doerr, Carola Doerr, and Franziska Ebel. From blackbox complexity to designing new genetic algorithms. Theoretical Computer Science, 567:87–104, 2015. [DFK+ 16a] Duc-Cuong Dang, Tobias Friedrich, Timo Kötzing, Martin S. Krejca, Per Kristian Lehre, Pietro Simone Oliveto, Dirk Sudholt, and Andrew M. Sutton. Emergence of diversity and its benefits for crossover in genetic algorithms. In PPSN, volume 9921 of Lecture Notes in Computer Science, pages 890–900. Springer, 2016. [DFK+ 16b] Duc-Cuong Dang, Tobias Friedrich, Timo Kötzing, Martin S. Krejca, Per Kristian Lehre, Pietro Simone Oliveto, Dirk Sudholt, and Andrew M. Sutton. Escaping local optima with diversity mechanisms and crossover. In GECCO, pages 645–652. ACM, 2016. [DHK12] Benjamin Doerr, Edda Happ, and Christian Klein. Crossover can provably be useful in evolutionary computation. Theoretical Computer Science, 425:17–33, 2012. 28 [DJK+ 13] Benjamin Doerr, Daniel Johannsen, Timo Kötzing, Frank Neumann, and Madeleine Theile. More effective crossover operators for the all-pairs shortest path problem. Theoretical Computer Science, 471:12–26, 2013. [DJW02] Stefan Droste, Thomas Jansen, and Ingo Wegener. On the analysis of the (1+1) evolutionary algorithm. Theoretical Computer Science, 276:51–81, 2002. [DK15] Benjamin Doerr and Marvin Künnemann. Optimizing linear functions with the (1+λ) evolutionary algorithm - different asymptotic runtimes for different instances. Theoretical Computer Science, 561:3–23, 2015. [DL16] Duc-Cuong Dang and Per Kristian Lehre. Runtime analysis of non-elitist populations: From classical optimisation to partial information. Algorithmica, 75:428–461, 2016. [FHH+ 10] Tobias Friedrich, Jun He, Nils Hebbinghaus, Frank Neumann, and Carsten Witt. Approximating covering problems by randomized search heuristics using multi-objective models. Evolutionary Computation, 18:617–633, 2010. [FW05] Simon Fischer and Ingo Wegener. The one-dimensional ising model: Mutation versus recombination. Theoretical Computer Science, 344:208–225, 2005. [Git17] GitHub. Fast genetic algorithms, https://github.com/FastGA/fast-genetic-algorithms. [GW03] Oliver Giel and Ingo Wegener. Evolutionary algorithms and the maximum matching problem. In STACS, volume 2607 of Lecture Notes in Computer Science, pages 415–426. Springer, 2003. [GW04] Oliver Giel and Ingo Wegener. Searching randomly for maximum matchings. Electronic Colloquium on Computational Complexity (ECCC), (076), 2004. [GW15] Christian Gießen and Carsten Witt. Population size vs. mutation strength for the (1+λ) EA on onemax. In GECCO, pages 1439–1446. ACM, 2015. 2017. [HGAK06] Nikolaus Hansen, Fabian Gemperle, Anne Auger, and Petros Koumoutsakos. When do heavy-tail distributions help? In PPSN, volume 4193 of Lecture Notes in Computer Science, pages 62–71. Springer, 2006. 29 [JJW05] Thomas Jansen, Kenneth A. De Jong, and Ingo Wegener. On the choice of the offspring population size in evolutionary algorithms. Evolutionary Computation, 13:413–440, 2005. [JW05] Thomas Jansen and Ingo Wegener. Real royal road functions– where crossover provably is essential. Discrete Applied Mathematics, 149:111–125, 2005. [KST11] Timo Kötzing, Dirk Sudholt, and Madeleine Theile. How crossover helps in pseudo-boolean optimization. In GECCO, pages 989–996. ACM, 2011. [Müh92] Heinz Mühlenbein. How genetic algorithms really work: Mutation and hillclimbing. In PPSN, pages 15–26. Elsevier, 1992. [NW07] Frank Neumann and Ingo Wegener. Randomized local search, evolutionary algorithms, and the minimum spanning tree problem. Theoretical Computer Science, 378:32–40, 2007. [NW10] Frank Neumann and Carsten Witt. Bioinspired Computation in Combinatorial Optimization: Algorithms and Their Computational Complexity. Natural Computing Series. Springer Berlin Heidelberg, 2010. [Pos09] Petr Posik. Bbob-benchmarking a simple estimation of distribution algorithm with cauchy distribution. In GECCO (Companion), pages 2309–2314. ACM, 2009. [Pos10] Petr Posı́k. Comparison of cauchy EDA and BIPOP-CMA-ES algorithms on the BBOB noiseless testbed. In GECCO (Companion), pages 1697–1702. ACM, 2010. [Rud97] Günter Rudolph. Convergence Properties of Evolutionary Algorithms. Kovac, 1997. [SGS11] Tom Schaul, Tobias Glasmachers, and Jürgen Schmidhuber. High dimensions and heavy tails for natural evolution strategies. In GECCO, pages 845–852. ACM, 2011. [SH87a] Harold H. Szu and Ralph L. Hartley. Fast simulated annealing. Physics Letters A, 122:157–162, June 1987. [SH87b] Harold H. Szu and Ralph L. Hartley. Nonconvex optimization by fast simulated annealing. Proceedings of the IEEE, 75:1538– 1540, Nov 1987. [STW04] Jens Scharnow, Karsten Tinnefeld, and Ingo Wegener. The analysis of evolutionary algorithms on sorting and shortest paths problems. J. Math. Model. Algorithms, 3:349–366, 2004. 30 [Sud05] Dirk Sudholt. Crossover is provably essential for the ising model on trees. In GECCO, pages 1161–1167. ACM, 2005. [SW04] Tobias Storch and Ingo Wegener. Real royal road functions for constant population size. Theoretical Computer Science, 320:123–134, 2004. [Weg01] Ingo Wegener. Theoretical aspects of evolutionary algorithms. In ICALP, volume 2076 of Lecture Notes in Computer Science, pages 64–78. Springer, 2001. [Wit05] Carsten Witt. Worst-case and average-case approximations by simple randomized search heuristics. In STACS, volume 3404 of Lecture Notes in Computer Science, pages 44–56. Springer, 2005. [Wit06] Carsten Witt. Runtime analysis of the (µ + 1) EA on simple pseudo-boolean functions. Evolutionary Computation, 14:65– 86, 2006. [Wit13] Carsten Witt. Tight bounds on the optimization time of a randomized search heuristic on linear functions. Combinatorics, Probability & Computing, 22:294–318, 2013. [YL97] Xin Yao and Yong Liu. Fast evolution strategies. In Evolutionary Programming, volume 1213 of Lecture Notes in Computer Science, pages 151–162. Springer, 1997. [YLL99] Xin Yao, Yong Liu, and Guangming Lin. Evolutionary programming made faster. IEEE Trans. Evolutionary Computation, 3:82–102, 1999. 31
9cs.NE
k-Distinct In- and Out-Branchings in Digraphs∗ arXiv:1612.03607v3 [cs.DS] 15 Jan 2018 Gregory Gutin1 , Felix Reidl2 , and Magnus Wahlström1 1 Royal Holloway, University of London, UK 2 North Carolina State University, USA January 16, 2018 Abstract An out-branching and an in-branching of a digraph D are called kdistinct if each of them has k arcs absent in the other. Bang-Jensen, Saurabh and Simonsen (2016) proved that the problem of deciding whether a strongly connected digraph D has k-distinct out-branching and inbranching is fixed-parameter tractable (FPT) when parameterized by k. They asked whether the problem remains FPT when extended to arbitrary digraphs. Bang-Jensen and Yeo (2008) asked whether the same problem is FPT when the out-branching and in-branching have the same root. By linking the two problems with the problem of whether a digraph has an out-branching with at least k leaves (a leaf is a vertex of out-degree zero), we first solve the problem of Bang-Jensen and Yeo (2008). We then develop a new digraph decomposition called the rooted cut decomposition and using it we prove that the problem of Bang-Jensen et al. (2016) is FPT for all digraphs. We believe that the rooted cut decomposition will be useful for obtaining other results on digraphs. 1 Introduction While both undirected and directed graphs are important in many applications, there are significantly more algorithmic and structural results for undirected graphs than for directed ones. The main reason is likely to be the fact that most problems on digraphs are harder than those on undirected graphs. The situation has begun to change: recently there appeared a number of important structural results on digraphs, see e.g. [16, 17, 18]. However, the progress was less pronounced with algorithmic results on digraphs, in particular, in the area of parameterized algorithms. ∗ A short version of this paper was published in the proceedings of ICALP 2017. Research of Gutin was partially supported by Royal Society Wolfson Research Merit Award. 1 In this paper, we introduce a new decomposition for digraphs and show its usefulness by solving an open problem by Bang-Jensen, Saurabh and Simonsen [6]. We believe that our decomposition will prove to be helpful for obtaining further algorithmic and structural results on digraphs. A digraph T is an out-tree (an in-tree) if T is an oriented tree with just one vertex s of in-degree zero (out-degree zero). The vertex s is the root of T. A vertex v of an out-tree (in-tree) is called a leaf if it has out-degree (in-degree) zero. If an out-tree (in-tree) T is a spanning subgraph of a digraph D, then T is an out-branching (an in-branching) of D. It is well-known that a digraph D contains an out-branching (in-branching) if and only if D has only one strongly connected component with no incoming (no outgoing) arc [3]. A well-known result in digraph algorithms, due to Edmonds, states that given a digraph D and a positive integer `, we can decide whether D has ` arc-disjoint out-branchings in polynomial time [15]. The same result holds for ` arc-disjoint in-branchings. Inspired by this fact, it is natural to ask for a “mixture” of out- and in-branchings: given a digraph D and a pair u, v of (not necessarily distinct) vertices, decide whether D has an arc-disjoint outbranching Tu+ rooted at u and in-branching Tv− rooted at v. We will call this problem Arc-Disjoint Branchings. Thomassen proved (see [2]) that the problem is NP-complete and remains NP-complete even if we add the condition that u = v. The same result still holds for digraphs in which the out-degree and in-degree of every vertex equals two [7]. The problem is polynomial-time solvable for tournaments [2] and for acyclic digraphs [8, 10]. The single-root special case (i.e., when u = v) of the problem is polynomial time solvable for quasi-transitive digraphs1 [4] and for locally semicomplete digraphs2 [5]. An out-branching T + and an in-branching T − are called k-distinct if |A(T + )\ A(T − )| > k. Bang-Jensen, Saurabh and Simonsen [6] considered the following parameterization of Arc-Disjoint Branchings. k-Distinct Branchings parametrised by k Input: A digraph D, an integer k. Question: Are there k-distinct out-branching T + and in-branching T − ? They proved that k-Distinct Branchings is fixed-parameter tractable (FPT)3 when D is strongly connected and conjectured that the same holds when D is an arbitrary digraph. Earlier, Bang-Jensen and Yeo [9] considered the version of 1 A digraph D = (V, A) is quasi-transitive if for every xy, yz ∈ A there is at least one arc between x and z, i.e. either xz ∈ A or zx ∈ A or both. 2 A digraph D = (V, A) is locally semicomplete if for every xy, xz ∈ A there is at least one arc between y and z and for every yx, zx ∈ A there is at least one arc between y and z. Tournaments and directed cycles are locally semicomplete digraphs. 3 Fixed-parameter tractability of k-Distinct Branchings means that the problem can be solved by an algorithm of runtime O∗ (f (k)), where O∗ omits not only constant factors, but also polynomial ones, and f is an arbitrary computable function. The books [11, 13] are excellent recent introductions to parameterized algorithms and complexity. 2 k-Distinct Branchings where T + and T − must have the same root and asked whether this version of k-Distinct Branchings, which we call Single-Root k-Distinct Branchings, is FPT. The first key idea of this paper is to relate k-Distinct Branchings to the problem of deciding whether a digraph has an out-branching with at least k leaves via a simple lemma (see Lemma 1). The lemma and the following two results on out-branchings with at least k leaves allow us to solve the problem of Bang-Jensen and Yeo [9] and to provide a shorter proof for the above-mentioned result of Bang-Jensen, Saurabh and Simonsen [6] (see Theorem 3). Theorem 1 ([1]). Let D be a strongly connected digraph. If D has no outbranching with at least k leaves, then the (undirected) pathwidth of D is bounded by O(k log k). Theorem 2 ([12, 19]). We can decide whether a digraph D has an out-branching with at least k leaves in time4 O∗ (3.72k ). The general case of k-Distinct Branchings seems to be much more complicated. We first introduce a version of k-Distinct Branchings called kRooted Distinct Branchings, where the roots s and t of T + and T − are fixed, and add arc ts to D (provided the arc is not in D) to make D strongly connected. This introduces a complication: we may end up in a situation where D has an out-branching with many leaves, and thereby potentially unbounded pathwidth, but the root of the out-branching is not s. To deal with this situation, our goal will be to reconfigure the out-branching into an out-branching rooted at s. In order to reason about this process, we develop a new digraph decomposition we call the rooted cut decomposition. The cut decomposition of a digraph D rooted at a given vertex r consists of a tree T̂ rooted at r whose nodes are some vertices of D and subsets of vertices of D called diblocks associated with the nodes of T̂ . Our strategy is now as follows. If T̂ is shallow (i.e., it has bounded height), then any out-branching with sufficiently many leaves can be turned into an out-branching rooted at s without losing too many of the leaves. On the other hand, if T̂ contains a path from the root of T̂ with sufficiently many nondegenerate diblocks (diblocks with at least three vertices), then we are able to show immediately that the instance is positive. The remaining and most difficult issue is to deal with digraphs with decomposition trees that contain long paths of diblocks with only two vertices, called degenerate diblocks. In this case, we employ two reduction rules which lead to decomposition trees of bounded height. The paper is organized as follows. In the next section, we provide some terminology and notation on digraphs used in this paper. In Section 3, we prove Theorem 3. Section 4 is devoted to proving that Rooted k-Distinct Branchings is FPT for all digraphs using cut decomposition and Theorems 1 and 2. We conclude the paper in Section 5, where some open parameterized problems on digraphs are mentioned. 4 The algorithm of [19] runs in time O∗ (4k ) and its modification in [12] in time O∗ (3.72k ). 3 Figure 1: Subtree notation Tx for x ∈ T (left) and the fins Fx1 , . . . , Fx` for a path x1 . . . x` in T (right). 2 Terminology and Notation Let us recall some basic terminology of digraph theory, see [3]. A digraph D is strongly connected (connected) if there is a directed (oriented) path from x to y for every ordered pair x, y of vertices of D. Equivalently, D is connected if the underlying graph of D is connected. A vertex v is a source (sink) if its in-degree (out-degree) is equal to zero. It is well-known that every acyclic digraph has a source and a sink [3]. In this paper, we exclusively work with digraphs, therefore we assume all our graphs, paths, and trees to be directed unless otherwise noted. For a path P = x1 x2 . . . xk of length k − 1 we will employ the following notation for subpaths of P : P [xi , xj ] := xi . . . xj for 1 6 i 6 j 6 k is the infix of P from xi to xj . For paths P1 := x1 . . . xk v and P2 := vy1 . . . y` we denote by P1 P2 := x1 . . . xk vy1 . . . y` their concatenation. For rooted trees T and some vertex x ∈ T , Tx stands for the subtree of T rooted at x (see Figure 1). We will frequently partition the nodes of a tree around a path in the following sense (cf. Figure 1): Let T be a tree rooted at r and P = x1 . . . x` a path from r = x1 to some node x` ∈ T . The fins of P are the sets {Fxi }xi ∈P defined as Fxi := V (Txi ) \ V (Txi+1 ) for i < ` and Fx` := V (Tx` ). Definition 1 (Bi-reachable Vertex). A vertex v of a digraph D is bi-reachable from a vertex r if there exist two internally vertex-disjoint paths from r to v. Given a digraph D and a vertex r, we can compute the set of vertices that are bi-reachable from r in polynomial time using network flows. 3 Strongly Connected Digraphs Let us prove a simple fact on a link between out/in-branchings with many leaves and k-Distinct Branchings, which together with a structural result of Alon 4 et al. [1] and an algorithmic result for the Maximum Leaf Out-branching problem [12, 19] gives a short proof that both versions of k-Distinct Branchings are FPT for strongly connected digraphs. Lemma 1. Let D be a digraph containing an out-branching and an in-branching. If D contains an out-branching (in-branching) T with at least k + 1 leaves, then every in-branching (out-branching) T 0 of D is k-distinct from T . Proof. We will consider only the case when T is an out-branching since the other case can be treated similarly. Let T 0 be an in-branching of D and let L be the set of all leaves of T apart from the one which is the root of T 0 . Observe that all vertices of L have outgoing arcs in T 0 and since in T the incoming arcs of L are the only arcs incident to L in T , the sets of the outgoing arcs in T 0 and incoming arcs in T do not intersect. From the next section, the following problem will be of our main interest. The problem k-Distinct Branchings in which T + and T − must be rooted at given vertices s and t, respectively, will be called the Rooted k-Distinct Branchings problem. We will use the following standard dynamic programming result (see, e.g., [6]). Lemma 2. Let H be a digraph of (undirected) treewidth τ . Then k-Distinct Branchings, Single-Root k-Distinct Branchings as well as Rooted kDistinct Branchings on H can be solved in time O∗ (2O(τ log τ ) ). Note that if a digraph D is a positive instance of Single-Root k-Distinct Branchings then D must be strongly connected as an out-branching and an inbranching rooted at the same vertex form a strongly connected subgraph of D. Thus, the following theorem, in particular, solves the problem of Bang-Jensen and Yeo mentioned above. Theorem 3. Both k-Distinct Branchings and Single-Root k-Distinct 2 Branchings on strongly connected digraphs can be solved in time O∗ (2O(k log k) ). Proof. The proof is essentially the same for both problems and we will give it for Single-Root k-Distinct Branchings. Let D be an input strongly connected digraph. By Theorem 2 using an O∗ (3.72k )-time algorithm we can find an out-branching T + with at least k + 1 leaves, or decide that D has no such out-branching. If T + is found, the instance of Single-Root k-Distinct Branchings is positive by Lemma 1 as any in-branching T − of D is k-distinct from T + . In particular, we may assume that T − has the same root as T + (a strongly connected digraph has an in-branching rooted at any vertex). Now suppose that T + does not exist. Then, by Theorem 1 the (undirected) pathwidth of D is bounded by O(k log k). Thus, by Lemma 2 the instance can be solved 2 in time O∗ (2O(k log k) ). The following example demonstrates that Theorem 1 does not hold for arbitrary digraphs and thus the proof of Theorem 3 cannot be extended to the general case. Let D be a digraph with vertex set {v0 , v1 , . . . , vn+1 } and arc set 5 {v0 v1 , v1 v2 , . . . , vn vn+1 } ∪ {vi vj : 1 6 j < i 6 n}. Observe that D is of unbounded (undirected) treewidth, but has unique in- and out-branchings (which are identical). The same statement holds if we add an arc vn+1 v0 (to make the graph strongly connected) but insist that the out-branching is rooted in v0 and the in-branching in vn+1 . 4 The k-Distinct Branchings Problem In this section, we fix a digraph D with terminals s, t and simply talk about rooted out-branchings (in-branchings) whose root we implicitly assume to be s (t). Similarly, unless otherwise noted, a rooted out-tree (in-tree) is understood to be rooted at s (t). Clearly, to show that both versions of k-Distinct Branchings are FPT it is sufficient to prove the following: Theorem 4. Rooted k-Distinct Branchings is FPT for arbitrary digraphs. In the rest of this section, (D, s, t) will stand for an instance of Rooted kDistinct Branchings (in particular, D is an input digraph of the problem) and H for an arbitrary digraph. Let us start by observing what further restrictions on D can be imposed by polynomial-time preprocessing. 4.1 Preprocessing Let (D, s, t) be an instance of Rooted k-Distinct Branchings. Recall that D contains an out-branching (in-branching) if and only if D has only one strongly connected component with no incoming (no outgoing) arc. As a first preprocessing step, we can decide in polynomial time whether D has a rooted out-branching and a rooted in-branching. If not, we reject the instance. Note that this in particular means that in a non-rejected instance, every vertex in D is reachable from s and t is reachable from every vertex. Next, we test for every arc a ∈ D whether there exists at least one rooted in- or out-branching that uses a as follows: since a maximal-weight out- or inbranching for an arc-weighted digraph can be computed in polynomial time [14], we can force the arc a to be contained in a solution by assigning it a weight of 2 and every other arc weight 1. If we verify that a indeed does not appears in any rooted out-branching and in-branching, we remove a from D and obtain an equivalent instance of Rooted k-Distinct Branchings. After this polynomial-time preprocessing, our instance has the following three properties: there exists a rooted out-branching, there exists a rooted inbranching, and every arc of D appears in some rooted in- or out-branching. We call such a digraph with a pair s, t reduced. Lastly, the following result of Kneis et al. [19] will be frequently used in our arguments below. 6 Lemma 3. Let H = (V, A) be a digraph containing an out-branching rooted at s ∈ V . Then every out-tree rooted at s with q leaves can be extended into an out-branching rooted at s with at least q leaves in time O(|V | + |A|). 4.2 Decomposition and Reconfiguration We work towards the following win-win scenario: either we find an out-tree with Θ(k) leaves that can be turned into a rooted out-tree with at least k + 1 leaves, or we conclude that every out-tree in D has less than Θ(k) leaves. We refer to the process of turning an out-tree into a rooted out-tree as a reconfiguration. In the process we will develop a new digraph decomposition, the rooted cut-decomposition, which will aid us in reasoning about reconfiguration steps and ultimately lead us to a solution for the problem. In principle we recursively decompose the digraph into vertex sets that are bi-reachable from a designated ‘bottleneck’ vertex, but for technical reasons the following notion of a diblock results in a much cleaner version of the decomposition. Definition 2. Let H be a digraph with at least two vertices, and let r ∈ V (H) such that every vertex of H is reachable from r. Let B ⊆ V (H) be the set of all vertices that are bi-reachable from r. The directed block (diblock) Br of r in H is the set B ∪ N + [r], i.e., the bi-reachable vertices together with all out-neighbors of r and r itself. Note that according to the above definition a diblock must have at least two vertices. The following statement provides us with an easy case in which a reconfiguration is successful, that is, we can turn an arbitrary out-tree into a rooted out-tree without losing too many leaves. Later, the obstructions to this case will be turned into building blocks of the decomposition. Lemma 4. Let Bs ⊆ V (D) be the diblock of s and let T be an out-tree of D whose root r lies in Bs with ` leaves. Then there exists a rooted out-tree with at least (` − 1)/2 leaves. Proof. We may assume that r 6= s. In case T contains s as a leaf, we remove s from T for the remaining argument and hence will argue about the ` − 1 remaining leaves. If r is bi-reachable from s, consider two internally vertex-disjoint paths P, Q from s to r. One of the two paths necessarily avoids half of the ` − 1 leaves of T ; let without loss of generality this path be P . Let further L be the set of those leaves of T that do not lie on P . If r ∈ N + (s), let P = sr. We construct the required out-tree T 0 as follows: first, add all arcs and vertices of P to T 0 . Now for every leaf v ∈ L, let Pv be the unique path from r to v in T and let Pv0 be the segment of Pv from the last vertex x of Pv contained in T . Add all arcs and vertices of Pv0 to T 0 . Observe that x 6= v as v cannot be in T 0 . Since Pv and thus Pv0 contains no leaf of L other than v, in the end of the process, all vertices of L are leaves of T 0 . Since |L| > (` − 1)/2, the claim follows. 7 The definition of diblocks can also be understood in terms of network flows: Let v 6= r. Consider the vertex-capacitated version of H where r and v both have capacity 2, and every other vertex has capacity 1, for some v ∈ V (H) \ {r}. Then v is contained in the diblock of r in H if and only if the max-flow from r to v equals 2. Dually, by Menger’s theorem, v is not contained in the diblock if and only if there is a vertex u ∈ / {r, v} such that all r-v paths P intersect u. This has the following simple consequence regarding connectivity inside a diblock: Lemma 5. Fix r ∈ V (H) and let Br ⊆ V (H) be the diblock of r in H. Then for every pair of distinct vertices x, y ∈ Br , there exist an r-x-path Px and an r-y-path Py that intersect only in r. Proof. If r ∈ {x, y}, then clearly the claim holds since every vertex in Br is reachable from r. Otherwise, add a new vertex z with arcs xz and yz, and note that the lemma holds if and only if z is bi-reachable from r. If this is not true, then by Menger’s theorem there is a vertex v ∈ Br , v 6= r, such that all paths from r to z, and hence to x and y, go through v. But as noted above, there is no cut-vertex v ∈ / {x, r} for r-x paths, and no cut-vertex v ∈ / {y, r} for r-y paths. We conclude that z is bi-reachable from r, hence the lemma holds. Next, we will use Lemma 5 to show that given a vertex r, the set of vertices not in the diblock Br of r in H partitions cleanly around Br . Lemma 6. Let r ∈ V (H) be given, such that every vertex of H is reachable from r. Let Br ⊂ V (H) be the diblock of r in H. Then V (H)\Br partitions according to cut vertices in Br , in the following sense: For every v ∈ V (H) \ Br , there is a unique vertex x ∈ Br \ {r} such that every path from r to v intersects Br for the last time in x. Furthermore, this partition can be computed in polynomial time. Proof. Assume towards a contradiction that for v ∈ V (H) \ Br there exist two r-v-paths P1 , P2 that intersect Br for the last time in distinct vertices x1 , x2 , respectively. We first observe that r ∈ / {x1 , x2 }, since the second vertices of P1 and P2 are contained in Br by definition. By Lemma 5, we may assume that P1 [r, x1 ] ∩ P2 [r, x2 ] = {r}. But then P1 and P2 intersect for the first time outside of Br in some vertex v 0 (potentially in v 0 = v). This vertex is, however, bi-reachable from r, contradicting our construction of Br . Hence there is a vertex x ∈ Br such that every path from r to v intersects Br for the last time in x, with x 6= r, and clearly this vertex is unique. Finally, the set Br can be computed in polynomial time, and given Br it is easy to compute for each x ∈ Br the set of all vertices v ∈ V (H) (if any) for which x is a cut vertex. We refer to the vertices x ∈ Br that are cut vertices in the above partition as the bottlenecks of Br . Note that r itself is not considered a bottleneck in Br . Using these notions, we can now define a cut decomposition of a digraph H. Definition 3 (Rooted cut decomposition and its tree). Let H be a digraph and r a vertex such that every vertex in H is reachable from r. The (r-rooted) cut 8 Figure 2: An example of a rooted cut decomposition. decomposition of H is a pair (T̂ , B) where T̂ is a rooted tree with V (T̂ ) ⊆ V (H) and B = {Bx }x∈T̂ , Bx ⊆ V (H) for each x ∈ T̂ , is a collection of diblocks associated with the nodes of T̂ , defined and computed recursively as follows. 1. Let Br be the diblock of r in H, and let L ⊆ Br \ {r} be the set of bottlenecks in Br . Let {Xx }x∈L be the corresponding partition of the remainder V (H)\Br . 2. For every bottleneck x ∈ L, let (T̂x , Bx ) be the x-rooted cut decomposition of the subgraph D[Xx ∪ {x}]. 3. T̂ is the tree with root node r, where L is the set of children of r, and for every x ∈ L the subtree of T̂ rooted at x is T̂x . S 4. Finally, B = {Br } ∪ x∈L Bx . S Furthermore, for every node x ∈ T̂ , we define Bx∗ = y∈T̂x By as the set of all vertices contained in diblocks associated with nodes of the subtree T̂x . Figure 2 provides an illustration to Definition 3. Lemma 7. Let a digraph H and a root r ∈ V (H) be given, such that every vertex of H is reachable from r. Then the r-rooted cut decomposition (T̂ , {Bx }x∈T̂ ) of H is well-defined and can S be computed in polynomial time. Furthermore, the diblocks cover V (H), i.e., x∈T̂ Bx = V (H), and for every node x ∈ T̂ , every vertex of Bx∗ is reachable from x in D[Bx∗ ]. Proof. By Lemma 6, the root diblock Br as well as the set L ⊆ Br of bottlenecks and the partition {Xx }x∈L are well-defined and can be computed in polynomial time. Also note that for each x ∈ L, r ∈ / Xx ∪ {x}, and every vertex of Hx := H[Xx ∪ {x}] is reachable from x in Hx by the definition of the partition. Hence the collection of recursive calls made in the construction is well-defined, and every digraph Hx used in a recursive call is smaller than H, hence the process terminates. Finally, for any two distinct bottlenecks x, y ∈ L we have V (Hx ) ∩ V (Hy ) = ∅. Thereby, distinct nodes of T̂ are associated with distinct vertices of H, |T̂ | 6 |V (H)|, and the map x 7→ Bx is well-defined. It is also clear that the whole process takes polynomial time. 9 We collect some basic facts about cut decompositions. Lemma 8. Let H be a digraph, r ∈ V (H) a vertex and let (T̂ , {Bx }x∈T̂ ) be the r-rooted cut decomposition of H. Then the following hold. 1. The sets {Bx \ {x}}x∈T̂ are all non-empty and partition V (H) \ {r}. 2. For distinct nodes x, y ∈ T̂ , if x is the parent of y in T̂ then Bx ∩By = {y}; in every other situation, Bx ∩ By = ∅. 3. For every node x ∈ T̂ , the following hold: (a) If y is a child of x in T̂ , then any arc leading into the set By∗ from V (H) \ By∗ will have the form uy where u ∈ Bx . (b) If y, y 0 are distinct children of x in T̂ , then there is no arc between By∗ and By∗0 . In particular, every arc of H is either contained in a subgraph of H induced by a diblock Bx , or it is a back arc going from a diblock By to a diblock Bx , where x is an ancestor of y in T̂ . Proof. For the first claim, the sets Bx \ {x} are non-empty by definition; we show the partitioning claim. By Lemma 6, for every v ∈ V (H) \ {r} either v ∈ Br \ {r} or there is exactly one bottleneck x ∈ Br such that v ∈ Xx in the construction of the decomposition. Also note that in the latter case, v 6= x since x ∈ Br . Applying the argument recursively and using that the diblocks cover V (H), by Lemma 7, we complete the proof of the partitioning claim. For the second claim, the partitioning claim implies that if v ∈ Bx ∩ By for distinct nodes x, y ∈ T̂ , then either v = x or v = y, i.e., v must be a bottleneck. This is only possible in the situation described. For Claim 3(b), first consider the diblock Br and the partition {Xz }z∈L given by Lemma 6. To prove Claim 3(b) it suffices to show that for any two distinct sets Xy , Xy0 of the partition, there is no arc between Xy and Xy0 . Suppose for a contradiction that there is such an arc uv, u ∈ Xy , v ∈ Xy0 . By Lemma 5, there are paths Py and Py0 in Br from r to y and y 0 , respectively that intersect only in r, and by Lemma 7, there are paths Pu from y to u in Xy and Pv from y 0 to v in Xy0 . But then the paths Py Pu uv and Py0 Pv form two r-v paths that are internally vertex-disjoint, showing that v ∈ Br , contrary to our assumptions. Since the decomposition is computed recursively, this also holds in every internal node of T̂ . For Claim 3(a), let uv be an arc such that u ∈ / By∗ and v ∈ By∗ . Moreover, let u ∈ Bx0 and v ∈ By0 . By construction of cut decomposition, there is a path P̂ from x0 to y 0 in T̂ containing nodes x and y. Let x00 be the second node in P̂ (just after x0 ). Thus, there is a path P from x00 to v in H containing the vertices of P̂ apart from x0 . Assume that u 6= x00 . Then by Lemma 5, there is an x0 -u-path P 0 and an x0 -x00 -path P 00 of H which intersect only at x0 . Then x0 P 0 uv and P 00 P are internally vertex-disjoint paths from x0 to v. This means that v must be in Bx0 , 10 a contradiction unless x0 = x, u ∈ Bx and v = y. If u = x00 , then P and uv are internally vertex-disjoint paths from u to v. This means that v must be in Bx00 , a contradiction unless x0 = x and v = y. As we saw, for every diblock By , y ∈ T̂ , any path “into” the diblock must go via the bottleneck vertex y. By induction, for any v ∈ By , every node of T̂ from r to y represents a bottleneck vertex that is unavoidable for paths from r to v. More formally, the following holds in cut decompositions: Lemma 9. Let (T̂ , {Bx }x∈T̂ ) be the cut decomposition of H rooted at r. Fix a diblock Bx for x ∈ T̂ . Consider a path P in H from r to v ∈ Bx and let x1 . . . x` be the sequence of bottleneck vertices that P encounters. Then P̂ = x0 x1 . . . x` with x0 = r is the path from r to x in T̂ . Proof. We prove the claim by induction over the depth d of the vertex x in T̂ . If r = x then any path from r to v ∈ Br contains r itself and hence the base case for d = 0 holds trivially. Consider a diblock Bx , x ∈ T̂ where x has distance d to r in T̂ and let y be the parent of x in T̂ . We assume the induction hypothesis holds for diblocks at depth d − 1, hence it holds for By in particular. Because x ∈ By , this implies that every path from r to x will contain all ancestors of x in T̂ . Since by construction every path from r to a vertex v ∈ Bx needs to pass through x, the inductive step holds. This proves the claim. As an immediate consequence, we can identify arcs in cut decompositions that cannot participate in any rooted out-branching. Corollary 1. Let (T̂ , {Bx }x∈T̂ ) be the cut decomposition of H rooted at r and let R := {uv ∈ A(H) | u ∈ Bx and x ∈ T̂v } be all the arcs that originate in a diblock Bx and end in an ancestor v of x on T̂ . Then for every out-tree T rooted at r we have A(T ) ∩ R = ∅. Proof. Fix a bottleneck vertex v ∈ T̂ of the decomposition and let the arc uv be in an out-tree T rooted at r. There must exist a path Psu from s to u that is part of T . By Lemma 9, this path will contain the vertex v. But then v is an ancestor of u in T and therefore the arc uv cannot be part of T , which is a contradiction. The decomposition actually restricts paths even further: a path that starts at the root and visits two bottleneck vertices x, y (in this order) cannot intersect any vertex of By∗ before visiting y and cannot return to any set Bz∗ , z ∈ T̂ , after having left it. Lemma 10. Let (T̂ , {Bx }x∈T̂ ) be the cut decomposition of H rooted at r. Fix a diblock Bx for x ∈ T̂ . Consider a path P from r to v ∈ Bx and let P̂ = x0 . . . x` be the path from r = x0 to x = x` in T̂ . Let further F0 , . . . , F` be the fins of P̂ in T̂ . Then the subpath P [xi , xi+1 ] \ {xi+1 } is contained in the union of diblocks of Fi for 0 6 i < `. 11 Proof. By Lemma 9 we know that the nodes of P̂ appear in P in the correct order, hence the subpath P [xi , xi+1 ] is well-defined. Let us first show that the subpath P [xi , xi+1 ] \ {xi+1 } cannot intersect any diblock associated with T̂xi+1 . By Lemma 8, the only arcs from Bxi into diblocks below xi+1 connect to the bottleneck xi+1 itself. Since xi+1 is already the endpoint of P [xi , xi+1 ], this subpath cannot intersect the diblocks of T̂xi+1 . This already proves the claim for x0 ; it remains to show that it does not intersect diblocks of V (T̂ )\V (T̂xi ) for i > 1. The reason is similar: since the bottleneck xi is already part of P [xi , xi+1 ], this subpath could not revisit Bxi if it enters any diblock By for a proper ancestor y of xi in T̂ . We conclude that therefore it must be, with the exception of the vertex xi+1 , inside the diblocks of the fin Fi . Corollary 2. For every vertex u ∈ V (H) and every set X ⊆ V (H) \ (V (T̂ ) ∪ {u}) of non-bottleneck vertices there exists a path P from r to u in H such that |P ∩ X| 6 |X|/2. Proof. Assume that u ∈ Bx and let P̂ = x0 . . . x` be a path from x0 = r to x` = x in T̂ . Let further F0 , . . . , F` be the fins of P̂ in T̂ and Ui the union of diblocks associated with Fi , 0 6 i 6 `. We partition the set X into X1 , . . . , X` where Xi = X ∩ Ui for 0 6 i 6 `. Lemma 10 allows us to construct the path P iteratively: any path that leads to u will pass through bottlenecks xi , xi+1 in succession and visit only vertices in Ui in the process. Since there are two internally vertex-disjoint paths between xi , xi+1 for 1 6 i 6 `, we can always choose the path that has the smaller intersection with Xi . Stringing these paths together, we obtain the claimed path P . We want to argue that one of the following cases must hold: either the cut decomposition has bounded height and we can ‘re-root’ any out-tree with many leaves into a rooted out-tree with a comparable number of leaves, or we can directly construct a rooted out-tree with many leaves. In both cases we apply Lemmas 1 and 3 to conclude that the instance has a solution. This approach has one obstacle: internal diblocks of the decomposition that contain only two vertices. Definition 4 (Degenerate diblocks). Let {Bx }x∈T̂ be the cut decomposition rooted at s. We call a diblock Bx degenerate if x is an internal node of T̂ and |Bx | = 2. Let us first convince ourselves that a long enough sequence of non-degenerate diblocks provides us with a rooted out-branching with many leaves. Lemma 11. Let (T̂ , {Bx }x∈T̂ ) be the cut decomposition rooted at s of H and let y be a node in T̂ such that the path P̂sy from s to y in T̂ contains at least ` nodes whose diblocks are non-degenerate. Then H contains an out-tree rooted at s with at least ` leaves. Proof. We construct an s-rooted out-tree T by repeated application of Lemma 5. Let x1 , . . ., x` be a sequence of nodes in P̂sy whose diblocks are non-degenerate, 12 and for each 1 6 i < ` let x+ i be the node after xi in P̂sy . We construct a sequence of s-rooted out-trees T1 , . . ., T` such that for 1 6 i 6 `, the vertex xi is a leaf of Ti , and Ti contains i leaves. First construct T1 as a path from s to x1 , then for every 1 6 i < ` we construct an out-tree Ti+1 from Ti as follows. Let vi ∈ Bxi \ {xi , x+ i }, which exists since Bxi is non-degenerate, and let Pxi x+ , i Pxi vi be a pair of paths in D[Bx∗i ] from xi to x+ i and to vi respectively, which intersect only in xi . Such paths exist by Lemma 5, and since xi is a leaf of Ti , Lemma 9 implies that Ti is disjoint from Bx∗i \ {xi }. Hence the paths can be appended to Ti to form a new r-rooted out-tree Ti+1 in H which contains a leaf in every diblock Bxj , 1 6 i. Finally, note that the final tree T` contains two leaves in Bx`−1 , hence T` is an r-rooted out-tree with ` leaves. The next lemma is important to prove that Rooted k-Distinct Branchings is FPT for a special case of the problem considered in Lemma 13. Lemma 12. Let (T̂ , {Bx }x∈T̂ ) be the cut decomposition of D rooted at s such that T̂ is of height d and let T be an out-tree rooted at some vertex r with ` leaves. Then we can construct an out-tree Ts rooted at s with at least (` − d)/2 leaves. Proof. Assume that r is contained in the diblock Bx of the decomposition and let xp . . . x1 = P̂sx be a path from s = xp to x = x1 in T̂ . Let L be the leaves of T and let L0 := L \ P̂sx . Clearly, |L0 | > ` − d. Applying Corollary 2 with X = L0 and u = r, we obtain a path Psr in D from s to r that avoids half of L0 . We construct Ts in a similar fashion to the proof of Lemma 4. We begin with Ts = Psr , then for every leaf v ∈ L0 \ Psr , proceed as follows: let Pv be the unique path from r to v in T and let Pv0 be the segment of Pv from the last vertex x of Pv contained in Ts . Add all arcs and vertices of Pv0 to Ts . Since Pv and thus Pv0 contains no leaf of L0 other than v, in the end of the process, all vertices of L0 \ Psr are leaves of Ts . Since |L0 \ Psr | > |L0 |/2, we conclude that Ts contains at least (` − d)/2 leaves, as claimed. Using these results, we are now able to prove that if the height d of the cut decomposition of D is upper-bounded by a function in k, then Rooted kDistinct Branchings on D is FPT. Combined with Lemma 11, this implies that the remaining obstacle is cut decompositions with long chains of degenerate diblocks, which we will deal with in Section 4.3. Lemma 13. Let (T̂ , {Bx }x∈T̂ ) the cut decomposition rooted at s of height d. If d 6 d(k) for some function d(k) = Ω(k) of k only, then we can solve Rooted 2 k-Distinct Branchings on D in time O∗ (2O(d(k) log d(k)) ). Proof. By Theorem 2, in time O∗ (2O(d(k)) ) we can decide whether D has an outbranching with at least 2k + 2 + d(k) leaves. If D has such an out-branching, then by Lemma 12 D has a rooted out-tree with at least k + 1 leaves. This out-tree can be extended to a rooted out-branching with at least k + 1 leaves by Lemma 3. So by Lemma 1, (D, s, t) is a positive instance if and only if D has a rooted in-branching, which can be decided in polynomial time. 13 If D has no out-branching with at least 2k+2+d(k) leaves, by Theorem 1 the pathwidth of D is O(d(k) log d(k)) and thus by Lemma 2 we can solve Rooted 2 k-Distinct Branchings on D in time O∗ (2O(d(k) log d(k)) ). (Note that for the dynamic programming algorithm of Lemma 2 we may fix roots of all outbranchings and all in-branchings of D by adding arcs s0 s and tt0 to D, where s0 and t0 are new vertices.) 4.3 Handling degenerate diblocks The following is the key notion for our study of degenerate diblocks. Definition 5 (Degenerate paths). Let (T̂ , {Bx }x∈T̂ ) be a cut decomposition of D. We call a path P̂ in T̂ monotone if it is a subpath of a path from the root of T̂ to some leaf of T̂ . We call a path P̂ in T̂ degenerate if it is monotone and every diblock Bx , x ∈ P̂ is degenerate. Let (D, s, t) be a reduced instance of Rooted k-Distinct Branchings. As observed in Section 4.1, we can verify in polynomial time whether an arc participates in some rooted in- or out-branching. Let Rs ⊆ A(D) be those arcs that do not participate in any rooted out-branching and Rt ⊆ A(D) those that do not participate in any rooted in-branching. Since (D, s, t) is a reduced instance, we necessarily have that Rs ∩ Rt = ∅, a fact we will use frequently in the following. Corollary 1 provides us with an important subset of Rs : every arc that originates in a diblock Bx of the cut decomposition and ends in a bottleneck vertex that is an ancestor of x on T̂ is contained in Rs . Let us first prove some basic properties of degenerate paths. Lemma 14. Let (T̂ , {Bx }x∈T̂ ) be the cut-decomposition of D rooted at s, and let P̂ = x1 . . . x` be a degenerate path of T̂ . Then the following properties hold: 1. Every rooted out-branching contains A(P̂ ), 2. every arc xj xi with j > i is contained in Rs , and 3. there is no arc from xi (i < `) to By in D, where y is a descendant of xi on T̂ , except for the arc xi xi+1 . Proof. First observe that, by definition of a degenerate path, P̂ is a path in D. Every rooted out-branching contains in particular the last vertex x` of the path. By Lemma 9, it follows that P̂ is contained in the out-branching as a monotone path, hence it contains A(P̂ ). Consequently, no ‘back-arc’ xj xi with j > i can be part of a rooted out-branching and thus it is contained in Rs . For the third property, note that all arcs from xi except back arcs are contained in Bxi . Since Bxi is degenerate there can be only one such arc. For the remainder of this section, let us fix a single degenerate path P̂ = x1 . . . x` . We categorize the arcs incident to P̂ as follows: 1. Let A+ contain all ‘upward arcs’ that originate in P̂ and end in some diblock By where y is an ancestor of x1 , 14 2. let A0 contain all ‘on-path arcs’ xj xi , j > i, and 3. let A− contain all ‘arcs from below’ that originate from some diblock By where y is a (not necessarily proper) descendant of x` . By Lemma 14, this categorization is complete: no other arcs can be incident to P̂ in a reduced instance. By the same lemma, we immediately obtain that A0 , A− ⊆ Rs . We will now apply certain reduction rules to (D, s, t) and prove in the following that they are safe, with the goal of bounding the size of P̂ by a function of the parameter k. Reduction rule 1: If there are two arcs xi u, xj u ∈ A+ ∩ Rt with i < j, remove the arc xj u. Lemma 15. Rule 1 is safe. Proof. Since (D, s, t) is reduced, the arcs xi u and xj u cannot be in Rs . Pick any rooted out-branching T that contains the arc xj u. By Lemma 14, we have that P̂ ⊆ T , therefore we can construct an out-branching T 0 by exchanging the arc xj u for the arc xi u. Since a) no rooted in-branching contains either of these two arcs, and b) no out-branching can contain both, we conclude that (D \ {xj u}, s, t) is equivalent to (D, s, t) and thus Rule 1 is safe. Corollary 3. Let (D, s, t) be reduced with respect to Rule 1. Then we either find a solution for (D, s, t) or |A+ ∩ Rt | 6 2k + 1. Proof. Let H be the heads of the arcs A+ ∩ Rt . Since Rule 1 was applied exhaustively, no vertex in H is the head of two arcs A+ ∩ Rt ; therefore we have that |H| = |A+ ∩ Rt |. Note that any arc in A+ ∩Rt cannot be contained in Rs , therefore H does not contain any bottleneck vertices. Applying Corollary 2, we can find a path P` from s to x` that avoids half of the vertices in H. Thus we can add half of H as leaves to P` using the arcs from A+ ∩ Rt . Thus if |H| > 2k + 2, we obtain a rooted out-tree with at least k + 1 leaves, which by Lemmas 1 and 3 imply that the original instance has a solution. We conclude that otherwise |H| = |A+ ∩ Rt | 6 2k + 1. Lemma 16. Let P̂ = x1 . . . x` be a degenerate path. Assume t 6∈ P̂ and that (D, s, t) is reduced with respect to Rule 1. Let further X ⊆ V (P̂ ) be those vertices of P̂ that are tails of the arcs in A+ . We either find that (D, s, t) has a solution or that |X| 6 3k + 1. Proof. For every vertex xi ∈ X with an arc xi v ∈ A+ \ Rt , we construct a path P̃xi t from xi to t that contains xi v as follows: since xi v 6∈ Rt , there exists a rooted in-branching T̃ that contains xi v. We let P̃xi t ⊆ T̃ be the path from xi to t in T̃ . Claim. Each path P̃xi t does not intersect vertices in diblocks of T̂xi . 15 Since P̃xi t leaves P̂ via the first arc xi v, it cannot use the arc xi xi+1 . Since this is the only arc that leads to vertices in diblocks of T̂xi , the claim follows. Let us relabel the just constructed paths to P̃1 , . . . , P̃` such that they are sorted with respect to their start vertices on P̂ . That is, for i < j the first vertex of P̃i appears before the first vertex of P̃j on P̂ . We iteratively construct rooted in-trees T̃1 , . . . T̃` with the invariant that a) T̃i has exactly i leaves and b) does not contain any vertex of P̂ below the starting vertex of P̃i . Choosing T̃1 := P̃1 clearly fulfills this invariant. To construct T̃i from T̃i−1 for 2 6 i 6 `, we simply follow the path P̃i up to the first intersection with T̃i−1 . Since t ∈ P̃i ∩ T̃i−1 , such a vertex must eventually exist. By the above claim, P̃i does not contain any vertex below its starting vertex on P̂ , thus both parts of the invariant remain true. We conclude that T̃` is a rooted in-tree with ` leaves, where ` is the number of vertices in X that have at least one upwards arc not contained in Rt . For ` > k + 1, Lemmas 1 and 3 imply that the original instance has a solution. Otherwise, ` 6 k. By Corollary 3, we may assume that |A+ ∩ Rt | 6 2k + 1. Taken both facts together, we conclude that either |X| 6 3k + 1, or we can construct a solution. We will need the following. Lemma 17. Let P̂ = x1 . . . x` be a degenerate path and assume that t 6∈ P̂ . Let further Y ⊆ V (P̂ ) be those vertices of P̂ that are tails of the arcs in A0 . We either find that (D, s, t) has a solution or we have |Y | < k. Proof. We will construct a rooted in-tree that contains |Y | arcs from A0 . Since no rooted out-branching contains any such arc, this will prove that the instance is positive provided |Y | > k. Note in particular that we are not concerned with the number of leaves of the resulting tree. First associate every vertex v ∈ Y with an arc vxv ∈ A0 , where we choose xv to be the vertex closest to v. Let X + be the heads of all arcs in A+ and let X ⊆ P̂ be the tails of all arcs in A+ . Let u ∈ Y be the vertex that appears first on P̂ among all vertices in Y . Since uxu ∈ Rs , uxu cannot be contained in Rt . Accordingly there exists a path Pu from u to t that uses the arc uxu . Note that Pu leaves P̂ through an A+ -arc whose tail lies between xu and u on P̂ . Note that the segment Pu [xu , t], by our choice of u, does not contain any vertex of Y . We now construct the seed in-tree T0 as follows. We begin with Pu and add the arc u0 xu0 for every vertex u0 ∈ Y where xu0 ∈ Pu . Next, we add every vertex v ∈ X + to T0 by finding a path from v to t and attach this path up to its first intersection with T0 . Since v lies above xu in the decomposition, this path cannot intersect any vertex in Y . We form an in-forest5 F0 from the arcs of T0 and all arcs vxv , v ∈ Y that are not in T0 . Every in-tree T ∈ F0 has the following easily verifiable properties: 1. Its root is the highest vertex in the decomposition among all vertices V (T ) (recall Lemma 8), 5 An in-forest is a vertex-disjoint collection of in-trees. 16 2. its root is either t or a vertex xv with v ∈ Y , and 3. every segment P̂ [x, y] of P̂ contained in T has no vertex of X or Y with the possible exception of y ∈ Y . We will maintain all three of these properties while constructing a sequence of in-forests F0 ⊆ F1 ⊆ . . . where each in-forest in the sequence will have less roots than its predecessor (here ⊆ stands for Fi−1 being a subgraph of Fi ). We stop the process when the number of roots drop to one. The construction of Fi from Fi−1 for i > 1 works as follows. Let T ∈ Fi−1 be the in-tree with the lowest root in the in-forest. By assumption, Fi−1 has at least two roots, thus it cannot be t and therefore, by part 2 of our invariant, is a vertex xv with v ∈ Y . Now from xv onwards, we walk along the path P̂ until we encounter a vertex z that is either 1) the tail of an arc A+ or 2) a vertex of the in-forest Fi−1 . In the former case, we use the segment P̂ [xu , z] to connect T to a vertex in X + via the A+ -arc emanating from z. Since all vertices in X + are part of the seed in-tree T0 this preserves all three parts of the invariant and Fi−1 ⊆ Fi . Consider the second case: we encounter a vertex z that is part of some tree T 0 ∈ Fi−1 . Let us first eliminate a degenerate case: Claim. The trees T 0 and T are distinct. Assume towards a contradiction that T 0 = T . In that case, there is no single vertex between xv and z that is either the tail of an A+ or A0 -arc. If z is such that xz = xv (for example z = v), we already obtain a contradiction: the arc zxz cannot possibly be part of any in-branching rooted at t, contradicting the fact that it is not in Rt . Otherwise, z = xw for some w ∈ Y . By assumption, wz ∈ T , thus there exists a path Pwxv which contains both the arc wz as well as the arc vxv . Therefore, the vertex w must lie below v on P . Furthermore, the path Pwxv cannot contain any vertex above xv by property 1 of the invariant. It follows that the subpath P [z, v] is entirely contained in T —by property 3 of the invariant, none of the vertices (except v) in this subpath can be in X or Y . Since the same was true for the subpath P [xv , z], we conclude that the whole subpath P [xv , v] contains no vertex of X or Y . This contradicts our assumption that xv v 6∈ Rt and we conclude that T and T 0 must be distinct. By our choice of T , the vertex z cannot be the root of T 0 . Accordingly, we can merge T and T 0 by adding the path P̂ [xv , z]. This concludes our construction of Fi . Since the root of T 0 lies above all vertices of T , part 1) of the invariant remains true. We did not change a non-root to a root in this construction, thus part 2) remains true. The one segment of P̂ [xv , z] we added to merge T and T 0 did not, by construction, contain any vertex of Y or X, with the exception of the last vertex z, hence part 3) remains true. Finally, we clearly have that Fi−1 ⊆ Fi and the latter contains one less root than the former. The process clearly terminates with some in-forest Fp which contains a single in-tree T̃ . The root of this in-tree is necessarily t. Note further that F0 contained 17 all |Y | arcs uxu , u ∈ Y ; therefore T̃ contains those arcs, too. Since all of these arcs are in Rs , we arrive at the following: either |Y | < k, as claimed, or we found a rooted in-tree that avoids at least k arcs with every rooted out-branching, in other words, as solution to (D, s, t). Taking Lemma 16 and Lemma 17 together, we see that only O(k) vertices of a degenerate path are tails of arcs in A+ or A0 . The following lemma now finally lets us deal with degenerate paths: we argue that those parts of the path that contain none of these few ‘interesting’ vertices can be contracted. Reduction rule 2: If P̂ [x, y] ⊆ P̂ is such that no vertex in P̂ [x, y] is a tail of arcs in A+ ∪ A0 , contract P̂ [x, y] into a single vertex. Lemma 18. Rule 2 is safe. Proof. Simply note that every vertex in P̂ [x, y] has exactly one outgoing arc. We already know that every arc of P̂ must be contained in every rooted outbranching, now we additionally have that all arcs in P̂ [x, y] are necessarily contained in every rooted in-branching. We conclude that Rule 2 is safe. We summarize the result of applying Rules 1 and 2. Lemma 19. Let P̂ be a degenerate path in an instance reduced with respect to Rules 1 and 2. If t 6∈ P̂ then |P̂ | 6 8k + 1. Otherwise, |P̂ | 6 16k + 3. Proof. We may assume that t 6∈ P̂ as otherwise we can partition P̂ into its part before t and its part after t and obtain |P̂ | 6 16k + 3 from the bound on |P̂ | when t 6∈ P̂ . By Lemmas 16 and 17, the number of vertices on P̂ that are tails of either A+ or A0 is bounded by 4k. Between each consecutive pair of such vertices, we can have at most one vertex that is not a tail of such an arc. We conclude that |P̂ | 6 8k + 1, as claimed. Now we can prove the main result of this paper. Proof of Theorem 4. Consider the longest monotone path P̂ of T̂ . By Lemma 11, if P̂ has at least k + 1 non-degenerate diblocks, then D has a rooted out-tree with at least k + 1 leaves. This out-tree can be extended to a rooted out-branching with at least k + 1 leaves by Lemma 3. Thus, by Lemma 1, (D, s, t) is a positive instance if and only if D has a rooted in-branching, which can be decided in polynomial time. Now assume that P̂ has at most k non-degenerate diblocks. By Lemma 19 we may assume that before, between and after the non-degenerate diblocks there are O(k) degenerate diblocks. Thus, the height of T̂ is O(k 2 ). Therefore, by 2 2 Lemma 13, the time complexity for Theorem 4 is O∗ (2O(k log k) ). 18 5 Conclusion We showed that the Rooted k-Distinct Branchings problem is FPT for general digraphs parameterized by k, thereby settling open question of BangJensen et al. [6]. The solution in particular uses a new digraph decomposition, the rooted cut decomposition, that we believe might be useful for settling other problems as well. We did not attempt to optimize the running time of the algorithm of Theorem 4. Perhaps, a more careful handling of degenerate diblocks may lead to 2 an algorithm of running time O∗ (2O(k log k) ). Another question of interest is whether the Rooted k-Distinct Branchings problem admits a polynomial kernel. References [1] N. Alon, F. V. Fomin, G. Gutin, M. Krivelevich, and S. Saurabh. Spanning directed trees with many leaves. SIAM Journal on Discrete Mathematics, 23(1):466–476, 2009. [2] J. Bang-Jensen. Edge-disjoint in- and out-branchings in tournaments and related path problems. Journal of Combinatorial Theory, Series B, 51(1):1– 23, 1991. [3] J. Bang-Jensen and G. Gutin. Digraphs: Theory, Algorithms and Applications. Springer, 2002. [4] J. Bang-Jensen and J. Huang. Quasi-transitive digraphs. Journal of Graph Theory, 20:141–161, 1995. [5] J. Bang-Jensen and J. Huang. Arc-disjoint in- and out-branchings with the same root in locally semicomplete digraphs. Journal of Graph Theory, 77:278–298, 2014. [6] J. Bang-Jensen, S. Saurabh, and S. Simonsen. Parameterized algorithms for non-separating trees and branchings in digraphs. Algorithmica, 76(1):279– 296, 2016. [7] J. Bang-Jensen and S. Simonsen. Arc-disjoint paths and trees in 2-regular digraphs. Discrete Applied Mathematics, 161:2724–2730, 2013. [8] J. Bang-Jensen, S. Thomassé, and A. Yeo. Small degree out-branchings. Journal of Graph Theory, 42(4):297–307, 2003. [9] J. Bang-Jensen and A. Yeo. The minimum spanning strong subdigraph problem is fixed parameter tractable. Discrete Applied Mathematics, 156:2924–2929, 2008. 19 [10] K. Bérczi, S. Fujishige, and N. Kamiyama. A linear-time algorithm to find a pair of arc-disjoint spanning in-arborescence and out-arborescence in a directed acyclic graph. Information Processing Letters, 109(23-24):1227– 1231, 2009. [11] M. Cygan, F. Fomin, L. Kowalik, D. Lokshtanov, D. Marx, M. Pilipczuk, M. Pilipczuk, and S. Saurabh. Parameterized Algorithms. Springer, 2015. [12] J. Daligault, G. Gutin, E. J. Kim, and A. Yeo. FPT algorithms and kernels for the directed k-leaf problem. Journal of Computer and System Sciences, 76(2):144–152, 2010. [13] R. Downey and M. Fellows. Fundamentals of Parameterized Complexity. Springer, 2013. [14] J. Edmonds. Optimum branchings. Journal of Research of the National Bureau of Standards, Section B, 71B:233–240, 1967. [15] J. Edmonds. Edge-disjoint branchings. In B. Rustin, editor, Combinatorial Algorithms, pages 91–96. Academic Press, 1973. [16] A. Fradkin and P. Seymour. Tournament pathwidth and topological containment. Journal of Combinatorial Theory, Series B, 103(3):374–384, 2013. [17] K. Kawarabayashi and S. Kreutzer. The directed grid theorem. In Proceedings of the Forty-Seventh Annual ACM on Symposium on Theory of Computing, STOC 2015, pages 655–664, 2015. [18] I. Kim and P. D. Seymour. Tournament minors. Journal of Combinatorial Theory, Series B, 112:138–153, 2015. [19] J. Kneis, A. Langer, and P. Rossmanith. A new algorithm for finding trees with many leaves. Algorithmica, 61(4):882–897, 2011. 20
8cs.DS
Numerical model of elastic laminated glass beams under finite strain Alena Zemanová1 , Jan Zeman1,2 , and Michal Šejnoha1 1 arXiv:1303.6314v2 [cs.CE] 28 Nov 2013 Department of Mechanics, Faculty of Civil Engineering, Czech Technical University in Prague, Thákurova 7, 166 29 Prague 6, Czech Republic 2 Centre of Excellence IT4Innovations, VŠB-TU Ostrava, 17. listopadu 15/2172 708 33 Ostrava-Poruba, Czech Republic March 26, 2018 Abstract Laminated glass structures are formed by stiff layers of glass connected with a compliant plastic interlayer. Due to their slenderness and heterogeneity, they exhibit a complex mechanical response that is difficult to capture by single-layer models even in the elastic range. The purpose of this paper is to introduce an efficient and reliable finite element approach to the simulation of the immediate response of laminated glass beams. It proceeds from a refined plate theory due to Mau (1973), as we treat each layer independently and enforce the compatibility by the Lagrange multipliers. At the layer level, we adopt the finite-strain shear deformable formulation of Reissner (1972) and the numerical framework by Ibrahimbegović and Frey (1993). The resulting system is solved by the Newton method with consistent linearization. By comparing the model predictions against available experimental data, analytical methods and two-dimensional finite element simulations, we demonstrate that the proposed formulation is reliable and provides accuracy comparable to the detailed two-dimensional finite element analyzes. As such, it offers a convenient basis to incorporate more refined constitutive description of the interlayer. Keywords laminated glass; finite-strain Reissner beam theory; finite element method; Lagrange multipliers 1 Introduction Due to present trends in architecture and photovoltaics, the use of structural glass is expanding from traditional window panes to large-area surfaces, roof and floor systems, columns or staircases. This interest leads to an increased emphasis on the safety and the mechanical performance of structural members made of glass. Perhaps the most popular material system meeting these criteria is laminated glass. It is a composite structure produced by bonding multiple layers of glass together with a transparent plastic interlayer, typically made of polyvinyl butyral (PVB) foil [10, 27]. The interlayer absorbs the energy impact, thereby resisting the glass penetration, and keeps the layers of glass bonded when fractured. Laminated glass units exhibit a complex mechanical response, as a consequence of their heterogeneity. Namely, the contrast in elastic properties between glass and the interlayer typically exceeds three orders of magnitude, which renders classical laminate theories inapplicable since the glass layers deform mainly due to bending, whereas the interlayer experiences a pure shear. Moreover, PVB is a viscoelastic material exhibiting a high sensitivity to temperature changes, 1 e.g. [5]. Finally, glass structures are very slender and must be analyzed using geometrically non-linear theories. In practical applications, the behavior of laminated glass units is often approximated by an equivalent, geometrically linear, single-layer elastic system. According to the performance of the interlayer, we distinguish the layered case, in which the structure responds as an assembly of independent layers, and the monolithic model with thickness equal to the combined thickness of glass layers and interlayer. This approach was pioneered by experimental studies of Behr et al. [3], who demonstrated that the degree of coupling due to the interlayer is significant at room temperatures and ceases at elevated temperatures. This was extended later in [4] to quantify the validity of the monolithic approximation in terms of temperature range and load duration. Norville et al. [23] further refined these results by studying the shear coupling around the transition temperature of the interlayer and demonstrated that the performance of laminated units exceeds the layered limit even above the transition point. Vallabhan et al. [28] introduced a notion of the strength factor as a ratio between the maximal principal strength in the equivalent monolithic unit and the laminated system and demonstrated that it can reach values smaller than one for cases of practical interest. They attributed this to the effects of geometrical non-linearity which become significant earlier for the laminated units than for the monolithic ones. These developments have been recently put on a rigorous basis by Galuppi and Royer-Carfagni [8], who derived explicit variationally-based formulas for deflection- and stress-equivalent thicknesses of monolithic systems. Apart from experimental results, the validity of simplified models was assessed by several analytical studies. When restricting our attention to planar glass beams, the first study is due to Hooper [12], who derived a three-layer model under small deflections and presented the solution for the four point bending setup with different duration of loading and ambient temperatures. Later, Aşık and Tescan [2] extended this model to account for large deflections and demonstrated that they significantly contribute to the overall response when the normal forces start to develop, see also Section 5 for a concrete example. In the linear setting, Ivanov [17] proposed a procedure for thickness optimization of triplex glasses and Foraboschi [7] demonstrated that the empirical rules proposed by Behr et al. [4] may lead to unsafe designs. Recently, Schultze et al. [26] performed an experimental-analytical study into the response of the laminated structures used in photovoltaic applications under three-point bending. Even though the analytical approaches give valuable insight into the behavior of laminated glass structures, they still suffer from two major limitations. First, the only closed-form solutions we are aware of hold only in the absence of membrane effects. In the opposite case, the governing differential equations have to be discretized anyhow and the discrete problem is often solved using the problem-specific procedures that experience convergence problems, e.g. [1]. Second, the analytical approaches require the interlayer to be replaced by an equivalent elastic material, with properties adjusted to the loading duration and ambient temperature. As shown by Galuppi and Royer-Carfagni [9], this approach leads to significant errors in local stresses and strains. With these limitations in mind, we proposed in [30] a numerical approach to the analysis of laminated glass beams based on a refined laminate theory due to Mau [22]. In this framework, the structure is seen as an assembly of shear-deformable layers with independent kinematics, and the inter-layer interaction is enforced by the Lagrange multipliers. Such an approach may appear costly, as it increases the number of unknowns and tends to produce badly conditioned systems of equations, but it offers several advantages due to the modular format. Namely, each layer can be discretized by an appropriate type of finite elements, and different constitutive models can be used at the layer level (even in the multi-scale setting [29]). From the computational perspective, the resulting system is ideally suited for the deployment of efficient duality-based iterative solvers [20] that can also be extended to account for inter-layer delamination, e.g. [19, 25]. In this paper, we extend our previous results [30], valid in small strains, to the finite-strain 2 regime. For this purpose, each layer is modeled by the Reissner beam theory [24], briefly summarized in Section 2 in a variational format. Discretization in Section 3 is based on a robust finite element formulation proposed by Ibrahimbegović and Frey in [14] and later applied, e.g., to discrete materials modeling [13], or optimal control and design of structures [15]. In Section 4, we derive the discretized system arising from the optimality conditions of the associated constrained optimization problem, and perform its solution by the Newton method. Accuracy of the implementation is examined in Section 5 by verifying our results against data presented by Aşık and Tescan [2]. To make the paper self-contained, in Appendix A we collect the details on tangent operators needed when implementing the Newton method. Note that this paper is focused on the immediate elastic response of laminated structures. The effect of temperature-dependent viscous properties of the interlayer will be discussed independently and in more details in a forthcoming publication. The following nomenclature is used in the text. Scalar quantities are denoted by lightface letters, e.g. a, and the bold letters are reserved for matrices, e.g. a or A. AT standardly stands for the matrix transpose and A−1 for the matrix inverse. The subscript in parentheses, e.g. a(i) , is used to emphasize that the variable a is associated with the i-th layer. 2 Model formulation In our setting, a glass beam is considered as an assembly of three beams of identical length L, with the cross-section dimensions b × h(i) . Each layer is considered to behave according to the Reissner finite-strain beam theory [24], i.e. we assume that cross-sections remain planar, but not necessarily perpendicular to the deformed beam curve, and that the distance of a point at the cross-section from the centerline remains unchanged. For the i-th layer, the coordinates of a point in the deformed configuration can be determined as, Figure 1,  (i) (i) x(i) (X (i) , Z (i) ) = OX + X (i) + u0 (X (i) ) + sin ϕ(i) (X (i) ) Z (i) ,  (i) (i) z (i) (X (i) , Z (i) ) = OZ + w0 (X (i) ) + cos ϕ(i) (X (i) ) Z (i) , (i) (1a) (1b) (i) where OX and OZ stand for the coordinates of the beam origin, X (i) is the ordinate of a cross(i) (i) section, u0 and w0 are centerline displacements measured in the global coordinate system, ϕ(i) is the rotation of the cross-section, and Z (i) is the coordinate measured along the cross-section. The inter-layer interaction is ensured via the geometric continuity conditions at the interfaces between the layers (i = 1, 2) x(i) (X (i) , 12 h(i) ) − x(i+1) (X (i) , − 12 h(i+1) ) = 0, z (i) (X (i) , 21 h(i) ) − z (i+1) (X (i) , − 12 h(i+1) ) = 0. (2a) (2b) As demonstrated, e.g. by Ibrahimbegović and Frey [14] and Irschik and Gerstmayr [16], the Reissner beam theory can be consistently derived from the continuum framework by the Biot-type strain tensors for the kinematics parametrization (1). To this purpose, we use the deformation gradient in the form ∂x(i)  (i) F (i) (X (i) , Z (i) ) =  ∂X(i) ∂z ∂X (i)  3  ∂x(i) (i) (i) ∂Z (i)   (X , Z ), ∂z (i) ∂Z (i) (3) y, Y x, X b L z, Z Y (3) O X (3) h(3) (3) Z (3) ϕ(3) (3) w0 Z (3) Z (3) (3) u0 Figure 1: Kinematics of a cross section of the bottom layer of a laminated beam (i = 3). with individual entries provided by (i) F11 (i) F12 (i) (i)  dϕ(i) (X (i) ) (i) du0 (X (i) ) (i) (i) =1+ + cos ϕ (X ) Z , dX (i) dX (i)  = sin ϕ(i) (X (i) ) , (4a) (4b) (i)  dϕ(i) (X (i) ) (i) dw0 (X (i) ) (i) (i) − sin ϕ (X ) Z , dX (i) dX (i)  = cos ϕ(i) (X (i) ) . F21 = (4c) (i) (4d) F22 The deformation gradient F (i) admits a multiplicative decomposition F (i) (X (i) , Z (i) ) = R(i) (X (i) )U (i) (X (i) , Z (i) ), where the rotation matrix of the i-th layer is given by, recall Figure 1,    cos ϕ(i) (X (i) )  sin ϕ(i) (X (i) )  (i) R = , − sin ϕ(i) (X (i) ) cos ϕ(i) (X (i) ) and U (i) follows from the inverse relation  −1 U (i) (X (i) , Z (i) ) = R(i) (X (i) ) F (i) (X (i) , Z (i) ), (5) (6) (7) that provides (i) U11 = cos (i) U12 = 0, (i) U21 = sin (i) U22 = 1. (i) (i)  dw0 (X (i) ) du0 (X (i) )  dϕ(i) (X (i) ) (i) (i) (i) ϕ (X ) 1 + − sin ϕ (X ) + Z , (8a) dX (i) dX (i) dX (i) (8b) (i) (i)     dw0 (X (i) ) du0 (X (i) ) (i) (i) ϕ(i) (X (i) ) 1 + + cos ϕ (X ) , (8c) dX (i) dX (i) (8d) (i) (i)  Employing the definition of the Biot-type strain tensor, e.g. [18, Eq. (24.27)], H (i) (X (i) , Z (i) ) = U (i) (X (i) , Z (i) ) − I, 4 (9) the non-zero strain components are given by (i) (i) H11 (X (i) , Z (i) ) = E (i) (X (i) ) + K (i) (X (i) )Z (i) , H21 (X (i) ) = Γ(i) (X (i) ), (10) where E (i) , K (i) and Γ(i) denote the generalized normal strain, pseudo-curvature and shear strain introduced by Reissner [24]: (i) (i) E (i) = E(u0 , w0 , ϕ(i) ) (i)   dw0(i) (X (i) ) du0 (X (i) )  (i) (i) (i) (i) − 1, = cos ϕ (X ) 1 + − sin ϕ (X ) dX (i) dX (i) (i) (i) Γ(i) = Γ(u0 , w0 , ϕ(i) ) (i) (i) (i)  du0 (X (i) )  (i) (i) dw0 (X ) = sin ϕ(i) (X (i) ) 1 + , + cos ϕ (X ) dX (i) dX (i) dϕ(i) (X (i) ) (i) (i) . K (i) = K(u0 , w0 , ϕ(i) ) = dX (i) It is useful to express these relations in a compact form    (i)  (i) E u0   u(i) (X (i) ) = w0(i)  (X (i) ), E (i) (X (i) ) =  Γ(i)  (X (i) ), K (i) ϕ(i) (11a) (11b) (11c) (12) and denote by E(u) a mapping assigning the generalized strain measures to the generalized centerline displacements u according to Eq. (11). The model is completed by specifying the energy functionals associated with the deformation of the laminated beam. In particular, the internal energy of the i-th layer is provided by [14]  (i) Πint E (i) = (13) 1 2 Z L 0 2  2 (i) (i) 2 + E(i) I (i) K (i) (X (i) ) dX (i) , E(i) A(i) E (i) (X (i) ) + G(i) A(i) s Γ (X ) (i) where E(i) and G(i) denote the Young and shear moduli, and A(i) = bh(i) , As = 56 A(i) and 1 I (i) = 12 b(h(i) )3 stand for the the cross-section area, effective shear area, and the second moment of area, respectively. The external energy due to loading acting at the i-th layer assumes the form (i) Πext (i) u  =− Z 0 L (i) (i) w0 (X (i) )f Z (X (i) ) dX (i) − p(i) nX (i) (i) w0 (Xp(i) )F Z (Xp(i) ), (14) p=1 where, for simplicity, we assume that the structure is subjected to the distributed loading with (i) (i) (i) intensity f Z and to np(i) concentrated forces F Z acting at Xp . The total energy of the i-th layer is then given by    (i) (i) Π(i) u(i) = Πint E(u(i) ) + Πext u(i) , (15) and at the level of the whole structure it reads (1) Π u (2) ,u (3) ,u  = 3 X i=1 5  Π(i) u(i) . (16) 3 Finite element discretization It is convenient for the numerical treatment to discretize all layers identically with ne two-node (i) elements per each layer; by Ωe we denote the e-th element of the i-th layer. The displacement fields at the element level are approximated as (i) (i) w(i) u0 (x) ≈ N e (x)du(i) , ϕ(i) (x) ≈ N e (x)deϕ(i) for x ∈ Ωe(i) , (17) e , w0 (x) ≈ N e (x)de   ϕ(i) (i) (i) where N e is the matrix of piecewise linear basis functions, and e.g. de = ϕe,1 , ϕe,2 T collects the nodal rotations ϕ(i) , cf. Figure 2. j (3) (3) 1 i 1 2 (3) u0,e,1 ne e ϕe,1 ϕe,2 e (3) (3) Ωe w0,e,1 (3) Le 2 (3) (3) w0,e,2 u0,e,2 Figure 2: Scheme of discretization and element degrees of freedom. Inserting the approximate fields (17) into the energy functionals (15) results in e (i) Πint (u(i) ) ≈ n X e (i) Πint,e (d(i) e ), (i) Πext (u(i) ) ≈ e=1 n X e (i) Πext,e (de(i) ) e=1 =− n X (i) T d(i) f ext,e , e (18) e=1 (i) where the matrix de collects the nodal unknowns, h i (i) (i) (i) (i) (i) (i) T d(i) = , u w ϕ u w ϕ e 0,e,1 0,e,1 e,1 0,e,2 0,e,2 e,2 (19) (i) recall Figure 2, and f ext,e stores the corresponding generalized nodal forces. As demonstrated in detail by Ibrahimbegović and Frey [14], the normal and shear locking even for the non-linear kinematics can be suppressed by adopting the selective one-point integration of the corresponding terms in (13). Thus, the approximate generalized strain measures (11) are taken as element-wise constants:  1  (i) 1 (i) (i) (i) (i) Ee(i) (d(i) ) = L + ∆u (20a) e e 0,e cos βe − (i) ∆w0,e sin βe − 1, (i) Le Le  1 1  (i) (i) (i) (i) (i) (i) Γ(i) (20b) e (de ) = (i) Le + ∆u0,e sin βe + (i) ∆w0,e cos βe , Le Le (i) Ke(i) (d(i) e ) (i) (i) = ∆ϕe (i) Le (i) , (20c) (i) (i) (i) (i) with, e.g., ∆ϕe = ϕe,2 − ϕe,1 , βe = 21 (ϕe,1 + ϕe,2 ), and Le denoting the element length. The contribution of the e-th element to the internal energy simplifies to      (i) (i) (i) (i) (i) (i) 2 (i) (i) (i) (i) 2 (i) (i) (i) (i) 2 1 Πint,e (d(i) ) = E A E d + G A Γ d + E I K d Le . (21) e e s e e e e e 2 The discretization is completed by enforcing the inter-layer compatibility conditions (2a) at the element nodes, (i,i+1) cX,j (i,i+1) = 0, cZ,j = 0, (22) indexed at the level of a single layer by j = 1, 2, . . . , ne + 1, cf. Figure 1, and with (i,i+1) cX,j (i,i+1) cZ,j (i) (i+1) = u0,j − u0,j (i) (i+1) + 12 (h(i) sin ϕj + h(i+1) sin ϕj (i) (i+1) = − 21 (h(i) + h(i+1) ) + w0,j − w0,j 6 ), (i) (23a) (i+1) + 12 (h(i) cos ϕj + h(i+1) cos ϕj ). (23b) For later reference, these are introduced in a compact form as c(d) = 0, (24) where d = [d(1) , d(2) , d(3) ] is a 9(ne + 1) × 1 column matrix of nodal degrees of freedom and c collects the 4(ne + 1) compatibility conditions (22). 4 Governing equations The true nodal displacements d∗ follow from the minimization of the discretized energy functional 3 X ne X (i) (i) (i) Π(d) = Πint,e (d(i) (25) e ) + Πext,e (de ), i=1 e=1 subject to both kinematic constraints and compatibility conditions (22). While the kinematic constrains are dealt with by matrix reduction techniques, e.g. [18, Appendix A], the compatibility is enforced via the Lagrange multipliers [22, 29]. This procedure yields the Lagrangian function in the form 4(ne +1) X T L(d, λ) = Π(d) + λ c(d) = Π(d) + λm cm (d) (26) m=1 where λ is a 4(ne + 1) × 1 matrix storing the corresponding Lagrange multipliers. The corresponding Karush-Kuhn-Tucker optimality conditions read, e.g. [6, Chapter 14], ∇d L (d∗ , λ∗ ) = ∇Π(d∗ ) + ∇c(d∗ )T λ∗ = 0, ∗ ∗ ∗ ∇λ L (d , λ ) = c(d ) = 0, (27a) (27b) with ∇ denoting the gradient operator and ∇• designating the partial derivative with respect to variable •. These relations represent a system of non-linear equations, to be solved using the Newton iterative scheme. To that end, we assume that displacements at iteration (k d, k λ) are known and search for the iterative correction in the form k+1 The values of k+1 δd d = k d + k+1 δd. (28) are obtained by means of the linearized expressions ∇Π(k+1 d) ≈ ∇Π(k d) + ∇2 Π(k d)k+1 δd, c(k+1 d) ≈ c(k d) + ∇c(k d)k+1 δd, k+1 ∇c( 2 k k k+1 d) ≈ ∇c( d) + ∇ c( d) δd, (29a) (29b) (29c) which, when introduced into the optimality conditions (27a) and (27b), result in a linear system of equations, cf. [6] and [30], k   k  K k C T k+1 δd f int − f ext . (30) kC k+1 λ = − kc 0 Here, we employ the short-hand notation 4(ne +1) k 2 K = ∇ Π( d) + k k k X m=1 k λm ∇2 cm (k d) = K t (k d) + K λ (k d, k λ), (31a) C = ∇c(k d), (31b) k (31d) f int − f ext = ∇Π(k d), (31c) k c = c( d). 7 It follows from the specific form of the energy function (25) that the stiffness matrix K t and the matrices of internal f int and external forces f ext exhibit the block structure  (1)   (1)   (1)  K t (d(1) ) f int f ext    (2)   (2)  (2) (2) K t (d) =  (32)  , f int = f int  , f ext = f ext  . K t (d ) (3) (3) (3) (3) K t (d ) f int f ext For the i-th layer, these are obtained by the assembly of contributions of the e-th element [18], provided by (i) (i) (i) f int,e = ∂Πint,e (i) ∂de (i) K t,e , = ∂ 2 Πint,e (i) 2 ∂de (i) = ∂f int,e (i) ∂de . (33) In order to keep the paper self-contained, explicit expressions for the matrices needed to set up the linearized system (30) are summarized in Appendix A. Termination of the iterative process (30) is driven by two residuals [6, Section 14.1] k η1 = kk f int − f ext + k C Tk λk2 , kf ext k2 k η2 = kk ck2 , mini h(i) (34) quantifying the validity of the first-order optimality conditions (27) that are related to equilibrium conditions for all three layers and the displacement compatibility at inter-layer interfaces, respectively. This provides the last component of the non-linear iterative solver, the implementation of which is outlined in Algorithm 1. Algorithm 1: Conceptual implementation of the Newton method. Data: initial displacement 0 d, tolerances 1 and 2 Result: d∗ , λ∗ k ← 0, 0 λ ← 0, assemble k f int , k c and k C while (k η1 > 1 ) or (k η2 > 2 ) do assemble k K solve for (k+1 δd, k+1 λ) from Eq. (30) k+1 d ← k d + k+1 δd assemble k f int , k c and k C k ←k+1 d∗ ← k d, λ∗ ← k λ 5 Examples In this section, the proposed finite element formulation is verified and partially validated against two benchmarks after Aşık and Tescan [2], involving simply supported, Section 5.1, and fixedend, Section 5.2, three-layer beams subjected to three-point bending. The comparison is based on the centerline deflections and the extreme normal (at top and bottom surfaces) and shear stresses at the i-th layer. These quantities are obtained from the element-wise constant strain measures in the form     (i) (i) Se,top = E(i) Ee(i) − 12 Ke(i) h(i) , Se,bot = E(i) Ee(i) + 12 Ke(i) h(i) , Te(i) = G(i) Γe(i) , (35) cf. Eq. (10) and Eq. (20), and extrapolated to nodes by the least-square method assuming the piecewise linear distribution of stresses, e.g. [11]. Accuracy of our results against reference experimental data is quantified by ηexp = (•) − (•)exp , (•)exp 8 (36) and a similar approach is adopted for reference data obtained by analytical model (an) or twodimensional finite element simulations (num), both from [2]. Results of the finite-strain formulation are complemented with the small-strain version [30] that corresponds to the first iteration of Algorithm 1, and the linearized strain measures given by (i) Ee(i) (d(i) e )= ∆u0,e (i) Le (i) , (i) (i) Γ(i) e (de ) = βe + ∆w0,e (i) Le (i) , Ke(i) (d(i) e )= ∆ϕe (i) Le , recall Eq. (20). The corresponding stresses follow from the same relation as for the non-linear model, (35). For completeness, we also provide the response of the equivalent monolithic beam of total thickness (h(1) + h(2) + h(3) ) and the layered beam corresponding to two independent layers of thicknesses h(1) and h(3) , under the assumption of geometric linearity.1 Note that to avoid confusion with the terminology used for composite structures [22], the layered approximation will be referred to as two-layer and the present formulation is denoted as refined in what follows. 5.1 Simply supported beam The first example concerns a simply supported beam with a span of 0.8 m and the total length of 1 m, with a symmetric layer setup of 5–0.38–5 mm in thickness. The structure is subject to a concentrated force at the mid-span ranging from 50 to 200 N and the quantities of interest are registered at the bottom layer, cf. Figure 3(a). The material data for individual layers appear in Table 1.2 The problem was discretized with ne = 40 elements per layer (half if symmetry is exploited), in order to achieve the four-digit accuracy of the mid-span deflection for F = 200 N, and the tolerances of the iterative solver were set to 1 = 2 = 10−6 . Table 1: Material data for simply supported Property Young’s modulus of glass, E(1) = E(3) Shear modulus of glass, G(1) = G(3) Young’s modulus of PVB, E(2) Shear modulus of PVB, G(2) beam, after [2]. Value 64.5 GPa 26.2 GPa 3.61 MPa 1.28 MPa The centerline deflections as predicted by the considered models appear in Figure 3(b). In this case, the deflection of the refined formulation remains bounded by the two-layer and monolithic cases. The response of the laminated structure is in fact closer to the monolithic beam than to the layered approximation, thereby demonstrating that the interlayer provides sufficient coupling to achieve the composite action. We also observe, in agreement with assumptions of many analytical models discussed in Section 1, the absence of non-linear effects due to the statically-determinate character of the test. These findings are further supported by Table 2 collecting the numerical values of mid-span deflections and experimental data. The results confirm that predictions of the numerical scheme are in a perfect agreement with the analytical model and correlate well with the experimental data. The limit cases, on the other hand, are too far apart to be of practical use and exhibit errors that far exceed the difference between the refined models and experiments. 1 All results in the present section are reproducible with MATLAB R scripts available at http://arxiv.org/ abs/1303.6314. 2 Since PVB layer exhibits viscoelastic and temperature-dependent behavior, the shear modulus G(2) represents an effective secant value related to a given temperature and load duration. For example, for data presented in [7] and the temperature of 20◦ C, the value in Section 5.1 corresponds to loads with duration of ∼ 100 s, whereas the value in Section 5.2 corresponds to loads with duration of ∼ 1, 000 s. 9 glass 5 mm PVB 0.38 mm glass 5 mm F beam width 0.1 m 0.1 m (a) 0.4 m Deflection [mm] −2 0.4 m strain gage −1 1 2 (b) Two-layer 3 4 0.1 m Monolithic 0 0 0.1 Refined Linear∼non-linear 0.2 0.3 Distance [m] 0.4 0.5 Figure 3: Simply supported three-layer beam; (a) experiment setup and (b) centerline deflections for F = 50 N. (3) Table 2: Mid-span deflections w0 at X (3) = L/2 for the simply supported beam subjected to F = 50 N. Model Deflection [mm] ηexp [%] ηan [%] [2] Experiment 1.27 × -5.2 Analytical model[2] 1.34 5.5 × Refined linear 1.34 5.6 0.1 Refined non-linear 1.34 5.6 0.1 Monolithic linear 0.89 -30.1 -33.8 Two-layer linear 3.97 213 196 The response of the structure to an increasing force expressed in terms of the deflections and stresses appears in Tables 3 and 4, respectively. The data clearly demonstrate that the response of the structure remains linear even for larger loading; the differences appear only for F = 200 N and are indeed negligible. The deflections remain sufficiently accurate with respect to both the analytical model and experiments, while stress values display larger discrepancies. We attribute the ∼ 1.3% difference between the analytical and numerical models to the fact that Aşık and Tescan in [2] assume glass to deform exclusively in bending and the PVB layer in shear only, while the present approach accounts for both effects simultaneously in all layers. This error is still significantly smaller compared to the one measured against the experimental data, which might be attributed to inaccuracies in the experiment as explained in detail in [2]. The negligible difference between the linear and non-linear models is finally confirmed by the identical values of the normal and shear stresses, recall (35), shown in Figure 4. Their distribution, however, differs significantly from any single-layered approximation, as manifested by, e.g. the presence of non-zero shear and normal stresses at free ends of the beams and the non-uniform distribution of shear stresses along the beam axis. We also observe, in agreement with [2], that the distribution of extreme normal stresses is anti-symmetric in the vertical direc(1) (3) tion, i.e. Stop = −Sbot , and that shear strains in the interlayer (∼ 3%) are significantly larger than normal strains in the glass (≈ 10−4 ). 5.2 Fixed-end beam Effects of geometric non-linearity are illustrated by means of a thin 1.5 m long three-layer beam of thicknesses 2.12–0.76–2.12 mm subjected to a concentrated force at the mid-span with intensity ranging from 15 to 150 N, Figure 5(a). The tolerances for the Newton method were set to the same value as in the previous example, and so were the material constants for the glass layers. For the PVB interlayer, we used E(2) = 2.8 MPa and G(2) = 1 MPa.2 The reference data from [2] include the results of the analytical model, obtained by a finite-difference iterative solver [1], 10 (3) Table 3: Comparison of mid-span deflections w0 at X (3) = L/2 for the simply supported beam. Load [N] Reference data[2] Linear model Non-linear model wexp [mm] wan [mm] w [mm] ηexp [%] ηan [%] w [mm] ηexp [%] ηan [%] 50 1.27 1.34 1.34 5.6 0.1 1.34 5.6 0.1 100 2.55 2.69 2.68 5.2 -0.3 2.68 5.1 -0.3 150 4.12 4.03 4.02 -2.3 -0.1 4.02 -2.5 -0.3 200 5.57 5.38 5.37 -3.7 -0.3 5.35 -4.0 -0.6 (3) Shear stress T (2) [kPa] Normal stress [MPa] Table 4: Comparison of extreme stresses Sbot at X (3) = L/2 for the simply supported beam. Load [N] Reference data[2] Linear model Non-linear model Sexp [MPa] San [MPa] S [MPa] ηexp [%] ηan [%] S [MPa] ηexp [%] ηan [%] 50 9.55 7.23 7.14 -25.3 -1.3 7.14 -25.2 -1.3 100 12.34 14.45 14.27 15.7 -1.2 14.28 15.7 -1.2 150 21.89 21.68 21.41 -2.2 -1.2 21.42 -2.2 -1.2 200 26.27 28.90 28.55 8.6 -1.2 28.55 8.7 -1.2 Linear ∼ non-linear 5 2.5 (3) Sbot 0 (1) Stop −2.5 −5 0 0.1 0.2 0.3 Distance [m] 0.4 25 20 15 10 Linear ∼ non-linear 5 0 0.5 (a) 30 0 0.1 0.2 0.3 Distance [m] 0.4 0.5 (b) Figure 4: Stress distributions in simply supported three-layer beam; (a) normal and (b) shear stresses for F = 50 N. and of detailed two-dimensional large-deformation finite element simulations. To make a direct comparison to these values, we employ the same number of elements per layer, ne = 150, but analogous results are obtained for coarser discretizations. The centerline deflections for geometrically linear and non-linear refined beam formulations appear in Figure 5(b) and are compared with the response of equivalent monolithic and two-layer formulations. While the response of the linear model still falls within the monolithic–two-layer bounds (with a closer proximity to the monolithic beam), the deflection of the fully non-linear model is considerably smaller that for the monolithic case. Moreover, the gap between the monolithic and two-layer cases becomes even more pronounced than in the previous example. The detailed numerical values presented in Table 5 further support our findings. We see that the layered assumption as well as small-strain hypothesis are too conservative and lead to highly inefficient designs, as their errors exceed 100%. The accuracy of the monolithic approximation is comparable to the simply supported setup. Basically the same conclusions follow from the response of the structure to an increasing load, Tables 6 and 7. For the largest load of F = 150 N, the error of the linear laminated model reaches ∼ 800% for the deflections and ∼ 250% for the extreme stresses. The finitestrain formulation remains accurate in the whole range of loading, and the errors with respect to the detailed two-dimensional finite element model do not exceed ∼ 1% for the deflections and ∼ 2% for stresses. In fact, it slightly outperforms the analytical model [2] in terms of the stress values, probably due to the more refined representation of the deformation in individual layers 11 Deflection [mm] 0 glass 2.12 mm PVB 0.76 mm glass 2.12 mm F width 0.05 m 10 Refined non-linear 20 Monolithic Refined linear 30 40 Two-layer 50 0.75 m 0 0.75 m (a) 0.15 0.3 0.45 Distance [m] 0.6 0.75 (b) Figure 5: Fixed-end three-layer beam; (a) experiment setup and (b) centerline deflection for F = 15 N. (3) Table 5: Mid-span deflections w0 at X (3) = L/2 for the fixed beam subjected to F = 15 N. Model Deflection [mm] ηnum [%] ηan [%] 2D finite element model[2] 5.92 × 0.0 [2] Analytical model 5.92 0.0 × Refined linear 14.44 144 144 Refined non-linear 6.00 1.3 1.3 Monolithic linear 7.85 32.6 32.6 Two-layer linear 51.48 770 770 50 Linear Non-linear 15 10 5 0 −5 −10 −15 (1) (3) Stop Sbot (3) Sbot 0 Shear stress T (2) [kPa] Normal stress [MPa] as discussed above. Unlike the previous example, the stress distributions for the linear and non-linear models differ to a significant amount. As for the extreme normal stresses, Figure 6(a), in the nonlinear model their magnitude reaches ∼ 65% of the value obtained by the linear one and their (1) (3) distribution is no longer antisymmetric in the thickness direction, i.e. Stop 6= −Sbot . These effects are due to additional membrane stresses acting in the glass layers. The same mechanism reduces the magnitude of the shear stresses in the interlayer to ∼ 40% of value determined for the linear analysis, Figure 6(b). We note again that these observations are in an agreement with the results reported by Aşık and Tescan [2]. 0.15 (1) Stop 0.3 0.45 Distance [m] 0.6 (a) 30 20 10 0 0.75 Linear Non-linear 40 0 0.15 0.3 0.45 Distance [m] 0.6 0.75 (b) Figure 6: Stress distributions in fixed-end three-layer beam; (a) normal and (b) shear stresses for F = 15 N. As the final check of our implementation, in Table 8 we present the convergence progress for the load level F = 150 N. In order to investigate reliability of the method, we expose the structure to the full load, instead of applying it incrementally as in [2]. The results confirm significant 12 Table 6: Comparison of mid-span Load [N] Reference data[2] wan [mm] wnum [mm] 15 5.92 5.92 30 8.10 8.10 45 9.60 9.60 60 10.78 10.78 90 12.64 12.63 120 14.10 14.09 150 15.34 15.32 (3) deflections w0 at X (3) = L/2 Linear model w [mm] ηan [%] ηnum [%] 14.44 143.9 143.9 28.88 256.6 256.6 43.32 351.3 351.3 57.76 435.9 435.9 86.65 585.5 586.0 115.53 719.4 719.9 144.41 841.4 842.6 for the fixed-end beam. Non-linear model w [mm] ηan [%] ηnum [%] 6.00 1.3 1.3 8.17 0.8 0.8 9.66 0.6 0.6 10.83 0.5 0.5 12.68 0.3 0.4 14.14 0.3 0.3 15.36 0.1 0.3 (3) Table 7: Comparison of extreme stresses Sbot at X (3) = L/2 for the fixed-end beam. Load [N] Reference data[2] Linear model Non-linear model San [MPa] Snum [MPa] S [MPa] ηan [%] ηnum [%] S [MPa] ηan [%] ηnum [%] 15 12.87 12.46 19.51 51.6 56.6 12.60 -2.1 1.1 30 20.69 19.89 39.02 88.6 96.2 20.12 -2.7 1.2 45 27.13 25.94 58.53 115.7 125.6 26.28 -3.2 1.3 60 32.82 31.25 78.03 137.8 149.7 31.69 -3.4 1.4 90 42.82 40.51 117.05 173.4 188.9 41.18 -3.8 1.6 120 51.68 48.64 156.07 202.0 220.9 49.53 -4.2 1.8 150 59.76 56.00 195.09 226.4 248.4 57.13 -4.4 2.0 degree of non-linearity in the structural response. After the first iteration, corresponding to the linear model, the structure is in an out-of-equilibrium state and the layer compatibility is violated. In the following iterations, the residuals are gradually reduced in a non-monotonic way until the ninth iteration, after which the method exhibits quadratic convergence in the equilibrium residual η1 and super-linear convergence in the compatibility residual η2 . This behavior is in full agreement with available results for the Newton method, e.g. [6, Theorem 13.6], and also explains the convergence difficulties of the heuristic finite-difference solver reported in [2]. Table 8: Convergence of residuals, defined by Eq. (34), for F = 150 N. kη kη Iteration k 1 2 1 8.49 × 102 7.94 × 10−1 2 1.50 × 103 4.65 × 10−1 3 1.02 × 102 6.12 × 10−2 2 4 2.07 × 10 5.61 × 10−2 1 5 2.31 × 10 1.11 × 10−2 6 2.43 × 101 7.53 × 10−3 0 7 4.93 × 10 2.58 × 10−3 8 1.41 × 100 8.17 × 10−4 −1 9 1.38 × 10 8.23 × 10−5 −3 10 1.58 × 10 8.33 × 10−7 11 2.53 × 10−7 1.18 × 10−10 13 6 Conclusions In this paper, we have presented an efficient approach to the analysis of the laminated glass beams. Based on the Mau theory for layered structures, it treats each layer separately and enforces the inter-layer compatibility by the Lagrange multipliers. In our implementation, we utilize a reliable finite element formulation of the Reissner finite-strain beam theory due to Ibrahimbegović and Frey to discretize individual layers, and solve the resulting system of equations iteratively by the Newton method with consistent linearization. On the basis of the performed simulations, we conjecture that • in the absence of membrane effects, the formulation reduces exactly to the small-strain model introduced in our previous work, • although the discretization is based on the lowest-order polynomial basis functions, the method provides results with accuracy comparable to the detailed two-dimensional largestrain finite element simulations, • the Newton method exhibits a reliable super-linear convergence even for high degrees of non-linearity. Extension of the current framework to include temperature- and time-dependent properties of the interlayer will be reported independently. Acknowledgments The authors thank Professor Jiřı́ Šejnoha of CTU in Prague for his helpfully comments on the original manuscript. This work was supported by the Czech Science Foundation, projects No. P105/12/0331 (AZ) and No. P105/11/0224 (MŠ), and by the Grant Agency of the Czech Technical University in Prague, project No. SGS13/034/OHK1/1T/11 (JZ, MŠ). In addition, JZ acknowledges the partial support of the European Regional Development Fund under the IT4Innovations Centre of Excellence, project No. CZ.1.05/1.1.00/02.0070. References [1] M. Z. Aşık, Laminated glass plates: revealing of nonlinear behavior, Computers & Structures 81 (2003), no. 28–29, 2659–2671. [2] M. Z. Aşık and S. Tezcan, A mathematical model for the behavior of laminated glass beams, Computers & Structures 83 (2005), no. 21–22, 1742–1753. [3] R. A. Behr, J. E. Minor, M. P. Linden, and C. V. G Vallabhan, Laminated glass units under uniform lateral pressure, Journal of Structural Engineering 111 (1985), no. 5, 1037–1050. [4] R. A. Behr, J. E. Minor, and H. S. Norville, Structural behavior of architectural laminated glass, Journal of Structural Engineering 119 (1993), no. 1, 202–222. [5] S. J. Bennison, A. Jagota, and C. A. Smith, Fracture of Glass/Poly(vinyl butyral) (Butacite R ) laminates in biaxial flexure, Journal of the American Ceramic Society 82 (1999), no. 7, 1761–1770. [6] J. F. Bonnans, J. C. Gilbert, C. Lemaréchal, and C. A. Sagastizábal, Numerical optimization: Theoretical and practical aspects, Springer, 2003. [7] P. Foraboschi, Behavior and failure strength of laminated glass beams, Journal of Engineering Mechanics 133 (2007), no. 12, 1290–1301. 14 [8] L. Galuppi and G. F. Royer-Carfagni, Effective thickness of laminated glass beams: New expression via a variational approach, Engineering Structures 38 (2012), 53–67. [9] , Laminated beams with viscoelastic interlayer, International Journal of Solids and Structures 49 (2012), no. 18, 2637–2645. [10] M. Haldimann, A. Luible, and M. Overend, Structural use of glass, Structural Engineering Documents, vol. 10, IABSE, Zürich, Switzerland, 2008. [11] E. Hinton and J. S. Campbell, Local and global smoothing of discontinuous finite element functions using a least squares method, International Journal for Numerical Methods in Engineering 8 (1974), no. 3, 461–480. [12] J.A Hooper, On the bending of architectural laminated glass, International Journal of Mechanical Sciences 15 (1973), no. 4, 309–323. [13] A. Ibrahimbegović and A. Delaplace, Microscale and mesoscale discrete models for dynamic fracture of structures built of brittle material, Computers & Structures 81 (2003), no. 12, 1255–1265. [14] A. Ibrahimbegović and F. Frey, Finite element analysis of linear and non-linear planar deformations of elastic initially curved beams, International Journal for Numerical Methods in Engineering 36 (1993), no. 19, 3239–3258. [15] A. Ibrahimbegović, C. Knopf-Lenoir, A. Kučerová, and P. Villon, Optimal design and optimal control of structures undergoing finite rotations and elastic deformations, International Journal for Numerical Methods in Engineering 61 (2004), no. 14, 2428–2460. [16] H. Irschik and J. Gerstmayr, A continuum mechanics based derivation of Reissner’s largedisplacement finite-strain beam theory: the case of plane deformations of originally straight Bernoulli-Euler beams, Acta Mechanica 206 (2009), no. 1, 1–21. [17] I. V. Ivanov, Analysis, modelling, and optimization of laminated glasses as plane beam, International Journal of Solids and Structures 43 (2006), no. 22–23, 6887–6907. [18] M. Jirásek and Z. P. Bažant, Inelastic analysis of structures, John Wiley & Sons, Ltd., 2002. [19] J. Kruis and Z. Bittnar, Reinforcement-matrix interaction modeled by FETI method, Domain Decomposition Methods in Science and Engineering XVII (U. Langer, M. Discacciati, D.E. Keyes, O.B. Widlund, and W. Zulehner, eds.), Lecture Notes in Computational Science and Engineering, vol. 60, Springer, Berlin, Heidelberg, 2008, pp. 567–573. [20] J. Kruis, K. Matouš, and Z. Dostál, Solving laminated plates by domain decomposition, Advances in Engineering Software 33 (2002), no. 7–10, 445–452. [21] A. Kučerová, Optimisation de forme et contrôle de chargement des structures elastique soumis de rotation finis en utilisant les algorithmes génétiques, Master’s thesis, Ecole Normale Supérieure de Cachan, 2003, available at http://klobouk.fsv.cvut.cz/~anicka/ publications/DEA_MaiSE_2003.pdf. [22] S. T. Mau, A refined laminated plate theory, Journal of Applied Mechanics–Transactions of the ASME 40 (1973), no. 2, 606–607. [23] H. S. Norville, K. W. King, and J. L. Swofford, Behavior and strength of laminated glass, Journal of Engineering Mechanics 124 (1998), no. 1, 46–53. 15 [24] E. Reissner, On one-dimensional finite-strain beam theory: the plane problem, Journal of Applied Mathematics and Physics 23 (1972), no. 5, 795–804. [25] T. Roubı́ček, M. Kružı́k, and J. Zeman, Delamination and adhesive contact models and their mathematical analysis and numerical treatment, Mathematical Methods and Models in Composites (V. Mantič, ed.), Computational and Experimental Methods in Structures, vol. 5, World Scientific, 2013, pp. 349–400. [26] S.-H. Schulze, M. Pander, K. Naumenko, and H. Altenbach, Analysis of laminated glass beams for photovoltaic applications, International Journal of Solids and Structures 49 (2012), no. 15–16, 2027–2036. [27] G. Sedlacek, K. Blank, and J. Guesgen, Glass in structural engineering, Structural Engineer 73 (1995), no. 2, 17–22. [28] C. V. G. Vallabhan, J. E. Minor, and S. R. Nagalla, Stress in layered glass units and monolithic glass plates, Journal of Structural Engineering 113 (1987), 36–43. [29] M. Šejnoha, Micromechanical modeling of unidirectional fibrous plies and laminates, Ph.D. thesis, Rensselaer Polytechnic Institute, Troy, NY, 1996. [30] A. Zemanová, J. Zeman, and M. Šejnoha, Simple numerical model of laminated glass beams, Acta Polytechnica 48 (2008), no. 6, 22–26. A Sensitivity analysis The expression for the internal nodal forces follows directly from Eq. (33)1 . After certain manipulations we arrive at, cf. [21]  (i)    (i) (i) (i) (i) (i) fint,e,1 −E(i) A(i) Ee cos βe − G(i) As Γe sin βe  (i)    (i) A(i) E (i) sin β (i) − G(i) A(i) Γ(i) cos β (i) fint,e,2    E e e s e e     f (i)   − 1 (L(i) + ∆u(i) )f (i) + 1 ∆w(i) f (i) − E(i) I (i) K (i)  e   int,e,3   2 e (i) 0,e int,e,2 0,e int,e,1 2 f int,e =  (i)  =  (37) . (i) fint,e,4    −f int,e,1     (i) f (i)    −fint,e,2  int,e,5    (i) fint,e,6 (i) (i) (i) (i) (i) (i) − 12 (Le + ∆u0,e )fint,e,2 + 12 ∆w0,e fint,e,1 + E(i) I (i) Ke By an analogous procedure one obtains from Eq. (33)2  (i) (i) (i) (i) Kt,e,11 Kt,e,12 Kt,e,13 −Kt,e,11  (i) (i) (i) (i)  Kt,e,12 Kt,e,22 Kt,e,23 −Kt,e,12  (i) (i) (i)  K (i) Kt,e,23 Kt,e,33 −Kt,e,13  (i) t,e,13 K t,e =  (i) (i) (i) (i)  −Kt,e,11 −Kt,e,12 −Kt,e,13 Kt,e,11  (i) (i) (i)  −K (i) Kt,e,12  t,e,12 −Kt,e,22 −Kt,e,23 (i) (i) (i) (i) Kt,e,13 Kt,e,23 Kt,e,36 −Kt,e,13 16 (i) −Kt,e,12 (i) −Kt,e,22 (i) −Kt,e,23 (i) Kt,e,12 (i) Kt,e,22 (i) −Kt,e,23 (i) Kt,e,13   (i) Kt,e,23   (i) Kt,e,36   , (i) −Kt,e,13   (i) −Kt,e,23   (i) Kt,e,33 (38) where the individual entries read (i) (i) Kt,e,11 = ∂fint,e,1 (i) ∂u0,e,1 1  = (i)  2 (i) E(i) A(i) cos2 βe(i) + G(i) A(i) , s sin βe 1  Le (i) (i) Kt,e,12 = ∂fint,e,1 (i) ∂w0,e,1 = (i) 2Le  −E(i) A(i) + G(i) A(i) sin 2βe(i) , s (i) (i) Kt,e,13 = ∂fint,e,1 (i) ∂ϕe,1 1 2 = (i) (i) Kt,e,22 = ∂fint,e,2 (i) ∂w0,e,1 h   i (i) (i) E(i) A(i) − G(i) As(i) Ee(i) sin βe(i) + Γ(i) − G(i) A(i) , e cos βe s sin βe 1  = (i) Le  E(i) A(i) sin2 βe(i) + G(i) As(i) cos2 βe(i) , (i) (i) Kt,e,23 = ∂fint,e,2 (i) ∂ϕe,1 = 1 2 h   i (i) (i) E(i) A(i) − G(i) As(i) Ee(i) cos βe(i) − Γ(i) − G(i) A(i) , e sin βe s cos βe = 1 2 h   i E(i) I (i) (i) (i) (i) (i) , − L(i) e + ∆u0,e Kt,e,23 + ∆w0,e Kt,e,13 + (i) Le (i) (i) Kt,e,33 = ∂fint,e,3 (i) ∂ϕe,1 (i) (i) Kt,e,36 = ∂fint,e,3 (i) ∂ϕe,2 (i) = Kt,e,33 − 2E(i) I (i) (i) Le . The remaining terms in the system (30) originate from the compatibility conditions (22). In particular, the matrix C is analogous to the small-strain tying condition [30, Section 4]. The block of C, associated with a node j and layers i and (i + 1) attains the form " # (i) (i+1) 1 (i+1) 1 0 12 h(i) cos ϕj · · · −1 0 h cos ϕ (i,i+1) j 2 Cj = (39) (i) (i+1) . 0 1 − 12 h(i) sin ϕj · · · 0 −1 − 12 h(i+1) sin ϕj The second derivatives of the compatibility conditions quantify their contributions to the tangent stiffness (i,i+1) K λ,j (i,i+1) = ∂ 2 cX (i,i+1) ∂dj (i,i+1) 2 λX,j This additional term is expressed as  0 0 0 0 0 0   (i,i+1) 0 0 K (i) λ,ϕj  . . (i,i+1) .. K λ,j = .  .. ..  0 0 0  0 0 0  0 0 0 (i,i+1) + ··· ··· ··· .. . ··· ··· ··· ∂ 2 cZ (i,i+1) 2 ∂dj 0 0 0 0 0 0 (i,i+1) λZ,j . (40)  0 0 0 .. .. .. . . . 0 0 0 0 0 0 (i,i+1) 0 0 K (i+1)       ,       (41) λ,ϕj with non-zero entries provided by K (i,i+1) (i) λ,ϕj K (i,i+1) (i+1) λ,ϕj (i) (i,i+1) = − 12 h(i) (sin ϕj λX,j (i+1) (i,i+1) λX,j = − 21 h(i+1) (sin ϕj 17 (i) (i,i+1) + cos ϕj λZ,j ), (i+1) (i,i+1) λZ,j ). + cos ϕj (42a) (42b)
5cs.CE
To appear in Proc. of 3rd IFAC Workshop on Automatic Control in Offshore Oil and Gas Production, Esbjerg, Denmark, May 30–June 01, 2018. arXiv:1802.05698v1 [cs.NE] 15 Feb 2018 A Machine Learning Approach for Virtual Flow Metering and Forecasting Nikolai Andrianov∗ January 8, 2018 Abstract We are concerned with robust and accurate forecasting of multiphase flow rates in wells and pipelines during oil and gas production. In practice, the possibility to physically measure the rates is often limited; besides, it is desirable to estimate future values of multiphase rates based on the previous behavior of the system. In this work, we demonstrate that a Long Short-Term Memory (LSTM) recurrent artificial network is able not only to accurately estimate the multiphase rates at current time (i.e., act as a virtual flow meter), but also to forecast the rates for a sequence of future time instants. For a synthetic severe slugging case, LSTM forecasts compare favorably with the results of hydrodynamical modeling. LSTM results for a realistic noizy dataset of a variable rate well test show that the model can also successfully forecast multiphase rates for a system with changing flow patterns. 1 Introduction Accurate multiphase flow rate measurement is an indispensable tool for production optimization from oil and gas fields, especially in an offshore environment (see e.g. [3]). Currently, there are two industry-accepted solutions for providing such measurements: using test separators and using multiphase flow meters. While these approaches have their advantages and disadvantages of (see e.g. [8]), both of them require hardware installations. This can limit the applicability of physical metering devices due to possible transportation issues, space and security considerations, and high costs. A virtual flow meter (VFM) is a mathematical model which allows to estimate multiphase rates using available data on the flow. A VFM, primarily using readily ∗ The Danish Hydrocarbon Research and Technology Centre, Technical University of Denmark, 2800 Kgs. Lyngby, Denmark. E-mail: [email protected]. 1 available cheap measurements (such as pressure and temperature), can potentially serve as a cost-efficient addition to physical flow metering devices. VFM models can be classified as hydrodynamical or data-driven. In the hydrodynamical approach one typically solves the phase conservation equations in a pipe geometry, which requires the choice of an adequate mathematical model, appropriate numerical method, and availability of a large number of input data. An advantage of this method is that one can estimate various parameters at arbitrary points of the flowline. A comparison of several hydrodynamical VFMs is presented in [2]. The data-driven approach is a system identification tool, which requires the user to accept one of generic model structures. Such models exploit no prior knowledge on the flow and produce essentially data descriptions. In practice, it is easier to setup a data-driven model as compared to a hydrodynamical one. However, data-driven predictions do not have a physical interpretation and it is not possible to estimate parameters with no historical data. Despite these shortcomings, the use of data-driven VFMs is gaining momentum in the industry, see [5]. One important difference between hydrodynamical and data-driven VFMs is the ability of the latter not only to predict rates (i.e., estimate rates at the current time instant tn ), but also to forecast rates at future time instants tn+1 , tn+2 , . . . . Indeed, without a priori knowledge of time-varying boundary conditions, a hydrodynamical model is only able to yield forecasts at the next time instant tn+1 . The goal of the present paper is to evaluate the forecasting capability of a class of data-driven VFMs which use artifical neural networks (ANNs). Feedforward ANNs have been successfully used in VFM predictions by many authors (see e.g. [1] and the references therein). However, the forecasting capability of feedforward ANNs is limited because they are unaware of the temporal structure or order between observations. Recent results in such applications as automatic text translation and image captioning suggest that the Long Short-Term Memory (LSTM) model of [9] is a efficient tool for time series forecasting. In order to assess the LSTM model performance for VFM applications, we consider a synthetic two-phase severe slugging case (see [4]) and a realistic threephase well testing dataset. For the severe slugging data set, we demonstrate superior performance of LSTM as compared to the feedfoward ANN sliding window approach. We investigate the LSTM convergence as a function of provided distributed pressure measurements and determine the optimal model configuration. For the variable rate well test data set, we show that LSTM can successfully handle a noizy dataset, describing a system with changing flow patterns. The accuracy of the forecast improves with the the number of flow periods used for training the model. 2 2 LSTM Model Setup Consider a time series {x(ti )} and {y(ti )}, where x(ti ) is a m-dimensional vector of input features and y(ti ) is a n-dimensional vector of output features values at equally spaced time instants ti . In VFM applications, features are the measurement data acquired at different points of the flowline. One can select the sets of the input and output features independently from each other. In particular, a feature can simultaneously be used for both input and output (e.g., we might be willing to forecast future values of a flow rate from its past values). We are interested in forecasting the sequences of output features of length lo using the sequences of input features of length li . To this end, the terms x(ti ) and y(ti ) from the training interval [t0 , tL ] are divided into N overlapping sequences of length l = li + lo , shifted by an indentation step s. The result can be cast in form of the training array   x(t0 ) . . . x(tli −1 )  x(ts ) . . . x(ts+li −1 )   X= (2.1)  .........................  x(tL−l+1 ) . . . x(tL−lo ) and the target array   y(tli ) . . . y(tl−1 )  y(ts+li ) . . . y(ts+l−1 )   Y=  ......................... , y(tL−lo +1 ) . . . y(tL ) (2.2) so that X ∈ RN ×li ×m and Y ∈ RN ×lo ×n . LSTM maps an input sequence x(tk ), . . . , x(tk+li −1 ) to the output sequence ŷ(tk+li ), . . . , ŷ(tk+l−1 ) for k = 0, . . . , N via a composition of linear transformations and nonlinear activation functions. The weights of the linear transformations are iteratively updated to minimize a loss function, which penalizes the distance between the output and the target sequences. The original LSTM by [9] is limited to the case when li = lo ; [6] and [12] introduced an encoder-decoder architecture to generalize the LSTM applicability for cases with li 6= lo . See [11] for a review. In this work, we use Keras implementation of LSTM, see [7]. The simulation scripts with the corresponding datasets (see below) are publicly available under https://github.com/nikolai-andrianov/VFM/. 3 3 3.1 Experiments Severe Slugging Case Consider a two-phase isothermal gas-liquid flow in a 60 m section of an offshore pipeline, ending with a 14 m long riser. The flow can be described by a set of partial differential equations, expressing conservation of mass and momentum for the phases. We will be using the mathematical model, numerical method, and the specifications for the test case, presented in [4]. Under certain constant boundary conditions at the pipeline inlet and at the riser outlet, the numerical solution exhibits a typical severe slugging behaviour, see Fig. 1. Liquid rate (kg/sec) Liquid rate at the riser bottom 15 300 10 Liquid rate at t=800.8000 300 200 200 5 100 100 0 0 0 0 1000 50 Pressure at the riser bottom 2.2 Pressure (bar) 500 15 10 2 55 60 Pressure at t=800.8000 2 1.8 5 1.8 1.6 0 1.6 0 500 Time (sec) 1000 50 55 Position (m) 60 Fig. 1. A snapshot of the numerical solution for the severe slugging case at intermediate time instant. We will utilize this numerical solution as a “ground truth” for forecasting the liquid and gas rates at the riser bottom using the data from virtual pressure gauges distributed along the flowline, see Fig. 2. In order to run LSTM forecasts, we resample the normalized pressure and flow rate data with a uniform timestep of 1 sec, and use half of the total hydrodynamical simulation time as a training interval, [t0 , tL ] = [0, 1500] sec. We first analyze the quality of LSTM forecasts when the network is trained using only pressure readings as input and liquid rate as output. The training 4 Distributed pressure readings 2.2 p(x1 = 56.94) p(x2 = 60.41) p(x3 = 62.72) p(x4 = 65.61) p(x5 = 68.50) p(x6 = 71.39) p(x7 = 73.71) 2.0 Pressure (bar) 1.8 1.6 1.4 1.2 1.0 0 500 1000 1500 Time (sec) 2000 2500 3000 Fig. 2. Pressure data used as input to forecast the flow rates. data is divided into N = 1127 sequences of length l = 374 sec with li = lo , shifted by the indentation step s = 1 sec. The network details are given below: • Deep LSTM with 3 hidden layers and 10 memory cells at each layer; • Total number of trainable parameters is 2171, . . . , 2411 with validation split of 0.05 for the number of input features m = 1, . . . , 7 and number of output features n = 1; • Fixed random seed for repeatability in parameter initialization; • Mean squared error (MSE) loss function and Adam optimizer of [10] with batch size of 1 and number epochs equal to 10. These network training parameters were determined by trial-and-error. For the case considered, the forecasting results were most sensitive to the number and lengths of input/output sequences. 5 Liquid rate forecast Ground truth Forecast using p(x1, , 7) Forecast using p(x1, , 6) Forecast using p(x1, , 5) Forecast using p(x1, , 4) Forecast using p(x1, , 3) Forecast using p(x1, 2) Forecast using p(x1) 1.0 Normalized liquid rate 0.8 0.6 0.4 0.2 0.0 0 500 1000 1500 Time (sec) 2000 2500 3000 Fig. 3. LSTM liquid rate forecasts using various number of pressure readings as input. Liquid rate forecast 1.0 Normalized liquid rate 0.8 0.6 0.4 0.2 Ground truth Forecast using p(x1) 0.0 0 500 1000 1500 Time (sec) 2000 2500 3000 Fig. 4. Feedforward ANN liquid rate forecasts using a single pressure readings as input. 6 Convergence history 2 10 3 MSE 10 LSTM using p(x1, , 7) LSTM using p(x1, , 6) LSTM using p(x1, , 5) LSTM using p(x1, , 4) LSTM using p(x1, , 3) LSTM using p(x1, 2) LSTM using p(x1) 0 2 4 Epoch 6 8 Fig. 5. LSTM convergence history as a function of number of pressure readings used to train the network. The forecasting capability of an LSTM can be quantified with the ratio f= lo · 100%, tL − t0 (3.1) which we will term the relative forecasting interval. For the severe slugging case f = 12.4%, i.e. the LSTM can forecast the future flow rates for the time interval which length is 12.4% of the length of LSTM’s training interval. The forecasts are plotted as 15 non-overlapping sequences of length l = 374 sec with li = lo = 187 sec, shifted by the indentation step s = 187 sec, see Fig. 3. Observe that even when trained on a single pressure reading, LSTM yields excellent agreement with the ground truth hydrodynamical solution in terms of the frequency and amplitude of the liquid rate peaks. This is in striking contrast to the results of a feedforward ANN using sliding window approach with 3 hidden layers and 10 neurons at each layer, trained on the same dataset as the LSTM, see Fig. 4. Adding more pressure data as the training input does generally increase the accuracy of LSTM forecasts. However, this improvement is not monotonous, and starting from a certain number of pressure readings (in this case 5 readings) the accuracy remains essentially the same, see Fig. 5. Note that there are spurious oscillations visible in LSTM forecasts on Fig. 3. 7 Liquid rate forecast Ground truth Sequence 0 Sequence 1 Sequence 2 Sequence 3 1.0 Normalized liquid rate 0.8 0.6 0.4 0.2 0.0 0 100 200 300 Time (sec) 400 500 600 Fig. 6. First output sequences of zoomed LSTM liquid rate forecasts using 5 pressure readings as input. We replot the zoomed LSTM forecasts using 5 pressure readings as overlapping sequences of the same length li = lo = 187 sec, but shifted by the indentation step s = 93 sec, see Fig. 6. Observe that the spurious oscillations are located at the beginning of each sequence. This is not surprising because LSTM learns its weights within the input sequence. However, these oscillations do not affect the accuracy of the forecasts if we use overlapping output sequences. Indeed, referring to Fig. 6 we have by the end of t = li the 0th sequence forecast till t = 2li , which is oscillationfree by the time t = li + s, when the new 1st sequence forecast is made till t = 2li + s. We keep using the 0th sequence forecast until the oscillations in the 1st sequence forecast disappear, and repeat the process. The performance of LSTM trained on pressure and liquid rate is presented in Fig. 7. Observe that increasing the number of measurements used to train the network does not improve the accuracy of the forecast, cf. Fig. 5. Moreover, if few pressure readings are used for training, the performance of LSTM trained on pressure and rate data becomes worse than that of LSTM trained just on pressure data. The accuracy of LSTM forecasts of both liquid and gas rates (i.e., n = 2 output features) is essentially the same as the results presented above for liquid rate forecasts only. 8 Convergence history 2 10 3 MSE 10 LSTM using p(x1, , 7) & ql LSTM using p(x1, , 6) & ql LSTM using p(x1, , 5) & ql LSTM using p(x1, , 4) & ql LSTM using p(x1, , 3) & ql LSTM using p(x1, 2) & ql LSTM using p(x1) & ql 0 2 4 Epoch 6 8 Fig. 7. Convergence history of LSTM trained on several pressure readings and the liquid rate. We also tested the encoder-decoder LSTM of [6] and [12], but the forecasts were less accurate compared to the results presented above. Wall time required for training of LSTMs described above with was approx. 30 mins using a single core of i7-7700HQ CPU. Using 8 cores of the same CPU resulted in approx. 20% speedup. 3.2 Variable Rate Well Test Consider a synthetic dataset of pressure, temperature, and oil, gas and water rates measurements during a well test, see Fig. 8 and Fig. 9. The data is characteristic for a rich gas condensate deliverability test, which involves flowing the well on successively larger choke sizes in order to determine the well’s inflow performance relationship (IPR) and maximize gas condensate recovery. (In what follows, we will refer to gas condensate as “oil”.) 9 Pressure and temperature data 50 Pressure Temperature 115.0 45 112.5 40 Temperature (°C) Pressure (bar) 110.0 35 107.5 30 105.0 25 102.5 20 100.0 15 97.5 10 Jan 06 an 07 an 08 an 09 an 10 an 11 an 12 an 13 an 14 an 15 J J J J J J J J J Fig. 8. Pressure and temperature for the variable rate well test. Flow rates data 400 1e6 0.9 Oil rate Water rate Gas rate 0.8 300 0.7 Qg (m3/day) Qo & Qw (m3/day) 500 0.6 200 0.5 100 0.4 0 Jan 06 an 07 an 08 an 09 an 10 an 11 an 12 an 13 an 14 an 15 J J J J J J J J J Fig. 9. Multiphase rates for the variable rate well test. 10 Flow rates data 500 300 Qg (m3/day) Qo & Qw (m3/day) 400 1e6 0.9 Measured Qo Measured Qw Measured Qg Forecasted Qo 0.8 Forecasted Qw Forecasted Qg 0.7 0.6 200 0.5 100 0.4 0 Jan 06 an 07 an 08 an 09 an 10 an 11 an 12 an 13 an 14 an 15 J J J J J J J J J Fig. 10. Multiphase rates forecast for the LSTM trained on first 2 flow periods. Spurious oscillations are plotted semi-transparent. The dataset consists of 5 flow periods, which are characterized by the corresponding choke size. Within each flow period, the measurements are generally sampled with the uniform timestep of 1 min. We are interested in forecasting the multiphase rates using the values of pressure and temperature. To this end, we will be utilizing essentially the same procedure as for the severe slugging experiment. We train the network on first flow periods using pressure and temperature readings as input features and multiphase rates as output feactures. Then, the multiphase rates forecasts are run for all flow periods. One key difference of the variable rate well test case from the severe slugging case considered in the previous section is that the flow pattern in the well test case changes drastically from one flow period to another, see Fig. 8 and Fig. 9. This constitutes a challenge to the neural network, because we try to approximate the behaviour of the changing flow system with the same ANN. Another difference and a challenge for the neural network is that the dataset is noizy. In what follows, we will compare the forecasting accuracy of LSTMs trained on first 2 and 3 flow periods. For these two cases, the training data is divided into N = 2705 and N = 3828 sequences, respectively. In both cases the sequence length is l = 244 min with li = lo , and the indentation step is s = 1 min. The relative forecasting intervals are f = 3.8% and f = 2.6%, respectively. The 11 Gas flow rate Qg (m3/day) 1e5 Measured Qg 3.90 Sequence 0 Sequence 1 3.85 Sequence 2 Sequence 3 3.80 3.75 3.70 3.65 3.60 Jan 05 16:00 Jan 05 17:00 Jan 05 18:00 Jan 05 19:00 Jan 05 20:00 Jan 05 21:00 Jan 05 22:00 Jan 05 23:00 Fig. 11. First output sequences of zoomed LSTM gas rate forecasts. LSTM structure is the same as described in the previous section. The forecasts are presented in sequences of l = 244 min with the indentation step is s = li /2 min. The results for the LSTM, trained on first 2 flow periods, are presented in Fig. 10. The model reproduces well the training data from the first 2 flow periods. The best accuracy is achieved for forecasted values of oil and water rates, while the gas rate is slightly overestimated. Still, the trends for all rates are captured correctly. On the testing set (flow periods 3 to 5), the model yields reasonable values for the oil and water rates. However, the forecasts for gas rate are non-satisfactory. This can be explained by the fact that both oil and water rates lie in a same range throughout all flow periods, which is not the case for the gas rate. Also, note that the first li data points on each training sequence are not covered by any output sequence. Consequently, the sharp peaks at the beginning of the flow periods 2, 3, and 4 are not included in the training dataset. On Fig. 10 we witness the same spurious oscillations as discussed in the previous section, cf. Fig. 6. To see this, in Fig. 11 we plot the measured gas rate together with the first output sequences of forecasted gas rate during the 1st flow period. Observe that the peaks are located at the beginning of each output sequence of length lo = 122 min. By following the same reasoning as in the previous 12 Flow rates data 500 300 Qg (m3/day) Qo & Qw (m3/day) 400 1e6 0.9 Measured Qo Measured Qw Measured Qg Forecasted Qo 0.8 Forecasted Qw Forecasted Qg 0.7 0.6 200 0.5 100 0.4 0 Jan 06 an 07 an 08 an 09 an 10 an 11 an 12 an 13 an 14 an 15 J J J J J J J J J Fig. 12. Multiphase rates forecast for the LSTM trained on first 3 flow periods. Spurious oscillations are plotted semi-transparent. section, we argue that these spurious oscillations do not affect the quality of the forecast. The results for the LSTM, trained on first 3 flow periods, are presented in Fig. 12. The model reproduces well all training data from the first 3 flow periods. It is interesting to note that the forecasts are less noizy as compared to the measured data. There are spurious oscillations visible on the graphs, but their amplitude is less than that of the model, trained on 2 flow periods. On the testing set (flow periods 4 and 5), the model performance is best for oil and water rates, and less satisfactory for gas rates. Again, this can be explained by a larger variability of the gas rate as compared to oil and water rates. Overall, the accuracy of the forecast is considerably better compared to that of the model, trained just on 2 flow periods. Wall time required for training of LSTMs on first two and three flow periods using a single core of i7-7700HQ CPU was approx. 50 and 90 min, respectively. 4 Conclusion In this work, we have shown that LSTM can be considered as a robust tool for forecasting the values of multiphase rates using pressure and temperature 13 data. The best accuracy was achieved when the lengths of the input and output sequences to LSTM were equal. Consequently, we are limited in the length of the time interval suited for forecasts. Removing this limitation without sacrifice on the accuracy of the forecast can be an interesting topic of future research. References [1] T. A. Al-Qutami, R. Ibrahim, I. Ismail, and M. A. Ishak, Virtual multiphase flow metering using diverse neural network ensemble and adaptive simulated annealing, Expert Systems with Applications, 93 (2018), pp. 72– 85. [2] A. Amin, Evaluation of commercially available virtual flow meters (VFMs), Offshore Technology Conference, 2015, pp. 1–26. 25764-MS. [3] A. Amin, M. Riding, R. Shepler, E. Smedstad, and J. Ratulowski, Subsea development from pore to process, Oilfield Review, 17 (2005), pp. 4– 17. [4] N. Andrianov, F. Coquel, M. Postel, and Q. H. Tran, A relaxation multiresolution scheme for accelerating realistic two-phase flows calculations in pipelines, Int. J. Numer. Meth. Fluids, 54 (2007), pp. 207–236. [5] J. Briers, K. Goh, A. Sniekers, D. Schotanus, J. Hofland, and D. Adun, Looking back 2006 - 2016 - ten years of data driven well rate estimates for real-time surveillance and optimization, Society of Petroleum Engineers, 2016, pp. 1–12. 181032-MS. [6] K. Cho, B. van Merrienboer, C. Gulcehre, D. Bahdanau, F. Bougares, H. Schwenk, and Y. Bengio, Learning phrase representations using RNN encoder-decoder for statistical machine translation, ArXiv e-print 1406.1078, (2014). [7] F. Chollet et al., Keras. https://github.com/fchollet/keras, 2015. [8] S. Corneliussen, J. Couput, E. Dahl, E. Dykesteen, K. Frøysa, E. Malde, H. Moestue, P. O. Moksnes, L. Scheers, and H. Tunheim, Handbook of Multiphase Flow Metering, Norwegian Society for Oil and Gas Measurement, 2005. [9] S. Hochreiter and J. Schmidhuber, Long short-term memory, Neural Computation, 9 (1997), pp. 1735–1780. 14 [10] D. P. Kingma and J. Ba, Adam: A method for stochastic optimization, ArXiv e-print 1412.6980, (2014). [11] Z. C. Lipton, J. Berkowitz, and C. Elkan, A critical review of recurrent neural networks for sequence learning, ArXiv e-print 1506.00019, (2015). [12] I. Sutskever, O. Vinyals, and Q. V. Le, Sequence to sequence learning with neural networks, in Advances in Neural Information Processing Systems, 2014, pp. 3104–3112. 15
9cs.NE
arXiv:1712.04443v1 [cs.SI] 12 Dec 2017 Sequential Prediction of Social Media Popularity with Deep Temporal Context Networks Bo Wu1,2 , Wen-Huang Cheng3 , Yongdong Zhang1,2 , Qiushi Huang4 , Jintao Li1 , Tao Mei5 1 Institute of Computing Technology, Chinese Academy of Sciences, China 2 University of Chinese Academy of Sciences, China 3 Academia Sinica, Taiwan 4 University of Surrey, UK 5 Microsoft Research, China {wubo, zhyd, jtli}@ict.ac.cn; [email protected]; [email protected]; [email protected] Abstract Prediction of popularity has profound impact for social media, since it offers opportunities to reveal individual preference and public attention from evolutionary social systems. Previous research, although achieves promising results, neglects one distinctive characteristic of social data, i.e., sequentiality. For example, the popularity of online content is generated over time with sequential post streams of social media. To investigate the sequential prediction of popularity, we propose a novel prediction framework called Deep Temporal Context Networks (DTCN) by incorporating both temporal context and temporal attention into account. Our DTCN contains three main components, from embedding, learning to predicting. With a joint embedding network, we obtain a unified deep representation of multi-modal user-post data in a common embedding space. Then, based on the embedded data sequence over time, temporal context learning attempts to recurrently learn two adaptive temporal contexts for sequential popularity. Finally, a novel temporal attention is designed to predict new popularity (the popularity of a new userpost pair) with temporal coherence across multiple time-scales. Experiments on our released image dataset with about 600K Flickr photos demonstrate that DTCN outperforms state-of-the-art deep prediction algorithms, with an average of 21.51% relative performance improvement in the popularity prediction (Spearman Ranking Correlation). 1 Introduction Social media is now globally ubiquitous and prevalent. Consequently, understanding and predicting popularity in social media (e.g., Twitter, Facebook, Youtube and Flickr) has attracted great attention [Wu et al., 2016b; Wu et al., 2016a; Li et al., 2015; He et al., 2014; Khosla et al., 2014; Pinto et al., 2013], since it offers opportunities to reveal individual preference and public attention from evolutionary social systems. Accurate popularity prediction can help improve user experience, service effectiveness, and benefit a broad range of applications, such as content recommendation [Khosla et al., 2014], online advertising [Li et al., 2015] and information retrieval [Roy et al., 2013; Gan et al., 2016]. Previous research, although achieves promising results, neglects one distinctive characteristic of social data, i.e., temporal sequentiality. For example, the popularity generated by photo sharing in Instagram on a weekday is observed to be at the peak during hours at 2 a.m., 8-9 a.m. and 5 p.m. [Beese, 2016]. Existing predictive algorithms on social media popularity are not considering the temporal order of data, making them have limited success to sequential data scenarios (e.g. news feed, tweet timeline, photo stream, etc.). Particularly, most of the existing works on popularity prediction are based on the content of a post or the person who published the post [Shamma et al., 2011; Gelli et al., 2015; Cappallo et al., 2015]. Recently, although some researchers have analyzed temporal characteristics of social popularity (e.g., temporal fluctuations), the temporal interrelationship of popularity data is not explicitly exploited [Shen et al., 2014; Zhao et al., 2015; Wu et al., 2016a; Wu et al., 2016b; Martin et al., 2016]. In this research, we take one step further to investigate the problem as a temporal prediction task with sequentiality. Unlike previous work on using time information as latent factors or variables [Shen et al., 2014; He et al., 2014; Zhao et al., 2015], our purpose is to predict popularity from both sequential and temporal views based on time series data. Specifically, we incorporate a time-centered perspective called ‘temporal context’ into popularity prediction, which was inspired by social psychology for human behavioral processes [McGrath and Kelly, 1992]. Utilizing temporal context of popularity as a novel prior knowledge, we attempt to predict new popularity by exploiting consecutive temporal coherence of popularity at multiple time-scales. Based on the above idea, we propose two types of sequential temporal contexts for learning two different types of temporal coherence of popularity: Neighboring Temporal Context (NTC) and Periodic Temporal Context (PTC). On one hand, we model NTC to learn the continuous trend or patterns in short-term time series. For instance, before and after Thanksgiving Day, the popularity of pumpkin picture rises Figure 1: Overview of Deep Temporal Context Network (DTCN). (A) Multi-modal Joint Embedding converts user feature and visual feature into an embedding space, i.e., mapping the two kinds of multi-modal information into a same latent space; (B) Temporal Context Learning constructs two temporal contexts, and learns contextual information based on LSTM; (C) Multiple Time-scale Temporal Attention assists the final prediction process based on temporal attention mechanism. (Best view in color) and decays in only a few days. The NTC helps us reveal the trend and variances. Such temporal coherence has also been successfully applied to the citation estimation of scientific articles [Shen et al., 2014]. On the other hand, we model PTC to learn discontinuous temporal coherence in long-term time series. Temporal coherence is often influenced by periodic events or human activities. For example, according to the survey in 2016 [Ellering, 2016], the best time periods to make a post on Facebook are Saturday and Sunday around 12 a.m. to 1 p.m., with periodic peaking time from 9 a.m. to 3 p.m. And weekly peak time for Pinterest is on Saturday from 8 p.m. to 11 p.m. These findings motivate us to consider both of the temporal and sequential characteristics for predicting popularity more precisely. In this paper, therefore, we propose a novel deep prediction framework called Deep Temporal Context Networks (DTCN) by exploring both temporal contexts and temporal attention at different time-scales jointly (such as days of a week, hours of a day). Figure 1 shows the overview of our DTCN framework, which is a sequential prediction architecture containing three main components: from embedding, learning to predicting, along with the model trained as an entire network by optimization learning. With a joint embedding network, we map multi-modal data onto the same embedding space to obtain a unified deep representation for user-post sharing activities. Then, based on the embedded data sequence, we design temporal context learning to recurrently learn the dynamic popularity from adaptive temporal contexts (NTC and PTC) for popularity over time. Finally, we provide a multiple time-scale attention for computing multi-scale temporal coherence in predicting the popularity of a new userpost pair. Unlike previous work on temporal modeling for popularity prediction [Wu et al., 2016b; Wu et al., 2016a; Li et al., 2015], our study attempts to provide a novel view on temporal context modeling, which considers both of the temporal and sequential coherence during prediction. The main contributions of this study are: (i) To our best knowledge, we are the first to consider both temporal and sequential characteristics into sequential prediction of social media popularity over time; (ii) we address the problem by incorporating a temporal context perspective, and proposing two types of novel temporal contexts including NTC and PTC; (iii) we propose a novel deep prediction model DTCN architecture jointly integrating embedding, temporal context learning and predicting with temporal attention to optimize the entire network, which outperforms state-of-the-art predictive algorithms in sequential popularity prediction. 2 Related Work Recently, time-aware popularity prediction receives much attention. Both academia and industry have paid more effort on this research topic. Existing works about prediction with temporal information can be concluded into two main paradigms. The first paradigm focuses on predicting the popularity growth of a published post by analyzing its temporal trend and pattern at early stage. Szabo and Huberman proposed to predict popularity based on growth pattern characteristics of online popularity at early stage [Szabo and Huberman, 2010]. Yang and Leskovec found the temporal patterns reveal how the contents popularity grows and fades during the post propagation [Yang and Leskovec, 2011]. Roy et al. proposed to grasp sudden bursts of a post popularity with crossdomain knowledge [Roy et al., 2013]. Kong et al. explored the problem of detecting which hashtag would be bursting. Most of these works provided dynamic comprehension on popularity accumulation of online content, but their prediction needs to rely on early stage popularity patterns of a pub- lished post. Our method takes one step further on popularity prediction before that the corresponding post was published. The other paradigm is predicting popularity based on temporal features or dynamic signals. Zhao et al. applied human reaction time as temporal variables in self-exciting point processes [Zhao et al., 2015]. Shen et al. proposed a reinforced Poisson process to model the dynamic popularity based on the arrival time of attention [Shen et al., 2014]. He et al. designed a time-aware bipartite graph for popularity estimation [He et al., 2014]. Wu et al. proposed to predict popularity by context factorization and tensor decomposition algorithms to unfold popularity dynamics [Wu et al., 2016b; Wu et al., 2016a]. These models all neglect the sequentiality of popularity during prediction. Summary. We focus on the investigation of sequential temporal coherence of popularity over time before the corresponding sharing behavior happened. Being differed from previous works on the predicting popularity with temporal information e.g., [Shen et al., 2014; He et al., 2014; Zhao et al., 2015; Wu et al., 2016a; Wu et al., 2016b], we explore the temporal context of popularity from sequential data and consider both of sequential and temporal characteristics of popularity during prediction. It is worth mentioning that our algorithm is generic and applicable to the prediction of other sequential data scenarios in social media, e.g. news feed, tweet timeline, photo stream, and so forth. 3 Social Media Popularity Prediction Taking photo popularity prediction on Flickr as an exemplary case, we define our problem and introduce the definitions of several core concepts, including user-post sequence, temporal context, and multiple time-scales. Problem Definition: Given a new photo v of a user u, the problem of predicting its popularity s is to estimate how many attentions would be obtained after the post was published on social media (e.g. views, likes or clicks etc.). On Flickr, when browsing a personal photo stream or image search results, users can view details of a photo content with its metadata through clicking photo thumbnails. In our prediction, since “viewing count” is a significant indicator of how popular a photo is, we use it to describe the photo popularity as follows: Popularity Normalization. To suppress the large variations among different photos (e.g. view count of different photos vary from zero to millions), we implement a log function to normalize the value of popularity, based on the previous work [Wu et al., 2016a; Khosla et al., 2014]. In brief, the log-normalization function for popularity can be defined as: r s = log2 + 1, (1) d where s is the normalized value, r is the view count of a photo, and d is the number of days since the photo was posted. Several core concepts in the paper are also defined as follows: Definition 1: User-Post Sequence. A user-photo pair p ⇔ hu, vi is derived from the photo sharing behavior (e.g., post publishing, photo sharing and video uploading), which made by user u on photo v. Suppose we have n user-photo pairs and the sharing time of each pair. Then the user-post sequence can be denoted by S = {hu1 , v1 i , hu2 , v2 i , ..., hun , vn i} with its sharing time order t1 ≤ t2 ≤ ... ≤ tn . Definition 2: Temporal Context. Given the prediction target p and its previous user-post sequence Pu before time t, temporal context (as a prior knowledge) is a time series, which was built on Pu and expressed by a triple sequence: Cp = {hu1 , v1 , tp1 i , hu2 , v2 , tp2 i , ..., huk , vk , tpk i}, tp1 ≤ tp2 ≤ ... ≤ tpk ≤ t where k is the item count in the temporal context. Definition 3: Multiple Time-scales. For time order sequence, time-scale determines a time unit of the sequential data. In our paper, without loss of generality, there are four levels of time-scales, Tunit = {t1M , t1P , t1D , t1W }, which means that minute of a hour, period of a day, day of a week and week of a month. With regard to the period of a day, we segment one day into six periods [Wu et al., 2016a], i.e. “morning (8:00am-12:00am)”, “lunch time (12:00am14:00pm)”, “afternoon (14:00am-17:00pm)”, “dinner time (17:00am-20:00pm)”, “evening (20:00am-24:00pm)” and “night (0:00am-8:00am)”. 4 Deep Temporal Context Network How can the temporal context at multiple time-scales be utilized for popularity prediction? We address the problem as a sequential prediction task, where the input is a user-photo sequence (with time order) while the output is the popularity of a “future” photo (a photo before its publication on social media). We propose a deep prediction framework called DTCN containing three components: (1) Multi-modal Joint Embedding (2) Temporal Context Learning and (3) Multiple Time-scale Temporal Attention. With all the components, the model is trained as an entire network by optimization algorithm RMSprop [Tieleman and Hinton, 2012]. 4.1 Multi-modal Joint Embedding In the first stage of DTCN, Multi-modal Joint Embedding (MJE) is to generate a unified deep representation of multimodal sequence data. While an individual popularity is highly correlated with user-photo interactions [Cappallo et al., 2015; Khosla et al., 2014; Qian et al., 2014], our embedding model is not only designed to correctly understand what appears in photos but also incorporate the knowledge of who posts it. Suppose that a variety of photo sharing behaviors over time can be naturally viewed as a user-photo sequence. The bimodal sequence data are the input data of our embedding network. In order to parametrize the visual content and user influence from the data sequence, we design a two-stream Feedforward Neural Network (FNN), which has both of the user analysis pipeline and the photo analysis pipeline respectively. On one hand, the photo analysis pipeline starts with a pretrained ResNet [He et al., 2015] in 152 layers for generating high-level visual representations of 2048 dimensions. On the other hand, we adopted a group of features to measure user influence in the user analysis pipeline, such as the average value of views, photo count, the number of contacts, mean number of members in a user’s groups, and having a Pro Flickr account or not. In our embedding network, each of the pipelines contains four layers with two hidden layers and shares the same dimension number of hidden neural nodes of 256 and 32. In order to perform non-linear mapping of features from the original space to a new latent space, the tanh activation function is applied in each layer of the embedding networks. Meanwhile, we apply a random dropout mechanism with parameter 0.5 in each hidden layer of the two pipelines, since dropout strategies have been adopted to prevent over fitting in neural network training phrase [Srivastava et al., 2014]. In the end of the architecture, user and photo information xu and xv generated from the last layers of the two-stream FNN are embedded together by minimizing on embedding loss: X L(xu , xv ) = ||sof tmax(xu xv − xu xv )||22 , xu ∈U,xv ∈V (2) where U and V are the collections of all users and photos respectively, and || · ||2 means L2 norm regularization for loss function. The final output of the embedding network is a 64dimensional vector. By joint training with all the other components of the DTCN framework, we obtain an embedding representation of the user-photo sequence. 4.2 Temporal Context Learning In the learning stage of DTCN, Temporal Context Learning (TCL) is to learn sequential and temporal coherence from the temporal context for prediction. Different from traditional context learning, our temporal context is adaptive time series and correlated with the time information of a prediction target and its previous user-photo sequence. The first step of TCL is constructing temporal contexts as prior knowledge for each “future” popularity. To model short or long-term fluctuations of popularity over time, we propose two variable-length temporal contexts: Neighboring Temporal Context (NTC) and Periodic Temporal Context (PTC). Suppose we already have the embedding data of previous user-photo sequence Pu for a prediction target p, the data items are corresponding with the user-photo pairs in Pu . Specifically, the temporal context Cp is a time series generated from the time information of Pu . Therefore, NTC consist of neighboring items of the prediction target from its previous data sequence, which is applied to describe rapidly-varying popularity fluctuations in a short-term time range; PTC is built with discontinuous s from the previous data sequence, which is applied to represent periodic popularity patterns in a long-term time range. Here we design two discrimination functions of NTC and PTC to determine whether a certain item s ∈ Pu would be a possible element of the corresponding temporal context. The NTC discrimination function is defined as follows: tp − ts fN T C (tp , ts ) = δ( < l), ∀s ∈ Pu , (3) ∆tunit where tp and ts is the sharing time of p and s, and ∆tunit is the duration of a time unit. Dirac delta function δ(·) is to compute a discrimination signal, and we use l in discrimination function to control the signal condition lengths of time span for temporal context computation. In addition to shortterm fluctuations, popularity also has periodic variances in long-term. Therefore the discrimination function for PTC is: tp − ts fP T C (tp , ts ) = δ(mod( = 0)), ∀s ∈ Pu (4) ∆tunit where the modulo function mod(·) is to detect whether p and s are in the same time blocks in different time-scales (e.g. the same period in different days or the same day in different weeks). In order to learn consecutive variance from both of NTC and PTC, we maintain the time-scale tunit ∈ Tunit of them to be same in context learning. To learn consecutive coherence from temporal contexts, we provide a two-stream recurrent neural network based on LSTM [Hochreiter and Schmidhuber, 1997] with Mean Squared Error (MSE) loss function as the optimization objective. Our network not only considers contextual information but also utilizes temporal information to learn the temporal context for both short-term and long-term temporal coherence. Taking the embedding data sequence as the input of LSTM, TCL is able to learn and read the surrounding temporal context for each prediction target by controlling recurrent state updates of the network. 4.3 Multiple Time-scale Temporal Attention Multiple Time-scale Temporal Attention (MTTA) is proposed to consider the dynamic impact of each contextual item into prediction. Intuitively, we incorporate the attention mechanism to be infer the temporal attention across multiple timescales between previous instances and new instances for new popularity prediction. Different from traditional attention, multiple timescale coherent among data need to be learnt from both of weights of relative hidden states and multiple scales of time-series. Considering all data items of temporal context, the temporal context vector ci is the input of LSTM at the step i. It can be computed by a weighted sum of hidden state hi : |Cp | ci = X αij hj , (5) j=1 where the αij is attention weight. It is calculated by comparing current prediction target p and the data item of previous temporal context at position j: exp(e−1 t̄i · t̄j ij ) αij = P|C | , eij = 1 − , p −1 || t̄ ||2 ||t̄j ||2 i k=1 exp(eik ) (6) where t̄ denotes multi-scale time vector. Note that unlike in the traditional attention mechanism, we use attention score eij to leverage the temporal consistency between t̄p and t̄s . Its calculation relies on time vector t̄ = (t1M , t1P , t1D , t1W ) with multiple time-scale information instead of hidden state vector h for temporal attention. To compute the temporal consistency, we apply cosine distance function as a simple metric, while it can be alternated by other distance functions. 5 Experiments In this section, we demonstrate the effectiveness of the proposed framework on Flickr dataset as follows: (1) we compare performances between our proposed method and current state-of-the-art algorithms for popularity prediction on different data scales respectively. (2) we provide the experiment results of using single temporal context on DTCN and demonstrate the performance results with different context types, considering temporal unit and time-scales. 5.1 Dataset Metric CNN-AlexNet CNN-VGG SVR SVR(T) MLP MLP(T) LSTM CLSTM DTCN Experimental Setup Temporal Popularity Image Collection (TPIC17)1 . TPIC17 is an image popularity dataset with multi-faceted information, such as user profile, photo metadata, and visual content. To construct the sequential prediction dataset and protect the privacy of photo sharing behaviors, we extracted time information of the adopted time-scales from the original timestamps of photo sharing. It contains 680K photos in total, and the sharing time of photos are over three years from Flickr. In order to use the temporal information from the dataset, we extracted time information from the metadata. To obtain multiple data settings with different dataset size, we individually sampled three sub datasets (100K, 200K and 400K) from the 680K dataset to evaluate algorithms. Moving Partition Validation. In order to evaluate sequential prediction task, we have a 5-round moving partition strategy on the segment of training and testing data for validation. We organized the entire data in time order and divided it into 14 parts in total. The moving partition strategy is using data from a moving time window recurrently. In our experiments, we use the data in time window as input for each round. In our experiments, the length of time window are 10, which means the partition ratio of training versus testing data is 9:1. Evaluation Metrics. We evaluated the prediction performance of our approach and the baselines on a correlation metric Spearman Ranking Correlation (SRC) and a precision metric Mean Absolute Error (MAE). SRC is to measure the ranking correlation between ground-truth popularity set P and predicted popularity set P̂ , varying from 0 to 1. If there are k samples, the SRC can be expressed as: !  k  ¯ 1 X Pi − P̄ P̂i − P̂ rs = , (7) k − 1 i=1 σP σP̂ where P̄ and σP are mean and variance of the corresponding popularity set. Furthermore, we also use Mean Absolute Error (MAE) to calculate the averaged prediction error: M AE = 5.2 Table 1: Prediction performances on TPIC17-100K, 200K, and 400K datasets (metric: Spearman Ranking Correlation). n 1X | P̂i − Pi | . k i=1 (8) Compared Methods In order to compare with state-of-the-art models, we implemented the following approaches which can be applied into popularity prediction task as baselines. Baseline 1 & 2: Convolutional Neural Networks (CNNAlexNet [Krizhevsky et al., 2012] and CNN-VGG [Russakovsky et al., 2015]). CNNs have been proved a powerful tool in the field of image understanding for photo popularity 1 We released the data set in https://github.com/social-mediaprediction/flickr-data-prediction-2017 100K 0.2450 0.2281 0.2647 0.2741 0.4135 0.4436 0.4629 0.4966 0.5990 200K SRC 0.2435 0.2445 0.2367 0.2984 0.5282 0.5068 0.5837 0.5730 0.6175 400K 0.1423 0.1064 0.2289 0.2643 0.5559 0.5084 0.5885 0.6072 0.6692 prediction [Cappallo et al., 2015]. Consequently, we apply CNN-AlexNet and CNN-VGG as the baselines for CNNs, and fine tuned the 8-layer AlexNet and 19-layer VGG as a regression task that is optimized with our image dataset to predict photo popularity. Different from other methods, the input of CNNs baseline is original image file only. Baseline 3: Support Vector Regression (SVR) [Khosla et al., 2014]. Khosla et.al. implement SVR algorithm in popularity prediction task, which utilized user information and visual content together as feature vectors by using linear kernel. Simultaneously, we add temporal information into SVR as another baseline method that denotes as SVR(T). Baseline 4: Multiple Layer Perceptron (MLP) [Zhang et al., 1998]. MLP is a typical feedforward neural network trained with back propagation, which has the general ability and does not require any assumption about the distribution of training data to solve real-world problems. Meanwhile, we also implement a variant MLP(T) by adding temporal information to the input vector of MLP. Baseline 5: Long Short-Term Memory (LSTM) [Hochreiter and Schmidhuber, 1997]. LSTM is a recurrent neural network (RNN) architecture, which is capable of dealing with sequential information for popularity prediction. Baseline 6: Contextual LSTM (CLSTM) [Ghosh et al., 2016]. Since the contextual deep learning is a relatively new research direction, there are only few existing research works to compare with. To the best of our knowledge, the most closely related work is CLSTM, which also considered contextual information in training and predicting phrase. Therefore, we used Contextual LSTM as a representative of Contextual Recurrent Neural Network (CRNN). Different from traditional LSTM, CLSTM takes the contextual information into account during the training and predicting process, and it has been proved feasible in NLP tasks. The parameters of Recurrent Layers (e.g. LSTM) and hidden neural nodes shared the same settings over proposed prediction framework (DTCN), LSTM and CLSTM. The numbers of output dimensions are 64 with the “hard sigmoid” activation function. 5.3 Prediction Performance The prediction performances of our proposed method and the compared models are shown in Table 1 and Figure 2. Overall, our approach DTCN achieves the best prediction performance on three data size settings with highest SRC of 0.6692 Table 2: Prediction performances of context type NTC and PTC (metric: Spearman Ranking Correlation). NTC Context Type T C1P -0.5D T C1P -1D T C1D -3D T C1D -7D Figure 2: MAE (Mean Absolute Error) comparison of different algorithms on 100K, 200K and 400K datasets. and minimum MAE 1.2341. DTCN outperforms state-of-theart deep prediction algorithms (MLP, MLP(T), LSTM and CLSTM), with an average of 21.51% relative performance improvement on SRC. Using raw data from images directly without user metadata and temporal information, both CNNAlexNet and CNN-VGG receive the worse results compared to other deep learning baseline algorithms. As multiple layer networks, MLPs obtains higher effectiveness than SVRs on prediction, while both of them are using user and visual features. From SVR and MLP to SVR(T) and MLP(T), there are neck-to-neck results across different sizes of datasets. Thus involving temporal information as non-sequential feature only has limited power for prediction, the behind reason might be ignorance of the sequential coherence of temporal information. With consideration of sequential coherence in the modeling of prediction, LSTM and CLSTM achieve good performances on SRC, i.e., 0.4629 and 0.6072, which are better than MLP and lower than DTCN. Overall, the results of sequential prediction (i.e. RNNs) are much superior than the results of non-sequential prediction (e.g. SVR, MLP or CNNs) on predicting social media popularity. The prediction accuracies of different methods are shown in Figure 2. From the histogram of MAE, our model also achieves the minimal prediction error 1.2341. From CNNs to DCTN, it can be seen that the error drops from about 2.1 to 1.2, and DTCN has stable improvements on TPIC17-100K, TPIC17200K, and TPIC17-400K dataset. That means our approach provides a more accurate model for popularity prediction. 5.4 Temporal Context Analysis Here we analyze different types of temporal context in terms of using only one of them in our prediction model on TPIC17100K. There can be different variants of distinct temporal context type settings T Ctunit -tr , based on the type of time unit tunit and the temporal range of context tr chosen. Generally, short-term settings are applied for NTC types, which ranges from 0.5 day to 1 week in our experiment. Simultaneously, PTC types are applied to explore long-term patterns for popularity evolving, which ranges from 3 days to 1 month. The time unit tunit control the time-scale of NTC and PTC. For instance, T C1P -1D of NTC means to construct SRC 0.5607 0.5875 0.5549 0.5784 PTC Context Type T C1P -3D T C1P -5D T C1D -3W T C1D -4W SRC 0.4975 0.5745 0.5365 0.5485 NTC from the data in previous 1 day range using the timescale on period of day. Another case is T C1D -3W of PTC, which means the range of PTC for prediction target is in the same weekday of previous 3 weeks. The results of using different types of NTC and PTC in our model are shown in Table 2, where the highest SRC is 0.5875 when using T C1P -1D of NTC. Overall, the results using NTC settings are better than PTC settings, which reveals that there are obvious short-term patterns in the 100K dataset of Flickr. Next, we analyze the improvements of performance in terms of NTC and PTC, respectively. Compared with the performance of DTCN on same data in Table 1, the performances of using a single temporal context (NTC or PTC) in Table 2 drop down from 0.5990 to 0.5875 and 0.5745. This finding illustrates that prediction using both of NTC and PTC on same data performs more accurately than using one of them only, and our method can incorporate them together effectively. 6 Conclusions and Future Work This paper proposes to learn consecutive temporal coherence of temporal context for predicting social media popularity over time, which comprises of three components. Firstly, we design a joint embedding network for multi-modal feature representation. Then, we propose and utilize two types of temporal context alignment to learn sequential popularity in short-term and long-term popularity fluctuations. Furthermore, we provide a temporal attention mechanism for predicting popularity at multiple time-scales. To evaluate our approach, we constructed a publicly available dataset with user-photo sequence data. Experimental results show that our prediction network achieves promising performances and outperforms the state-of-the-art deep prediction algorithms by 5.79%–44.86% relative improvements on TPIC17. The technique serves a deep prediction framework for sequential popularity prediction, and our paper along with the released dataset further helps promote the research. There are several possible directions for future investigations on social popularity prediction. One is considering the social network structure (and inherent social network analysis techniques) to improve the popularity prediction. Another open question is to exploit impact of most influential users in the social network. Acknowledgements This work was supported in part by the National Key Research and Development Program of China under Grant 2016YFB0800403 and the National Nature Science Foundation of China (61525206, 61571424). References [Beese, 2016] Jennifer Beese. 5 insightful instagram stats that you should know. http://sproutsocial.com/insights/5instagram-stats/, 2016. [Online]. [Cappallo et al., 2015] Spencer Cappallo, Thomas Mensink, and Cees GM Snoek. Latent factors of visual popularity prediction. In Proc. of ICMR, 2015. [Ellering, 2016] Nathan Ellering. What 16 studies say about the best times to post on social media. http://coschedule.com/blog/best-times-to-post-on-socialmedia/, 2016. [Online]. [Gan et al., 2016] Chuang Gan, Chen Sun, Lixin Duan, and Boqing Gong. Webly-supervised video recognition by mutually voting for relevant web images and web video frames. In ECCV, 2016. [Gelli et al., 2015] Francesco Gelli, Tiberio Uricchio, Marco Bertini, Alberto Del Bimbo, and Shih-Fu Chang. Image popularity prediction in social media using sentiment and context features. In Proc. of ACM MM, 2015. [Ghosh et al., 2016] Shalini Ghosh, Oriol Vinyals, Brian Strope, Scott Roy, Tom Dean, and Larry Heck. Contextual lstm (clstm) models for large scale nlp tasks. arXiv preprint arXiv:1602.06291, 2016. [He et al., 2014] Xiangnan He, Ming Gao, Min-Yen Kan, Yiqun Liu, and Kazunari Sugiyama. Predicting the popularity of web 2.0 items based on user comments. In Proc. of SIGIR, pages 233–242, 2014. [He et al., 2015] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. arXiv preprint arXiv:1512.03385, 2015. [Hochreiter and Schmidhuber, 1997] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8):1735–1780, 1997. [Khosla et al., 2014] Aditya Khosla, Atish Das Sarma, and Raffay Hamid. What makes an imag e popular? In Proc. of WWW, 2014. [Krizhevsky et al., 2012] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097–1105, 2012. [Li et al., 2015] Cheng Li, Yue Lu, Qiaozhu Mei, Dong Wang, and Sandeep Pandey. Click-through prediction for advertising in twitter timeline. In Proc. of KDD, 2015. [Martin et al., 2016] Travis Martin, Jake M Hofman, Amit Sharma, Ashton Anderson, and Duncan J Watts. Exploring limits to prediction in complex social systems. In Proc. of WWW, 2016. [McGrath and Kelly, 1992] Joseph E. McGrath and Janice R. Kelly. Temporal context and temporal patterning. Time & Society, 1(3):399–420, 1992. [Pinto et al., 2013] Henrique Pinto, Jussara M Almeida, and Marcos A Gonçalves. Using early view patterns to predict the popularity of youtube videos. In Proc. of WSDM, pages 365–374, 2013. [Qian et al., 2014] Xueming Qian, He Feng, Guoshuai Zhao, and Tao Mei. Personalized recommendation combining user interest and social circle. IEEE Transactions on Knowledge and Data Engineering, 26(7):1763–1777, 2014. [Roy et al., 2013] Suman Deb Roy, Tao Mei, Wenjun Zeng, and Shipeng Li. Towards cross-domain learning for social video popularity prediction. IEEE Transactions on Multimedia, 15(6):1255–1267, 2013. [Russakovsky et al., 2015] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. IJCV, 115(3):211–252, 2015. [Shamma et al., 2011] David A Shamma, Jude Yew, Lyndon Kennedy, and Elizabeth F Churchill. Viral actions: Predicting video view counts using synchronous sharing behaviors. In Proc. of ICWSM, 2011. [Shen et al., 2014] Hua-Wei Shen, Dashun Wang, Chaoming Song, and Albert-László Barabási. Modeling and predicting popularity dynamics via reinforced poisson processes. In Proc. of AAAI, 2014. [Srivastava et al., 2014] 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, 15, 2014. [Szabo and Huberman, 2010] Gabor Szabo and Bernardo A Huberman. Predicting the popularity of online content. Communications of the ACM, 53(8):80–88, 2010. [Tieleman and Hinton, 2012] T. Tieleman and G. Hinton. Lecture 6.5—RmsProp: Divide the gradient by a running average of its recent magnitude. COURSERA: Neural Networks for Machine Learning, 2012. [Wu et al., 2016a] Bo Wu, Wen-Huang Cheng, Yongdong Zhang, and Tao Mei. Time matters: Multi-scale temporalization of social media popularity. In Proc. ACM MM, 2016. [Wu et al., 2016b] Bo Wu, Tao Mei, Wen-Huang Cheng, and Yongdong Zhang. Unfolding temporal dynamics: Predicting social media popularity using multi-scale temporal decomposition. In Proc. AAAI, 2016. [Yang and Leskovec, 2011] Jaewon Yang and Jure Leskovec. Patterns of temporal variation in online media. In Proc. of WSDM, 2011. [Zhang et al., 1998] Zhengyou Zhang, Michael Lyons, Michael Schuster, and Shigeru Akamatsu. Comparison between geometry-based and gabor-wavelets-based facial expression recognition using multi-layer perceptron. In Proc. of ICCV, pages 454–459. IEEE, 1998. [Zhao et al., 2015] Qingyuan Zhao, Murat A Erdogdu, Hera Y He, Anand Rajaraman, and Jure Leskovec. Seismic, a self-exciting point process model for predicting tweet popularity. In Proc. of KDD, 2015.
2cs.AI
Neural Program Meta-Induction arXiv:1710.04157v1 [cs.AI] 11 Oct 2017 Jacob Devlin∗ Google [email protected] Rudy Bunel∗ University of Oxford [email protected] Rishabh Singh Microsoft Research [email protected] Pushmeet Kohli∗ DeepMind [email protected] Matthew Hausknecht Microsoft Research [email protected] Abstract Most recently proposed methods for Neural Program Induction work under the assumption of having a large set of input/output (I/O) examples for learning any underlying input-output mapping. This paper aims to address the problem of data and computation efficiency of program induction by leveraging information from related tasks. Specifically, we propose two approaches for cross-task knowledge transfer to improve program induction in limited-data scenarios. In our first proposal, portfolio adaptation, a set of induction models is pretrained on a set of related tasks, and the best model is adapted towards the new task using transfer learning. In our second approach, meta program induction, a k-shot learning approach is used to make a model generalize to new tasks without additional training. To test the efficacy of our methods, we constructed a new benchmark of programs written in the Karel programming language [17]. Using an extensive experimental evaluation on the Karel benchmark, we demonstrate that our proposals dramatically outperform the baseline induction method that does not use knowledge transfer. We also analyze the relative performance of the two approaches and study conditions in which they perform best. In particular, meta induction outperforms all existing approaches under extreme data sparsity (when a very small number of examples are available), i.e., fewer than ten. As the number of available I/O examples increase (i.e. a thousand or more), portfolio adapted program induction becomes the best approach. For intermediate data sizes, we demonstrate that the combined method of adapted meta program induction has the strongest performance. 1 Introduction Neural program induction has been a very active area of research in the last few years, but this past work has made highly variable set of assumptions about the amount of training data and types of training signals that are available. One common scenario is example-driven algorithm induction, where the goal is to learn a model which can perform a specific task (i.e., an underlying program or algorithm), such as sorting a list of integers[7, 11, 12, 21]. Typically, the goal of these works are to compare a newly proposed network architecture to a baseline model, and the system is trained on input/output examples (I/O examples) as a standard supervised learning task. For example, for integer sorting, the I/O examples would consist of pairs of unsorted and sorted integer lists, and the model would be trained to maximize cross-entropy loss of the output sequence. In this way, the induction model is similar to a standard sequence generation task such as machine translation or image captioning. In these works, the authors typically assume that a near-infinite amount of I/O examples corresponding to a particular task are available. ∗ Work performed at Microsoft Research. 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. Other works have made different assumptions about data: Li et al. [14] trains models from scratch using 32 to 256 I/O examples. Lake et al. [13] learns to induce complex concepts from several hundred examples. Devlin et al. [5], Duan et al. [6], and Santoro et al. [19] are able to perform induction using as few one I/O example, but these works assume that a large set of background tasks from the same task family are available for training. Neelakantan et al. [16] and Andreas et al. [1] also develop models which can perform induction on new tasks that were not seen at training time, but are conditioned on a natural language representation rather than I/O examples. These varying assumptions about data are all reasonable in differing scenarios. For example, in a scenario where a reference implementation of the program is available, it is reasonable to expect that an unlimited amount of I/O examples can be generated, but it may be unreasonable to assume that any similar program will also be available. However, we can also consider a scenario like FlashFill [9], where the goal is to learn a regular expression based string transformation program based on userprovided examples, such as “John Smith → Smith, J.”). Here, it is only reasonable to assume that a handful of I/O examples are available for a particular task, but that many examples are available for other tasks in the same family (e.g., “Frank Miller → Frank M”). In this work, we compare several different techniques for neural program induction, with a particular focus on how the relative accuracy of these techniques differs as a function of the available training data. In other words, if technique A is better than technique B when only five I/O examples are available, does this mean A will also be better than B when 50 I/O examples are available? What about 1000? 100,000? How does this performance change if data for many related tasks is available? To answer these questions, we evaluate four general techniques for cross-task knowledge sharing: • Plain Program Induction (PLAIN) - Supervised learning is used to train a model which can perform induction on a single task, i.e., read in an input example for the task and predict the corresponding output. No cross-task knowledge sharing is performed. • Portfolio-Adapted Program Induction (PLAIN + ADAPT) - Simple transfer learning is used to to adapt a model which has been trained on a related task for a new task. • Meta Program Induction (META) - A k-shot learning-style model is used to represent an exponential family of tasks, where the training I/O examples corresponding to a task are directly conditioned on as input to the network. This model can generalize to new tasks without any additional training. • Adapted Meta Program Induction (META + ADAPT) - The META model is adapted to a specific new task using round-robin hold-one-out training on the task’s I/O examples. We evaluate these techniques on a synthetic domain described in Section 2, using a simple but strong network architecture. All models are fully example-driven, so the underlying program representation is only used to generate I/O examples, and is not used when training or evaluating the model. 2 Karel Domain In order to ground the ideas presented here, we describe our models in relation to a particular synthetic domain called “Karel”. Karel is an educational programming language developed at Stanford University in the 1980s[17]. In this language, a virtual agent named Karel the Robot moves around a 2D grid world placing markers and avoiding obstacle. The domain specific language (DSL) for Karel is moderately complex, as it allows if/then/else blocks, for loops, and while loops, but does not allow variable assignments. Compared to the current program induction benchmarks, Karel introduces a new challenge of learning programs with complex control flow, where the stateof-the-art program synthesis techniques involving constraint-solving and enumeration do not scale because of the prohibitively large search space. Karel is also an interesting domain as it is used for example-driven programming in an introductory Stanford programming course.2 In this course, students are provided with several I/O grids corresponding to some underlying Karel program that they have never seen before, and must write a single program which can be run on all inputs to generate the corresponding outputs. This differs from typical programming assignments, since the program specification is given in the form of I/O examples rather than natural language. An example is given in Figure 1. Note that inducing Karel programs is not a toy reinforcement learning task. 2 The programs are written manually by students; it is not used to teach program induction or synthesis. 2 Since the example I/O grids are of varying dimensions, the learning task is not to induce a single trace that only works on grids of a fixed size, but rather to induce a program that can can perform the desired action on “arbitrary-size grids”, thereby forcing it to use the loop structure appropriately. Figure 1: Karel Domain: On the left, a sample task from the Karel domain with two training I/O ˆ Ô). The computer is Karel, the circles examples (I1 , O1 ), (I2 , O2 ) and one test I/O example (I, represent markers and the brick wall represents obstacles. On the right, the language spec for Karel. In this work, we only explore the induction variant of Karel, where instead of attempting to synthesize ˆ the program, we attempt to directly generate the output grid Ô from a corresponding input grid I. Although the underlying program is used to generate the training data, it is not used by the model in any way, so in principle it does not have to explicitly exist. For example, a more complex real-world analogue would be a system where a user controls a drone to provide examples of a task such as “Fly around the boundary of the forest, and if you see a deer, take a picture of it, then return home.” Such a task might be difficult to represent using a program, but could be possible with a sufficiently powerful and well-trained induction model, especially if cross-task knowledge sharing is used. 3 Plain Program Induction In this work, plain program induction (denoted as PLAIN) refers to the supervised training of a parametric model using a set of input/output examples (I1 , O1 ), ..., (IN , ON ), such that the model can take some new Iˆ as input and emit the corresponding Ô. In this scenario, all I/O examples in training and test correspond to the same task (i.e., underlying program or algorithm), such as sorting a list of integers. Examples of past work in plain program induction using neural networks include [7, 11, 12, 8, 4, 20, 2]. For the Karel domain, we use a simple architecture shown on the left side of Figure 2. The input feature map are an 16-dimensional vector with n-hot encodings to represent the objects of the cell, i.e., (AgentFacingNorth, AgentFacingEast, ..., OneMarker, TwoMarkers, ..., Obstacle). Additionally, instead of predicting the output grid directly, we use an LSTM to predict the delta between the input grid and output grid as a series of tokens using. For example, AgentRow=+1 AgentCol=+2 HeroDir=south MarkerRow=0 MarkerCol=0 MarkerCount=+2 would indicate that the hero has moved north 1 row, east 2 rows, is facing south, and also added two markers on its starting position. This sequence can be deterministically applied to the input to create the output grid. Specific details about the model architecture and training are given in Section 8. 4 Portfolio-Adapted Program Induction Most past work in neural programs induction assumes that a very large amount of training data is available to train a particular task, and ignores data sparsity issues entirely. However, in a practical scenario such as the FlashFill domain described in Section 1 or the real-world Karel analogue 3 Figure 2: Network Architecture: Diagrams for the general network architectures used for the Karel domain. Specifics of the model are provided in Section 8. described in Section 2, I/O examples for a new task must be provided by the user. In this case, it may be unrealistic to expect more than a handful of I/O examples corresponding to a new task. Of course, it is typically infeasible to train a deep neural network from scratch with only a handful of training examples. Instead, we consider a scenario where data is available for a number of background tasks from the same task family. In the Karel domain, the task family is simply any task from the Karel DSL, but in principle the task family can be more a more abstract concept such as “The set of string transformations that a user might perform on columns in a spreadsheet.” One way of taking advantage of such background tasks is with straightforward transfer learning, which we refer to as portfolio-adapted program induction (denoted as PLAIN + ADAPT). Here, we have a portfolio of models each trained on a single background I/O task. To train an induction model for a new task, we select the “best” background model and use it as an initialization point for training our new model. This is analogous to the type of transfer learning used in standard classification tasks like image recognition or machine translation [10, 15]. The criteria by which we select this background model is to score the training I/O examples for the new task with each model in the portfolio, and select the one with the highest log-likelihood. 5 Meta Program Induction Although we expect that PLAIN + ADAPT will allow us to learn an induction model with fewer I/O examples than training from scratch, it is still subject to the normal pitfalls of SGD-based training. In particular, it is typically very difficult to train powerful DNNs using very few I/O examples (e.g., < 100) without encountering significant overfitting. An alternative method is to train a single network which represents an entire (exponentially large) family of tasks, and the latent representation of a particular task is represented by conditioning on the training I/O examples for that task. We refer to this type of model as meta induction (denoted as META) because instead of using SGD to learn a latent representation of a particular task based on I/O examples, we are using SGD to learn how to learn a latent task representation based on I/O examples. More specifically, our meta induction architecture takes as input a set of demonstration examples ˆ and emits the corresponding output Ô. A diagram (I1 , O1 ), ..., (Ik , Ok ) and an additional eval input I, is shown in Figure 2. The number of demonstration examples k is typically small, e.g., 1 to 5. At training time, we are given a large number of tasks with k + 1 examples each. During training, one example is chosen at random to represent the eval example, the others are used to represent the demonstration examples. At test time, we are given k I/O examples which correspond to a new task ˆ Then, we are able to generate that was not seen at training, along with one or more eval inputs I. the corresponding Ô for the new task without performing any SGD. The META model could also be described as a k-shot learning system, closely related to Duan et al. [6] and Santoro et al. [19]. In a scenario where a moderate number of I/O examples are available at test time, e.g., 10 to 100, performing meta induction is non-trivial. It is not computationally feasible to train a model which is 4 directly conditioned on k = 100 examples, and using a larger value of k at test time than training time creates an undesirable mismatch. So, if the model is trained using k examples but n examples are available at test time (n > k), the approach we take is to randomly sample a number of k-sized sets and performing ensembling of the softmax log probabilities for each output token. There are (n choose k) total subsets available, but we found little improvement in using more than 2 ∗ n/k. We set k = 5 in all experiments, and present results using different values of n in Section 8. 6 Adapted Meta Program Induction The previous approach to use n > k I/O examples at test time seems reasonable, but certainly not optimal. An alternative approach is to combine the best aspects of META and PLAIN + ADAPT, and adapt the meta model to a particular new task using SGD. To do this, we can repeatedly sample k + 1 I/O examples from the n total examples provided, and fine tune the META model for the new task in the exact manner that it was trained originally. For decoding, we still perform the same algorithm as the META model, but the weights have been adapted for the particular Figure 3: Data-Mixture Regularization task being decoded. In order to mitigate overfitting, we found that it is useful to perform “data-mixture regularization,” where the I/O examples for the new task are mixed with random training data corresponding to other tasks. In all experiments here we sample 10% of the I/O examples in a minibatch from the new task and 90% from random training tasks. It is potential that underfitting could occur in this scenario, but note that the meta network is already trained to represent an exponential number of tasks, so using a single task for 10% of the data is quite significant. Results with data mixture adaptation are shown in Figure 3, which demonstrates that this acts as a strong regularizer and moderately improves held-out loss. 7 Comparison with Existing Work on Neural Program Induction There has been a large amount of past work in neural program induction, and many of these works have made different assumptions about the conditions of the induction scenario. Here, our goal is to compare the four techniques presented here to each other and to past work across several attributes: • Example-Driven Induction - 3 = The system is trained using I/O examples as specification. 7 = The system uses some other specification, such as natural language. • No Explicit Program Representation - 3 = The system can be trained without any explicit program or program trace. 7 = The system requires a program or program trace. • Task-Specific Learning - 3 = The model is trained to maximize performance on a particular task. 7 = The model is trained for a family of tasks. • Cross-Task Knowledge Sharing - 3 = The system uses information from multiple tasks when training a model for a new task. 7 = The system uses information from only a single task for each model. The comparison is presented in Table 1. The PLAIN technique is closely related to the example-driven induction models such as Neural Turing Machines[7] or Neural RAM[12], which typically have not focused on cross-task knowledge transfer. The META model is closely related are the k-shot imitation learning approaches [6, 5, 19], but these papers did not explore task-specific adaptation. 8 Experimental Results In this section we evaluate the four techniques PLAIN, PLAIN + ADAPT, META, META + ADAPT on the Karel domain. The primary goal is to compare performance relative to the number of training I/O examples available for the test task. 5 System ExampleDriven Induction No Explicit Program or Trace TaskSpecific Learning Novel Architectures Applied to Program Induction NTM [7], Stack RNN [11], NRAM [12] Neural Transducers [8], Learn Algo [21] 3 3 3 Others [4, 20, 2, 13] NPI [18] Recursive NPI [3], NPL [14] Trace-Augmented Induction 3 7 3 7 3 3 Cross-Task Knowledge Sharing 7 3 7 Non Example-Driven Induction (e.g., Natural Language-Driven Induction) Inducing Latent Programs [16] 7 3 3 3 Neural Module Networks [1] k-shot Imitation Learning 1-Shot Imitation Learning [6] 3 3 RobustFill [5], Meta-Learning [19] 7 3 Techniques Explored in This Work Plain Program Induction 3 3 Portfolio-Adapted Program Induction 3 3 Meta Program Induction 3 3 Adapted Meta Program Induction 3 3 3 3 7 3 7 3(Weak) 3(Strong) 3(Strong) Table 1: Comparison with Existing Work: Comparison of existing work across several attributes. For the primary experiments reported here, the overall network architecture is sketched in Figure 2, with details as follows: The input encoder is a 3-layer CNN with a FC+relu layer on top. The output decoder is a 1-layer LSTM. For the META model, the task encoder uses 1-layer CNN to encode the input and output for a single example, which are concatenated on the feature map dimension and fed through a 6-layer CNN with a FC+relu layer on top. Multiple I/O examples were combined with max-pooling on the final vector. All convolutional layers use a 3 × 3 kernel with a 64-dimensional feature map. The fully-connected and LSTM are 1024-dimensional. Different model sizes are explored later in this section. The dropout, learning rate, and batch size were optimized with grid search for each value of n using a separate set of validation tasks. Training was performed using SGD + momentum and gradient clipping using an in-house toolkit. All training, validation, and test programs were generated by treating the Karel DSL as a probabilistic context free grammar and performing top-down expansion with uniform probability at each node. The input grids were generated by creating a grid of a random size and inserting the agent, markers, and obstacles at random. The output grid was generated by executing the program on the input grid, and if the agent ran into an obstacle or did not move, then the example was thrown out and a new input grid was generated. We limit the nesting depth of control flow to be at most 4 (i.e. at most 4 nested if/while blocks can be chosen in a valid program). We sample I/O grids of size n × m, where n and m are integers sampled uniformly from the range 2 to 20. We sample programs of size upto 20 statements. Every program and I/O grid in the training/validation/test set is unique. Results are presented in Figure 4, evaluated on 25 test tasks with 100 eval examples each.3 The x-axis represents the number of training/demonstration I/O examples available for the test task, denoted as n. The PLAIN system was trained only on these n examples directly. The PLAIN + ADAPT system was also trained on these n examples, but was initialized using a portfolio of m models that had been trained on d examples each. Three different values of m and d are shown in the figure. The META model in this figure was trained on 1,000,000 tasks with 6 I/O examples each, but smaller amounts of META training are shown in Figure 5. A point-by-point analysis is given below: 3 Note that each task and eval example is evaluated independently, so the size of the test set does not affect the accuracy. 6 Figure 4: Induction Results: Comparison of the four induction techniques on the Karel scenario. The accuracy denotes the total percentage of examples for which the 1-best output grid was exactly equal to the reference. • PLAIN vs. PLAIN + ADAPT: PLAIN + ADAPT significantly outperforms PLAIN unless n is very large (10k+), in which case both systems perform equally well. This result makes sense, since we expect that much of the representation learning (e.g., how to encode an I/O grid with a CNN) will be independent of the exact task. • PLAIN + ADAPT Model Portfolio Size: Here, we compare the three model portfolio settings shown for PLAIN + ADAPT. The number of available models (m = 1 vs. m = 25) only has a small effect on accuracy, and this effect is only present for small values of n (e.g., n < 100) when the absolute performance is poor in any case. This implies that the majority of cross-task knowledge sharing is independent of the exact details of a task. On the other hand, the number of examples used to train each model in the portfolio (d = 1000 vs d = 100000) has a much larger effect, especially for moderate values of n, e.g., 50 to 100. This makes sense, as we would not expect a significant benefit from adaptation unless (a) d  n, and (b) n is large enough to train a robust model. • META vs. META + ADAPT: META + ADAPT does not improve over META for small values of n, which is in-line with the common observation that SGD-based training is difficult using a small number of samples. However, for large values of n, the accuracy of META + ADAPT increases significantly while the META model remains flat. • PLAIN + ADAPT vs. META + ADAPT: Perhaps the most interesting result in the entire chart is the fact that the accuracy crosses over, and PLAIN + ADAPT outperforms META + ADAPT by a significant margin for large values of n (i.e., 1000+). Intuitively, this makes sense, since the meta induction model was trained to represent an exponential family of tasks moderately well, rather than represent a single task with extreme precision. Because the network architecture of the META model is a superset of the PLAIN model, these results imply that for a large value of n, the model is becoming stuck in a poor local optima.4 To validate this hypothesis, we performed adaptation on the meta network after randomly re-initializing all of the weights, and found that in this case the performance of META + ADAPT matches that of PLAIN + ADAPT for large values of n. This confirms that the pre-trained meta network is actually a worse starting point than training from scratch when a large number of training I/O examples are available. Learning Curves: The left side of Figure 4 presents average held-out loss for the various techniques using 50 and 1000 training I/O examples. Epoch 0 on the META + ADAPT corresponds to the META 4 Since the DNN is over-parameterized relative to the number of training examples, the system is able to overfit the training examples in all cases. Therefore “poor local optimal” is referring to the model’s ability to generalize to the test examples. 7 Figure 5: Ablation results for Karel Induction. loss. We can see that the PLAIN + ADAPT loss starts out very high, but the model able to adapt to the new task quickly. The META + ADAPT loss starts out very strong, but only improves by a small amount with adaptation. For 1000 I/O examples, it is able to overtake the META + ADAPT model by a small amount, supporting what was observed in Figure 4. Varying the Model Size: Here, we present results on three architectures: Large = 64-dim feature map, 1024-dim FC/RNN (used in the primary results); Medium = 32-dim feature map, 256-dim FC/RNN; Small = 16-dim feature map, 64-dim FC/RNN. All models use the structure described earlier in this section. We can see the center of Figure 5 that model size has a much larger impact on the META model than the PLAIN, which is intuitive – representing an entire family tasks from a given domain requires significantly more parameters than a single task. We can also see that the larger models outperform the smaller models for any value of n, which is likely because the dropout ratio was selected for each model size and value of n to mitigate overfitting. Varying the Amount of META Training: The META model presented in Figure 4 represents a very optimistic scenario which is trained on 1,000,000 background tasks with 6 I/O examples each. On the right side of Figure 5, we present META results using 100,000 and 10,000 training tasks. We see a significant loss in accuracy, which demonstrates that it is quite challenging to train a META model that can generalize to new tasks. 9 Conclusions In this work, we have contrasted two techniques for using cross-task knowledge sharing to improve neural program induction, which are referred to as adapted program induction and meta program induction. Both of these techniques can be used to improve accuracy on a new task by using models that were trained on related tasks from the same family. However, adapted induction uses a transfer learning style approach while meta induction uses a k-shot learning style approach. We applied these techniques to a challenging induction domain based on the Karel programming language, and found that each technique, including unadapted induction, performs best under certain conditions. Specifically, the preferred technique depends on the number of I/O examples (n) that are available for the new task we want to learn, as well as the amount of background data available. These conclusions can be summarized by the following table: Technique Background Data Required When to Use PLAIN None n is very large (10,000+) PLAIN + ADAPT Few related tasks (1+) with a large number of I/O examples (1,000+) n is fairly large (1,000 to 10,000) META Many related tasks (100k+) with a small number of I/O examples (5+) n is small (1 to 20) META + ADAPT Same as META n is moderate (20 to 100) Although we have only applied these techniques to a single domain, we believe that these conclusions are highly intuitive, and should generalize across domains. In future work, we plan to explore more principled methods for adapted meta adaption, in order to improve upon results in the very limited-example scenario. 8 References [1] Jacob Andreas, Marcus Rohrbach, Trevor Darrell, and Dan Klein. Neural module networks. pages 39–48, 2016. [2] Marcin Andrychowicz and Karol Kurach. Learning efficient algorithms with hierarchical attentive memory. CoRR, abs/1602.03218, 2016. [3] Jonathon Cai, Richard Shin, and Dawn Song. Making neural programming architectures generalize via recursion. In ICLR, 2017. [4] Ivo Danihelka, Greg Wayne, Benigno Uria, Nal Kalchbrenner, and Alex Graves. Associative long shortterm memory. ICML, 2016. [5] Jacob Devlin, Jonathan Uesato, Surya Bhupatiraju, Rishabh Singh, Abdel-rahman Mohamed, and Pushmeet Kohli. Robustfill: Neural program learning under noisy I/O. CoRR, abs/1703.07469, 2017. [6] Yan Duan, Marcin Andrychowicz, Bradly C. Stadie, Jonathan Ho, Jonas Schneider, Ilya Sutskever, Pieter Abbeel, and Wojciech Zaremba. One-shot imitation learning. CoRR, abs/1703.07326, 2017. [7] Alex Graves, Greg Wayne, and Ivo Danihelka. Neural turing machines. arXiv preprint arXiv:1410.5401, 2014. [8] Edward Grefenstette, Karl Moritz Hermann, Mustafa Suleyman, and Phil Blunsom. Learning to transduce with unbounded memory. NIPS, 2015. [9] Sumit Gulwani, William R Harris, and Rishabh Singh. Spreadsheet data manipulation using examples. Communications of the ACM, 2012. [10] Mi-Young Huh, Pulkit Agrawal, and Alexei A. Efros. What makes imagenet good for transfer learning? CoRR, abs/1608.08614, 2016. URL http://arxiv.org/abs/1608.08614. [11] Armand Joulin and Tomas Mikolov. Inferring algorithmic patterns with stack-augmented recurrent nets. In NIPS, pages 190–198, 2015. [12] Karol Kurach, Marcin Andrychowicz, and Ilya Sutskever. Neural random-access machines. ICLR, 2016. [13] Brenden M Lake, Ruslan Salakhutdinov, and Joshua B Tenenbaum. Human-level concept learning through probabilistic program induction. Science, 350(6266):1332–1338, 2015. [14] Chengtao Li, Daniel Tarlow, Alexander L. Gaunt, Marc Brockschmidt, and Nate Kushman. Neural program lattices. In ICLR, 2017. [15] Minh-Thang Luong and Christopher D. Manning. Stanford neural machine translation systems for spoken language domains. 2015. [16] Arvind Neelakantan, Quov V. Le, and Ilya Sutskever. Neural programmer: Inducing latent programs with gradient descent. ICLR, 2016. [17] Richard E Pattis. Karel the robot: a gentle introduction to the art of programming. John Wiley & Sons, Inc., 1981. [18] Scott Reed and Nando de Freitas. Neural programmer-interpreters. ICLR, 2016. [19] Adam Santoro, Sergey Bartunov, Matthew Botvinick, Daan Wierstra, and Timothy Lillicrap. Metalearning with memory-augmented neural networks. In International conference on machine learning, pages 1842–1850, 2016. [20] Sainbayar Sukhbaatar, Arthur Szlam, Jason Weston, and Rob Fergus. End-to-end memory networks. NIPS, 2015. [21] Wojciech Zaremba, Tomas Mikolov, Armand Joulin, and Rob Fergus. Learning simple algorithms from examples. CoRR, abs/1511.07275, 2015. URL http://arxiv.org/abs/1511.07275. 9 A Karel Examples Figure 6: Four Karel instances from our test set, along with output from the META model. The model generates the correct output for the first three, and the incorrect output for the last instance. The underlying program is shown to demonstrate the complexity of the task, although it it not used by the model. 10
2cs.AI
arXiv:1711.06399v2 [math.ST] 5 Jan 2018 Average treatment effects in the presence of unknown interference∗ Fredrik Sävje† Peter M. Aronow‡ Michael G. Hudgens§ [email protected] [email protected] [email protected] January 8, 2018 Abstract We investigate large-sample properties of treatment effect estimators under unknown interference in randomized experiments. The inferential target is a generalization of the average treatment effect estimand that marginalizes over potential spillover effects. We show that estimators commonly used to estimate treatment effects under no-interference are consistent for the generalized estimand for most experimental designs under limited but otherwise arbitrary and unknown interference. The rates of convergence depend on the rate at which the amount of interference grows and the degree to which it aligns with dependencies in treatment assignment. Importantly for practitioners, the results imply that if one erroneously assumes that units do not interfere in a setting with limited, or even moderate, interference, standard estimators are nevertheless likely to be close to an average treatment effect if the sample is sufficiently large. Keywords: Causal effects, causal inference, experiments, interference, sutva. 1 Introduction Investigators of causality routinely assume that subjects under study do not interfere with each other. The no-interference assumption is so ingrained in the practice of causal inference that its application is often left implicit. Yet, interference appears to be at the heart of the social and medical sciences. Humans interact, and that is precisely the motivation for much of the research in these fields. The assumption is prevalent because investigators assume that their methods require it. The opening chapter of a recent textbook captures the sentiment well. The authors write “causal inference is generally impossible without no-interference assumptions” (Imbens & Rubin, 2015, p. 10). This notion provides the motivation for the current study. ∗ We thank Alex D’Amour, Matt Blackwell, Forrest Crawford, Peng Ding, Naoki Egami, Avi Feller, Owen Francis, Lihua Lei, Cyrus Samii and Jas Sekhon for helpful suggestions and discussions. This work was partially supported by NIH grant R01 AI085073. † Department of Political Science, Yale University. ‡ Department of Political Science & Department of Biostatistics, Yale University. § Department of Biostatistics, University of North Carolina, Chapel Hill. 1 We investigate to what degree one can weaken the assumption of no-interference and still draw credible inferences about causal relationships. We find that, indeed, causal inferences are impossible without assumptions about the interference, but the prevailing view severely exaggerates the issue. One must ensure that the interference is not all-encompassing but can otherwise allow the subjects to interfere in unknown and largely arbitrary ways. Our focus is estimation of average treatment effects in randomized experiments. A random subset of a sample of units is exposed to some treatment, and the quantity of interest is the average effect of the units’ treatments on their own outcomes. The no-interference assumption in this context is the restriction that no unit’s treatment affects other units’ outcomes. We consider the setting where such spillover effects exist, and in particular, when the form they may take is left unspecified. The contribution is two-fold. We first introduce an estimand—the expected average treatment effect or eate—that generalizes the conventional average treatment effect (ate) to a setting with interference. The conventional inferential target is not well-defined when units interfere since a unit’s outcome may be affected by more than one treatment. We resolve the issue by marginalizing the effects of interest over the assignment distribution of the incidental treatments. That is, for a given assignment, we may ask how a particular unit’s outcome is affected when only its own treatment is changed. We may ask the same for each unit in the experiment, and we may average these effects. This defines an average treatment effect that remains unambiguous under interference. The results may, however, be different if the exercise is repeated for another assignment; average effects under this definition depend on which assignment we use as a reference. The eate estimand marginalizes the effects over all possible reference assignments in order to capture the typical effect in the experiment. The estimand is a generalization of ate in the sense that they coincide whenever the latter is well-defined. The second contribution is to demonstrate that eate can be estimated consistently under mild restrictions on the interference and without structural knowledge thereof. Focus is on the standard Horvitz-Thompson and Hájek estimators. The results also pertain to the widely used difference-in-means and ordinary least squares estimators, as they are special cases of the Hájek estimator. The investigation starts with the Bernoulli and complete randomization experimental designs. We show that the estimators are consistent for eate under the designs as long as the average amount of interference grows at a sufficiently slow rate (according to a measure we define shortly). Root-n consistency is achieved whenever the average amount of interference is bounded. The investigation then turns to the paired randomization design. The design introduces perfectly correlated treatment assignments, and we show that this can make the estimators unstable even when the interference is sparse. The degree to which the dependencies introduced by the experimental design align with the interference structure must be restricted in order to achieve consistency. Information about the interference structure 2 beyond the aggregated restrictions is, however, still not needed. The insights from the paired design extend to a more general setting, and similar restrictions result in consistency under arbitrary experimental designs. The findings are of inherent theoretical interest as they move the limits for casual inference under interference. They are also of practical interest. The results pertain to standard estimators under standard experimental designs. As such, they apply to many previous studies where interference might have been present, but where it was assumed not to be. Studies that mistakenly assume that units do not interfere might, therefore, not necessarily be invalidated. The reported estimates are likely to be close to the expected average treatment effects if the samples are sufficiently large. 2 Related work Our investigation builds on a recent literature on causal inference under interference (see Halloran & Hudgens, 2016, for a review). The no-interference assumption itself is due to Cox (1958). The iteration that is most commonly used today was, however, formulated by Rubin (1980) as a part of the stable unit treatment variation assumption, or sutva. Early departures from this assumption are modes of analysis inspired by Fisher’s exact randomization test (Fisher, 1935). The approach employs “sharp” null hypotheses that stipulates the outcome of all units under all assignments. The most common such hypothesis is simply that treatment is inconsequential so the observed outcomes are constant over all assignments. As this subsumes that both primary and spillover effects do not exist, the approach tests for the existence of both types of effects simultaneously. The test has recently been adapted and extended to study interference specifically (see, e.g., Rosenbaum, 2007; Luo et al., 2012; Aronow, 2012; Bowers et al., 2013, 2016; Athey et al., 2017; Basse et al., 2017; Choi, 2017). Early methods for point estimation restricted the interference process through structural models and thereby presumed that interactions took a particular form (Manski, 1993). While the structural approach has been extended to capture effects under weaker assumptions in a larger class of interference processes (Lee, 2007; Graham, 2008; Bramoullé et al., 2009), it has still been criticized for being too restrictive (Goldsmith-Pinkham & Imbens, 2013; Angrist, 2014). A strand of the literature closer to the current exposition relaxes the structural assumptions. Interference is allowed to take arbitrary forms as long as it is contained within known and disjoint groups of units. The assumption is known as partial interference (see, e.g., Sobel, 2006; Hudgens & Halloran, 2008; Tchetgen Tchetgen & VanderWeele, 2012; Liu & Hudgens, 2014; Rigdon & Hudgens, 2015; Kang & Imbens, 2016; Liu et al., 2016; Basse & Feller, 2017). While partial interference allows for some progress on its own, it is typically coupled with stratified interference. The additional assumption stipulates that the only relevant aspect 3 of the interference is the proportion of treated units in the groups; the identities of the units are inconsequential for the spillover effects. More recent contributions have focused on relaxing the partial interference assumption. Interference is not restricted to disjoint groups, and units are allowed to interfere along more general structures such as social networks (see, e.g., Manski, 2013; Toulis & Kao, 2013; Ugander et al., 2013; Eckles et al., 2016; Aronow & Samii, 2017; Basse & Airoldi, 2017b; Forastiere et al., 2017; Ogburn & VanderWeele, 2017; Sussman & Airoldi, 2017). This allows for quite general forms of interactions, but the suggested estimation methods require detailed knowledge of the interference structure. Two studies are particularly close to the current investigation. Basse & Airoldi (2017a) consider average treatment effects under arbitrary and unknown interference just as we do. However, as discussed in the next section, they focus on a markedly different estimand. This leads them to conclude that causal effects cannot be investigated without additional information about the interference. Egami (2017) investigates a setting where the interference can be described by a set of networks. While his framework includes a stratified interference assumption, it admits quite general forms of interference since the networks are allowed to be overlapping and partially unobserved. Egami’s focus is, however, not large-sample properties of average treatment effect estimators; he characterizes the finite sample bias when estimating spillover effects. 3 Treatment effects under interference Consider a sample of n units indexed by the set U = {1, 2, · · · , n}. An experimenter intervenes on the world in ways that potentially affect the units. The intervention is described by a ndimensional binary vector z = (z1, z2, · · · , zn ) ∈ {0, 1} n . A particular value of z could, for example, denote that some drug is given to a certain subset of the units in U. We are particularly interested in how unit i is affected by the ith dimension of z. For short, we say that zi is unit i’s treatment. The effects of different interventions are defined as comparisons between the outcomes they produce. Each unit has a function yi : {0, 1} n → R denoting the observed outcome for the unit under a specific (potentially counterfactual) intervention (Neyman, 1923; Holland, 1986). In particular, yi (z) is the response of i when the intervention is z. We refer to the elements of the image of this function as potential outcomes. It will prove convenient to write the potential outcomes in a slightly different form. Let z−i = (z1, · · · , zi−1, zi+1, · · · , zn ) denote the (n− 1)-element vector constructed by deleting the ith element from z. The potential outcome yi (z) can then equivalently be written as yi (zi ; z−i ). We assume that the potential outcomes are well-defined throughout the paper. The assumption implies that the manner in which the experimenter manipulates z is inconsequential; 4 no matter how z came to take a particular value, the outcome is the same. Well-defined potential outcomes also imply that no physical law or other circumstance prohibits z to take any value in {0, 1} n . This ensures that the potential outcomes are, indeed, potential. The assumption does, however, not restrict the way the experimenter chooses to intervene on the world, and some interventions may have no probability of being realized. The experimenter sets z according to some random vector Z = (Z1, · · · , Zn ). The probability distribution of Z is the design of the experiment. The design is the sole source of randomness we will consider. Let Yi denote the observed outcome of unit i. The observed outcome is a random variable connected to the experimental design through the potential outcomes: Yi = yi (Z). As above, Z−i denotes Z net of its ith element, so Yi = yi (Zi ; Z−i ). 3.1 Expected average treatment effects It is conventional to assume that the potential outcomes are restricted so a unit’s outcome is only affected by its own treatment. That is, for any two assignments z and z′, if a unit’s treatment is the same for both assignments, then its outcome is the same; it is assumed that zi = zi′ implies yi (z) = yi (z′). This no-interference assumption admits a definition of the treatment effect for unit i as the contrast between its potential outcomes when we change its treatment: τi = yi (1; z−i ) − yi (0; z−i ), where z−i is any value in {0, 1} n−1 . No-interference implies that the choice of z−i is inconsequential for the values of yi (1; z−i ) and yi (0; z−i ). The variable can therefore be left free without ambiguity. The average of the unit-level effects is the quantity experimenters commonly use to summarize treatment effects. Definition 1. Under no-interference, the average treatment effect (ate) is the average unitlevel treatment effect: n 1X τi . τate = n i=1 The definitions require no-interference. References to the effect of a unit’s treatment become ambiguous when units interfere since τi may vary under permutations of z−i . The ambiguity is contagious; the average treatment effect similarly becomes ill-defined. To resolve the issue, we redefine the unit-level treatment effect for unit i as the contrast between its potential outcomes when we change its treatment while holding all other treatments fixed at a given assignment z−i . We call this quantity the assignment-conditional unit-level treatment effect: τi (z−i ) = yi (1; z−i ) − yi (0; z−i ). The only change from the conventional definition is that the connection to other units’ treatments is explicit. The new definition acknowledges that the effect of a unit’s treatment may 5 depend on the treatments assigned to other units. The change makes the unit-level effects unambiguous, and their average produces a version of the average treatment effect that remains well-defined under interference. Definition 2. An assignment-conditional average treatment effect is the average of the assignment-conditional unit-level treatment effect under a given assignment: τate (z) = n 1X τi (z−i ). n i=1 The redefined average effects are unambiguous under interference, but they are unwieldy. An average effect exists for each assignment, so their numbers grow exponentially in the sample size. Experimenters may for this reason not find it useful to study them individually. Similar to how unit-level effects are aggregated to an average effect, we focus on a summary of the assignment-conditional effects. Definition 3. The expected average treatment effect (eate) is the expected assignmentconditional average treatment effect: τeate = E[τate (Z)]. The expectation in the definition of eate is taken over the distribution of Z given by the experimental design. Under no-interference, τate (z) does not depend on z, and the marginalization is inconsequential. eate is, thus, a generalization of ate in the sense that the two estimands coincide whenever no-interference holds. When units interfere, eate marginalizes the effects over all possible treatment assignments; it describes the typical average treatment effect under the experimental design the experimenter actually implements. 3.2 Previous definitions under interference The eate estimand builds on previously proposed ideas. An estimand introduced by Hudgens & Halloran (2008) resolves the ambiguity of treatment effects under interference in a similar fashion. The authors refer to the quantity as the average direct causal effect, but we opt for another name to highlight how it differs from ate and eate. Definition 4. The average distributional shift effect (adse) is the average difference between the conditional expected outcomes for the two treatment conditions: τadse =  n  1X E[Yi | Zi = 1] − E[Yi | Zi = 0] . n i=1 Similar to eate, the average distributional shift effect marginalizes the potential outcomes over the experimental design. The estimands differ in which distributions they use for the 6 marginalization. The expectation in eate is over the unconditional assignment distribution, while adse marginalizes each potential outcome separately over different conditional distributions. The difference becomes clear when the estimands are written in similar forms: n   1X E yi (1; Z−i ) − yi (0; Z−i ) , τeate = n i=1  n  1X E[yi (1; Z−i ) | Zi = 1] − E[yi (0; Z−i ) | Zi = 0] . τadse = n i=1 The two estimands answer different causal questions. eate captures the expected effect of changing a random unit’s treatment in the current experiment. It is the expected average unit-level treatment effect. adse is the expected effect of changing from an experimental design where we hold the average unit’s treatment fixed at Zi = 1 to another design where its treatment is fixed at Zi = 0. That is, the estimand captures the compound effect of changing a unit’s treatment and simultaneously changing the experimental design (see, e.g., the discussion in Sobel, 2006). As a result, adse may be non-zero even if all unit-level effects are exactly zero. That is, when τi (z−i ) = 0 for all i and z−i . VanderWeele & Tchetgen Tchetgen (2011) introduces a version of adse that resolves the issue by conditioning both terms with the same value on i’s treatment. Their estimand is a conditional average of unit-level effects and, thus, mixes aspects of adse and eate. An alternative way to define average treatment effects is as the contrast between the average outcome when all units are treated and the average outcome when no unit is treated: Pn n−1 i=1 [yi (1) − yi (0)] where 1 and 0 are the unit and zero vectors. ate under this definition coincides exactly with the estimand in Definition 1 (and thus eate) whenever no-interference holds. The alternative definition does, however, not coincide with eate under interference. The estimands provide different descriptions of the causal setting. eate captures the typical treatment effect in the experiment actually implemented, while the alternative estimand captures the effect of completely scaling up or down treatment. Both descriptions could be of interest, but, as Basse & Airoldi (2017a) have established, no consistent estimator exists for the alternative estimand under arbitrary interference. 4 Quantifying interference Our results do not require detailed structural information about the interference. No progress can, however, be made if it is left completely unrestricted. Proposition 1 in the next section shows this formally. The intuition is simply that the change of a single unit’s treatment could lead to non-negligible changes in all units’ outcomes when the interference is unrestricted. The following definitions quantify the amount of interference. We say that unit i interferes with unit j if changing i’s treatment changes j’s outcome under at least one treatment assignment. We also say that a unit interferes with itself even if 7 its treatment does not affect its outcome. The indicator Ii j denotes such interference:  ′ ,  1 if y j (z) , y j (z′) for some z, z′ ∈ {0, 1} n such that z−i = z−i     Ii j = 1 if i = j,     0 otherwise.  The definition allows for asymmetric interference; unit i may interfere with unit j without the converse being true. The collection of interference indicators simply describes the interference structure in a sample. The definition itself does not impose restrictions on how the units may interfere. In particular, the indicators do not necessarily align with social networks or other structures through which units are thought to interact. Experimenters do not generally have enough information about how the units interfere to deduce or estimate the indicators. Their role is to act as a basis for an aggregated summary of the interference. Definition 5 (Interference dependence). davg n n X 1X = di j , n i=1 j=1 where di j = ( 1 if Iℓi Iℓ j = 1 for some ℓ ∈ U, 0 otherwise. The interference dependence indicator di j captures whether units i and j are affected by a common treatment. That is, i and j are interference dependent if they interfere directly P with each other or if some third unit interferes with both i and j. The sum nj=1 di j gives the number of interference dependencies for unit i, so the unit-average number of interference dependencies is davg . The variable acts as a measure of how close an experiment is to nointerference. No-interference is equivalent to davg = 1, which indicates that units are only interfering with themselves. At the other extreme, davg = n indicates that interference is complete in the sense that all pairs of units are affected by a common treatment. If sufficiently many units are interference dependent (i.e., davg is large), small perturbations of the treatment assignments may be amplified by the interference and induce large changes in many units’ outcomes. Interference dependence can be related to simpler descriptions of the interference. Consider the following quantities: Ii = n X j=1 Ii j , Iavg = n 1X Ii , n i=1 Imsq = n 1X I 2, n i=1 i and Imax = max Ii . i ∈U The first variable captures how many units i interferes with. That is, if changing unit i’s treatment would change the outcome of five other units, i is interfering with the five units and itself, and Ii = 6. Information about these quantities is useful (see, e.g., Aronow et al., 2016), but such knowledge is generally beyond our grasp. The subsequent three quantities provide 8 a more aggregated description of the interference. They are the average, mean square and maximum of the unit-level variable. The quantities bound davg from below and above. 2 . 2 ≤ davg ≤ Imsq ≤ Imax Lemma 1. Iavg The proof of Lemma 1 and all other proofs are given in appendices. The lemma implies that we can use Imsq or Imax rather than davg to restrict the interference. While such restrictions are stronger than necessary, the connection is useful as it may be more intuitive to reason about Imsq and Imax than about interference dependencies. 5 Large sample properties We investigate an asymptotic regime inspired by Isaki & Fuller (1982). Consider a sequence of samples indexed by their sample size. An experiment is conducted for each sample in the sequence. All variables related to the samples, such as the potential outcomes and experimental designs, have their own sequence also indexed by n. The indexing is, however, left implicit. We investigate how two common estimators of average treatment effects behave as the sample size approaches infinity subject to conditions on the sequences. Definition 6 (Horvitz-Thompson, ht, and Hájek, há, estimators). n n ZiYi 1 X (1 − Zi )Yi 1X − , n i=1 pi n i=1 1 − pi , ! , ! n n n n X X Zi (1 − Zi )Yi X 1 − Zi ZiYi X − , = 1 − pi i=1 pi i=1 i=1 1 − pi i=1 pi τ̂ht = τ̂há where pi = Pr(Zi = 1) is the marginal probability that unit i is assigned to Zi = 1. Estimators of this form were first introduced in the sampling literature to estimate population means under unequal inclusion probabilities (Horvitz & Thompson, 1952; Hájek, 1971). They have since received much attention from the causal inference and policy evaluation literatures where they are often referred to as inverse probability weigthed estimators (see, e.g., Hahn, 1998; Hirano et al., 2003; Hernán & Robins, 2006). Other estimators commonly used to analyze experiments, such as the difference-in-means and ordinary least squares estimators, are special cases of the Hájek estimator. As a consequence, the results apply directly to those cases as well. We assume throughout the paper that the experimental design and potential outcomes are sufficiently well-behaved as formalized in the following assumption. Assumption 1 (Regularity conditions). There exist constants k < ∞, q ≥ 2 and s ≥ 1 such that for all i ∈ U: 9 1A (Probabilistic assignment). k −1 ≤ Pr(Zi = 1) ≤ 1 − k −1 ,   1B (Bounded outcome moments). E |Yi | q ≤ k q ,   1C (Bounded potential outcome moments). E |yi (z; Z−i )| s ≤ k s for both z ∈ {0, 1}. The first regularity condition restricts the experimental design so that each treatment is realized with a positive probability. The condition does not restrict combinations of treatments, and assignments may exist such that Pr(Z = z) = 0. The second condition restricts the distributions of the observed outcomes so that the estimators remain well-defined asymptotically. The last condition restricts the potential outcomes off the support of the experimental design and ensures that eate is well-defined asymptotically. The exact values of q and s are inconsequential for the results in Section 5.2. The assumption can, in that case, be written simply with q = 2 and s = 1. However, the rate of convergence for an arbitrary experimental design depends on which moments can be bounded. The ideal case is when the potential outcomes themselves are bounded, in which case Assumption 1 holds as q → ∞ and s → ∞. The two moment conditions are similar in structure, but neither is implied by the other. Assumption 1B does not imply 1C since the former is only concerned with the potential outcomes on the support of the experimental design. The opposite implication does not hold since s may be smaller than q. 5.1 Restricting interference The sequence of davg describes the amount of interference in the sequence of samples. Our notion of limited interference is formalized as restrictions on this sequence. Assumption 2 (Restricted interference). davg = o(n). The assumption stipulates that units, on average, are interference dependent with an asymptotically negligible fraction of the sample. It still allows for substantial amounts of interference. The unit-average number of interference dependencies may even grow with the sample size. It is only assumed that the unit-average does not grow proportionally to the sample size. The total amount of interference dependencies may, thus, grow at a faster rate than n. In addition to restricting the amount of interference, Assumption 2 imposes weak restrictions on the structure of the interference. It rules out that the interference is so unevenly distributed that a few units are interfering with most other units. If the interference is concentrated so that a few treatments are affecting many units, small perturbations of the treatment assignments could be amplified through those treatments. At the extreme, a single unit interferes with all other units, and all units’ outcomes would change if we were to change its 10 treatment. The estimators would not stabilize if the interference is structured in this way even if it otherwise was sparse. Restricted interference is not sufficient for consistency. Sequences of experiments exist for which the assumption holds but the estimators are not converging to eate with high probability. Assumption 2 is, however, necessary for consistency of the ht and há estimators in the following sense. Proposition 1. For every sequence of experimental designs, if Assumption 2 does not hold, there exists a sequence of potential outcomes satisfying Assumption 1 such that the ht and há estimators do not converge in probability to eate. A consequence of the proposition is that experimental designs themselves cannot ensure consistency. We must somehow restrict the interference in order to make progress. The proposition implies that the weakest possible restriction on davg is Assumption 2. If a weaker restriction is imposed, e.g., davg = O(n), potential outcomes exist (for any experimental design) so that the relaxed interference restriction is satisfied but the ht and há estimators do not converge. Naturally, it might be possible to achieve consistency if one imposes stronger regularity conditions or if one restricts the interference in some other way. 5.2 Common experimental designs The investigation starts with three specific experimental designs. The designs are commonly used by experimenters and, thus, of interest in their own right. They also provide a good illustration of the issues that arise under unknown interference and act as a backdrop to the investigation of arbitrary designs in the subsequent section. 5.2.1 Bernoulli and complete randomization The simplest experimental design assigns treatment independently; the experimenter flips a coin for each unit and administer treatment accordingly. We call this a Bernoulli randomization design, and it satisfies: n Y Pr(Z = z) = pizi (1 − pi )1−zi i=1 for some set of assignment probabilities p1, p2, · · · , pn bounded away from zero and one. The outcomes of any two units are independent under a Bernoulli design when nointerference holds. This is not the case when units interfere. A single treatment may then affect two or more units, and the corresponding outcomes are dependent. That is, two units’ outcomes are dependent when they are interference dependent according to Definition 5. Restricting this dependence ensures that the effective sample size grows with the nominal size and grants consistency. 11 Proposition 2. With a Bernoulli randomization design under restricted interference (Assumption 2), the ht and há estimators are consistent for eate and converge at the following rates: 0.5  , (τ̂ht − τeate ) = Op n−0.5 davg and 0.5  (τ̂há − τeate ) = Op n−0.5 davg . The Bernoulli design tends to be inefficient in small samples because the size of the treatment groups vary over assignments. Experimenters often use designs that stabilize the group sizes. A common such design introduces dependencies in assignments so to keep the number of treated units fixed but otherwise assigns treatment with equal probability: ( n  −1 Pn zi = m, if i=1 m Pr(Z = z) = 0 otherwise, where m = ⌊pn⌋ for some fixed p strictly between zero and one. We call the design complete randomization. The dependencies introduced by complete randomization are not of concern under nointerference. The outcomes are only affected by a single treatment, and the dependence between any two treatments is asymptotically negligible. This need not be the case when units interfere. There are two issues to consider. First, the interference could interact with the experimental design so that two units’ outcomes are strongly dependent asymptotically even when they are not affected by a common treatment (i.e., when di j = 0). Consider, as an example, when one unit is affected by the first half of the sample and another unit is affected by the second half. Complete randomization introduces a strong dependence between the two halves; the number of treated units in the first half is perfectly correlated with the number of treated in the second half. The outcomes of the two units may therefore be (perfectly) correlated even when no treatment affects them both. We cannot rule out that such dependencies exist, but we can show that they are sufficiently rare whenever Assumption 2 holds. The second issue is that the dependencies introduced by the design distort our view of the potential outcomes. Whenever a unit is assigned to a certain treatment condition, units that interfere with the unit tend to be assigned to the other condition. One of the potential outcomes in each assignment-conditional unit-level effect is, thus, observed more frequently than the other. The estimators implicitly weight the two potential outcomes proportionally to their frequency, but the eate estimand weights them equally. The discrepancy introduces bias. Stated in another way, the estimators do not separate the effect of a unit’s own treatment from spillover effects of other units’ treatments. As an illustration, consider when the potential outcomes are equal to the number of treated P units: yi (z) = nj=1 z j . eate equals one here, but the estimators are constant at zero since the number of treated units (and, thus, all revealed potential outcomes) are fixed at m. The design 12 masks the effect of a unit’s own treatment with a spillover effect with the same magnitude but of the opposite sign. In general under complete randomization, if the number of units interfering with a unit is of the same order as the sample size, our view of the unit’s potential outcomes will be distorted also asymptotically. Similar to the first issue, we cannot rule out that such distortions exist, but restricted interference implies that they are sufficiently rare. Taken together, this establishes consistency under complete randomization with the same rate of convergence as under the Bernoulli design. Proposition 3. With a complete randomization design under restricted interference (Assumption 2), the ht and há estimators are consistent for eate and converge at the following rates: 0.5  , (τ̂ht − τeate ) = Op n−0.5 davg and 0.5  (τ̂há − τeate ) = Op n−0.5 davg . Recall that no-interference is equivalent to davg = 1. Propositions 2 and 3 reassuringly provide root-n consistency in that case. The propositions, however, make clear that nointerference is not necessary for such rates, and we may still allow for non-trivial amounts of interference. In particular, root-n rates follow whenever the unit-average amount of interference does not grow indefinitely with the sample size, i.e., when davg is bounded. Corollary 1. With a Bernoulli or complete randomization design under bounded interference davg = O(1), the ht and há estimators are root-n consistent for eate. 5.2.2 Paired randomization Complete randomization restricts treatment assignment to ensure treatment groups with a fixed size. The paired randomization design imposes even greater restrictions. Units are divided into pairs, and exactly one unit in each pair is assigned to treatment. It is implicit that the sample size is even so that all units are paired. Paired randomization could be forced on the experimenter by external constraints or used to improve precision (see, e.g., Fogarty, 2017, and the references therein). Let ρ : U → U describe a pairing so that ρ(i) = j indicates that units i and j are paired. The pairing is symmetric, so the self-composition of ρ is the identity function. The paired randomization design then satisfies: ( 2−n/2 if zi , zρ(i) for all i ∈ U, Pr(Z = z) = 0 otherwise. The paired design accentuates the two issues we faced under complete randomization. The dependence within any set of finite number of treatments is asymptotically negligible under complete randomization; issues only arose when the number of treatments affecting 13 a unit was of the same order as the sample size. Under paired randomization, Zi and Z j are perfectly correlated also asymptotically whenever ρ(i) = j. Dependencies may therefore remain in large samples even if the number of treatments affecting a unit is of a lower order than the sample size. Assumption 2 is no longer sufficient for consistency. We must consider to what degree the dependencies between treatments introduced by the design align with the structure of the interference. The following two definitions quantify the alignment. Definition 7 (Pair-induced interference dependence). ( n n X 1 if (1 − di j )Iℓi Iρ(ℓ)j = 1 for some ℓ ∈ U, 1X bi j , where bi j = bavg = n i=1 j=1 0 otherwise. Definition 8 (Within-pair interference). R = Pn i=1 Iρ(i)i . Under paired randomization, the dependence between the outcomes of two units not affected by a common treatment can be asymptotically non-negligible even when each unit is affected by a single treatment. In particular, the outcomes of units i and j such that di j = 0 could be (perfectly) correlated if two other units k and ℓ exist such that k interferes with i and ℓ interferes with j, and k and ℓ are paired. The purpose of Definition 7 is to capture such dependencies. The definition is similar in structure to Definition 5. Indeed, the upper bounds 2 . from Lemma 1 apply so that bavg ≤ Imsq ≤ Imax The second issue we faced under complete randomization is affected in a similar fashion. No matter the number of units that are interfering with unit i, if one of those units is the unit paired with i, we cannot separate the effects of Zi and Zρ(i) . The design imposes Zi = 1− Zρ(i) , so any effect of Zi on i’s outcome could just as well be attributed to Zρ(i) . Such dependencies will introduce bias, just as they did under complete randomization. However, unlike the previous design, restricted interference does not imply that the bias will vanish asymptotically. We must separately ensure that this type of alignment between the design and the interference is sufficiently rare. Definition 8 captures how common interference is between paired units. The two definitions allow us to restrict the degree to which the interference aligns with the pairing in the design. Assumption 3 (Restricted pair-induced interference). bavg = o(n). Assumption 4 (Pair separation). R = o(n). Experimenters may find that the first assumption is quite tenable under restricted interference. As both bavg and davg are bounded by Imsq , restricted pair-induced interference tends to hold in cases where restricted interference can be assumed. It is, however, possible that the latter assumption holds even when the former does not if paired units are interfering with sufficiently disjoint sets of units. 14 Whether pair separation holds largely depend on how the pairs were formed. It is, for example, common that the pairs reflect some social structure (e.g., paired units may live in the same household). The interference tends, in such cases, to align with the pairing almost perfectly, and Assumption 4 is unlikely to hold. Pair separation is more reasonable when pairs are formed based on generic background characteristics. This is often the case when the experimenter uses the design to increase precision. The assumption could, however, still be violated if the background characteristics include detailed geographic data or other information likely to be associated with interference. Proposition 4. With a paired randomization design under restricted interference, restricted pair-induced interference and pair separation (Assumptions 2, 3 and 4), the ht and há estimators are consistent for eate and converge at the following rates:  0.5 + n−0.5 b0.5 (τ̂ht − τeate ) = O n−1 R + n−0.5 davg avg ,  0.5 + n−0.5 b0.5 (τ̂há − τeate ) = O n−1 R + n−0.5 davg avg . 5.3 Arbitrary experimental designs We conclude our investigations by considering a general sequence of experiments with unspecified designs. An arbitrary experimental design may align with the interference just like the paired design. We start the final investigation by introducing a set of definitions that allow us to characterize such alignment in the general setting. It will prove useful to collect all treatments affecting a particular unit i into a vector: ZIi = (I1i Z1, I2i Z2, · · · , Ini Zn ). The vector is defined so that its jth element is Z j if unit j is interfering with i, and zero otherwise. Similar to above, let ZI−i be the (n − 1)-dimensional vector constructed by deleting the ith element from ZIi . The definition has the following convenient property:   Yi = yi (Z) = yi ZIi , and yi (z; Z−i ) = yi z; ZI−i . This allows us to capture the alignment between the design and the interference using ZIi .  Since Yi = yi ZIi , the outcomes of two units i and j are independent whenever ZIi and ZIj are independent. We can, thus, characterize the outcome dependence introduced by the experimental design by the dependence between ZIi and ZIj . Similarly, the dependence between Zi and ZI−i governs how distorted our view of the potential outcomes is. We use the alpha-mixing coefficient introduced by Rosenblatt (1956) to measure the dependence between the assignment vectors. Specifically, for two random variables X and Y defined on the same probability space, let:  α X, Y = sup Pr(x ∩ y) − Pr(x) Pr(y) , x ∈σ(X) y ∈σ(Y) 15 where σ(X) and σ(Y ) denote the sub-sigma-algebras generated by the respective random variable. The coefficient α(X, Y ) is zero if and only if X and Y are independent, and increasing values indicate increasing dependence. The maximum is α(X, Y ) = 1/4. The alpha-mixing coefficient is, thus, similar to the ordinary correlation coefficient. It is, however, not restricted to linear associations between two scalar random variables but can capture any type of dependence between any two sets of random variables. The coefficient allows us to define measures of the average amount of dependence between ZIi and ZIj and between Zi and Z−i . Definition 9 (External and internal mixing coefficients). Let q and s be the maximum values such that Assumptions 1B and 1C hold: αext = n n X    q−2 1X (1 − di j ) α ZIi, ZIj q , n i=1 j=1 and αint = n  X i=1 α Zi, ZI−i   s−1 s , where 00 is defined as zero to accommodate the cases q = 2 and s = 1.  Each term of the external mixing coefficient, α ZIi, ZIj , captures the dependence between the treatments affecting unit i and the treatments affecting unit j. If the dependence between ZIi and ZIj tends to be weak or rare, αext will be small compared to n. Similarly, if dependence between Zi and ZI−i tends to be weak or rare, αint will be small relative to n. In this sense, the external and internal mixing coefficients are generalizations of Definitions 7 and 8. Indeed, one can show that αext ∝ bavg and αint ∝ R under paired randomization where the proportionality constants are given by q and s. The generalized definitions allow for generalized assumptions. Assumption 5 (Design mixing). αext = o(n). Assumption 6 (Design separation). αint = o(n). Design mixing and separation stipulate that dependence between treatments are sufficiently rare or sufficiently weak (or some combination thereof). This encapsulates and extends the conditions in the previous sections. In particular, complete randomization under bounded  interference constitutes a setting where dependence is weak: α ZIi , ZIj approaches zero for pairs of units with di j = 0. Paired randomization under Assumptions 3 constitutes a setting  where dependence is rare: α ZIi, ZIj is equal to 1/4 for some pairs of units also asymptotically, but they are a small fraction of the total number of pairs. Complete randomization under  Assumption 2 combines the two settings: α ZIi, ZIj might be non-negligible asymptotically for some pairs with di j = 0, but such pairs are rare. For all other pairs with di j = 0, the pair-level mixing coefficient approaches zero quickly. A similar comparison can be made for the design separation assumption. 16 Proposition 5. Under restricted interference, design mixing and design separation (Assumptions 2, 5 and 6), the ht and há estimators are consistent for eate and converge at the following rates: 0.5 0.5  + n−0.5 αext , (τ̂ht − τeate ) = O n−1 αint + n−0.5 davg  0.5 0.5 (τ̂há − τeate ) = O n−1 αint + n−0.5 davg + n−0.5 αext . Remark 1. The convergence results for Bernoulli and paired randomization presented in the previous section can be proven as consequences of Proposition 5. That is not the case for complete randomization. The current proposition applied to that design would suggest slower rates of convergence than given by Proposition 3 (unless the potential outcomes are bounded). This highlights that Proposition 5 provides worst-case rates for all designs that satisfy Assumptions 1, 5 and 6. Particular designs might be better behaved and, thus, ensure that the estimators converge at faster rates. For complete randomization, one can prove that restricted interference implies a stronger mixing condition than the conditions defined above. In particular, the conditions can be redefined using the ψ-mixing coefficient as introduced by Blum et al. (1963) and Philipp (1969) rather than the alpha-mixing coefficient. This provides rates of convergence that are independent of which moments are bounded in the regularity conditions, and Proposition 3 would follow. Remark 2. If no units interfere, ZI−i is constant at zero, and Assumption 6 is trivially satisfied. No-interference does, however, not imply that Assumption 5 holds. Consider a design that restricts all treatments to be equal: Z1 = Z2 = · · · = Zn . The external mixing coefficient would not be zero in this case; in fact, αext → n/4. This illustrates that one must limit the dependencies between treatment assignments even when units do not interfere. Proposition 5 can, in this sense, be seen as an extension of the restrictions imposed in Theorem 1 in Robinson (1982). 5.4 When design separation fails Experimental designs tend to induce dependence between treatments of units that interfere, and experimenters might find it hard to satisfy design separation. We saw one example of such a design with the paired randomization. It might for this reason be advisable to choose simple designs such as the Bernoulli or complete randomization if one wants to investigate treatment effects under unknown interference. These designs cannot align with the interference structure, and one need only consider whether Assumption 2 holds. Another approach is to design the experiment so to ensure design separation. For example, one should avoid pairing units that are suspected to interfere in the paired randomization design. It will, however, not always be possible to ensure that design separation holds, and we might want to ask what the consequences of such departures are. Without Assumption 6, 17 the effect of units’ own treatments cannot be separated from potential spillover effects, and the estimators need not be consistent for eate. They may, however, converge to some other quantity, and indeed, they do. The average distributional shift effect (adse) is defined using the conditional distributions of the outcomes. Thus, the estimand does not attempt to separate the effect of units’ own treatments from spillover effects, and design separation is immaterial. Proposition 6. Under restricted interference and design mixing (Assumptions 2 and 5), the ht and há estimators are consistent for adse and converge at the following rates: 0.5 0.5  + n−0.5 αext , (τ̂ht − τadse ) = Op n−0.5 davg −0.5 0.5 −0.5 0.5  davg + n αext . (τ̂há − τadse ) = Op n 6 Concluding remarks Experimenters worry about interference. The first line of attack tends to be to design experiments so to minimize the risk that units interfere. One could, for example, physically isolate the units throughout the study. The designs needed to rule out interference may, however, make the experiments so alien to the topics under study that the findings are no longer relevant; the results would not generalize to the real world where units do interfere. When design-based fixes are undesirable or infeasible, one could try to mend the situation by accounting for any lingering interference in the analysis. This, however, requires detailed information about the structure of the interference. The modal experimenter neither averts all interference by design nor accounts for it in the analysis. They conduct and analyze the experiment as if no units interfere, even when the no-interference assumption, at best, holds true only approximately or with some probability. The disconnect between assumptions and reality is reconciled by what appears to be a common intuition among experimenters that goes against the conventional view: unadjusted interference is not a fatal flaw so long as it is limited. Our results provide rigorous justification for that intuition. We have exclusively focused on point estimation. We conjecture that variance estimation requires stronger restrictions on the interference. If inference beyond point estimation is desired, the Fisherian approach referenced above is a feasible route. An approach similar to Aronow et al. (2016) could also be useful if additional information about the interference is available. The rates of convergences do, however, provide some guidance. The estimators converge at a slower rate than root-n whenever the average amount of interference grows with the sample size. Experimenters may, therefore, expect that conventional variance estimators are too optimistic relative to the true uncertainty when units interfere. The eate estimand generalizes the average treatment effect to experiments with interference. All interpretations of ate do, however, not apply. In particular, eate cannot be interpreted as the difference between average outcomes when no unit and all units are treated. 18 The estimand is the expected, marginal effect of changing a single treatment in the experiment actually implemented. A consequence is that eate depends on the experimental design. Experimenters know that the results from a single experiment may not extend beyond the present sample. When units interfere, concerns about external validity should include the experimental design as well. Our focus has been on the effect of a unit’s own treatment, but the results are not restricted to “direct” treatment effects as typically defined. In particular, the pairing between units and treatments is arbitrary in the causal model, and an experiment could have several reasonable pairings. Consider, for example, when the intervention is to give some drug to the units in the sample. The most natural pairing might be to let a unit’s treatment indicator denote whether we give the drug to the unit itself. We may, however, just as well let it denote whether we give the drug to, say, the unit’s spouse (who may be in the sample as well). eate would then be the expected spillover effect between spouses. The current investigation applies, in this sense, both to usual treatment effects and rudimentary spillover effects. We conjecture that the results can be extended to other definitions of treatment, and they would in that case afford robustness to unknown and arbitrary interference for more intricate spillover effects. References Angrist, J. D. (2014). The perils of peer effects. Labour Economics, 30, 98–108. Aronow, P. M. (2012). A general method for detecting interference between units in randomized experiments. Sociological Methods & Research, 41(1), 3–16. Aronow, P. M., Crawford, F. W., & Zubizarreta, J. R. (2016). Confidence intervals for means under constrained dependence. arXiv:1602.00359v1. Aronow, P. M. & Samii, C. (2017). Estimating average causal effects under general interference, with application to a social network experiment. Annals of Applied Statistics, in print. Athey, S., Eckles, D., & Imbens, G. W. (2017). Exact p-values for network interference. Journal of the American Statistical Association, in print. Basse, G. W. & Airoldi, E. M. (2017a). Limitations of design-based causal inference and A/B testing under arbitrary and network interference. arXiv:1705.05752v1. Basse, G. W. & Airoldi, E. M. (2017b). Model-assisted design of experiments in the presence of network correlated outcomes. arXiv:1507.00803v4. Basse, G. W. & Feller, A. (2017). Analyzing two-stage experiments in the presence of interference. Journal of the American Statistical Association, in print. 19 Basse, G. W., Feller, A., & Toulis, P. (2017). Exact tests for two-stage randomized designs in the presence of interference. arXiv:1709.08036v1. Blum, J. R., Hanson, D. L., & Koopmans, L. H. (1963). On the strong law of large numbers for a class of stochastic processes. Zeitschrift für Wahrscheinlichkeitstheorie und verwandte Gebiete, 2(1), 1–11. Bowers, J., Fredrickson, M. M., & Aronow, P. M. (2016). A more powerful test statistic for reasoning about interference between units. Political Analysis, 24(3), 395–403. Bowers, J., Fredrickson, M. M., & Panagopoulos, C. (2013). Reasoning about interference between units: A general framework. Political Analysis, 21(1), 97–124. Bramoullé, Y., Djebbari, H., & Fortin, B. (2009). Identification of peer effects through social networks. Journal of Econometrics, 150(1), 41–55. Choi, D. (2017). Estimation of monotone treatment effects in network experiments. Journal of the American Statistical Association, in print. Cox, D. R. (1958). Planning of Experiments. New York: Wiley. Davydov, Y. A. (1970). The invariance principle for stationary processes. Theory of Probability & Its Applications, 15(3), 487–498. Eckles, D., Karrer, B., & Ugander, J. (2016). Design and analysis of experiments in networks: Reducing bias from interference. Journal of Causal Inference, 5(1). Egami, N. (2017). Unbiased estimation and sensitivity analysis for network-specific spillover effects: Application to an online network experiment. arXiv:1708.08171v2. Fisher, R. A. (1935). The Design of Experiments. London: Oliver & Boyd. Fogarty, C. B. (2017). On mitigating the analytical limitations of finely stratified experiments. arXiv:1706.06469v1. Forastiere, L., Airoldi, E. M., & Mealli, F. (2017). Identification and estimation of treatment and interference effects in observational studies on networks. arXiv:1609.06245v3. Goldsmith-Pinkham, P. & Imbens, G. W. (2013). Social networks and the identification of peer effects. Journal of Business & Economic Statistics, 31(3), 253–264. Graham, B. S. (2008). Identifying social interactions through conditional variance restrictions. Econometrica, 76(3), 643–660. 20 Hahn, J. (1998). On the role of the propensity score in efficient semiparametric estimation of average treatment effects. Econometrica, 66(2), 315–331. Hájek, J. (1971). Comment on "An essay on the logical foundations of survey sampling, part one". In V. P. Godambe & D. A. Sprott (Eds.), Foundations of Statistical Inference. Toronto: Holt, Rinehart and Winston. Halloran, M. E. & Hudgens, M. G. (2016). Dependent happenings: a recent methodological review. Current Epidemiology Reports, 3(4), 297–305. Hernán, M. A. & Robins, J. M. (2006). Estimating causal effects from epidemiological data. Journal of Epidemiology & Community Health, 60(7), 578–586. Hirano, K., Imbens, G. W., & Ridder, G. (2003). Efficient estimation of average treatment effects using the estimated propensity score. Econometrica, 71(4), 1161–1189. Holland, P. W. (1986). Statistics and causal inference. Journal of the American Statistical Association, 81(396), 945–960. Horvitz, D. G. & Thompson, D. J. (1952). A generalization of sampling without replacement from a finite universe. Journal of the American Statistical Association, 47(260), 663–685. Hudgens, M. G. & Halloran, M. E. (2008). Toward causal inference with interference. Journal of the American Statistical Association, 103(482), 832–842. Imbens, G. W. & Rubin, D. B. (2015). Causal Inference for Statistics, Social, and Biomedical Sciences: An Introduction. New York: Cambridge University Press. Isaki, C. T. & Fuller, W. A. (1982). Survey design under the regression superpopulation model. Journal of the American Statistical Association, 77(377), 89–96. Kang, H. & Imbens, G. W. (2016). Peer encouragement designs in causal inference with partial interference and identification of local average network effects. arXiv:1609.04464v1. Lee, L. (2007). Identification and estimation of econometric models with group interactions, contextual factors and fixed effects. Journal of Econometrics, 140(2), 333–374. Liu, L. & Hudgens, M. G. (2014). Large sample randomization inference of causal effects in the presence of interference. Journal of the American Statistical Association, 109(505), 288–301. Liu, L., Hudgens, M. G., & Becker-Dreps, S. (2016). On inverse probability-weighted estimators in the presence of interference. Biometrika, 103(4), 829–842. 21 Luo, X., Small, D. S., Li, C.-S. R., & Rosenbaum, P. R. (2012). Inference with interference between units in an fMRI experiment of motor inhibition. Journal of the American Statistical Association, 107(498), 530–541. Manski, C. F. (1993). Identification of endogenous social effects: The reflection problem. The Review of Economic Studies, 60(3), 531. Manski, C. F. (2013). Identification of treatment response with social interactions. The Econometrics Journal, 16(1), 1–23. Neyman, J. (1990/1923). On the application of probability theory to agricultural experiments. Essay on principles. Section 9. Statistical Science, 5(4), 465–472. (Original work published 1923). Ogburn, E. L. & VanderWeele, T. J. (2017). Vaccines, contagion, and social networks. The Annals of Applied Statistics, 11(2), 919–948. Philipp, W. (1969). The central limit problem for mixing sequences of random variables. Zeitschrift für Wahrscheinlichkeitstheorie und verwandte Gebiete, 12(2), 155–171. Rigdon, J. & Hudgens, M. G. (2015). Exact confidence intervals in the presence of interference. Statistics & Probability Letters, 105, 130–135. Robinson, P. M. (1982). On the convergence of the Horvitz-Thompson estimator. Australian Journal of Statistics, 24(2), 234–238. Rosenbaum, P. R. (2007). Interference between units in randomized experiments. Journal of the American Statistical Association, 102(477), 191–200. Rosenblatt, M. (1956). A central limit theorem and a strong mixing condition. Proceedings of the National Academy of Sciences, 42(1), 43–47. Rubin, D. B. (1980). Randomization analysis of experimental data: The Fisher randomization test comment. Journal of the American Statistical Association, 75(371), 591. Sobel, M. E. (2006). What do randomized studies of housing mobility demonstrate? Journal of the American Statistical Association, 101(476), 1398–1407. Sussman, D. L. & Airoldi, E. M. (2017). Elements of estimation theory for causal effects in the presence of network interference. arXiv:1702.03578v1. Tchetgen Tchetgen, E. J. & VanderWeele, T. J. (2012). On causal inference in the presence of interference. Statistical Methods in Medical Research, 21(1), 55–75. 22 Toulis, P. & Kao, E. (2013). Estimation of causal peer influence effects. In S. Dasgupta & D. McAllester (Eds.), Proceedings of the 30th International Conference on Machine Learning, volume 28 of Proceedings of Machine Learning Research (pp. 1489–1497). Atlanta: PMLR. Ugander, J., Karrer, B., Backstrom, L., & Kleinberg, J. (2013). Graph cluster randomization: Network exposure to multiple universes. In Proceedings of the 19th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, KDD ’13 (pp. 329–337). New York: ACM. VanderWeele, T. J. & Tchetgen Tchetgen, E. J. (2011). Effect partitioning under interference in two-stage randomized vaccine trials. Statistics & Probability Letters, 81(7), 861–869. Appendices A1 Miscellaneous definitions and lemmas Definition A1. n 1X E[yi (z; Z−i )], n i=1 n 1X 1[Zi = z]Yi µ̂z = , n i=1 Pr(Zi = z) n 1X E[yi (z; Z−i ) | Zi = z], n i=1 n 1[Zi = z] 1X n̂z = . n i=1 Pr(Zi = z) µ̆z = µz = Corollary A1. τeate = µ1 − µ0, τadse = µ̆1 − µ̆0, τ̂ht = µ̂1 − µ̂0, Proof. Follows directly from Definitions 3, 4, 6 and A1. τ̂há = µ̂1 µ̂0 − . n̂1 n̂0  Corollary A2. (τ̂ht − τadse ) = ( µ̂1 − µ̆1 ) − ( µ̂0 − µ̆0 ), (τ̂há − τadse ) = ( µ̂1 /n̂1 − µ̆1 ) − ( µ̂0 /n̂0 − µ̆0 ). Proof. Follows directly from Corollary A1.  Lemma A1. µ̆z = O(1). 23 Proof. For some sufficiently large constant k < ∞: n n   1X 1X E[Yi | Zi = z] ≤ E |Yi | Zi = z n i=1 n i=1 n   kX Pr(Zi = z) E |Yi | Zi = z (Assumption 1A) ≤ n i=1 n      kX ≤ Pr(Zi = 1) E |Yi | Zi = 1 + Pr(Zi = 0) E |Yi | Zi = 0 n i=1 n   kX = E |Yi | ≤ k 2, n i=1 | µ̆z | = where the last inequality follows from Assumption 1B and Jensen’s inequality.  Lemma A2. E[ µ̂z ] = µ̆z . Proof. Assumption 1A ensures that Pr(Zi = z) > 0. Note that Yi = yi (Zi ; Z−i ) by definition, so:   n E 1[Z = z]Y n 1X Pr(Zi = z) E[Yi | Zi = z] 1X i i E[ µ̂z ] = = n i=1 Pr(Zi = z) n i=1 Pr(Zi = z) n 1X E[yi (z; Z−i ) | Zi = z].  = n i=1 Lemma A3. E[n̂z ] = 1. Proof. Assumption 1A ensures that Pr(Zi = z) > 0, so:   n E 1[Z = z] n 1X Pr(Zi = z) 1X i E[n̂z ] = = = 1. n i=1 Pr(Zi = z) n i=1 Pr(Zi = z)  Lemma A4. There exists a constant k < ∞ such that for all i, j ∈ U and z ∈ {0, 1}:  Cov 1[Zi = z]Yi , 1[Z j = z]Yj ≤ k. Proof. Cauchy–Schwarz’s inequality, Jensen’s inequality and Assumption 1B give us:  h   i 0.5 Cov 1[Zi = z]Yi , 1[Z j = z]Yj ≤ Var 1[Zi = z]Yi Var 1[Z j = z]Yj h     i 0.5   0.5 ≤ k2 = k. ≤ E Yi2 E Yj2 Lemma A5. There exists a constant k < ∞ such that for all i ∈ U and z ∈ {0, 1}: E[yi (z; Z−i ) | Zi = z] − E[yi (z; Z−i )] ≤ k. 24  Proof. For some sufficiently large constant c < ∞, Assumption 1A gives us:     E |yi (z; Z−i )| Zi = z ≤ E |yi (z; Z−i )| Zi = z   Pr(Zi = 1 − z) E |yi (1 − z; Z−i )| Zi = 1 − z + Pr(Zi = z)     E |Yi |   E |yi (Zi ; Z−i )| = ≤ c E |Yi | . = Pr(Zi = z) Pr(Zi = z) Let k = 2c2 , and consider the expression to be bounded:     E[yi (z; Z−i ) | Zi = z] − E[yi (z; Z−i )] ≤ E |yi (z; Z−i )| Zi = z + E |yi (z; Z−i )|     ≤ c E |Yi | + E |yi (z; Z−i )| ≤ k, where the last inequality follows from Jensen’s inequality and Assumptions 1C and 1B .  A2 Proof of Lemma 1 2 2 . Lemma 1. Iavg ≤ davg ≤ Imsq ≤ Imax Pn Proof. Note that 0 ≤ Ii j ≤ di0.5 j = di j ≤ ℓ=1 Iℓi Iℓ j and consider:  n 2  n n 2 1X 1 XX 2 Iavg = Ii j Ii = n i=1 n i=1 j=1  n n 2 1 X X 0.5 ≤ d n i=1 j=1 i j ≤ n n X 1X di j = davg n i=1 j=1 (0 ≤ Ii j ≤ di0.5 j ) (Jensen’s inequality) n n X n X 1X Pn Iℓi Iℓ j (di j ≤ ℓ=1 Iℓi Iℓ j ) n i=1 j=1 ℓ=1  n  n n X n X 1X 1X 2 Iℓi Iℓ2 = Imsq ≤ Imax .  Iℓ j = = n ℓ=1 i=1 n ℓ=1 j=1 ≤ A3 Proof of Proposition 1 Proposition 1. For every sequence of experimental designs, if Assumption 2 does not hold, there exists a sequence of potential outcomes satisfying Assumption 1 such that the ht and há estimators do not converge in probability to eate. Proof. If Assumption 2 does not hold, there exists a constant 0 < c such that cn ≤ davg for sufficiently large n. Consider the following potential outcomes:      n⌈c0.5 n⌉ −1 z1 zi Pr(Zi = 1) − (1 − zi ) Pr(Zi = 0) if i ≤ ⌈c0.5 n⌉,  yi (z) =   0 otherwise,  25 where ⌈·⌉ is the ceiling function. This implies: di j = so we have: 0.5 davg =     1 if i = j or i, j ≤ ⌈c0.5 n⌉,   0 otherwise,  0.5 n n X n X 1 ⌈cXn⌉ ⌈cXn⌉ 1 ⌈c0.5 n⌉ 2 n − ⌈c0.5 n⌉ 1X di j = di j + dii = + , n i=1 j=1 n i=1 n i= ⌈c0.5 n⌉+1 n n j=1 which gives limn→∞ n−1 davg = c as desired. We first ensure that the stipulated potential outcomes satisfy our regularity conditions. For i > ⌈c0.5 n⌉, we have yi (z) = 0 for all z, so the moment conditions in Assumption 1 trivially hold for these units. For i ≤ ⌈c0.5 n⌉, we can bound the potential outcomes for all z by:   |yi (z)| ≤ n⌈c0.5 n⌉ −1 Pr(Zi = 1) + Pr(Zi = 0) ≤ c−0.5, so Assumptions 1B and 1C hold even when q → ∞ and s → ∞ if set k = c−0.5 . Consider the eate estimand:  n  1X E[yi (1; Z−i )] − E[yi (0; Z−i )] τeate = n i=1  n  E[y1 (1; Z−1 )] X E[yi (1; Z−i )] E[yi (0; Z−i )] = + − n n n i=2 0.5  Pr(Z1 = 1) ⌈cXn⌉  0.5 −1 0.5 −1 = + E[⌈c n⌉ Z Pr(Z = 1)] + E[⌈c n⌉ Z Pr(Z = 0)] 1 i 1 i ⌈c0.5 n⌉ i=2 0.5  Pr(Z1 = 1) Pr(Z1 = 1) ⌈cXn⌉  Pr(Z = 1) + Pr(Z = 0) = Pr(Z1 = 1). + = i i ⌈c0.5 n⌉ ⌈c0.5 n⌉ i=2 Then consider the ht estimator: n n 1X ZiYi (1 − Zi )Yi 1X − n i=1 Pr(Zi = 1) n i=1 Pr(Zi = 0) n n Zi yi (Z) (1 − Zi )yi (Z) 1X 1X Z1 y1 (Z) + − = n Pr(Z1 = 1) n i=2 Pr(Zi = 1) n i=2 Pr(Zi = 0) τ̂ht = = Z1 ⌈c0.5 n⌉ 0.5 + 1 ⌈cXn⌉ n⌈c0.5 n⌉ −1 Z1 Zi ⌈Zi = 1⌉ n i=2 Pr(Zi = 1) 0.5 = Z1 ⌈c0.5 n⌉ 1 ⌈cXn⌉ n⌈c0.5 n⌉ −1 Z1 (1 − Zi ) Pr(Zi = 0) + n i=2 Pr(Zi = 0) + Z1 ⌈c0.5 n⌉ 0.5 n⌉ ⌈cX Zi + i=2 26 Z1 ⌈c0.5 n⌉ 0.5 n⌉ ⌈cX i=2 (1 − Zi ) = Z1 . By Assumption 1A, there exists a constant k > 0 such that k −1 ≤ Pr(Z1 = 1) ≤ 1 − k −1 . Subsequently, | τ̂ht − τeate | = |Z1 − Pr(Z1 = 1)| ≥ k −1 . The proof for τ̂há follows the same structure.  A4 Proof of Proposition 2 Lemma A6. Under Bernoulli randomization, (τadse − τeate ) = 0. Proof. From Definitions 2, 3 and 4, we have:  n  1X E[yi (1; Z−i ) | Zi = 1] − E[yi (0; Z−i ) | Zi = 0] n i=1  n  1X E[yi (1; Z−i )] − E[yi (0; Z−i )] = n i=1  n    1X =E [yi (1; Z−i ) − yi (0; Z−i )] = E τate (Z) = τeate, n i=1 τadse = where the second equality follows from the Bernoulli design and its independent treatment assignments.   Lemma A7. Under Bernoulli randomization, Var( µ̂z ) = O n−1 davg . Proof. For some sufficiently large constant k < ∞:    n n Cov 1[Z = z]Y , 1[Z = z]Y n X 1 X 1 X 1[Zi = z]Yi i i j j = 2 Var( µ̂z ) = Var n i=1 Pr(Zi = z) Pr(Zi = z) Pr(Z j = z) n i=1 j=1 ≤ n n X  k X Cov 1[Z = z]Y , 1[Z = z]Y . i i j j n2 i=1 j=1 (Assumption 1A) Recall di j and davg from Definition 5: Var( µ̂z ) ≤ n  n X   k X di j + (1 − di j ) Cov 1[Zi = z]Yi, 1[Z j = z]Yj 2 n i=1 j=1 ≤ k 2 n−1 davg + n n X  k X (1 − di j ) Cov 1[Zi = z]Yi, 1[Z j = z]Yj , 2 n i=1 j=1 where the last inequality follows from Lemma A4. The Bernoulli design implies that the elements of Z are independent. When di j = 0, units i and j share no common treatments affecting them, so ZIi and ZIj are independent. We have  Yi = yi (Z) = yi ZIi , so it follows:  (1 − di j ) Cov 1[Zi = z]Yi, 1[Z j = z]Yj = 0.  0.5 . Lemma A8. Under Bernoulli randomization, ( µ̂z − µ̆z ) = Op n−0.5 davg 27  Proof. Markov’s inequality and Lemma A2 gives us:  Pr µ̂z − µ̆z 2 2 −1 ≥ k n davg   Var µ̂z ≤ 2 −1 k n davg for any constant k > 0. Lemma A7 implies that for sufficiently large k:  Var µ̂z kn−1 davg 1 ≤ = . 2 −1 2 −1 k k n davg k n davg Thus, for sufficiently large n, the probability that µ̂z − µ̆z deviate from zero with more than a 0.5 can be bounded by any ε > 0 by setting k = 1/ε.  fixed multiple of n−0.5 davg Corollary A3. Under Bernoulli randomization and Assumption 2, ( µ̂z − µ̆z ) = op (1). Proof. Follows directly from Assumption 2 and Lemma A8.    Lemma A9. Under Bernoulli randomization, n̂z − 1 = Op n−0.5 . Proof. Consider the variance of n̂z :   n  n Var 1[Z = z] 1 X 1[Zi = z] 1 X i Var(n̂z ) = Var = 2   n i=1 Pr(Zi = z) n i=1 Pr(Zi = z) 2 n 1 − Pr(Zi = z) 1 X = 2 ≤ n−1 k, n i=1 Pr(Zi = z) where the last inequality follows from Assumption 1A. The lemma then follows from Markov’s inequality and Lemma A3 using the same approach as in the proof of Lemma A8.   Corollary A4. Under Bernoulli randomization, n̂z − 1 = op (1). Proof. Follows directly from Lemma A9.  Lemma A10. Under Bernoulli randomization and Assumption 2:  0.5  µ̂z /n̂z − µ̆z = Op n−0.5 davg . Proof. Corollary A4 ensures us that we safely can disregard the event n̂z = 0, which gives us: µ̂z − µ̆z µ̆z (n̂z − 1) µ̂z − µ̆z = − . n̂z n̂z n̂z Let f (a, b) = a/b and consider the first order Taylor expansion of the two terms around (0, 1):  µ̂z − µ̆z = f µ̂z − µ̆z, n̂z = ( µ̂z − µ̆z ) + r1, n̂z  µ̆z (n̂z − 1) = f µ̆z (n̂z − 1), n̂z = µ̆z (n̂z − 1) + r2, n̂z 28 and, thus: µ̂z − µ̆z = ( µ̂z − µ̆z ) − µ̆z (n̂z − 1) + r1 − r2, n̂z   where r1 = op ( µ̂z − µ̆z ) + (n̂z − 1) and r2 = op µ̆z (n̂z − 1) + (n̂z − 1) by Lemma A1 and Corollaries A3 and A4. [Note that we cannot expand µ̂z /n̂z directly since µ̂z and µ̆z may not be convergent; our assumptions only ensure that µ̂z − µ̆z converges.] Lemmas A1, A8 and A9 finish the proof.  Proposition 2. With a Bernoulli randomization design under restricted interference (Assumption 2), the ht and há estimators are consistent for eate and converge at the following rates: 0.5  0.5  , and (τ̂há − τeate ) = Op n−0.5 davg . (τ̂ht − τeate ) = Op n−0.5 davg Proof. Decompose the errors of the estimators as such: τ̂ht −τeate = (τadse −τeate )+(τ̂ht −τadse ), τ̂há −τeate = (τadse −τeate )+(τ̂há −τadse ). Corollary A2 and Lemmas A6, A8 and A10 give the rates. Assumption 2 gives consistency.  A5 Proof of Proposition 3 Definition A2. Let m = Pn i=1 Zi be the element sum of Z (i.e., the number of treated units). Remark A1. Complete randomization implies that m = ⌊pn⌋ almost surely for some fixed p strictly between zero and one. P Definition A3. Let Ji = nj=1 I ji be the number of units interfering with unit i. Lemma A11. Under complete randomization, for any i ∈ U such that Ji ≤ min(m, n − m) and any z ∈ {0, 1}: max I z∈ Z−i Pr(ZI−i = z | Zi = z) Pr(ZI−i = z) −1 ≤  Ji , Pr(Zi = z) max(m, n − m) I = z ∈ {0, 1} n−1 : Pr(ZI = z) > 0 is the support of ZI . where Z−i −i −i P P I Proof. Let t = j,i I ji z j be the element sum of some z ∈ Z−i , and let T = j,i I ji Z j be the element sum of ZI−i (i.e., the number of treated units interfering with i, excluding i itself). Complete randomization gives us that Zi and ZI−i are independent conditional on T, and as a consequence:    Pr T = t Zi = z Pr ZI−i = z T = t, Zi = z Pr ZI−i = z Zi = z =    Pr ZI−i = z Pr T = t Pr ZI−i = z T = t    Pr T = t Zi = z Pr T = t Zi = z Pr ZI−i = z T = t  . = =   Pr T = t Pr T = t Pr ZI−i = z T = t 29 We surely have T ≤ Ji ≤ min(m, n − m) which together with complete randomization imply that T is hyper-geometric according to:      −1 m n−m n Pr(T = t) = , t Ji − t Ji    −1  m−1 n−m n−1 Pr(T = t | Zi = z) = z t Ji − t Ji     −1 m n−m−1 n−1 + (1 − z) , t Ji − t Ji and, thus: n Ji n−1  Ji  Pr T = t Zi = z  = Pr T = t " z m−1  t m t + (1 − z) n−m−1  # Ji −t n−m  . Ji −t Recall the definition of the binomial coefficient:    −1 x x! (x − 1)! x y = , = x−1 y!(x − y)! y!(x − 1 − y)! x−y y so we have:  Pr T = t Zi = z  −1= Pr T = t n Ji n−1  Ji " z m−1  t m t + (1 − z) n−m−1  # Ji −t n−m  Ji −t −1 " # (n − m) − (Ji − t) m−t n + (1 − z) z −1 = n − Ji m n−m " # n (n − m) − (Ji − t) n − Ji m−t = + (1 − z) − z n − Ji m n−m n # " n t Ji − t Ji = − z − (1 − z) n − Ji n m n−m # " Ji Ji − t t = , Pr(Zi = z) − z − (1 − z) Pr(Zi = z)(n − Ji ) Ji Ji n−m where the last equality exploits that Pr(Zi = z) = z m n + (1 − z) n under complete randomization. The expression within brackets is strictly between −1 and 1, so it follows:  Pr T = t Zi = z Ji Ji ≤ ,  −1 ≤ Pr(Zi = z)(n − Ji ) Pr(Zi = z) max(m, n − m) Pr T = t where Ji ≤ min(m, n − m) gives the last inequality. 30  Lemma A12. Under complete randomization, for any i, j ∈ U such that di j = 0 and 4Ji Jj ≤ min(m, n − m): max zi ∈ ZiI z j ∈ ZIj Pr(ZIi = zi, ZIj = z j ) Pr(ZIi = zi ) Pr(ZIj = zj ) −1 ≤ 2Ji Jj , min(m, n − m)  where ZiI = z ∈ {0, 1} n : Pr(ZIi = z) > 0 is the support of ZIi . P Proof. Let Tmin = min(m, n−m) be the size of the smallest treatment group. Let ti = nj=1 I ji z j P be the element sum of zi ∈ ZiI , and let Ti = nj=1 I ji Z j be the element sum of ZIi (i.e., the number of treated units interfering with i including i itself). We surely have 0 ≤ Ti + Tj ≤ Ji + Jj ≤ Tmin since 4Ji Jj ≤ Tmin by assumption and Ji ≥ 1 by definition. From di j = 0 we ⊥ ZIj | Ti, Tj and have that ZIi and ZIj are disjoint, thus complete randomization gives us ZIi ⊥ ZIi ⊥ ⊥ Tj | Ti : Pr(ZIi = zi, ZIj = z j ) Pr(ZIi = zi ) Pr(ZIj = z j ) = = = Pr(Ti = ti, Tj = t j ) Pr(ZIi = zi , ZIj = z j | Ti = ti, Tj = t j ) Pr(Ti = ti ) Pr(ZIi = zi | Ti = ti ) Pr(Tj = t j ) Pr(ZIj = z j | Tj = t j ) Pr(Ti = ti, Tj = t j ) Pr(ZIi = zi | Ti = ti ) Pr(ZIj = z j | Tj = t j ) Pr(Ti = ti ) Pr(ZIi = zi | Ti = ti ) Pr(Tj = t j ) Pr(ZIj = z j | Tj = t j ) Pr(Ti = ti | Tj = t j ) . Pr(Ti = ti ) Complete randomization implies that Ti is hypergeometric:      −1 m n−m n , Pr(Ti = ti ) = ti Ji − ti Ji  −1    m − t j n − m − (Jj − t j ) n − Jj , Pr(Ti = ti | Tj = t j ) = Ji ti Ji − ti thus: Pr(Ti = ti | Tj = t j ) = Pr(Ti = ti ) m−t j  n−m−(J j −t j ) n ti Ji −ti Ji . m n−m  n−J j  ti Ji −ti Ji Recall the definition of the binomial coefficient:   −1 y−1  x Y x−a (x − z)! x! y , = x−z  = y!(x − y)! y!(x − z − y)! a=0 x − z − a y 31 so we have: m−t j  ti m ti n−m−(J j −t j ) Ji −ti n−m  Ji −ti n Ji n−J j  Ji = tY i −1 a=0   i −1 m − t j − a tY tj = 1− , m−a m−a a=0  −ti −1  Jj − t j n − m − (Jj − t j ) − a Ji Y = 1− , n−m−a n−m−a a=0 a=0   JY JY i −1 i −1 Jj n−a = 1+ , = n − Jj − a a=0 a=0 n − Jj − a "   # "Ji −ti −1  # tY i −1 Y Pr(Ti = ti | Tj = t j ) tj Jj − t j = 1− 1− Pr(Ti = ti ) m−a n−m−a a=0 a=0 "  #  JY i −1 Jj × 1+ . n − Jj − a a=0 = Ji Y −ti −1 First, consider when: 1≥ Pr(Ti = ti | Tj = t j ) ≥ 0, Pr(Ti = ti ) and note that: " #   ti Jj ≥ 1− , Tmin − Ji a=0 "  Ji −ti #  Ji Y −ti −1  Jj − t j Jj 1− ≥ 1− , n−m−a Tmin − Ji a=0 "  # JY i −1 Jj 1+ ≥ 1, n − Jj − a a=0  tY i −1 tj 1− m−a so we have:   ti   Ji −ti   Ji Pr(Ti = ti | Tj = t j ) Jj Jj Jj ≥ 1− 1− = 1− Pr(Ti = ti ) Tmin − Ji Tmin − Ji Tmin − Ji     a    a Ji Ji X X Jj −Jj Ji Ji ≥ 1− , = a=1 a Tmin − Ji a=0 a Tmin − Ji where the third equality is a binomial expansion. It follows that: a Ji    Pr(Ti = ti | Tj = t j ) X Jj Ji ≤ 1− . Pr(Ti = ti ) a=1 a Tmin − Ji Next, consider when: 1≤ Pr(Ti = ti | Tj = t j ) . Pr(Ti = ti ) 32 We now bound the factors as follows: "  ti −1 Y 1− " a=0 tj m−a # ≤ 1, # Jj − t j ≤ 1, 1− n−m−a a=0 "   Ji #  JY i −1 Jj Jj 1+ ≤ 1+ , n − Jj − a Tmin − Ji a=0 Ji Y −ti −1  so we get:   Ji a Ji    X Jj Jj Pr(Ti = ti | Tj = t j ) Ji ≤ 1+ = Pr(Ti = ti ) Tmin − Ji a=0 a Tmin − Ji    a Ji X Jj Ji =1+ , a=1 a Tmin − Ji and it follows that: a Ji    X Jj Pr(Ti = ti | Tj = t j ) Ji −1 ≤ . Pr(Ti = ti ) a=1 a Tmin − Ji Taken together, have we:  a a Ji Ji    X X Jj Jj Pr(Ti = ti | Tj = t j ) Ji Jia ≤ −1 ≤ Pr(Ti = ti ) Tmin − Ji a=1 a=1 a Tmin − Ji     a  a Ji JX i −1 X Ji Jj Ji Jj Ji Jj = = Tmin − Ji a=0 Tmin − Ji a=1 Tmin − Ji  ∞  a  X Ji Jj Ji Jj . ≤ Tmin − Ji a=0 Tmin − Ji By assumption 4Ji Jj ≤ Tmin , so Ji Jj ≤ Tmin − Ji and the geometric series converge:   ∞  a    X Ji Jj Ji Jj Ji Jj Tmin − Ji = Tmin − Ji a=0 Tmin − Ji Tmin − Ji Tmin − Ji − Ji Jj Ji Jj 2Ji Jj Ji Jj ≤ ≤ , = Tmin − Ji − Ji Jj Tmin − 2Ji Jj Tmin where the last inequality follows from 4Ji Jj ≤ Tmin .  0.5 . Lemma A13. Under complete randomization, (τadse − τeate ) = O n−1 davg 33  Proof. Let Tmin = min(m, n − m) and hi = 1[Ji ≤ Tmin ]. Corollary A2 gives us: |τadse − τeate | = ( µ̆1 − µ1 ) − ( µ̆0 − µ0 )   1 n X 1X = (2z − 1) E[yi (z; ZI−i ) | Zi = z] − E[yi (z; ZI−i )] n i=1 z=0 ≤ = 1 n X 1X E[yi (z; ZI−i ) | Zi = z] − E[yi (z; ZI−i )] n i=1 z=0 n 1 X 1X hi E[yi (z; ZI−i ) | Zi = z] − E[yi (z; ZI−i )] n i=1 z=0 + n 1 X 1X (1 − hi ) E[yi (z; ZI−i ) | Zi = z] − E[yi (z; ZI−i )] . n i=1 z=0 (A1)  I = z ∈ {0, 1} n−1 : Pr(ZI = z) > 0 be the support of ZI and consider the first Let Z−i −i −i term in (A1): hi 1 X E[yi (z; ZI−i ) | Zi = z] − E[yi (z; ZI−i )] z=0 = hi 1 X  X z=0 z∈ ZI −i ≤ hi 1 X X z=0 z∈ ZI −i ≤ hi 1 X z=0 = hi 1 X z=0 ≤ hi  Pr(ZI−i = z | Zi = z) − Pr(ZI−i = z) yi (z; z) Pr(ZI−i = z) Pr(Zi = z, ZI−i = z) Pr(Zi = z) Pr(ZI−i = z) X Ji Pr(ZI−i = z)|yi (z; z)| Pr(Zi = z)Tmin z∈ ZI − 1 |yi (z; z)| (Lemma A11) −i   Ji E |yi (z; Z−i )| Pr(Zi = z)Tmin kJi . Tmin (Assumptions 1A and 1C) We can apply Lemma A11 since hi = 1 implies Ji ≤ Tmin . −1 J by definition, so it follows with Lemma A5 Note that we have (1 − hi ) ≤ (1 − hi )Tmin i that: (1 − hi ) 1 X E[yi (z; ZI−i ) | Zi = z] − E[yi (z; ZI−i )] ≤ (1 − hi )k ≤ (1 − hi ) z=0 and we get: |τadse − τeate | ≤ kJi , Tmin  n n  n X kJi k 1X 1X −1 0.5 = I ji = kTmin Iavg ≤ k 2 n−1 Iavg ≤ k 2 n−1 davg , n i=1 Tmin Tmin n i=1 j=1 where the second to last inequality follows from Assumption 1A and the last follows from Lemma 1.  34  0.5 . Lemma A14. Under complete randomization, ( µ̂z − µ̆z ) = Op n−0.5 davg Proof. For some sufficiently large constant k < ∞, Assumption 1A gives us: Var( µ̂z ) ≤ n n X  k X Cov 1[Zi = z]Yi, 1[Z j = z]Yj . 2 n i=1 j=1 Let hi j = 1[4Ji Jj ≤ Tmin ] and recall di j and davg from Definition 5: n  n X  k X di j + (1 − di j )hi j + (1 − di j )(1 − hi j ) 2 n i=1 j=1  × Cov 1[Zi = z]Yi, 1[Z j = z]Yj n  n X  k X (1 − di j )hi j + (1 − di j )(1 − hi j ) ≤ k 2 n−1 davg + 2 n i=1 j=1 Var( µ̂z ) ≤  × Cov 1[Zi = z]Yi, 1[Z j = z]Yj , where the last inequality follows from Lemma A4.   Note that Yi = yi (Z) = yi ZIi and let ZiI = z ∈ {0, 1} n : Pr(ZIi = z) > 0 be the support of ZIi . Furthermore let Tmin = min(m, n − m), and consider the terms in the double sum for which (1 − di j )hi j = 1:   Cov 1[Zi = z]yi ZIi , 1[Z j = z]y j ZIj        = E 1[Zi = z]yi ZIi 1[Z j = z]y j ZIj − E 1[Zi = z]yi ZIi E 1[Z j = z]y j ZIj   X X   I I Pr(Zi = zi, Z j = z j )1[zi = z]yi zi 1[z j = z]y j z j = zi ∈ ZiI z j ∈ ZIj − =  X X zi ∈ ZiI z j ∈ ZIj X Pr(ZIi = zi )1[zi = z]yi zi zi ∈ ZiI    X Pr(ZIj = z j )1[z j = z]y j z j z j ∈ ZIj Pr(ZIi = zi, ZIj = z j ) − Pr(ZIi = zi ) Pr(ZIj = z j )      × 1[zi = z]yi zi 1[z j = z]y j z j X X Pr(ZIi = zi, ZIj = z j ) − Pr(ZIi = zi ) Pr(ZIj = z j ) |yi (zi )||y j (z j )| ≤ zi ∈ ZiI z j ∈ ZIj = X X Pr(ZIi zi ∈ ZiI z j ∈ ZIj ≤ = zi ) Pr(ZIj = zj ) Pr(ZIi = zi, ZIj = z j ) Pr(ZIi = zi ) Pr(ZIj = z j ) 2Ji Jj X X Pr(ZIi = zi ) Pr(ZIj = z j )|yi (zi )||y j (z j )| Tmin z ∈ ZI z ∈ ZI i i j − 1 |yi (zi )||y j (z j )| (Lemma A12) j    2Ji Jj     2kJi Jj 2Ji Jj  = E |yi (ZIi )| E |y j (ZIj )| = E |Yi | E |Yj | ≤ . (Assumption 1B) Tmin Tmin Tmin 35 We can apply Lemma A12 since (1 − di j )hi j = 1 implies 4Ji Jj ≤ Tmin . −1 J J . With Lemma Recall that hi j = 1[4Ji Jj ≤ Tmin ], so we have (1 − hi j ) < (1 − hi j )4Tmin i j A4, it follows that:   (1 − di j )(1 − hi j ) Cov 1[Zi = z]yi ZIi , 1[Z j = z]y j ZIj ≤ (1 − di j )(1 − hi j )k 4kJi Jj . < (1 − di j )(1 − hi j ) Tmin Taken together, we have: n  n X  Ji Jj 4k 2 X (1 − di j )hi j + (1 − di j )(1 − hi j ) 2 Tmin n i=1 j=1   n  n n n 4k 2 X X Ji Jj 4k 2 1 X 1X ≤ k 2 n−1 davg + 2 = k 2 n−1 davg + Ji Jj Tmin n i=1 n j=1 n i=1 j=1 Tmin  n n   n n X 1 XX 4k 2 1 X −1 Iki Ik j (Definition A3) = kn davg + Tmin n i=1 k=1 n j=1 k=1 Var( µ̂z ) ≤ k 2 n−1 davg + −1 2 = kn−1 davg + 4k 2Tmin Iavg 2 = kn−1 davg + 4k 3 n−1 Iavg (Assumption 1A) ≤ kn−1 davg + 4k 3 n−1 davg . (Lemma 1) The lemma then follows from Markov’s inequality and Lemma A2 using the same approach as in the proof of Lemma A8.  Lemma A15. Under complete randomization, τ̂há = τ̂ht . Pn Zi = m, is fixed under complete randomization. Proof. The size of each treatment group, i=1 Furthermore, the marginal treatment probability is Pr(Zi = z) = zmn−1 + (1 − z)(n − m)n−1 for all units. It follows that: n n X 1X 1[Zi = z] 1 n̂z = = 1[Zi = z] = 1. n i=1 Pr(Zi = z) zm + (1 − z)(n − m) i=1 Together with Corollary A1, we have: τ̂há = µ̂1 µ̂0 − = µ̂1 − µ̂0 = τ̂ht . n̂1 n̂0  Proposition 3. With a complete randomization design under restricted interference (Assumption 2), the ht and há estimators are consistent for eate and converge at the following rates: 0.5  0.5  (τ̂ht − τeate ) = Op n−0.5 davg , and (τ̂há − τeate ) = Op n−0.5 davg . Proof. Using Lemma A15, decompose the errors of the estimators as such: (τ̂ht − τeate ) = (τ̂há − τeate ) = (τadse − τeate ) + (τ̂ht − τadse ). Corollary A2 and Lemmas A13 and A14 give the rates. Assumption 2 gives consistency. 36  A6 Proof of Proposition 4 Lemma A16. Under paired randomization, (τadse − τeate ) = O(n−1 R). Proof. Corollary A2 gives us: |τadse − τeate | = ( µ̆1 − µ1 ) − ( µ̆0 − µ0 )   1 n X 1X (2z − 1) E[yi (z; ZI−i ) | Zi = z] − E[yi (z; ZI−i )] = n i=1 z=0 ≤ 1 n X 1X E[yi (z; ZI−i ) | Zi = z] − E[yi (z; ZI−i )] . n i=1 z=0 By paired randomization, we have Zi = 1 − Zρ(i) and Zi ⊥ ⊥ Z j for all j , ρ(i). As a I consequence, (1 − Iρ(i)i ) E[yi (z; Z−i ) | Zi = z] = (1 − Iρ(i)i ) E[yi (z; ZI−i )], which gives us: |τadse − τeate | ≤ 1 n  X 1X Iρ(i)i + (1 − Iρ(i)i ) E[yi (z; ZI−i ) | Zi = z] − E[yi (z; ZI−i )] n i=1 z=0 1 n X 1X E[yi (z; ZI−i ) | Zi = z] − E[yi (z; ZI−i )] Iρ(i)i n i=1 z=0 n X k Iρ(i)i = kn−1 R. ≤ n i=1 = where the second to last inequality follows from Lemma A5.   Lemma A17. Under paired randomization, Var( µ̂z ) = O n−1 davg + n−1 bavg . Proof. We have Pr(Zi = z) = 0.5 under paired randomization, so: n Cov 1[Z = z]Y , 1[Z = z]Y n X 1 X i i j j Var( µ̂z ) = 2 Pr(Zi = z) Pr(Z j = z) n i=1 j=1 ≤  n n X  4 X Cov 1[Zi = z]Yi, 1[Z j = z]Yj . 2 n i=1 j=1 Recall di j and davg from Definition 5 and bi j and bavg from Definition 7: Var( µ̂z ) ≤ n  n X  4 X d + (1 − d )b + (1 − d )(1 − b ) i j i j i j i j i j n2 i=1 j=1  × Cov 1[Zi = z]Yi, 1[Z j = z]Yj ≤ 4kn−1 davg + 4kn−1 bavg n n X  4 X (1 − di j )(1 − bi j ) Cov 1[Zi = z]Yi, 1[Z j = z]Yj . + 2 n i=1 j=1 where the last inequality follows from Lemma A4. 37  Cov 1[Zi = z]Yi, 1[Z j = z]Yj is non-zero in two cases: either some unit ℓ is interfering with both i and j (i.e., di j = 1), or some unit ℓ is interfering with i and some other unit k is interfering with j and ρ(ℓ) = k so ℓ and k are paired (i.e., bi j = 1). Our definitions imply that di j + bi j = 1 whenever ρ(i) = j, so the indicators capture cases where the covariance is non-zero purely because of dependence between Zi and Z j . As a consequence, when di j = bi j = 0, the covariance is zero:  (1 − di j )(1 − bi j ) Cov 1[Zi = z]Yi, 1[Z j = z]Yj = 0.   0.5 + n−0.5 b0.5 . Lemma A18. Under paired randomization, ( µ̂z − µ̆z ) = Op n−0.5 davg avg Proof. Markov’s inequality and Lemma A2 gives us the following for any constant k > 0:    2 Var µ̂z 2 −0.5 0.5 −0.5 0.5  2 Pr µ̂z − µ̆z ≥ k n davg + n bavg ≤  0.5 + n−0.5 b0.5 2 k 2 n−0.5 davg avg  Var µ̂z , ≤ 2 −1 k n davg + n−1 bavg where the last inequality follows from that all terms in the denominator are non-negative. Lemma A17 completes the proof using the same approach as in the proof of Lemma A8.  Lemma A19. Under paired randomization, τ̂há = τ̂ht . Pn 1[Zi = z] = n/2, it follows Proof. Under paired randomization Pr(Zi = z) = 0.5 and i=1 that: n n 1[Zi = z] 1X 2X 1[Zi = z] = 1. n̂z = = n i=1 Pr(Zi = z) n i=1 Corollary A1 completes the proof.  Proposition 4. With a paired randomization design under restricted interference, restricted pair-induced interference and pair separation (Assumptions 2, 3 and 4), the ht and há estimators are consistent for eate and converge at the following rates:  0.5 + n−0.5 b0.5 (τ̂ht − τeate ) = O n−1 R + n−0.5 davg avg ,  0.5 (τ̂há − τeate ) = O n−1 R + n−0.5 davg + n−0.5 b0.5 avg . Proof. Using Lemma A19, decompose the errors of the estimators as such: (τ̂ht − τeate ) = (τ̂há − τeate ) = (τadse − τeate ) + (τ̂ht − τadse ). Corollary A2 and Lemmas A16 and A18 give the rates, and Assumptions 2, 3 and 4 give consistency.  38 A7 Proof of Proposition 5 Lemma A20. Under an arbitrary experimental design, (τadse − τeate ) = O(n−1 αint ). Proof. Corollary A2 gives us: |τadse − τeate | = ( µ̆1 − µ1 ) − ( µ̆0 − µ0 )   1 n X 1X = (2z − 1) E[yi (z; ZI−i ) | Zi = z] − E[yi (z; ZI−i )] n i=1 z=0 1 n X 1X E[yi (z; ZI−i ) | Zi = z] − E[yi (z; ZI−i )] . n i=1 z=0 ≤ Let Li (z) = 1[|yi (z; ZI−i )| ≥ ci ] for some ci > 0, and consider the terms in the sum: 1 X E[yi (z; ZI−i ) | Zi = z] − E[yi (z; ZI−i )] z=0 = 1 X E[Li (z)yi (z; ZI−i ) + (1 − Li (z))yi (z; ZI−i ) | Zi = z] z=0 ≤ 1 X − E[Li (z)yi (z; ZI−i ) + (1 − Li (z))yi (z; ZI−i )] E[(1 − Li (z))yi (z; ZI−i ) | Zi = z] − E[(1 − Li (z))yi (z; ZI−i )] z=0 + 1 X E[Li (z)yi (z; ZI−i ) | Zi = z] − E[Li (z)yi (z; ZI−i )] . (A2) z=0  I = z ∈ {0, 1} n−1 : Pr(ZI = z) > 0 Consider the first term in expression (A2). Let Z−i −i be the support of ZI−i , and let k < ∞ be some sufficiently large constant: 1 X E[(1 − Li (z))yi (z; ZI−i ) | Zi = z] − E[(1 − Li (z))yi (z; ZI−i )] z=0 = 1 X  X z=0 z∈ ZI −i = 1 X X z=0 z∈ ZI −i  Pr(ZI−i = z | Zi = z) − Pr(ZI−i = z) 1[|yi (z; z)| < ci ]yi (z; z)   1 Pr(Zi = z, ZI−i = z) − Pr(Zi = z) Pr(ZI−i = z) Pr(Zi = z) × 1[|yi (z; z)| < ci ]yi (z; z) ≤ 1 X X z=0 z∈ ZI −i 1 Pr(Zi = z, ZI−i = z) − Pr(Zi = z) Pr(ZI−i = z) Pr(Zi = z) × 1[|yi (z; z)| < ci ]|yi (z; z)| ≤ kci 1 X X Pr(Zi = z, ZI−i = z) − Pr(Zi = z) Pr(ZI−i = z) , z=0 z∈ ZI −i 39 where the last equality follows from 1[|yi (z; z)| < ci ]|yi (z; z)| ≤ ci and Assumption 1A. I : Note that, for any z ∈ {0, 1} and z ∈ Z−i Pr(Zi = z, ZI−i = z) − Pr(Zi = z) Pr(ZI−i = z)     = Pr(ZI−i = z) − Pr(Zi = 1 − z, ZI−i = z) − 1 − Pr(Zi = 1 − z) Pr(ZI−i = z) = Pr(Zi = 1 − z, ZI−i = z) − Pr(Zi = 1 − z) Pr(ZI−i = z) . It follows that: kci 1 X X Pr(Zi = z, ZI−i = z) − Pr(Zi = z) Pr(ZI−i = z) z=0 z∈ ZI −i = 2kci X Pr(Zi = 1, ZI−i = z) − Pr(Zi = 1) Pr(ZI−i = z) . I z∈ Z−i Consider the following sets:  + I Z−i = z ∈ Z−i : Pr(Zi = 1, ZI−i = z) ≥ Pr(Zi = 1) Pr(ZI−i = z) ,  − I Z−i = z ∈ Z−i : Pr(Zi = 1, ZI−i = z) ≤ Pr(Zi = 1) Pr(ZI−i = z) , so we can write: 2kci X Pr(Zi = 1, ZI−i = z) − Pr(Zi = 1) Pr(ZI−i = z) I z∈ Z−i = 2kci X Pr(Zi = 1, ZI−i = z) − Pr(Zi = 1) Pr(ZI−i = z) + z∈ Z−i + 2kci X − z∈ Z−i  Pr(Zi = 1) Pr(ZI−i = z) − Pr(Zi = 1, ZI−i = z) = 2kci Pr(Zi = 1, A+ ) − Pr(Zi = 1) Pr(A+ )  + 2kci Pr(Zi = 1) Pr(A− ) − Pr(Zi = 1, A− ) = 2kci Pr(Zi = 1, A+ ) − Pr(Zi = 1) Pr(A+ )   + 2kci Pr(Zi = 1, A− ) − Pr(Zi = 1) Pr(A− ) , + and A− is the event ZI ∈ Z− . A+ and A− are both in the where A+ is the event ZI−i ∈ Z−i −i −i I sub-sigma-algebra generated by Z−i (and so is the event Zi = 1 with respect to the algebra generated by Zi ). It follows: 2kci Pr(Zi = 1, A+ ) − Pr(Zi = 1) Pr(A+ ) + 2kci Pr(Zi = 1, A− ) − Pr(Zi = 1) Pr(A− ) ≤ 4kci sup Pr(A ∩ B) − Pr(A) Pr(B) A∈σ(Zi ) B ∈σ(ZI−i )  = 4kci α Zi, ZI−i , 40  where α Zi, ZI−i is of alpha-mixing coefficients as defined in the main text. Consider the second term in expression (A2): 1 X E[Li (z)yi (z; ZI−i ) | Zi = z] − E[Li (z)yi (z; ZI−i )] z=0 = 1 X Pr(Zi = 1 − z) E[Li (z)yi (z; ZI−i ) | Zi = z] z=0 ≤ 1  X − Pr(Zi = 1 − z) E[Li (z)yi (z; ZI−i ) | Zi = 1 − z] Pr(Zi = 1 − z) E[Li (z)|yi (z; ZI−i )| | Zi = z] z=0 ≤k 1  X + Pr(Zi = 1 − z) E[Li (z)|yi (z; ZI−i )| | Zi = 1 − z] Pr(Zi = z) E[Li (z)|yi (z; ZI−i )| | Zi = z] z=0 =k + Pr(Zi = 1 − z) E[Li (z)|yi (z; ZI−i )| | Zi = 1 − z] 1 X   E Li (z)|yi (z; ZI−i )| ,   z=0 where the third inequality follows from Assumption 1A. Note that cis−1 Li (z)|yi (z; ZI−i )| ≤ |yi (z; ZI−i )| s almost surely for both z ∈ {0, 1} whenever s ≥ 1. It follows that: so we have:     E Li (z)|yi (z; ZI−i )| ≤ ci1−s E |yi (z; ZI−i )| s ,     k E Li (1)| yi (1; ZI−i )| + k E Li (0)| yi (0; ZI−i )|     ≤ kci1−s E |yi (1; ZI−i )| s + kci1−s E |yi (0; ZI−i )| s . The two terms in expression (A2) taken together yield: 1 X z=0 E[yi (z; ZI−i ) | Zi = z] − E[yi (z; ZI−i )]      ≤ 4kci α Zi, ZI−i + kci1−s E |yi (1; ZI−i )| s + kci1−s E |yi (0; ZI−i )| s . The expression is trivially zero when ZI−i and Zi are independent, so we will consider  α Zi, ZI−i > 0. Recall that the inequality holds for any ci > 0 and s ≥ 1. Set s to    −1/s max  1/s the maximum value such that Assumption 1C holds and set ci = α Zi, ZI−i ȳi where:      ȳimax = max E |yi (1; ZI−i )| s , E |yi (0; ZI−i )| s . 41 It follows that:      4kci α Zi, ZI−i + kci1−s E |yi (1; ZI−i )| s + kci1−s E |yi (0; ZI−i )| s "    # I )| s I )| s E |y (1; Z E |y (0; Z  4 i i −i −i + = 6kci α Zi, ZI−i  +  6 6cis α Zi, ZI−i 6cis α Zi, ZI−i "  #   E |yi (0; ZI−i )| s   s−1 max  1/s 4 E |yi (1; ZI−i )| s I  s ȳi + + = 6k α Zi, Z−i 6 6 ȳimax 6 ȳimax     s−1  1/s   s−1 ≤ 6k α Zi, ZI−i s ȳimax ≤ 6k 2 α Zi, ZI−i s ,  1/s ≤ k which is implied by Assumption 1C. where the last inequality follows from ȳimax Returning to the main sum, we have from Definition 9: |τadse − τeate | ≤ n    s−1 1X 6k 2 α Zi, ZI−i s = 6k 2 n−1 αint . n i=1  Proposition 5. Under restricted interference, design mixing and design separation (Assumptions 2, 5 and 6), the ht and há estimators are consistent for eate and converge at the following rates: 0.5 0.5  (τ̂ht − τeate ) = O n−1 αint + n−0.5 davg + n−0.5 αext ,  0.5 0.5 + n−0.5 αext . (τ̂há − τeate ) = O n−1 αint + n−0.5 davg Proof. Decompose the errors of the estimators as such: τ̂ht −τeate = (τadse −τeate )+(τ̂ht −τadse ), τ̂há −τeate = (τadse −τeate )+(τ̂há −τadse ). Assumptions 2, 5 and 6, Proposition 6 and Lemma A20 complete the proof.  A8 Proof of Proposition 6 Lemma A21. Let X and Y be two arbitrary random variables defined on the same probability     space such that E |X | a = k a and E |Y | b = k b for some constants a, b and k where a−1 + b−1 ≤ 1 and k < ∞, we then have:   1−1/a−1/b  a  1/a  b  1/b , E |Y | E |X | |Cov(X, Y )| ≤ 10 α X, Y where α(X, Y ) is the alpha-mixing coefficient for X and Y as defined above. Proof. The lemma is, apart from trivial changes, equivalent to Lemma 7 in Davydov (1970). Note that the condition on the exponents is erroneously written as a−1 + b−1 = 1 there.  Lemma A22. Under an arbitrary experimental design: 0.5 0.5  + n−0.5 αext . ( µ̂z − µ̆z ) = Op n−0.5 davg 42 Proof. For some sufficiently large constant k < ∞, Assumption 1A gives us: Var( µ̂z ) ≤ ≤ n n X  k X Cov 1[Zi = z]Yi, 1[Z j = z]Yj 2 n i=1 j=1 n  n X   k X d + (1 − d ) Cov 1[Z = z]Y , 1[Z = z]Y i j i j i i j j n2 i=1 j=1 ≤ k 2 n−1 davg + n n X   k X (1 − di j ) Cov 1[Zi = z]yi ZIi , 1[Z j = z]y j ZIj , 2 n i=1 j=1  where the last inequality follows from Definition 5, Lemma A4 and Yi = yi ZIi . Consider the terms in the double sum. We have Iii = 1 by definition, so the sub-sigma-algebra generated by ZIi is finer than the algebra generated by Zi . Lemma A21 then gives us:    Cov 1[Zi = z]yi ZIi , 1[Z j = z]y j ZIj    1/q    1/q   q−2  E 1[Z j = z]|y j ZIj | q ≤ 10 α ZIi, ZIj q E 1[Zi = z]|yi ZIi | q    q−2    1/q    1/q E |y j ZIj | q ≤ 10 α ZIi, ZIj q E |yi ZIi | q   1/q  q  1/q  q−2  = 10 α ZIi , ZIj q E |Yi | q E |Yj | q−2   (Assumption 1B) ≤ k α ZIi , ZIj q , where q is the maximum value satisfying Assumption 1B. With Definition 9, we get: Var( µ̂z ) ≤ k 2 n−1 davg + n X   q−2 k2 X I I q = k 2 n−1 davg + k 2 n−1 αext . (1 − d ) α Z , Z i j j i n2 i=1 j,i The lemma then follows from Markov’s inequality and Lemma A2 using the same approach as in the proof of Lemma A18.  Corollary A5. Under an arbitrary experimental design and Assumptions 2 and 5, ( µ̂z − µ̆z ) = op (1). Proof. Follows directly from Lemma A22 and Assumptions 2 and 5. Lemma A23. Under an arbitrary experimental design:  0.5 0.5  n̂z − 1 = Op n−0.5 davg + n−0.5 αext . Proof. For some sufficiently large constant k < ∞, Assumption 1A gives us:   n n n X  k X 1 X 1[Zi = z] Cov 1[Zi = z], 1[Z j = z] ≤ 2 Var(n̂z ) = Var n i=1 Pr(Zi = z) n i=1 j=1 ≤ n n X n X   kdavg k X k X (1 − di j )α Zi, Z j , α Z , Z ≤ + i j 2 2 n n i=1 j,i n i=1 j=1 43  where the second to last inequality follows from that 1[Zi = z] is bounded by 1 and Lemma  A21. The last inequality follows from 0 ≤ α Zi, Z j ≤ 0.25. Note that Iii = 1 by definition; it follows that the sub-sigma-algebra generated by ZIi is   finer than the algebra generated by Zi , and we have α Zi, Z j ≤ α ZIi, ZIj : Var(n̂z ) ≤ ≤ n n X  k X kdavg + 2 (1 − di j )α ZIi, ZIj n n i=1 j=1 n n X    q−2 k X kdavg (1 − di j ) α ZIi, ZIj q = kn−1 davg + kn−1 αext, + 2 n n i=1 j=1 where q is the maximum value satisfying Assumption 1B. The second to last inequality follows  from q ≥ 2 and 0 ≤ α ZIi , ZIj ≤ 0.25. The lemma then follows from Markov’s inequality and Lemma A3 using the same approach as in the proof of Lemma A18.   Corollary A6. Under an arbitrary experimental design and Assumptions 2 and 5, n̂z − 1 = op (1). Proof. Follows directly from Lemma A23 and Assumptions 2 and 5.  Lemma A24. Under an arbitrary experimental design and Assumptions 2 and 5:  0.5 0.5  + n−0.5 αext . µ̂z /n̂z − µ̆z = Op n−0.5 davg Proof. Follows from Corollaries A5 and A6 and Lemmas A1, A22 and A23 using the same approach as in the proof of Lemma A10.  Proposition 6. Under restricted interference and design mixing (Assumptions 2 and 5), the ht and há estimators are consistent for adse and converge at the following rates: 0.5 0.5  + n−0.5 αext , (τ̂ht − τadse ) = Op n−0.5 davg  0.5 0.5 + n−0.5 αext . (τ̂há − τadse ) = Op n−0.5 davg Proof. Follows directly from Assumptions 2 and 5, Corollary A2 and Lemmas A22 and A24.  44
10math.ST
Dichotomy for Real Holantc Problems arXiv:1702.02693v1 [cs.CC] 9 Feb 2017 Jin-Yi Cai∗ Pinyan Lu† Mingji Xia‡ Abstract Holant problems capture a class of Sum-of-Product computations such as counting matchings. It is inspired by holographic algorithms and is equivalent to tensor networks, with counting CSP being a special case. A classification for Holant problems is more difficult to prove, not only because it implies a classification for counting CSP, but also due to the deeper reason that there exist more intricate polynomial time tractable problems in the broader framework. We discover a new family of constraint functions L which define polynomial time computable counting problems. These do not appear in counting CSP, and no newly discovered tractable constraints can be symmetric. It has a delicate support structure related to error-correcting codes. Local holographic transformations is fundamental in its tractability. We prove a complexity dichotomy theorem for all Holant problems defined by any real valued constraint function set on Boolean variables and contains two 0-1 pinning functions. Previously, dichotomy for the same framework was only known for symmetric constraint functions. The set L supplies the last piece of tractability. We also prove a dichotomy for a variant of counting CSP as a technical component toward this Holant dichotomy. ∗ University of Wisconsin-Madison. [email protected]. ITCS, Shanghai University of Finance and Economics [email protected] ‡ State Key Laboratory of Computer Science, Institute of Software, Chinese Academy of Sciences. University of Chinese Academy of Sciences. [email protected] † 1 Introduction There has been great progress in the complexity classification program for counting problems defined as Sum-of-Product computations. An ideal outcome of such a result is usually stated in the form of a dichotomy theorem, namely it classifies every single problem expressible in the class as either #Phard or polynomial time solvable. Counting Constraint Satisfaction Problems (#CSP) is the most well-studied framework in such context. For #CSP over the Boolean domain, two explicit tractable families, namely P (product type) and A (affine type), are identified; any function set not contained in these two families is proved to be #P-hard. The result was first proved for unweighted 0-1 valued constraint functions [12], later for non-negatively weighted functions [13], and finally for complex valued functions [11]. From non-negative values to complex values, the tractable family A expands highly nontrivially; the tractability incorporates cancelations and the proof depends on a nice algebraic structure. Dichotomy theorems are also known for #CSP over large domains although the tractability criterion is not very explicit and it is not even known to be decidable in the case of complex weighted constraint functions [1, 14, 15, 3, 2]. In this paper, we focus on problems over the Boolean domain. Unfortunately, not every problem defined by local constraints can be described in the #CSP framework, and thus not every such problem is covered by the #CSP dichotomies. E.g., the graph matching problem is such an example [16]. However, it is naturally included in a more refined framework, called Holant problems. This was defined in [7], and the name was inspired by the introduction of Holographic Algorithms by L. Valiant [20, 19] (who first used the term Holant). The Holant framework is essentially equivalent to tensor networks. #CSP can be viewed as a special case of Holant problems. Compared to #CSP, the Holant framework contains more surprising tractable problems. Consequently, it is also much more challenging to prove dichotomy theorems in the Holant framework. After a great deal of work [8, 6, 17, 18, 5], a dichotomy for Holant problems was proved for symmetric constraint functions. But obviously symmetric functions are only a tiny fraction of all constraint functions. Let us meet a function f on 14 variables. We will show that this f is a new breed of functions which define tractable problems in the Holant framework. It is not symmetric, and such tractable functions do not show up   in the #CSP framework. 0 0 0 1 1 1 1 Let H = 0 1 1 0 0 1 1. A standard definition of the [7, 4]-Hamming code C consists of 1 0 1 0 1 0 1 0-1 strings of length 7 with H as its parity check matrix: C = {x ∈ Z72 | xH = 0 mod 2}. We consider the dual Hamming code C ⊥ which has H as a generating matrix. C ⊥ is a linear subspace of Z72 of dimension 3. It is well-known that every nonzero word of C ⊥ has Hamming weight 4. Let ⊥ S = {ww ∈ Z14 2 | w ∈ C }, where w flips every bit of w. Clearly S is an affine linear subspace in Z14 2 of dimension 3. Now our function f is defined as follows: f has support S. In the column order of H we may take free variables x1 , x2 , x4 , and on the support S we have x3 = x1 + x2 , x5 = x1 + x4 , x6 = x2 + x4 , and x7 = x1 + x2 + x4 (arithmetic in Z2 ). There are 7 other variables x7+i (1 ≤ i ≤ 7), and on S we have x7+i = xi . In terms of the 0-1 valued free variables x1 , x2 , x4 , f takes value (−1)x1 x2 x4 on S, and 0 elsewhere. Thus on the support set S, f = 1, except at one point x1 = x2 = x4 = 1 it takes value −1. It turns out that this f defines a tractable Holant problem, even though it does not belong to any of the previously known tractable constraint function families for #CSP. The tractability of f depends on the fact that every ww ∈ S has Hamming weight exactly 7, and (as a consequence of C ⊥ being a linear code where every nonzero word has weight 4) that for any w 6= w0 with both w, w0 ∈ C ⊥ , the number of common bit positions where both ww and w0 w0 have bit 1 is always 3. 1 For Holant problems with general (not necessary symmetric) functions, the only known dichotomy is for a restricted class called Holant∗ problems [10], where all unary functions are assumed to be available. How to extend this is a challenging open question. A very broad subclass of Holant problems is called Holantc , where only two unary pinning functions ∆0 , ∆1 (that set a variable to 0 or 1) are assumed to be available. Holantc already covers a lot of ground, including all of #CSP, graph matching and so on. #CSP is the special case of Holant problems where the constraint function set is assumed to contain Equality of all arities. One can show that if we have an Equality of odd arity at least 3, we can realize Equality of all arities. But, if we have an Equality of even arity, we can only realize Equality of even arities. Dyer, Goldberg and Jerrum [13] proved that in the #CSP framework one can realize the pinning functions ∆0 and ∆1 . We will denote by #CSPc2 the special case of #CSP where each variable appears an even number of times, and ∆0 , ∆1 are available. #CSPc2 plays an important role. A dichotomy for #CSPc2 is somewhat unavoidable to get a dichotomy for Holant. This is not only logically true in the sense that a dichotomy for Holant will imply a dichotomy for #CSPc2 , but also true in the sense that one usually proves a dichotomy #CSPc2 as a major step toward a dichotomy of Holant [18, 5]. Previously one could only prove dichotomy for #CSPc2 for symmetric functions. Compared to the dichotomy for #CSP, we already know that there is one more tractable family in the dichotomy for symmetric #CSPc2 . It is a slight modification of the family A , which is denoted by A α . Is this the only addition when we go from #CSP to #CSPc2 without the symmetry restriction? 1.1 Our Results In this paper we prove a complexity dichotomy for Holantc with general (not necessary symmetric) real valued functions. In order to do that we first prove a dichotomy for #CSPc2 with general (not necessary symmetric) complex valued functions. In addition to the two tractable families P and A for #CSP, and the known modification A α , we discover a brand-new tractable family, denoted by L , which we call local affine functions. The dichotomy for #CSPc2 says that these four (P, A , A α and L ) are exactly all the tractable families. The dichotomy for Holantc problems basically says that the tractable family for Holantc is precisely the union of tractable families of #CSPc2 and Holant∗ . Conceptually (and also technically but somewhat hidden), the most important contribution of this work is the discovery and identification of the new tractable family L . The formal definition and characterization is given in Section 3. Our function f of arity 14 is among its smallest examples. Given the succinct mathematical definition of L , the description of the algorithm is very short. However, we would like to point out that this formal simplicity hides many interesting and surprising structures. For reasons that will become clearer, we will now denote our function f of arity 14 as f7α (+−). Five years ago, we discovered a polynomial time algorithm for counting problems defined by f7α (+−) (and some similar functions) in the Holantc and #CSPc2 setting. The algorithm is non-trivial. But we were not able to prove a dichotomy. Let’s consider another 0-1 valued function f31 : It has arity 31. It is the 0-1 indicator function of a (particular kind of) 5-dimensional linear subspace S of Z31 2 . Five of 31 variables are considered free variables and all 31 variables on S correspond to exactly all possible non-empty linear combinations of the five free variables. The function f31 is a pure affine function in A , and known to be tractable alone. On the other hand, the function f7α (+−) is neither in A nor in A α , but we also had a polynomial time algorithm for f7α (+−) type functions alone. The real challenge, for the quest of a dichotomy, is to put them together. What is the complexity for Holantc (f31 , f7α (+−)) or #CSPc2 (f31 , f7α (+−))? If we replace f31 with a smaller arity but of the same structure such as f15 , f7 , f3 , f1 , we can prove that the problem is #P-hard. It seems highly implausible that tractability would start to show up only at such high arity. And so we conjectured that #CSPc2 (f31 , f7α (+−)) is also #P-hard. We tried to prove this for five years but failed. We also tried to find a P-time algorithm without success, until now. It is quite 2 tantalizing to think about what property is shared by f7α (+−), f31 , f63 , . . . but not with f15 , f7 , f3 , f1 ? We now know that the explanation is this new family L . Interestingly, the deceptively simple definition of L does include f7α (+−), f31 , f63 , . . . but excludes f15 , f7 , f3 , f1 . (This fact can be verified but is not totally trivial.) By the unifying notion of L , we also have a much simpler description of a polynomial time algorithm, which starts with a global linear system and a localized holographic transformation performed simultaneously everywhere. (Because this description is much simpler, we will not describe our earlier algorithm in this paper.) Several facts about L are worth mentioning. These interesting structures can only appear for general functions but not for symmetric ones. Secondly, although the definition of L seems to involve complex numbers in an essential way, it does include some real valued functions such as f7α (+−). We cannot avoid going through C even if we only hope to prove a dichotomy for real valued functions. Although the algorithm for L looks short, it does have a very different nature compared to that for P, A and A α . The algorithms for previous known tractable families basically perform a local elimination to handle the variables one by one. The algorithm L contains a global step, which is to solve a global linear equation, followed by a localized holographic transformation simultaneously everywhere. We have tried many purely local algorithms and failed, until we reached this global algorithm. 1.2 Techniques by Examples Let us first describe the proof that #CSPc2 (f15 , f7α (+−)) is #P-hard. Here f15 is a 0-1 indicator function of a 4-dim linear subspace S of Z15 2 ; 4 variables are chosen as free variables and all 15 variables on S correspond to all their non-empty linear combinations. An instance of #CSPc2 (f15 , f7α (+−)) is a bipartite graph (V, U, E) where V are variables, U are constraint functions from {f15 , f7α (+−), ∆0 , ∆1 } and E indicates how the constraints are applied. BeingQin #CSP2 , every v ∈ V has even degree. The P Sum-of-Product computation is to evaluate σ:V →{0,1} u∈U fu (σ), where fu is the function at u ∈ U . If a variable appears exactly twice, once in ∆1 and once as an input to f15 , this effectively pins that input of f15 to 1. This creates a function g of arity 14, which is “realizable” in #CSP2 . What is g? Even though f15 is not symmetric, clearly not every subset of 4 variables can be chosen as free, every single variable can be free (as part of a subset of 4). In group terminology, the symmetry group of f15 is not S15 , but there is a transitive group of symmetry GL4 (Z2 ) acting on the nonzero vectors of Z42 . Hence up to renaming the variables, g is the same as setting x4 of f15 to 1. This function has exactly the same support structure as f7α (+−), but the function values are all 1 on its support, whereas f7α (+−) has value −1 when the 3 free variables are all equal to 1. We call this new function f7 (+−). For both functions f7α (+−) and f7 (+−) we can divide the 14 inputs into 7 pairs in the same way, which will be called bundles in this paper; each bundle has two input variables which always take opposite 0-1 values on the support; among the 7 bundles they have the same linear relation. Therefore, we can combine them in the following straightforward way: for each corresponding bundle connect the two variables labeled (−), one from each bundle, and leave the variables labeled (+) as inputs of the gadget. Technically we have a #CSP2 construction where for each corresponding bundle there is a variable that appears exactly twice, once for each variable labeled (−) in the bundle. This gadget realizes a function h with 14 inputs in 7 bundles as well. The two inputs in each bundle must have the same value on the support, and the value of h is the same as f7α (+−), since f7 (+−) is identically 1 on the support. So, this function can be denoted as f7α (++). There is an easy reduction #CSP(f7α ) ≤T #CSPc2 (f7α (++)): In any instance of #CSP(f7α ), replicate twice every occurrence of variables in constraints, and replace f7α by f7α (++). Hence #CSP(f7α ) ≤T #CSPc2 (f15 , f7α (+−)). As f7α 6∈ A ∪ P, #CSP(f7α ) is #P-hard. How about #CSPc2 (f7 , f7α (+−))? Here f7 has arity 7 and a support of dimension 3. Similarly, if we pin a variable of f7 to 1 we get f3 (+−). But f7α (+−) and f3 (+−) do not have the same support structure. Then we need the following more complicated gadget as shown in Fig. 1 to construct f7α (++). 3 Figure 1: The gadget realizing f7α (++) is composed of one copy of f7α (+−) and 3 copies of f3 (+−), shown as the 4 dots in the picture. Each f3 (+−) function has 6 edges stretched out as input variables, which are grouped into 3 bundles, shown as ellipses. The function f7α (+−) has 14 edges stretched out shown as dotted lines (only one pair is completely shown). They are grouped into 7 bundles, shown as rectangles. 9 pairs of variables are connected (shown as horizontal pink line segments), leaving 3 × 6 + 14 − 9 × 2 = 14 variables exposed as external variables of the gadget, which are circled. We observe that this construction is very delicate. After connecting the variables u1 (−) and, resp. u2 (−), of one copy of f3 (+−) with x1 (−) and, resp. the variable labeled “x2 + x3 (−)”, of f7α (+−), we have in fact forced the value of the variable labeled “u1 + u2 (−)” of f3 (+−) to equal (on the support) to the variable labeled “x1 + x2 + x3 (−)” of f7α (+−). Similarly after connecting v1 (−) and v2 (−) with x2 (−) and “x1 + x3 (−)” of f7α (+−), the value of “v1 + v2 (−)” is also forced to equal “x1 + x2 + x3 (−)”, but that variable has already been taken. On the other hand, after connecting w1 (−) and w2 (−) with x3 (−) and “x1 + x2 (−)” of f7α (+−), the value of “w1 + w2 (−)” is also forced to equal “x1 + x2 + x3 (−)”. Hence it is legitimate to connect “v1 + v2 (−)” with “w1 + w2 (−)” (finding a home for both orphans.) Similarly, both “u1 + u2 (+)” and “v1 + v2 (+)” are forced to equal “x1 + x2 + x3 (+)” (on the support), hence connecting them is also legitimate. In the meanwhile, the pair x1 (+) and u1 (+) must be equal on the support, forced by the connection between u1 (−) and x1 (−), making them a (++) pair. Similarly, x2 (+) and v1 (+) are forced to equal on the support, making a (++) pair, and x3 (+) and w1 (+) are forced to equal making another (++) pair. Then “x2 + x3 (+)” and u2 (+) make a (++) pair, but this bundle satisfies the linear dependence that it is equal to the sum of the two free variables x2 (+) and x3 (+) on the support. The same can be said for the other 3 dependent bundles. In all, it is clear that the 7 exposed pairs of variables associated with x1 (+), x2 (+), x3 (+) “x1 + x2 (+)”, “x1 + x3 (+)”, “x2 + x3 (+)” and “x1 + x2 + x3 (+)” form 7 bundles of equal variables, and they have precisely the 3-dimensional support structure in a 14-dimensional space, as described for f7α (+−). As the value of f3 (+−) is always 1 on the support, it is clear that the function of the gadget is f7α (++). The above construction and proof of hardness are special cases of our Lemma 4.17. We note that these functions are really sparse. For example the function f7α (+−) has only 8 nonzero values out of 4 16384 (= 214 ) values total. They are very “fragile”: If you do not make the connection “just so”, then chances are that the construction will collapse and no good reduction can be obtained. On the other hand, precisely because of their delicate structure one can come up with extremely intricate designs. At the same time, the interesting structure may also portend some unforeseen algorithms. We will use these delicate structures to prove #P-hardness. But to prove a dichotomy theorem, one needs to prove that an arbitrary function set not contained in one of the 4 tractable families is #P-hard. The given functions may not have any of the nice structure, then how can we do the construction? To handle that, we have a number of regularization lemmas in Section 4.2, showing that one can always construct gadgets to regularize the functions. Starting with any function set not contained in one of the tractable families, we can produce functions with similar nice structures but still outside the respective tractable families unless we already can prove #P-hardness outright. Then, the question is how about #CSPc2 (f31 , f7α (+−))? Can we also construct the function f7α (++) or other functions to get #P-hardness? If we pin two free variables of f31 , we get either f7 (+ + ++) or f7 (+ + −−). They are not like f7 (+−). With these, together with f7α (+−), we do not know how to construct functions like f7α (++) as before. All attempts to construct similar gadgets like in Figure 1 failed. Now as a consequence of our dichotomy theorem, assuming #P is not equal to P, we can prove that no such construction can succeed. The reason is that they both belong to the new tractable family L . The algorithm for that and a characterization for L is given in Section 3. The criteria there can be used to show that f31 , f7α (+−) are in the family L while f15 , f7 , f3 , f1 are not. 2 Preliminaries A (constraint) function of arity n is a mapping from {0, 1}n → C. We denote by =n the Equality function of arity n. A symmetric function f on n Boolean variables can be expressed by [f0 , f1 , . . . , fn ], where fj is the value of f on inputs of Hamming weight j. Thus, (=n ) = [1, 0, . . . , 0, 1] (with n − 1 zeros). We also use ∆0 , ∆1 to denote [1, 0] and [0, 1] respectively. A binary function f is also expressed  f (0, 0) f (0, 1) . by the matrix f (1, 0) f (1, 1) A signature grid Ω = (G, F , π) consists of a graph G = (V, E), and a labeling π of each vertex vP ∈ V with Q a function fv ∈ F . The Holant problem on instance Ω is to compute HolantΩ = σ:E→{0,1} v∈V fv (σ|E(v) ), where σ|E(v) is the assignment σ restricted to the edges incident to v. A Holant problem is parameterized by a set of functions. Definition 2.1 (Holant). Given a set of functions F , we define a counting problem Holant(F ): Input: A signature grid Ω = (G, F , π); Output: HolantΩ . Suppose c ∈ C is a nonzero number. As constraint functions f and cf are equivalent in terms of the complexity of Holant problems they define. Hence we will consider functions f and cf to be interchangeable. We would like to characterize the complexity of Holant problems in terms of its function sets1 Some special families of Holant problems have already been widely studied. For example, if all the Equality functions are in F then this is exactly the weighted #CSP problem. Other wellstudied special families of Holant are Holant∗ and Holantc . Definition 2.2. Let U denote the set of all unary functions. Then Holant∗ (F ) = Holant(F ∪ U ). 1 We allow F to be an infinite set. Holant(F ) is tractable means that it is computable in P even when we include the description of the functions in the input Ω in the input size. Holant(F ) is #P-hard means that there exists a finite subset of F for which the problem is #P-hard. For considerations of models of computation, function values are algebraic in C. 5 Definition 2.3. Holantc (F ) = Holant(F ∪ {∆0 , ∆1 }). #CSP(F ) is equivalent to Holant(F ∪ {∆0 , ∆1 , =1 , =2 , =3 , · · · }). We define #CSPc2 as the follows. Definition 2.4. #CSPc2 (F ) = Holant(F ∪ {∆0 , ∆1 , =2 , =4 , =6 , · · · }). In the above definitions, the functions and domain {0, 1} are without structures. However, as we describe the complexity classification of counting problems, especially for tractable problems, we may assign structures to the domain and the functions. We may consider polynomials in Z[x1 , x2 . . . , xn ] with each xi taking values from {0, 1} ⊆ Z; the evaluation in Z. In another setting, we may consider the domain as a finite field Z2 of size 2, and {0, 1}n as a vector space of dimension n over Z2 . Definition 2.5 (Support). The underlying relation, also called the support of a function f is given by supp(f ) = {x ∈ {0, 1}n |f (x) 6= 0}. We say a relation R ⊆ {0, 1}n is affine if it is an affine linear subspace of Zn2 . It is composed of solutions of some system Ax = b of affine linear equations over Z2 . If supp(f ) is affine, we say f has affine support. We also view this relation as a 0-1 valued indicator function χAx=b . Definition 2.6 (Compressed function [4]). If f has affine support of dimension r, and X = {xj1 , . . . , xjr } ⊆ {x1 , x2 , . . . , xn } is a set of free variables for supp(f ), then fX is the compressed function of f for X such that fX (xj1 , . . . , xjr ) = f (x1 , x2 , . . . , xn ), where (x1 , x2 , . . . , xn ) ∈ supp(f ). When it is clear from the context, we omit X and use f to denote fX . If f has affine support, then r = dim supp(f ) is called the rank of f . Usually, we may rename variables so that x1 , x2 . . . xr is a set of free variables. Definition 2.7 (Product type: P). P denotes the class of functions which can be expressed as a product of unary functions, binary equality functions ([1, 0, 1]) and binary disequality functions ([0, 1, 0]). Definition 2.8 (Affine: A ). A denotes all functions f : {x1 , x2 , . . . , xn } → C satisfying the following conditions: • supp(f ) is affine χ(Ax=b) . • Assume x1 , x2 , . . . , xr are free variables. The compressed function of f is λ · iL(x1 ,...,xr )+2Q(x1 ,...,xr ) (for some nonzero constant λ ∈ C) where L is an integer coefficient linear polynomial and Q is an integer coefficient multilinear polynomial where each monomials has degree 2. Of course, f is the product λ · χ(Ax=b) · iL(x1 ,...,xr )+2Q(x1 ,...,xr ) . π √ , a square root of i. The notation a ≡ b means a = b mod 2. We use α to denote e 4 i = 1+i 2 2×2 ⊗n A matrix M ∈ C defines a holographic transformation   f 7→ M (f ), where  we list the values of 1 0 1 0 f as a column vector indexed by {0, 1}n . Let Mα = , and M1 = I2 = . 0 α 0 1 ⊗arity(f ) Definition 2.9 (α dual affine: A α ). A α = {Mα (f ) | f ∈ A }. The inverse transformation of Mα is Mα−1 . A function f is in A α iff Mα⊗n −1 f is in A . Theorem 2.1. A #CSP(F ) problem has polynomial time algorithm, if one of the following holds, F ⊆P or Otherwise, it is #P-hard. 6 F ⊆A. The following two families of functions are used in the dichotomy for #Holant∗ (F ). M is the set of all functions f such that f is zero except on n + 1 inputs whose Hamming weight is at most 1, where n is the arity of f . The name M is given for matching. T is the set of all functions of arity at most 2. To discuss the complexity of Holant problem, we may always remove identically zero functions. Lemma 2.1. Let f = g⊗h, none of them identically 0. Then Holantc (F ∪{f }) ≡T Holantc (F ∪{g, h}). Holant∗ (F ∪ {f }) ≡T Holant∗ (F ∪ {g, h}). So we only work with functions which cannot be further decomposed. Theorem 2.2. Let F be a set of non-decomposable functions. polynomial time algorithm, if one of the following holds, Then #Holant∗ (F ) problem has F ⊆T or F ⊆ HP or F ⊆ ZP or F ⊆ ZM ,     1 1 1 1 . Otherwise, it is #P-hard. where H is an orthogonal matrix and Z = , or −i i i −i 3 Local Affine Functions The next definition is crucial for this work. Definition 3.1 (Local affine: L ). A function f is in L , if and only if for each σ = s1 s2 · · · sn ∈ {0, 1}n in the support of f , (Mαs1 ⊗ Mαs2 ⊗ · · · ⊗ Mαsn )f is in A . The notation Mαsj just means that when sj = 0 the jth input is transformed by the identity matrix (in fact, not transformed) and when aj = 1 the jth input is transformed by Mα . This is very interesting since each arity performs a possible different holographic transformation. This is why we use the term ”local” to name this family of functions. By Definition 3.1, f P ∈ L if and only if for each σ = s1 s2 · · · sn ∈ supp(f ), the transformed function n i=1 si xi f (x , . . . , x ) is in A . Here each s is a 0-1 valued integer, and the sum M 1 n i Pσnf : (x1 , . . . , xn ) 7→ α s x is evaluated as an integer (or an integer mod 8). i i i=1 Of course the identically 0 function belongs to L . If f ∈ L and is not identically 0, then there is Pn s x i i i=1 some σ ∈ supp(f ), such that Mσ f ∈ A . It is apparent by its form, Mσ f = α f , that f 2 ∈ A . 2 Since f and f have the same support, it follows that supp(f ) is an affine linear subspace over Z2 . Assume that f has affine support with free variables x1 , . . . , xr , let supp(f ) be described by the data (A, b), where A ∈ {0, 1}n×r is a 0-1 integer matrix of which the top r × r matrix is Ir , and b ∈ {0, 1}n is a 0-1 integer are all 0. The i-th 0-1 variable xi (1 ≤ i ≤ n) is expressed Pr vector of which the first r entries 2 as xi ≡ j=1 aij xj + bi mod 2. Then by f ∈ A , we have the following expression f = λ · supp(f ) · α P S⊆[r] cS Q j∈S xj (1) where λ 6= 0, cS ∈ Z for all S ⊆ [r]. This is easy to see because after a global scaling, each nonzero entry of f 2 is a power of i and as a result each nonzero entry of f is a power of α. Every such function can be expressed in the above formula. Since α8 = 1 we may consider all coefficients cS belong to Z8 . The multilinear polynomial in Z8 [x1 , . . . , xr ] is unique for f . To see this, take the quotient q(x) of two expressions on the support, and write q(x) = supp(f ) · αP (x) . If the multilinear polynomial P (x) ∈ Z8 [x1 , . . . , xr ] is not identically zero, then let S ⊆ [r] be of minimum cardinality such that Q j∈S xj is a term with non-zero coefficient in P (x). Assigning xj to 1 for all j ∈ S, and all other xj to 0, for j ∈ [r] \ S, shows that q(x) is not identically 1 on supp(f ). Then by the fact that f 2 ∈ A we 7 know that cS ≡ 0 mod 2 for |S| = 2, and cS ≡ 0 mod 4 for |S| ≥ 3. We may normalize it so that λ = 1 and c∅ = 0. We can write it more explicitly as f = λ · supp(f ) · αL(x)+2Q(x)+4H(x) (2) P P where L(x) = rj=1 cj xjP is a linear function, Q(x) = 1≤j<k≤r cjk xj xk is a quadratic (multilinear) polynomial, and H(x) = 1≤j<k<`≤r cjk` xj xk x` + · · · is a (multilinear) polynomial with all monomials of degree at least 3. n Any (s1 , . . . , sr ) ∈ {0, 1}r determines a unique point Pn σ = (s1 , . . . , sr , sr+1 , . . . , sn ) ∈ {0, 1} in s x i i supp(f ), from which we get the transformed function α i=1 f ∈ A . Here each si is a 0-1 constant and xi is a 0-1 variable. 3.1 Algorithm The most interesting and surprising discovery of this work is the following polynomial time algorithm. Theorem 3.1. There is a polynomial time algorithm for Holant(L ). Proof. We first focus on the support but ignore the concrete value of the functions. Since the support of the function at each vertex is affine, we can solve a linear system to get an assignment for all the edges which is on the support for all the functions. If the linear system does not have any solution, we can simply output zero since there is no assignment which can give possible non-zero value. Once we get a assignment for edges which is simultaneously on the support for all the functions, we can perform an Mα transformation on all the edges with assignment 1. By the definition of L , all the functions are in A after the transformation and the two inverse Mα transformations on a edge will also get a function in A . Therefore, we have an instance with same holant value but all the functions are A . We know that there is a polynomial time algorithm to compute the holant value. It is clear that all the equality with even arity and the two constant unary function ∆0 , ∆1 are in this family L . So, we have the following corollary. Corollary 3.1. There is a polynomial time algorithm for #CSPc2 (L ). 3.2 Characterization From the definition of local affine function, it is not easy to check if a given function is in this family or not. It is not even clear if there exists any interesting new function in this or not. In this subsection, we give an explicit characterization of this family. First of all, if f 2 6∈ A , then f 6∈ L . So, we only need to characterize the functions with f 2 6∈ A , or equivalently functions which are already in the form of (2). Theorem 3.2. A function f defined in (2) belongs to L iff H is homogeneous of degree 3 and the following set of equations hold over Z2 relating the data (A, b) for supp(f ) and the coefficients cS , n Y X aij ≡ 0 (∀S ⊆ [r], such that 1 ≤ |S| ≤ 4) (3) i=1 j∈S and n Y X aij bi ≡ cS (∀S ⊆ [r], such that 1 ≤ |S| ≤ 3) i=1 j∈S 8 (4) Note that (3) actually encodes equivalently four sets of equations mod 2: We may state (3) as n X i=1 n X i=1 n X i=1 n X aij ≡ 0, (∀1 ≤ j ≤ r) aij aik ≡ 0, (5) (∀1 ≤ j < k ≤ r) aij aik ai` ≡ 0, (6) (∀1 ≤ j < k < ` ≤ r) aij aik ai` aim ≡ 0, (∀1 ≤ j < k < ` < m ≤ r) (7) (8) i=1 Also (3) is equivalent to n X aij aik ai` aim ≡ 0, (∀1 ≤ j ≤ k ≤ ` ≤ m ≤ r) i=1 since aij are 0-1 integers. Similarly (4) encodes equivalently three sets of equations mod 2: n X i=1 n X i=1 n X aij bi ≡ cj , (∀1 ≤ j ≤ r) aij aik bi ≡ cjk , (9) (∀1 ≤ j < k ≤ r) aij aik ai` bi ≡ cjk` , (∀1 ≤ j < k < ` ≤ r) (10) (11) i=1 Also (4) is equivalent to n X aij aik ai` bi ≡ cjk` (∀1 ≤ j ≤ k ≤ ` ≤ r). i=1 Proof. For any integer z, we have z ≡ 0 mod 2 (respectively 1 mod 2) iff z 2 ≡ 0 mod 4 (respectively 1 mod 4), and also iff z 4 ≡ 0 mod 8 (respectively 1 mod 8). We will substitute the dependent si (r < i ≤ n) in terms of sj (1 ≤ j ≤ r), r X si ≡ aij sj + bi mod 2, j=1 and similarly for xi (r < i ≤ n) in terms of xj (1 ≤ j ≤ r). But the dependent expressions must be valid modulo 8, since these appear on the exponent of α. Hence we get f ·α Pn i=1 Pr [( j=1 P aij sj +bi )4 ( rj=1 aij xj +bi )4 ] ∈A, as a function in xi , valid for any (s1 , . . . , sr ) ∈ {0, 1}r . The first simple observation is that the modifier expression has terms of degree at most 4 in xj ’s on the exponent of α, and thus cannot cancel any term of degree greater P than 4 in H, which is the higher order terms in (2). Moreover, any degree 4 (multilinear) term in ( rj=1 aij xj + bi )4 has the form 9 xj xk x` xm for some 1 ≤ j < k < ` < m ≤ r, and each such term comes with a coefficient divisible by 4! ≡ 0 mod 8. Thus to get a function in A , there can be no terms of degree 4 or higher in H. Thus X H(x) = cjk` xj xk x` . 1≤j<k<`≤r We consider the condition of membership in A for the linear √ terms. The condition is that the function be expressible as a linear function on the exponent of i = −1. By the uniqueness of expression of the (multilinear) polynomial on the exponent of α, this condition is simply that all coeffiients of linear terms be even. Thus we can derive necessary conditions in Z2 . An advatange in working over Z2 , is that we can avoid the 4-th power expression. If we set (s1 , . . . , sr ) = (0, . . . , 0) ∈ {0, 1}r , the all zero string of length r, then f ·α Pn i=1 Pr [bi ( j=1 aij xj +bi )4 ] ∈A. Here we used the fact that b4i = bi for 0-1 valued bi ∈ Z. Computing mod 2, for the linear terms a necessary condition is that n X cj ≡ aij bi mod 2, (12) i=1 P P for all j ∈ [r]. This is (9). Here we used the fact that ( rj=1 aij xj + bi )4 ≡ rj=1 aij xj + bi mod 2. We can also choose (s1 , . . . , sr ) so that a single sj0 = 1 and the other sj ’s are all zero, then f ·α Pn i=1 Pr [(aij0 +bi )4 ( j=1 aij xj +bi )4 ] ∈A. Again deriving a necessary condition by working over Z2 , we get cj ≡ n X (aij0 + bi )aij mod 2. (13) i=1 Subtracting (12) from (13) we obtain both (5) and (6). Now we consider quadratic terms. For this purpose we only need to ensure that the coefficients (on the exponent of α) of all quadratic monomials xj xk (1 ≤ j < k ≤ r) are 0 mod 4. To compute mod 4, we may use z 2 mod 4 replacing z 4 mod 8 for any integer z. Thus a necessary condition is that, for all 1 ≤ j < k ≤ r, n X  2  2cjk + bi (2aij aik ) ≡ 0 mod 4 i=1 and furthermore, for all 1 ≤ j0 ≤ r, 2cjk + n X   (aij0 + bi )2 (2aij aik ) ≡ 0 mod 4 i=1 Subtracting the two we get (10) and (7). P Finally we consider the coefficients of cubic terms in ( rj=1 aij xj + bi )4 . We get, for all 1 ≤ j < k < ` ≤ r, n X 4cjk` + [bi 4aij aik ai` ] ≡ 0 mod 8 i=1 10 This gives us (11) cjk` ≡ n X aij aik ai` bi mod 2. i=1 Picking exactly one sj0 = 1 and all other sj = 0 (for 1 ≤ j ≤ r) we get furthermore (for all 1 ≤ j0 ≤ r) n X   4cjk` + (aij0 + bi )4 4aij aik ai` ≡ 0 mod 8 i=1 Pn i.e., cjk` ≡ i=1 [(aij0 + bi )aij aik ai` ] mod 2. Subtracting (11) from that we get (8). Now we prove sufficiency. By retracing the proof above we have the following f ·α Pn i=1 [( P j∈S P aij +bi )4 ( rj=1 aij xj +bi )4 ] ∈A, (14) for allPS ⊆ [r] with candinality |S| ≤ 1. We prove (14) for all S ⊆ [r] by induction on |S|. Denote by IS = j∈S aij + bi . Suppose (14) is true for some S ⊂ [r] and let j0 ∈ [r] \ S, we prove (14) for S ∪ {j0 }. We only need to prove that Pn Pr 4 4 4 α i=1 [((aij0 +IS ) −IS )( j=1 aij xj +bi ) ] ∈ A . Note that (aij0 + IS )4 − IS4 = aij0 + 4aij0 IS (IS2 + 1) + 6aij0 IS2 ≡ aij0 − 2aij0 IS2 mod 8. For S = ∅ and S = {j0 }, we have f ·α Pn i=1 Pr [bi ( j=1 aij xj +bi )4 ] ∈A and f · α Pn i=1 Pr [(aij0 +bi )4 ( j=1 aij xj +bi )4 ] ∈A. For 0-1 valued integers z and z 0 , we have (z + z 0 )4 ≡ z + z 0 − 2zz 0 mod 8, so we have α Pn i=1 Pr [(aij0 −2aij0 bi )( j=1 aij xj +bi )4 ] ∈A. Therefore we only need to prove that α Pn i=1 Pr [((aij0 −2aij0 IS2 )−(aij0 −2aij0 bi ))( j=1 aij xj +bi )4 ] ∈A. i.e., i Pn i=1 Pr [aij0 (bi −IS2 )( j=1 aij xj +bi )4 ] ∈A. But nowP the expression is on the P exponent of i and so we can calculate mod 4, which allows us to replace ( rj=1 aij xj + bi )4 by ( rj=1 aij xj + bi )2 . However i raised to any sum of perfect squares of linear functions of x1 , . . . , xr is in A . This completes the proof. 4 Complexity dichotomy theorem of #CSPc2 Theorem 4.1. A #CSPc2 (F ) problem has polynomial time algorithm, if one of the following holds, F ⊆ P; F ⊆A; F ⊆ A α; Otherwise, it is #P-hard. 11 or F ⊆ L. The algorithm for P, A , A α are known and the algorithm for L is in Section 3.1 Corollary 3.1. In this section, we prove the #P-hardness part of this theorem, we want to show that if F 6⊆ P, F 6⊆ A , F 6⊆ A α and F 6⊆ L , then #CSPc2 (F ) is #P-hard. We have one function from the complement of each tractable class, and we prove that, when putting these four (not necessarily distinct) constraint functions together they define a #P-hard problem. Starting from these functions, we manage to obtain other functions outside of the respective tractable classes, but with some specific properties. Finally after we have gained a sufficiently good control on these functions we can corner the beast. This complexity dichotomy theorem about #CSPc2 generalizes the known complexity dichotomy theorem about #CSP (Theorem 2.1), and its proof uses this known theorem in several places. 4.1 Notations In this subsection, we further introduce a number of definitions and notations, which shall be used in the proof. Definition 4.1 (Bundle and bundle type). Suppose f has affine support of rank r with {x1 , . . . , xr } as Pr a set of free variables. We use all non-empty linear combinations j=1 dj xj (dj ∈ Z2 , not all zero) of x1 , . . . , xr as the names of bundles of f . The type of each bundle is a possibly empty multiset of “+”’s and “−”’s, andPis defined as follows: For every input variable xk (1 ≤ k ≤P n) of f there is a unique r r d x such that on supp(f ), x is either always equal to bundle named j j k j=1 dj xj or always equal j=1 Pr case we add a “+”, and in the latter case we add a “−” to to j=1 dj xj + 1 (mod 2). In the former Pr the bundle type for the bundle named j=1 dj xj , and we say the variable xk belongs to this bundle. All input variables are partitioned into bundles. The number R of non-empty bundles is called the essential arity of f , and r ≤ R ≤ 2r − 1. We can list a function’s input variables, by listing all its non-empty bundles followed by the bundle type. For example, f (x1 (++), x2 (+), (x1 + x2 )(−−)) has rank 2, essential arity 3, and arity 5. Definition 4.2 (Odd and even bundle, consistent and opposite bundle). If the cardinality of a bundle is odd (resp. even), we say it is an odd (resp. even) bundle. For an even bundle, if there are even (resp. odd) many “ + ” in its type, we say it is a consistent (resp. opposite) bundle. Obviously, a consistent (resp. opposite) bundle also has even (resp. odd) many “ − ”, since it is an even bundle. An empty bundle is a consistent even bundle. Equivalently, if a bundle is odd or opposite, then it is not empty. When constructing some function by a gadget, the bundles of the function are usually the union of some original bundles, after some possible flipping, where a flipping changes all “ + ” in a type to “ − ”, and changes “ − ” to “ + ” at the same time. If we merge two bundle types α and β, we get the union of two types α ∪ β. Obviously, even ∪ even = even, odd ∪ even = odd, odd ∪ odd = even. Similarly, consistent ∪ consistent = consistent, consistent ∪ opposite = opposite, opposite ∪ opposite = consistent. Definition 4.3 (Essential function). Given a function f with affine support, if we replace each (nonempty) bundle of variables by just one variable as the bundle name, keeping the compressed function unchanged, we get the essential function f˜ of f . For example, the essential function of f (x1 (++), x2 (+), (x1 + x2 )(−−)), f˜(x1 , x2 , (x1 + x2 )) has arity 3, which is the same as the essential arity of f . Note that in this example, the two variables that are both equal to x1 + x2 + 1 on supp(f ) have been replaced by one variable which equals to x1 + x2 on supp(f ). If each bundle of a function f has the same type α, for example, f (x1 (α), x2 (α), (x1 + x2 )(α)), we also denote it as f˜(x1 , x2 , (x1 + x2 ))(α) through its essential function. For example, f˜(++) denotes 12 a function all whose bundles are (++). Sometimes, f ’s bundles have different types, we use f˜(∗) to denote f . If all bundles of a function are consistent, we say it is a function of the form g(cc). We define two type operations. The first operation is called triple. In a type multiset, triple can replace a single + by +++, or replace a single − by − − −. The second operation is called collation. Collation can remove ++ or −− from one bundle type, as long as the bundle is still non-empty after the removal. The type operations do not change the essential function. They do not change the properties that whether a type is empty, odd, even, opposite, consistent. Suppose we can use f and (=4 ) to construct gadgets. When connecting one input variable of f to (=4 ), we get 3 copies of this variable as additional inputs of the new function. This implements the triple operation. We can also connect two ++ or −− in the same bundle to make them disappear (provided the bundle is still non-empty after the removal). This implements the collation operation. In proving #P-hardness (but not when designing algorithms), we can always do these operations on types. In this sense, an odd bundle is either (+) or (−), and a consistent bundle is either empty or (++), or (−−), and an opposite bundle is (+−). F2r −1 denotes the set of functions of rank r whose number of bundles achieves the maximum 2r − 1 and each bundle has type (+). We use a super script A or α to indicate the function or the function set is contained in A or A α . Suppose for each function in F , all bundles are (+), we define F (++) = {f (++)|f ∈ F }, and define F (+−) similarly. Define F (∗) to be the set of functions f (∗) with f ∈ F with any bundle structure. Define F (+) to be just F where every function still has all bundles of type (+). For example, F7α (+−) is the set of functions with rank 3 and 7 bundles each with type (+−) whose essential functions are in A α. Definition 4.4. Given a function f (x1 , x2 , . . . , xn ), we define an arity 2n function f ++, such that (x1 , y1 , x2 , y2 , . . . , xn , yn ) ∈ supp(f ++) iff xj = yj , j = 1, 2, . . . , n and (x1 , x2 , . . . , xn ) ∈ supp(f ), and f ++(x1 , y1 , x2 , y2 , . . . , xn , yn ) = f (x1 , x2 , . . . , xn ). Define A ++ = {f ++|f ∈ A }, where denotes complement. Define P++ = {f ++|f ∈ P}. Because the binary Disequality function is in A , and A is closed under gadget constructions, it can be used to flip input variables, and A , it is not hard to see if f 6∈ A , f (cc) ∈ A ++. Given a function f , we define the function f 2 pointwise by f 2 (x) = (f (x))2 . Define f1 as the function 1 with the same support as f , but on supp(f ), f1 (x) = f (x) . Lemma 4.1. #CSPc2 ({f 2 ++}) ≤T #CSPc2 ({f }). Proof. We take two copies of f , and connect 2 inputs of a copy of (=4 ) to each pair of the corresponding variables. The new function is f 2 ++. 4.2 Regularization Lemmas Assume F 6⊆ P, F 6⊆ A , F 6⊆ A α and F 6⊆ L , the high level idea to prove that #CSPc2 (F ) is #P-hard is as follows. We take one function outside each tractable family and prove that putting these four (not necessary distinct) functions together makes a #P-hard problem. If we only have four generic functions, it is difficult to prove anything. So we wish to regularize and simplify these functions, while maintaining the property that new functions are still outside the respective tractable families. By forming loops and by pinning individual variables we can reduce the arity, or more precisely, the essential arity of the functions. However in fact the more important parameter that we will try to reduce inductively is the rank of the function. The hope is that when the number of (free) variables is small, the functions are sufficiently easy to handle, as they sit in a space of smaller dimension. This is true 13 for symmetric constraint functions. However, in the asymmetric setting, they are still too complicated even for functions of small rank. In this section, we prove some useful regularization lemmas, that allow us to further regularize the functions at hand. We treat the following generic situation. In all the lemmas in Subsection 4.2 we assume there is a constraint function set F that satisfies the following conditions: (1) Any function in F has affine support; (2) F contains the pinning functions ∆0 and ∆1 ; (3) F contains all Equalities of even arities and (=2 )(+−) (note that this function is the same as [1, 1](++ − −)); (4) F is closed under gadget constructions, i.e., the signature of any F -gate is in F ; (5) F is closed under reciprocal, i.e., if f ∈ F , then f1 ∈ F , where f1 is defined above; and (6) For any function f which has affine support, the two bundle type operations do not change whether f is in F or not. (This is a consequence of (3) and (4).) Property (6) is a corollary of (3) and (4). For example, if a function f (+ − −) 6∈ F , then after applying collation operation on each bundle, we get a f (+) 6∈ F . We prove this by contradiction. Assume f (+) ∈ F , if we connect [1, 1](++ − −) ∈ F to each bundle, we get f (+ − −), which is in F by (3) and (4). These properties hold for A , A α and L . In the statements of Lemma 4.2 to 4.7 we make the implicit assumption that F satisfies these conditions. Starting from a constraint function f outside of a tractable family, we will generically try to reduce the rank by pinning at a variable (and all other variables in the same bundle consistently), while maintaining the property that the function is still outside of a tractable family. Note that pinning at any variable does reduce the rank. (Every variable can be a member of a set of free variables, but not every subset of rf variables can be a set of free variables.) We get stuck if pinning any variable (and its bundle) of f produces a function in the tractable family. The following lemmas turn this seemingly unfortunate situation into a positive outcome, by using this to regularize the given function outside of a tractable family. Assume we have a function with rank 2 or 3 outside the respective families A , A α or L , the following lemmas show how to get a function still outside the respective families but with very regular bundle types. We can first regularize so that every bundle has the same parity. If all bundles are even, we can further regularize their bundle types to be either all consistent or all opposite. If all bundles are odd, we can further regularize the support space to be a linear space (not just an affine space), which means all bundles are (+). Lemma 4.2. Suppose f 6∈ F has rank 2 and pinning any variable of f produces a rank 1 function in F . Then we can construct a rank 2 function g, such that g 6∈ F , and either all its 3 bundles are odd, or all its 3 bundles are non-empty even, or it has exactly 2 non-empty even bundles. Proof. After picking free variables x1 and x2 , we have up to three bundles, named x1 , x2 , and x1 + x2 . First suppose the bundle x1 + x2 is empty. The bundles x1 and x2 are certainly both non-empty. We will make both bundles x1 and x2 non-empty and even. If the bundle x1 is odd (which we may assume it consists of a singleton variable x1 ), we can pin appropriately on the x2 bundle to get a unary function u(y) of rank 1 (with a singleton bundle y). Use a gadget composed of one copy of f , one copy of u and one copy of (=4 ). Use two variables of (=4 ) to connect x1 of f and y of u, The other two variables of (=4 ) are left as two input variables of the gadget. We effectively made the singleton bundle x1 to become two equal variables as an even bundle (++). P Formally, we construct a function h(∗), such that h(z1 , x2 ) = x1 ,y f (x1 , x2 )·u(y)·(=4 )(x1 , y, z1 , z1 ). The z1 bundle of h is even, and the x2 bundle of f is unchanged. 14 We claim that h 6∈ F . For a contradiction suppose h ∈ F . We construct a gadget by connecting 1 1 the variable of P u to one input variable in the z1 bundle of h. Because u and u are in F , we have 1 f (z1 , x2 (∗)) = z1 h(z1 (++), x2 (∗)) · u (z1 ) ∈ F , where the sum is over one variable of the bundle z1 (++) in h, equated with the only variable z1 of u1 . A contradiction. Hence, h 6∈ F . Similarly, we can change the x2 bundle to an even bundle, without changing the x1 bundle, keeping out of F . Therefore we can get a function g 6∈ F with exactly 2 non-empty even bundles. Now suppose the bundle x1 + x2 is not empty. Then it is either odd, or it is even but non-empty. If it is odd, then either all three bundles named x1 , x2 and x1 + x2 are odd, in which case we are done, or at least one of the bundles named x1 or x2 is even (and non-empty because of free variable status). Without loss of generality suppose the bundle x1 is even. Now we pin the x2 bundle appropriately, then the bundles of x1 and x1 + x2 are merged, creating a unary function u of rank 1 with an odd bundle. Use this u (and (=4 )) we can again change all three bundles of f to be even, just like before, resulting in a rank 2 function g 6∈ F . If the bundle x1 + x2 is even and non-empty, then either all three bundles named x1 , x2 and x1 + x2 are even, in which case we are done because the bundles named x1 , x2 are non-empty, or at least one of the bundles named x1 or x2 is odd. Without loss of generality suppose the bundle x1 is odd. Now we pin the x2 bundle appropriately, then the bundles of x1 and x1 + x2 are merged, creating a unary function u of rank 1 with an odd bundle. The rest of the proof is the same. We have several more lemmas in the same vein. Two of them are still about rank 2, and the remaining three are about rank 3. The construction method in Lemma 4.2 of using (=4 ) to merge two original bundles into a new bundle and the argument that the new function is not in F , is repeatedly used in the following five lemmas. For simplicity of the statement, we just say which bundle is merged to which, by setting which two variables to be equal. For the rank 3 case, we often merge 3 pairs of bundles at the same time, so we need to consider the support structure is not affected. Lemma 4.3. Suppose f 6∈ F has rank 2 and pinning any variable of f produces a rank 1 function in F . If each bundle of f is even, then we can construct a rank 2 function g 6∈ F , such that either all its 3 bundles are opposite, or all its 3 bundles are non-empty consistent, or it has exactly 2 non-empty bundles which are both consistent. Proof. The proof is similar to Lemma 4.2. We replace “odd” by “opposite”, and “even” by “consistent”. Lemma 4.4. Suppose f 6∈ F has rank 2 and pinning any variable of f produces a rank 1 function in F . If each bundle of f is odd, then we can construct a rank 2 essential arity 3 function g(+) 6∈ F . Proof. By being odd, all 3 bundles of f are non-empty. By the collation bundle type operation we may assume each bundle of f has only one variable, and so f has arity 3. We pick two variables as free variables. If the dependent bundle of f has type −, i.e., the input variables of f are x1 , x2 , x1 + x2 + 1, then we pin x1 to 0 to get a rank 1 function u(+−). Then we merge the bundle of u(+−) to the x1 +x2 +1 bundle of f by equating the two − variables, This produces the desired function g(+) 6∈ F . We go on to the second batch of lemmas about rank 3 functions. Lemma 4.5. Suppose f 6∈ F has rank 3 and pinning any variable of f produces a rank 2 function in F . We can construct a rank 3 function h, such that h 6∈ F , and either all its 7 bundles are odd, or all its 7 bundles are non-empty even, or it has exactly 3 non-empty even bundles. Proof. Because the rank of f is 3, there are 3 non-empty independent bundles, named x1 , x2 , x3 respectively. We give a list, which covers all possibilities and each possibility ends with a gadget realizing a function as required by the conclusion. 15 1. All other 4 bundles named x1 + x2 , x1 + x3 , x2 + x3 and x1 + x2 + x3 are empty. (a) All 3 non-empty bundles are even. Then we take f itself. (b) There is an odd bundle among x1 , x2 , x3 . We pick one odd bundle and pin the variables in the other two bundles, and get a rank 1 function u. By the condition, u ∈ F . For any odd bundle of f , we merge u’s bundle with this bundle of f . Just as what we did in Lemma 4.2. We get a function with exactly 3 non-empty even bundles. 2. All 7 bundles are non-empty. (a) All 7 bundles are even. We take f itself. (b) All 7 bundles are odd. We take f itself. (c) At least 4 bundles are even, and at least one bundle is odd. No 4 nonzero vectors of Z32 can be contained in a 2 dimensional subspace. So there are 3 linearly independent vectors. Whether f ∈ F is independent of the choice of free variables for its support. So among the even bundles, we can pick 3 linearly independent bundles and name them x1 , x2 , x3 respectively. Under this renaming of the variables and bundles, x1 , x2 , x3 are even bundles. i. Bundle x1 + x2 is even. No matter which bundles of the rest 3 bundles are odd, we can always pin to get a rank 2 function g in F containing 3 non-empty bundles of different parity types. Indeed, if x1 + x3 is an odd bundle, we can pin x1 , and the bundles of x3 , x1 + x3 are merged producing an odd bundle, and the bundles of x2 , x1 + x2 are merged producing an even bundle. Similarly if x2 + x3 is an odd bundle, we can pin x2 . If both x1 + x3 and x2 + x3 are even bundles, then x1 + x2 + x3 is an odd bundle, then we pin x3 . Go on to pin g to get a rank 1 function u, which has one odd bundle. Using u, we can change all bundles of f into even bundles. By symmetry, the proof is the same if either bundles x1 + x3 or x2 + x3 is even. ii. Bundle x1 + x2 + x3 is even. We may assume the 3 bundles x1 + x2 , x1 + x3 , x2 + x3 are odd bundles. We pin x3 to 0, to get a rank 2 function g. All 3 bundles y1 , y2 , y1 + y2 of g are odd. We will merge g’s bundles y1 , y2 , y1 + y2 to f ’s bundles x1 + x2 , x1 + x3 , x2 + x3 respectively. Notice that the same linear dependence holds for these the respective three bundles. To effect this merging we make one variable from the bundle x1 + x2 equal to one variable from the bundle y1 utilizing (=4 ). Then we make one variable from the bundle x1 +x3 equal to one variable from the bundle y2 utilizing another (=4 ). The last pair of bundles are already merged automatically. To avoid introducing extra linear restriction on the support of f , we do not use any superfluous (=4 ) to merge this last pair of bundles. We get a function h of rank 3 with all 7 bundles being non-empty and even. (d) At least 4 bundles are odd, and at least one bundle is even. The proof is parallel to the case 2 (c), except that in the last case it ends with a function h of rank 3 with all 7 bundles being odd. 3. There is a non-empty bundle among x1 + x2 , x1 + x3 , x2 + x3 , x1 + x2 + x3 . (This is logically the complement of case 1. We will use case 2 as a special subcase and reduce this case 3 to case 2.) 16 We can pin a bundle to get a rank 2 function g(y1 , y2 , y1 + y2 )(∗), whose 3 bundles are not empty and it is in F . Similarly, we can merge the x1 and y1 bundles, and merge the x2 and y2 bundles, and then the x1 + x2 and y1 + y2 bundles are merged automatically, to make the x1 + x2 bundle not empty, keeping the function outside of F . If the bundle x1 + x2 + x3 is empty, we can merge the bundle y1 to x1 , and the bundle y2 to x2 + x3 , and then automatically the bundle y1 + y2 to x1 + x2 + x3 . We get a rank 3 function outside of F , with 7 non-empty bundles. Then, we go to the proof in case 2. Lemma 4.6. Suppose f 6∈ F has rank 3 and pinning any variable of f produces a rank 2 function in F. If each bundle of f is either consistent or opposite, then we can construct a rank 3 function h 6∈ F , such that either all its 7 bundles are opposite, or all its 7 bundles are non-empty consistent, or it has exactly 3 non-empty bundles (with linearly independent names) which are consistent bundles. Proof. The proof is similar to Lemma 4.5. We replace “odd” by “opposite”, and “even” by “consistent”. Lemma 4.7. Suppose f 6∈ F has rank 3 and pinning any variable of f produces a rank 2 function in F . If each bundle of f is odd, then we can construct a rank 3 function h(+) 6∈ F . Proof. By being odd, all 7 bundles of f are non-empty. Using the collation operation on the bundle types, we can assume all bundles of f are singletons. We pick 3 independent bundles of f as free variables, so they are given type x1 (+), x2 (+), x3 (+). We define condition (F): There are four bundles which contain a common free variable xj in their names and an odd number of them are of the (−) type. Suppose condition (F) holds. Such four bundles correspond to a face (subcube) {0, 1}2 of the form xj = 1 in the cube {0, 1}3 . If we pin the other two free variables to 0, these four bundles are merged into a single bundle of 4 variables, and (+) type (respectively, (−) type) variables in these four bundles remain (+) type (respectively, (−) type). So there is an odd number of (−) type variables among the 4 variables. After collation, we get a rank 1 function u(+−) in F . Using u(+−), we can change all (−) type variables of f to (+) type, keeping it outside of F . This proves the lemma under condition (F). If the bundle x1 +x2 +x3 has type (−), consider the three faces (subcubes) {0, 1}2 of the form xj = 1 in the cube {0, 1}3 . If we assign a number 1 ∈ Z2 for a (−) type at a vertex of {0, 1}3 , and P 0 ∈ Z2 for a (+) type, and let sj be the sum in Z2 over the face corresponding to xj = 1 and let s = 3j=1 sj in Z2 , then the value 1 at x1 +x2 +x3 contributes 3 times mod 2 to s, each value at a point of Hamming weight two contributes 2 times mod2 (thus 0, regardless of its value), and the value from x1 (+), x2 (+), x3 (+) are all 0. Hence s ≡ 1 mod 2, and therefore some sj ≡ 1 mod 2. Thus condition (F) holds. The lemma has been proved in this case. In the following we can assume the bundle x1 + x2 + x3 has type (+), and condition (F) does not hold. Then s1 ≡ s1 ≡ s3 ≡ 0 mod 2 implies that all three bundles at x1 + x2 , x1 + x3 , x2 + x3 are of the same type, all (+) or all (−). If they are all of type (+) then we are done. Suppose all three bundles at x1 + x2 , x1 + x3 , x2 + x3 have type (−). We can pin one free variable to 0, and get a function of rank 2 and essential arity 3. This function has type (+−) in all three bundles y1 , y2 , y1 + y2 , and we will denote it as g(+−). Now we merge the 3 bundles y1 , y2 , y1 + y2 of g(+−) to the 3 bundles 17 x1 + x2 , x1 + x3 , x2 + x3 of f respectively, by equating the (−) variables in each bundle pair (utilizing a copy of (=4 ) as by now the standard way). Notice that the three bundles of g satisfy the same linear dependence as the bundles x1 + x2 , x1 + x3 , x2 + x3 of f . This changes the types of these three bundles of f from (−) to (+ − −), and then we can further change them to (+) by collation. 4.3 P In this subsection, we assume F 6⊆ P. Then there is a function f ∈ F − P. Utilizing this f , we construct some function h(++) having the property that its essential function h 6∈ P. Formally we have the following lemma. Lemma 4.8. Suppose F 6⊆ P. Then we can construct a function h++ ∈ P++, such that #CSPc2 ({h++} ∪ F ) ≤T #CSPc2 (F ). Part of the proof of Lemma 4.8 can be stated as the following arity reduction lemma about P. Every function g ∈ P has a decomposition as a product of functions over disjoint subsets of variables, where each factor S has support contained in a pair of antipodal points: There existsQa partition X = {x1 , . . . , xn } = kj=1 Xj , and functions gj on Xj such that g(X) = g(X1 , . . . , Xk ) = kj=1 gj (Xj ), and for all 1 ≤ j ≤ k, supp(gj ) ⊆ {αj , α¯j } for some αj ∈ {0, 1}|Xj | . Lemma 4.9. If f 6∈ P, but f 2 ∈ P, then we can pin f to a rank 2 function h such that its essential arity is 2 and its compressed function h is a binary function with h 6∈ P, and h2 ∈ P. Furthermore, all 4 values of h are nonzero. 2 2 Proof. Since Qk supp(f ) = supp(f ), f has affine support. Let g = f ∈ P, then there is a decomposition g(X) = j=1 gj (Xj ), where each gj evaluates to zero except at possibly αj and α¯j . A consequence of this decomposition is that supp(g) is a direct product of affine spaces Sj with the special property that, each Sj has at most one free variable, and if there is one free variable in Xj then all variables Xj are in the same bundle. So there are no bundles that correspond to sums of two or more free variables. Clearly gj (αj ) and gj (α¯j ) cannot both be 0, for otherwise g is identically 0, and so is f . Then f ∈ P, a contradiction. Suppose for some j, one of gj (αj ) or gj (α¯j ) is 0. Without loss of generality suppose j = 1, g1 (α¯1 ) = 0 and g1 (α1 ) 6= 0. Then the function f 0 (X2 , . . . , Xk ) = f X1 =α1 (X2 , . . . , Xk ) has the property that f 0 6∈ P but (f 0 )2 ∈ P. The latter claim is obvious since (f 0 )2 = (f 2 )X1 =α1 = Q g1 (α1 ) · 2≤`≤k g` . For the former claim, if f 0 ∈ P, we can define f1 (X1 ) = 1 at X1 = α1 and 0 otherwise, then f (X1 , . . . , Xk ) = f1 (X1 ) · f X1 =α1 = f1 (X1 ) · f 0 , because f is zero for all assignments unless X1 = α1 . This shows that f ∈ P, a contradiction. Hence we can continue the proof inductively on the function f 0 . Therefore we can assume that each gp ¯j }. j has support supp(gj ) = {αj , α For each 1 ≤ j ≤ k, define fj (Xj ) = gj (Xj ). This is a pointwise definition by taking a square root Q 2 k value (of arbitrary sign). Then f = g = f 2. j j=1 Now we define a sign function S : {0, 1}k → {+1, −1}. For (y1 , . . . , yk ) ∈ {0, 1}k , let f (X1 , . . . , Xk ) S(y1 , . . . , yk ) = Qk j=1 fj (Xj ) (15) where Xj = αj if yj = 1 and Xj = α¯j if yj = 0. Note that since supp(gj ) = {αj , α¯j }, there is no division by zero and S is well-defined. Then f (X1 , . . . , Xk ) = S(y1 (X1 ), . . . , yk (Xk )) · k Y j=1 18 fj (Xj ) (16) for all X = (X1 , . . . , Xk ), where yj (·) is a function which is defined as yj (Xj ) = 1 if Xj = αj and yj (Xj ) = 0 otherwise. Note that in (16) both sides are zero unless for all 1 ≤ j ≤ k, Xj = αj or α¯j , and in that case (16) follows from (15). Because S is a ±1 valued function, there is a multilinear polynomial p(y1 , . . . , yk ) ∈ Z2 [y1 , . . . , yk ] such that S(y1 , . . . , yk ) = (−1)p(y1 ,...,yk ) . If deg(p) ≤ 1 then S is factorizable as functions on each yj separately, and consequently f ∈ P by (16), a contradiction. Hence deg(p) ≥ 2. Consider a monomial with minimum degree among all monomials of degree at least 2. Without loss of generality let it be y1 y2 . . . y` , where ` ≥ 2. Now, for all ` < j ≤ k, pin Xj to α¯j , which corresponds to setting yj = 0. Any monomial in p that has a factor yj for some j > ` is annihilated. Any monomial that is a subproduct of y1 y2 . . . y` (including y1 y2 . . . y` itself) is unaffected. By the minimality of y1 y2 . . . y` , all other remaining monomials must have degree at most 1. Now, for all 2 < j ≤ `, further pin Xj to αj , which corresponds to setting yj = 1, we reduce p to c0 + c1 y1 + c2 y2 + y1 y2 for some c0 , c1 , c2 ∈ Z2 . The compressed function h of the corresponding rank 2 function h obtained from f by pinning has   1 a matrix λ , with nonzero λ, a, b. As noted earlier, the bundle named x1 + x2 is empty; this is b −ab a property of supp(f ) = supp(g). Hence h has essential arity 2. Clearly h 6∈ P, but h2 ∈ P. Proof of Lemma 4.8. Starting from any f ∈ F − P, if f 2 6∈ P, then we can just realize f 2 ++ by Lemma 4.1. Now we assume f 2 ∈ P. By Lemma 4.9, we can get a function h of rank 2 and essential arity 2, such that its compressed function h 6∈ P, and h2 ∈ P.   1 a Ignore a nonzero constant we may assume h = , with nonzero a, b, c. From the pointwise b c   1 a2 square function h2 = 2 2 ∈ P, we get c2 = ab, and thus c = −ab because h 6∈ P. b c There are two cases. One case is that a8 6= 1 or b8 6= 1. Without loss of generality, assume a8 6= 1. We can construct a gadget by taking two copies of h, and connect their respective variables within the bundle x2 . A variable with a (+) (respectively, a (−)) label is connected to the corresponding variable in the other copy of h with the same (+) (respectively, (−)) label. This produces a function with two bundles (corresponding to the bundles both   copy  of h).2 This function  x1 in each  named 1+a b(1 − a2 ) 1 b 1 a . is denoted as g. The compressed function of g is = b(1 − a2 ) b2 (1 + a2 ) a −ab b −ab c c 2 2 By 4.1 we have #CSP 2 ({g ++} ∪ F ) ≤T #CSP2 (F ). The compressed function of g ++ is  Lemma  (1 + a2 )2 b2 (1 − a2 )2 . By checking its determinant we conclude that if a8 6= 1 then this binary 2 b (1 − a2 )2 b4 (1 + a2 )2 function does not belong to P. Hence g 2 ++ ∈ P++. The other case is that a8 = b8 = 1. Suppose h is h(x(σ), y(τ )), where σ (resp. τ ) is the type of bundle x (resp. y). We pin the input bundle x to get [1, a](τ ) (note that the bundle x1 + x2 is empty.) We pin the input bundle y to get [1, b](σ). Put them together we get a function s = s(x(σ), y(τ )),  can  1 a with essential and compressed function s̃ = s = [1, b] ⊗ [1, a] = . b ab We put one copy of h and 7 copies of s together, to get a function whose inputs are xj (σ), yj (τ ), j = 1, 2, . . . , 8. For each element in the type σ, say +, we connect the 8 variables xj , j = 1, 2, . . . , 8, by an Equality (=10 ) of arity 10. The 8 variables become 2 variables, and the eight xj bundles are merged into a bundle x(σ ∪ σ). We handle yj (τ ), j = 1, 2, . . . , 8, similarly. At last we get a function in inputs (x(σ ∪ τ )).  ∪ σ), y(τ   It canbe expressed as t++, where neither t(x(σ), y(τ )) nor its compressed 8 1 a 1 1 function 8 = is in P. b −a8 b8 1 −1 19 4.4 A Lemma 4.10. Let f 6∈ A . In #CSPc2 ({f }), we can realize a function in one of the following sets: • A ++, • F1α , F1α (+−), • F3α (+), F3α (+−), • F7α (+), F7α (+−). Proof. If f 2 6∈ A , we can realize f 2 ++, which is a function in A ++. Now suppose f 2 ∈ A . Ignoring a nonzero constant factor, we can write f more explicitly as f = supp(f ) · αL(x)+2Q(x)+4H(x) (17) P P is a linear function, Q(x) = 1≤j<k≤r cjk xj xk is a quadratic (multilinear) where L(x) = rj=1 cj xjP polynomial, and H(x) = 1≤j<k<`≤r cjk` xj xk x` + · · · is a (multilinear) polynomial with all monomials of degree at least 3, where r is its rank. By the uniqueness (in the sense that all coefficients cj , cjk and cjk` are integers mod 2) of this polynomial expression in the exponent of α, any f defined by the expression in (17) is in A iff all the coefficients of the 3 polynomials L, Q and H are even. Because f 6∈ A , there is an odd coefficient. If one coefficient of L is odd, say c1 , we pin all free variables to 0 except x1 , to get a rank 1 function ` not in A . It is not hard to see, after a collation if necessary, ` ∈ F1α ∪ F1α (+−) ∪ F1α (cc), while F1α (cc) ⊆ A ++. If one coefficient of Q is odd, say c12 , we pin all free variables to 0 except x1 , x2 , to get a rank 2 function q1 not in A . If we can pin q1 to get a rank 1 function not in A , we fall into the previous case. Hence, we can assume the conditions of Lemma 4.2, 4.3 and 4.4 are satisfied. By Lemma 4.2, from q1 we can construct a function q2 , all bundles of q2 are even or all bundles of q2 are odd. If all bundles of q2 are odd, by Lemma 4.4, we go on to get a function q(+) 6∈ A . If the linear terms Lq in the corresponding polynomial for q of q(+) contains an odd coefficient, we can pin to get a rank 1 function and fall into lower rank case. Hence, we assume all coefficients of Lq are even. Suppose the compressed function q of q(+) is αc1 x1 +c2 x2 +2c12 x1 x2 , Then c1 ≡ c2 ≡ 0 and c12 ≡ 1. If we apply 3 a Mα transformation to q(+), the compressed function becomes αx1 +x2 +(x1 +x2 ) · αc1 x1 +c2 x2 +2c12 x1 x2 = α(c1 +2)x1 +(c2 +2)x2 +2(c12 −1)x1 x2 , which is a function in A . Note that, for xi = 0, 1 ∈ Z, the value x1 + x2 mod 2 cannot be calculated as a linear term on the exponent of α, but can be calculated mod 8, and thus we used the expression (x1 + x2 )3 , since x1 + x2 ≡ 0, 1 mod 2 iff (x1 + x2 )3 ≡ 0, 1 mod 8. Hence, q(+) belongs to the set F3α . If all bundles of q2 are even, we apply Lemma 4.3 to make all bundles either consistent or opposite. If all bundles are opposite, by the same analysis of the compressed function, we get a q(+−) ∈ F3α (+−). If all bundles are consistent, by the same analysis of the compressed function, we get a q(cc) of essential arity 2 or 3, with q 6∈ A . Hence, q(cc) ∈ A ++. The last case is that there is an odd coefficient in H in (17). Suppose the monomial M has the minimum degree, among all monomials in H with odd coefficient. We pin all free variables which are not in M to 0, and pin the variables in M to 1, except 3 of them, to get a rank 3 function h1 . Similarly, by Lemma 4.5, 4.7 and 4.6, from h1 , either we get functions not in A of smaller rank and fall into the solved two cases, or we get one of the following rank 3 functions: an essential arity 7 function h(+), or an essential arity 7 function h(+−), or an essential arity 3 function h(cc), or an essential arity 7 function h(cc). For all cases the analysis of the compressed function 20 h = αc1 x1 +c2 x2 +c3 x3 +2c12 x1 x2 +2c13 x1 x3 +2c23 x2 x3 +4c123 x1 x2 x3 is the same. (The fact that h has such an expression, namely the coefficients of degree 2 terms are all even and the coefficient of degree 3 terms is divisible by 4 ultimately follows from the expression (17) for f .) Similar to the above proof, we can assume all coefficients in h are even, except that c123 is odd. h 6∈ A , so in the last two cases, we get a function in A ++. For the first two cases, we only need to prove a Mα transformation applied to the essential function h, will change h to a function in F7A . The compressed function of Mα⊗7 · h̃ is 3 +(x αx1 +x2 +x3 +(x1 +x2 ) = α 3 3 4 1 +x3 ) +(x2 +x3 ) +(x1 +x2 +x3 ) ·h (c1 +4)x1 +(c2 +4)x2 +(c3 +4)x3 +2(c12 +2)x1 x2 +2(c13 +2)x1 x3 +2(c23 +2)x2 x3 +4(c123 +1)x1 x2 x3 , which is a function in A , since the exponent has the form L0 +2Q0 +4H 0 , and all coefficients of L0 , Q0 , H 0 are even. (As in these two case, the essential arity 7 function is either h(+) or h(+−), the holographic transformation is Mα⊗7 on the essential function h̃.) Remark: We remark that this form for the compressed function of Mα⊗7 · h̃ can be derived as follows: The values of x1 , x2 , x3 are all 0-1 integers, and the transformation produces a factor α for each variable iff the variable takes value 1. For a variable such as x1 + x2 or x1 + x2 + x3 , one has to be careful to remember that such a linear expression is in the sense of Z2 ; it is illegitimate to simply substitute the linear expression on the exponent of α, which can only be computed as an integer mod 8. For an expression such as x1 + x2 the integer value can be only 0, 1 or 2, in which case (x1 + x2 )3 mod 8 keeps the meaning of the 0-1 value of x1 + x2 mod 2. For x1 + x2 + x3 , the value could be 0, 1, 2 or 3, then we must use the expression (x1 + x2 + x3 )4 mod 8 to keep the meaning of the 0-1 value of x1 + x2 + x3 mod 2. One can calculate the end result such as the coefficients of x1 x2 or x1 x2 x3 by noticing that  the modifier expression is symmetric in x1 , x2 , x3 and, e.g., the modifier coefficient for 4 x1 x2 x3 is 2 3! = 36 ≡ 4 mod 8. 4.5 Aα ⊗n 0 By definition, a function f 6∈ A α iff Mα⊗n −1 · f 6∈ A , where n = n(f ) is the arity of f . Let f = Mα−1 · f . 0 To derive the corresponding results for A α in Lemma 4.11 we use f to repeat the proof of Lemma 4.10. However we should be careful in justifying the steps in gadget constructions. One primitive of gadget construction is pinning. Because Mα is diagonal, f 0xj = ∈ A iff f xj = ∈ A α , for  = 0, 1. Thus pinning to f 0 can be replaced by pinning directly to f . The other primitive of gadget construction is merging two bundles, where the basic operation is to connect by (=4 ) two inputs (one is from say f 0 and the other is from some q 0 which may be obtained from f 0 by pinning). In this gadget, (=4 ) is separated by two Mα−1 from touching f and q directly. But if we consider there is a (=2 ) on the edge, then the new function on the edge is a symmetric binary function with matrix (Mα−1 )T Mα−1 which represents a function in A . Therefore we can directly argue whether the gadget using transformed function f 0 results in a function in A α iff the same gadget using the untransformed function f results in a function in A . We conclude that using f 0 to repeat the proof of Lemma 4.10, we get some function through some gadgets composed of f 0 , (=4 ) and pinning functions. In the end we get some equivalent gadgets which are new gadgets composed of f , (=4 ) and pinning functions, which are transfored versions under Mα−1 . To get the form of these functions of the new gadgets, we just do Mα transformations to the outcomes of Lemma 4.10. Lemma 4.11. Let f 6∈ A α . In #CSPc2 ({f }), we can realize a function in one of the following sets: • A ++, 21 • F1A , F1α (+−), • F3A (+), F3α (+−), • F7A (+), F7α (+−). The the expressions in Lemma 4.11 are those expressions in Lemma 4.10 under the transformation by Mα . For A ++, the two copies of Mα produce a modification by a factor 1 or α2 = i (if the variable for a bundle name is 0 or 1, which appears twice as equal variables in the bundle by the (++) type). The unary function [1, i] is in A . Therefore this modification does not affect the (non)membership for its essential function in A . As well, the expressions F1α (+−), F3α (+−) and F7α (+−) from Lemma 4.10 are not changed to the corrresponding expressions in Lemma 4.11 because for the (+−) type the aggregate modification on the two variables in a bundle is always α, which becomes a constant factor. The expressions F1α , F3α (+) and F7α (+) do get changed to F1A , F3A (+) and F7A (+) respectively. 4.6 L Lemma 4.12. If we have a rank 1 function f 6∈ L , in #CSPc2 ({f }) we can realize a function in one of the following sets: A ++, F1α , F1A , F1A (+−). Proof. If f 2 6∈ A , we can realize f 2 ++, which is a function in A ++. Now assume f 2 ∈ A . We discuss the cases according to the type of the unique bundle of f being odd, or consistent, or opposite. Suppose the unique bundle of f is odd, (by equation (5), f 6∈ L no matter what is the integer coefficient c1 ), we change this bundle type to a singleton by the collation operation, to get a [1, αc1 ] ∈ F1α ∪ F1A . Suppose the unique bundle is consistent. By being of rank 1, the bundle is named for a free variable and thus non-empty. Because f 6∈ L , and equation (5) is satisfied, it follows that equation (9) must have been violated. Being consistent, the left hand side of equation (9) is 0 mod 2. Hence, c1 ≡ 1. In this case, after some collation operations we get g = [1, αc1 ](cc) and c1 ≡ 1. Because [1, αc1 ] 6∈ A , g ∈ A ++. Suppose the unique bundle is opposite. In particular the bundle is even and equation (5) is satisfied. Because f 6∈ L , equation (9) must have been violated. Being opposite, the left hand side is 1. Hence, c1 ≡ 0. In this case, we get [1, αc1 ](+−). Since c1 ≡ 0, we have [1, αc1 ](+−) ∈ F1A (+−). Lemma 4.13. If we have a rank 2 function f 6∈ L , in #CSPc2 ({f }), either we can pin to get a rank 1 function not in L , or we can realize a function in the sets A ++ or F3A (+−). Proof. If f 2 6∈ A , we can realize f 2 ++, which is a function in A ++. Now we may assume f 2 ∈ A . If any pinning of f always gives a function in L , we can apply Lemma 4.2, 4.4 and 4.3, to get a rank 2 function not in L , such that all 3 bundles are (+), or all 3 bundles are opposite, or all 3 non-empty bundles are consistent, or there are exactly 2 non-empty bundles which are consistent. Let the compressed function be αc1 x1 +c2 x2 +2c12 x1 x2 . We consider the following cases. 1. All 3 bundles are (+). h1 0i The matrix (aij ) in equations (3) and (4) is 0 1 , and all bi = 0 since they are all of type (+). If 11 c1 is odd, then we can pin x2 = 0. The resulting rank 1 function violates equation (9) since the corresponding matrix is just [ 11 ], and it has bundle type (++) and so both bi = 0. If c1 is even, then we can pin x2 = 1. The resulting rank 1 function also violates equation (9) since it has the same matrix [ 11 ], but it has bundle type (+−) and so the b vector is (0, 1)T . Hence we get a rank 1 function not in L . 22 2. All 3 bundles are opposite. 1 0 10 The matrix (aij ) in equations (3) and (4) is  00 11 . So equations (5) and (6) are satisfied. The six 11 11 bi are alternately 0’s and 1’s due to type (+−). If c1 or c2 ≡ 1, then we can pin to get a function not in L . So suppose c1 ≡ c2 ≡ 0. Then equation (9) holds. Since f 6∈ L , equation (10) must have been violated, and we get c12 ≡ 0. This means that we have a function in F3A (+−). 3. All the bundles are consistent. We have a function q(cc), where q 6∈ L . By a similar analysis of the compressed function of q(cc), we know that q 6∈ A , and so we get q(cc) ∈ A ++. Indeed, if q ∈ A , then c1 ≡ c2 ≡ c12 ≡ 0. All left hand sides of (5), (6), (9) and (10) are 0, and this would imply that q ∈ L . Lemma 4.14. If we have a rank 3 function f 6∈ L , in #CSPc2 ({f }), either we can pin to get a rank 2 function not in L , or we can realize a function in the sets A ++ or F7A (+−). Proof. If f 2 6∈ A , we can realize f 2 ++, which is a function in A ++. Now we assume f 2 ∈ A . If any pinning of f always gives a function in L , we can apply Lemma 4.5, 4.7 and 4.6, to get a rank 3 function not in L , such that all 7 bundles are (+), or all 7 bundles are opposite, or all 7 bundles are non-empty consistent, or there are exactly 3 non-empty bundles and they are all non-empty consistent. We consider the following cases. 1. All 7 bundles are (+). 1 0 0 010 0 0 1 Suppose the rank 3 function is h(+). The matrix (aij ) in equations (3) and (4) is  1 1 0 , with 101 011 111 all bi = 0. Let the compressed function of h be αc1 x1 +c2 x2 +c3 x3 +2c12 x1 x2 +2c13 x1 x3 +2c23 x2 x3 +4c123 x1 x2 x3 . We show that in this case we can pin x3 to get a rank 2 function not in L . If we pin x3 = 0, the bundle x3 disappears, and the remaining six bundles are merged into three bundles   of type (++), and the new matrix (aij ) for the rank 2 function in equations (3) and (4) is 1 1 0 0 1 1 0 0 1 , 1 1 1 with all six bi = 0. The new expression for the compressed function is αc1 x1 +c2 x2 +2c12 x1 x2 . If any of c1 , c2 , c12 is odd, then some equation in (9) or (10) is violated, thus we get a rank 2 function not in L . Suppose c1 ≡ c2 ≡ c12 ≡ 0. Now we pin x3 = 1, the bundle x3 disappears, and the remaining six bundles are merged into three bundles of type (+−), and the new matrix (aij ) for the rank 2 function is the same as above, but the new vector b = (0, 1, 0, 1, 0, 1)T . The new expression for the compressed function is α(c1 +2c13 )x1 +(c2 +2c23 )x2 +2(c12 +2c123 )x1 x2 . Now equation (10) is violated, and we get a rank 2 function not in L . 23 2. All 7 bundles are opposite. Suppose the rank 3 function is h(+−). Let its compressed function be αc1 x1 +c2 x2 +c3 x3 +2c12 x1 x2 +2c13 x1 x3 +2c23 x2 x3 +4c123 x1 x2 x3 . Similar to the proof above, if it is not the case that c1 ≡ c2 ≡ c3 ≡ c12 ≡ c13 ≡ c23 ≡ 0, we can pin to get a rank 2 function not in L . But if all these values are even, then because f 6∈ L , by equation (11), we get c123 ≡ 0. So we have a function h(+−) ∈ F7A (+−). 3. All the bundles are consistent. Suppose the rank 3 function is h(cc). A similar analysis about the compressed function gives c1 ≡ c2 ≡ c3 ≡ c12 ≡ c13 ≡ c23 ≡ 0 and c123 ≡ 1. This tells us that the essential function h is not in A , regardless of whether the essential arity is 3 or 7. Lemma 4.15. Suppose f 6∈ L . In #CSPc2 ({f }), either we can get a function in A ++, or we can realize a function of rank at most 3 not in L . Proof. If f 2 6∈ A , we can realize f 2 ++, which is a function in A ++. Now assume f 2 ∈ A . Hence, f has the form (17). Suppose f = supp(f ) · αL(x)+2Q(x)+4H(x) . If a coefficient of H is even, we remove the corresponding monomial since α8 = 1. According to Theorem 3.2, we need to consider two cases. The first case is that H is not homogeneous of degree 3. Let M be a monomial having the minimum degree among all monomials in H of degree at least 4. Of course the degree of M is at least 4. We pin the free variables of f which are outside of M to 0, and pin the variables in M to 1 except 4 of them, to get a new function of rank 4. The new H polynomial has a unique monomial c1234 x1 x2 x3 x4 of degree 4 where c1234 ≡ 1. By Theorem 3.2, it is still not in L . We denote this new function still by f . From f we construct 3 functions of rank 3; if they are all in L , we will get a contradiction. Consider f x4 =0 . Substitute x4 = 0 into the compressed function of f , we find in the H polynomial of f x4 =0 , the coefficient of x1 x2 x3 is c123 . If f x4 =0 ∈ L , according to condition (11), this coefficient has the same parity as the number of variables in the bundle x1 + x2 + x3 in f x4 =0 that are labeled as (−), i.e., those variables that are equal to x1 + x2 + x3 + 1 on the support. These variables come from the union of two sets of variables of f . We denote by v123 the number of variables in the bundle x1 + x2 + x3 in f that are labeled as (−), i.e., those variables that are equal to x1 + x2 + x3 + 1 on the support. Similarly denote v124 and v1234 the numbers of variables that are equal to x1 + x2 + x4 + 1 and x1 + x2 + x3 + x4 + 1, respectively, in f on its support. We have c123 ≡ v123 + v1234 . If we similarly consider f x3 =0 , we get c124 ≡ v124 + v1234 . The third rank 3 function we construct is f x3 =x4 . To do so, we connect one x3 variable and one x4 variable by a (=4 ) function, and pin any variable labeled x3 + x4 (+) to 0 and any variable labeled x3 + x4 (−) to 1. We get one extra condition that x3 = x4 , which narrows the support. That is, we get χx3 =x4 · f . The 15 bundles of f , namely x1 , x2 , . . . , x1 + x2 + x3 + x4 , turn into 7 bundles. The new bundle x1 + x2 + x3 is the union of the original bundles x1 + x2 + x3 and x1 + x2 + x4 . Hence, if f x3 =x4 ∈ L , its corresponding coefficient c0123 ≡ v123 + v124 , according to condition (11) on f x3 =x4 . Hence c0123 ≡ c123 + c124 . Substitute x3 = x4 into the compressed function of f . We get c0123 ≡ c123 + c124 + c1234 . Thus we reach a contradiction c1234 ≡ 0. We conclude that at least one of the three rank 3 functions f x4 =0 , f x3 =0 and f x3 =x4 , is not in L . Now, we can assume that H is homogeneous of degree 3, and consider the second case that one of the equations (5), (6), (7), (8), (9), (10) and (11) does not hold. If one of the 6 equations (5), (6), (7), 24 (9), (10) and (11) does not hold, then we can pin to get a function of rank at most 3 not in L . For example, if equation (10) does not hold for j < k, we can keep xj and xk , and pin other free variables to 0. Now, we can assume all the 6 equations (5), (6), (7), (9), (10) and (11) hold, and equation (8) does not hold for j < k < l < m. Firstly, keep xj , xk , xl and xm and pin other free variables to 0, to get a function h. The left hand side of (8) is the number of variables in all bundles in f with a name that contains xj , xk , xl , xm , i.e., any name that is of the form xj + xk + xl + xm + any affine linear form of other x’s. This number is precisely the number of variables in the bundle named xj + xk + xl + xm in h, i.e., the number of variables named xj + xk + xl + xm or xj + xk + xl + xm + 1 in h. Because f fails (8), this number is odd, and so h still fails equation (8). Consider hxm =0 and hxm =1 . Because the H polynomial of f is homogeneous of degree 3, when we set xm = 0 or xm = 1, there are no new cubic terms formed, and thus the cjkl coefficients of hxm =0 and hxm =1 are the same as the cjkl coefficient of f . The xj + xk + xl + 1 variables of hxm =0 come from the xj + xk + xl + 1 variables and the xj + xk + xl + xm + 1 variables of h. Meanwhile, the xj + xk + xl + 1 variables of hxm =1 come from the xj + xk + xl + 1 variables and the xj + xk + xl + xm variables of h. Hence, they have opposite parities, as their sum is odd. But they are respectively the left hand sides of the equation (11) for hxm =0 and hxm =1 , whose right hand sides are the same cjkl . It follows that one of the two rank 3 functions hxm =0 and hxm =1 must fail equation (11), and thus not in L. Putting Lemma 4.15, 4.14, 4.13 and 4.12 together, we get the following lemma. Lemma 4.16. If we have a function f 6∈ L , then in #CSPc2 ({f }), we can realize a function of the form: • A ++, • F1α , F1A , F1A (+−), • F3A (+−), • F7A (+−). 4.7 Putting Things Together Lemma 4.17. For any j, k ∈ {1, 3, 7}, there is some s ∈ {1, 3, 7}, such that we can realize in the setting #CSPc2 (FjA (+−), Fkα (+−)), a function in the set Fsα (++). Proof. Let Min = min{j, k} and Max = max{j, k}. If Min = Max, we overlay two functions from FkA (+−) and Fkα (+−) by bundles, and connect the variable labeled (−) in each bundle of one function to the variable labeled (−) in the corresponding bundle of the other function, to get a function in Fkα (++). If Min = 1, say Min = j. Then for each bundle of a function in Fkα (+−), we merge a FjA (+−) function with it by connecting the corresponding variables labeled (−), to get a function in Fkα (++). If Min = k just switch j and k. The remaining case is Min = 3 and Max = 7. Suppose we have g ∈ F3A (+−), h ∈ F7α (+−). We take one copy of h̃(x1 , x2 , x3 , x2 + x3 , x1 + x3 , x1 + x2 , x1 + x2 + x3 )(+−), and three copies of g: g̃(u1 , u2 , u1 + u2 )(+−), g̃(v1 , v2 , v1 + v2 )(+−), g̃(w1 , w2 , w1 + w2 )(+−) to construct a function realizing a function f in (x1 , u1 , x2 , v1 , x3 , w1 , x2 +x3 , u2 , x1 +x3 , v2 , x1 +x2 , w2 , x1 +x2 +x3 , w1 +w2 ). (See Figure 1 for an illustration.). We merge the u1 bundle of one copy of g with the x1 bundle of h, by equating the variables labeled u1 (−) and d x1 (−). That is, set u1 + 1 = x1 + 1. Similarly, we merge the bundles u2 with x2 + x3 , merge v1 with x2 , merge v2 with x1 + x3 , merge w1 with x3 and merge w2 with x1 + x2 . 25 These 5 merging operations are accomplished by similarly connecting 5 pairs of variables labeled (−) as illustrated in Figure 1. After these mergings, the remaining four bundles x1 + x2 + x3 , u1 + u2 , v1 + v2 , w1 + w2 are already merged into one bundle of type (+ + + + − − −−) automatically, which can become (++) by 3 collations. Including these 3 collations there are a total of 9 pair of equating variables all labeled (−) except the pair u1 + u2 (+) and v1 + v2 (+). The 3 collations are algebraically x1 + x2 + x3 + 1 = u1 + u2 + 1, u1 + u2 = v1 + v2 , v1 + v2 + 1 = w1 + w2 + 1, and we leave x1 + x2 + x3 and w1 + w2 in this bundle. The equations from these 3 collations are algebraic consequences of the previous 6 merging operations. To summarize the above description, the 18 variables among 32 variables of the 4 functions are matched by 9 edges in this gadget, we list them by the following equations.  u1 + 1 ≡ x1 + 1     u2 + 1 ≡ x2 + x3 + 1     v1 + 1 ≡ x2 + 1     v2 + 1 ≡ x1 + x3 + 1  w1 + 1 ≡ x 3 + 1   w2 + 1 ≡ x 1 + x 2 + 1      u + u2 + 1 ≡ x1 + x2 + x3 + 1 1     u 1 + u2 ≡ v1 + v2   v1 + v2 + 1 ≡ w1 + w2 + 1 Removing algebraic redundancy, this system of    u1 ≡   u2 ≡    v1 ≡ v  2 ≡     w ≡   1 w2 ≡ equations is equivalent to x1 x2 + x3 x2 . x1 + x3 x3 x1 + x2 with consequences u1 + u2 ≡ v1 + v2 ≡ w1 + w2 ≡ x1 + x2 + x3 . The external variables of this gadget has 7 bundles x1 , x2 , x3 , x1 +x2 , x1 +x3 , x2 +x3 and x1 +x2 +x3 and are all of the type (++). It is not hard to verify that, the above system of linear equations are all the new introduced linear constraints on the 14 external variables, besides the natural linear constraints of the support of h already shown by the names of variables. So f has 7 bundles, such that it has the form f˜(x1 , x2 , x3 , x2 + x3 , x1 + x3 , x1 + x2 , x1 + x2 + x3 )(++). Denote the input variables of f˜ by X. We calculate f on a general input X(++) on the support. Every such assignment has a unique extension to the 9 internal edges so that the 4 functions give no zero values. We get f˜(X) = h̃(X)g̃(x1 , x2 + x3 , x1 + x2 + x3 )g̃(x2 , x1 + x3 , x1 + x2 + x3 )g̃(x3 , x1 + x2 , x1 + x2 + x3 ). Let h̃ = Mα⊗7 q, where q ∈ F7A , since h ∈ F7α (+−) by assumption. We have h̃(X) = Mα⊗7 (X) · q(X), where we view Mα as a generalized binary equality function (which modifies each external variable). Now, we see that f˜ is a product of Mα⊗7 with 4 functions in A : q, g̃, g̃ and g̃. The product of 4 functions in A is in A . Hence, f˜ ∈ F7α and f ∈ F7α (++). Suppose we have g ∈ F3α (+−), h ∈ F7A (+−). The construction of the gadget f and the analysis of the support of f are the same. In the last step, we calculate f˜. Let g̃ = Mα⊗3 p, where p ∈ F3A , since g ∈ F3α (+−) by assumption. Then we have f˜(X) = h̃(X)g̃(x1 , x2 + x3 , x1 + x2 + x3 )g̃(x2 , x1 + x3 , x1 + x2 + x3 )g̃(x3 , x1 + x2 , x1 + x2 + x3 ) = h̃(X)p(x1 , x2 + x3 , x1 + x2 + x3 )p(x2 , x1 + x3 , x1 + x2 + x3 )p(x3 , x1 + x2 , x1 + x2 + x3 ) ·Mα⊗7 (X)Mα (x1 + x2 + x3 )Mα (x1 + x2 + x3 ). 26 The second equality holds, because from each g̃ we get a p and a Mα⊗3 applied to the 3 variables. The modifier factor Mα⊗7 (X) is obtained by collecting one factor Mα on each of the inputs x1 , x2 , x3 , x1 + x2 , x1 + x3 , x2 + x3 , x1 + x2 + x3 , and there are still two extra factors of Mα on x1 + x2 + x3 . Because Mα2 (= Mα2 = Mi ) is in A , h̃ and p both belong to A , and f˜ ∈ F7α , we have f ∈ F7α (++). Lemma 4.18. For any j, k ∈ {1, 3, 7}, there is some s ∈ {1, 3, 7}, such that we can realize in the setting #CSPc2 (FjA (+), Fkα (+)), a function in the set Fsα (++). Proof. The proof is similar to the proof of Lemma 4.17. The only difference is a slight modification in the gadget construction when Min = 3 and Max = 7. Now each bundle of the constituent functions from FjA (+) and Fkα (+) has a single variable labeled (+). When we merge two bundles, we connect these two variables by a copy of (=4 ). After the six connection steps have been made, the x1 + x2 + x3 bundle includes u1 + u2 , v1 + v2 and w1 + w2 , and has type (++++). We turn it to (++) type using collation. Lemma 4.19. For any j ∈ {1, 3, 7}, we can realize a function in the set Fjα (++), from either #CSPc2 (Fjα (+−), F1A ) or #CSPc2 (Fjα (+−), F1α ). Proof. Using (=4 ) we change Fjα (+−) to Fjα (+ + +−). For each bundle, we can apply a function in F1A to one variable labeled (+) and one variable labeled (−) to get a function in Fjα (++). We can also apply a function in F1α to one variable labeled (+) and one variable labeled (−) in each bundle to get a Fjα (++) function. Note that in the latter case, the pair of variables labeled (+) and (−) in a single bundle will always take opposite values on the support and therefore the aggregate modifcation by F1α is a constant factor, thus it does not change the membership of its essential function in Fjα . Lemma 4.20. For any set of constraint functions F , let F (++) = {f (++) | f ∈ F }. Then #CSP(F ) ≤T #CSP2 (F (++)) ≤T #CSPc2 (F (++)). Proof. In an instance of #CSP(F ) if we replace each edge by two parallel edges, and replace each occurrence of any f ∈ F by f (++) ∈ F (++), we get an instance in #CSP2 (F (++)), and they have the same value. Proof of #P-hardness part of Theorem 4.1: We have F 6⊆ P, F 6⊆ A , F 6⊆ A α and F 6⊆ L . By Lemma 4.8, we can realize a function p++ in the setting #CSPc2 (F ), such that p 6∈ P. Now the idea is to obtain a function from A ++, then we can apply Lemma 4.20. This will allow us to apply Theorem 2.1 to prove #P-hardness. Lemmata 4.10, 4.11 and 4.16 tell us respectively what we can get from F 6⊆ A , F 6⊆ A α and F 6⊆ L . If one of the lemmas brings us as one of the direct outcomes a function f ++ in A ++, together with p++, we have #CSP({p, f }) ≤T #CSPc2 (F ) by Lemma 4.20. Then by Theorem 2.1, we have proved that #CSPc2 (F ) is #P-hard. So we may assume the direct outcomes of the three lemmas contain no function in A ++. We analyze the possible combinations of outcomes, and still construct a function in A ++ to finish the proof. If the outcomes contain no functions belonging to some Fsα (+−) (s ∈ {1, 3, 7}), then by the outcomes of Lemma 4.10 and Lemma 4.11 for the cases of reducing A and A α respectively, there must be both a function in Fkα (+) (k ∈ {1, 3, 7}) and a function in FjA (+) (j ∈ {1, 3, 7}). By Lemma 4.18, we can 27 realize some function in Fsα (++) (s ∈ {1, 3, 7}). But any function from Fsα (++) (s ∈ {1, 3, 7}) is from A ++, and so #CSPc2 (F ) is #P-hard. Now suppose the outcomes of Lemma 4.10 and Lemma 4.11 contain a function in Fjα (+−) (j ∈ {1, 3, 7}). By Lemma 4.16, either we have a function in FkA (+−) (k ∈ {1, 3, 7}), or we have a function in F1A , or we have a function in F1α . In the first case, by Lemma 4.17 we realize some function in Fsα (++) (s ∈ {1, 3, 7}). In the second and third cases, by Lemma 4.19 we can also realize some function in Fsα (++) (s ∈ {1, 3, 7}). As noted above, any function in Fsα (++) is from A ++. Therefore #CSPc2 (F ) is #P-hard. This copletes the proof of Theorem 4.1. 5 Complexity dichotomy theorem of Holantc We use a 2 × 4 matrix to denote a function of arity 3, with rowsindexed by x1 = 0, 1 and columns  000 f f 001 f 010 f 011 indexed by x2 x3 = 00, 01, 10, 11, thus f = . 100 f f 101 f 110 f 111 We say a function is a generalized Equality if its support is a pair of antipodal points {x, x}. A binary function is a generalized Disequality if it has support {01, 10}, i.e., f = (0, a, b, 0) with ab 6= 0. Lemma 5.1. Let f ∈ F be a generalized Equality of arity 3. Then Holantc (F ) is #P-hard unless F ⊆ A , F ⊆ A α or F ⊆ P. In all three exceptional cases, the problem is in P (and belongs to the tractable families for #CSPc2 ). Proof. Let supp(f ) be {(a1 , a2 , a3 ), (1−a1 , 1−a2 , 1−a3 )}. If they are 000 and 111, then f is a symmetric function [a, 0, 0, b], with ab 6= 0. Otherwise, there are both 0 and 1 among (a1 , a2 , a3 ). By renaming variables, without loss of generality, we assume that they are 001 and 110. By connecting x1 and x2 with a self loop, we get a unary function [a, b] with ab 6= 0. By connecting this unary function to x1 of f , we get a generalized Disequality function (0, c, d, 0), with cd 6= 0. By connecting this generalized Disequality to x3 of f , we obtain a symmetric generalized Equality. After a scaling, in both cases, we may assume to have [1, 0, 0, b]. Taking a self loop on [1, 0, 0, b] we get [1, b]. Connecting one [1, b] back to [1, 0, 0, b], we get [1, 0, b2 ]. Connection one [1, 0, b2 ] back to [1, 0, 0, b], we get [1, 0, 0, b3 ]. Then we have Holant([1, b], [1, 0, b2 ], [1, 0, 0, b3 ] | F ∪ {[1, 0, 1]}) ≤T Holantc (F ).   1 0 After a holographic reduction by T = , the left hand side becomes {(=1 ), (=2 ), (=3 )} and the 0 b right hand side becomes T F ∪ {[1, 0, b2 ]}. By the dichotomy theorem for #CSP with each variable appearing at most three times [11], we know that the problem is #P-hard unless T F ∪ {[1, 0, b2 ]} ⊆ P or T F ∪ {[1, 0, b2 ]} ⊆ A . A diagonal holographic reduction keeps the class P invariant, so T F ∪ {[1, 0, b2 ]} ⊆ P iff F ⊆ P, as [1, 0, b2 ] ∈ P. If T F ∪ {[1, 0, b2 ]} ⊆ A , we have b2 ∈ {±1, ±i}. If b2 = ±1, the holographic transformation T also keeps the class A invariant, and so T F ∪ {[1, 0, b2 ]} ⊆ A iff F ⊆ A . If b2 = ±i, the holographic transformation is the α transformation (followed by a transformation that keeps A invariant), and so T F ∪ {[1, 0, b2 ]} ⊆ A iff F ⊆ A α . This completes the proof. In the above proof, once we have a symmetric generalized Equality [1, 0, 0, b], we no longer need the two unary pinning functions ∆0 and ∆1 . We will use this fact later. Lemma 5.2. Suppose F contains a generalized Equality f of arity 4, then Holantc (F ) ≡T CSP2 (F ). 28 Proof. Let supp(f ) be {(a1 , a2 , a3 , a4 ), (1 − a1 , 1 − a2 , 1 − a3 , 1 − a4 )}. By renaming variables, we only need to consider three possibilities for (a1 , a2 , a3 , a4 ) : 0000, 0001 or 0011. For 0000, the function is already symmetric [a, 0, 0, 0, b], with ab 6= 0. For 0001, by connecting x1 and x2 with a self loop, we get a generalized Disequality function. By connecting this generalized Disequality to x4 of f , we get a symmetric function of the form [a, 0, 0, 0, b] (ab 6= 0). For 0011, we take two copies of f and connect their variables x3 and x4 respectively. From this, we also get a symmetric function of the form [a, 0, 0, 0, b] (ab 6= 0). So, after a scaling, in all cases we may assume to have [1, 0, 0, 0, b] (b 6= 0). By a self loop we get [1, 0, b]. Using k − 1 copies of [1, 0, b] to connect back to [1, 0, 0, 0, b] we get [1, 0, 0, 0, bk ]. If b is a root of unity, we can directly realize [1, 0, 0, 0, 1]; otherwise, we can interpolate [1, 0, 0, 0, 1]. From that we can get all Equalities of even arity. This completes the proof. Lemma 5.3. Let f ∈ F be a non-decomposable function of arity 3 satisfying the parity condition,   a 0 0 b 0 a b 0 namely it has the form or . Then Holantc (F ) is #P-hard unless 0 c d 0 c 0 0 d Holant∗ (F ) is tractable or #CSPc2 (F ) is tractable. In both exceptional cases, the problem Holantc (F ) is in P. Proof. Because any pair of antipodal points in {0, 1}3 has opposite parity, if there are at most two nonzeros among a, b, c, d, they would belong to a same subcube {0, 1}2 , thus f would be decomposable. Since f is non-decomposable, at least three of a, b, c, d are non-zero. By the parity condition, some subcube {0, 1}2 has exactly two nonzero values, Without loss of generality suppose it is the subcube x3 =  (where  ∈ {0, 1}). If the two nonzero values have indices 01 and 10, then we have a generalized Disequality by pinning x3 = . If the two nonzero values have indices 00 and 11, then either 01 a generalized or 10 have nonzero values. Then pinning x2 = 1 or x1 = 1 respectively produces   a 0 0 b with Disequality. Use the Disequality to flip bits, we can change f to the form 0 c d 0 bcd 6= 0. Using the triangle gadget, we can get three symmetric functions: [a3 + b3 , 0, bcd + acd, 0], [a3 + c3 , 0, bcd + abd, 0], [a3 + d3 , 0, bcd + abc, 0]. Note that by labeling in three different and cyclically symmetric ways in the triangle gadget we get these three functions (on the Boolean domain, a cyclically symmetric ternary function is symmetric). If at least one of the three values bcd + acd, bcd + abd, bcd + abc is nonzero we get a symmetric function of the form [z, 0, 1, 0], for some z ∈ C. Otherwise, we have b = c = d = −a, in which case the original function f is already in this form [z, 0, 1, 0] after a nonzero scaling. By dichotomy theorem for symmetric Holantc [6], we know that Holantc ([z, 0, 1, 0]) is #P-hard unless 4 4 = 1. After pinning we get the binary [z, 0, 1]. Connection three copies z = 1. Now we assume that √ z √  z z we get [z 3 , 0, 1]. Let T = , we have [z 3 , 0, 1]T ⊗2 = [1, 0, 1], and [z, 0, 1, 0] = T ⊗3 [1, 0, 0, 1] up 1 −1 √ to a nonzero factor 2 z. So, we have the following reduction Holant({[1, 0, 0, 1], [z −1 + 1, z −1 − 1, z −1 + 1]} ∪ T −1 F ) ≡T Holant([1, 0, 1] | {[1, 0, 0, 1], [z −1 + 1, z −1 − 1, z −1 + 1]} ∪ T −1 F ) ≡T Holant([z 3 , 0, 1]|{[z, 0, 1, 0], [1, 0, 1]} ∪ F ) ≤T Holantc (F ). Having the arity 3 Equality (=3 ) = [1, 0, 0, 1] in a Holant problem allows us to get Equality of all arities, and thus we can apply the #CSP dichotomy on T −1 F ∪ {[z −1 + 1, z −1 − 1, z −1 + 1]}. 29   √ 1 1 • Case z = 1. Then T = , an orthogonal matrix (up to a scalar 1/ 2) that belongs to the 1 −1 stabilizer group of A . If T −1 F ⊆ A , then F ⊆ A . If T −1 F ⊆ P, then F ⊆ T P, a tractable family for Holant∗ . For all other F , it is #P-hard.      i i 1 1 0 1 • Case z = −1. Then T = =i is essentially the Z transformation. Note 1 −1 i −i 1 0   0 1 that belongs to the stabilizer groups of both A and P. If T −1 F ⊆ A , then F ⊆ ZA = 1 0 A . Hence #CSP(F ) is tractable, in particular, #CSPc2 (F ) is tractable. If T −1 F ⊆ P, then F ⊆ ZP, a tractable family for Holant∗ . In all other cases, it is #P-hard.  c  α αc • Case z = ±i. Then T = for some odd c. In this case, [z −1 + 1, z −1 − 1, z −1 + 1] 6∈ P, 1 −1 so the only possible tractable case is T −1 F ⊆ A . Then it is easy to see that F ⊆ A α , a tractable family for #CSPc2 . In all other cases, it is #P-hard. This completes the proof. In the above three lemmas, we stated and proved them for general complex valued functions. In the following lemmas, functions are real valued, which is important for our interpolation to succeed. We first define the following notion of non-interpolatable. Definition  5.1. Letab 6=0 be two  real numbers. A binary function is called non-interpolatable if it is a b a b . or of the form b −a −b a Non-interpolatable 2 × 2 matrices are just nonzero multiples of orthogonal matrices with nonzero entries.   a b ∈ F be a real valued binary function with ab 6= 0 and ad 6= bc (nonLemma 5.4. Let c d degenerate). Unless it is non-interpolatable, we have Holantc (F ) ≡T Holant∗ (F ). Proof.  By a Lemma 5.3 of [9], we can use a non-degenerate symmetric real valued binary function x y and two unary [0, 1], [1, 0] to interpolate all unary functions unless y = 0 or x + z = 0 (the y z conditions guarantee that the two eigenvalues have different nonzero norm, and [0, 1], [1, 0] are not two   a b eigenvectors). From the binary function , we can get two non-degenerate symmetric real valued c d  2    a + b2 ac + bd a2 + c2 ab + cd binary functions and . Since a2 + b2 + c2 + d2 6= 0, we are done ac + bd c2 + d2 ab + cd b2 + d2 unless ac + bd = 0 and ab + cd = 0. Since ab 6= 0, this implies that c = b, d = −a or c = −b, d = a, which are non-interpolatable. Lemma 5.5. Let f ∈ F be a real valued function of arity 3 such that each of six pinnings f xi =0 , f xi =1 (1 ≤ i ≤ 3) produces a non-interpolatable binary function. Then Holantc (F ) is #P-hard unless F is a tractable family for Holant∗ or #CSP (the latter condition certainly implies tractablility for #CSPc2 ). Proof. By definition, all four values of a non-interpolatable function are nonzero. Thinking in terms of the six faces of the cube {0, 1}3 , the three function values f (100), f (010), f (001) are either equal or negative of each other. If they are all equal, then the function is symmetric having the form [a, b, −a, −b] 30 with ab 6= 0, and we can get the unary function [a, b] by pinning. If they are not all equal, then without loss  of generality  we can assume that −f (100) = f (010) = f (001) and the function has the form a b b −a . By pinning, we can get the unary function [b, a]. Connecting this unary back to −b a a b x1 of the function f , we get the Disequality function: (0, a2 + b2 , a2 + b2 , 0) a nonzero multiple of (0, 1, 1, 0) since ab 6= 0 and the Disequality function back to x1 of the function  a, b ∈ R. Connecting  −b a a b f , we get the function . This is a symmetric function [−b, a, b, −a] with ab 6= 0, and a b b −a we can also get the unary [−b, a]. Connecting one unary [a, b] back to [a, b, −a, −b], or [−b, a] back to [−b, a, b, −a], we  get the  function 1 1 [1, 0, −1], again because a, b are nonzero real numbers we have a2 + b2 6= 0. Let Z = , we have i −i [a, b, −a, −b] = Z ⊗3 [c, 0, 0, d] for some nonzero c, d ∈ C, and [1, 0, −1]Z ⊗2 = 2[1, 0, 1]. So we have the following reduction: Holant(Z −1 F ∪ {[c, 0, 0, d], Z −1 ∆0 , Z −1 ∆1 }) ≡T Holant([1, 0, 1] | Z −1 F ∪ {[c, 0, 0, d], Z −1 ∆0 , Z −1 ∆1 }) ≡T Holant([1, 0, 1](Z −1 )⊗2 | F ∪ {Z ⊗3 [c, 0, 0, d], ∆0 , ∆1 }) ≡T Holant([1, 0, −1] | F ∪ {[a, b, −a, −b], ∆0 , ∆1 }) ≤T Holantc (F ). The reduction for [−b, a, b, −a] is the same. By Lemma 5.1, we know that Holant(F ) is #P-hard, α −1 −1 −1 unless H ⊆ A , H  where H = Z F ∪ {[c, 0, 0, d], Z ∆0 , Z ∆1 }. Notice  ⊆ A or H ⊆P, 1 1 −i 1 that Z −1 ∆0 = 21 = 21 , and the unary function [1, 1] 6∈ A α . We conclude that 0 1 i 1 Holant(F ) is #P-hard, unless H ⊆ A or H ⊆ P. Since Z is in the Stablizer group of A , we have ZA = A , and so the first condition translates to F ⊆ A , which is a tractable condition for #CSP(F ). The second condition translates to F ⊆ ZP. This implies that F is P-transformable, namely in Holant(=2 | F ) ≡T Holant((=2 )Z ⊗2 | Z −1 F ), both (=2 )Z ⊗2 = (6=2 ) ∈ P and Z −1 F ⊆ P. This is one of the tractable families for Holant∗ problems in Theorem 2.2. ∈ F be a non-decomposable real valued function of arity 3 with the form a c 0 with ab 6= 0. Then Holantc (F ) is #P-hard unless F is a tractable b d 0 #CSPc2 .   0 a c 0 Proof. By being non-decomposable, c and d cannot be both 0. For the form , we can get 0 b d 0 a generalized Disequality by pinning and then use this generalized Disequality to change f to the   a 0 0 c form . So, we only need to deal with this case. b 0 0 d  2  a bc We can get the unary function [a, b] by pinning. Connecting [a, b] to x2 of f we get , ab bd  2  a ab which also gives us by switching the two variables. Applying Lemma 5.4, we are done unless bc bd the binary function is non-interpolatable. If so, we know that 0. Similar, we can realized unary  cd 6=  ac cd function [c, d] by pinning. Connection [c, d] to x2 of f we get . We are done unless this binary bc d2 function is non-interpolatable. Lemma 5.6.   Letf a 0 0 c 0 or b 0 0 d 0 family for Holant∗ or 31 Now, we assume that both binary functions are non-interpolatable. From the first one, we get a2 = ±bd and ab = ∓bc. If a2 = −bd and ab = bc, then a = c. By being real, ac = a2 >  0, so from the  1 0 0 1 2 second one, ac = d and bc = −cd. So a = ±d and b = −d. This gives us the function 1 0 0 −1   1 0 0 1 or after scaling. If a2 = bd and ab = −bc, then a = −c. By being real, ac = −a2 < 0, −1 0 0 1 2 and bc = cd. So a = ±d and b = d. This gives us the function so  from the second  one, ac = −d  1 0 0 −1 1 0 0 −1 or after scaling. If we concentrate on the 2 × 2 nonzero submatrix, 1 0 0 1 −1 0 0 −1     1 1 1 0 the four matrices are obtained from by pre- or post- multiplying by the orthogonal , 1 −1 0 −1 √ and thus all are orthogonal up to a scalar 1/ 2. Therefore, by computing M T M for the 4 × 2 matrix M , we get the signature of the Equality function of arity 4, up to a scalar 2. This is realized by connecting the x1 variable of two copies of the function with matrix M . So we are done by Lemma 5.2. Lemma 5.7. Let f ∈ F be a non-decomposable function of arity 3. Suppose all six binary functions f xi =0 and f xi =1 (1 ≤ i ≤ 3) are either non-interpolatable or degenerate, and furthermore both types occur. Then Holantc (F ) is #P-hard unless either Holant∗ (F ) or CSPc2 (F ) is tractable in polynomial time. Proof. Recall that the signature matrix of a non-interpolatable binary function is a nonzero multiple of an orthogonal matrix with 4 nonzero entries. Suppose f xi = is non-interpolatable ( = 0, 1). On any face xj = 0, 1 for j 6= i there are at least two nonzero entries from f xi = , and hence if f xj =0 or f xj =1 has a zero entry it must be degenerate and have two zero entries. Then f xi =1− must be identically zero, a contradiction to f being non-decomposable. Hencef has no zero entries  among all eight values. So a b λa λb where λ 6= 0 , up to some bit we can assume that the function is of the form A = ±b ∓a x y flips. Since A is a real matrix of rank 2, the real symmetric matrix AAT has rank 2 and positive trace. If (a, b, λa, λb) is not orthogonal to (±b, ∓a, x, y), which is equivalent to λ(a, b) is not orthogonal to (x, y), then AAT has nonzero off diagonal, and we can interpolate all unary functions using AAT and a unary [1, 0]. So we may assume λ(a, b)is orthogonal to (x, y).  Since λ 6= 0, we have (a, b) is orthogonal a b λa λb to (x, y). Thus f has the form A = , (σ = ±1). Clearly µ 6= σλ, since f is σb −σa µb −µa non-decomposable.     a λa b λb By pinning we can get , and . By assumption both are either nonσb µb −σa −µa interpolatable or degenerate. By µ 6= σλ, both are non-degenerate. So both are non-interpolatable. Hence the columns are orthogonal, λa2 + σµb2 = 0 and λb2 + σµa2 = 0. (18) Now we consider the gadget with signature   a σb    b −σa a b λa λb T   A A= . λa µb  σb −σa µb −µa λb −µa  2  a + b2 0 0 (λ − σµ)ab We can pin to get its first two rows . Here we used (18). 0 a2 + b2 (λ − σµ)ab 0 32 Note that (λ − σµ)ab 6= 0. Hence this ternary function is non-decomposable. By Lemma 5.3 we are done. Now we are ready to prove the reduction from Holantc problems to Holant∗ or #CSPc2 . Theorem 5.1. Let F be a set of real valued functions. Then Holantc (F ) is #P-hard unless F is a tractable family for Holant∗ or #CSPc2 , for both we have explicit dichotomy theorems. Proof. By Lemma 2.1, we can assume that functions in F are non-decomposable. If every function in F has arity at most two, then Holantc (F ) is tractable. Now we assume that F contains a function f of arity at least 3. Since f is non-decomposable, there are at least two nonzero function values. Let D0 = min{d(x, y) | x 6= y, f (x) 6= 0, f (y) 6= 0}, the minimum Hamming distance between two inputs with nonzero values. • If D0 ≥ 3 and D0 is odd, we can get a generalized Equality of arity 3 by pinning and then by self loops, and so we are done by Lemma 5.1. • If D0 ≥ 4 and D0 is even, we can get a generalized Equality of arity 4, and so we are done by Lemma 5.2. • If D0 = 2, without loss of generality,  x3 x4 · · · xn such that the remaining binary  we can pin  0 a a 0 , where ab 6= 0. If it is the second form, it is a or function g(x1 , x2 ) is of the form b 0 0 b generalized Disequality and can be used to flip the input. So we can assume g(x1 , x2 ) has the first form. If for all other values of x3 x4 · · · xn , the remaining binary function is a scaling of the above one, then the function f is decomposable, a contradiction. Let A be the set of bit patterns for x3 x4 · · · xn for which the remaining binary function is a nonzero scaling of the above function, and let B be the set of bit patterns for which the remaining binary function is not a scaling of the above function. By definition of this binary function, A 6= ∅. By being non-decomposable, B 6= ∅. Clearly A ∩ B = ∅. Let D1 = min{d(x, y) | x ∈ A, y ∈ B}, be the minimum Hamming distance between the two sets. 1. If D1 = 1, by pinning we get a non-decomposable ternary function and it satisfies the parity condition. This is clear by looking at the cube {0, 1}3 , using the fact that D0 = 2, ab 6= 0 and the definition of B. So we are done by Lemma 5.3. 2. If D1 = 2, without loss of generality we may assume a pinning bit pattern for x5 . . . xn such that further pinning x3 x4 = b3 b4 gives us the function g(x1 , x2 ), and further pinning x3 x4 = b3 b4 gives us another binary function which is not a scaling of g. Because D1 = 2, the binary function obtained by further pinning x3 x4 = b3 b4 or x3 x4 = b3 b4 must  be identially  a 0 0 b  0 0 0 0  0. It follows that we have a function of arity 4 after pinning, of the form  0 0 0 0 or c 0 0 d 33  b 0  where the row index of x3 x4 is up to a bit flip, with c and d not both 0. It 0 0 verify that  this function  is non-decomposable by ab 6= 0 and the definition of B. a 0 0 b  0 0 0 0  For the latter case  0 0 0 0, we can pin x1 or x2 to get a generalized Equality of 0 c d 0 arity 3 since at least one of c and d  is nonzero. Then we are done by Lemma 5.1. For the  a b former case, by definition of B, det 6= 0. We take two copies of the function and c d connect the respective x3 and x4 together. This produces a symmetry function of the form   x 0 0 y  0 0 0 0    0 0 0 0, with x, z > 0. We can use it to realize or interpolate an Equality of arity y 0 0 z 4. So we are done by Lemma 5.2.  a 0 0 0  0 0 0 c is easy 0 0 0 d to 3. If D1 ≥ 3, we can get a generalized Equality of arity at least 3, and we are done by Lemma 5.1 or Lemma 5.2. • If D0 = 1, without loss of generality, we can assume that there is a pinning for x2 x3 x4 · · · xn such that the remaining unary function is [a, b] with ab 6= 0. If for all other values of x2 x3 x4 · · · xn , the remaining unary function is a scaling of the above one, then the function f is decomposable, a contradiction. Let A be the set of bit patterns for x2 x3 x4 · · · xn for which the remaining unary function is a nonzero scaling of [a, b], and B be the set of patterns for which the remaining unary function is not a scaling of [a, b]. By the above argument, both sets A and B are non-empty. Let D2 be the minimum Hamming distance between the two sets A and B. Again, 1. If D2 ≥ 3, we can get a generalized Equality of arity at least 3, and we are done by Lemma 5.1 or Lemma 5.2. 2. If D2 = 2, we have a non-decomposable ternary function taking the form in Lemma 5.6, and we are done by that lemma. 3. If D2 = 1, without loss of generality, we can assume that there is a pinning for x3 x4 · · · xn such   a b that the remaining binary function is of form where ab 6= 0 and ad 6= bc. We are done c d by Lemma 5.4 unless it is non-interpolatable. Now we assume that it is non-interpolatable. In particular, abcd 6= 0. If for all other values of x3 x4 · · · xn , the remaining binary function is a scaling of the above one, then the function f is decomposable, a contradiction. Let A be the set of bit patterns for x3 x4 · · · xn for which the remaining binary function is a nonzero scaling of the above function, and B be the set of bit patterns for which the remaining binary function is not a scaling of the above function. By the above argument, both sets A and B are non-empty. Let D3 be the minimum Hamming distance between the two sets A and B. Again, Case D3 ≥ 3: We can get a generalized Equality of arity at least 3, and we are done by Lemma 5.1 or Lemma 5.2. Case D3 = 2: We have a function with arity 4: for x3 = a3 , x4 = a4 , we have a noninterpolatable binary function; for x3 = 1 − a3 , x4 = 1 − a4 , we have a binary function 34 which is not a scaling of the above one; for the other two values of x3 , x4 , the function is entirely zero.  Up to a flip on  the row index bits x3 and x4 , we have the function of arity a b c d 0 0 0 0 0 0 0 0  4 of the form   0 0 0 0 , where abcd 6= 0, and (a , b , c , d ) is linearly independent a0 b0 c0 d0 of (a, b, c, d). If a0 /a 6= b0 /b, or c0 /c 6= d0 /d, or a0 /a 6= c0 /c, then we have at least one pinning of x1 or x2 such that the resulting ternary function is non-decomposable. By linear independence, one of these must hold, and the resulting ternary function is non-decomposable. That function is of a form of Lemma 5.6 and we are done by that lemma. Case D3 = 1: We  get a non-decomposable ternary function. We know that at least one of a b the six faces is non-interpolatable. This implies that the four adjacent faces have c d at least two nonzero entries (from {a, b, c, d}) that are of Hamming distance 1. If any one of these 4 faces is non-degenerate  not non-interpolatable, then we are done by  and a b is non-degenerate and not non-interpolatable, Lemma 5.4. If the opposite face of c d we are also done by Lemma 5.4, unless it has no two adjacent nonzero entries. But if so, being non-degenerate, it must have exactly two nonzeros at bit positions of same parity, and two other zero entries at bit  positions  of the oppostite parity. Then in particular a b has exactly one 0 entry and thus both nonany of the four adjacent faces of c d degenerate and not non-interpolatable. Thus we conclude that if any one of six faces is non-degenerate and not non-interpolatable, then we are done by Lemma 5.4. Now, suppose each of its six faces is either degenerate or non-interpolatable. We already know that at least one of them is non-interpolatable. If all of them are non-interpolatable, we are done by Lemma 5.5. Otherwise, we are done by Lemma 5.7. This completes the proof of Theorem 5.1. Acknowledgments We sincerely thank Zhiguo Fu for his very insightful comments, in particular his gave the key insight to a simplified proof of Lemma 5.7. References [1] Andrei A. Bulatov. The complexity of the counting constraint satisfaction problem. Journal of the ACM, 60(5):34, 2013. [2] Jin-Yi Cai and Xi Chen. Complexity of counting CSP with complex weights. In Proceedings of the 44th Symposium on Theory of Computing Conference, STOC 2012, New York, NY, USA, May 19 - 22, 2012, pages 909–920, 2012. [3] Jin-Yi Cai, Xi Chen, and Pinyan Lu. Non-negatively weighted #CSP: an effective complexity dichotomy. In Proceedings of the 2011 IEEE 26th Annual Conference on Computational Complexity, CCC ’11, pages 45–54, Washington, DC, USA, 2011. IEEE Computer Society. 35 [4] Jin-Yi Cai and Zhiguo Fu. Holographic algorithm with matchgates is universal for planar #CSP over Boolean domain. CoRR, abs/1603.07046, 2016. [5] Jin-Yi Cai, Heng Guo, and Tyson Williams. A complete dichotomy rises from the capture of vanishing signatures. In Proceedings of the Forty-fifth Annual ACM Symposium on Theory of Computing, STOC ’13, pages 635–644, New York, NY, USA, 2013. ACM. [6] Jin-Yi Cai, Sangxia Huang, and Pinyan Lu. From Holant to #CSP and back: dichotomy for Holantc problems. Algorithmica, 64(3):511–533, 2012. [7] Jin-Yi Cai, Pinyan Lu, and Mingji Xia. Holographic algorithms by Fibonacci gates and holographic reductions for hardness. In 49th Annual IEEE Symposium on Foundations of Computer Science, FOCS 2008, October 25-28, 2008, Philadelphia, PA, USA, pages 644–653, 2008. [8] Jin-Yi Cai, Pinyan Lu, and Mingji Xia. Holant problems and counting CSP. In Proceedings of the 41st Annual ACM Symposium on Theory of Computing, STOC 2009, Bethesda, MD, USA, May 31 - June 2, 2009, pages 715–724, 2009. [9] Jin-yi Cai, Pinyan Lu, and Mingji Xia. Computational complexity of holant problems. SIAM J. Comput., 40(4):1101–1132, 2011. [10] Jin-Yi Cai, Pinyan Lu, and Mingji Xia. Dichotomy for Holant* problems of Boolean domain. In Proceedings of the Twenty-Second Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2011, San Francisco, California, USA, January 23-25, 2011, pages 1714–1728, 2011. [11] Jin-Yi Cai, Pinyan Lu, and Mingji Xia. The complexity of complex weighted boolean #CSP. J. Comput. Syst. Sci., 80(1):217–236, 2014. [12] Nadia Creignou and Miki Hermann. Complexity of generalized satisfiability counting problems. Inf. Comput., 125(1):1–12, 1996. [13] Martin E. Dyer, Leslie Ann Goldberg, and Mark Jerrum. The complexity of weighted Boolean #CSP. SIAM J. Comput., 38(5):1970–1986, 2009. [14] Martin E. Dyer and David Richerby. On the complexity of #CSP. In Proceedings of the 42nd ACM Symposium on Theory of Computing, STOC 2010, Cambridge, Massachusetts, USA, 5-8 June 2010, pages 725–734, 2010. [15] Martin E. Dyer and David Richerby. The #CSP dichotomy is decidable. In 28th International Symposium on Theoretical Aspects of Computer Science, STACS 2011, March 10-12, 2011, Dortmund, Germany, pages 261–272. Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik, 2011. [16] M. Freedman, L. Lovász, and A. Schrijver. Reflection positivity, rank connectivity, and homomorphism of graphs. J. AMS, 20:37–51, 2007. [17] Heng Guo, Pinyan Lu, and Leslie G. Valiant. The complexity of symmetric Boolean parity Holant problems. SIAM J. Comput., 42(1):324–356, 2013. [18] Sangxia Huang and Pinyan Lu. A dichotomy for real weighted Holant problems. Computational Complexity, 25(1):255–304, 2016. [19] Leslie G. Valiant. Accidental algorthims. In 47th Annual IEEE Symposium on Foundations of Computer Science (FOCS 2006), 21-24 October 2006, Berkeley, California, USA, Proceedings, pages 509–517, 2006. 36 [20] Leslie G. Valiant. Holographic algorithms. SIAM J. Comput., 37(5):1565–1594, 2008. 37
8cs.DS
Combinatorial Algorithm for Restricted Max-Min Fair Allocation arXiv:1409.0607v2 [cs.DS] 23 Nov 2016 Chidambaram Annamalai∗, Christos Kalaitzis†, Ola Svensson‡ November 24, 2016 Abstract We study the basic allocation problem of assigning resources to players so as to maximize fairness. This is one of the few natural problems that enjoys the intriguing status of having a better estimation algorithm than approximation algorithm. Indeed, a certain Configuration-LP can be used to estimate the value of the optimal allocation to within a factor of 4 + ε. In contrast, however, the best known approximation algorithm for the problem has an unspecified large constant guarantee. In this paper we significantly narrow this gap by giving a 13-approximation algorithm for the problem. Our approach develops a local search technique introduced by Haxell [Hax95] for hypergraph matchings, and later used in this context by Asadpour, Feige, and Saberi [AFS12]. For our local search procedure to terminate in polynomial time, we introduce several new ideas such as lazy updates and greedy players. Besides the improved approximation guarantee, the highlight of our approach is that it is purely combinatorial and uses the Configuration-LP only in the analysis. Keywords: approximation algorithms, fair allocation, efficient local search Department of Computer Science, ETH Zurich. Email: [email protected]. Work performed while the author was at the School of Basic Sciences, EPFL. † School of Computer and Communication Sciences, EPFL. Email: [email protected]. Supported by ERC Starting Grant 335288-OptApprox. ‡ School of Computer and Communication Sciences, EPFL. Email: [email protected]. Supported by ERC Starting Grant 335288-OptApprox. ∗ 1 Introduction We consider the Max-Min Fair Allocation problem, a basic combinatorial optimization problem, that captures the dilemma of how to allocate resources to players in a fair manner. A problem instance is defined by a set R of indivisible resources, a set P of players, and a set of nonnegative values {vij }i∈P, j∈R where each player i has a value vij for a resource j. An allocation is simply a partition {Ri }i∈P of the resource set and the valuation function vi : 2R 7→ R for any player i is P additive, i.e., vi (Ri ) = j∈Ri vij . Perhaps the most natural fairness criterion in this setting is the maxmin objective which tries to find an allocation that maximizes the minimum value of resources received by any player in the allocation. Thus, the goal in this problem is to find an allocation {Ri }i∈P that maximizes X vij . min i∈P j∈Ri This problem has also been given the name Santa Claus problem as interpreting the players as kids and the resources as presents leads to Santa’s annual allocation problem of making the least happy kid as happy as possible. A closely related problem is the classic scheduling problem of Scheduling on Unrelated Parallel Machines to Minimize Makespan. That problem has the same input as above and the only difference is the objective function: instead of maximizing the minimum we wish to minimize the maximum. In the scheduling context, this corresponds to minimizing the time at which all jobs (resources) are completed by the machines (players) they were scheduled on. In a seminal paper, Lenstra, Shmoys, and Tardos [LST90] showed that the scheduling problem admits a 2approximation algorithm by rounding a certain linear programming relaxation often referred to as the Assignment-LP. Their approximation algorithm in fact has the often stronger guarantee that the returned solution has value at most OPT +vmax , where vmax := maxi∈P, j∈R vij is the maximum value of a job (resource). From the similarity between the two problems, it is natural to expect that the techniques developed for the scheduling problem are also applicable in this context. What is perhaps surprising is that the guarantees have not carried over so far, contrary to expectation. While a rounding of the Assignment-LP has been shown [BD05] to provide an allocation of value at least OPT −vmax , this guarantee deteriorates with increasing vmax . Since in hard instances of the problem (when vmax ≈ OPT) there can be players who are assigned only one resource in an optimal allocation, this result provides no guarantee in general. The lack of guarantee is in fact intrinsic to the AssignmentLP for Max-Min Fair Allocation as the relaxation is quite weak. It has an unbounded integrality gap i.e., the optimal value of the linear program can be a polynomial factor larger than the optimal value of an integral solution. To overcome the limitations of the Assignment-LP, Bansal and Sviridenko [BS06] proposed to use a stronger relaxation, called Configuration-LP, for Max-Min Fair Allocation. Their paper contains several results on the strength of the Configuration-LP, one negative and many positive. The negative result says that even the stronger Configuration-LP has an integrality gap that grows √ as Ω( |P|). Their positive results apply for the interesting case when vij ∈ {0, v j }, called Restricted Max-Min Fair Allocation. For this case they give an O(log log |P|/ log log log |P|)-approximation algorithm, a substantial improvement over the integrality gap of the Assignment-LP. Notice that the restricted version has the following natural interpretation: each resource j has a fixed value v j but it is interesting only for some subset of the players. Bansal and Sviridenko further showed that the solution to a certain combinatorial problem on set systems would imply a constant integrality gap. This was later settled positively by 1 Feige [Fei08a] using a proof technique that repeatedly used the Lovász Local Lemma. At the time of Feige’s result, however, it was not known if his arguments were constructive, i.e., if it led to a polynomial time algorithm for finding a solution with the same guarantee. This was later shown to be the case by Haeupler et al. [HSS11], who constructivized the various applications of the Lovász Local Lemma in the paper by Feige [Fei08a]. This led to the first constant factor approximation algorithm for Restricted Max-Min Fair Allocation, albeit with a large and unspecified constant. This approach also requires the solution of the exponentially large Configuration-LP obtained by using the ellipsoid algorithm. A different viewpoint and rounding approach for the problem was initiated by Asadpour, Feige, and Saberi [AFS12]. This approach uses the perspective of hypergraph matchings where one can naturally interpret the problem as a bipartite hypergraph matching problem with bipartitions P and R. Indeed, in a solution of value τ, each player i is matched to a subset Ri of resources of total value at least τ which corresponds to a hyperedge (i, Ri ). Previously, Haxell [Hax95] provided sufficient conditions for bipartite hypergraphs to admit a perfect matching, generalizing the well known graph analog, viz., Hall’s theorem. Her proof is algorithmic in the sense that when the sufficient conditions hold, then a perfect matching can be found using a local search procedure that will terminate after at most exponentially many iterations. Haxell’s techniques were successfully adapted by Asadpour et al. [AFS12] to the Restricted Max-Min Fair Allocation problem to obtain a beautiful proof showing that the Configuration-LP has an integrality gap of at most 4. As the Configuration-LP can be solved to any desired accuracy in polynomial time, this gives a polynomial time algorithm to estimate the value of an optimal allocation up to a factor of 4 + ε, for any ε > 0. Tantalizingly, however, the techniques of [AFS12] do not yield an efficient algorithm for finding an allocation with the same guarantee. The above results lend the Restricted Max-Min Fair Allocation problem an intriguing status that few other natural problems enjoy (see [Fei08b] for a comprehensive discussion on the difference between estimation and approximation algorithms). Another problem with a similar status is the restricted version of the aforementioned scheduling problem. The techniques in [AFS12] inspired the last author to show [Sve12] that the Configuration-LP estimates the optimal value within a factor 33/17 + ε improving on the factor of 2 by Lenstra et al. [LST90]. Again, the algorithm in [Sve12] is not known to terminate in polynomial time. We believe that this situation illustrates the need for new tools that improve our understanding of the Configuration-LP especially in the context of basic allocation problems in combinatorial optimization. Our results. Our main result improves the√approximation guarantee for the Restricted Max-Min Fair Allocation problem. Note that 6 + 2 10 ≈ 12.3. √ Theorem 1.1. For every ε > 0, there exists a combinatorial (6 + 2 10 + ε)-approximation algorithm for 2 the Restricted Max-Min Fair Allocation problem that runs in time nO(1/ε log(1/ε)) where n is the size of the instance. Our algorithm has the advantage of being completely combinatorial. It does not solve the exponentially large Configuration-LP. Instead, we use it only in the analysis to compare the value of the allocation returned by our algorithm against the optimum. As our hidden constants are small, we believe that our algorithm is more attractive than solving the Configuration-LP for a moderate ε. Our approach is based on the local search procedure introduced in this context by Asadpour et al. [AFS12], who in turn were inspired by the work of Haxell [Hax95]. Asadpour et al. raised the natural question if local search procedures based on alternating trees can be made to run in polynomial time. Prior to this work, the best running time guarantee was a quasi-polynomial 2 time alternating tree algorithm by Poláček and Svensson [PS12]. The main idea in that paper was to show that the local search can be restricted to alternating paths of length O(log n) (according to a carefully chosen length function), where n is the number of players and resources. This restricts the search space of the local search giving the running time of nO(log n) . To further reduce the search space seems highly non-trivial and it is not where our improvement comes from. Rather, in contrast to the previous local search algorithms, we do not update the partial matching as soon as an alternating path is found. Instead, we wait until we are guaranteed a significant number of alternating paths, which then intuitively guarantees large progress. We refer to this concept as lazy updates. At the same time, we ensure that our alternating paths are short by introducing greedy players into our alternating tree: a player may claim more resources than she needs in an approximate solution. To best illustrate these ideas we have chosen to first present a simpler algorithm in Section 3. The result of that section still gives an improved approximation guarantee and a polynomial time local search algorithm. However, it is not combinatorial as it relies on a preprocessing step which in turn uses the solution of the Configuration-LP. Our combinatorial algorithm is then presented in Section 4. The virtue of explaining the simpler algorithm first is that it allows us to postpone some of the complexities of the combinatorial algorithm until later, while still demonstrating the key ideas mentioned above. Further  √ related work. As mentioned before, the Configuration-LP has an integrality gap of Ω |P| for the general Max-Min Fair Allocation problem. Asadpour and Saberi [AS07] almost √ matched this bound by giving apO( |P| log3 (|P|))-approximation algorithm; later improved by Saha and Srinivisan [SS10] to O( |P| log |P|/ log log |P|). The current best approximation is O(nε ) due to Bateni et al. [BCG09] and Chakraborty et al. [CCK09]; for any ε > 0 their algorithms run in time O(n1/ε ). This leaves a large gap in the approximation guarantee for the general version of the problem as the only known hardness result says that it is NP-hard to approximate the problem to within a factor less than 2 [BD05]. The same hardness also holds for the restricted version. 2 The Configuration-LP Recall that a solution to the Max-Min Fair Allocation problem of value τ is a partition {Ri }i∈P of the set of resources so that each player receives a set of value at least τ, i.e., vi (Ri ) > τ for i ∈ P. Let C(i, τ) = {C ⊆ R : vi (C) > τ} be the set of configurations that player i can be allocated in a solution of value τ. The Configuration-LP has a decision variable xiC for each player i ∈ P and each C ∈ C(i, τ). The intuition is that the variable xiC takes value 1 if and only if she is assigned the bundle C. The Configuration-LP is now a feasibility linear program with two sets of constraints: the first set says that each player should receive (at least) one configuration and the second set says that each item should be assigned to at most one player. The formal definition is given in the left box of Figure 1. It is easy to see that if CLP(τ0 ) is feasible, then so is CLP(τ) for all τ 6 τ0 . We say that the value of the Configuration-LP is τOPT if it is the largest value such that the above program is feasible. Since every feasible allocation is a feasible solution of the Configuration-LP, τOPT is an upper bound on the value of the optimal allocation and therefore CLP(τ) constitues a valid relaxation. We note that the LP has exponentially many variables; however, it is known that one can approximately solve it to any desired accuracy by designing a polynomial time (approximate) separation algorithm for the dual [BS06]. For our combinatorial algorithm, the dual shall play an important role in our analysis. By associating the sets of variables {yi }i∈P and {z j } j∈R to the 3 X xiC > 1, C∈C(i,τ) X xiC 6 1, i,C: j∈C,C∈C(i,τ) max ∀ i ∈ P, X i∈P ∀ j ∈ R, yi 6 yi − X j∈C x > 0. z j, X zj j∈R ∀i ∈ P, ∀C ∈ C(i, τ), y, z > 0. Figure 1: The Configuration-LP for a guessed optimal value τ on the left and its dual on the right. constraints in the primal corresponding to players and resources respectively, and letting the primal have the objective function of minimizing the zero function, we obtain the dual of CLP(τ) shown in the right box of Figure 1. 3 Polynomial time algorithm To illustrate our key ideas we first describe a simpler algorithm that works on clustered instances. This setting, while equivalent to the general problem up to constant factors, allows for a simpler exposition of our key ideas. Specifically, we will prove the following theorem in this section. Theorem 3.1. There is a polynomial time 36-approximation for restricted max-min fair allocation. We note, however, that producing such clustered instances requires solving the ConfigurationLP. To avoid solving it, and get a purely combinatorial algorithm, we will show how to bypass the clustering step in Section 4. Before describing our algorithm formally, we begin by giving an informal overview of how it works, while pointing out the key ideas behind it. 3.1 Intuitive Algorithm Description and Main Ideas Our first step towards recovering an approximate solution to an instance of restricted max-min fair allocation, is guessing the value of the Configuration-LP τOPT by performing a binary search over the range of its possible values. For a particular guess τ, assuming that CLP(τ) is feasible, our goal now is to approximately satisfy each player. That is, we will allocate for each player a disjoint collection of resources, whose value for that player is at least τ/36. Towards this end, we design a local search procedure, that we will apply iteratively in order to find such a 36-approximate allocation. The input to this procedure will be a partial allocation that satisfies some (possibly empty) subset of the players, and an unsatisfied player. Then, our local search procedure will extend the allocation in order to satisfy the input player as well; hence, applying this procedure iteratively will satisfy all the players. We now illustrate some key aspects of this local search procedure through an example that appears in Figure 2; for simplicity, in this example we consider only resources of value less than τ/36. Given a partial allocation of resources to a subset of the players, we wish to extend this to satisfy an additional player p. If there are free resources (i.e., not already appearing in our partial allocation) of total value τ/36 for p, then we just satisfy p by assigning those resources to her. 4 Otherwise, we find a set of resources whose value for p is at least 2τ/5; these resources constitute a bundle (or, as we will refer to it later on, an edge) ep we would wish to include in our partial allocation in order to satisfy p. However, we cannot include this edge right away because there already exist edges in our partial allocation that share resources with ep ; in other words, such edges are blocking the inclusion of ep into our partial allocation. In Figure 2(a), ep is the gray edge, and its blocking edges are the white ones. At this point, we should make note of the fact that the size of ep is considerably larger than our goal of τ/36; this is by design and due to our greedy strategy. By considering edges whose size exceeds our goal, we are able to increase the rate at which blocking edges are inserted into our local search; indeed, in Figure 2(a), a single greedily-constructed edge (ep ) introduced 3 blocking edges. Ultimately, this will allow us to bound the running time of our local search. Now, since our goal is to include ep in our partial allocation, we are required to free up some of ep ’s resources by finding an alternative way of satisfying the players included in ep ’s blocking edges. The steps we take towards this end appear in Figure 2(b): for each player in ep ’s blocking edges, we find a new edge that we would wish to include into our partial allocation. But these new gray edges might also be blocked by existing edges in our partial allocation. Therefore this step introduces a second layer of edges comprising a set of edges we would like to include in our allocation, and their corresponding blocking edges; these layers are separated by dashed lines in the example. Next, we observe that 2 of the 3 gray edges in the second layer actually have a lot of resources that do not appear in any blocking edge. In this case, as one can see in Figure 2(c), we select a subset of free resources from each edge of size at least τ/36 (drawn with dashed lines), and swap these edges for the existing white edges in our partial allocation. We call this operation a collapse of the first layer, only to be left with ep and a single blocking edge in the first layer. The way we decide when to collapse a layer, is dictated by our strategy of lazy updates: similar to Figure 2(c), we will only collapse a layer if that would mean that a large fraction of its blocking edges will be removed. Finally, in Figure 2(d), a significant amount of resources of ep has now been freed up. Then, we choose a subset of these resources (again, drawn with a dashed line), and allocate them to p. At this point, we have satisfied p, and managed to extend our partial allocation to satisfy one more player. We proceed by formally defining and analyzing the local search algorithm we sketched above. 3.2 Parameters Let τ > 0 be a guess on the value of the Configuration-LP. Our algorithm will use the following setting of parameters: β := 36, α := 5/2, (3.1) µ := 1/500. Here, β is the approximation guarantee, α determines the “greediness” of the edges introduced into the layers, and µ determines the “laziness” of the updates of our algorithm. As our goal is to expose the main ideas, we have not optimized the constants in this section. We shall show that whenever CLP(τ) is feasible, our algorithm will terminate with a solution of value at least τ/β for the given instance of restricted max-min fair allocation. Combining this with a standard binary search then yields a β-approximation algorithm. 5 p p (a) (b) p p (c) (d) Figure 2: An example execution of our local search algorithm. In this figure, boxes correspond to players, and circles correspond to resources. 3.3 Thin and fat edges, and matchings We partition the resource set R into R f := {i ∈ R : vi > τ/β} and Rt := {i ∈ R | vi < τ/β}, fat and thin resources respectively. Note that in a β-approximate solution, a player is satisfied if she is assigned a single fat resource whereas she needs several thin resources. We will call a pair (p, R), for any P p ∈ P and R ⊆ R such that vp (R) = v(R) where v(R) = j∈R v j , an edge. Notice that this definition implies that every resource in R is a resource that player p is interested in. We now define thin and fat edges. Definition 3.2 (Thin and fat edges). We will call an edge (p, R), where p ∈ P and R ⊆ R, fat, if {j} = R ⊆ R f contains a single fat resource that p is interested in; this already implies that vp (R) > τ/β. On the other hand, we will call an edge (p, R), where p ∈ P and R ⊆ R, thin, if R ⊆ Rt is a set of thin resources that p is interested in. Finally, for any δ > 1, we will call an edge (p, R), where p ∈ P and R ⊆ R, a δ-edge, if R is a minimal set (by inclusion) of resources of value at least τ/δ for p, i.e., vp (R) > τ/δ. Remark 3.3. A thin δ-edge has value at most τ/δ + τ/β due to the minimality of the edge. As we have already mentioned, the goal of our local search algorithm is to iteratively extend a partial matching: 6 Definition 3.4 (Matchings). A set M of β-edges is called a matching if each player appears in at most one edge and the set of resources used by the edges in M are pairwise disjoint. We say that M matches a player p ∈ P if there exists an edge in M that contains p. Moreover, it is called a perfect matching if each player is matched by M, and otherwise it is called a partial matching. Using the above terminology, our goal is to find a perfect matching yielding our desired allocation of value τ/β. Our approach will be to show that as long as the matching M does not match all players in P we can extend it to obtain a matching that matches one more player. This ensures that starting with an empty partial matching and repeating this procedure |P| times we will obtain an allocation of value at least τ/β. Thus, it suffices to develop such an algorithm. This is precisely what our algorithm will do. We first state a preprocessing step in Section 3.4 before describing the algorithm in Section 3.5. 3.4 Clustering step This preprocessing phase produces the clustered instances referred to earlier. The clustering step that we use is the following reduction due to Bansal and Sviridenko. Theorem 3.5 (Clustering Step [BS06]). Assuming that CLP(τ) is feasible, we can partition the set of players P into m clusters N1 , . . . , Nm in polynomial time such that 1. Each cluster Nk is associated with a distinct subset of |Nk | − 1 fat items from R f such that they can be assigned to any subset of |Nk | − 1 players in Nk , and P P 2. there is a feasible solution x to CLP(τ) such that i∈Nk C∈Ct (i,τ) xiC = 1/2 for each cluster Nk , where Ct (i, τ) denotes the set of configurations for player i comprising only thin items. Note that the player that is not assigned a fat item can be chosen arbitrarily and independently for each cluster in the above theorem. Therefore, after this reduction, it suffices to allocate a thin β-edge for one player in each cluster to obtain a β-approximate solution for the original instance. Indeed, Theorem 3.5 guarantees that we can assign fat edges for the remaining players. For the rest of the section we assume that our instance has been grouped into clusters N1 , . . . , Nm by an application of Theorem 3.5. The second property of these clusters is that each cluster is fractionally assigned 1/2 LP-value of thin configurations. We will use this to prove the key lemma in this section, Lemma 3.6. We now focus only on allocating one thin β-edge per cluster and forget about fat items completely. This makes the algorithm in Section 3.5 simpler than our final combinatorial algorithm, where we also need to handle the assignment of fat items to players. 3.5 Description of the algorithm Notation: Recall that it suffices to match exactly one player from each cluster with a thin β-edge. With this in mind, we say that a cluster Nk is matched by M ifSthere exists some player p ∈ Nk such that p is matched by M. For a set S of edges, we let R(S) = (p,R)∈S R denote the union of the S resources of these edges and we let P(S) = (p,R)∈S {p} denote the union of players of these edges. To ease notation, we abbreviate P(Bt ) by Pt in the description of the algorithm and its analysis. Finally, for any family of sets S0 , S1 , . . . , Sℓ we denote S0 ∪ S1 ∪ · · · ∪ St by S6t . The input to Algorithm 1 is a partial matching M that matches at most one player from each cluster N1 , . . . , Nm , and a cluster N0 that is not matched by M; our goal is to extend our partial matching by matching N0 . 7 Input: A partial matching M and an unmatched cluster N0 . Output: A matching M′ that matches all clusters matched by M and also matches N0 . 1. (Initialization) Select an arbitrary player p0 ∈ N0 and let A0 = ∅, B0 = {(p0 , ∅)}, ℓ = 0, L = (A0 , B0 ). (Iterative step) Repeat the following until N0 is matched by M: 2. (Build phase) Initialize Aℓ+1 = ∅; then for each cluster Nk with a player in Pℓ do: – If there is a thin α-edge (p, R) with p ∈ Nk and R ∩ R(A6ℓ+1 ∪ B6ℓ ) = ∅ then Aℓ+1 = Aℓ+1 ∪ {(p, R)}. At the end of the build phase, let first Bℓ+1 be the edges of M that are blocking the edges in Aℓ+1 . Then update the state of the algorithm by appending (Aℓ+1 , Bℓ+1) to L and by incrementing ℓ by one. 3. (Collapse phase) While ∃t : It+1 = {(p, R) ∈ At+1 : vp (R \ R(Bt+1 )) > τ/β} has cardinality > µ|Pt |: – Choose the smallest such t. //We refer to the following steps as collapsing layer t. – For each cluster Nk with players q, p satisfying q ∈ Pt and (p, R) ∈ It+1 : – Let (q, Rq ) ∈ Bt ∩ M be the edge containing q. – Replace (q, Rq ) in M with edge (p, R′ ), where R′ is a τ/β-minimal subset of R \ R(Bt+1 ), i.e., update M ← M \ {(q, Rq )} ∪ {(p, R′ )}. – Finally, remove (q, Rq ) from Bt . – Discard (Ai , Bi ) from L for all i > t and set ℓ = t. Output the matching M that also matches N0 . Algorithm 1: Polynomial Time Algorithm for Clustered Instances The state of the algorithm is described by a (dynamic) tuple (M, ℓ, L), where M is the current partial matching and L = ((A0 , B0 ), (A1 , B1 ), · · · , (Aℓ , Bℓ )) is a list of pairs of sets of “added” and “blocking” edges that is of length/depth ℓ. We shall refer to (Ai , Bi ) as the i’th layer1 . Invariants. The description of our algorithm appears as Algorithm 1. The algorithm is designed to (apart from extending the matching) maintain the following invariants at the start of each iterative step: for i = 1, . . . , ℓ, 1. Ai is a set of thin α-edges that are pairwise disjoint, i.e., for two different edges (p, R) , (p′ , R′ ) ∈ Ai we have p , p′ and R ∩ R′ = ∅. In addition, each α-edge (p, R) ∈ Ai has R ∩ R(A6i ∪ B6i−1 \ {(p, R)}) = ∅ (its resources are not shared with edges from earlier iterations or edges in Ai ). 2. Bi = {(p, R) ∈ M : (p, R) is blocking an edge in Ai } contains those edges of M that blocks edges in Ai , where we say that an edge (p, R) ∈ M blocks an edge (p′ , R′ ) if R ∩ R′ , ∅. 3. The players of the edges in Ai belong to different clusters and any cluster Nk with a player p ∈ Nk that appears in an edge in Ai has a player q ∈ Nk (that may equal p) that appears in an edge in Bi−1 . 1 The edges of the algorithm naturally form layers as described in Section 3.1 and as depicted in Figure 2. The edges in Ai are added so as to try to “replace” edges in Bi−1 in the matching M. Bi are then the edges of M that are blocking the edges in Ai . 8 4. |Ii | < µ|Pi−1 | where, as in Step 3 of Algorithm 1, Ii = {(p, R) ∈ Ai : vp (R \ R(Bi )) > τ/β} is defined to be those edges that have sufficient amount of unblocked resources so as to be added to the matching. In what follows, we further explain the steps of the algorithm and why the invariants are satisfied. It will then also be clear that the algorithm outputs an extended matching whenever it terminates. We then analyze its running time in the next section. First the algorithm initializes by selecting an arbitrary player p0 in the cluster N0 that we wish to match. Then each iteration proceeds in two steps. In the build phase, the algorithm adds thin α-edges (at most one for each cluster with a player in Pℓ ) to Aℓ+1 . Notice that the resources of these edges are disjoint from R(A6ℓ ∪ B6ℓ ) and from each other. We therefore maintain the first invariant. At the end of the build phase, we define Bℓ+1 to satisfy the second invariant. The third invariant is also satisfied since we only iterate through the clusters with a player in Pℓ and add at most one edge to Aℓ+1 for each such cluster. So after the build phase, the first three invariants are satisfied. The collapse phase will ensure the fourth invariant while not introducing any violations of the first three. Indeed, the while-loop runs until the fourth invariant is satisfied so we only need to worry about the first three still being satisfied. The first and third invariants remain satisfied because any set Ai that was affected in the collapse phase is discarded from the algorithm and if Bi was changed then Ai+1 was also discarded. For the second invariant, note that after updating the matching M, we remove the edge that was removed from the matching from Bt . Hence, Bt still only contains edges of the new matching that blocks edges in At . Moreover, by the first invariant, the newly introduced edge in the matching does not share any resources with edges in A6t ∪ B6t . Hence, the second invariant also remains true. Finally, we note that M remains a matching during the update procedure that matches all clusters that were initially matched. Indeed, when (q, Rq ) is removed an edge (p, R′ ) is added to the matching with p being from the same cluster as q (or the algorithm terminates by having successfully matched a player in N0 ). The added edge is a β-edge and its resources are disjoint from all edges in M since (1) R′ is a subset of R \ R(Bt+1 ), (2) Bt+1 contains all blocking edges of At+1 with respect to the matching before the collapse phase, and (3) the edges in At+1 are disjoint so (p, R′ ) is disjoint from any other edges added to the matching in the same collapse phase. We thus maintain a valid matching, in which all edges are pairwise disjoint, and the output is an extended matching that also matches the cluster N0 . 3.6 Analysis of the algorithm We now proceed to show that the algorithm in Section 3.5 terminates in polynomial time, which then implies Theorem 3.1. Recall that α is the parameter that regulates the “greediness” of the players while β is the approximation guarantee, and µ dictates when we collapse a layer. The key lemma that we prove in this section is that in each layer (Ai+1 , Bi+1 ), the number of edges in Ai+1 is large compared to the number of blocking edges (or, similarly, the number of players) of lower layers. Lemma 3.6. Assuming that CLP(τ) is feasible, at the beginning of each iterative step, |Ai+1 | > |P6i |/5 for each i = 0, . . . , ℓ − 1. We defer the proof of this statement for now and explain its consequences. As thin items are of value less than τ/β = τ/36, and each edge in A6ℓ is a thin α-edge of value at least τ/α = 2τ/5, this implies that Bi must be quite large, using |Ii | < µ|Pi−1 | from the fourth invariant. This means that the number of blocking edges will grow quickly as we prove in the next lemma. 9 Lemma 3.7 (Exponential growth). Assuming that CLP(τ) is feasible, at the beginning of the iterative step |Pi+1 | > 13|P6i |/10 for i = 0, . . . , ℓ − 1. Proof. Fix an i such that 0 6 i < ℓ. By the fourth invariant, |Ii+1 | < µ|Pi | at the beginning of the iterative step. This means that there are at least |Ai+1 | − µ|Pi | many edges in Ai+1 which are not in Ii+1 . As each edge in Ai+1 \ Ii+1 has resources of value at least τ/α − τ/β that are blocked (i.e., contained in R(Bi+1 )), we can lower bound the total value of blocked resources appearing in Ai+1 by !  τ τ − |Ai+1 | − µ|Pi | . α β Further, since each edge in Bi+1 is of value at most 2τ/β by minimality, the total value of such resources is upper bounded by |Pi+1 | · 2τ/β. In total, ! (β − α)(1/5 − µ)  2τ τ τ |Ai+1 | − µ|Pi | 6 |Pi+1 | − =⇒ |Pi+1 | > |P6i | > 13|P6i |/10, α β β 2α where we have used Lemma 3.6 to bound |Ai+1 | by |P6i |/5 from below.  Since the number of blocking edges grows exponentially as a function of the layer index, an immediate consequence of Lemma 3.7 is that the total number of layers in the list L at any step in the algorithm is at most O(log |P|). This means that we have to satisfy the condition in the while-loop of the collapse phase after at most logarithmically many iterative steps. When this happens, Algorithm 1 selects the smallest t satisfying the condition and then proceeds to update At+1 and Bt . Note that, by the condition of the while-loop, and since each edge in It+1 will be updated in the for-loop (using the third invariant), a constant fraction (at least µ as defined in (3.1)) of the edges in Bt are removed. We refer to these steps of the algorithm as the collapse of layer t. Furthermore, due to the algorithm’s first invariant, we know that the edges that compose It+1 are pairwise disjoint; therefore, we are able to insert all of them simultaneously into our matching, which means that the size of our matching does not decrease during the collapse operation. On the contrary, if p0 is part of the edges that are inserted into M, then we have actually achieved to extend our matching M. Intuitively we make large progress whenever we update M during the collapse of a layer. We prove this by maintaining a signature vector s := (s0 , . . . , sℓ , ∞) during the execution of the algorithm, where si := ⌊log1/(1−µ) |Pi |⌋. Lemma 3.8. The signature vector always reduces in lexicographic value across each iterative step, and the coordinates of the signature vector are always non-decreasing, i.e., s0 6 s1 . . . 6 sℓ . Proof. Let s and s′ be the signature vectors at the beginning and at the end of some iterative step. We now consider two cases depending on whether a collapse operation occurs in this iterative step. Case 1. No layer was collapsed. Clearly, s′ = (s0 , . . . , sℓ , s′ℓ+1 , ∞) has smaller lexicographic value compared to s. Case 2. At least one layer was collapsed. Let ℓ + 1 denote the index corresponding to the newly created layer in the build phase. Let 0 6 t 6 ℓ be the most recent index chosen in the while-loop during the collapse phase. As a result of the collapse operation suppose the layer Pt changed to P′t . Then we know that |P′t | < (1 − µ)|Pt |. Since none of the layers with indices less than t were affected during this procedure, s′ = (s0 , . . . , st−1 , s′t , ∞) where s′t = ⌊log1/(1−µ) |P′t |⌋ 6 ⌊log1/(1−µ) |Pt |⌋ − 1 = st − 1. This shows that the lexicographic value of the signature vector decreases. 10 In both cases, the fact that the coordinates of s′ are non-decreasing follows from Lemma 3.7 and the definition of the coordinates of the signature vector.  Choosing the “∞” coordinate of the signature vector to be some value larger than log1/(1−µ) |P| (so that Lemma 3.8 still holds), we see that each coordinate of the signature vector is at most U and the number of coordinates is also at most U where U = O(log |P|). Thus, the sum of the coordinates of the signature vector is always upper bounded by U2 . We now prove that the number of such signature vectors is polynomial in |P|. A partition of an integer N is a way of writing N as the sum of positive integers (ignoring the√order of the summands). The number of partitions of an integer N can be upper bounded by eO( N) by a result of Hardy and Ramanujan [HR18]2 . Using that the coordinates of our signature vectors are non-decreasing, each signature vector corresponds to a partition of an integer of value at most U2 , and vice versa: given a partition of an integer of size ℓ, the largest number of the partition will correspond to the ℓ-th coordinate, the second largest to the ℓ − 1-th coordinate, and so √ P i) O( = |P|O(1) . on. Therefore, we can upper bound the total number of signature vectors by i6U2 e Since each iteration of the algorithm takes only polynomial time along with Lemma 3.8 this proves Theorem 3.1. Before we return to the proof of the key lemma in this section, Lemma 3.6, let us note an important property of the algorithm which follows from that in the build-phase we add an α-edge for each cluster as long as it is disjoint from the already added resources. Fact 3.9. Let q be a player from some cluster Nk . Notice that if a player q is part of some blocking edge in the ith layer, i.e., q ∈ Pi , and further there is no edge (p, R) ∈ Ai+1 with p ∈ Nk then it means that none of the players in Nk have a set of resources of value at least τ/α disjoint from the resources R(B6i ∪ A6i+1 ). Proof of Lemma 3.6. Notice that since the set Ai is discarded if it is modified or any of the sets A0 , A1 , . . . , Ai−1 , B0 , B1 . . . , Bi−1 is modified, it is sufficient to verify the inequality when we construct the new layer (Aℓ+1 , Bℓ+1 ) in the build phase. The proof is now by contradiction. Suppose |Aℓ+1 | < |P6ℓ |/5 after the build phase. Let N ⊆ {N1 , . . . , Nm } be the clusters that have a player in an edge B6ℓ but no player in an edge in A6ℓ+1 . We have that, |N | = |P6ℓ | − |A6ℓ+1 |. Recall that Ct (i, τ) denotes the set of configurations for player P i comprising only thin items. By P Theorem 3.5 there exists an x that is feasible for CLP(τ) such that i∈Nk C∈Ct (i,τ) xiC = 1/2 for each cluster Nk . Now form the bipartite hypergraph H = (N ∪ Rt , E) where we have vertices for clusters in N and thin items in R, and edges (Nk , C) for every cluster Nk and thin configuration C such P P that xpC > 0 and p ∈ Nk . To each edge (Nk , C) in H assign the weight i∈Nk xiC j∈C v j . The total weight of edges in H is at least |N |τ/2. P Let Z = R(B6ℓ ∪ A6ℓ+1 ) denote the thin items appearing in the edges of L and Aℓ+1 . Let v(Z) = j∈Z v j denote their value. Now remove all these items from the hypergraph to form H ′ which has Pedges (N  Pk , C \ Z) for each edge (Nk , C) in H . The weight of (Nk , C \ Z) is similarly defined to be i∈Nk xiC j∈C\Z v j . Let us upper bound the total value of thin items appearing in Z. Consider some layer (A j , B j ). The total value of resources in thin α-edges in A j is at most (τ/α + τ/β)|A j | by the minimality of the edges. The value of resources in B j not already present in some edge in A j is at most (τ/β)|B j | also by minimality of the thin β-edges in B j . Therefore, v(Z) is at most ℓ X j=1 2 ! ! ! τ τ τ τ τ τ τ τ + + < |A6ℓ+1 | + |P6ℓ | . ( + )|A j | + ( )|B j | + |Aℓ+1 | α β β α β α β β The asymptotic formula for the number of partitions of N is 11 1√ 4N 3  q  exp π 2N as N → ∞ [HR18]. 3 As the sum of the edge weights in H is at least (|N |/2)(τ), the sum of edge weights in H ′ is at least |N |τ/2 − v(Z). And by Fact 3.9, the sum of edge weights in H ′ must be strictly smaller than (N /2)(τ/α). Thus, ! (|P6ℓ | − |A6ℓ+1 |) τ τ τ (|P6ℓ | − |A6ℓ+1 |) τ τ − |A6ℓ+1 | + . (*) − |P6ℓ | < 2 α β β 2 α Note that |A6ℓ+1 | appears with a larger negative coefficient (in absolute terms) on the left-hand-side than on the right-hand-side. Therefore, if (*) holds then it also holds for an upper bound of |A6ℓ+1 |. We shall compute such a bound and reach a contradiction. We start by computing an upper bound on |A j+1 | for j = 0, . . . , ℓ − 1. The fourth invariant says that except for at most µ|P j | edges in A j+1 , the remainder have at least τ/α − τ/β value of resources blocked by the edges in B j+1 . Using this, !  τ τ  2τ |A j+1 | − µ|P j | 6 |P j+1 | − α β β summing over j =⇒ τ τ − α β !  2τ |A6ℓ | − µ|P6ℓ−1 | 6 |P6ℓ | . β Rearranging terms we have, ! 2α 2α + µ|P6ℓ−1 | 6 |P6ℓ | +µ . |A6ℓ | 6 |P6ℓ | β−α β−α Substituting this upper bound in (*) along with our assumption |Aℓ+1 | < |P6ℓ |/5 we get (after some algebraic manipulations) ! ! ! 1 2 2α 1 2 + µ + 1/5 1 + + − |P6ℓ | < 0. |P6ℓ | 1 − − α β β−α α β This is a contradiction because if we substitute in the values of α, β, and µ from (3.1) the left-handside is positive.  4 Combinatorial Algorithm In the previous section, we described a 36-approximation algorithm for restricted max-min fair allocation; however, this algorithm required us to solve √ the Configuration-LP. In this section, we will design and analyze a purely combinatorial (6 + 2 10 + ε)-approximation algorithm, for any √ 0 < ε 6 1 (for reference, note that 6 + 2 10 < 13). This will prove our main result, Theorem 1.1. We start by providing an informal overview of how the combinatorial algorithm works. 4.1 Intuitive Algorithm Description To begin with, the general framework of our combinatorial algorithm is similar to that of the simpler algorithm we described in Section 3: we guess an optimal value τ for the ConfigurationLP, and we then try to find an allocation of resources which approximately satisfies every player, i.e., assigns to each player a set of resources of total value at least τ/13 for that player. To do so, we will again design a local search procedure, whose goal will be to extend a given partial allocation of resources, so as to satisfy one more player. An example execution of our combinatorial algorithm appears in Figure 3: there, given a partial allocation of resources to players, we want to extend this allocation to satisfy player p. Naturally, 12 if there is a set of resources, that do not appear in the given partial allocation, and whose total value for p is at least τ/13, we will assign these resources to player p. Otherwise, we find an edge ep whose total value for p is at least τ/2 (the bottom gray edge in Figure 3(a)), and consider all the edges in our given partial allocation that share resources with that set (the white edges intersecting ep in Figure 3(a)); these edges constitute the first layer that is shown in Figure 3(a). At this point, we should make note of the fact that, similar to the simpler algorithm we described in Section 3, we will again be using a greedy strategy with respect to the edges we wish to include in our partial matching. Specifically, even though we wish to only assign resources of total value at least τ/13 to each player, the gray edges we attempt to include in our matching are significantly more valuable (i.e., of total value at least τ/2). Again, this will imply that every gray edge will intersect with multiple white/blocking edges, which will eventually help us prove that the algorithm’s running time is polynomial in the size of the input. Next, similar to the simpler algorithm we described in Section 3, we want to free up the resources that appear in edge ep . We do this by finding disjoint sets of resources that satisfy the players appearing in the white edges of the first layer. However, here we encounter the first major difference compared to our previous algorithm: some of the players that appear in the white edges of the first layer can be satisfied by using fat resources, i.e., resources whose value for their corresponding players is at least τ/13. Since every fat edge we would like to include in our partial allocation can only be blocked by exactly one edge that already belongs to our allocation, alternating paths of fat edges are created. Such a path, that ends in a gray thin edge, is displayed in Figure 3(b); if we wish to include the gray edge that contains q2 into our partial allocation, then we would have to replace the white fat edges with the gray ones. However, considering such alternating paths of fat edges brings up one issue: since, as is shown in Figure 3(a), the alternating paths that originate at players p1 and p2 end at two distinct gray thin edges, if we were to include both of these edges into our matching, then we would have to guarantee that we will not use the same fat resource to satisfy two different players. In order to do this, we will include the gray edges that contain players q1 and q2 into our partial allocation, only if the alternating paths that end in these players are vertex-disjoint, as is the case in Figure 3(c). Next, since we have solved the problem of deciding if we can update our partial matching by replacing white edges with gray ones, the question that arises is when should we do that. Similar to our simpler algorithm, we will employ the strategy of lazy updates. In other words, we will be replacing the white edges of some layer with gray ones (or, as we will call this operation, collapse a specific layer), only if that would mean that a significant amount of the white edges gets replaced. Replacing a significant amount of white (i.e., blocking) edges then implies that we make significant progress towards matching player p. Finally, after we update our partial allocation, by inserting the gray edges containing players q1 and q2 , inserting the gray fat edges that belong to the corresponding alternating paths, and removing the white fat edges that belong to the corresponding alternating paths, we have managed to free up a significant amount of resources of edge ep . Hence, we choose a subset of the resources contained in ep , whose total value is at least τ/13, and include it into our partial allocation. At this point, we have managed to extend our partial allocation to include one more player, namely, player p. 13 (a) (b) q2 q1 q2 p1 p2 ⇒ p p2 p2 ⇓ q2 ⇐ p q1 p1 (d) (c) Figure 3: An illustration of our combinatorial algorithm. In this figure, boxes correspond to players and circles correspond to resources. 4.2 Parameters Let τ > 0 be a guess on the value of the Configuration-LP, and fix some 0 < ε 6 1. Our algorithm will use the following setting of parameters: √ β := 2(3 + 10) + ε, (4.1) α := 2, µ := ε/100. Similar to our simpler algorithm, β is the approximation guarantee, α determines the “greediness” of the algorithm, and µ determines the “laziness” of the updates of our algorithm. We shall show that whenever CLP(τ) is feasible, our algorithm will terminate with a solution of value at least τ/β for the given instance of restricted max-min fair allocation. Combining this with a standard binary search then yields a β-approximation algorithm. 4.3 Description of the Algorithm We begin by noting that we will be re-using the definitions of fat and thin edges, δ-edges, and (partial) matchings that we introduced in Section 3.3. However, we remind the reader that the parameters 14 we used in the above definitions have now changed, see (4.1). The goal of our algorithm will be to find a perfect matching. Similar to our simpler algorithm, the way we do this is by designing an augmenting algorithm, that will extend any given partial matching to satisfy one more player. Thus, starting from an empty matching and iteratively applying the augmenting algorithm will yield a perfect matching that corresponds to a β-approximate allocation. We remark that for the purposes of our algorithm, any partial matching we consider contains the maximum number of fat resources possible. In order to enforce this condition, we find a maximum matching between fat resources and players; this will be our initial partial matching. Starting from this partial matching, we proceed to iteratively extend it, by matching one more player at a time while never decreasing the number of fat items in our allocation. We proceed to define the concepts of Disjoint Path Networks and Canonical Decompositions, that are necessary to state our combinatorial algorithm. These concepts will be used to implement the idea of updating our partial matching using vertex-disjoint alternating paths, that we mentioned in Section 4.1. We then state our algorithm formally, and we analyze its running time in the subsequent sections. Disjoint Path Networks. As we discussed in the overview of our combinatorial algorithm, we need a way to ensure that the alternating paths we use to update our partial matching are disjoint. We say that two paths are disjoint if they are vertex-disjoint. To do so, we employ a structure called Disjoint Path Networks. Given a partial matching M, let HM = (P ∪ R f , EM ) be the directed graph defined as follows: there is a vertex for each player in P and each fat resource in R f ; and, there is an arc from a player in p ∈ P to a fat resource f ∈ R f if p is interested in f unless the arc (p, { f }) appears in M in which case there is an arc ({ f }, p). Note that the graph HM depends only on the assignment of fat resources to players in M. Now, let S, T ⊆ P be a set of sources and sinks respectively that are not necessarily disjoint. Let FM (S, T) denote the flow network we get if we place unit capacities on the vertices of HM , and use S and T as sources and sinks respectively. Furthermore, let DPM (S, T) denote the value of an optimal solution, i.e., the maximum number of disjoint paths from the sources S to the sinks T in the graph HM . In our algorithm, S and T will contain only vertices in HM corresponding to players in P. However, to specify a sink we sometimes abuse notation and specify an edge since the corresponding sink vertex can be deduced from it. For example, if we write DPM (X, Y), for some set of players X and some set of edges Y, then we mean the maximum number of disjoint paths that start at a player in X and end in a player that appears in some edge in Y. For basic concepts related to flows, such as flow networks and augmenting paths, we refer the reader to the textbook by Cormen, Leiserson, Rivest and Stein [CLRS09]. State of the Algorithm. The state of the algorithm is described by a dynamic tuple (M, ℓ, L, I), where M is the current partial matching, L = ((A0 , B0 , d0 ), (A1 , B1 , d1 ), · · · , (Aℓ , Bℓ , dℓ )) is a list of ℓ layers and I is a set of "immediately addable" edges. Each layer Li = (Ai , Bi , di ) consists of a set of "added" edges Ai , a set of "blocking" edges Bi , and a positive integer di . We note that di is redundant for the formal statement of our algorithm, but will be handy in our analysis. Canonical Decompositions. We proceed to define the last concept necessary to describe our combinatorial algorithm. Recall that we denote ∪i6t Si by S6t , for some sequence of sets S0 , . . . St , and that Pi denotes the players that appear in Bi . Moreover, for a set S of edges we use P(S) to 15 denote the set of players that appear in an edge in S and we use R(S) to denote the set of resources that appear in an edge in S. Definition 4.1 (Canonical Decomposition of I). Given a state (M, ℓ, L, I) of the algorithm, we call a collection of disjoint subsets {I0 , I1 , . . . , Iℓ } of I a canonical decomposition if it satisfies the following conditions: 1. For i = 0, 1, . . . , ℓ, |I6i | = DPM (P6i , I6i ) = DPM (P6i , I). 2. There exists an optimal solution W to FM (P6ℓ , I) such that, for i = 0, 1 . . . , ℓ, |Ii | paths in W go from players Qi ⊆ Pi to the sinks in Ii . We denote these paths by Wi . We also refer to W as the canonical solution corresponding to the decomposition. As we will see in Section 4.4, canonical decompositions and their corresponding canonical solutions can be computed in polynomial time. Algorithm Statement. The combinatorial algorithm behind the proof of Theorem 1.1 is stated as Algorithm 2. We remark that the computation of canonical decompositions and solutions to flow networks that are carried out in Steps 3 and 3.b respectively can be carried out in polynomial time; this fact is proved in Section 4.4. Similar to Algorithm 1, Algorithm 2 preserves the following invariants: 1. For i = 0, . . . , ℓ, Ai is a set of thin α-edges and each α-edge (p, R) ∈ Ai has R ∩ R(A6i ∪ B6i−1 ∪ I \ {(p, R)}) = ∅ (its resources are not shared with edges from earlier iterations, edges in Ai , or edges in I). 2. For any edge (p, R) ∈ I, it holds that R ∩ R(A6ℓ ∪ I \ {(p, R)}) = ∅ and vp (R \ R(M)) > τ/β.3 3. Given a canonical decomposition {I0 , . . . , Iℓ } of I, for i = 0, . . . , ℓ it holds that |Ii | < µ|Pi |. The similarities between these invariants and those of the simpler algorithm follow from the same basic ideas. However, since Algorithm 2 is more involved, its analysis requires more invariants that we present in the subsequent sections. Before proceeding with analyzing Algorithm 2, we explain its steps in more detail and why the algorithm satisfies the above invariants. The algorithm begins with a partial matching M and a player p0 that we wish to include in our partial matching. Furthermore, as pointed out earlier, we make sure that M contains a maximum matching between fat resources and players. Every iteration of our algorithm involves two main phases: the build phase, and the collapse phase. During the build phase of layer ℓ + 1, the algorithm finds thin α-edges for the players in Pℓ that we then insert into either I (if the α-edge contains sufficient resources that do not appear in M) or to Aℓ+1 . By the design of Algorithm 2, any edge that is inserted into Aℓ+1 will be disjoint from edges in A6ℓ+1 ∪ B6ℓ ∪ I; the same holds for any edge (p, R) that is inserted into I, while in addition we have vp (R \ R(M)) > τ/β. Therefore, the first two invariants are preserved during the build phase. Furthermore, edges inserted into Aℓ+1 or I need to either contain a player from P6ℓ , or to be the final edge in an alternating path that includes fat edges originating at a player in P6ℓ . Even though we will not store such alternating paths explicitly, it is required that after we insert any such thin α-edge into Aℓ+1 and I, the value of the flow network DPM (P6ℓ , A6ℓ+1 ∪ I) increases; this 3 We note that this invariant says that each edge (p, R) ∈ I has a subset R′ ⊆ R so that vp (R′ ) > τ/β and R′ ∩ R(A6ℓ ∪ B6ℓ ∪ I \ {(p, R)}) = ∅ since B6ℓ ⊆ M. In other words, the resources of (p, R′ ) are disjoint from all other resources in L. 16 Input: A partial matching M and an unmatched player p0 . Output: A matching M′ that matches all players matched by M and also matches p0 . 1. (Initialization) Set A0 = ∅, B0 = {(p0 , ∅)}, ℓ = 0, d0 = 0 and L = (A0 , B0 , d0 ). (Iterative step) Repeat the following until p0 is matched by M: 2. (Build phase) Initialize Aℓ+1 = ∅. While there exists a thin α-edge (p, R) such that R ∩ R(A6ℓ+1 ∪ B6ℓ ∪ I) = ∅ and DPM (P6ℓ , A6ℓ+1 ∪ I ∪ {(p, R)}) > DPM (P6ℓ , A6ℓ+1 ∪ I): – If vp (R \ R(M)) < τ/β, then set Aℓ+1 = Aℓ+1 ∪ {(p, R)}, else set I = I ∪ {(p, R)}. At the end of the build phase, let Bℓ+1 be the edges of M that are blocking the edges in Aℓ+1 . Set dℓ+1 ← DPM (P6l , A6l+1 ∪ I); then update the state of the algorithm by appending (Aℓ+1 , Bℓ+1 , dℓ+1) to L and by incrementing ℓ by one. 3. (Collapse phase) Compute the canonical decomposition {I0 , . . . , Iℓ } of I, and the corresponding canonical solution W. While ∃t : |It | > µ|Pt |: (a) Choose the smallest such t. //We refer to the following steps as collapsing layer t. (b) Compute optimal solution X to FM (P6t−1 , A6t ∪ I6t−1 ) whose paths are disjoint from Wt . //We refer to the following step as alternating along the paths of Wt . (c) For each path Π in Wt that ends at a player pe with an edge (pe , R) ∈ It i. Set M ← M \ {(p, { f }) | ( f, p) ∈ Π} ∪ {(p, { f }) | (p, f ) ∈ Π}. ii. Remove from M and Bt the edge containing the source of the path Π. iii. Add to M some β-edge (pe , R′ ), where R′ ⊆ R and R′ ∩ R(M) = ∅. (d) Set I = I0 ∪ . . . ∪ It−1 . For every edge (p, R) ∈ At , if vp (R \ R(M)) > τ/β, then: – Remove (p, R) from At and remove those edges from Bt that only block (p, R) in At . – If X contains a path that ends in p, insert (p, R) in I. (e) Discard (Ai , Bi , di ) from L with i > t and set ℓ = t. Output the matching M that also matches p0 . Algorithm 2: Combinatorial Augmenting Algorithm will ensure that there are enough disjoint paths of fat edges to permit the inclusion of all such thin edges into our partial matching M. After the algorithm has finished the build phase, it proceeds to the collapse phase. The condition ∃t : |It | > µ|Pt | of the while-loop guarantees that the third invariant is satisfied once the collapse phase terminates (since the cardinality of Ii always equals DPM (P6i , I) no matter the chosen canonical decomposition). We now describe this phase in more detail and show that it maintains a valid matching and that it does not introduce any violations of the first two invariants. The first step of the collapse phase is to compute a canonical decomposition of I, and a corresponding canonical solution W. Now suppose that we have It > µ|Pt | and that the algorithm collapses layer t. We refer to the edges of It as "immediately addable" as they have enough free resources (by Invariant 2) to be added to the matching. Indeed, these are the edges we will insert into our partial matching, using the paths of Wt . Specifically, for each path Π of Wt , the algorithm proceeds as follows. By definition of the sources and the sinks, Π is a path that starts 17 with a player ps ∈ Pt and ends with a player pe such that (pe , R) ∈ It . Between ps and pe , the path alternates between fat edges that belong to M and fat edges we want to insert into M, i.e., Π = (ps = p1 , f1 , p2 , f2 , . . . , pk , fk , pk+1 = pe ) where ps is interested in f1 , pk+1 is currently assigned fk , and pi is currently assigned fi−1 and interested in fi for i = 2, . . . , k. To update the matching, we find a β-edge (pe , R′ ) with R′ ⊆ R that is disjoint from the resources of matching M (guaranteed to exist by the second invariant) and we let (ps , Rs ) denote the edge in Bt ⊆ M incident to player ps . Step 3.c now updates the matching by inserting (pe , R′ ) and (ps , f1 ), (p2 , f2 ), . . . , (pk , fk ) to the matching while removing (ps , Rs ) and (p2 , f1 ), (p3 , f2 ), . . . , (pt , fk ). This process is called alternating along path Π. As a result, some of the resources of edges in At are freed up, and we move those edges of At that now have τ/β free resources to I (Step 3.d). Finally, we discard all layers above the one we collapsed. Let us now see why our first invariant is upheld after the collapse phase. When we collapse layer t, we might remove edges from At , we discard all At′ for t′ > t and we preserve At′ for t′ < t. Since the first invariant was upheld before the collapse phase, for any t′ 6 t there were no edges in At′ that intersected any edge in A6t′ , B6t′ −1 or I0 ∪ . . . It−1 . Furthermore, since any edge that was inserted into I during Step 3.d previously belonged to At , no edge inserted into I will intersect any edge in A6t ∪ B6t−1 ∪ I0 ∪ . . . It−1 . Therefore, after the collapse phase, for any t′ 6 t every edge in At′ is disjoint from edges in A6t′ ∪ B6t′ −1 ∪ I, and the first invariant holds. After the collapse phase, I contains the edges that belonged to I0 ∪ . . . It−1 (call them old edges), plus the edges that were inserted during Step 3.d (call them new edges). Concerning any old edge e, since the second invariant held before the collapse phase, and since during the collapse phase for any t′ 6 t we introduce no new edges into At′ , the resources of e continue to be disjoint from the resources of A6t and the old edges. Moreover, vp (R(e) \ R(M)) is still at least τ/β since the resources of the edges added to the matching during the collapse phase are disjoint from R(e), where we use that the second invariant held before this iteration, i.e., that the resources of edges in I are disjoint. Hence, to verify the second invariant it remains to verify that any new edge (p, R) has vp (R \ R(M)) > τ/β (follows immediately from Step 3.d) and that its resources are disjoint from the resources of all old and other new edges and edges in A6t ; but this follows directly from the fact that any new edge belonged to At before the collapse phase and the fact that the first invariant held before the collapse phase. Hence, the second invariant is satisfied after the collapse phase. Now, let us see why the output of Algorithm 2 is a partial matching that matches player p0 . Observe that we only update our partial matching during Step 3.c and, as explained above, we alternate along all paths in Wt during this step. As these paths are vertex-disjoint and the edges in I have disjoint resources (by the second invariant), these updates do not interfere with each other. Moreover, note that when we alternate along a path all previously matched players remain matched (albeit to new edges) and, in addition, all fat resources remain matched. This means that our algorithm maintains a matching of the players that were matched by the input and that our matching remains one that maximizes the number of assigned fat resources. By iterating until an edge that contains p0 is inserted into M, it follows that when Algorithm 2 terminates, the output will be a valid matching that also matches p0 in addition to the players that were matched by the original matching that was given as input. Our running time analysis of Algorithm 2 is carried out in the following sections. Specifically, we begin by analyzing the running time of a single iteration of our augmenting algorithm in Section 4.4. Then, we proceed to state certain additional invariants, and prove that they are upheld by Algorithm 2 in Section 4.5. Finally, using these invariants, we will prove that the total number of iterations executed by Algorithm 2 is polynomial in Section 4.6. 18 4.4 Running Time Analysis of a Single Iteration In this section, we prove that the running time of a single iteration is polynomial. We begin by studying the build phase. In this phase, in each iteration of the while-loop, we consider those players p and resources R such that (p, R) is a thin α-edge satisfying R ∩ R(A6ℓ+1 ∪ B6ℓ ∪ I) = ∅. We then check whether adding p as a sink to our flow network strictly increases its value, i.e., the number of disjoint paths from the sources in P6ℓ to the sinks in A6ℓ+1 ∪ I ∪ {(p, R)}. Both these operations can be done in polynomial time as (1) verifying whether such a set R exists for a player p just amounts to calculating the total value of the resources p is interested in that currently are not in the other relevant edges, and as (2) verifying whether the flow network increases its value reduces to a standard maximum flow problem. Next, we study the collapse operation. Here, we have two non-trivial operations: computing a canonical decomposition (Step 3 of Algorithm 2) and Step 3.b of Algorithm 2. Lemma 4.2. Given a state (M, ℓ, L, I) of the algorithm, we can find a canonical decomposition of I and the corresponding canonical solution in polynomial time. Proof. We shall construct an optimal solution W to the flow network FM (P6ℓ , I) with sources P6ℓ and sinks I iteratively. Compute the maximum flow X(0) in the network FM (P60 , I). Let Q0 ⊆ P0 be the set of sources appearing in the flow solution X(0) . Now observe that this solution X(0) is also a valid flow in the network FM (P61 , I). Therefore, by using an augmenting flow algorithm, we can augment the flow X(0) to a maximum flow X(1) in the network FM (P61 , I). Let Q1 ⊆ P1 be the set of additional sources appearing in the flow solution X(1) . We use here an important property of the flow augmentation process, which states that the set of sources in X(1) is precisely the disjoint union Q0 ∪ Q1 (see, for example, [Sch02]). In other words, a vertex appearing as a source of a flow path in a solution continues to be present as a source of a flow path after an augmentation step. Continuing this process, we end up with a flow solution X(ℓ) in the network FM (P6ℓ , I). Define Wi to be the flow paths in X(ℓ) that serve the sources Qi ⊆ Pi for each i = 0, . . . , ℓ. Additionally, let Ii ⊆ I denote the sinks of Wi . By construction, |I6i | = DPM (P6i , I6i ). Further, if DPM (P6i , I6i ) < DPM (P6i , I) then this implies that X(i) is not a maximum flow in FM (P6i , I), and therefore can be augmented by one, contradicting the definition of X(i) . The flow paths W0 , W1 , . . . , Wℓ collectively form the flow solution X(ℓ) which is an optimal solution to FM (P6ℓ , I). Thus, {I0 , . . . , Iℓ } forms a canonical decomposition (with the corresponding canonical solution W0 , . . . , Wℓ ). It is also clear that the process outlined above to realize this decomposition runs in polynomial time as the encountered flow networks have unit capacities.  Next, we prove that Step 3.b can be executed in polynomial time: Lemma 4.3. Consider a state (M, ℓ, L, I) of the algorithm and a canonical decomposition {I0 , I1 , . . . , Iℓ } of I together with the canonical solution W. For i = 0, . . . , ℓ, let Wi be the |Ii | paths that go from the players in Qi ⊆ Pi to sinks in Ii . Then, for i = 0, 1, . . . , ℓ − 1, we can find in polynomial time an optimal solution X to FM (P6i , A6i+1 ∪ I6i ) that is also an optimal solution to FM (P6i , A6i+1 ∪ I) whose paths are disjoint from the paths in Wi+1 and additionally uses all the sinks in I6i . Proof. Consider a fixed i. We shall form an optimal solution X to FM (P6i , A6i+1 ∪ I6i ) that is also an optimal solution to FM (P6i , A6i+1 ∪ I) and its paths are disjoint from the paths in Wi+1 and uses all the sinks in I6i . The initial solution will be the set of unit flow paths W6i from the canonical solution W which has cardinality |I6i |. We now augment this solution using augmenting paths to the set of sinks A6i+1 . Note that throughout this execution each vertex in I6i will be used as a 19 sink by some path and therefore X will use all these sinks. Further, the procedure to calculate X clearly runs in polynomial time. We shall now verify the remaining properties of X. First, suppose towards contradiction that some iteration used an augmenting path P intersecting a path in Wi+1 . However, this would imply that there exists an augmenting path that uses a sink in Ii+1 . We could then increase the set of disjoint paths from players in P6i to sinks in I to be greater than I6i which contradicts the property DPM (P6i , I6i ) = DPM (P6i , I) of the canonical decomposition. Similarly, suppose X is not an optimal solution to FM (P6i , A6i+1 ∪ I). Then there exists an augmenting path to an edge in I \ I6i which again contradicts the property DPM (P6i , I6i ) = DPM (P6i , I) of the canonical decomposition.  Finally, since during a collapse operation we can collapse at most |P| layers, it follows that any iteration of Algorithm 2 terminates in polynomial time. 4.5 Additional Invariants of Combinatorial Algorithm In Section 4.3, we listed three invariants Algorithm 2 preserves that are similar to the simpler algorithm. We argued why they hold, and how these invariants imply that the output of our algorithm is an extended partial matching. In this section, we list two new invariants that will facilitate our polynomial running time proof. Lemma 4.4. At the beginning of each iteration: (a) DPM (P6ℓ , I) = |I|. (b) DPM (P6i−1 , A6i ∪ I) > di for each i = 1, . . . , ℓ. Proof. We prove the lemma by induction on the number of times the iterative step has been executed. We observe that both invariants trivially hold before the first execution of the iterative step. Assume that they are true before the r-th execution of the iterative step. We now verify them before the r + 1-th iterative step. We actually prove the stronger statement that they hold after the build phase and after each iteration of the collapse phase. (a) and (b) hold after the build phase. Let Lℓ+1 denote the layer that was constructed during the build phase. We start by verifying (a). If no edge is added to I during this phase then |I| > DPM (P6ℓ+1 , I) > DPM (P6ℓ , I) = |I|. Suppose that a1 , . . . , ak were the edges added to the set I in that order. When edge ai was added to the set I, from the definition of Step 2 of Algorithm 2 we have that DPM (P6ℓ , A6ℓ ∪ I ∪ {a1 , . . . , ai−1 } ∪ {ai }) > DPM (P6ℓ , A6ℓ ∪ I ∪ {a1 , . . . , ai−1 }), which then implies that DPM (P6ℓ , I ∪ {a1 , . . . , ai−1 } ∪ {ai }) > DPM (P6ℓ , I ∪ {a1 , . . . , ai−1 }) To see this implication, observe that the first inequality implies that, for any flow in FM (P6ℓ , A6ℓ ∪ I ∪ {a1 , . . . , ai−1 }) (and hence, for any flow in FM (P6ℓ , I ∪ {a1 , . . . , ai−1 })), there exists an augmenting path towards sink ai . Along with the induction hypothesis, these inequalities imply that DPM (P6ℓ+1 , I ∪ {a1 , . . . , ak }) > DPM (P6ℓ , I ∪ {a1 , . . . , ak }) = |I| + k = |I ∪ {a1 , . . . , ak }|. For (b), the inequality for i = ℓ + 1 holds by the definition of dℓ+1 during this phase. The remaining inequalities follow from the induction hypothesis since none of M, P6ℓ and A6ℓ were altered during this phase and no elements from I were discarded. 20 (a) and (b) hold after each iteration of the collapse phase. If no layer is collapsed (i.e., there is no It satisfying the condition of the while-loop) then there is nothing to prove. Now let t denote the index of the layer that is collapsed. Let (M, ℓ, {L0 , . . . , Lt′ }, I) denote the state of the algorithm before collapsing layer t that satisfy (a) and (b) (t′ > t and t′ = ℓ + 1 if this is the first iteration of Step 3). Let I′ denote I0 ∪ · · · ∪ It−1 ∪ {a1 , . . . , ak } where a1 , . . . , ak are the edges added to I in Step 3.d of the collapse phase and let M′ denote the partial matching after Step 3.c of the collapse phase. We have that (a), DPM′ (P6t , I′ ) = |I′ |, now follows from Lemma 4.3. Indeed, the solution X used all the sinks in I0 ∪ . . . It−1 ∪ {a1 , . . . , ak } which equals I′ ; and these paths form a solution to FM′ (P6t , I′ ) as they are disjoint from the paths in Wt . Notice that we do not use the induction hypothesis in this case, i.e., that (M, ℓ, {L0 , . . . , Lt′ }, I) satisfied (a) and (b). For (b), we need to verify inequalities for i = 1, . . . , t. When i < t, none of the sets Ai were altered during this iterative step. Further, although M and I changes during the collapse phase, by Lemma 4.3 and the definition of Step 3 this change cannot reduce the number of disjoint paths from P6i−1 to A6i ∪ I and therefore (b) remains true by the induction hypothesis. Indeed, the selection of X in Step 3.b is done so as to make sure that the update of the matching along the alternating paths in Wt does not interfere with an optimal solution to the flow network with sources P6i−1 and sinks A6i ∪ I. For i = t, the claim again follows since the number of disjoint paths from P6t−1 to A6t ∪ I cannot reduce because of Step 3.d in the algorithm that maintains X as a feasible solution  by the same arguments as for (a). 4.6 Bound on the Total Number of Iterations In this final section, we will use the above invariants to show that our augmenting algorithm performs a polynomial number of iterations, assuming CLP(τ) is feasible. We start with two lemmas that show that di cannot be too small. The first holds in general and the second holds if CLP(τ) is feasible. Lemma 4.5. At the beginning of each iteration, we have di > |A6i | for every i = 0, . . . , ℓ. Proof. We prove this by induction on the variable r > 0 that counts the number of times the iterative step has been executed. For r = 0 the statement is trivial. Suppose that it is true for r > 0. We shall show that it holds before the r + 1-th iterative step. If the iteration collapses a layer, then no new layer was added, and since di ’s remain unchanged and A6i may only decrease, the statement is true in this case. Now, suppose that no layer was collapsed in this iteration and let Lℓ+1 = (Aℓ+1 , Bℓ+1 , dℓ+1 ) be the newly constructed layer in this phase. Again, we have di > |Ai | for i = 0, . . . , ℓ since none of these quantities are changed by the build phase. Let us now verify that dℓ+1 > Aℓ+1 . Let Aℓ+1 = {a1 , . . . , ak } denote the set of edges added to Aℓ+1 indexed by the order in which they were added. When edge ai was added to the set Aℓ+1 , according to Step 2 of Algorithm 2, we have that DPM (P6ℓ , A6ℓ ∪ I ∪ {a1 , . . . , ai−1 } ∪ {ai }) > DPM (P6ℓ , A6ℓ ∪ I ∪ {a1 , . . . , ai−1 }). Using (b) of Lemma 4.4 and the induction hypothesis, DPM (P6ℓ−1 , A6ℓ ∪ I) > dℓ > |A6ℓ |. Using the previous inequalities, dℓ+1 = DPM (P6ℓ , A6ℓ+1 ∪ I) > |A6ℓ | + k > |A6ℓ+1 |.  21 Lemma 4.6. Assuming CLP(τ) is feasible, at the beginning of each iteration DPM (P6i−1 , A6i ∪ I) > di > γ|P6i−1 |, where γ = 1 √ ( 10 − 2), 3 for every i = 1, . . . , ℓ. Remark 4.7. The above condition is the only one that needs to be satisfied for the algorithm to run in polynomial time. Therefore, in a binary search, the algorithm can abort if the above condition is violated at some time, since that violation would imply that the Configuration-LP is infeasible; otherwise it will terminate in polynomial time. Proof. We will prove that di > γ|P6i−1 | for i = 1, . . . , ℓ as Lemma 4.4(b) then implies the claim. Notice that di is defined only at the time when layer Li is created and not altered thereafter. So it suffices to verify that: Assuming di > γ|P6i−1 | for i = 1, . . . , ℓ, then for the newly constructed layer Lℓ+1 , dℓ+1 > γ|P6ℓ | also. Suppose towards contradiction that Lℓ+1 is a newly constructed layer (and that no layer was collapsed), such that dℓ+1 = DPM (P6ℓ , A6ℓ+1 ∪ I) < γ|P6ℓ |. Then, since no layer was collapsed at Step 3 of Algorithm 2, we have that |Ii | < µ|Pi | for i = 0, . . . , ℓ, where {I0 , . . . , Iℓ } is the canonical decomposition of I considered by the algorithm. Together with Lemma 4.4(a), this implies |I| = DPM (P6ℓ , I) < µ|P6ℓ |. Moreover, by Lemma 4.5 we have |A6ℓ+1 | 6 dℓ+1 = DPM (P6ℓ , A6ℓ+1 ∪ I) < γ|P6ℓ |. Hence, we have that |A6ℓ+1 ∪ I| < (µ + γ)|P6ℓ |. The rest of the proof is devoted to showing that this causes the dual of the CLP(τ) to become unbounded which leads to the required contradiction by weak duality. That is, we can then conclude that if CLP(τ) is feasible then dℓ+1 > γ|P6ℓ |. Consider the flow network FM (P6ℓ , A6ℓ+1 ∪ I ∪ Z) with P6ℓ as the set of sources and A6ℓ+1 ∪ I ∪ Z as the collection of sinks where, Z := {p ∈ P | ∃R ⊆ R : R ∩ R(A6ℓ+1 ∪ I ∪ B6ℓ ) = ∅ and vp (R) > τ/α}. Since, during the construction of layer ℓ + 1 we could not insert any more edges into Aℓ+1 and I, the maximum number of vertex disjoint paths from P6ℓ to the sinks equals DPM (P6ℓ , A6ℓ+1 ∪ I) which, by assumption, is less than γ|P6ℓ |. Therefore, by Menger’s theorem there exists a set K ⊆ V of vertices of cardinality less than γ|P6ℓ | such that, if we remove K from HM , the sources P6ℓ \ K and the sinks are disconnected, i.e., no sink is reachable from any source in P6ℓ \ K. We now claim that we can always choose such a vertex cut so that it is a subset of the players. Claim 4.8. There exists a vertex cut K ⊆ P separating P6ℓ \ K from the sinks of cardinality less than γ|P6ℓ |. Proof. Take any minimum cardinality vertex cut K separating P6ℓ \ K from the sinks. We already saw that |K| < γ|P6ℓ |. Observe that every fat resource that is reachable from P6ℓ \ K must have outdegree exactly one in HM . It cannot be more than one since M is a collection of disjoint edges, 22 and it cannot be zero since we could then increase the number of fat edges in M which contradicts that we started with a partial matching that maximized the number of fat edges. Therefore in the vertex cut K, if there are vertices corresponding to fat resources, we can replace each fat resource with the unique player to which it has an outgoing arc to, to obtain another vertex cut also of the same cardinality that contains only vertices corresponding to players.  Now call the induced subgraph of HM − K on the vertices that are reachable from P6ℓ \ K as H′ . Note that by the definition of K, H′ will not contain any sinks. Using H′ we define the assignment of values to the dual variables in the dual of CLP(τ) as follows:   ′  (1 − 1/α) if player i is in H , yi :=   0 otherwise, zj   v j /τ     :=  (1 − 1/α)    0 if j is a thin resource that appears in A6ℓ+1 ∪ I ∪ B6ℓ , if j is a fat resource in H′ , otherwise. We first verify that the above assignment is feasible. Since all the dual variables are nonP negative we only need to verify that yi 6 j∈C z j for every i ∈ P and C ∈ C(i, τ). Consider a player i that is given a positive yi value by the above assignment. Let C ∈ C(i, τ) be a configuration for player i of value at least τ; we will call C thin if it only contains thin resources, and fat otherwise. There are two cases we need to consider. P Case 1. C is a thin configuration. Suppose that j∈C z j < (1 − 1/α). Then, by our assignment of z j values, this impliesP that there exists a set R ⊆ C such that R is disjoint from the resources in A6ℓ+1 ∪ I ∪ B6ℓ and j∈R v j > τ/α. Together this contradicts the fact that H′ has no sinks since i is then a sink (it is in Z). Case 2. C is a fat configuration. Let j be a fat resource in C. Since i was reachable in H′ , all the sources in H′ are assigned thin edges in M (which implies they have no incoming arcs), and K is a subset of the players, it follows that j is also present in H′ . Thus, by our assignment, z j = 1 − 1/α. Having proved that our assignment of yi and z j values constitutes P P a feasible solution to the dual of CLP(τ), we now compute the objective function value i yi − j z j of the above assignment. To do so we adopt the following charging scheme: for each fat resource j in H′ , charge its z j value against the unique player i such that the outgoing arc (j, i) belongs to H′ . The charging scheme accounts for the z j values of all the fat resources except for the fat resources that are leaves in H′ . There are at most |K1 | such fat resources, where K1 ⊆ K is the set of players to which the uncharged fat items have an outgoing arc to. Moreover, note that K1 only consists of players that are matched in M by fat edges. Since P6ℓ does not have any players matched by fat edges in M, no player in K2 := P6ℓ ∩ K is present in K1 , i.e., K1 ∩ K2 = ∅. Finally, note that no player in P6ℓ \ K = P6ℓ − K2 has been charged. Thus, considering all players in P but only fat configurations, we have X X z j > (1 − 1/α)(|P6ℓ | − |K2 |) − (1 − 1/α)|K1 | yi − i∈P j∈R f   = (1 − 1/α) |P6ℓ | − (|K1 | + |K2 |) > (1 − 1/α)(1 − γ)|P6ℓ |. 23 P We now compute the total contribution of thin resources, i.e., j∈Rt z j . The total value of thin resources from the edges A6ℓ+1 and the edges I is at most (1/α+1/β)|A6ℓ+1 ∪I|, due to the minimality of thin α-edges. Besides the resources appearing in A6ℓ+1 ∪ I, the total value of resources appearing only in edges B6ℓ is at most (1/β)(|B6ℓ |) < (1/β)(|P6ℓ |), by the minimality of β-edges. Indeed, if an edge in Bℓ has more than τ/β resources not appearing in an edge in A6ℓ+1 ∪ I then those resources would form a thin β-edge which contradicts its minimality. Using |A6ℓ+1 ∪ I| < (µ + γ)|P6ℓ | we have !   X X 1 1 1 1 |P6ℓ | − (µ + γ) + |P6ℓ | − |P6ℓ |. yi − z j > (1 − γ) 1 − α α β β i∈P j∈R Recall that, given any feasible solution to the dual of CLP(τ), we can scale it by any positive number, and it will remain feasible; this will imply that if the optimum of the dual of CLP(τ) is positive, then the dual of CLP(τ) is unbounded. So, the dual of CLP(τ) is unbounded when !   αβ − (1 + µ)(α + β) 1 1 1 1 (1 − γ) 1 − − (µ + γ) + . − >0⇔γ6 α α β β αβ + α √ 10) + ε, α = 2, and µ = ε/100. For ε > 0 the last inequality is equivalent Recall that β = 2(3 + √ to 206 10 + 3ε 6 676, which is valid for ε 6 1.  We now use the previous lemma to show that if we create a new layer then the number of players in that layer will increase rapidly. This will allow us to bound the number of layers to be logarithmic and also to bound the running time. Lemma 4.9 (Exponential growth). At each execution of the iterative step of the algorithm, we have |Pi | > δ|P6i−1 |, where δ := ε/100, for each i = 1, . . . , ℓ. Proof. Suppose towards contradiction that the statement is false and let t be the smallest index that violates it, i.e., |Pt | < δ|P6t−1 |. Due to Invariant 3, |Ii | < µ|Pi | for 0 6 i 6 t. Hence, |I6t | < µ|P6t | < µ(1 + δ)|P6t−1 |. Further, |A6t | + |I6t | > DPM (P6t−1 , A6t ∪ I6t ) = DPM (P6t−1 , A6t ∪ I) > γ|P6t−1 |, where the first inequality is trivial, the equality follows from the definition of canonical decompositions (Definition 4.1), and the last inequality follows from Lemma 4.6. This gives us  |A6t | > γ − µ(1 + δ) |P6t−1 |. We now obtain an upper bound on the total number of edges in A6t by counting the value of resources in each Ai and Bi ; observe that any thin β-edge has resources of total value at most 2τ/β due to minimality, while any thin α-edge in A6t has resources of value at least τ/α − τ/β that are blocked, i.e., appear in some edge in B6t (since otherwise this edge would be in I instead of A6t )4 . 4 We remark that just as in the simpler algorithm, the set Bi contains those edges that are blocking the edges in Ai . This follows from the definition of the build phase and Steps 3.c and 3.d that remove edges from Bi when the matching has changed or when Ai has changed. Furthermore, all edges in Ai have all but at most τ/β resources blocked. Otherwise, the edge is added to I in the build phase and if resources have been freed up later, the edge is removed from Ai (and it may be added to I) during Step 3.c. 24 Hence,   summing over i and rearranging 2α . =⇒ |A6t | 6 |B6t | |Ai | τ/α − τ/β 6 |Bi | 2τ/β β−α Since |B6t | < |P6t | and |P6t | < (1 + δ)|P6t−1 | we have the bound |A6t | < 2α (1 + δ)|P6t−1 |. β−α Therefore we will have a contradiction when 2α (1 + δ) 6 γ − (1 + δ)µ. β−α It can be verified that for any ε > 0 the above inequality is equivalent to  √ √  22400 + 6 52 + 10 ε + 3ε2 6 9400 10, which is true for ε ∈ [0, 1] leading to the required contradiction.  We are now ready to prove that our algorithm executes a polynomial number of iterations. To do this, we define the signature vector s := (s0 , . . . , sℓ , ∞), where si := ⌊log1/(1−µ) |Pi | ⌋ δi+1 corresponding to the state (M, ℓ, L, I) of the algorithm. The signature vector changes as the algorithm executes; in fact, we prove that its lexicographic value always decreases: Lemma 4.10. Across each iterative step, the lexicographic value of the signature vector decreases. Furthermore, the coordinates of the signature vector are always non-decreasing. Proof. We show this by induction as usual on the variable r that counts the number of times the iterative step has been executed. The statement for r = 0 is immediate. Suppose it is true for r > 0. Let s = (s0 , . . . , sℓ , ∞) and s′ = (s′0 , . . . , s′ℓ′ , ∞) denote the signature vector at the beginning and at the end of the (r + 1)-th iterative step. We consider two cases: No layer was collapsed. Let Lℓ+1 be the newly constructed layer. In this case, ℓ′ = ℓ + 1. By Lemma 4.9, |Pℓ+1 | > δ|P6ℓ | > δ|Pℓ |. Clearly, s′ = (s0 , . . . , sℓ , s′ℓ+1 , ∞) where ∞ > s′ℓ+1 > s′ℓ = sℓ . Thus, the signature vector s′ also has increasing coordinates and smaller lexicographic value compared to s. At least one layer was collapsed. Let 0 6 t 6 ℓ be the index of the last layer that was collapsed during the r-th iterative step. As a result of the collapse operation suppose the layer Pt changed to P′t . Then we know that |P′t | < (1 − µ)|Pt |. Indeed, during Step 3 of Algorithm 2, at least a µ-fraction of the edges in Bt are replaced with edges from I. Since none of the layers with indices less than t were affected during this procedure, s′ = (s0 , . . . , st−1 , s′t , ∞) where s′t = ⌊log1/(1−µ) (1−µ)|P | |P′t | ⌋ δt+1 6 ⌊log1/(1−µ) δt+1 t ⌋ 6 ⌊log1/(1−µ) δ|Pt+1t | ⌋ − 1 = st − 1. This shows that the lexicographic value of the signature vector decreases. That the coordinates of s′ are non-decreasing follows from Lemma 4.9.  25 Finally, due to the above lemma, any upper bound on the number of possible signature vectors is an upper bound on the number of iterations Algorithm 2 will execute; we prove there is such a bound of polynomial size: Lemma 4.11. The number of signature vectors is at most |P|O(1/µ·1/δ·log(1/δ)) . Proof. By Lemma 4.9, |P| > P6ℓ > (1 + δ)P6ℓ−1 > . . . > (1 + δ)ℓ |P0 |. This implies that ℓ 6 log1+δ |P| 6 1 δ log |P|, where the last inequality is obtained by using Taylor series and that δ ∈ [0, 1/100]. Now consider the i-th coordinate of the signature vector si . It can be no larger than log1/(1−µ) δ|P| i+1 . Using the bound on the index i and after some manipulations, we get   1 1 si 6 log |P| + (i + 1) log δ log 1 1−µ   1 1 1 6 log |P| + ( log |P| + 1) log 1 δ δ log 1−µ ! 1 1 log , = log |P| · O µδ δ where the final bound is obtained by again expanding using Taylor series around 0. Thus, if we   1 1 let U = log |P| · O µδ log δ be an upper bound on the number of layers and the value of each coordinate of the signature vector, then the sum of coordinates of the signature vector is always upper bounded by U2 . Now, as in the simpler algorithm, we apply the bound on the number of partitions of an integer. √ N) O( [HR18]. Since Recall that the number of partitions of an integer N can be upper bounded by e 2 , we can upper bound each signature vector corresponds to some partition of an integer at most U √ P the total number of signature vectors by i6U2 eO( i) . Now using the bound of U, we have that the number of signatures is at most |P|O(1/µ·1/δ·log(1/δ)) .  Since the number of possible signature vectors is polynomial, the number of iterations Algorithm 2 will execute is also polynomial. Furthermore, as the running time of each iteration is also polynomial, this completes the proof of Theorem 1.1. 5 Conclusion In this paper we have presented new ideas for local search algorithms leading to an improved approximation algorithm for the restricted max-min fair allocation problem. The obtained algorithm is also combinatorial and therefore bypasses the need of solving the exponentially large Configuration-LP. Apart from further improving the approximation guarantee, we believe that an interesting future direction is to consider our techniques in the more abstract setting of matchings in hypergraphs. For example, Haxell [Hax95] proved, using an alternating tree algorithm, a sufficient condition for a bipartite hypergraph to admit a perfect matching. Theorem 5.1 (Haxell’s Condition). Consider an (r + 1)-uniform bipartite hypergraph H = (P ∪ R, E) such that for every edge e ∈ E, |e ∩ P| = 1 and |e ∩ R| = r. For C ⊆ P let H(EC ) denote the size of the smallest set R ⊆ R that hits all the edges in H that are incident to some vertex in C. If for every C ⊆ P, H(EC ) > (2r − 1)(|C| − 1) then there exists a perfect matching in H . 26 Note that Theorem 5.1 generalizes Hall’s theorem for graphs. However, the proof of the statement does not lead to a polynomial time algorithm. In the conference version of this paper we had posed the question of whether a constructive analog of Theorem 5.1 can be obtained. With the techniques presented here, we could prove the following weaker statement: there is a constant C0 > 0 for which, given some 0 < ε 6 1 and assuming H(EC ) > C0 (1/ε)r(|C| − 1), there exists a polynomial time algorithm which assigns one edge ep ∈ E for every player p ∈ P such that it is possible to choose disjoint subsets {Sp ⊆ ep ∩ R}p∈P of size at least (1 − ε)r. Recently, the first author obtained such a constructivization answering our open question affirmatively [Ann16]. For some fixed ε > 0 and r he proved that, for (r + 1)-uniform hypergraphs satisfying H(EC ) > (2r − 1 + ε)(|C| − 1) a polynomial time algorithm exists for finding the perfect matching guaranteed by Theorem 5.1. However, the running time of this algorithm is exponential in both r and 1/ε. It remains an open problem to find such an algorithm whose running time dependence on r is polynomial. References [AFS12] Arash Asadpour, Uriel Feige, and Amin Saberi. Santa claus meets hypergraph matchings. ACM Transactions on Algorithms (TALG), 8(3):24, 2012. 1, 2 [Ann16] Chidambaram Annamalai. Finding perfect matchings in bipartite hypergraphs. To appear in Proceedings of the Twenty-Seventh Annual ACM-SIAM Symposium on Discrete Algorithms, 2016. 27 [AS07] Arash Asadpour and Amin Saberi. An approximation algorithm for max-min fair allocation of indivisible goods. In Proceedings of the thirty-ninth annual ACM symposium on Theory of computing, STOC ’07, pages 114–121, New York, NY, USA, 2007. ACM. 3 [BCG09] MohammadHossein Bateni, Moses Charikar, and Venkatesan Guruswami. Maxmin allocation via degree lower-bounded arborescences. In Proceedings of the 41st annual ACM symposium on Theory of computing, STOC ’09, pages 543–552, 2009. 3 [BD05] Ivona Bezáková and Varsha Dani. Allocating indivisible goods. ACM SIGecom Exchanges, 5(3):11–18, 2005. 1, 3 [BS06] Nikhil Bansal and Maxim Sviridenko. The santa claus problem. In Proceedings of the thirty-eighth annual ACM symposium on Theory of computing, pages 31–40. ACM, 2006. 1, 3, 7 [CCK09] Deeparnab Chakrabarty, Julia Chuzhoy, and Sanjeev Khanna. On allocating goods to maximize fairness. In Proceedings of the 2009 50th Annual IEEE Symposium on Foundations of Computer Science, FOCS ’09, pages 107–116, 2009. 3 [CLRS09] Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. Introduction to Algorithms (3. ed.). MIT Press, 2009. 15 [Fei08a] Uriel Feige. On allocations that maximize fairness. In Proceedings of the nineteenth annual ACM-SIAM symposium on Discrete algorithms, pages 287–293. Society for Industrial and Applied Mathematics, 2008. 1, 2 27 [Fei08b] Uriel Feige. On estimation algorithms vs approximation algorithms. In LIPIcs-Leibniz International Proceedings in Informatics, volume 2. Schloss Dagstuhl-Leibniz-Zentrum für Informatik, 2008. 2 [Hax95] Penny E Haxell. A condition for matchability in hypergraphs. Graphs and Combinatorics, 11(3):245–248, 1995. 1, 2, 26 [HR18] G. H. Hardy and S. Ramanujan. Asymptotic formulaæ in combinatory analysis. Proceedings of the London Mathematical Society, s2-17(1):75–115, 1918. 11, 26 [HSS11] Bernhard Haeupler, Barna Saha, and Aravind Srinivasan. New constructive aspects of the lovasz local lemma. Journal of the ACM (JACM), 58(6):28, 2011. 2 [LST90] Jan Karel Lenstra, David B Shmoys, and Éva Tardos. Approximation algorithms for scheduling unrelated parallel machines. Mathematical programming, 46(1-3):259–271, 1990. 1, 2 [PS12] Lukas Polacek and Ola Svensson. Quasi-polynomial local search for restricted max-min fair allocation. In Automata, Languages, and Programming, pages 726–737. Springer, 2012. 3 [Sch02] Alexander Schrijver. Combinatorial optimization: polyhedra and efficiency, volume 24. Springer Science & Business Media, 2002. 19 [SS10] Barna Saha and Aravind Srinivasan. A new approximation technique for resourceallocation problems. In ICS, pages 342–357, 2010. 3 [Sve12] Ola Svensson. Santa claus schedules jobs on unrelated machines. SIAM Journal on Computing, 41(5):1318–1341, 2012. 2 28
8cs.DS
. ON RAMIFICATION STRUCTURES FOR FINITE NILPOTENT GROUPS arXiv:1711.08483v1 [math.GR] 22 Nov 2017 ŞÜKRAN GÜL Abstract. We extend the characterization of abelian groups with ramification structures given by Garion and Penegini in [6] to finite nilpotent groups whose Sylow p-subgroups have a ‘nice power structure’, including regular p-groups, powerful p-groups and (generalized) p-central pgroups. We also correct two errors in [6] regarding abelian 2-groups with ramification structures and the relation between the sizes of ramification structures for an abelian group and those for its Sylow 2-subgroup. 1. Introduction An algebraic surface S is said to be isogenous to a higher product of curves if it is isomorphic to (C1 × C2 )/G, where C1 and C2 are curves of genus at least 2, and G is a finite group acting freely on C1 ×C2 . Particular interesting examples of such surfaces are Beauville surfaces. These are algebraic surfaces isogenous to a higher product which are rigid. Groups of surfaces isogenous to a higher product can be characterized by a purely group-theoretical condition: the existence of a ‘ramification structure’. Definition 1.1. Let G be a finite group and let T = (g1 , g2 , . . . , gr ) be a tuple of non-trivial elements of G. (i) T is called a spherical system of generators of G if hg1 , g2 , . . . , gr i = G and g1 g2 . . . gr = 1. (ii) Σ(T ) is the union of all conjugates of the cyclic subgroups generated by the elements of T : Σ(T ) = r [ [ hgi ig . g∈G i=1 Two tuples T1 and T2 are called disjoint if Σ(T1 ) ∩ Σ(T2 ) = 1. Definition 1.2. An (unmixed) ramification structure of size (r1 , r2 ) for a finite group G is a pair (T1 , T2 ) of disjoint spherical systems of generators of G, where |T1 | = r1 and |T2 | = r2 . We denote by S(G) the set of all sizes (r1 , r2 ) of ramification structures of G. Observe that if d is the minimum number of generators of G, spherical systems of generators of G are of size at least d + 1. Since clearly cyclic 2010 Mathematics Subject Classification. 20D15, 14J29. Key words and phrases. Ramification structures, Beauville structures, finite nilpotent groups, finite p-groups. The author is supported by the Spanish Government, grant MTM2014-53810-C2-2-P, and by the Basque Government, grant IT974-16. 1 2 Ş. GÜL groups do not admit ramification structures, it follows that r1 , r2 ≥ 3 in Definition 1.2. If r1 = r2 = 3, then ramification structures coincide with Beauville structures, which have been intensely studied in recent times; see surveys [1, 2, 7]. Knowledge about ramification structures that are not Beauville is very scarce. In 2013, Garion and Penegini [5] proved that almost all alternating groups and symmetric groups admit such structures. Soon afterwards, they characterized the abelian groups with ramification structures [6, Theorem 3.18]. After abelian groups, the most natural class of finite groups to consider are nilpotent groups. As we will see in Proposition 3.2, a finite nilpotent group admits a ramification structure if and only if so do its Sylow p-subgroups. The goal of this paper is to extend the characterization of abelian groups with ramification structures to finite nilpotent groups whose Sylow p-subgroups have a good behavior with respect to powers. To this purpose, we first study the existence of ramifications structures for finite pgroups with a ‘nice power structure’. In particular, we generalize Theorem A in [4], which determines the conditions for such p-groups to be Beauville groups. If G is a finite p-group of exponent pe , we call G semi-pe−1 -abelian if for every x, y ∈ G, we have xp e−1 = yp e−1 if and only if (xy −1 )p e−1 = 1. Theorem A. Let G be a finite p-group of exponent pe , and let d = d(G). Suppose that G is semi-pe−1 -abelian. Then G admits a ramification structure e−1 | g ∈ G}| ≥ ps where s = 2 if p ≥ 3 or s = 3 if p = 2. if and only if |{gp In that case, G admits a ramification structure of size (r1 , r2 ) if and only if the following conditions hold: (i) (ii) (iii) (iv) r1 , r2 ≥ d + 1. If p = 3 then r1 , r2 ≥ 4. If p = 2 then r1 , r2 ≥ 5. e−1 | g ∈ G}| = 23 , then (r1 , r2 ) = 6 (5, 5), and If p = 2 and |{g 2 furthermore if e = 1, i.e. G ∼ = C2 × C2 × C2 , then r1 , r2 are not both odd. e−1 | g ∈ G} in Note that the condition on the cardinality of the set {gp Theorem A implies that if G admits a ramification structure, then d(G) ≥ 2 if p ≥ 3 or d(G) ≥ 3 if p = 2. According to [6, Theorem 3.18], if G is an abelian 2-group of exponent e−1 2e and |G2 | = 23 , then G does not admit a ramification structure of size (r1 , r2 ) if r1 , r2 are both odd. However, Theorem A shows that this statement is not true, and they can be both odd provided that G ∼ 6 C2 × = C2 × C2 . Theorem A applies to a wide family of p-groups, including regular pgroups (so, in particular, p-groups of exponent p or of nilpotency class less than p), powerful p-groups, and generalized p-central p-groups. A p-group is called generalized p-central if p > 2 and Ω1 (G) ≤ Zp−2 (G), or p = 2 and Ω2 (G) ≤ Z(G). ON RAMIFICATION STRUCTURES FOR FINITE NILPOTENT GROUPS 3 We want to remark that Theorem A is not valid for all finite p-groups. e−1 | g ∈ G} We will see that no condition on the cardinality of the set {gp can ensure the existence of ramification structures for the class of all finite p-groups. On the other hand, if G is aTfinite nilpotent group and Gp is the Sylow p-subgroup of G, then we have p||G| S(Gp ) ⊆ S(G), and S(G) ⊆ S(Gp ) for odd primes p. However, it is not always true that S(G) ⊆ S(G2 ), even for abelian groups, contrary to what is implicit in the statement of Theorem 3.18 in [6]. We give a counterexample to that in Example 3.3. We fix this error in Theorem B. Theorem B. Let G be a nilpotent group, and let d = d(G). Let Gp denote the Sylow p-subgroup of G for every prime p dividing |G|. Suppose that exp Gp = pep and all Gp are semi-pep −1 -abelian. Then G admits a ramification structure if and only if all Gp admit a ramification structure. In that case, (r1 , r2 ) ∈ S(G) if and only if the following conditions hold: (i) r1 , r2 ≥ d + 1. (ii) (r1 , r2 ) ∈ S(Gp ) for p odd. (iii) (r1 , r2 ) ∈ S(G2 ) unless G2 ∼ = C2 × C2 × C2 . (iv) If G2 ∼ C × C × C then r1 , r2 ≥ 5 and (r1 , r2 ) 6= (5, 5). Further= 2 2 2 ∼ more, if G = C2 × C2 × C2 then r1 , r2 are not both odd. Notation. If G is a finitely generated group, we write d(G) for the minimum number of generators of G. If p is a prime and G is a finite p-group, then i i i Gp = hgp | g ∈ Gi and Ωi (G) = hg ∈ G | g p = 1i. The exponent of G, denoted by exp G, is the maximum of the orders of all elements of G. 2. Finite p-groups Throughout this paper all groups will be finite. In this section, we give the proof of Theorem A. Let us start with a general result related to lifting a spherical generating set of a factor group to the whole group. Proposition 2.1. Let G be a finite group and let d = d(G). Suppose that N E G and U = (x1 , . . . , xr ) is a tuple of generators of G/N . Then the following hold: (i) If r ≥ d then there exist n1 , . . . , nr ∈ N such that the tuple T = (x1 n1 , . . . , xr nr ) generates G. (ii) If N 6= 1, r ≥ d + 1 and x1 . . . xr = 1, then we can choose T to be a spherical system of generators of G. Proof. (i) See Proposition 2.5.4 in [8]. (ii) Assume first that xi 6= 1 for some i = 1, . . . , r. For simplicity, we suppose that xr 6= 1. The equality x1 . . . xr = 1 implies that hx1 , . . . , xr−1 i = G/N . Since r − 1 ≥ d then by (i), there is a tuple V = (z1 , . . . , zr−1 ) that generates G, where zi ∈ xi N for 1 ≤ i ≤ r − 1. Note that if xj = 1, then it may happen that zj = 1. If this is the case, we take a nontrivial element in N as zj . Thus, zi 6= 1 for 1 ≤ i ≤ r − 1. If we call  T = z1 , . . . , zr−1 , (z1 . . . zr−1 )−1 , 4 Ş. GÜL then clearly T is a spherical system of generators of G. The only thing we have to show is that (z1 . . . zr−1 )−1 ∈ xr N . Observe that in G/N , we have (z1 . . . zr−1 )−1 = xr (z1 . . . zr−1 xr )−1 = xr (x1 . . . xr−1 xr )−1 = xr . Thus, (z1 . . . zr−1 )−1 ∈ xr N . Since xr 6= 1, this implies that z1 . . . zr−1 6= 1. Now suppose that xi = 1 for all 1 ≤ i ≤ r. Then G = 1, and since r ≥ d + 1, we can take any spherical system of generators T of G of size r.  Notice that in part (ii) of Proposition 2.1, we do not require that U is a spherical system of generators of G/N . Therefore, as appears in the proof, some of xi ∈ U might be the identity of G/N . We next state a theorem characterizing the possible sizes of ramification structures of elementary abelian p-groups. Before that we need the following lemma. Lemma 2.2. Let G be an elementary abelian p-group of rank d with a ramification structure of size (r1 , r2 ). Then the following hold: (i) G admits a ramification structure of size (r1 + 1, r2 ) if p is odd, and of size (r1 + 2, r2 ) if p = 2. (ii) If G∗ is elementary abelian of rank d + 1 and r1 , r2 ≥ d + 2, then G∗ admits a ramification structure of size (r1 , r2 ). Proof. Let (T1 , T2 ) be a ramification structure of size (r1 , r2 ) for G. We write T1 = (x1 , x2 , . . . , xr1 ). We first prove (i). If (  if p is odd, x21 , x2 , . . . , xr1 , x−1 ′ 1  T1 = T1 , x1 , x1 if p = 2, then (T1′ , T2 ) is a ramification structure as desired. We next prove (ii). Let G∗ = G × hyi be an elementary abelian p-group of rank d + 1. Since G is of rank d and r1 , r2 ≥ d + 2, both T1 and T2 have at least two elements, say a1 , b1 ∈ T1 and a2 , b2 ∈ T2 , that belong to the subgroup generated by the rest of the elements in T1 and T2 , respectively. We modify T1 , T2 to T1∗ and T2∗ , by multiplying a1 , a2 with y and b1 , b2 with  y −1 . Then (T1∗ , T2∗ ) is a ramification structure of size (r1 , r2 ) for G∗ . Note that the roles of r1 and r2 are symmetric. Thus in Lemma 2.2, G also admits a ramification structure of size (r1 , r2 + 1) if p is odd and of size (r1 , r2 + 2) if p = 2. Theorem 2.3. Let G be an elementary abelian p-group of rank d and let r1 , r2 ≥ d + 1. Then G admits a ramification structure of size (r1 , r2 ) if and only if the following conditions hold: (i) d ≥ 2 if p ≥ 3 or d ≥ 3 if p = 2. (ii) If p = 3 then r1 , r2 ≥ 4. (iii) If p = 2 then r1 , r2 ≥ 5, and furthermore if d = 3 then r1 , r2 are not both odd. Proof. We first assume that G admits a ramification structure (T1 , T2 ) of size (r1 , r2 ). We already know that d ≥ 2. If p = 2 and G ∼ = C2 × C2 , then clearly Σ(T1 ) ∩ Σ(T2 ) 6= 1, a contradiction. Thus, if p = 2 then d ≥ 3. ON RAMIFICATION STRUCTURES FOR FINITE NILPOTENT GROUPS 5 We next assume that p = 3. We will show that r1 , r2 ≥ 4. Suppose, on the contrary, that r1 = 3. Then G ∼ = C3 ×C3 . If we write T1 = (x1 , x2 , (x1 x2 )−1 ), then Σ(T1 ) contains 6 different nontrivial elements of G. The other two nontrivial elements of G are x1 x22 and x21 x42 . Since they do not generate G, there is no ramification structure for G, which is a contradiction. We now assume that p = 2. We show that r1 , r2 ≥ 5. Suppose that r1 = 4. Then G ∼ = C2 × C2 × C2 . We write T1 = (x1 , x2 , x3 , (x1 x2 x3 )−1 ). Then T2 can only contain x1 x2 , x1 x3 and x2 x3 . However, hx1 x2 , x1 x3 , x2 x3 i = 6 G, again a contradiction. Finally, we show that if G ∼ = C2 × C2 × C2 then r1 , r2 are not both odd. Suppose that r1 is odd. Then observe that T1 contains at least 4 different nontrivial elements. Otherwise, if T1 has 3 different nontrivial elements, say u, v, t, then (u, v, t) is a minimal system of generators of G. Since the product of the elements of T1 is equal to 1, each of u, v, t appears an even number of times in T1 , which is not possible since r1 is odd. We now prove the converse. To this purpose, it is enough to find ramification structures of sizes (3, 3) or (4, 4) according as p ≥ 5 or p = 3 if d = 2, of sizes (5, 6) or (6, 6) if d = 3 and p = 2, and finally of size (5, 5) if d = 4 and p = 2. Then by applying (i) and (ii) in Lemma 2.2 repeatedly, we get the result. Let G = hx1 i × hx2 i ∼ = Cp × Cp where p ≥ 3. If we take (  x1 , x2 , (x1 x2 )−1 if p ≥ 5,  T1 = −1 −1 x1 , x1 , x2 , x2 if p = 3, and T2 = (  x1 x22 , x1 x42 , (x21 x62 )−1  x1 x2 , (x1 x2 )−1 , x1 x22 , (x1 x22 )−1 if p ≥ 5, if p = 3, then (T1 , T2 ) is a ramification structure for G of size (3, 3) if p ≥ 5, or of size (4, 4) if p = 3. Now assume that G = hx1 i × hx2 i × hx3 i ∼ = C2 × C2 × C2 . If we take (  x1 x2 , x1 x3 , x2 x3 , x1 x2 x3 , x1 x2 x3 if r1 = 5,  T1 = if r1 = 6, x1 x2 , x1 x3 , x1 x2 x3 , x1 x2 , x1 x3 , x1 x2 x3  and T2 = x1 , x2 , x3 , x1 , x2 , x3 , then (T1 , T2 ) is a ramification structure for G of size (5, 6) or (6, 6). Finally if p = 2 and G = hx1 i × hx2 i × hx3 i × hx4 i, then we take T1 =  x1 , x2 , x3 , x4 , (x1 x2 x3 x4 )−1 and T2 = x1 x2 , x2 x3 , x3 x4 , x1 x2 x3 , x2 x3 x4 . Then clearly (T1 , T2 ) is a ramification for G of size (5, 5). This completes the proof.  Theorem 2.3 can also be deduced from Theorem 3.18 in [6] that characterizes abelian groups with ramification structures. However, note that the statement of that theorem corresponding to abelian 2-groups is not true in general. According to Theorem 3.18 in [6], if G is an abelian 2-group of e−1 exponent 2e with |G2 | = 23 and G admits a ramification structure of size (r1 , r2 ), then r1 , r2 cannot be both odd. However, the next example shows that this is not necessarily the case. We fix this mistake in Theorem 2.8. 6 Ş. GÜL Example 2.4. Let G = hai × hxi × hyi × hzi ∼ = C2 × C4 × C4 × C4 . Now 2 3 exp G = 4 and |G | = 2 . If we take T1 = (x, y, z, x−1 , y −1 , z −1 a, a), and T2 = (xya, xz, yz, xyz, xyza), then clearly (T1 , T2 ) is a ramification structure for G of size (7, 5). We next see that the existence of ramification structures for a group of exponent p can be deduced from Theorem 2.5. Theorem 2.5. Let G be a p-group of exponent p. Then G admits a ramification structure of size (r1 , r2 ) if and only if G/Φ(G) admits a ramification structure of size (r1 , r2 ). Proof. Note that if p = 2 then G is an elementary abelian 2-group, and hence G coincides with G/Φ(G). Thus we assume that p ≥ 3. We first show that if G/Φ(G) admits a ramification structure (U1 , U2 ) of size (r1 , r2 ), then so does G. Consider a lift of (U1 , U2 ) to G, say (T1 , T2 ), such that T1 and T2 are spherical systems of generators of G. Since exp G = p, all elements in T1 and T2 are of order p. We claim that (T1 , T2 ) is a ramification structure of size (r1 , r2 ) for G. Suppose, on the contrary, that there are a ∈ T1 and b ∈ T2 such that haig = hbi for some g ∈ G. Since G/Φ(G) is abelian, we get hai = hbi, which is a contradiction. Let us now prove the converse. Assume that G admits a ramification structure of size (r1 , r2 ). Note that G/Φ(G) has rank at least 2. Then by Theorem 2.3, any elementary abelian p-group of rank ≥ 2 for p ≥ 5 admits a ramification structure of size (r1 , r2 ) if r1 , r2 ≥ 3. Finally we assume that p = 3. According to Theorem 2.3, we only need to prove that G does not admit a ramification structure with r1 = 3. By way of contradiction, it follows that G is a 2-generator group with exp G = 3. Then [9, 14.2.3] implies that G is of order 33 . Observe that each element in T1 falls into a different maximal subgroup of G. Since G has 4 maximal subgroups and not all elements in T2 fall into the same maximal subgroup, it then follows that there are elements in T1 and T2 , say a ∈ T1 and b ∈ T2 , which are in the same maximal subgroup. Then we have b = ai c, for some c ∈ Φ(G) = G′ and for i ∈ {1, 2}. Since |G| = 33 and ai is a generator of G, we can write c = [ai , g] for some g ∈ G. It then follows that b = (ai )g , a contradiction.  We now introduce a property which is essential to our result, and then we describe some families of finite p-groups satisfying this property. Let G be a finite p-group, and let i ≥ 1 be an integer. Following Xu [11], we say that G is semi-pi -abelian if the following condition holds: (1) i xp = y p i if and only if i (xy −1 )p = 1. If G is semi-pi -abelian, then we have [11, Lemma 1]: ON RAMIFICATION STRUCTURES FOR FINITE NILPOTENT GROUPS 7 i (SA1) Ωi (G) = {x ∈ G | xp = 1}. i (SA2) |G : Ωi (G)| = |{xp | x ∈ G}|. If G is semi-pi -abelian for every i ≥ 1, then G is called strongly semi-pabelian. By [10, Theorem 3.14], regular p-groups are strongly semi-p-abelian. On the other hand, by Lemma 3 in [3], a powerful p-group of exponent pe is semi-pe−1 -abelian. Furthermore, by Theorem 2.2 in [4], generalized p-central p-groups, i.e. groups in which Ω1 (G) ≤ Zp−2 (G) for odd p, or Ω2 (G) ≤ Z(G) for p = 2, are strongly semi-p-abelian. Before we proceed to prove Theorem A, we need the following lemma. Lemma 2.6. Let G be a p-group of exponent pe and let d = d(G). Suppose that G is semi-pe−1 -abelian. Then the following hold:  (i) If (T1 , T2 ) is a ramification structure for G, then T 1 r{1}, T 2 r{1} is a ramification structure for G/Ωe−1 (G). (ii) If (U1 , U2 ) is a ramification structure of size (r1 , r2 ) for G/Ωe−1 (G) and r1 , r2 ≥ d + 1, then there is a lift of (U1 , U2 ) to G which is a ramification structure of size (r1 , r2 ) for G. Proof. We first prove (i) by way of contradiction. Note that G/Ωe−1 (G) is of exponent p. Suppose that there are a ∈ T 1 r {1} and b ∈ T 2 r {1} such g that hai = hbig for some g ∈ G/Ωe−1 (G), i.e. b = ai for some i not divisible e−1 = 1, by p. Then we have bg a−i ∈ Ωe−1 (G), and consequently (bg a−i )p e−1 e−1 ip e−1 g p . This is a =a by (SA1). Since G is semi-p -abelian, we get (b ) contradiction, since both a and b are of order pe and hai ∩ hbig = 1. We next prove (ii). By part (ii) of Proposition 2.1, we can take a lift of (U1 , U2 ) to G, say (T1 , T2 ), such that T1 and T2 are spherical systems of generators of G. Observe that all elements in T1 and T2 are of order pe . We next show that T1 and T2 are disjoint. Suppose, on the contrary, that there are a ∈ T1 and b ∈ T2 such that hap pe−1 e−1 ig = hbp e−1 i, ipe−1 for some integer i not divisible by = b for some g ∈ G, i.e (ag ) p. Since G is semi-pe−1 -abelian, then ag b−i ∈ Ωe−1 (G), and consequently, haig = hbi in G/Ωe−1 (G), which is a contradiction since (U1 , U2 ) is a ramification structure for G/Ωe−1 (G).  We are now ready to prove Theorem A. We deal separately with the cases p ≥ 3 and p = 2. Theorem 2.7. Let G be a p-group of exponent pe with p ≥ 3, and let d = d(G). Suppose that G is semi-pe−1 -abelian. Then G admits a ramification e−1 | g ∈ G}| ≥ p2 . In that case, G admits a structure if and only if |{gp ramification structure of size (r1 , r2 ) if and only if r1 , r2 ≥ d + 1, and also r1 , r2 ≥ 4 provided that p = 3. Proof. We first assume that G admits a ramification structure (T1 , T2 ). By e−1 | g ∈ G} is a power of p. (SA2), the cardinality of the set X = {gp e−1 is cyclic of Suppose that |X| = p. It then follows that the subgroup Gp 8 Ş. GÜL order p. Note that by (SA1), we have exp Ωe−1 (G) = pe−1 . Then there are elements a ∈ T1 and b ∈ T2 such that o(a) = o(b) = pe . Thus, Gp e−1 = hap e−1 i = hbp e−1 i, which is a contradiction. We next prove that if p = 3 and G admits a ramification structure of size (r1 , r2 ), then r1 , r2 ≥ 4. Suppose, by way of contradiction, that r1 = 3. Then since |X| ≥ 32 , we have |G/Ωe−1 (G)| ≥ 32 , by (SA2). Part (i) of Lemma 2.6 implies that G/Ωe−1 (G) admits a ramification structure of size (r, s) where r ≤ r1 ≤ 3. However, according to Theorems 2.3 and 2.5 this is not possible. Now assume that |X| ≥ p2 . Let us use the bar notation G for the factor group G/Ωe−1 (G). Then |G| ≥ p2 and d(G) ≥ 2. It follows from Theorems 2.3 and 2.5 that G admits a ramification structure of size (r, s) for all r, s ≥ d(G)+1, and r, s ≥ 4 provided that p = 3. If we take r1 , r2 ≥ d+1 ≥ d(G)+1, and r1 , r2 ≥ 4 provided that p = 3, then part (ii) of Lemma 2.6 implies that G admits a ramification structure of size (r1 , r2 ). This completes the proof.  We next deal with the prime 2. Theorem 2.8. Let G be a 2-group of exponent 2e , and let d = d(G). Suppose that G is semi-2e−1 -abelian. Then G admits a ramification structure if and e−1 | g ∈ G}| ≥ 23 . In that case, G admits a ramification structure only if |{g2 of size (r1 , r2 ) if and only if the following conditions hold: (i) r1 , r2 ≥ d + 1. (ii) r1 , r2 ≥ 5. e−1 | g ∈ G}| = 23 , then (r1 , r2 ) 6= (5, 5), and furthermore if (iii) If |{g2 e = 1, i.e. G ∼ = C2 × C2 × C2 , then r1 , r2 are not both odd. Proof. We first assume that G admits a ramification structure. Suppose that e−1 | g ∈ G} is of cardinality at most 22 , so that |G : Ωe−1 (G)| ≤ 22 . X = {g2 Then according to Theorem 2.3, G/Ωe−1 (G) does not admit a ramification structure. Thus, G has no ramification structure, as follows from Lemma 2.6(i). This is a contradiction. So we have |X| ≥ 23 . If the ramification structure for G is of size (r1 , r2 ), then we have r1 , r2 ≥ d + 1. By Theorem 2.3, ramification structures of G/Ωe−1 (G) have size (r, s) where r, s ≥ 5, and furthermore r, s are not both odd if |G/Ωe−1 (G)| = 23 . Hence, by part (i) of Lemma 2.6, we have r1 , r2 ≥ 5 and furthermore, if |G/Ωe−1 (G)| = 23 then (r1 , r2 ) 6= (5, 5). Finally if G ∼ = C2 × C2 × C2 then r1 , r2 are not both odd, by Theorem 2.3. We now work under the assumption |X| ≥ 23 . Suppose that r1 , r2 ≥ d+1, r1 , r2 ≥ 5 and furthermore that r1 , r2 are not both odd if |X| = 23 . Then by Theorem 2.3, G/Ωe−1 (G) admits a ramification structure of size (r1 , r2 ). Lemma 2.6(ii) implies that G admits a ramification structure of size (r1 , r2 ). It remains to prove that if r1 , r2 ≥ 5, (r1 , r2 ) 6= (5, 5) and both r1 , r2 are odd, then G admits a ramification structure of size (r1 , r2 ) under the assumptions |X| = 23 and e ≥ 2. We may assume that r2 ≥ 7. Then G/Ωe−1 (G) admits a ramification structure of size (r1 , r2 − 1). ON RAMIFICATION STRUCTURES FOR FINITE NILPOTENT GROUPS 9 Since G/G2 is elementary abelian of rank d and G/Ωe−1 (G) is of rank 3, we have Ωe−1 (G)/G2 is of rank d − 3. We take a generating set {n1 , . . . , nd−3 } of Ωe−1 (G) modulo G2 . Call n = n1 . . . nd−3 and let o(n) = 2k < 2e . If e−1 k−1 for some x ∈ G, then since x ∈ / Ωe−1 (G) we take a = x2 1 6= n2 generating set of G/Ωe−1 (G) containing x, say G/Ωe−1 (G) = hxi × hyi × hzi. e−1 k−1 for any g ∈ G, then we take any generating set 6= g2 Otherwise, if n2 of G/Ωe−1 (G). Now consider the following ramification structure of G/Ωe−1 (G):  U1 = xy, yz, xz, xyz, xyz, xy, . . . , xy and  U2 = x, y, z, x, y, z, x, . . . , x , where |U1 | = r1 and |U2 | = r2 −1. Since r1 ≥ d+1, by part (ii) of Proposition 2.1, we take a lift T1 of U1 so that T1 is a spherical system of generators of G. Then consider the following lift of U2 to G:  T2 = x, y, z, xn1 , yn2 , zn3 , xn4 , . . . , xnd−3 , x, . . . , x , where |T2 | = r2 − 1. Clearly, T2 generates G. Observe that the product of all components of T2 is n modulo G2 , i.e. the product is equal to wn for some w ∈ G2 . Now consider the following tuple:  T2∗ = w−1 x, y, z, xn1 , yn2 , zn3 , xn4 , . . . , xnd−3 , x, . . . , x, n−1 , where |T2 | = r2 . Since w ∈ G2 = Φ(G), it follows that T2∗ generates G and furthermore, it is spherical. Our claim is that (T1 , T2∗ ) is a ramification structure of size (r1 , r2 ) for G. Notice that all elements in T1 ∪ T2∗ are of order 2e except n−1 . Then by using the same argument in the proof of part (ii) of Lemma 2.6, we conclude that haig ∩ hbi = 1 for any g ∈ G, a ∈ T1 and b ∈ T2∗ r {n−1 }. On the e−1 e−1 e−1 k−1 then since hx2 i 6= ha2 ig for any g ∈ G and = x2 other hand, if n2 e−1 k−1 for any g ∈ G, 6= g2 a ∈ T1 , we have hni ∩ Σ(T1 ) = 1. Otherwise, if n2 then clearly hni ∩ Σ(T1 ) = 1. This completes the proof.  We close this section by showing that the assumption of being semi-pe−1 abelian is essential in Theorem A. As we next see, for a general finite p-group e−1 | g ∈ G} does not control the existence of G, the cardinality of the set {g p ramification structures for G. To this purpose, we will work with 2-generator p-groups constructed in [4]. For more details, we suggest readers to see pages 11-13 of [4]. Lemma 2.9. Let G be a Beauville group. Then G admits a ramification structure of size (r1 , r2 ) for any r1 , r2 ≥ 3. Proof. Assume that G is a Beauville group, that is, it admits a ramification structure (U1 , U2) of size (3, 3). Let U1 = x1 , y1 , (x1 y1 )−1 and let U2 = x2 , y2 , (x2 y2 )−1 . Consider the following tuples:  T1 = x1 , y1 , y1−1 , x−1 or T1 = U1 , 1 and T2 = x2 , y2 , y2−1 , x−1 2 x1 , x−1 1 x2 , x−1 2  or T2 = U2 . By adding to T1 and to T2 repeatedly, we obtain a pair of spherical systems of generators (T1∗ , T2∗ ) for G of size (r1 , r2 ) for any 10 Ş. GÜL r1 , r2 ≥ 3. Then since (U1 , U2 ) is a ramification structure for G, so does  (T1∗ , T2∗ ). The following result shows that the ‘only if’ part of Theorem A fails for a general finite p-group. Proposition 2.10. Let p ≥ 5 be a prime. Then there exists a p-group G such that: e−1 | g ∈ G}| = p. (i) If exp G = pe then |{gp (ii) G admits a ramification structure of size (r1 , r2 ) for any r1 , r2 ≥ 3. Proof. In the proof of Corollary 2.12 in [4], it was shown that there exists a e−1 Beauville p-group G with exp G = pe such that |Gp | = p. It then follows e−1 | g ∈ G}| = p and hence (i) holds. Since G is a Beauville group, that |{gp (ii) readily follows from Lemma 2.9.  Finally, the following result shows that for every power of p, there is a e−1 | g ∈ G} is exactly that p-group G such that the cardinality of the set {g p power and G does not admit a ramification structure. Proposition 2.11. For every prime p ≥ 5, and positive integer m, there exists a p-group G such that: e−1 | g ∈ G}| = pm . (i) If exp G = pe then |{gp (ii) G does not admit a ramification structure. Proof. Consider the group G in the second part of the proof of Corollary 2.12 in [4]. Then G is a 2-generator p-group G with exp G = pe such that e−1 |Gp | = pm for some m. One can also observe from the proof that the e−1 e−1 | g ∈ G}. Furthermore, it was coincides with the set {g p subgroup Gp shown that for every pair of generating sets (x1 , y1 ) and (x2 , y2 ), there are elements, say x1 and x2 , such that hxi1 i = hxj2 i 6= 1 for some integers i, j. Thus, G does not admit a ramification structure. Furthermore, Corollary 2.13 in [4] implies that m can be any positive integer.  3. Finite nilpotent groups In this section, we prove Theorem B. We give the possible sizes of ramification structures for nilpotent groups whose Sylow p-subgroups are semipe−1 -abelian if the exponent is pe . To this purpose, we need the following result regarding a direct product of groups of coprime order. Proposition 3.1. Let G and G∗ be groups of coprime order. Then the following hold: (i) If G and G∗ admit ramification structures of size (r1 , r2 ) and (r1∗ , r2∗ ), respectively, then G×G∗ admits a ramification structure of size (r, s) where r = max{r1 , r1∗ } and s = max{r2 , r2∗ }. (ii) If G × G∗ admits a ramification structure of size (r, s), then G and G∗ admit ramification structures of size (r1 , r2 ) and (r1∗ , r2∗ ), respectively, for some r1 , r1∗ ≤ r and r2 , r2∗ ≤ s. Furthermore, if G is of odd order, we also have r1 = r and r2 = s. ON RAMIFICATION STRUCTURES FOR FINITE NILPOTENT GROUPS 11 Proof. We first prove (i). Assume that (T1 , T2 ) and (T1∗ , T2∗ ) are ramification structures of size (r1 , r2 ) and (r1∗ , r2∗ ) for G and G∗ , respectively. Let r = max{r1 , r1∗ } and s = max{r2 , r2∗ }. Then by adding as many times the identity as needed to T1 , T2 , T1∗ and T2∗ , we obtain U1 , U2 , U1∗ and U2∗ where |U1 | = |U1∗ | = r and |U2 | = |U2∗ | = s. Let U1 = (x1 , . . . , xr ) and U1∗ = (x∗1 , . . . , x∗r ) U2 = (y1 , . . . , ys ), and U2∗ = (y1∗ , . . . , ys∗ ). Then let  A1 = (x1 , x∗1 ), . . . , (xr , x∗r ) and  A2 = . Observe that since G and G∗ have coprime order, both A1 and A2 generate G × G∗ . We will see that (A1 , A2 ) is a ramification structure for G × G∗ . Otherwise, there exist (a, a∗ ) ∈ A1 and (b, b∗ ) ∈ A2 such that (y1 , y1∗ ), . . . , (ys , ys∗ ) h(a, a∗ )i(g,g ∗) ∩ h(b, b∗ )i 6= {(1, 1)}, for some (g, g∗ ) ∈ G × G∗ . It then follows that either haig ∩ hbi = 6 1 or ∗ 6 1, which is a contradiction. ha∗ ig ∩ hb∗ i = Let us now prove (ii). Assume that   A1 = (x1 , x∗1 ), . . . , (xr , x∗r ) and A2 = (y1 , y1∗ ), . . . , (ys , ys∗ ) form a ramification structure of size (r, s) for G × G∗ . Assume that after deleting the identity element in (x1 , . . . , xr ) and (y1 , . . . , ys ) we get T1 = (z1 , . . . , zr1 ) and T2 = (t1 , . . . , tr2 ) for some r1 ≤ r and r2 ≤ s. We claim that (T1 , T2 ) is a ramification structure of size (r1 , r2 ) for G. The same arguments apply to G∗ . For every (a, a∗ ) ∈ A1 and (b, b∗ ) ∈ A2 we have (2) h(a, a∗ )i(g,g ∗) ∩ h(b, b∗ )i = {(1, 1)}, for all (g, g ∗ ) ∈ G × G∗ . Let |G| = l and |G∗ | = m, where gcd(l, m) = 1. Then by equation (2), we get h((am )g , 1)i ∩ h(bm , 1)i = {(1, 1)}, and hence ham ig ∩ hbm i = 1. Since gcd(l, m) = 1, it then follows that haig ∩ hbi = 1. Finally we assume that G is of odd order. If r − r1 is even, then we take T1 = (z1 , . . . , zr1 , z1 , z1−1 , . . . , z1 , z1−1 ). Now suppose that r − r1 is odd. Since G is of odd order, we have o(z1 ) 6= 2. Then in this case we take T1 = (z12 , z1−1 , z2 , . . . , zr1 , z1 , z1−1 , . . . , z1 , z1−1 ). In both cases, T1 is a spherical system of generators of G of size r. By using the same arguments, we can make |T2 | = s. Then by the previous paragraph, (T1 , T2 ) is a ramification structure of size (r, s) for G, as desired. This completes the proof.  The following proposition is easily deduced from Proposition 3.1. Proposition 3.2. Let G be a nilpotent group. Then (i) G admits a ramification structure if and only if all Sylow p-subgroups of G admit a ramification structure. (ii) If G is of odd order, then G admits a ramification structure of size (r1 , r2 ) if and only if all Sylow p-subgroups of G admit a ramification structure of size (r1 , r2 ). 12 Ş. GÜL In order to characterize abelian groups with ramification structures, Garion and Penegini [6] reduced the study to their Sylow p-subgroups. However, as far as the sizes of ramification structures are concerned, this reducing argument is not correct in general. More precisely, if G is an abelian group of even order, then the size of a ramification structure of G need not be inherited by the Sylow 2-subgroup of G, as we see in the next example. We fix this mistake in Theorem 3.4. Example 3.3. Let G = hai × hbi × hci ∼ = C6 × C6 × C2 . If we take T1 = (a, b, c, b−1 , (ac)−1 ), and T2 = (ab, ab, (ab)−2 , abc, (abc)−1 , a2 bc, (a2 bc)−1 ), then (T1 , T2 ) is a ramification structure of size (5, 7) for G . However, the Sylow 2-subgroup of G, which is C2 × C2 × C2 , does not admit a ramification structure of size (5, 7). We close the paper by proving Theorem B. Theorem 3.4. Let G be a nilpotent group, and let d = d(G). Let Gp denote the Sylow p-subgroup of G for every prime p dividing |G|. Suppose that exp Gp = pep and all Gp are semi-pep −1 -abelian. Then G admits a ramification structure of size (r1 , r2 ) if and only if the following conditions hold: (i) r1 , r2 ≥ d + 1. (ii) (r1 , r2 ) ∈ S(Gp ) for p odd. (iii) (r1 , r2 ) ∈ S(G2 ) unless G2 ∼ = C2 × C2 × C2 . ∼ (iv) If G2 = C2 × C2 × C2 then r1 , r2 ≥ 5 and (r1 , r2 ) 6= (5, 5). Furthermore, if G ∼ = C2 × C2 × C2 then r1 , r2 are not both odd. Proof. We first assume that (r1 , r2 ) ∈ S(G). We know that (i) holds, and by Proposition 3.1(ii), we have (ii). We next assume that G2 6= 1. Then again by Proposition 3.1(ii), G2 admits a ramification structure of size (r, s) for some r ≤ r1 and s ≤ r2 . Then by Theorem 2.8, r, s ≥ 5, and furthermore (r, s) 6= (5, 5) if |{ge2 −1 | g ∈ G2 }| = 23 . This implies that r1 , r2 ≥ 5, and furthermore (r1 , r2 ) 6= (5, 5) if |{g e2 −1 | g ∈ G2 }| = 23 . Then the first part of (iv) follows, and (iii) follows from Theorem 2.8. Finally if G ∼ = C2 × C2 × C2 then r1 , r2 are not both odd, by Theorem 2.3. Conversely, assume that conditions (i)-(iv) hold. Then all Gp admit a ramification structure of size (r1 , r2 ) unless G2 ∼ = C2 × C2 × C2 . Thus, if G2 ∼ 6 C2 × C2 × C2 , by Proposition 3.1(i), we conclude that G admits a = ramification structure of size (r1 , r2 ). Finally we assume that conditions (i)-(iv) hold and G2 = hxi× hyi× hzi ∼ = C2 × C2 × C2 . If G = G2 then we already know the result, by Theorem 2.8. Thus, we assume that G 6= G2 . Let R be the direct product of the Sylow p-subgroups of G for all odd primes p dividing |G|. Then Proposition 3.2(ii), together with condition (ii), implies that R admits a ramification structure of size (r1 , r2 ). If r1 , r2 are not both odd, then G2 also admits a ramification structure of size (r1 , r2 ). Otherwise, if both r1 , r2 are odd, then we may assume that r2 ≥ 7, and thus G2 admits a ramification structure of size (r1 , r2 − 1), by ON RAMIFICATION STRUCTURES FOR FINITE NILPOTENT GROUPS 13 Theorem 2.3. Then in both cases, Proposition 3.1(i) implies that G = R×G2 admits a ramification structure of size (r1 , r2 ). This completes the proof.  Acknowledgments I would like to thank G. A. Fernández-Alcober for intense discussions and his feedbacks. References [1] N. Boston, A survey of Beauville p-groups, in Beauville Surfaces and Groups, editors I. Bauer, S. Garion, A. Vdovina, Springer Proceedings in Mathematics & Statistics, Volume 123, Springer, 2015, pp. 35–40. [2] B. Fairbairn, Recent work on Beauville surfaces, structures and groups, in Groups St Andrews 2013, editors C.M. Campbell, M.R. Quick, E.F. Robertson and C.M. Roney-Dougal, London Mathematical Society Lecture Note Series, Volume 422, 2015, pp. 225–241. [3] G.A. Fernández-Alcober, Omega subgroups of powerful p-groups, Israel J. Math., 162 (2007), 75–79. [4] G.A. Fernández-Alcober and Ş. Gül, Beauville structures in finite p-groups, J. Algebra, 474 (2017), 1–23. [5] S. Garion and M. Penegini, New Beauville surfaces and finite simple groups, Manuscripta Math., 142 (2013), 391–408. [6] S. Garion and M. Penegini, Beauville surfaces, moduli spaces and finite groups, Comm. Algebra, 42 (2014), 2126–2155. [7] G. Jones, Beauville surfaces and groups: a survey, in Rigidity and Symmetry, editors R. Connelly, A.I. Weiss, W. Whiteley, Fields Institute Communications, Volume 70, Springer, 2014, pp. 205–225. [8] L. Ribes and P. Zalesskii, Profinite Groups, second edition, Springer, 2010. [9] D.J.S. Robinson, A Course in the Theory of Groups, second edition, Springer, 1996. [10] M. Suzuki, Group Theory II , Springer, 1986. [11] M. Xu, A class of semi-p-abelian p-groups, Kexue Tongbao 27 (1982), 142–146. Department of Mathematics, University of the Basque Country UPV/EHU, 48080 Bilbao, Spain E-mail address: [email protected]
4math.GR
arXiv:1711.08725v1 [cs.CV] 23 Nov 2017 Parallel transport in shape analysis: a scalable numerical scheme Maxime Louis†12 , Alexandre Bône†12 , Benjamin Charlier23 , Stanley Durrleman12 , and the Alzheimer’s Disease Neuroimaging Initiative 1 Sorbonne Universités, UPMC Université Paris 06, Inserm, CNRS, Institut du Cerveau et de la Moelle (ICM) – Hôpital Pitié-Salpêtrière, 75013 Paris, France, 2 Inria Paris, Aramis project-team, 75013 Paris, France, 3 Université de Montpellier, France Abstract. The analysis of manifold-valued data requires efficient tools from Riemannian geometry to cope with the computational complexity at stake. This complexity arises from the always-increasing dimension of the data, and the absence of closed-form expressions to basic operations such as the Riemannian logarithm. In this paper, we adapt a generic numerical scheme recently introduced for computing parallel transport along geodesics in a Riemannian manifold to finite-dimensional manifolds of diffeomorphisms. We provide a qualitative and quantitative analysis of its behavior on high-dimensional manifolds, and investigate an application with the prediction of brain structures progression. 1 Introduction Riemannian geometry is increasingly meeting applications in statistical learning. Indeed, working in flat space amounts to neglecting the underlying geometry of the laws which have produced the considered data. In other words, such a simplifying assumption ignores the intrinsic constraints on the observations. When prior knowledge is available, top-down methods can express invariance properties as group actions or smooth constraints and model the data as points in quotient spaces, as for Kendall shape space. In other situations, manifold learning can be used to find a low-dimensional hypersurface best describing a set of observations. Once the geometry has been modeled, classical statistical approaches for constrained inference or prediction must be adapted to deal with structured data, as it is done in [4,5,11,13]. Being an isometry, the parallel transport arises as a natural tool to compare features defined at different tangent spaces. In a system of coordinates, the parallel transport is defined as the solution to an ordinary differential equation. The integration of this equation requires to compute the Christoffel symbols, which are in general hard to compute –e.g. in the case of the Levi-Civita connection– and whose number is cubic in the dimension. The Schild’s ladder [5], later improved into the Pole ladder [7] when transporting along geodesics, is a more geometrical approach which only requires † Equal contributions. the computation of Riemannian exponentials and logarithms. When the geodesic equation is autonomous, the scaling and squaring procedure [6] allows to compute exponentials very efficiently. In Lie groups, the Baker-Campbell Haussdorff formula allows fast computations of logarithms with a controlled precision. In such settings, the Schild’s ladder is computationnally tractable. However, no theoretical study has studied the numerical approximations or has provided a convergence result. In addition, in the more general case of Riemannian manifolds, the needed logarithm operators are often computationally intractable. The Large Deformation Diffeomorphic Metric Mapping (LDDMM) framework [1] focuses on groups of diffeomorphisms, for shape analysis. Geodesic trajectories can be computed by integrating the Hamiltonian equations, which makes the exponential operator computationally tractable, when the logarithm remains costly and hard to control in its accuracy. In [12] is suggested a numerical scheme which approximates the parallel transport along geodesics using only the Riemannian exponential and the metric. The convergence is proved in [8]. In this paper, we translate this so-called fanning sheme to finite-dimensional manifolds of diffeomorphisms built within the LDDMM framework [2]. We provide a qualitative and quantitative analysis of its behavior, and investigate a high-dimensional application with the prediction of brain structures progression. Section 2 gives the theoretical background and the detailed steps of the algorithm, in the LDDMM context. Section 3 describes the considered application and discusses the obtained results. Section 4 concludes. 2 2.1 Theoretical background and practical description Notations and assumptions Let M be a finite-dimensional Riemannian manifold with metric g and tangent space norm k · kg . Let γ : t → [0, 1] be a geodesic whose coordinates are known at all time. Given t0 , t ∈ [0, 1], the parallel transport of a vector w ∈ Tγ(s) M from γ(t0 ) to γ(t) along γ will be noted Pt0 ,t (w) ∈ Tγ(t) M. We recall that this mapping is uniquely defined by the integration from u = t0 to t of the differential equation ∇γ̇(u) Pt0 ,u (w) = 0 with Pt0 ,t0 (w) = w where ∇ is the LeviCivita covariant derivative. We denote Exp the exponential map, and for h small enough we define Jw γ(t) (h), the Jacobi Field emerging from γ(t) in the direction w ∈ Tγ(t) M by: Jw γ(t) (h) = 2.2 ∂ ∂ε ε=0  Expγ(t) h [γ̇(t) + εw] ∈ Tγ(t+h) M. (1) The key identity The following proposition relates the parallel transport to a Jacobi field [12]: Proposition. For all t > 0 and w ∈ Tγ(0) M, we have: P0,t (w) = Jw γ(0) (t) t  + O t2 . (2) Proof. Let X(t) be the time-varying vector field corresponding to the parallel i transport of w, i.e. such that Ẋ i + Γkl X l γ̇ k = 0 with X(0) = w. At t = 0, in normal coordinates the differential equation simplifies into Ẋ i (0) = 0. Besides, near t = 0 in the same local chart, the Taylor expansion of X(t) writes X i (t) = wi + O t2 . Noticing that the ith normal coordinate of Expγ(0) (t [γ̇(t) + εw]) ∂ is t(v0i + εwi ), the ith coordinate of Jw γ(0) (t) = ∂ε |ε=0 Expγ(0) (t [γ̇(0) + εw]) is therefore twi , and we thus obtain the desired result. Subdividing [0, 1] into N intervals and iteratively computing the Jacobi fields should therefore approach the parallel transport P0,1 (w). With   an error in O N12 at each step, a global error in O N1 can be expected. We propose below an implementation of this scheme in the context of a manifold of diffeomorphisms parametrized by control points and momenta. Its convergence  with a rate of O N1 is proved in [8]. 1 w 1 N Jγ(k/N ) ( N ) 2.3 The chosen manifold of diffeomorphisms The LDDMM-derived construction proposed in [2] provides an effective way to build a finite-dimensional manifold of diffeomorphims acting on the d-dimensional ambient space Rd . Time-varying vector fields vt (.) are generated by the convolu  tion of a Gaussian kernel k(x, y) = exp −kx − yk2 /2σ 2 over ncp time-varying control points = [ci (t)]i , weighted by ncp associated momenta α(t) = [αi (t)]i , Pc(t) ncp i.e. vt (.) = i=1 k [. , ci (t)] αi (t). The set of such vector fields forms a Reproducible Kernel Hilbert Space (RKHS). Those vector fields are then integrated along ∂t φt (.) = vt [φ(.)] from φ0 = Id into a flow of diffeomorphisms. In [10], the authors showed that the kernelinduced distance between φ0 and φ1 –which can be seen as the deformation kinetic energy– is minimal i.e. the obtained flow is geodesic when the control points and momenta satisfy the Hamiltonian equations : ċ(t) = Kc(t) α(t), α̇(t) = −  1 gradc(t) α(t)T Kc(t) α(t) , 2 (3) where Kc(t) is the kernel matrix. A diffeomorphism is therefore fully parametrized by its initial control points c and momenta α. Those Hamiltonian equations can be integrated with a Runge-Kutta scheme without computing the Christoffel symbols, thus avoiding the associated curse of dimensionality. The obtained diffeomorphisms then act on shapes embedded in Rd , such as images or meshes. For any set of control points c = (ci )i∈{1,..,n} , we define the finite-dimensional  subspace Vc = span k(., ci )ξ | ξ ∈ Rd , i ∈ {1, .., n} of the vector fields’ RKHS. We fix an initial set c = (ci )i∈{1,..,n} of distinct control points and define the set Gc = {φ1 | ∂t φt = vt ◦ φt , v0 ∈ Vc , φ0 = Id}. Equipped with Kc(t) as –inverse– metric, Gc is a Riemannian manifold such that Tφ1 Gc = Vc(1) , where for all t in [0, 1], c(t) is obtained from c(0) = c through the Hamiltonian equations (3) [9]. 2.4 Summary of the algorithm We are now ready to describe the algorithm on the Riemannian manifold Gc . Algorithm. Divide [0, 1] into N intervals of length h = N1 where N ∈ N. We note ωk the momenta of the transported diffeomorphism, ck the control points k . Iteratively : and αk the momenta of the geodesic γ at time N (i) Compute the main geodesic control points ck+1 and momenta αk+1 , using a Runge-Kutta 2 method. (ii) Compute the control points c±h k+1 of the perturbed geodesics γ±h with initial momenta and control points (αk ±hωk , ck ), using a Runge-Kutta 2 method. (iii) Approximate the Jacobi field Jk+1 by central finite difference : Jk+1 = −h c+h k+1 − ck+1 . 2h (4) (iv) Compute the transported momenta ω̃k+1 according to equation (2) : Kck+1 ω̃k+1 = Jk+1 . h (5) (v) Correct this value with ωk+1 = βk+1 ω̃k+1 +δk+1 αk+1 , where βk+1 and δk+1 are normalization factors ensuring the conservation of kωkVc = ωkT Kck ωk and of hαk , ωk ick = αkT Kck ωk . As step of the scheme is illustrated in Figure 1. The Jacobi field is computed with only four calls to the Hamiltonian equations. This operation scales quadratically with the dimension of the manifold, which makes this algorithm practical in high dimension, unlike Christoffel-symbol-based solutions. Step (iv) –solving a linear system of size ncp – is the most expensive one, but remained within reasonable computational time in the investigated examples. Fig. 1: Step of the parallel transport of the vector w (blue arrow) along the geodesic γ (solid black curve). Jw γ is computed by central finite difference with the perturbed geodesics γε and γ− , integrated with a second-order Runge-Kutta scheme (dotted black arrows). A fan of geodesics is formed. In [8], the authors prove the convergence of this scheme, and show that the error increases linearly with the size of the step used. The convergence is guaranteed as long as the step (ii) is performed with a method of order at least two. A first order method in step (iii) is also theoretically sufficient to guarantee convergence. Those variations will be studied in Section 3.3. 3 3.1 Application to the prediction of brain structures Introducing the exp-parallelization concept Fig. 2: Time-reparametrized exp-parallelization of a reference geodesic model. The black dots are the observations, on which are fitted a geodesic regression (solid black curve, parametrized by the blue arrow) and a matching (leftmost red arrow). The red arrow is then parallel-transported along the geodesic, and exponentiated to define the exp-parallel curve (black dashes). Fig. 3: Illustration of the exp-parallelization concept. Top row: the reference geodesic at successive times. Bottow row: the exp-parallel curve. Blue arrows: the geodesic momenta and velocity field. Red arrows: the momenta describing the initial registration with the target shape and its transport along the geodesic. Exploiting the fanning scheme described in Section 2.4, we can paralleltransport any set of momenta along any given reference geodesic. Figure 2 illustrates the procedure. The target shape is first registered to the reference geodesic : the diffeomorphism that best transforms the chosen reference shape into the target one is estimated with a gradient descent algorithm on the initial control points and momenta [2]. Such a procedure can be applied generically to images or meshes. Once this geodesic is obtained, its initial set of momenta is parallel-transported along the reference geodesic. Taking the Riemannian exponential of the transported vector at each point of the geodesic defines a new trajectory, which we will call exp-parallel to the reference one. As pointed out in [5], the parallel transport is quite intuitive in the context of shape analysis, for it is an isometry which transposes the evolution of a shape into the geometry of another shape, as illustrated by Figure 3. 3.2 Data and experimental protocol Repeated Magnetic Resonance Imaging (MRI) measurements from 71 subjects are extracted from the ADNI database and preprocessed through standard pipelines into affinely co-registered surface meshes of hippocampi, caudates and putamina. The geometries of those brain sub-cortical structures are altered along the Alzheimer’s disease course, which all considered subjects finally convert to. Two subjects are successively chosen as references, for they have fully developed the disease within the clinical measurement protocol. As illustrated on Figure 2, a geodesic regression [3] is first performed on each reference subject to model the observed shape progression. The obtained trajectory on the chosen manifold of diffeomorphisms is then exp-parallelized into a shifted curve, which is hoped to model the progression of the target subject. To account for the variability of the disease dynamics, for each subject two scalar coefficients encoding respectively for the disease onset age and the rate of progression are extracted from longitudinal cognitive evaluations as in [11]. The exp-parallel curve is time-reparametrized accordingly, and finally gives predictions for the brain structures. In the proposed experiment, the registrations and geodesic regressions typically feature around 3000 control points in R3 , so that the deformation can be seen as an element of a manifold of dimension 9000. 3.3 Estimating the error associated to a single parallel transport To study the error in this high-dimensional setting, we compute the parallel transport for a varying number of discretization steps N , thus obtaining increasingly accurate estimations. We then compute the empirical relative errors, taking the most accurate computation as reference. Arbitrary reference and target subjects being chosen, Figure 4 gives the results for the proposed algorithm and three variations : without enforcing the conservations at step (v) [WEC], using a Runge-Kutta of order 4 at step (ii) [RK4], and using a single perturbed geodesic to compute J at step (iii) [SPG]. Empirical relative error (%) Fig. 4: Empirical relative error of the parallel transport in a highdimensional setting. In black the proposed algorithm, in green the WEC variant, in red the RK4 variant, and in blue the SPG one. 0.5 0 0.005 0.01 0.015 0.02 0.025 Length of the step h = 0.03 0.035 1 N We recover a linear behavior with the length of the step N1 in all cases. The SPG variant converges much slower, and is excluded from the following considerations. For the other algorithms, the empirical relative error remains below 5% with 15 steps or more, and below 1% with 25 steps or more. The slopes of the asymptotic linear behaviors, estimated with the last 10 experimental measurements, range from 0.10 for the RK4 method to 0.13 for the WEC one. Finally, an iteration takes respectively 4.26, 4.24 and 8.64 seconds for the proposed algorithm, the WEC variant and the RK4 one. Therefore the initially detailed algorithm in section 2.4 seems to achieve the best tradeoff between accuracy and speed in the considered experimental setting. 3.4 Prediction performance Table 1 gathers the predictive performance of the proposed exp-parallelization method. The performance metric is the Dice coefficient, which ranges from 0 for disjoint structures to 1 for a perfect match. A Mann-Witney test is performed to quantify the significance of the results in comparison to a naive methodology, which keeps constant the baseline structures over time. Considering the very high dimension of the manifold, failing to accurately capture the disease progression Method [exp] [ref] Predicted follow-up visit M36 M48 M60 M12 M24 M72 M96 N=140 N=134 N=123 N=113 N=81 N=62 N=17 .882 .884 .852 .852  .825 ∗ .809 ∗  .796 ∗ ∗ .764 ∗  .768 ∗ .734 ∗  .756 ∗ ∗ .706 ∗  .730 ∗ .636 ∗ Table 1: Averaged Dice performance measures. In each cell, the first line gives the average performance of the exp-parallelization-based prediction [exp], and the second line the reference one [ref]. Each column corresponds to an increasingly remote predicted visit from baseline. Significance levels [.05, .01, .001]. trend can quickly translates into unnatural predictions, much worse than the naive approach. The proposed paradigm significantly outperforms the naive prediction three years or later from the baseline, thus demonstrating the relevance of the expparallelization concept for disease progression modeling, made computationally tractable thanks to the operational qualities of the fanning scheme for highdimensional applications. 4 Conclusion We detailed the fanning scheme for parallel transport on a high-dimensional manifold of diffeomorphisms, in the shape analysis context. Our analysis unveiled the operational qualities and computational efficiency of the scheme in high dimensions, with a empirical relative error below 1% for 25 steps only. We then took advantage of the parallel transport for accurately predicting the progression of brain structures in a personalized way, from previously acquired knowledge. References 1. Beg, M.F., Miller, M.I., Trouvé, A., Younes, L.: Computing large deformation metric mappings via geodesic flows of diffeomorphisms. Int J Comput Vis (2005) 2. Durrleman, S., Allassonnière, S., Joshi, S.: Sparse adaptive parameterization of variability in image ensembles. Int J Comput Vis 101(1), 161–183 (2013) 3. Fletcher, T.: Geodesic regression and the theory of least squares on Riemannian manifolds. Int J Comput Vis 105(2), 171–185 (2013) 4. Lenglet, C., Rousson, M., Deriche, R., Faugeras, O.: Statistics on the manifold of multivariate normal distributions: theory and application to diffusion tensor MRI processing. Journal of Mathematical Imaging and Vision 25(3), 423–444 (2006) 5. Lorenzi, M., Ayache, N., Pennec, X.: Schild’s ladder for the parallel transport of deformations in time series of images. IPMI pp. 463–474 (2011) 6. Lorenzi, M., Pennec, X.: Geodesics, parallel transport & one-parameter subgroups for diffeomorphic image registration. Int J Comput Vis 105(2), 111–127 (Nov 2013) 7. Lorenzi, M., Pennec, X.: Parallel transport with pole ladder: Application to deformations of time series of images. In: Geometric Science of Information. vol. 8085, pp. 68–75 (2013) 8. Louis, M., Charlier, B., Jusselin, P., Pal, S., Durrleman, S.: A fanning scheme for the parallel transport along geodesics on Riemannian manifolds (Jul 2017), https://hal.archives-ouvertes.fr/hal-01560787 9. Micheli, M.: The differential geometry of landmark shape manifolds: metrics, geodesics, and curvature. Ph.D. thesis, Providence, RI, USA (2008), aAI3335682 10. Miller, M.I., Trouvé, A., Younes, L.: Geodesic shooting for computational anatomy. Journal of Mathematical Imaging and Vision 24(2), 209–228 (2006) 11. Schiratti, J.B., Allassonnière, S., Colliot, O., Durrleman, S.: Learning spatiotemporal trajectories from manifold-valued longitudinal data. In: NIPS 2015 12. Younes, L.: Jacobi fields in groups of diffeomorphisms and applications. Quarterly of Applied Mathematics 65(1), 113–134 (2007) 13. Zhang, Miaomiao, Fletcher, P.: Probabilistic principal geodesic analysis. Advances in Neural Information Processing Systems 26 pp. 1178–1186 (2013)
1cs.CV
Preprint: ADP-15-50/T952 ON THE NETWORK TOPOLOGY DEPENDENT SOLUTION COUNT OF THE ALGEBRAIC LOAD FLOW EQUATIONS arXiv:1512.04987v1 [math.OC] 15 Dec 2015 TIANRAN CHEN† AND DHAGASH MEHTA‡ § Abstract. A large amount of research activity in power systems areas has focused on developing computational methods to solve load flow equations where a key question is the maximum number of isolated solutions. Though several concrete upper bounds exist, recent studies have hinted that much sharper upper bounds that depend the topology of underlying power networks may exist. This paper establishes such a topology dependent solution bound which is actually the best possible bound in the sense that it is always attainable. We also develop a geometric construction called adjacency polytope which accurately captures the topology of the underlying power network and is immensely useful in the computation of the solution bound. Finally we highlight the significant implications of the development of such solution bound in solving load flow equations. 1. Introduction. Engineers are regularly required to perform power flow computations for designing, operating, and controlling power systems [36]. The solutions of the power flow or load flow equations, a system of multivariate nonlinear equations, are used to ensure the normal operating conditions as well as to perform contingency, stability, and bifurcations analysis. In addition, these solutions, which we refer to as solutions of the load flow equations from now on, are also important in system security assessment and optimal dispatching. In general, load flow equations may have more than one solutions [34]. There are indeed quite a few existing methods for finding one or many load flow solutions [1, 5, 8–10, 16, 18–20, 23, 30, 31, 38, 41, 43–45, 47, 49, 52, 54, 57–60, 62, 63] (see [48] for a recent review). Out of the few methods that guarantee to find all load flow solutions, i.e., the interval based approach [57], Gröbner bases technique [16,54,58,59] and the numerical polynomial homotopy continuation (NPHC) method [8, 9, 41, 47, 49, 60], the NPHC method appears most promising in scalability with increasing system sizes in that it has already found all load flow solutions of up to IEEE 14 bus systems [49] (and 18 oscillators case for the Kuramoto model [47]) and is inherently parallel: formulating load flow equations as system of polynomial equations, the NPHC method, whose roots are in complex algebraic geometry, finds all isolated complex systems which obviously include all the isolated real solutions. In all these computational methods, the knowledge of the number of solutions play a crucially important role. While several concrete upper bounds exist, several studies [25, 53] has hinted that much sharper upper bounds that depend the topology of underlying power networks may exist. The main goal of this paper is to establish such a topology dependent solution bound. The remainder of the paper is organized as follows: In Sec. 2, we set up a formulation of the algebraic load flow equations, define the problems precisely, and provide a brief historical account on the available results. Sec. 3 describes our rigorous results: in Sec. 3.1 we describe the tight bound, called the BKK bound, on the number of isolated complex solutions for our systems. We also refine the BKK bound in the context of algebraic load flow systems. In Sec. 3.2 we introduce a novel upper bound called adjacency polytope (AP) bound. Sec. 3.3 discusses the computational issues, and in Sec. 3.4 we highlight the significant implications of the development of these solution bounds in homotopy methods for solving load flow equations. In Sec. 4, we compute the BKK and AP bounds and the actual number of complex solutions for numerous power network examples from literature and compare with the previously known bounds. In Sec. 6, we discussion our results in a larger context and conclude. 2. Algebraic formulation. In this paper, we focus on the mathematical abstraction of a power network which is captured by a graph G = (B, E) together with a complex matrix Y = (Yij ). Here B is the finite set of nodes representing the “buses”, E is the set of edges (also called lines or branches) representing the connections between buses, and the matrix Y is the nodal admittance matrix 1 which assigns a nonzero † Dept. of Mathematics, Michigan State University, East Lansing, MI USA. of Applied and Computational Mathematics and Statistics, University of Notre Dame, Notre Dame, IN 46556, USA. § Centre for the Subatomic Structure of Matter, Department of Physics, School of Physical Sciences, University of Adelaide, Adelaide, South Australia 5005, Australia. 1 As such, the nodal admittance matrix Y already captures the graph topology since its sparsity pattern describes precisely the edges and hence the topology of the graph G = (B, E). However, since we often make separate use of the graph topology and the nodal admittance information, it is therefore convenient to explicitly extract the graph structure G and keep it separate ‡ Dept. 1 complex value Yij (mutual admittances) to each edge in (i, j) ∈ E. For any (i, j) ∈ / E (i.e., nodes i and j are not directly connected), Yij = Yji = 0. Here, Y is not assumed to be symmetric, but we require Yij and Yji to be either both zero or both nonzero (i.e., the underlying graph is “undirected”). As a convention, we further require all nodes to be connected with itself via a “loop” to reflect the nonzero diagonal entries Yii known as the self-admittances. That is, we require (i, i) ∈ E for any i ∈ B. For brevity, we define n to be the number of non-reference buses (i.e., |B| = n + 1) and label the nodes by integers 0, 1, 2, . . . , n. The corresponding complex valued voltages will be denoted by v0 , v1 , . . . , vn . Here we fix node 0 to be the designated reference bus for which the voltage is fixed to a nonzero real number, that is, v0 ∈ R is a nonzero constant. In this setup, the load flow equation takes the form of Si = n X Yij∗ vi vj∗ for i = 1, . . . , n, (1) j=0 which is a system of n equations in the n variables v1 , . . . , vn since v0 , corresponding to the reference bus, is fixed (and hence not a variable). Here vi∗ and Yij∗ denotes the complex conjugates of vi and Yij respectively, and Si ∈ C are the injected power. The equations 1 may represent either a transmission or a distribution network, with PQ buses. It is the network topology along with other features that can distinguish these cases: a mesh topology would usually correspond to transmission networks, whereas radial (tree-like) topology would correspond to distribution networks. A solution to (1) is said to be isolated if it is the only solution in a sufficiently small neighborhood. i.e., an isolated solution has no degree of freedom. Solutions with some vk = 0 are said to be deficient, and non-deficient otherwise. By a standard application of Sard’s Theorem [60], it can be verified that under a generic perturbation of S1 , . . . , Sn , the system (1) has no deficient solutions (though not a completely unlikely case in some load flow systems). We therefore focus only on the non-deficient solutions. The problem central to this paper is a counting problem for the isolated non-deficient load flow solutions: Problem Statement 1. For a power network, what is the maximum number of isolated non-deficient solutions to the system (1)? Following the fruitful algebraic approach taken by works such as [3, 42], we shall “embed” this problem into a bigger algebraic root counting problem: That is, we consider a polynomial system whose solution set captures all the solutions of the above (non-algebraic) system. To that end, we introduce new variables uk = vk∗ for each k = 0, . . . , n. (2) Substituting them into (1), we obtain the system of algebraic equations Sj = n X ∗ Yjk vj uk for j = 1, . . . , n. (3) k=0 This is a system of n equations in 2n variables. However, a “square” system where the number of variables and equations match is often much more convenient from an algebraic point of view. We therefore extract n hidden equations by taking the complex conjugate of both sides of each of the above equations and obtain Sj∗ = n X ∗ (Yjk vj uk )∗ = k=0 n X Yjk uj vk for j = 1, . . . , n. (4) k=0 We now sever the tie between u = (u1 , . . . , un ) and v = (v1 , . . . , vn ) and consider them to be variables independent from one another. That is, we ignore (2). Then (3) and (4) combine into a system of 2n from Y . 2 polynomial equations in the 2n variables: Pn ∗   k=0 Y1k v1 uk − S1 = 0    .  ..    P   ∗  nk=0 Ynk vn uk − Sn = 0 PG,Y (v1 , . . . , vn , u1 , . . . , un ) = P n  ∗   k=0 Y1k u1 vk − S1 = 0    ..   .    Pn ∗ k=0 Ynk un vk − Sn = 0. (5) Note that here the values of v0 and u0 are fixed, as they correspond to the reference node and are hence constants in the above system. For brevity, this system will be referred to as the algebraic load flow equations in the following discussions. This formulation first appeared in [42] to the best of our knowledge. Other polynomial formulations of the load flow equations have been also known (see, e.g., [2, 3, 8, 9, 46, 49]). It is worth noting that in PG,Y , the topology (i.e., the edges) of the underlying power network, in a sense, is encoded in the set of monomials while entries of Y appear as the coefficients. Developing a solution count that exploits network topology via the monomial structure is the main goal of the current article. Clearly, for every solution v = (v1 , . . . , vn ) of the original (non-algebraic) system (1), we naturally have PG,Y (v, v∗ ) = 0. That is, the solution set of PG,Y = 0 captures all solutions of the original (nonalgebraic) load flow system (1). In the following we shall focus on the following root counting problem: Problem Statement 2. Among the power networks of a given topology provided by a graph G, what is the maximum number of isolated solutions of PG,Y in (C \ {0})2n for all possible choices of Y ? Here, the phrase “maximum number” means the lowest upper bound that is also attainable and shall be distinguished from a mere “upper bound”. Of course, the existence of such a “maximum number” is not a priorily guaranteed, after all the lowest upper bound taken over an infinite family (choices of Y ’s), even if exists, may not be attainable. One of the goals of this paper is to establish the validity of the above question. Clearly, any answer to Problem 2 provides an upper bound for the answer to Problem 1. Various upper bounds for Problem 2 have been proposed in the past (see [53] for a recent review). The classical Bézout number (CB number) provides a simple upper bound: it is the product of the degrees of each polynomial equation in (5) (hence also known as the total degree). It is a basic fact in algebraic geometry that the number of isolated complex solutions of a polynomial system is bounded above by the CB number. Therefore, for a power network of n (non-reference) buses, and one reference bus, the CB bound is 22n , since there are 2n equations in (5) each of degree 2. A much tighter upper bound on the number of isolated  complex solutions, 2n n , was derived for the special case of completely interconnected lossless networks with all nodes being power-voltage nodes in Ref. [3] and then for the general case in Ref. [42] (see [46] for a recent alternative derivation of this bound). We shall refer to this bound as the Baillieul-Byrne-Li-Sauer-Yorke (BBLSY) bound. However, neither of these bounds exploit the network topology of a given power system. The link between network topology and complex solution count was first hinted in [25], however, a concrete and computable answer remains elusive. In a recent study [53], with extensive numerical experiments via the NPHC methods, it was observed that the number of isolated complex solutions is generally significantly lower than both the CB and BBLSY bound for sparsely connected graphs. Based on these observations, it was anticipated that the key to exploiting the network structure of the power system may be to exploit the underlying topology of the power system. In the present work, we show that this maximum number exists and it is essentially the BernshteinKushnirenko-Khovanskii (or BKK) bound. We then develop a novel approximation of this maximum number, the “adjacency polytope” (or AP) bound, which has tremendous computational advantage over the BKK bound. Moreover, we show, via experiments, that the AP bound is exactly the BKK bound for many concrete cases, making it an ideal surrogate for the BKK bound. 3. The Maximum Number of Solutions. We shall focus on Problem 2 and show that the BKK bound provides the best possible bound for any given power network topology which is always attainable 3 by some choice of the Y -matrix. Then in §3.2 we propose a simplified formulation that is easier to compute and analyze. Computational issues are explored in §3.3. 3.1. The BKK bound. Problem 2 is a special case of the root counting problem for systems of polynomial equations which is an important problem in algebraic geometry and mathematics in general that has wide range of applications [55, 56, 60]. Two basic root counts are provided by the CB and BBLSY bounds described above. One common weakness of these two upper bounds is that they only utilize the rather incomplete information about the polynomial system — the degree (or “multi-degree” of the polynomials). In the context of the algebraic load flow equation, this means that they do not take into consideration the topology of the underlying power network. Following up from the observations in Ref. [53] we refine these bounds using the theory of BKK bound [4] which accurately captures the network topology of the power systems. Here we state the powerful, albeit abstract, Bernshtein’s theorem in the context of the algebraic load flow equation. Theorem 1 (Bershtein [4]). Consider the algebraic load flow system of 2n polynomial equations (5) in 2n variables. (A) The number of isolated solutions the system has in (C \ {0})2n is bounded above by the mixed volume of the Newton polytopes of the 2n equations. (B) Without enforcing the conjugate relations among the coefficients2 there is a nonempty Zariski open set of coefficients for which all solutions of the system (5) in (C \ {0})2n are isolated and the total number is exactly the upper bound given in (A). The technical terms are explained in Appendix A for completeness. Here, it is sufficient to take the following interpretation: Part (A) establishes a computable upper bound for the number of isolated solutions that depends on the geometric configuration of the monomial structure, and part (B) shows this upper bound is generically exact.3 The original proof was given in [4]. An alternative proof that gives rise to the development of polyhedral homotopy is developed in [28]. More detail can be found in references such as [15,29,41]. In [7], the root count in the above theorem was nicknamed the BKK bound4 after the works of Bernshtein [4], Kushnirenko [37], and Khovanskii [33]. In general, it provides a much tighter bound on the number of isolated zeros of a polynomial system compared to variants of Bézout bounds. More importantly, it is sensitive to the monomial structure and hence the topology of the underlying power network. It is important to note that the “generic exactness” expressed in part (B) of the above theorem only holds when one ignores the tie between Yij and Yij∗ as well that between Si and Si∗ . That is, one must allow Yij and Yij∗ to vary independently in interpreting the above theorem. We shall now bring back the restriction that all the (Yij , Yij∗ ) and (Si , Si∗ ) must be conjugate pairs and investigate the sharpness of the BKK bound under these restriction. Since the BKK bound is sensitive to the monomial structure in the equation (5) and hence topology of the underlying power network, we shall fix the network topology in the following discussion. That is, we shall fix the sparsity pattern of the Y matrix but allow its entries to vary among the set of nonzero complex numbers. In the following, we shall establish that within the set of admittance matrices of the same sparsity pattern: The BKK bound of the algebraic load flow equations is always exact for some choices of the admittance matrix. In other words, we have the following assertions: Theorem 2. Given a graph G, there exists an admittance matrix Y on G for which the number of isolated solutions of the corresponding algebraic load flow equation PG,Y in (C \ {0})2n is exactly the BKK bound. Proof. For convenience, let Z = (Z1 , . . . , Z` ) which collect all the nonzero entries of Yjk and Sj . That is, Z contains all the nonzero coefficients in (5). By the interpretation given in Appendix B, we simply have to show that there exists a choice of Z ∈ (C \ {0})` such that D(Z, Z ∗ ) 6= 0. ∗ and S ∗ in (5) to be independent from their counterparts without “∗”. is, we treat coefficients with “∗” e.g. Yjk k above theorem states that ignoring the conjugate relations among the coefficients, the set of coefficients for which the BKK bound holds exactly is at least a nonempty “Zariski open” set. Such a set is always open and dense and hence of full measure. Consequently, the BKK bound is commonly known as being “generically exact”: when coefficients are chosen at random, with probability one, the BKK bound is exact. 4 The BKK bound is also known as the Bernshtein’s bound, the polyhedral bound, or the mixed volume bound in literature. 2 That 3 The 4 Suppose no such choice of Z exist, then D(Z, Z ∗ ) = 0 for all Z ∈ (C\{0})` . By Lemma 7 in Appendix C, D(Z, W ) = 0 for all (Z, W ) ∈ (C\{0})2` . This means D must be a zero polynomial, which is a contradiction. Therefore, we must conclude that there is always a choice of Z (and hence Y and S) such that D(Z, Z ∗ ) 6= 0. 3.2. Solution bound via adjacency polytope. In this section, we develop a significantly simplified version of the BKK bound for the algebraic load flow equation (5) that can be analyzed and computed more easily. Here we borrow a construction from coding theory and encode the given graph into a polytope (which, roughly speaking, is a geometrical object whose all sides are flat) which we shall call the “symmetric AP”. The definition requires the following notations: We define e0 := 0 ∈ Rn . For i = 1, . . . , n, ei denotes the vector in Rn that has an entry 1 on the i-th position and zero everywhere else. (ei , ej ) is simply the concatenation of the two vectors ei ∈ Rn and ej ∈ Rn that forms a vector in R2n . Finally, “conv” denotes the convex hull operator which produces the smallest convex set containing a given set. Definition 3. Given a graph G = (B, E), let [ ΓG := {(ei , ej )} ⊂ R2n . (i,j)∈E With this, we define the symmetric adjacency polytope of G to be ∇G := conv(ΓG ∪ {0}). Implicit in this definition is the assumption that the graph G = (B, E) is undirected, that is, if (i, j) ∈ E then (j, i) ∈ E. The polytope ∇G is a geometric encoding of the connectivity of the underlying power network with connections manifested as points. It is only dependent on the connectivity among the nodes (and hence the sparsity patterns in Y ) but independent from the actual entries in Y . Remark 1. It is evident in the construction of (5) that equations in the system always contain many common monomials. Indeed, if (i, j) is an edge in the graph, then the monomial vi uj appear in both the i-th and the (n + j)-th equation. In other words, the monomial structure of (5) has certain level of built-in redundancy. Such redundancy is removed in the construction of ∇G : In Definition 3, one takes the union of the set of points representing the edges, common monomials in (5) will therefore coalesce into the same points. Consequently, the polytope ∇G , in a sense, contains much less information than the monomial structure in (5). Therefore the encoding ∇G is advantageous from a computational point of view. With the constructions above, we propose a new upper bound on the isolated non-deficient complex solutions to the algebraic load flow equation that takes into consideration the connectivity of the underlying power network: Theorem 4. The number of isolated solutions the algebraic load flow system (5) has in (C \ {0})2n is bounded above by µG := NVol2n (∇G ) which we shall define as the the adjacency polytope bound (or simply AP bound) for any PG,Y (with any choice of admittance matrix Y ). Here “NVol2n ” denotes the normalized volume in R2n . It is a volume measurement commonly used in the study of “lattice polytopes”, and it is defined so that the standard “corner simplex” (the corner of a unit hypercube) has volume 1. Proof. For a nonsingular 2n × 2n matrix M , we can form the new system M · PG,Y by forming the formal matrix-vector product where PG,Y is considered as a column vector. This technique is known as randomization. Clearly, M · PG,Y (v, u) = 0 if and only if PG,Y (v, u) = 0 and the number of isolated solutions (in (C \ {0})2n ) remains the same under this transformation. It is easy to verify that the support of 5 the randomized system M · PG,Y is unmixed of type 2n, and the Newton polytope is precisely the symmetric adjacency polytope ∇G defined in Definition 3. Then by the unmixed form of Bernshtein’s Theorem [28], the BKK bound of this randomized system is precisely the normalized volume NVol2n (∇G ). Example 1. Consider, for example, the simple “path graph” G = ({0, 1, 2, 3}, E) of 4 nodes as shown in Figure 2 where each node i is connected the next node i + 1. Recall that we also require each node to have a loop to itself (to reflect the nonzero diagonal entries of the nodal admittance matrix Y ), so the edges in the graph are E = {(0, 0), (0, 1), (1, 0), (1, 1), (1, 2), (2, 1), (2, 2), (2, 3), (3, 2), (3, 3)}. By Definition 3, the points in ΓG are therefore (e0 , e0 ), (e0 , e1 ), (e1 , e0 ), (e1 , e1 ), (e1 , e2 ), (e2 , e1 ), (e2 , e2 ), (e2 , e3 ), (e3 , e2 ), (e3 , e3 ). Since 0 is already included in ΓG , the symmetric adjacency polytope ∇G is precisely the convex hull of ΓG . With programs for computing volume of convex polytopes to be listed in §3.3, one can easily obtain that µG = NVol6 (∇G ) = NVol6 (conv ΓG ) = 8. That is, the algebraic load flow equation for such a path graph has at most 8 isolated non-deficient complex solutions. It is quite easy to understand the situation under which the introduction of a new connection in the power network will change the AP bound: Since the AP bound is formulated in terms of the volume of a polytope which is nondecreasing (i.e., it will either increase or remain unchanged when new points are added), this upper bound must also be nondecreasing with respect to the additions of new connections. Theorem 5. For a graph G = (B, E) and two of its nodes i and j that are not directly connected (i.e., (i, j) ∈ / E), let G0 = (B, E ∪ {(i, j)}) be the new graph constructed by adding the edge between i and j to G. Then µG ≤ µG0 . Moreover, if {(ei , ej ), (ej , ei )} ⊂ ∇G then µG = µG0 . Proof. Recall that each edge in a graph contributes certain points (which may or may not be vertices) in the construction of the symmetric adjacency polytope. Since the edges of G is a subset of the edges of G0 , we can see that ∇G ⊆ ∇G0 with the equality hold precisely when the points contributed by (i, j) are already inside ∇G . With these observations in mind, both parts of this theorem are direct implications of normalized volume being nondecreasing. Based on this observation, it can be shown that the AP bound is never more than the BBLSY bound. This is essentially our alternative proof of the BBLSY bound:  Theorem 6. For a graph G = (B, E), let |B| = n + 1. Then, µG ≤ 2n n Proof. Fixing the set of buses, Theorem 5 states that the AP bound is nondecreasing as new edges are added to the graph. Consequently, the AP bound for any network constructed from this set of buses is bounded above by the AP bound for the graph with most edges, that is, a complete graph. It is easy to verify that for a complete graph G = (B, E) (with loops), ∇G ⊆ (conv A) + (conv B) where A = {e0 , e1 , e2 , . . . en } B = {e0 , en+1 , en+2 , . . . e2n } (6) and (conv A) + (conv B) denotes the Minkowski sum of the two polytopes (conv A) and (conv B). Note that both (conv A) and (conv B) are n-dimensional. Then by multi-linearity of mixed volume with respect to 6 Minkowski sum, NVol((conv A) + (conv B)) =  2n  X 2n k=0 k M V ((convA)(k) , (convB)(2n−k) )   2n M V ((convA)(n) , (convB)(n) ) n   2n = n = We conclude this section with a reiteration of the various root counts involved in the discussion. Recall that for a power network G = (B, E), the number of isolated non-deficient solutions of the original (non-algebraic) load flow equation (1) (physical solutions), the number of isolated complex solutions of the algebraic load flow equation (5) in (C \ {0})2n , the BKK bound provided by Theorem 1, the AP bound given in Theorem 4, the BBLSY bound given in [3, 42], and the CB number are related as follows: Complex Physical BKK AP BBLSY ≤ ≤ ≤ solution ≤ solution ≤ bound bound bound count count CB bound 3.3. Computing BKK and AP bounds. The BKK bound, can be computed by using efficient software packages such as DEMiCs [51], Gfan [32], MixedVol [22], MixedVol-2.0 [39]. For larger power networks involving many buses, the induced algebraic load flow equation may contain a large number of terms. Parallel computing technology will be essential in the computation of the BKK bounds for such large scale polynomial systems. MixedVol-3 [13,14] (with an improved version integrated in Hom4PS-3 [12]) is capable of computing the BKK bound for large polynomial systems in parallel on a wide range of hardware architectures including multi-core systems, NUMA systems, and computer clusters. As noted in Remark 1, however, there is built-in level of redundancy in the Newton polytopes (see Appendix A) of the algebraic load flow equations. The formulation of the AP bound takes advantage of this natural redundancy and can generally be computed much more easily than the BKK bound for larger power networks. Since the AP bound is formulated in terms of the volume of a convex polytope (the symmetric AP), any software that can compute such volume exactly can be used to provide this bound. A survey on the various algorithms for exact volume computation can be found in [6]. A particularly versatile software package that utilizes a wide range of algorithms is the Vinci program [21]. 3.4. Homotopy methods for solving load flow equations. The previous sections described two upper bounds — the BKK bound and the AP bound — for the number of isolated non-deficient complex solutions of the algebraic load flow equation induced by a given network topology. It is worth reiterating that the BKK bound is more than just an upper bound : As shown in Theorem 2, it is actually the maximum for the given network topology in the sense that there always exits some choice of the admittance matrix Y (and S) for which the total number of isolated non-deficient complex solutions is exactly the BKK bound. While the AP bound, in general, may be larger than the BKK bound, as we shall show in §4, the two coincide for all the networks we have investigated in the present work. The family of numerical methods known as homotopy methods have been proved to be a robust and efficient approach for solving algebraic load flow equations. One great strength of these methods lies in the pleasantly parallel nature: in principle, each solution can be computed independently. This feature is of particular importance in dealing with larger power networks containing many buses and connections (hence more complicated equations). It is therefore a natural question to ask: is there a homotopy method that can solve the algebraic load flow equation by tracking BKK bound number of homotopy paths? This section establishes the answer in the affirmative. This homotopy method is the polyhedral homotopy method developed in [28]. Here we briefly state the 0 construction. We choose a pair of random (rational) numbers ωij and ωij for each i, j = 1, . . . , n. With 7 these we define the homotopy function HG,Y (v1 , . . . , vn , u1 , . . . , un , t) = Pn ω1k  − S1 (t)  k=0 Y1k (t)v1 uk t    .  .  .   Pn    Y (t)v u tωnk − S (t) k=0 nk n k n Pn 0  0 ωk1  − S10 (t)  k=0 Y1k (t)u1 vk t    ..   .    0 Pn 0 ωkn − Sn0 (t). k=0 Ynk (t)un vk t (7) where Yij (t) = (1 − t)Zij + tYij∗ Si (t) = (1 − t)Wi + Si Yij0 (t) Si0 (t) = (1 − t)Wi0 + Si∗ = (1 − 0 t)Zij + tYij 0 and (Zij ) and (Zij ) are randomly chosen complex matrices of the same size as Y and W = (Wi ) and W 0 = (Wi0 ) are two random complex vectors in Cn . Clearly HG,Y (v, u, 1) ≡ PG,Y (v, u). For generic choice of Z, Z 0 , W , W 0 , ω and ω 0 , it can be shown that fixing any t ∈ (0, 1), the non-deficient solutions of HG,Y (v, u, t) = 0 are all isolated and the total number is exactly the BKK bound. Moreover, as t varies within (0, 1), the corresponding solutions of HG,Y (v, u, t) = 0 also vary smoothly forming smooth solution paths that collectively reach all the desired solutions of the algebraic load flow equation PG,Y (v, u) = 0. See Figure 1 for a schematic illustration. Thus, once the “starting points” of each solution path at t = 0 are found, standard numerical continuation techniques can be used to track the solution paths and reach all the isolated non-deficient complex solutions. An apparent difficulty is the identifications of the “starting points”. After all, at t = 0, HG,Y (u, v, t) either becomes constant or undefined since each of its nonconstant term contains a power of t. This, fortunately, is surmounted via a device known as mixed cells which are themselves the by-product of the computation of the BKK bound. The technical detail is outside the scope of the present article, we therefore refer to t=0 t=1 standard references such as [28, 41]. The application of the polyhedral homotopy to load flow equations will be explored Figure 1: The solution paths defined by in future works, here we simply emphasize that with the poly- HG,Y (v, u, t) = 0. hedral homotopy method, the number of solution paths one needs to track is precisely the BKK bound of the particular polynomial formulation of the load flow equations that we have used (eq. (5)) — the best possible network topology-based complex solution bound. 4. Solution bound for certain power networks. In this section we provide concrete computation results for the BKK bound and the AP bound described above when applied to specific graphs. We should reiterate that we require all the graphs to have self-loops for each node to reflect the nonzero diagonal entries of the nodal admittance matrix Y . In all cases, the BKK and the AP bounds are computed via MixedVol-3 [13, 14]. Complex solutions count of specific load flow systems are computed by actually solving the systems via Hom4PS-3 [11, 12] which implements the polyhedral homotopy method described above. For comparison, in each case we show the “5-way comparison” among the complex solution count, BKK bound, AP bound, the BBLSY Bound, and the CB number. Here, “complex solution count” refers to the number of isolated complex solutions of (5) in (C \ {0})2n where n is number of non-reference nodes. Since the actual complex solution count may depend on the coefficients (Yij and Si in (5)), they are computed based on a sample of randomly chosen set of coefficients for each graph. 8 4.1. Paths. We first consider an extremely sparsely connected family of graphs – path graphs. In a path graph G = (B, E) with nodes 0, 1, . . . , n where n = |B| − 1 (the number of non-reference nodes), a node i is connected to two of its neighbors i + 1 and i − 1, with the exceptions that node 0 is only connected to node 1 and the last node, node n, is only connected to node n − 1. Table 1 shows the “5-way comparison” described above. It is important to note that in all cases computed (100 in total, with 10 random admittance matrices chosen for each |B|), the actual complex solution count, the BKK bound, and the AP bound are exactly the same. Figure 2: A path. |B| 2 3 4 5 6 7 8 9 10 11 12 Solutions BKK AP BBLSY CB 2 2 2 2 4 4 4 4 6 16 8 8 8 20 64 16 16 16 70 256 32 32 32 252 1024 64 64 64 924 4096 128 128 128 3432 16384 256 256 256 12870 65536 512 512 512 48620 262144 1024 1024 1024 184756 1048576 2048 2048 2048 705432 4194304 Table 1: The “5-way comparison” of the solution bounds for path graphs of size 2–12. 4.2. Rings. By joining the two ends of a path graph studied above, a “ring graph” is obtained. More precisely, in a ring G = (B, E) with nodes 0, 1, . . . , n where n = |B| − 1, a node i is connected to two of its neighbors i + 1 and i − 1, and node reference node, node 0 is connected to node n. See, for example, the graph shown in Figure 3a. Table 2 shows the similar “5-way comparison”. Again, in all cases computed (100 in total, with 10 random admittance matrices chosen for each |B|), the actual complex solution count, the BKK bound, and the AP bound are all exactly the same. (a) A ring. (b) A random tree |B| 2 3 4 5 6 7 8 9 10 11 12 Solutions BKK AP BBLSY CB 2 2 2 2 4 6 6 6 6 16 16 16 16 20 64 40 40 40 70 256 96 96 96 252 1024 224 224 224 924 4096 512 512 512 3432 16384 1152 1152 1152 12870 65536 2560 2560 2560 48620 262144 5632 5632 5632 184756 1048576 12288 12288 12288 705432 4194304 Table 2: The “5-way comparison” of solution bounds for ring graphs of size 2–12. 4.3. Random trees. Since distribution networks often have structures of trees, randomly generated trees may actually resemble some realistic power networks. To get a reasonable sample size, tree graphs with |B| = 3, . . . , 13 are studied. For each of the sizes 10 trees are randomly generated (see, for example, the trees shown in Figure 3b). For each of these trees, 100 set of random Y matrices are assigned. Therefore for each given size |B|, 1000 polynomial systems are generated (a total of 10000 systems for |B| = 3, . . . , 13). Table 3 shows the similar “5-way comparison” used above. 9 |B| Solutions BKK AP BBLSY CB 3 4 5 6 7 8 9 10 11 12 13 4 4 4 6 16 8 8 8 20 64 16 16 16 70 256 32 32 32 252 1024 64 64 64 924 4096 128 128 128 3432 16384 256 256 256 12870 65536 512 512 512 48620 262144 1024 1024 1024 184756 1048576 2048 2048 2048 705432 4194304 4096 4096 4096 2704156 16777216 Table 3: The “5-way comparison” for randomly generated trees of given sizes. 4.4. Clusters. Real power networks generally exhibit certain level of “clustering”, that is, certain subset of buses are densely connected while on a larger scale, the connections among such subsets are sparse. Here for simplicity, we focus on the most extreme cases where a larger network is created by joining completely connected subnetworks. This section lists concrete results of the BKK and AP bounds for certain simple types of clusters. For comparison, in each case we only show the “3-way comparison” among the BKK bound, AP bound, and the BBLSY bound (due to the large amount of data). (c) Sharing one node (d) Sharing two nodes Figure 3: Completely connected subgraphs sharing common nodes. 4.4.1. Subnetworks sharing nodes. First, these subnetworks can be jointed by sharing common nodes. See, for example, the networks shown in Figure 3. Table 4 shows the “3-way comparison” for cases where two completely connected subnetworks share a single (non-reference) common bus. These cases have been studied in [26]. Our computational results agree with their assertion. Table 5 shows the similar “3-way comparison” for cases where two completely connected subnetworks share two (non-reference) common bus. These cases have been extensively studied in [53] via numerical methods. The results and conjectures in that work are precisely reproduced by our computation. For larger networks, the AP bounds are generally much easier to compute than the BKK bound using existing implementations. In Table 6 and 7, we show the AP bounds for the above referenced clusters. c1 \c2 2 3 4 5 6 2 3 4 5 6 4/4/6 12/12/20 40/40/70 140/140/252 504/504/924 12/12/20 36/36/70 120/120/252 420/420/924 1512/1512/3432 40/40/70 120/120/252 400/400/924 1400/1400/3432 5040/5040/12870 140/140/252 420/420/924 1400/1400/3432 4900/4900/12870 17640/17640/48620 504/504/924 1512/1512/3432 5040/5040/12870 17640/17640/48620 63504/63504/184756 Table 4: The “3-way comparison” for two completely connected subnetworks of sizes c1 and c2 respectively sharing a single common non-reference nodes. 10 c1 \c2 2 3 4 5 6 2 3 4 5 6 2/2/2 6/6/6 20/20/20 70/70/70 252/252/252 6/6/6 18/18/20 60/60/70 210/210/252 756/756/924 20/20/20 60/60/70 200/200/252 700/700/924 2520/2520/3432 70/70/70 210/210/252 700/700/924 2450/2450/3432 8820/8820/12870 252/252/252 756/756/924 2520/2520/3432 8820/8820/12870 31752/31752/48620 Table 5: The “3-way comparison” for two completely connected subnetworks of sizes c1 and c2 respectively sharing two common non-reference nodes. c1 \c2 2 3 4 5 6 7 8 2 3 4 5 6 7 8 4 12 40 140 504 1848 6864 12 36 120 420 1512 5544 20592 40 120 400 1400 5040 18480 68640 140 420 1400 4900 17640 64680 240240 504 1512 5040 17640 63504 232848 864864 1848 5544 18480 64680 232848 853776 3171168 6864 20592 68640 240240 864864 3171168 11778624 Table 6: The AP bounds for graphs consisting of two cliques of size c1 and c2 respectively sharing a single common non-reference node. c1 \c2 2 3 4 5 6 7 8 2 3 4 5 6 7 8 2 6 20 70 252 924 3432 6 18 60 210 756 2772 10296 20 60 200 700 2520 9240 34320 70 210 700 2450 8820 32340 120120 252 756 2520 8820 31752 116424 432432 924 2772 9240 32340 116424 426888 1585584 3432 10296 34320 120120 432432 1585584 5889312 Table 7: The AP bounds for graphs consisting of two cliques, of size c1 and c2 respectively sharing two common non-reference nodes. 4.4.2. Completely connected subnetworks connected by edges. We now consider cases where completely connected subnetworks are connected by edges. For example, Figure 4a shows a network that consists of two cliques of size four and five respectively connected by a single edge. Table 8 shows the AP bounds for networks created from joining two completely connected subnetworks by a single edge. c1 \c2 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 4 12 40 140 504 1848 6864 25740 97240 4 8 24 80 280 1008 3696 13728 51480 194480 12 24 72 240 840 3024 11088 41184 154440 583440 40 80 240 800 2800 10080 36960 137280 514800 1944800 140 280 840 2800 9800 35280 129360 480480 1801800 504 1008 3024 10080 35280 127008 465696 1729728 1848 3696 11088 36960 129360 465696 1707552 6864 13728 41184 137280 480480 1729728 25740 51480 154440 514800 1801800 97240 194480 583440 1944800 Table 8: The AP bound of graphs consisting of two cliques of size c1 and c2 joint by a single edge. Table 9 shows the AP bounds of the more general cases where the networks consist of multiple completely connected subnetworks of the same sizes connected via edges to form chains-like structure. See, for example, the network shown in Figure 4b where five cliques each of size three are connected via edges that, on a macro level, resembles a chain. 11 (a) Two completely connected subnetworks jointed via a single edge. (b) A network containing several subnetworks linked together via edges. Figure 4: Completely connected subnetworks connected by edges c\m 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 2 8 72 800 9800 127008 1707552 3 4 32 864 32000 1372000 4 8 128 10368 1280000 5 16 512 124416 6 32 2048 1492992 7 64 8192 17915904 8 128 32768 2 6 20 70 252 924 3432 Table 9: The AP bound for graphs consisting of n cliques each of size c. 5. IEEE 14 bus system. The IEEE 14 bus system (the network toopology shown in Figure 5), representing a portion of the power system of the Midwestern U.S.A. in the 1960s, is a widely used benchmark system in testing the efficiency of different solvers for load flow equations. Here we show that the isolated complex solution count, BKK bound, and AP bound are much smaller than previously studied solution bounds. In particular, the BKK bound in our formulation of the load flow equations is 427680. This means the polyhedral homotopy method described in Sec. 3.4 need to trace at most 427680 paths to obtain all isolated nondeficient complex solutions, which compared with the BKK Figure 5: IEEE 14 bus system bound in a previous formulation of the load flow equations [49], 49283072, is around a factor 115 of reduction. This is well within the reach of modern polyhedral homotopy implementations. In particular, with a random choice of the Y -matrix, Hom4PS-3 [11,12] was able to find all solutions in less than 5 minutes (around 297 seconds) on a single workstation (with two Intel Xeon processor). Solutions BKK bound AP bound BKK-MNT [49] BBLSY bound CB bound 427680 427680 427680 49283072 10400600 67108864 Table 10: Solution bounds for the IEEE 14bus topology, with generic complex coefficients. BKK-MNT is the BKK bound with a different polynomial formulation [49]. 6. Conclusion and Outlook. Solutions of the load flow equations play an important role in design and operations of power systems and a huge amount of research activities have been focused on developing efficient computational methods to solve the load flow equations [48]. In this paper we focus on computing a tight upper bound on the number of load flow solutions for the following 12 reasons: the NPHC method [41, 60] introduced in power systems areas in [8, 9, 47, 49, 53] requires an upper bound on the number of isolated (complex) solutions of the system. The CB bound or most of the other existing upper bounds, and in particular the BBLSY bound [3,42], do not capture the network topology [53] of the power system into account. To make the computation of the NPHC method efficient, and to provide a definitive stopping criterion for other iterative methods, one has to come up with a tighter upper bound on the number of isolated complex solutions. In this paper, for technical reasons, we ignore the physically less likely solutions at which at least one of the voltages is zero. We described a specific version of the algebraic formulation of the load flow equations and a corresponding tighter upper bound known as the BKK bound. We showed that there exists at least some generic parameter values for which the BKK bound is attainable. Another novel feature in this paper is the introduction of a novel bound, called an AP, for sparse systems. With this bound, we proved one of our main theorems, Theorem 4, which gives a more explicit bound on the number of complex solutions. The new bound is computationally much more tractable for large systems compared to the BKK bound. Our bounds not only give the precise number of complex solutions for the given power system, but also provide a particular specialization of the NPHC method that in turn achieves all the solutions for the system but more efficiently than the previous ones that are based on the crude bounds. We examined our results on upper bounds on the number of complex solutions with the actual number of complex solutions obtained with the help of the polyhedral NPHC method for various cases including complete graphs; path graphs; ring graphs; wheel graphs; random tree graphs; graphs having two cliques sharing exactly one, two and three nodes; graphs having two cliques both connected by a single edge; graphs with multiple cliques of equal size connected via edges, and the IEEE standard 14-bus system. In all the instances we have tested, we find that (1) the BKK bound is always equal to the adjacency bound, and (2) the BKK bound is always equal to the actual number of complex solutions, i.e., the BKK or the AP bound are the actual number of isolated complex solutions for generic coefficients and completely capture the specific network topology of the given power systems. A proof supporting the numerical results will be published elsewhere. Our numerical investigations reproduced all the previously known results [3, 27, 53]. In addition, we provide further novel results for aforementioned list of graphs. We emphasis that the BKK bound is dependent on the polynomial formulation used to compute it, though the number of complex solutions and number of physical solutions are obviously independent of the polynomial formulations. The phrase ”BKK bound” throughout the paper, unless specified otherwise, is computed from the polynomial formulation we have described in this paper (given in eq. (5)). In other words, our polynomial formulation seems optimal since the BKK bound computed using it is generically equal to the number of isolated complex solutions. To give an example, for the IEEE standard 14-bus system, the BKK using a previous formulation was 49, 283, 072, whereas the BKK in the present formulation is 427, 680, i.e., a factor of around 115 reduction with our present formulation. Our results open up several future directions: though a less likely case, extending our results to the situtation where at least one of the voltages is zero would further complete the discussion on number of complex solutions. Further refinement will be accomplished by computing or estimating the number of physical solutions, and analysing their stability properties for different network topologies. Investigating for which parameter values the number of physical solutions is equal or at least of the same order of magnitude as the number of complex solutions of the systems will also provide a better tool to analyse efficiencies of different computational methods: For example, for the 3 nodes complete graph case, it is known that the number of real solutions does attain the tight-most upper bound on the number of complex solutions, 6 [2, 35, 61]. However, for 4 nodes complete graph case, so far parameter points with only 14 physical solutions are known as opposed to 20 complex solutions [3]. This has an important consequences on the tracing-methods for solving load flow equations such as proposed in Refs. [40, 44]. Leaving aside the lack of proof for guaranteeing all the physical solutions of the load flow equations in the tracing-methods, for such parameter points at which the number of physical solutions is equal or of the same order of magnitude as the BKK bound, the number of traces the method has to go through will be equivalent to the polyhedral NPHC method will also have to go through. Hence, in such cases, there will be no gain even if one ignores the guarantee to find all solutions that the NPHC method provides. On the other hand, our bounds can provide 13 the necessary stopping criterion to the tracing-methods and hence the two methods may complement each other in some cases. Acknowledgement. TC was supported by NSF under Grant DMS 11-15587. DBM was support by NSF-ECCS award ID 1509036 and an Australian Research Council DECRA fellowship no. DE140100867. Appendix A. Mixed volume and BKK bound. Given m convex polytopes Q1 , . . . , Qm ⊂ Rn and m positive real numbers λ1 , . . . , λm with m ≤ n Minkowski’s Theorem [50] states that the n-dimensional volume of the Minkowski sum [24, 50]. λ1 Q1 + · · · + λn Qn = { λ1 q1 + · · · + λn qn | qi ∈ Qi for i = 1, . . . , n } is a homogeneous polynomial of degree n in the variables λ1 , . . . , λn . For a m-tuple of nonnegative integers (k1 , . . . , km ), the coefficient associated with the monomial λk11 · · · λkmm is known as the mixed volume [24, 50] of type (k1 , . . . , km ). Mixed volume of type (1, . . . , 1) is often simply referred to as the mixed volume. As a common convention, the mixed volume involving two shapes in R2 are usually called mixed area instead. The BKK bound is formulated in terms of mixed volume. We start with an example (used in [28]): With x = (x1 , x2 ), let P (x) be the polynomial system p1 (x) = c11 x1 x2 + c12 x1 + c13 x2 + c14 p2 (x) = c21 x1 x22 + c22 x21 x2 + c23 Here, cij ’s are nonzero coefficients. The formal expressions for the monomials in p1 are x1 x2 = x11 x12 , x1 = x11 x02 , x2 = x01 x12 and 1 = x01 x02 . Considering the exponents of each monomial as a point on the plane, the set of exponent points S1 = {a = (0, 0), b = (1, 0), c = (1, 1), d = (0, 1)} is called the support of p1 , and its convex hull Q1 = conv(S1 ) is called the Newton polygon of p1 . Similarly, the support of p2 is S2 = {e = (0, 0), f = (2, 1), g = (1, 2)} and its Newton polygon is Q2 = conv(S2 ). The two newton polygons are shown in Figure 6a and 6b respectively. The mixed area of Q1 and Q2 can be intuitively taken as the area within the Minkowski sum Q1 + Q2 contributed by “mixing” of the two shapes. From Figure 6c, it is easy to see that Q1 + Q2 contains copies of Q1 and Q2 . The rest (the shaded region) are resulted from the “mixing effect” of edges from both Q1 and Q2 in constructing the Minkowski sum. The total area of these regions is the mixed area. d+g c+g c+f g c d a b (a) Q1 d+e f b+f a+e b+e e (b) Q2 (c) The Minkowski sum Q1 + Q2 Figure 6: The Newton polygons of p1 and p2 along with their Minkowski sum and a graphical depiction of the mixed volume (mixed area). In general, given a polynomial system P = (p1 , . . . , pn ) of the form ! X X a a c1,a x , . . . , cn,a x a∈S1 a∈Sn 14 where x = (x1 , . . . , xn ) and S1 , . . . , Sn are fixed subsets of Zn called the support of p1 , . . . , pn respectively. Note that here with a = (a1 , . . . , an ) we use the notation xa = xa1 1 · · · xann for a monomial. The convex hull Qj = conv(Sj ) in Rn is called the Newton polytope of pj . In this context, the BKK bound is the mixed volume of the Newton polytopes Q1 , . . . , Qn . Appendix B. Zariski openness. Part (B) of Theorem 1 states that ignoring the conjugate relations among the coefficients, the set of coefficients for which the upper bound given by Theorem 1 part (A) hold exactly is at least a nonempty “Zariski open” set. This “Zariski openness” can be characterized as follows: If ∗ 0 we replace Yjk and Sj∗ in (5) by independent coefficients Yjk and Sj0 , then there exists a nonzero polynomial 0 0 D in the variables {Yjk , Yjk , Sj , Sj } such that D 6= 0 implies the BKK bound is exact. Appendix C. The polarization lemma. The proof for Theorem 2 hinges on a key lemma in the theory of complex variables that is sometimes referred to as the polarization lemma: Lemma 7. Suppose that H : (C \ {0})n × (C \ {0})n → C is a holomorphic function of the 2n complex variables (z, w), and that H(z, z∗ ) = 0 for all z ∈ (C \ {0})n . Then, H(z, w) = 0 for all (z, w) ∈ (C \ {0})n × (C \ {0})n . This lemma has its roots in the works of W. Wirtinger. Here we refer to [17] for a direct proof. REFERENCES [1] Venkataramana Ajjarapu and Colin Christy, The continuation power flow: a tool for steady state voltage stability analysis, Power Systems, IEEE Transactions on, 7 (1992), pp. 416–423. [2] J Baillieul, The critical point analysis of electric power systems, in The 23rd IEEE Conference on Decision and Control, no. 23, 1984, pp. 154–159. [3] J. Baillieul and C.I. Byrne, Geometric Critical Point Analysis of Lossless Power System Models, IEEE Trans. Circuits Syst., 29 (1982). [4] David N Bernshtein, The number of roots of a system of equations, Funct. Anal. Its Appl., 9 (1975), pp. 183–185. [5] D.M. Bromberg, M. Jereminov, X. Li, G. Hug, and L. Pileggi, An Equivalent Circuit Formulation of the Power Flow Problem with Current and Voltage State Variables, in IEEE Eindhoven PowerTech, Jun. 2015. [6] Benno Büeler, Andreas Enge, and Komei Fukuda, Exact Volume Computation for Polytopes: A Practical Study, in Polytopes — Combinatorics and Computation, Gil Kalai and Günter M. Ziegler, eds., no. 29 in DMV Seminar, Birkhäuser Basel, Jan. 2000, pp. 131–154. [7] John Canny and J. Maurice Rojas, An optimal condition for determining the exact number of roots of a polynomial system, in Proceedings of the 1991 International Symposium on Symbolic and Algebraic Computation, ISSAC ’91, New York, NY, USA, 1991, ACM, pp. 96–102. [8] Souvik Chandra, Dhagash Mehta, and Aranya Chakrabortty, Exploring the impact of wind penetration on power system equilibrium using a numerical continuation approach, arXiv preprint arXiv:1409.7844, (2014). , Equilibria analysis of power systems using a numerical homotopy method, in Power & Energy Society General [9] Meeting, 2015 IEEE, IEEE, 2015, pp. 1–5. [10] H. Chen, Cascaded Stalling of Induction Motors in Fault-Induced Delayed Voltage Recovery (FIDVR), Masters Thesis, University of Wisconsin-Madison, Department of Electrical and Computer Engineering, (2011). [11] Tianran Chen, Tsung-Lin Lee, and Tien-Yien Li, Hom4PS-3: an numerical solver for polynomial systems using homotopy continuation methods. [12] , Hom4PS-3: A Parallel Numerical Solver for Systems of Polynomial Equations Based on Polyhedral Homotopy Continuation Methods, in Mathematical Software – ICMS 2014, Hoon Hong and Chee Yap, eds., no. 8592 in Lecture Notes in Computer Science, Springer Berlin Heidelberg, Jan. 2014, pp. 183–190. , Mixed volume computation in parallel, Taiwan. J. Math., 18 (2014), pp. 93–114. [13] [14] , Mixed cell computation in Hom4PS-3, Numer. Algebr. Geom. Spec. Issue J. Symb. Comput., ((To appear)). [15] Tianran Chen, Tien-Yien Li, and Xiaoshen Wang, Theoretical aspects of mixed volume computation via mixed subdivision, Commun. Inf. Syst., 14 (2014), pp. 213–242. [16] D. Cifuentes and P. Parrilo, Exploiting Chordal Structure in Polynomial Ideals: A Gröbner Bases Approach, Preprint: http://arxiv.org/abs/1411.1745, (2014). [17] John P. D’Angelo, Several Complex Variables and the Geometry of Real Hypersurfaces, CRC Press, Jan. 1993. [18] F. Dörfler and F. Bullo, Novel Insights into Lossless AC and DC Power Flow, in IEEE PES General Meeting, Jul. 2013. [19] P. Dreesen and B. De Moor, Polynomial Optimization Problems are Eigenvalue Problems, in Model-Based Control: Bridging Rigorous Theory and Advanced Technology, Paul M.J. Hof, Carsten Scherer, and Peter S.C. Heuberger, eds., Springer US, 2009, pp. 49–68. [20] K. Dvijotham, S. Low, and M. Chertkov, Solving the Power Flow Equations: A Monotone Operator Approach, Submitted. Preprint available: http://arxiv.org/abs/1506.08472, (2015). 15 [21] Andreas Enge, Benno Büeler, and Komei Fukuda, VINCI: an easy to install C package that implements the state of the art algorithms for volume computation. [22] Tangan Gao, Tien-Yien Li, and Mengnien Wu, Algorithm 846: MixedVol: a software package for mixed-volume computation, ACM Trans. Math. Softw. TOMS, 31 (2005), pp. 555–560. [23] J.D. Glover, M.S. Sarma, and T.J. Overbye, Power System Analysis and Design, Cengage Learning, 2011. [24] H. Groemer, Minkowski addition and mixed volumes, Geom Dedicata, 6 (1977), pp. 141–163. [25] S.X. Guo and F.M.A. Salam, Determining the solutions of the load flow of power systems: Theoretical results and computer implementation, in , Proceedings of the 29th IEEE Conference on Decision and Control, 1990, Dec. 1990, pp. 1561–1566 vol.3. [26] S.X. Guo and F.M.A. Salam, Determining the Solutions of the Load Flow of Power Systems: Theoretical Results and Computer Implementation, in IEEE 29th Ann. Conf. Decis. Contr. (CDC), Dec. 1990, pp. 1561–1566. , The Number of (Equilibrium) Steady-State Solutions of Models of Power Systems, IEEE Trans. Circuits Syst. I, [27] Fundam. Theory Appl., 41 (1994), pp. 584–600. [28] B. Huber and B. Sturmfels, A polyhedral method for solving sparse polynomial systems, Math. Comput., 64 (1995), pp. 1541–1555. , Bernstein’s theorem in affine space, Discrete Comput Geom, 17 (1997), pp. 137–141. [29] [30] M. Ilic, Network Theoretic Conditions for Existence and Uniqueness of Steady State Solutions to Electric Power Circuits, in IEEE Int. Symp. Circuits Syst. (ISCAS), May 1992. [31] S. Iwamoto and Y. Tamura, A Load Flow Calculation Method for Ill-Conditioned Power Systems, IEEE Trans. Power App. Syst., PAS-100 (1981), pp. 1736–1743. [32] Anders N. Jensen, A Presentation of the Gfan Software, in Mathematical Software - ICMS 2006, Andrés Iglesias and Nobuki Takayama, eds., no. 4151 in Lecture Notes in Computer Science, Springer Berlin Heidelberg, Jan. 2006, pp. 222–224. [33] A.G. Khovanskii, Newton polyhedra and the genus of complete intersections, Funct. Anal. Its Appl., 12 (1978), pp. 38–46. [34] A. Klos and A. Kerner, The Non-Uniqueness of Load Flow Solution, in 5th Power Syst. Comput. Conf. (PSCC), 1975. [35] A Klos and J Wojcicka, Physical aspects of the nonuniqueness of load flow solutions, International Journal of Electrical Power & Energy Systems, 13 (1991), pp. 268–276. [36] Prabha Kundur, Neal J Balu, and Mark G Lauby, Power system stability and control, vol. 7, McGraw-hill New York, 1994. [37] A. G. Kushnirenko, Newton polytopes and the Bezout theorem, Funct Anal Its Appl, 10 (1976), pp. 233–235. [38] Jean-Bernard Lasserre, Moments, Positive Polynomials and Their Applications, vol. 1, Imperial College Press, 2010. [39] Tsung-Lin Lee and Tien-Yien Li, Mixed volume computation in solving polynomial systems, Contemp Math, 556 (2011), pp. 97–112. [40] B. Lesieutre and D. Wu, An Efficient Method to Locate All the Load Flow Solutions - Revisited, 53rd Annual Allerton Conference on Communication, Control, and Computing, Sept 29-Oct 2, (2015). [41] Tien-Yien Li, Numerical solution of polynomial systems by homotopy continuation methods, in Handbook of Numerical Analysis, P. G. Ciarlet, ed., vol. 11, North-Holland, 2003, pp. 209–304. [42] Tien-Yien Li, Tim Sauer, and James A. Yorke, Numerical solution of a class of deficient polynomial systems, SIAM J. Numer. Anal., 24 (1987), pp. 435–451. [43] C.-W. Liu, C.-S. Chang, J.-A. Jiang, and G.-H. Yeh, Toward a CPFLOW-based Algorithm to Compute All the Type-1 Load-Flow Solutions in Electric Power Systems, IEEE Trans. Circuits Syst. I, Reg. Papers, 52 (2005), pp. 625–630. [44] W. Ma and S. Thorp, An Efficient Algorithm to Locate All the Load Flow Solutions, IEEE Trans. Power Syst., 8 (1993), p. 1077. [45] R. Madani, J. Lavaei, and R. Baldick, Convexification of Power Flow Problem over Arbitrary Networks, IEEE 54th Ann. Conf. Decis. Contr. (CDC), (2015). [46] Jakub Marecek, Timothy McCoy, and Martin Mevissen, Power flow as an algebraic system, arXiv preprint arXiv:1412.8054, (2014). [47] Dhagash Mehta, Noah S Daleo, Florian Dörfler, and Jonathan D Hauenstein, Algebraic geometrization of the kuramoto model: Equilibria and stability analysis, Chaos: An Interdisciplinary Journal of Nonlinear Science, 25 (2015), p. 053103. [48] Dhagash Mehta, Daniel K Molzahn, and Konstantin Turitsyn, Recent advances in computational methods for the power flow equations, arXiv preprint arXiv:1510.00073, (2015). [49] D. Mehta, H. Nguyen, and K. Turitsyn, Numerical Polynomial Homotopy Continuation Method to Locate All The Power Flow Solutions, Preprint: http://arxiv.org/abs/1408.2732, (2014). [50] Hermann Minkowski, Theorie der Konvexen Körper, insbesondere Begrundung ihres Oberflachenbegriffs, Gesammelte Abh. Von Hermann Minkowski, 2 (1911), pp. 131–229. [51] Tomohiko Mizutani and Akiko Takeda, DEMiCs: A Software Package for Computing the Mixed Volume Via Dynamic Enumeration of all Mixed Cells, in Software for Algebraic Geometry, Michael Stillman, Jan Verschelde, and Nobuki Takayama, eds., no. 148 in The IMA Volumes in Mathematics and its Applications, Springer, Jan. 2008, pp. 59–79. [52] D.K. Molzahn, B.C. Lesieutre, and H. Chen, Counterexample to a Continuation-Based Algorithm for Finding All Power Flow Solutions, IEEE Trans. Power Syst., 28 (2013), pp. 564–565. [53] Daniel K Molzahn, Dhagash Mehta, and Matthew Niemerg, Toward topologically based upper bounds on the number of power flow solutions, arXiv preprint arXiv:1509.09227, (2015). [54] Antonio Montes and Jordi Castro, Solving the load flow problem using gröbner basis, ACM SIGSAM Bulletin, 29 (1995), pp. 1–13. 16 [55] Alexander Morgan and Andrew Sommese, Computing all solutions to polynomial systems using homotopy continuation, Applied Mathematics and Computation, 24 (1987), pp. 115–138. [56] Alexander P. Morgan, Andrew J. Sommese, and Layne T. Watson, Finding all isolated solutions to polynomial systems using HOMPACK, ACM Trans Math Softw, 15 (1989), pp. 93–122. [57] H. Mori and A. Yuihara, Calculation of Multiple Power Flow Solutions with the Krawczyk Method, in IEEE Int. Symp. Circuits Syst. (ISCAS), 30 May - 2 Jun. 1999. [58] Hieu D Nguyen and Konstantin S Turitsyn, Appearance of multiple stable load flow solutions under power flow reversal conditions, in PES General Meeting— Conference & Exposition, 2014 IEEE, IEEE, 2014, pp. 1–5. [59] Jiaxin Ning, Wenzhong Gao, G. Radman, and J. Liu, The Application of the Groebner Basis Technique in Power Flow Study, in North American Power Symp. (NAPS), Oct. 2009. [60] A. J. Sommese and C. W. Wampler, The numerical solution of systems of polynomials arising in engineering and science, World Scientific Pub Co Inc, 2005. [61] Carlos J Tavora and Otto JM Smith, Equilibrium analysis of power systems, Power Apparatus and Systems, IEEE Transactions on, (1972), pp. 1131–1137. [62] J.S. Thorp and S.A. Naqavi, Load Flow Fractals, in IEEE 28th Ann. Conf. Decis. Contr. (CDC), Dec. 1989. [63] A. Trias, The Holomorphic Embedding Load Flow Method, in IEEE PES General Meeting, Jul. 2012. 17
3cs.SY
ON THE INTEGRAL DEGREE OF INTEGRAL RING EXTENSIONS arXiv:1507.02120v2 [math.AC] 1 Mar 2018 JOSÉ M. GIRAL, LIAM O’CARROLL, FRANCESC PLANAS-VILANOVA, AND BERNAT PLANS Abstract. Let A ⊂ B be an integral ring extension of integral domains with fields of fractions K and L, respectively. The integral degree of A ⊂ B, denoted by dA (B), is defined as the supremum of the degrees of minimal integral equations of elements of B over A. It is an invariant that lies in between dK (L) and µA (B), the minimal number of generators of the A-module B. Our purpose is to study this invariant. We prove that it is sub-multiplicative and upper-semicontinuous in the following three cases: if A ⊂ B is simple; if A ⊂ B is projective and finite and K ⊂ L is a simple algebraic field extension; or if A is integrally closed. Furthermore, d is upper-semicontinuous if A is noetherian of dimension 1 and with finite integral closure. In general, however, d is neither sub-multiplicative nor upper-semicontinuous. 1. Introduction Let A ⊂ B be an integral ring extension, where A and B are two commutative integral domains with fields of fractions K = Q(A) and L = Q(B), respectively. Then, for any element b ∈ B, there exist n ≥ 1 and ai ∈ A, such that bn + a1 bn−1 + a2 bn−2 + . . . + an−1 b + an = 0. The minimum integer n ≥ 1 satisfying such an equation is called the integral degree of b over A and is denoted by idA (b). The supremum, possibly infinite, of all the integral degrees of elements of B over A, sup{idA (b) | b ∈ B}, is called the integral degree of B over A and is denoted by dA (B). These notions are indeed very natural. They were explicitely considered in [3] and, previously, in a different framework, by Kurosch [10], Jacobson [5], Kaplansky [9] and Levitzki [12], and more recently by Voight [20]. The goal in [3] was to study the uniform Artin-Rees property with respect to the set of regular ideals having a principal reduction. It was proved that the integral degree, in fact, provides a uniform Artin-Rees number for such a set of ideals. The purpose of the present paper is to investigate more deeply the invariant dA (B). We first note that dA (B) is between dK (L), the integral degree of the corresponding algebraic field extension K ⊂ L, and µA (B), the minimal number of generators of the A-module B. That is, dK (L) ≤ dA (B) ≤ µA (B). In a sense, dA (B) can play the role of, or just substitute for, one of them. For instance, it is a central question in commutative ring theory whether the integral closure A of a domain A is a finitely generated A-module. It is well-known that, even for one-dimensional noetherian local domains, µA (A) might be infinite (see, e.g., [4, Section 4.9], [15, § 33]). However, for one-dimensional noetherian local domains dA (A) is finite ([3, Proposition 6.5]). Hence, in this situation, dA (B) would be an appropriate substitute for µA (B). Another positive aspect of dA (B), compared with µA (B), is good behaviour with respect to inclusion, i.e., if B1 ⊂ B2 , then dA (B1 ) ≤ dA (B2 ), while in general we cannot deduce that µA (B1 ) is smaller than or equal to µA (B2 ). Similarly, dK (L) is a simplification of dA (B). Note that dK (L) ≤ [L : K], the degree of the algebraic field extension K ⊂ L. We will see that dK (L) = [L : K] if and only if K ⊂ L is a simple algebraic field extension. Date: March 2, 2018. 2010 Mathematics Subject Classification. 13B21,13B22,13G05,12F05. 1 2 JOSÉ M. GIRAL, LIAM O’CARROLL, FRANCESC PLANAS-VILANOVA, AND BERNAT PLANS Of special interest would be to completely characterise when dA (B) reaches its maximal or its minimal value. We will say that A ⊂ B has maximal integral degree when dA (B) = µA (B). Similarly, we will say that A ⊂ B has minimal integral degree when dK (L) = dA (B). Examples of maximal integral degree are simple integral extensions A ⊂ B = A[b], b ∈ B (Proposition 2.3, (b)). Examples of minimal integral degree occur when A ⊂ B is a projective finite integral ring extension with corresponding simple algebraic field extension K ⊂ L or when A is integrally closed (cf. Theorem 5.2 and Proposition 6.1). By a projective, respectively free, finite ring extension A ⊂ B we mean that B is a finitely generated projective, respectively free, A-module. Moreover, integral ring extensions A ⊂ B of both at the same time minimal and maximal integral degree are precisely free finite integral ring extensions A ⊂ B with corresponding simple algebraic field extension K ⊂ L (see Corollary 5.3). Considering the multiplicativity property of the degree of algebraic field extensions K ⊂ L ⊂ M , that is, [M : K] = [L : K][M : L], and the sub-multiplicativity property of the minimal number of generators of integral ring extensions A ⊂ B ⊂ C, namely, µA (C) ≤ µA (B)µB (C), it is natural to ask for the same property of dA (B). We will say that the integral degree d is sub-multiplicative with respect to A ⊂ B if dA (C) ≤ dA (B)dB (C), for every integral ring extension B ⊂ C. We prove that d is sub-multiplicative with respect to A ⊂ B in the following three situations: if A ⊂ B has maximal integral degree (e.g., if A ⊂ B is simple); if A ⊂ B is projective and finite and K ⊂ L is simple; or if A is integrally closed (see Corollaries 3.4, 5.5 and 6.7). Note that in the three cases above, A ⊂ B has either maximal integral degree, or else minimal integral degree. We do not know an instance in which d is sub-multiplicative with respect to A ⊂ B and dK (L) < dA (B) < µA (B). We will prove that d is not sub-multiplicative in general. Taking advantage of an example of Dedekind, we find a non-integrally closed noetherian domain A of dimension 1, with finite integral closure B, where B is the ring of integers of a number field, and a degree-two integral extension C of B, such that dA (C) = 6, whereas dA (B) = 2 and dB (C) = 2. In this particular example, dK (L) = 1, dA (B) = 2 and µA (B) = 3, so A ⊂ B is neither of maximal nor of minimal integral degree (see Example 6.8). Another aspect well worth considering is semicontinuity, taking into account that the minimal number of generators is an upper-semicontinuous function (see, e.g., [11, Chapter IV, § 2, Corollary 2.6]). Note that if p is a prime ideal of A, clearly Ap ⊂ Bp is integral. Thus one can regard the integral degree as a function d : Spec(A) → N, defined by d(p) = dAp (Bp ). We will say that the integral degree d is upper-semicontinuous with respect to A ⊂ B if d : Spec(A) → N is an upper-semicontinuous function, that is, if {p ∈ Spec(A) | d(p) < n} is open, for all n ≥ 1. We prove (in Proposition 7.1) that d is upper-semicontinuous with respect to A ⊂ B in the following two situations: if A ⊂ B is simple; or if A ⊂ B has minimal integral degree (e.g., if A ⊂ B is projective and finite and K ⊂ L is simple; or if A is integrally closed). Note that in the two cases above, A ⊂ B has either maximal integral degree, or else minimal integral degree. There is a setting in which we can prove that d is upper-semicontinuous with respect to A ⊂ B, yet dA (B) might be different from dK (L) and µA (B). This happens when A is a non-integrally closed noetherian domain of dimension 1 with finite integral closure (see Theorem 7.2). However, d is not upper-semicontinuous in general, even if A is a noetherian domain of dimension 1 (see Example 7.4). The paper is organized as follows. In Section 2 we recall some definitions and known results given in [3]. We also prove that dA (B) is a local invariant in the following sense: dA (B) = sup{dAm (Bm ) | m ∈ Max(A)} = sup{dAp (Bp ) | p ∈ Spec(A)}. Observe that the analogue for µA (B) is not true in general. Section 3 is mainly devoted to the sub-multiplicativity of the integral degree. Sections 4, 5 and 6 are devoted to the integral degree of, respectively, algebraic field extensions, projective finite ring extensions and integral ring extensions with base ring integrally closed. Finally, Section 7 is devoted to the upper-semicontinuity of the integral degree. Notations and conventions. All rings are assumed to be commutative and with unity. Throughout, A ⊂ B and B ⊂ C are integral ring extensions. Moreover, we always assume that A, B and INTEGRAL DEGREE OF INTEGRAL RING EXTENSIONS 3 C are integral domains, though many definitions and results can easily be extended to the nonintegral domain case. The fields of fractions of A, B and C are denoted by K = Q(A), L = Q(B) and M = Q(C), respectively. The integral closure of A in K = Q(A) is denoted by A and is simply called the “integral closure of A”. In the particular case in which A, B and C are fields, we write A = K, B = L and C = M . Whenever {x1 , . . . , xr } ⊂ N is a generating set of an A-module N , we will write N = hx1 , . . . , xr iA . The minimal number of generators of N as an A-module, understood as the minimum of the cardinalities of generating sets of N , is denoted by µA (N ). Liam O’Carroll, our friend and coauthor, died aged 72 years, of illness, on October 25, 2017. We greatly miss him. 2. Preliminaries and first properties We start by recalling and extending some definitions and results from [3, Section 6]. Recall that A ⊂ B is an integral ring extension of integral domains, and K = Q(A) and L = Q(B) are their fields of fractions. Definition 2.1. Let b ∈ B. A minimal degree polynomial of b over A (which is not necessarily unique) is a monic polynomial m(T ) = T n +a1 T n−1 +. . .+an−1 T +an ∈ A[T ], n ≥ 1, with m(b) = 0, and such that there is no other monic polynomial of lower degree in A[T ] and vanishing at b. The integral degree of b over A, denoted by idA (b), is the degree of a minimal degree polynomial m(T ) of b over A. In other words, idA (b) = deg m(T ) = min{n ≥ 1 | b satisfies an integral equation over A of degree n}. The integral degree of B over A is defined as the value (possibly infinite) dA (B) = sup {idA (b) | b ∈ B}. Note that dA (B) = 1 if and only if A = B. We give a first example, which will be completed subsequently (see Corollary 5.6). Example 2.2. Let B be an integral domain and let G be a finite group acting as automorphisms on B. Let A = B G = {b ∈ B | σ(b) = b, for all σ ∈ G}. Then A ⊂ B is an integral ring extension and dA (B) ≤ o(G), the order of G. Proof. Let G = {σ1 , . . . , σn }. For every b ∈ B, take p(T ) = (T − σ1 (b)) · · · (T − σn (b)). Clearly p(T ) ∈ A[T ] and p(b) = 0. Thus b is integral over A and idA (b) ≤ n = o(G).  The following is a first list of properties of the integral degree mainly proved in [3]. Proposition 2.3. Let A ⊂ B be an integral ring extension. The following properties hold. (a) dA (B) ≤ µA (B). (b) If A ⊂ B = A[b] is simple, then idA (b) = dA (B) = µA (B). (c) If S is a multiplicatively closed subset of A, then S −1 A ⊂ S −1 B is an integral ring extension and dS −1 A (S −1 B) ≤ dA (B). (d) If S = A \ {0}, then S −1 B = L. (e) dK (L) ≤ dAp (Bp ) ≤ dA (B), for every p ∈ Spec(A). (f ) dK (L) ≤ [L : K]. Proof. (a), (b) and (c) can be found in [3, Corollary 6.3, Corollary 6.2 and Proposition 6.8]. For (d), since K = S −1 A ⊂ S −1 B is an integral ring extension, then S −1 B is a zero-dimensional domain, 4 JOSÉ M. GIRAL, LIAM O’CARROLL, FRANCESC PLANAS-VILANOVA, AND BERNAT PLANS hence a field, lying inside L = Q(B). Thus S −1 B = L. Let us prove (e). Take p ∈ Spec(A), so A \ p ⊆ S. Since A ⊂ B is an integral ring extension, then Ap ⊂ Bp and K = S −1 A = (Ap \ {0})−1 Ap ⊂ (Ap \ {0})−1 Bp = S −1 B = L are integral ring extensions. Applying (c) twice, we get (e). Finally, applying (d) and (a), one has dK (L) = dS −1 A (S −1 B)) ≤ µS −1 A (S −1 B) = µK (L) = [L : K], which proves (f ).  Notation 2.4. The following picture can help in reading the paper. dK (L) ≤ dA (B) ∧ ∧ [L : K] ≤ µA (B). We say that A ⊂ B has minimal integral degree when dK (L) = dA (B). Similarly, we say that A ⊂ B has maximal integral degree when dA (B) = µA (B). Remark 2.5. By Proposition 2.3, (b), A ⊂ B simple implies A ⊂ B has maximal integral degree. We will see that the converse is true for finite field extensions (see Proposition 4.2). However, in general, A ⊂ B of maximal integral degree does not imply A ⊂ B simple. Take for instance A = Z and B the ring of integers of an algebraic number field L, i.e., B is the integral closure of A = Z in L, a finite field extension of the field of rational numbers K = Q. Then dA (B) = µA (B) (see Corollary 5.7). Nevertheless, not every ring of integers B is a simple extension of A = Z. We will take advantage of this fact in Example 6.8. Clearly, there are integral ring extensions of non-maximal integral degree. This can already happen with affine domains, as shown in the next example. Example 2.6. Let k be a field and t a variable over k. Let A = k[t3 , t8 , t10 ] and B = k[t3 , t4 , t5 ]. Then A ⊂ B is a finite ring extension with dA (B) = 2 and µA (B) = 3. Proof. Since k[t3 ] ⊂ A, then B = h1, t4 , t5 iA and A ⊂ B is a finite ring extension with µA (B) ≤ 3. If x = a + bt4 + ct5 ∈ B, with a, b, c ∈ A, then x2 − 2ax ∈ A. Therefore dA (B) = 2. Let us see that µA (B) = 3. Suppose that there exist f, g ∈ B such that B = hf, giA , i.e., 1, t4 , t5 ∈ hf, giA . Write f = a0 + t3 f1 and g = b0 + t3 g1 , with a0 , b0 ∈ k and f1 , g1 ∈ k[t]. Since 1 ∈ hf, giA , one can suppose that a0 = 1 and b0 = 0. Thus f = 1 + a3 t3 + a4 t4 + a5 t5 + . . . and g = b3 t3 + b4 t4 + b5 t5 + . . .. In particular, every element of hf, giA is of the form: (λ0 + λ3 t3 + λ6 t6 + λ8 t8 + . . .)(1 + a3 t3 + a4 t4 + a5 t5 + . . .) + (µ0 + µ3 t3 + µ6 t6 + µ8 t8 + . . .)(b3 t3 + b4 t4 + b5 t5 + . . .) = (λ0 ) + (λ3 + λ0 a3 + µ0 b3 )t3 + (λ0 a4 + µ0 b4 )t4 + (λ0 a5 + µ0 b5 )t5 + . . . . From t4 ∈ hf, giA , one deduces that (λ0 = 0 and) b4 6= 0. Hence, one can suppose that a4 = 0. From 1 ∈ hf, giA , it follows that (λ0 = 1, µ0 = 0 and) a5 = 0. From t4 ∈ hf, giA again, now it follows b5 = 0. But from t5 ∈ hf, giA , one must have b5 6= 0, a contradiction. Hence µA (B) = 3.  Remark 2.7. In the example above K = L and so A ⊂ B does not have minimal integral degree. We will prove that if A ⊂ B is projective and finite with K ⊂ L simple, or if A is integrally closed, then A ⊂ B has minimal integral degree (see Theorem 5.2 and Proposition 6.1). As for the finiteness of the integral degree, we recall the following. Remark 2.8. There exist one-dimensional noetherian local domains A with integral closure A such that dA (A) is finite while µA (A) is infinite (see [3, Proposition 6.5]). There exist one-dimensional noetherian domains A such that dA (A) is infinite (see [3, Example 6.6]). Next we prove that the integral degree coincides with the supremum of the integral degrees of the localizations. (The analogue for µA (B) is not true in general.) INTEGRAL DEGREE OF INTEGRAL RING EXTENSIONS 5 Proposition 2.9. Let A ⊂ B be an integral ring extension. For any b ∈ B, there exists a maximal ideal m ∈ Max(A) such that idA (b) = idAm (b/1). In particular, dA (B) = sup{dAm (Bm ) | m ∈ Max(A)} = sup{dAp (Bp ) | p ∈ Spec(A)}. Furthermore, if dA (B) is finite, then there exists m ∈ Max(A) such that dA (B) = dAm (Bm ). Proof. If idA (b) = 1, then b ∈ A. Thus, for any m ∈ Max(A), b/1 ∈ Am , so idAm (b/1) = 1 and idA (b) = idAm (b/1). Suppose that idA (b) = n ≥ 2. Then A[b]/h1, b, . . . , bn−2 i 6= 0 and A[b]/h1, b, . . . , bn−1 i = 0. Clearly, for every p ∈ Spec(A), and for every m ≥ 1, (A[b]/h1, b, . . . , bm i)p = Ap [b/1]/h1, b/1, . . . , bm /1i. In particular, Ap [b/1]/h1, b/1, . . . , bn−1 /1i = 0, for every p ∈ Spec(A). Since A[b]/h1, b, . . . , bn−2 i = 6 0, then there exists a maximal ideal m ∈ Max(A) with Am [b/1]/h1, b/1, . . . , bn−2 /1i = 6 0 and Am [b/1]/h1, b/1, . . . , bn−1 /1i = 0. Therefore, idAm (b/1) = n and idA (b) = idAm (b/1). In particular, dA (B) ≤ sup{dAm (Bm ) | m ∈ Max(A)} ≤ sup{dAp (Bp ) | p ∈ Spec(A)}. On the other hand, by Proposition 2.3, sup{dAp (Bp ) | p ∈ Spec(A)} ≤ dA (B). Finally, if dA (B) is finite, then there exists b ∈ B such that idA (b) = dA (B). We have just shown above that there exists a maximal ideal m ∈ Max(A) with idA (b) = idAm (b/1). Therefore dA (B) = idA (b) = idAm (b/1) ≤ dAm (Bm ) ≤ dA (B) and the equality holds.  Remark 2.10. Suppose that A ⊂ B is finite. Since A is a domain, by generic flatness, there exists f ∈ A \ {0} such that Af ⊂ Bf is a finite free extension (see, e.g., [14, Theorem 22.A]). In particular, for every p ∈ D(f ) = Spec(A) \ V (f ), Ap ⊂ Bp is a finite free ring extension. So dA (B) = max{d1 , d2 }, where d1 = sup{dAp (Bp ) | p ∈ V (f )} and d2 = sup{dAp (Bp ) | Ap ⊂ Bp is free}. Therefore, if one is able to control the integral degree for finite free ring extensions, the calculation of dA (B) is reduced to find d1 = sup{dAp (Bp ) | p ∈ V (f )}, where V (f ) is a proper closed set of Spec(A). We will come back to this question in Theorem 5.3. 3. Sub-multiplicativity In this section we study the sub-multiplicativity of the integral degree with respect to A ⊂ B, i.e., whether dA (C) ≤ dA (B)dB (C) holds for every integral ring extension B ⊂ C. Observe that, in this situation, A ⊂ C is an integral ring extension too and, by definition, dB (C) ≤ dA (C). We start with a useful criterion to determine possible bounds ν ∈ N in the inequality dA (C) ≤ ν dB (C). Lemma 3.1. Let A ⊂ B and B ⊂ C be two integral ring extensions. Set ν ∈ N. The following conditions are equivalent. (i) dA (D) ≤ ν dB (D), for every ring D such that B ⊆ D ⊆ C; (ii) dA (D) ≤ ν dB (D), for every ring D such that D = B[α] for some α ∈ C; (iii) idA (α) ≤ ν idB (α), for every element α ∈ C. In particular, if (iii) holds, then dA (C) ≤ ν dB (C). Proof. Clearly, (i) ⇒ (ii). Let α ∈ C; in particular, α is integral over A. Since A[α] ⊂ B[α], then idA (α) = dA (A[α]) ≤ dA (B[α]). By hypothesis (ii), dA (B[α]) ≤ ν dB (B[α]) = ν idB (α). Therefore, idA (α) ≤ ν idB (α), which proves (ii) ⇒ (iii). To see (iii) ⇒ (i), take D with B ⊆ D ⊆ C and α ∈ D, which will be integral over B and, hence, integral over A. By hypothesis (iii), idA (α) ≤ ν idB (α) ≤ ν dB (D). Taking supremum over all α ∈ D, dA (D) ≤ ν dB (D). Finally, if (iii) holds, then (i) holds for D = C, so dA (C) ≤ ν dB (C).  6 JOSÉ M. GIRAL, LIAM O’CARROLL, FRANCESC PLANAS-VILANOVA, AND BERNAT PLANS The next result shows that we can take ν = µA (B) as a particular ν ∈ N, understanding that if A ⊂ B is not finite, then µA (B) = ∞ and the inequality is trivial. Theorem 3.2. Let A ⊂ B and B ⊂ C be two integral ring extensions. Then, for every α ∈ C, idA (α) ≤ µA (B)idB (α). In particular, dA (C) ≤ µA (B)dB (C). Proof. Let α ∈ C, which is integral over B and A. Then idA (α) = dA (A[α]) ≤ dA (B[α]) ≤ µA (B[α]) ≤ µA (B)µB (B[α]) = µA (B)idB (α). To finish, apply Lemma 3.1.  Remark 3.3. A proof of Theorem 3.2 using the standard “determinantal trick” would be as follows. Suppose B = hb1 , . . . , bn iA , with µA (B) = n, and consider α ∈ C with idB (α) = m. Let X be the following nm × 1 vector, whose entries form an A-module generating set of B[α], X ⊤ = (1, α, . . . , αm−1 , b1 , b1 α, . . . , b1 αm−1 , . . . , bn , bn α, . . . , bn αm−1 ). Then there exists a nm square matrix P with coefficients in A, such that αX = P X. Therefore, (αI − P )X = 0. Multiplying by the adjugate matrix (that is, the transpose of the cofactor matrix) leads to QP (α) = det(αI − P ) = 0, where QP (T ) is the characteristic polynomial of P (recall that C is a domain). Hence idA (α) ≤ deg QP (T ) = nm = µA (B)idB (α). As an immediate consequence of Theorem 3.2, we obtain the sub-multiplicativity of the integral degree with respect to integral ring extensions of maximal integral degree. Corollary 3.4. Let A ⊂ B and B ⊂ C be two integral ring extensions. If dA (B) = µA (B), then dA (C) ≤ dA (B)dB (C). To finish this section we recover part of a result shown in [3], but now with a slightly different proof. Corollary 3.5. ([3, Proposition 6.7]) Let A ⊂ B and B ⊂ C be two integral ring extensions. Then, for every α ∈ C, idA (α) ≤ dA (B)dB (C) idB (α). In particular, dA (C) ≤ dA (B)dB (C) dB (C). Furthermore, if A ⊂ B and B ⊂ C have finite integral degrees, then A ⊂ C has finite integral degree. Proof. Let α ∈ C; in particular, α is integral over B and over A. Let m(T ) be a minimal degree polynomial of α over B, m(T ) = T n + b1 T n−1 + . . . + bn ∈ B[T ], so that n = idB (α) ≤ dB (C). Set E = A[b1 , . . . , bn ], where A ⊆ E ⊆ B. Therefore, idA (α) = dA (A[α]) ≤ dA (E[α]) ≤ µA (E[α]) ≤ µA (E)µE (E[α]), Q where clearly µA (E) ≤ ni=1 idA (bi ) ≤ dA (B)dB (C) , and µE (E[α]) = idE (α) = idB (α). To finish, apply Lemma 3.1.  INTEGRAL DEGREE OF INTEGRAL RING EXTENSIONS 7 4. Integral degree of algebraic field extensions In this section, we suppose that A = K, B = L and C = M are fields. For ease of reading, we begin by recalling some definitions and basic facts (see, e.g., [1, Chapter V] and [6]). Reminder 4.1. Let K ⊂ L be a finite field extension. • A polynomial is separable if it has no multiple roots (in any field extension). The extension K ⊂ L is separable if every element of L is the root of a separable polynomial of K[T ]. A field K is perfect if either has characteristic zero or else, when it has characteristic p > 0, every element is a p-th power in K. If K is perfect, then K ⊂ L is separable. • The primitive element theorem states that a finite separable field extension is simple. Even more, there exists an “extended” version which affirms that a simple algebraic field extension of a finite separable field extension is again simple (cf. [6, III, Chapter I, § 11, Theorem 14]). • Let Ks be the separable closure of K in L, i.e., the set of all elements of L which are separable over K. Then Ks is a field and K ⊂ Ks is a separable extension. Its degree [Ks : K] is called the separable degree and is denoted by [L : K]s := [Ks : K]. For the rest of the reminder, suppose that K has characteristic p > 0 and let Ks be the separable closure of K in L. • Then Ks ⊂ L is a purely inseparable field extension, i.e., for every element α ∈ L, there m exists an integer m ≥ 1 such that αp ∈ Ks . The least such integer m is called the height of α over Ks . Let htKs (α) stand for the height of α over Ks . Set h = sup{htKs (α) | α ∈ L} and call h the height of the purely inseparable extension Ks ⊂ L. m m • Given α ∈ L with htKs (α) = m, setting a = αp , one proves that T p − a is irreducible in Ks [T ] (see, e.g., [1, Chapter V, § 5]). Thus [Ks (α) : Ks ] = pm . Since Ks ⊂ L is a finite extension, then L = Ks (α1 , . . . , αr ), where each αi is purely inseparable over Ks (α1 , . . . , αi−1 ), i = 2, . . . , r. Hence [L : Ks ] = pe , for some e ≥ 1. Call e the exponent of the purely inseparable extension Ks ⊂ L. Note that, since [Ks (α) : Ks ] (which is pm ) divides [L : Ks ] = [L : Ks (α)][Ks (α) : Ks ] (which is pe ), then m ≤ e and h ≤ e. Our first result characterizes simple finite field extensions as finite field extensions of maximal integral degree. Proposition 4.2. Let K ⊂ L be a finite field extension. Then K ⊂ L is simple if and only if dK (L) = [L : K]. Proof. Since K ⊂ L is an algebraic extension, K(α) = K[α], for any α ∈ L. By Proposition 2.3, (b), idK (α) = dK (K(α)) = [K(α) : K]. Therefore, (1) [L : K] = [L : K(α)][K(α) : K] = [L : K(α)]dK (K(α)) = [L : K(α)]idK (α). If K ⊂ L is simple, then L = K(α), for some α ∈ L. Using (1), it follows that [L : K] = [L : K(α)]dK (K(α)) = dK (L). Conversely, if dK (L) = [L : K] < ∞, by definition, there exists α ∈ L with idK (α) = [L : K]. By (1) again, it follows that [L : K(α)] = 1 and K ⊂ L is simple.  Using the primitive element theorem we obtain the following result. Corollary 4.3. Let K ⊂ L be a finite separable field extension. Then dK (L) = [L : K]. The “extended” version of the primitive element theorem will show to be very useful in proving the next result. Proposition 4.4. Let K ⊂ L be a finite field extension. Suppose that K has characteristic p > 0 and let Ks be the separable closure of K in L. Set h and e to be the height and exponent, respectively, of the finite purely inseparable field extension Ks ⊂ L. Then the following hold. 8 JOSÉ M. GIRAL, LIAM O’CARROLL, FRANCESC PLANAS-VILANOVA, AND BERNAT PLANS (a) (b) (c) (d) dK (L) = dK (Ks )dKs (L). For every α ∈ L, dKs (α) = pm , where m is the height of α over Ks . dKs (L) = ph and [L : Ks ] = pe . [L : K]s divides dK (L) and dK (L) divides [L : K]. Concretely, dK (L) = [L : K]s ph and [L : K] = pe−h dK (L). Proof. By Corollary 4.3, dK (Ks ) = [Ks : K]. By Corollary 3.4, dK (L) ≤ dK (Ks )dKs (L). To see the other inequality, take α ∈ L with idKs (α) = dKs (L). By Proposition 2.3, (b), idKs (α) = dKs (Ks [α]) = µKs (Ks [α]). By the extended primitive element theorem, K ⊂ Ks [α] is a simple algebraic field extension (cf. [6, III, Chapter I, § 11, Theorem 14]). Hence, by Proposition 2.3, (b), dK (Ks [α]) = [Ks [α] : K]. Since K ⊂ Ks is a finite separable extension, by Corollary 4.3, dK (Ks ) = [Ks : K]. Writing all together: dK (Ks )dKs (L) = [Ks : K]idKs (α) = [Ks : K]µKs (Ks [α]) = [Ks [α] : K] = dK (Ks [α]) ≤ dK (L). m m This proves (a). Let α ∈ L with htKs (α) = m. Set a = αp . Then T p − a ∈ Ks [T ] is irreducible in Ks [T ] and hence it is the minimimal polynomial of α over Ks . It follows that idKs (α) = pm . This proves (b). Therefore, dKs (L) = sup{idKs (α) | α ∈ L} = sup{phtKs (α) | α ∈ L} = psup{htKs (α)|α∈L} = ph , which proves (c). Finally, (d) follows from (a), (c) and Corollary 4.3 applied repeatedly. Indeed, dK (L) = dK (Ks )dKs (L) = [Ks : K]ph = [L : K]s ph and [L : K] = [L : Ks ][Ks : K] = pe dK (Ks ) = pe−h dKs (L)dK (Ks ) = pe−h dK (L).  Here there is an example of a finite field extension of non maximal integral degree. Example 4.5. Let p > 1 be a prime and K = Fp (up1 , up2 ), where u1 , u2 are algebraically independent over Fp . Set L = K[u1 , u2 ]. Then K ⊂ L is a finite purely inseparable field extension with dK (L) = p. However [L : K] = p2 . P Proof. Any β ∈ L is of the form β = 0≤i,j≤p−1 ai,j ui1 uj2 , with ai,j ∈ K. So X X jp βp = api,j uip u = api,j (up1 )i (up2 )j , 1 2 0≤i,j≤p−1 0≤i,j≤p−1 βp which is an element of K. Therefore ∈ K and idK (β) ≤ p. Since idK (u1 ) = p, it follows that dK (L) = p. Since K K(u1 ) L are finite field extensions, each one of degree p, by the multiplicative formula for algebraic field extensions, [L : K] = [L : K(u1 )][K(u1 ) : K] = p2 .  Similarly, we obtain an example of an infinite field extension with finite integral degree (see also Remark 2.8). Example 4.6. Let p > 1 be a prime and K = Fp (up1 , up2 , . . .), where u1 , u2 , . . . are algebraically independent over Fp . Set L = K[u1 , u2 , . . .]. Then dK (L) = p but [L : K] = ∞. Now we prove the sub-multiplicativity of the integral degree with respect to an algebraic field extension K ⊂ L. Theorem 4.7. Let K ⊂ L and L ⊂ M be two algebraic field extensions. Then, for every α ∈ M , In particular, idK (α) ≤ dK (L)idL (α). dK (M ) ≤ dK (L)dL (M ). INTEGRAL DEGREE OF INTEGRAL RING EXTENSIONS 9 Proof. We can assume that dK (L) and dL (M ) are finite. Let α ∈ M and let m(T ) = T n + b1 T n−1 + . . . + bn ∈ L[T ] be a minimal degree polynomial of α over L. Let h be the height of the purely inseparable field extension Ks ⊂ L, where Ks is the separable closure of K in L. Let p = char(K). If K has characteristic 0, we understand that h h h h h ph = 1. Then 0 = m(α)p = αnp + bp1 α(n−1)p + . . . + bpn . It follows that α is a root of a monic polynomial in Ks [T ] of degree ph idL (α). So we have idK (α) = dK (K[α]) ≤ dK (Ks [α]) ≤ µK (Ks [α]) ≤ µK (Ks ) · µKs (Ks [α]) = = dK (Ks ) · idKs (α) ≤ dK (Ks )ph idL (α) = dK (L)idL (α). To finish, apply Lemma 3.1.  Though sub-multiplicative, the integral degree might not be multiplicative, even for two simple algebraic field extensions. Example 4.8. Let p > 1 be a prime and let K = Fp (up1 , up2 ), where u1 , u2 are algebraically independent over Fp . Set L = K[u1 ] and M = L[u2 ]. Then K ⊂ L and L ⊂ M are two finite field extensions with dK (M ) = p and dK (L)dL (M ) = idK (u1 )idL (u2 ) = p2 (see Example 4.5 and Proposition 2.3). However, for finite separable field extensions, multiplicativity holds. Remark 4.9. Let K ⊂ L be a finite separable field extension and L ⊂ M be a simple algebraic field extension. Then dK (M ) = dK (L)dL (M ). Proof. By the extended primitive element theorem, K ⊂ M is simple. Hence, by Proposition 4.2, dK (M ) = [M : K], dK (L) = [L : K] and dL (M ) = [M : L].  5. Integral degree of projective finite ring extensions We return to the general hypotheses: A ⊂ B and B ⊂ C are integral ring extensions of integral domains, and K, L and M are their fields of fractions, respectively. In this section we are interested in the integral degree of projective finite ring extensions (by a projective, respectively free, ring extension A ⊂ B we understand that B is a projective, respectively free, A-module). We begin by recalling some well-known definitions and facts (see, e.g., [11, Chapter IV, § 2, 3]). Reminder 5.1. Let A be a domain and let N be a finitely generated A-module. • N is a free A-module if it has a basis, i.e., a linearly independent system of generators. The rank of a free module N , rankA (N ), is defined as the cardinality of (indeed, any) a basis. Clearly, N is free of rank n if and only if N ∼ = An . If N is a free A-module, the minimal generating sets are just the bases of N . In particular, µA (N ) = rankA (N ). • N is a projective A-module if there exists an A-module N ′ such that N ⊕ N ′ is free. One has that N is projective if and only if N is finitely presentable and locally free. The rank of a projective module N at a prime p, rankp (N ), is defined as the rank of the free Ap -module Np , i.e., rankp (N ) = rankAp (Np ) = µAp (Np ) = dimk(p) (N ⊗ k(p)), where k(p) = Ap /pAp stands for the residue field of A at p. • If N is projective, then p 7→ rankp (N ) is constant (since A is a domain, Spec(A) is connected) and is simply denoted by rankA (N ). In particular, on taking the prime ideal (0), then rankA (N ) = µK (N ⊗ K) = rankp (N ), for every prime ideal p. Clearly, when N is free both definitions of rank coincide. Theorem 5.2. Let A ⊂ B be a projective finite ring extension. Then dK (L) ≤ dA (B) ≤ rankA (B) = [L : K]. 10 JOSÉ M. GIRAL, LIAM O’CARROLL, FRANCESC PLANAS-VILANOVA, AND BERNAT PLANS If moreover K ⊂ L is simple, then dK (L) = dA (B) = rankA (B) = [L : K]. Proof. By Proposition 2.9, there exists a maximal ideal m of A such that dA (B) = dAm (Bm ). By Proposition 2.3 and using that Bm is Am -free and B is A-projective, then dK (L) ≤ dA (B) = dAm (Bm ) ≤ µAm (Bm ) = rankAm (Bm ) = rankA (B) = µK (B ⊗ K) = [L : K]. To finish, recall that if K ⊂ L is simple, then dK (L) = [L : K] (see Proposition 2.3 or 4.2).  The next result characterizes finite ring extensions of maximal and minimal integral degree at the same time. Corollary 5.3. Let A ⊂ B be a finite ring extension. (a) A ⊂ B is free if and only if [L : K] = µA (B). (b) A ⊂ B is free and K ⊂ L is simple if and only if dK (L) = dA (B) = µA (B). Proof. If A ⊂ B is free, then µA (B) = rankA (B) = [L : K] (see Reminder 5.1 and Theorem 5.2). Reciprocally, suppose that [L : K] = µA (B). Set µA (B) = n and let u1 , . . . , un be a system of generators of the A-module B. Thus, u1 , . . . , un is a system of generators of the K-module L, where n = [L : K] (recall that, if S = A \ {0}, then K = S −1 A and L = S −1 B, cf. Proposition 2.3). Hence, they are a K-basis of L, so K-linearly independent. In particular, u1 , . . . , un are A-linearly independent. Since they also generate B, one concludes that u1 , . . . , un is an A-basis of B and that B is a free A-module. This shows (a). Since dK (L) ≤ dA (B) ≤ µA (B) and dK (L) ≤ [L : K] ≤ µA (B) (see Notation 2.4), part (b) follows from part (a) and Proposition 4.2.  Corollary 5.4. Let A ⊂ B = A[b] be a projective simple integral ring extension. Then A ⊂ B is free and 1, b, . . . , bn−1 is a basis, where n = idA (b) = dA (B) = µA (B) and n = idK (b/1) = dK (L) = [L : K]. Proof. If S = A \ {0}, then K = S −1 A and L = S −1 B = S −1 A[b] = K[b/1]. Thus K ⊂ L = K[b/1] is a simple algebraic field extension. By Proposition 2.3, idA (b) = dA (B) = µA (B) = n, say, and idK (b/1) = dK (L) = [L : K] = m, say. By Theorem 5.2 and Corollary 5.3, n = m and A ⊂ B is free (see Corollary 5.3). Since {1, b, . . . , bn−1 } is a minimal system of generators of B = A[b], then it is a basis of the free A-module B (see Reminder 5.1).  Sub-multiplicativity holds in the case of projective finite ring extensions A ⊂ B with K ⊂ L being simple. Corollary 5.5. Let A ⊂ B and B ⊂ C be two finite ring extensions. If A ⊂ B is projective and K ⊂ L is simple, then dA (C) ≤ dA (B)dB (C). If moreover, K ⊂ L is separable, B ⊂ C is projective and L ⊂ M is simple, then dA (C) = dA (B)dB (C). Proof. By Proposition 2.9, there exists a maximal ideal m of A such that dA (C) = dAm (Cm ). Since A ⊂ B is projective, then Am ⊂ Bm is free with fields of fractions Q(Am ) = Q(A) = K and Q(Bm ) = Q(B) = L, respectively, where K ⊂ L is simple by hypothesis. By Corollary 5.3, dAm (Bm ) = µAm (Bm ). Therefore, by Corollary 3.4 and Proposition 2.3, dA (C) = dAm (Cm ) ≤ dAm (Bm )dBm (Cm ) ≤ dA (B)dB (C). As for the second part of the statement, by hypothesis, A ⊂ C is projective and K ⊂ M is simple (again, we use the extended primitive element theorem). By Theorem 5.2, dK (L) = dA (B), dL (M ) = dB (C) and dK (M ) = dA (C). By Remark 4.9, dK (M ) = dK (L)dL (M ), so dA (C) = dA (B)dB (C).  INTEGRAL DEGREE OF INTEGRAL RING EXTENSIONS 11 Now we can complement Example 2.2. Let A ⊂ B a ring extension. Let G be a finite group acting as A-algebra automorphisms on B. Define B G as the subring B G = {b ∈ B | σ(b) = b, for all σ ∈ G}. It is said that A ⊂ B is a Galois extension with group G if B G = A, and for any maximal ideal n in B and any σ ∈ G \ {1}, there is a b ∈ B such that σ(b) − b 6∈ n (see, e.g., [8, Definition 4.2.1]). Corollary 5.6. Let G be a finite group and let A ⊂ B be a Galois ring extension with group G. Then A ⊂ B is a projective finite ring extension and dK (L) = dA (B) = [L : K] = o(G). Proof. Since A ⊂ B is a Galois ring extension of domains with group G, then A ⊂ B is a projective finite ring extension, K ⊂ L is a Galois field extension with group G and [L : K] = o(G) (see, e.g., [8, Subsequent Remark to Definition 4.2.1 and Lemma 4.2.5]). In particular, K ⊂ L is separable and hence simple. By Theorem 5.2, dK (L) = dA (B) = [L : K] = o(G).  Next we calculate the integral degree when A is a Dedekind domain and K ⊂ L is simple, for example, when B is the ring of integers of an algebraic number field (see Remark 2.5). Corollary 5.7. Let A ⊂ B be a finite ring extension. Suppose that A is Dedekind and that K ⊂ L is simple. Then A ⊂ B is projective and dK (L) = dA (B) = rankA (B) = [L : K]. If moreover A is a principal ideal domain, then A ⊂ B is free and dK (L) = dA (B) = µA (B). Proof. From the structure theorem of finitely generated modules over a Dedekind domain, and since B is a torsion-free A-module, it follows that A ⊂ B is a projective finite ring extension (see, e.g., [16, Corollary to Theorem 1.32, page 30]). Since A ⊂ B is projective finite and K ⊂ L is simple, then dK (L) = dA (B) = rankA (B) = [L : K] (see Theorem 5.2). Finally, if A is a principal ideal domain, then A ⊂ B must be free and we apply Corollary 5.3.  6. Integrally closed base ring As always, A ⊂ B and B ⊂ C are integral ring extensions of domains, and K, L and M are their fields of fractions, respectively. Recall that A denotes the integral closure of A in K. In this section we focus our attention on the case where A is integrally closed. We begin by noting that, in such a situation, A ⊂ B has minimal integral degree. Proposition 6.1. Let A ⊂ B be an integral ring extension. Then, for every b ∈ B, idK (b) = idA (b). In particular, if A is integrally closed, then dK (L) = dA (B). Proof. Since K ⊃ A, idK (b) ≤ idA (b). On the other hand, it is well-known that the minimal polynomial of b over K has coefficients in A (see, e.g., [2, Chapter V, § 1.3, Corollary to Proposition 11]), which forces idA (b) ≤ idK (b). So idK (b) = idA (b). Suppose now that A is integrally closed. Then, for every b ∈ B, idA (b) = idA (b) = idK (b) ≤ dK (L). Thus dA (B) ≤ dK (L). The equality follows from Proposition 2.3.  Certainly, idA (b) may not be equal to idA (b), as the next example shows. √ √ √ Example 6.2. Let A = Z[ −3]. Then K = Q(A) = Q( −3). Let b = (1 + −3)/2 ∈ K. Clearly, b is integral over A, and the minimal polynomial of b over A is T 2 − T + 1. Thus idA (b) = 2, whereas idK (b) = 1. Recall that a simple integral ring extension B = A[b] over an integrally closed domain A is free. Indeed, as said above, the minimal polynomial p(T ) of b over K has coefficients in A. Therefore 1, b, . . . , bn−1 is a set of generators of the A-module A[b] (where n = deg p(T )). Moreover, since they are linearly independent over K, they are also linearly independent over A. The next result, which is a rephrasing of this fact, is obtained as a direct consequence of Proposition 6.1. Corollary 6.3. Let A ⊂ B be a finite ring extension. Suppose that A is an integrally closed domain. Then, dA (B) = µA (B) is equivalent to A ⊂ B free and K ⊂ L simple. In particular, if A ⊂ B is simple and A is integrally closed, then A ⊂ B is free. 12 JOSÉ M. GIRAL, LIAM O’CARROLL, FRANCESC PLANAS-VILANOVA, AND BERNAT PLANS Proof. By Proposition 6.1, one has dK (L) = dA (B). Thus, dA (B) = µA (B) is equivalent to dK (L) = [L : K] = µA (B) (see Notation 2.4). The latter is equivalent to A ⊂ B free and K ⊂ L simple (see Corollary 5.3). To finish apply Proposition 2.3.  This corollary suggests how to find a finite integral extension A ⊂ B with dK (L) = dA (B) and [L : K] < µA (B). It suffices to take, as in the next example, an extension of number fields K ⊂ L which does not admit a relative integral basis (see also Final Comments 7.6). √ √ Example 6.4. Let K = Q( −14) and L = K( −7). Let A be the integral closure of Z in K and let B be the integral closure of Z in L. Then A ⊂ B is a finite integral extension, A is integrally closed, K ⊂ L is simple, but A ⊂ B is not free (see [13]). Hence, by Corollary 6.3, dA (B) √ < µA (B). Note that d √K (L) =√dA (B) = [L : K] = 2. Moreover, it is well-known that A = Z[ −14] and√B = Z[(1√+ −7)/2, 2] (see, e.g., [7, Theorem 9.5]). An easy calculation shows that B = h1, (1 + −7)/2, 2iA . Thus µA (B) = 3. Now, we return to the sub-multiplicativity question. Theorem 6.5. Let A ⊂ B and B ⊂ C be two integral ring extensions. Then, for every α ∈ C, In particular, idA (α) ≤ µA (A)dA (B)idB (α). dA (C) ≤ µA (A)dA (B)dB (C). Proof. Let α ∈ C. Consider the integral extensions A ⊂ A and A ⊂ A[C], where A[C] stands for the A-algebra generated by the elements of C. By Theorem 3.2, idA (α) ≤ µA (A)idA (α). But, by Proposition 6.1, idA (α) = idK (α). On the other hand, applying Theorem 4.7 and Proposition 2.3, we have idK (α) ≤ dK (L)idL (α) ≤ dA (B)idB (α). Hence, idA (α) ≤ µA (A)dA (B)idB (α). By Lemma 3.1, we are done.  Remark 6.6. The ring A[C] appears in the proof of Theorem 6.5. A natural question is whether this ring is the tensor product A ⊗A C. Observe that indeed there is a natural surjective morphism of rings A ⊗A C → A[C]. However this morphism is not necessarily an isomorphism. For instance, take A = k[t2 , t3 ] and C = A, where A = k[t]. So A[C] = A = k[t]. One can check that A ⊗A C is not a domain. Indeed, write A = A[X]/I, with I = (X 2 − t2 , t2 X − t3 , t3 X − t4 ). Therefore A ⊗A C = A[X, Y ]/H, where H = (X 2 − t2 , t2 X − t3 , t3 X − t4 , Y 2 − t2 , t2 Y − t3 , t3 Y − t4 ). Note that X 2 − Y 2 is in H, but neither X − Y nor X + Y are in H. Hence A ⊗A C is not a domain and cannot be isomorphic to A[C] = k[T ], which is a domain. As an immediate consequence of Theorem 6.5, we get the sub-multiplicativity of the integral degree with respect to A ⊂ B when A is integrally closed. Corollary 6.7. Let A ⊂ B and B ⊂ C be two integral ring extensions. Suppose that A is an integrally closed domain. Then dA (C) ≤ dA (B)dB (C). However, in the non-integrally closed case, this formula may fail already for noetherian domains of dimension 1, as shown below. To see this, we take advantage of an example due to Dedekind of a non-monogenic number field L. Concretely, we consider B as the ring of integers of L and find A and C such that dA (C) > dA (B)dB (C). Example 6.8. Let γ1 be a root of the irreducible polynomial T 3 − T 2 − 2T − 8 ∈ Q[T ]. Let L = Q(γ1 ). Let B be the integral closure of Z in L (i.e., the ring of integers of L). Then (a) B is a free Z-module with basis {1, γ1 , γ2 }, where γ2 = (γ12 + γ1 )/2. INTEGRAL DEGREE OF INTEGRAL RING EXTENSIONS 13 (b) dQ (L) = dZ (B) = µZ (B) = 3 and the extension Z ⊂ B is not simple (L is non-monogenic). Let A = h1, 2γ1 , 2γ2 iZ = {a + bγ1 + cγ2 ∈ B | a, b, c ∈ Z, b ≡ c ≡ 0 (mod 2)}. Then (c) A is a free Z-module and an integral domain with field of fractions K = Q(A) = L. (d) B is the integral closure of A in L, dA (B) = 2 and µA (B) = 3. Let C = B[α], where α is a root of p(T ) = T 2 + γ1 T + (1 + γ2 ) ∈ B[T ]. Then (e) B ⊂ C is an integral extension with dB (C) = 2 and dA (C) = 6. In particular, dA (B)dB (C) < dA (C) < dA (A)dA (B)dB (C). Proof. By Corollary 5.7, Z ⊂ B is free and dQ (L) = dZ (B) = µZ (B). Moreover, since γ1 ∈ B with idZ (γ1 ) = 3, then dZ (B) ≥ 3. The proof that {1, γ1 , γ2 } is a free Z-basis of B and that Z ⊂ B is not simple is due to Dedekind (see, e.g., [16, p. 64]). This proves (a) and (b). Note that, from the equalities γ12 = −γ1 + 2γ2 , γ22 = 6 + 2γ1 + 3γ2 and γ1 γ2 = 4 + 2γ2 , the product in B can be immediately computed in terms of its Z-basis {1, γ1 , γ2 }. Clearly {1, 2γ1 , 2γ2 } are Z-linearly independent. One can easily check that A is a ring and that x2 + x ∈ A, for every x ∈ B. Hence, A ⊂ B is an integral extension with dA (B) = 2. Moreover, the field of fractions of A is K = Q(A) = L, and the integral closure of A in K is B. Observe that µA (B) ≤ µZ (B) = 3. Below we will see that µA (B) = 3. Now let us prove that dB (C) = 2. One readily checks that the discriminant ∆ = −γ12 − 2γ1 − 4 of p(T ) has norm NL/Q (∆) = −16. Since −16 is not a square in Q, then ∆ cannot be a square in L. Therefore p(T ) is irreducible over L and dB (C) = 2. Let h(T ) ∈ A[T ] be a minimal degree polynomial of α over A. Since p(T ) is the irreducible polynomial of α over L, it follows that h(T ) = p(T )q(T ), for some q(T ) ∈ L[T ]. Moreover, q(T ) must necessarily belong to B[T ], because B is integrally closed in L (see, e.g., [2, Chapter V, § 1.3, Proposition 11]). Therefore, q(T ) is a monic polynomial in B[T ] such that p(T )q(T ) ∈ A[T ]. An easy computation shows that this implies that deg(q(T )) ≥ 4 (note that the existence of such a polynomial q(T ) = T n + b1 T n−1 + · · · + bn−1 T + bn is equivalent to the solvability in Z modulo 2 of a certain system of linear equations with coefficients in Z, in the unknowns aij ∈ Z, where bi = ai,1 + ai,2 γ1 + ai,3 γ2 ). Thus, idA (α) = deg(h(T )) ≥ 6. By Theorem 3.2, 6 ≤ idA (α) ≤ dA (C) ≤ µA (B)dB (C) ≤ 6. Hence dA (C) = 6 and µA (B) = 3.  Remark 6.9. It is not possible to construct a similar example with B having rank 2 over Z, because dA (B) ≤ µA (B) ≤ rankZ (B) = 2 implies dA (B) = µA (B) and then, by Corollary 3.4, dA (B) ≤ dA (B)dB (C). 7. Upper-semicontinuity Recall that A ⊂ B is an integral ring extension of integral domains, and K = Q(A) and L = Q(B) are their fields of fractions. Let d : Spec(A) → N be defined by d(p) = dAp (Bp ). In this section we study the upper-semicontinuity of d, that is, whether or not, d−1 ([n, +∞)) = {p ∈ Spec(A) | d(p) ≥ n} is a closed set for every n ≥ 1. There are two cases in which upper-semicontinuity follows easily from our previous results. Proposition 7.1. Let A ⊂ B be an integral ring extension. Then d : Spec(A) → N, defined by d(p) = dAp (Bp ), is upper-semicontinuous in any of the following cases: (a) A ⊂ B is simple; (b) A ⊂ B has minimal integral degree (e.g., A ⊂ B is projective finite and K ⊂ L is simple; or A is integrally closed). 14 JOSÉ M. GIRAL, LIAM O’CARROLL, FRANCESC PLANAS-VILANOVA, AND BERNAT PLANS Proof. If A ⊂ B = A[b] is simple, then Ap ⊂ Bp = Ap [b/1] is simple too, for every p ∈ Spec(A). By Proposition 2.3, it follows that d(p) = dAp (Bp ) = µAp (Bp ). But the minimal number of generators is known to be an upper-semicontinuous function (see, e.g., [11, Chapter IV, § 2, Corollary 2.6]). This shows case (a). By Proposition 2.3, (e), dK (L) ≤ dAp (Bp ) ≤ dA (B), for every p ∈ Spec(A). In case (b), that is, if dK (L) = dA (B), then d(p) = dAp (Bp ) = dK (L) is constant, and thus uppersemicontinuous. This happens, for instance, if A ⊂ B is projective finite and K ⊂ L is simple or A is integrally closed, then dK (L) = dA (B) (see Theorem 5.2 or Proposition 6.1).  A possible way to weaken the integrally closed hypothesis is to shrink the conductor C = (A : A) of A in its integral closure A. A first thought would be to suppose that C is of maximal height. However, with some extra assumptions on A, e.g., A local Cohen-Macaulay, analytically unramified and A not integrally closed, one can prove that the conductor must have height 1 (see, e.g., [4, Exercise 12.6]). In this sense, it seems appropriate to start by considering when dim A = 1. Theorem 7.2. Let A ⊂ B be an integral ring extension. Suppose that A is a noetherian domain of dimension 1 and with finite integral closure (e.g., A is a Nagata ring). Then d : Spec(A) → N, defined by d(p) = dAp (Bp ), is upper-semicontinuous. Proof. If A is integrally closed, the result follows from Proposition 7.1. Thus we can suppose that A is not integrally closed. Since A is finitely generated as an A-module, then C = (A : A) 6= 0. Since A is a one dimensional domain, C has height 1 and any prime ideal p containing C must be minimal over it. Therefore, the closed set V (C) coincides with the set of minimal primes over C, so it is finite. Note that, for any p ∈ Spec(A), d(p) = dAp (Bp ) ≥ dK (L) (see Proposition 2.3). Moreover, if p 6∈ V (C), then Ap = Ap and d(p) = dK (L) (see Proposition 6.1). Now, take n ≥ 1. If n > dK (L), then {p ∈ Spec(A) | d(p) ≥ n} ⊆ V (C) is a finite set, hence a closed set. If n ≤ dK (L), then {p ∈ Spec(A) | d(p) ≥ n} = Spec(A). Thus, for every n ≥ 1, d−1 ([n, +∞)) is a closed set and d : Spec(A) → N is upper-semicontinuous.  Remark 7.3. Note that the proof of Theorem 7.2 only uses that V (C) is a finite set of Spec(A). For instance, it also holds if A is a noetherian local domain of dimension 2 and with finite integral closure A. Another example where it would work would be the following: let A be the coordinate ring of a reduced and irreducible variety V over a field of characteristic zero. Then the conductor C contains the Jacobian ideal J. Now J defines the singular locus of V , so if we suppose that V has only isolated singularities, then J is of dimension zero, so C is of dimension zero also. Hence V (C) is finite (see [4, Theorem 4.4.9] and [19, Corollary 6.4.1]). If we skip the condition that A be finitely generated, the result may fail. The following example is inspired by [17, Example 1.4] (see also [3, Example 6.6.]). Example 7.4. There exists a noetherian domain A of dimension 1 with dA (A) = 2, but µA (A) = ∞, and such that d : Spec(A) → N, defined by d(p) = dAp (Ap ), is not upper-semicontinuous. Proof. Let t1 , t2 , . . . , tn , . . . be infinitely many indeterminates over a field k. Let R = k[t21 , t31 , t22 , t32 , . . .] ⊂ D = k[t1 , t2 , . . .]. Clearly R = D. Note that for f ∈ D = k[t1 , t2 , . . .], f ∈ R if and only if every monomial λti11 · · · tirr of f has each ij = 0 or ij ≥ 2. For every n ≥ 1, let qn = (t2n , t3n )R, which is a prime ideal of R of height 1. Note that for f ∈ R, f ∈ qn if and only if every monomial λti11 · · · tirr of f has in ≥ 2. It follows that tn 6∈ Rqn , because if tn = a/b, a, b ∈ R and b 6∈ qn , then every monomial of a = btn has each ij = 0 or ij ≥ 2, so has in ≥ 2. Therefore, tn appears in each monomial of b, but since b ∈ R, the exponent of tn in each monomial of b must be at least 2, so b ∈ qn , a contradiction. Now, set R ⊂ Dn = k[t1 , . . . , tn−1 , t2n , t3n , tn+1 , . . .] ⊂ D and Sn = R \ qn , a multiplicatively closed subset of R. Clearly Rqn = Sn−1 Dn . INTEGRAL DEGREE OF INTEGRAL RING EXTENSIONS 15 Claim. Let I be an ideal of R such that I ⊆ ∪n≥1 qn . Then I is contained in some qj . If I is contained in a finite union of qi , using the ordinary prime avoidance lemma, we are done. Suppose that I is not contained in any finite union of qi and let us reach a contradiction. Take f ∈ I, f 6= 0. Then f ∈ k[t1 , . . . , tn ] for some n ≥ 1 and f is in a finite number of qi , corresponding to the variables ti that appear in every single monomial of f . We can suppose that f ∈ q1 ∩ . . . ∩ qr , for some 1 ≤ r ≤ n, and f 6∈ qi , for i > r. Since I 6⊂ q1 ∪ . . . ∪ qr , there exists g ∈ I such that g 6∈ q1 ∪ . . . ∪ qr . Let h = t2s g ∈ I, where s > n, so that f and h have no common monomials. Since qi are prime, then h = t2s g 6∈ q1 ∪ . . . ∪ qr . Since f, h ∈ I ⊆ ∪n≥1 qn , then f + h ∈ qm , for some m ≥ 1. But since f ∈ q1 ∩ . . . ∩ qr and h 6∈ q1 ∪ . . . ∪ qr , then necessarily m > r. Thus f + h ∈ qm , where m > r. But since f and h have no common monomials, this implies that every monomial of f must contain t2m , so f ∈ qm , a contradiction. Hence I ⊆ qj for some j and the Claim is proved. (An alternative proof would follow from [18, Proposition 2.5], provided that k is uncountable.) Let S = R \ ∪n≥1 qn , a multiplicatively closed subset of R. Let A = S −1 R and pn = S −1 qn . If Q is a prime ideal of R such that Q ⊆ ∪n≥1 qn , then, by the Claim above, Q ⊆ qj , for some n ≥ 1. In particular, Spec(A) = {(0)} ∪ {pn | n ≥ 1}, where each pn is finitely generated. Therefore A is a one dimensional noetherian domain. For every n ≥ 1, Apn = (S −1 R)S −1 qn = Rqn = Sn−1 Dn . Moreover, tn = t3n /t2n is in the field of fractions of Apn and t2n ∈ Apn , i.e. tn is integral over Apn . Thus Apn [tn ] = (Sn−1 Dn )[tn ] = Sn−1 D and Apn = Apn [tn ] = Sn−1 D = Sn−1 (D) = Sn−1 D. Hence Apn = Apn [tn ]. Recall that tn 6∈ Rqn = Apn and dApn (tn ) ≤ 2. By Proposition 2.3, dApn (Apn ) = dApn (Apn [tn ]) = 2. Consider the integral extension A ⊂ A and d : Spec(A) → N, defined by d(p) = dAp (Ap ) = dAp (Ap ). We have just shown that, for every n ≥ 1, d(pn ) = dApn (Apn ) = 2. On the other hand, d((0)) = dQ(A) (Q(A)) = 1 because Q(A) = Q(A). Therefore, d−1 ([2, +∞)) = Spec(A) \ {(0)}, which is not a closed set. Indeed, suppose that Spec(A) \ {(0)} = V (I), for some non-zero ideal I. Since A is a one dimensional noetherian domain, I has height 1 and V (I) is the finite set of associated primes to I. However, Spec(A) \ {(0)} = Max(A), which is infinite, a contradiction. So d : Spec(A) → N is not upper-semicontinuous.  Remark 7.5. Contrary to the upper-semicontinuity, sub-multiplicativity does not work for one dimensional noetherian domains with finite integral closure. See Example 6.8, where A was a noetherian domain of dimension 1 and with finite integral closure. Final comments 7.6. We finish the paper by mentioning some points that we think would be worth clarifying. To simplify, suppose that A ⊂ B and B ⊂ C are two finite ring extensions, where, as always, A and B are two integral domains, and K and L are their fields of fractions, respectively. (1) We have shown that A ⊂ B of maximal integral degree implies sub-multiplicativity (cf. Corollary 3.4). Does the same work for minimal integral degreee? (2) We have shown that A ⊂ B of minimal integral degree implies upper-semicontinuity (cf. Proposition 7.1). Does the same work for maximal integral degreee? (3) We have shown that A ⊂ B free and K ⊂ L simple implies dK (L) = dA (B) (Corollary 5.3). Can we omit the hypothesis K ⊂ L simple? In other words, does [L : K] = µA (B) imply dK (L) = dA (B)? If so, we would have a “down-to-up rigidity” in the diagram of Notation 2.4. Note that the “up-to-down rigidity” is not true (see, e.g., Example 6.4). (4) Does the condition dA (B) = µA (B) localize? In particular, does dA (B) = µA (B) imply dK (L) = [L : K]? That would imply a “right-to-left rigidity” in the diagram of Notation 2.4. If A is integrally closed, the answer is affirmative. Note that Examples 2.6 and 6.8 affirm that the “left-to-right rigidity” is not true. (5) It would be interesting to study the sub-multiplicativity and upper-semicontinuity properties for the specific case of affine domains A and B. 16 JOSÉ M. GIRAL, LIAM O’CARROLL, FRANCESC PLANAS-VILANOVA, AND BERNAT PLANS (6) Can one replace µA (A) by dA (A) in the inequality dA (C) ≤ µA (A)dA (B)dB (C) of Theorem 6.5? (7) Is the integral degree upper-semicontinuous for Nagata rings of dimension greater than 1? (8) Is there any clear relationship between dA (B) and the pair of numbers dA/p (B/pB) and dAp (Bp )? An affirmative answer could be useful in recursive arguments. (9) Upper-semicontinuity does not imply sub-multiplicativity. We wonder to what extent submultiplicativity could imply upper-semicontinuity. Acknowledgement The authors were unaware that references [6], [9], [10], [12] and [20] treated some aspects of the notion of integral degree, though in a different framework. They want to thank the referee for pointing them out. They also would like to thank the referee for his/her comments. The third author was partially supported by grant 2014 SGR-634 and grant MTM2015-69135-P. The fourth author was partially supported by grant 2014 SGR-634 and grant MTM2015-66180-R. References [1] N. Bourbaki, Algebra. Chapters 4-7. Translated from the 1981 French edition by P. M. Cohn and J. Howie. Reprint of the 1990 English edition [Springer, Berlin]. Elements of Mathematics (Berlin). Springer-Verlag, Berlin, 2003. [2] N. Bourbaki, Commutative Algebra. Chapters 1-7. Translated from the French. Reprint of the 1989 English translation. Elements of Mathematics (Berlin). Springer-Verlag, Berlin, 1998. [3] J.M. Giral, F. Planas-Vilanova, Integral degree of a ring, reduction numbers and uniform Artin-Rees numbers, J. Algebra 319 (2008), 3398-3418. [4] C. Huneke and I. Swanson, Integral closure of ideals, rings, and modules. London Mathematical Society Lecture Note Series, 336. Cambridge University Press, Cambridge, 2006. [5] N. Jacobson, Structure theory for algebraic algebras of bounded degree. Ann. of Math. 46 (1945), 695-707. [6] N. Jacobson, Lectures in abstract algebra. III. Theory of fields and Galois theory. Second corrected printing. Graduate Texts in Mathematics, 32. Springer-Verlag, New York-Heidelberg, 1975. [7] G.J. Janusz, Algebraic Number Fields, Second Edition, Graduate Studies in Mathematics, 7. American Mathematical Society, 1996. [8] C.U. Jensen, A. Ledet, N. Yui, Generic polynomials. Constructive aspects of the inverse Galois problem. Mathematical Sciences Research Institute Publications, 45. Cambridge University Press, Cambridge, 2002. [9] I. Kaplansky, On a problem of Kurosch and Jacobson. Bull. Amer. Math. Soc. 52 (1946), 496-500. [10] A. Kurosch, Ringtheoretische Probleme, die mit dem Burnsideschen Problem über periodische Gruppen in Zusammenhang stehen, Bull. Acad. Sci. URSS. Sr. Math. [Izvestia Akad. Nauk SSSR] 5 (1941), 233-240. [11] E. Kunz, Introduction to commutative algebra and algebraic geometry. Translated from the German by Michael Ackerman. With a preface by David Mumford. Birkhäuser Boston, Inc., Boston, MA, 1985. [12] J. Levitzki, On a problem of A. Kurosch. Bull. Amer. Math. Soc. 52 (1946), 1033-1035. [13] R. MacKenzie, John Scheuneman, A number field without a relative integral basis. Amer. Math. Monthly 78 (1971), 882-883. [14] H. Matsumura, Commutative algebra. Second edition. Mathematics Lecture Note Series, 56. Benjamin Cummings Publishing Co., Inc., Reading, Mass., 1980. [15] H. Matsumura, Commutative ring theory. Cambridge Studies in Advanced Mathematics, 8. Cambridge University Press, Cambridge, 1986. [16] W. Narkiewicz, Elementary and analytic theory of algebraic numbers. Third edition. Springer Monographs in Mathematics. Springer-Verlag, Berlin, 2004. [17] J. Sally, W.V. Vasconcelos, Stable rings. J. Pure Appl. Algebra 4 (1974), 319-336. [18] R.Y. Sharp, P. Vámos, Baire’s category theorem and prime avoidance in complete local rings. Arch. Math. (Basel) 44 (1985), no. 3, 243-248. [19] W.V. Vasconcelos, Computational methods in commutative algebra and algebraic geometry. With chapters by David Eisenbud, Daniel R. Grayson, Jürgen Herzog and Michael Stillman. Algorithms and Computation in Mathematics, 2. Springer-Verlag, Berlin, 1998. [20] J. Voight, Rings of low rank with a standard involution. Illinois J. Math. 55 (2011), 1135-1154. Departament d’Àlgebra i Geometria, Universitat de Barcelona. Gran Via de les Corts Catalanes 585, E-08007 Barcelona. [email protected] INTEGRAL DEGREE OF INTEGRAL RING EXTENSIONS Maxwell Institute for Mathematical Sciences, School of Mathematics, University of Edinburgh. EH9 3DF, Edinburgh. Departament de Matemàtiques, Universitat Politècnica de Catalunya. Diagonal 647, ETSEIB, E-08028 Barcelona. [email protected] Departament de Matemàtiques, Universitat Politècnica de Catalunya. Diagonal 647, ETSEIB, E-08028 Barcelona. [email protected] 17
0math.AC
arXiv:1710.09170v1 [math.ST] 25 Oct 2017 Model Averaging for Generalized Linear Model with Covariates that are Missing completely at Random Miaomiao Zheng1 and Qingfeng Liu2 October 26, 2017 1 School of Mathematical Sciences, Capital Normal University, Beijing China. E-mail: [email protected]. 2 Corresponding author. Department of Economics, Otaru University of Commerce, Otaru City, Hokkaido, Japan. E-mail: [email protected]. Liu acknowledges financial support from JSPS KAKENHI Grant Number JP16K03590. Abstract In this paper, we consider the estimation of generalized linear models with covariates that are missing completely at random. We propose a model averaging estimation method and prove that the corresponding model averaging estimator is asymptotically optimal under certain assumptions. Simulaiton results illustrate that this method has better performance than other alternatives under most situations. Key Words: Missing data completely at random, generalized linear models, asymptotically optimal. 1 Introduction Our attempt in this paper is at developing an optimal model averaging method for generalized linear models (GLMs) with missing values on some covariates. Model averaging, as an alternative of model selection, is widely adopted for dealing with the uncertainty that the model selection takes. Unlike Bayesian model averaging, the current paper focuses on the method of determining weights from frequencies perspective. The problem of missing values on some covariates is one of the most common challenge facing empirical researchers, which will bring about a great impact on the subsequent modeling as well as inference process. There is a large collection of literature dealing with missing covariates. See Little (1992) and Toutenburg, Heumann, Nittner, and Scheid (2002) for reviews of this topic. There are three types of missing data: missing completely at random (MCAR), missing at random (MAR) and missing not at random. Referring to Little (1992), data is MCAR if the probability of missing or not for a covariate is independent with any covariates (including itself). Data is MAR if the probability of missing or not for a covariate is independent with any covariates’ missing values and may depend on the covariates’ observed values only. Except for MCAR and MAR, the other types of missing data are all missing not at random. In the current paper, we focus on the case that the covariates are MCAR, which can happen in practice. A very straightforward and widely used method to handle with missing covariates problem is complete-case (CC) analysis. The CC method estimates a model using observations with complete data and discards other observations that have some missing values of some covariates. Obviously, the discarding of data seems an unnecessary waste of information. Another method that is widely used to deal with missing data is mean imputation. However, it is well known that data imputation generally depends on observed covariates, so it is not appropriate for the MCAR situation. In order to make full use of the sample information and avoid the uncertain influence imputation bring, we propose a model averaging method, which is based on model averaging for GLMs Zhang, Yu, Zou, and Liang (2016) to combine some submodels, including one CC model and some partial data-based models. The partial data-based models can use the sample information sufficiently. Hereafter, we refer to this method as sufficient-sample-information (SSI) method, which will be described in details in section 2. In this paper, we propose weight choice criterion based on the KullbackLeibler (KL) loss. We prove that the average estimator is asymptotically optimal in the sense that the corresponding KL loss is asymptotically identical to that of the infeasible best model average estimator. To the best of 1 our knowledge, the current paper is the first work using model averaging to deal with missing data in GLMs. The rest of the article is organized as follows. Section 2 describes the model framework and establishes the model averaging process. Section 3 shows the weight selection criteria and methods. Section 4 presents asymptotic optimality. Section 5 reports the results of the simulation studies on logistic and Poisson regression, respectively. Section 6 Summary. The relevant assumptions which are needed for the theorem’s proof and the proof processes are in the appendix. 2 Model framework and model averaging process We consider the data generating process(DGP) f (yi |θi , φ) = exp{ yi θi − b(θi ) + c(yi , φ)}, i = 1, . . . , n. φ (1) where θi and φ are parameters, and b(·) and c(·, ·) are known functions. The canonical parameter θi connects the parameter β and the K-dimension covariate vector xi in the form θi = xTi β. Here we assume that K is fixed. Suppose we have S candidate models and S is finite. We estimate β under different candidate models by maximum likelihood estimation. Let θ0,i be the true value of θi . We do not require that the true value θ0,i is indeed a linear combination of xi . In other words, it is not required that there exist a β so that θ0,i = xTi β. Therefore, each of candidate model can be misspecified. For a data set with K covariates and the sample size n to be fixed, the number of possible covariate missing cases is 2K − 1 (we collect covariates whose position of missing are same into one group). Noting that not all such possible cases need be present in a data set, we assume that we have S − 1 ≤ 2K − 1 covariate missing cases, indexed by s = 2, . . . , S. For clear illustration, we provide the following example. Example Suppose we have a sample with K covariates and the sample size is n. The covariates are missing completely at random. By sorting the position of missing covariates, the following data matrix can be obtained after a certain rearrangement of rows as well as columns: 2  X11 X12 X13 X14 X15  X21 missing missing X24 X25   X =  X31 X32 X33 missing X35  X41 X42 missing missing missing n×K  where Xi1 i2 (i1 ∈ {1, 2, 3, 4}, i2 ∈ {1, 2, 3, 4, 5}) can be matrices. There are 5 cases with incomplete covariates: (X11 X21 X31 X41 )T , (X12 missing X32 X42 )T , (X13 missing X33 missing)T , (X14 X24 missing missing)T , (X15 X25 X35 missing)T , ,so S = 6 in this example. We denote the CC model by model 1, under which all the covariates are utilized but the sample size is smaller than n. Alternatively, to utilize sufficient sample size, we may ignore some missing values of covariates. Since we have S − 1 cases of missing covariates, we can have S models in all, including one CC model and S − 1 SSI models. For the sth model, let y (s) be the associated dependent variable and X (s) be the ns × Ks covariate matrix, where ns is the sample size, Ks is the number of covariate. We assume X (s) to be of full column rank. In example 1, model 1 has covariate matrix (X11 X12 X13 X14 X15 ). The other five SSI models have following covariate matrices: X (1) = (X11 X21 X31 X41 )T , X (2) = (X12 X32 X42 )T , X (3) = (X13 X33 )T , X (4) = (X14 X24 )T and X (5) = (X15 X25 X35 )T . Let ζs denote the index set of the columns of X used in model s. Let πs denote the projection matrix mapping β = (β1 , . . . , βK )T to the subvector πs β = β (s) of components βk , k ∈ ζs . Denote the maximum likelihood estimator of β (s) as β̃ (s) . Then the estimator of β is β̂ (s) = πs T β̃ (s) for the sth model. Some components of β̂ (s) are zeros. S P Let w = (w1 , . . . , wS )T belonging in set: H = {w ∈ [0, 1]S : ws = 1}. Then the model averaging estimator of β is: β̂(w) = S X s=1 3 ws β̂ (s) . s=1 Replace missing values in X by zeros and denote the resulting matrix by X̃. In Example 1:   X11 X12 X13 X14 X15  X21 0 0 X24 X25   X̃ =   X31 X32 X33 0 X35  X41 X42 0 0 0 n×K Suppose X̃ to be of full column rank, y = (y1 , . . . , yn )T , θ = (θ1 , . . . , θn )T . θ0 is the true value of θ. Then a model averaging estimator of θ0 is: θ{β̂(w)} = [θ1 {β̂(w)}, . . . , θn {β̂(w)}]T = X̃ β̂(w). Note that X̃, not X, appears in θ{β̂(w)}, because the use of X is infeasible. 3 Weight Choice Our weight choice criterion is: G (w) = 2φ−1 B{β̂(w)} − 2φ−1 y T θ{β̂(w)} + λn w T k, (2) where λn = 2 like that of the panalty term of AIC, K = (k1 , . . . , kS )T , ks is the number of columns of X used in the sth candidate model. G (w) comes from the Kullback-Leibler(KL) loss which is defined as foln n P P lows. Let µ = Ey, B0 = b(θ0i ), B{β̂(w)} = b[θi {β̂(w)}], and i=1 i=1 J(w) = φ−1 B{β̂(w)} − φ−1 µT θ{β̂(w)}. The KL loss of θ{β̂(w)} is KL(w) = 2 n X Ey∗ {log{f (y ∗|θ0 , φ)} − log{f (y ∗|θ{β̂(w)}, φ)}} i=1 −1 = 2φ B{β̂(w)} − 2φ−1 µT θ{β̂(w)} − 2φ−1 B0 + 2φ−1 µT θ0 = 2J(w) − 2φ−1 B0 + 2φ−1µT θ0 , (3) where y ∗ is another realization from f (·|θ0 , φ) and independent of y. Assume φ is known. Typically, in logistic and Poisson regressions, φ = 1. If µ was known, we could obtain a weight vector by minimizing J(w) given the relationship between J(w) and KL(w) in (3). In practice, the minimization of J(w) is infeasible owing to the unknown parameter µ. An intuitive solution 4 is to estimate J(w). That is, we may use y to estimate µ directly, i.e., we plug y into J(w). Then we can obtain weights by minimizing φ−1 B{β̂(w)} − φ−1 y T θ{β̂(w)}. Unfortunately, this intuitive procedure leads to overfitting. To avoid the overfitting, we use (2) as our weight choice criterion. The resultant weight vector is defined as ŵ = argminw∈W G (w) 4 (4) Asymptotic Optimality ∗ Let β(s) be the parameter vector which minimizes the KL divergence between the true model (1) and the sth candidate model. From Theorem 3.2 of White (1982), we know that, under certain regularity conditions, for s ∈ {1, . . . , S}, ∗ β̂(s) − β(s) = Op (n−1/2 ). s Furthermore, if nn1 >c, where n1 is the sample size of CC model and c is a positive constant, since n > ns > n1 , we have ns = c∗ n for some positive constant, then ∗ β̂(s) − β(s) = Op (n−1/2 ), (5) for s ∈ {1, . . . , S}. In order tostudy the optimality of the model averaging estimator, we need the following conditions. Condition(C.1) ||X̃ T µ|| = O(n), ||X̃ T ǫ|| = Op (n1/2 ), and uniformly for w∈W, ||∂B(β)/∂β T |β=β̃(w) || = Op (n) for every β̃(w) between β̂(w) and β ∗ (w). ∗ Condition(C.2) Uniformly for s ∈ {1, . . . , S}, n−1 σ 2 ||θ(β(s) )||2 = O(1). Condition(C.3) nξn−2 = o(1). The following theorem establishes the asymptotic optimality of the model averaging estimator θ{β̂(w)}. Theorem 1 If equation (5) and Conditions (C.1)-(C.3) are satisfied, and n−1/2 λn = O(1), then KL(ŵ) →1 (6) inf w∈W KL(w) in probability as n → ∞. 5 Proof 1 See appendix. Theorem 1 tell us, based on the estimated weight ŵ, the model averaging estimate achieves the infimum of the KL loss. 5 Simulation study In this section, we conduct two simulation experiments: logistic regression and Poisson regression, to demonstrate the finite sample performance of our model averaging method. Because our method can achieve asymptotic optimality for missing data, we denote it by MOPT. In the simulations, we compare the MOPT method with the CC model, model after mean imputation (MIM), model averaging after mean imputation(MIMA). We set sample size n ∈ {100, 200} and use KL loss (divided by n) for assessment. For each setting, we generate 1000 simulated data. To mimic the situation that all candidate models are misspecified, we pretend that the last covariate missed in all candidate models. The simulation design is a logistic model. yi is generated from Binomial(1, p0i ) with p0i = exp(xTi β)/{1 + exp(xTi β)}, where β = (1, 0.2, −1.2, −1, 0.1)T and xi = (x1i , x2i , x3i , x4i , x5i ) follow normal distribution with mean zeros, variance ones and the correlations between different components of xi being 0.75. In order to simulate covariates which are missing completely at random, following Zhang (2013), we construct the missing data matrix as follows. Data missing only occurs with xi3 and xi4 for some i. In order to control the missing structures, we generate ǫi = (ǫi1 , ǫi2 ) ∼ N(0, I2 ), which is independent with xi . When ǫik <a, xi(k+2) is missed (k = 1, 2). We set the parameter a ∈ {−0.3, 0, 0.5} to control the ratio of missing observations. For MIMA, we consider all possible submodels. Simulation results are as follows(×10−1 ): 6 n a=-0.3 100 200 a=0 100 200 a=0.5 100 200 Table 1: Figure MOPT mean 0.887 median 0.867 SD 5.880 mean 0.732 median 0.739 SD 3.114 mean 1.068 median 0.994 SD 1.755 mean 0.906 median 0.892 SD 3.700 mean 1.321 median 1.244 SD 0.532 mean 1.256 median 1.226 SD 0.329 1. Binomial CC 1.666 1.169 209.835 0.635 0.501 14.688 13.907 1.781 72302.390 1.091 0.797 65.761 274.463 66.319 470643.900 15.346 3.040 12859.850 MIM MIMA 1.026 0.998 0.899 0.959 16.460 8.106 0.774 0.800 0.722 0.795 0.549 3.834 1.369 1.231 1.162 1.092 7.534 3.016 1.017 0.995 0.940 0.974 7.864 4.420 1.775 1.450 1.576 1.449 1.791 0.484 1.549 1.380 1.430 1.355 1.471 0.573 Table 1. shows that when sample size n increases or the proportion of missing observations decreases, the mean and median values of the KL loss of the MOPT decrease. The mean and median values of the other four methods also decrease as the sample size n increases or the proportion of the missing observations decreases. Except for the case a = −0.3, n = 200, the mean and median values of MOPT are both lower than all others. This pattern is also almost true regarding standard deviation(SD) values except two cases of a = −0.3, n = 200, in which MOPT yields larger SD than MIM, and a = 0.5, n = 100, in which MOPT yields larger SD than MIMA. Moreover, the standard SD values of CC model are very huge comparing with other models in most cases. This phenomenon show that the KL loss is not stable for each replication of simulation for CC model. This is becasue that each replication may have different data missing patern that leads to significant differenc in sample size for the CC model. 7 6 Concluding Remarks In this paper, we propose a model averaging method (MOPT) to combine the generalized linear models for the case when covariates are missing completely at random to utilize the largest set of available cases. The asymptotic optimality of our method has been proved. Developing model averaging method to the generalized addictive models (GAMs) with missing data and the nonlinear models is also worthy of study in the future. 7 Appendix All the limiting properties here and throughout the text hold under n → ∞. S P ∗ Let ǫ = (ǫ1 , . . . , ǫn )T = y − µ, σ 2 = maxi∈{1,...,n} var(ǫi ), β ∗ (w) = ws β(s) , s=1 ∗ −1 ∗ −1 −1 T ∗ KL (w) = 2φ B{β (w)} − 2φ B0 − 2φ µ [θ{β (w)} − θ0 ], and ξn = inf w∈W KL∗ (w). P roof of T heorem 1 Let G˜(w) = G (w) − 2φ B0 + 2φ−1 µT θ0 . Obviously, ŵ = argminw∈W G˜(w). According to the proof of T heorem 1′ in Wan et al.(2010), Theorem 1 is valid if the following hold: −1 sup w∈W |KL(w) − KL∗ (w)| = op (1) KL∗ (w) (A.1) and |G˜(w) − KL∗ (w)| = op (1) sup KL∗ (w) w∈W (A.2) By (5), we know that uniformly for w ∈ W , ∗ β̂(w) − β (w) = S X ∗ ws (β̂(s) − β̂(s) ) = Op (n−1/2 ) (A.3) s=1 It follows from (A.3), Condition (C.1) and Taylor expansion that uniformly for w ∈ W , ∂B(β) |β=β̃(w) ||||β̂(w) − β ∗ (w)|| = Op (n1/2 ), T ∂β T ∗ µ [θ{β̂(w)} − θ{β (w)}] ≤ ||µT X||||β̂(w) − β ∗ (w)|| = Op (n1/2 ), |B{β̂(w)} − B{β ∗ (w)}| ≤ || 8 and ǫT [θ{β̂(w)} − θ{β ∗ (w)}] ≤ ||ǫT X||||β̂(w) − β ∗ (w)|| = Op (1), where β̃(w) is a vector between β̂(w) and β ∗ (w). In addition, using the central limit theorem and Condition (C.2), we know that uniformly for w ∈ W , T ∗ ǫ θ{β (w)} = S X ∗ ws ǫT θ(β(s) ) = Op (n1/2 ). (A.4) s=1 These arguments indicate that sup |KL(w) − KL∗ (w)| w∈W = sup |2φ−1 (B{β̂(w)} − B{β ∗ (w)}) − 2φ−1 µT (θ{β̂(w)} − θ{β ∗ (w)})| w∈W ≤ 2φ−1 sup |B{β̂(w)} − B{β ∗ (w)| + 2φ−1 sup |µT (θ{β̂(w)} − θ{β ∗ (w)})| w∈W 1/2 = Op (n w∈W ) (A.5) and sup |G˜(w) − KL∗ (w)| w∈W = sup |2φ−1 (B{β̂(w)} − B{β ∗ (w)}) w∈W − 2φ−1 (y T θ{β̂(w)} − µT θ{β ∗ (w)}) + λn w T k| ≤ 2φ−1 sup |B{β̂(w)} − B{β ∗ (w)}| w∈W + 2φ −1 sup |y T θ{β̂(w)} − µT θ{β ∗ (w)}| + λn w T k w∈W ≤ 2φ −1 sup |B{β̂(w)} − B{β ∗ (w)}| w∈W + 2φ−1 sup |µT [θ{β̂(w)} − θ{β ∗ (w)}]| + 2φ−1 sup |ǫT θ{β ∗ (w)}| w∈W + 2φ −1 w∈W T ∗ T sup |ǫ [θ{β̂(w)} − θ{β (w)}]| + λn w k w∈W 1/2 = Op (n ) + λn w T k (A.6) From (A.5), (A.6), Condition(C.3) and n−1/2 λn = O(1), we can obtain (A.1) and (A.2). This complete the proof. 9 References Little, R. J. (1992). Regression with missing x’s: a review. Journal of the American Statistical Association 87 (420), 1227–1237. Toutenburg, H., C. Heumann, T. Nittner, and S. Scheid (2002). Parametric and nonparametric regression with missing x’s-a review. Journal of the Iranian Statistical Society 1 (1), 77–109. White, H. (1982). Maximum likelihood estimation of misspecified models. Econometrica: Journal of the Econometric Society, 1–25. Zhang, X. (2013). Model averaging with covariates that are missing completely at random. Economics Letters 121 (3), 360 – 363. Zhang, X., D. Yu, G. Zou, and H. Liang (2016). Optimal model averaging estimation for generalized linear models and generalized linear mixed-effects models. Journal of the American Statistical Association 111 (516), 1775–1790. 10
10math.ST
Noname manuscript No. (will be inserted by the editor) Variational Methods for Normal Integration arXiv:1709.05965v1 [cs.CV] 18 Sep 2017 Yvain Quéau · Jean-Denis Durou · Jean-François Aujol the date of receipt and acceptance should be inserted later Abstract The need for an efficient method of integration of a dense normal field is inspired by several computer vision tasks, such as shape-from-shading, photometric stereo, deflectometry, etc. Inspired by edgepreserving methods from image processing, we study in this paper several variational approaches for normal integration, with a focus on non-rectangular domains, free boundary and depth discontinuities. We first introduce a new discretization for quadratic integration, which is designed to ensure both fast recovery and the ability to handle non-rectangular domains with a free boundary. Yet, with this solver, discontinuous surfaces can be handled only if the scene is first segmented into pieces without discontinuity. Hence, we then discuss several discontinuity-preserving strategies. Those inspired, respectively, by the Mumford-Shah segmentation method and by anisotropic diffusion, are shown to be the most effective for recovering discontinuities. Keywords 3D-reconstruction, integration, normal field, gradient field, variational methods, photometric stereo, shape-from-shading. 1 Introduction In this paper, we study several methods for numerical integration of a gradient field over a 2D-grid. Our aim is Y. Quéau Technical University Munich, Germany E-mail: [email protected] J.-D. Durou IRIT, Université de Toulouse, France J.-F. Aujol IMB, Université de Bordeaux, Talence, France Institut Universitaire de France to estimate the values of a function z : R2 → R, over a set Ω ⊂ R2 (reconstruction domain) where an estimate g = [p, q]> : Ω → R2 of its gradient ∇z is available. Formally, we want to solve the following equation in the unknown depth map z: > ∇z(u, v) = [p(u, v), q(u, v)] , ∀(u, v) ∈ Ω | {z } (1) g(u,v) In a companion survey paper [48], we have shown that an ideal numerical tool for solving Equation (1) should satisfy the following properties, appart accuracy: • • • • • PFast : be as fast as possible; PRobust : be robust to a noisy gradient field; PFreeB : be able to handle a free boundary; PDisc : preserve the depth discontinuities; PNoRect : be able to work on a non-rectangular domain Ω; • PNoPar : have no critical parameter to tune. Contributions. This paper builds upon the previous conference papers [19, 20, 47] to clarify the building blocks of variational approaches to the integration problem, with a view to meeting the largest subset of these requirements. As discussed in Section 2, the variational framework is well-adapted to this task, thanks to its flexibility. However, these properties are difficult, if not impossible, to satisfy simultaneously. In particular, PDisc seems hardly compatible with PFast and PNoPar . Therefore, we first focus in Section 3 on the properties PFreeB and PNoRect . A new discretization strategy for normal integration is presented, which is independent from the shape of the domain and assumes no particular boundary condition. When used within a quadratic variational approach, this discretization strategy allows to ensure all the desired properties except 2 Yvain Quéau et al. PDisc . In particular, the numerical solution comes down to solving a symmetric, diagonally dominant linear system, which can be achieved very efficiently using preconditioning techniques. In comparison with our previous work [20] which considered only forward finite differences and standard Jacobi iterations, the properties PRobust and PFast are better satisfied. In Section 4, we focus more specifically on the integration problem in the presence of discontinuities. Several variations of well-known models from image processing are empirically compared, while suggesting for each of them the appropriate state-of-the-art minimization method. Besides the approaches based on total variation and non-convex regularization, which we already presented, respectively, in [47] and [19], two new methods inspired by the Mumford-Shah segmentation method and by anisotropic diffusion are introduced. They are shown to be particularly effective for handling PDisc , although PFast and PNoPar are lost. These variational methods for normal integration are based on the same variational framework, which is detailed in the next section. 2 From Variational Image Restoration to Variational Normal Integration In view of the PRobust property, variational methods, which aim at estimating the surface by minimization of a well-chosen criterion, are particularly suited for the integration problem. Hence, we choose the variational framework as basis for the design of new methods. This choice is also motivated by the fact that the property which is the most difficult to ensure is probably PDisc . Numerous variational methods have been designed for edge-preserving image processing: such methods may thus be a natural source of inspiration for designing discontinuity-preserving integration methods. 2.1 Variational Methods in Image Processing For a comprehensive introduction to this literature, we refer the reader to [4] and to pioneering papers such as [11, 16, 34, 38]. Basically, the idea in edge-preserving image restoration is that edges need to be processed in a particular way. This is usually achieved by choosing an appropriate energy to minimize, formulating the inverse problem as the recovery of a restored image z : Ω ⊂ R2 → R minimizing the energy: E(z) = F(z) + R(z) where: (2) • F(z) is a fidelity term penalizing the difference between a corrupted image z 0 and the restored image: ZZ F(z) =  Φ z(u, v) − z 0 (u, v) du dv (3) (u,v)∈Ω • R(z) is a regularization term, which usually penalizes the gradient of the restored image: ZZ R(z) = λ(u, v) Ψ (k∇z(u, v)k) du dv (4) (u,v)∈Ω In (3), Φ is chosen accordingly to the type of corruption the original image z 0 is affected by. For instance, ΦL2 (s) = s2 is the natural choice in the presence of additive, zero-mean, Gaussian noise, while ΦL1 (s) = |s| can be used in the presence of bi-exponential (Laplacian) noise, which is a rather good model when outliers come into play (e.g., “salt & pepper” noise). In (4), λ ≥ 0 is a field of weights which control the respective influence of the fidelity and the regularization terms. It can be either manually tuned beforehand (if λ(u, v) ≡ λ, λ can be seen as a “hyper-parameter”), or defined as a function of k∇z(u, v)k. The choice of Ψ must be made accordingly to a desired smoothness of the restored image. The quadratic penalty ΨL2 (s) = s2 will produce “smooth” images, while piecewise-constant images are obtained when choosing the sparsity penalty ΨL0 (s) = 1 − δ(s), with δ(s) = 1 if s = 0 and δ(s) = 0 otherwise. The latter approach preserves the edges, but the numerical solving is much more difficult, since the regularization term is non-smooth and non-convex. Hence, several choices of regularizers “inbetween” the quadratic and the sparsity ones have been suggested. For instance, the total variation (TV) regularizer is obtained by setting Ψ(s) = |s|. Efficient numerical methods exist for solving this non-smooth, yet convex, problem. Examples include primal-dual methods [13], augmented Lagrangian approaches [23], and forwardbackward splittings [40]. The latter can also be adapted to the case where the regularizer Ψ is non-convex, but smooth [41]. Such non-convex regularization terms were shown to be particularly effective for edge-preserving image restoration [22, 36, 38]. Another strategy is to stick to quadratic regularization (Ψ = ΨL2 ), but apply it in a non-uniform manner by tuning the field of weights λ in (4). For instance, setting λ(u, v) in (4) inversely proportional to k∇z(u, v)k yields the “anisotropic diffusion” model by Perona and Malik [44]. The discontinuity set K can also be automatically estimated and discarded by setting λ(u, v) ≡ 0 over K and λ(u, v) ≡ λ over Ω\K, in the spirit of Mumford and Shah’s segmentation method [37]. Variational Methods for Normal Integration 2.2 Notations Although we chose for simplicity to write the variational problems in a continuous form, we are overall interested in solving discrete problems. Two different discretization strategies exist. The first one consists in using variational calculus to derive the (continuous) necessary optimality condition, then discretize it by finite differences, and eventually solve the discretized optimality condition. The alternative method is to discretize the functional itself by finite differences, before solving the optimality condition associated to the discrete problem. As shown in [20], the latter approach eases the handling of the boundary of Ω, hence we use it as discretization strategy. The variational models hereafter will be presented using the continuous notations, because we find them more readable. The discrete notations will be used only when presenting the numerical solving. Yet, to avoid confusion, we will use caligraphic letters for the continuous energies (e.g., E), and capital letters for their discrete counterparts (e.g., E). With these conventions, it should be clear whether an optimization problem is discrete or continuous. Hence, we > will use the same notation ∇z = [∂u z, ∂v z] both for the gradient of z and its finite differences approximation. 2.3 Proposed Variational Framework In this work, we show how to adapt the aforementioned variational models, originally designed for image restoration, to normal integration. Although both these inverse problems are formally very similar, they are somehow different, for the following reasons: • The concept of edges in an image to restore is replaced by those of depth discontinuities and kinks. • Unlike image processing functionals, our data consist in an estimate g of the gradient of the unknown z, in lieu of a corrupted version z 0 of z. Therefore, the fidelity term F(z) will apply to the difference between ∇z and g, and it is the choice of this term which will or not allow depth discontinuities. • Regularization terms are optional here: all the methods we discuss basically work even with R(z) ≡ 0, but we may use this regularization term to allow introducing, if available, a prior on the surface (e.g., user-defined control points [30, 33] or a rough depth estimate obtained using a low-resolution depth sensor [32]). Such feature “is appreciable, although not required” [48]. 3 We will discuss methods seeking the depth z as the minimizer of an energy E(z) in the form (2), but with different choices for F(z) and R(z): • F(z) now represents a fidelity term penalizing the difference between the gradient of the recovered depth map z and the datum g: ZZ Φ (k∇z(u, v) − g(u, v)k) du dv (5) F(z) = (u,v)∈Ω • The regularization term R(z) now represents prior knowledge of the depth1 : ZZ  2 λ(u, v) z(u, v) − z 0 (u, v) R(z) = (6) (u,v)∈Ω where z 0 is the prior, and λ(u, v) ≥ 0 is a userdefined, spatially-varying, regularization weight. In this work, we consider for simplicity only the case where λ does not depend on z. 2.4 Choosing λ and z 0 The main purpose of the regularization term R defined in (6) is to avoid numerical instabilities which may arise when considering solely the fidelity term (5): this fidelity term depends only on ∇z, and not on z itself, hence the minimizer of (5) can be estimated only up to an additive ambiguity. Besides, one may also want to impose one or several control points on the surface [30, 33]. This can be achieved very simply within the proposed variational framework, by setting λ(u, v) ≡ 0 everywhere, except on the control points locations (u, v) where a high value for λ(u, v) must be set and the value z 0 (u, v) is fixed. Another typical situation is when, given both a coarse depth estimate and an accurate normal estimate, one would like to “merge” them in order to create a highquality depth map. Such a problem arises, for instance, when refining the depth map of an RGB-D sensor (e.g., a Kinect) by means of shape-from-shading [42], photometric stereo [25] or shape-from-polarization [32]. In such cases, we may set z 0 to the coarse depth map, and tune λ so as to merge the coarse and fine estimates in the best way. Non-uniform weights may be used, in order to lower the influence of outliers in the coarse depth map [25]. Eventually, in the absence of such priors, we will use the regularization term only to fix the integration constant: this is easily achieved by setting an arbitrary prior (e.g., z 0 (u, v) ≡ 0), along with a small value for λ (typically, λ(u, v) ≡ λ = 10−6 ). 1 We consider only quadratic regularization terms: studying more robust ones (e.g., L1 norm) is left as perspective. 4 Yvain Quéau et al. 3 Smooth Surfaces We first tackle the problem of recovering a “smooth” depth map z from a noisy estimate g of ∇z. To this end, we consider the quadratic variational problem: ZZ 2 k∇z(u, v) − g(u, v)k min z  2 (u,v)∈Ω + λ(u, v) z(u, v) − z 0 (u, v) du dv (7) When λ ≡ 0, Problem (7) comes down to Horn and Brook’s model [29]. In that particular case, an infinity of solutions z ∈ W 1,2 (Ω) exist, and they differ by an additive constant2 . On the other hand, the regularization term allows us to guarantee uniqueness of the solution as soon as λ is strictly positive almost everywhere3,4 . If the depth map z is further assumed to be twice differentiable, the necessary optimality condition associated to the continuous optimization problem (7) (Euler-Lagrange equation) is written: − ∆z + λz = −∇ · g + λz 0 over Ω (8) (∇z − g) · η = 0 over ∂Ω (9) with η a normal vector to the boundary ∂Ω of Ω, ∆ the Laplacian operator, and ∇· the divergence operator. This condition is a linear PDE in z which can be discretized using finite differences. Yet, providing a consistent discretization on the boundary of Ω is not straightforward [26], especially when dealing with nonrectangular domains Ω where many cases have to be considered [6]. Hence, we follow a different track, based on the discretization of the functional itself. For now, let us use a Gaussian approximation for the noise contained in g6 , i.e., let us assume in the rest of this section that each datum gu,v , (u, v) ∈ Ω, is equal to the gradient ∇z(u, v) of the unknown depth map z, taken at point (u, v), up to a zero-mean additive, homoskedastic (same variance at each location (u, v)), Gaussian noise: gu,v = ∇z(u, v) + (u, v) (10)   2  σ 0 > where (u, v) ∼ N [0, 0] , and σ is unknown7 . 0 σ2 Now, we need to give a discrete interpretation of the gradient operator in (10), through finite differences. In order to obtain a second-order accurate discretization, we combine forward and backward first-order finite differences, i.e. we consider that each measure of > the gradient gu,v = [pu,v , qu,v ] provides us with up to four independent and identically distributed (i.i.d.) statistical observations, depending on the neighborhood of (u, v). Indeed, its first component pu,v can be understood either in terms of both forward or backward finite differences (when both the bottom and the top8 neighbors are inside Ω), by one of both these discretizations (only one neighbor inside Ω), or by none of these finite differences (no neighbor inside Ω). Formally, we model the p-observations in the following way: ∂ + zu,v pu,v z u}| { = zu+1,v − zu,v ++ u (u, v), ∀(u, v) ∈ {(u, v) ∈ Ω | (u + 1, v) ∈ Ω} (11) {z } | − ∂u zu,v }| { z pu,v = zu,v − zu−1,v +− u (u, v), 3.1 Discretizing the Functional ∀(u, v) ∈ {(u, v) ∈ Ω | (u − 1, v) ∈ Ω} (12) {z } | 2 Instead of a continuous gradient field g : Ω → R over an open set Ω, we are actually given a finite set of values {gu,v = [pu,v , qu,v ]> , (u, v) ∈ Ω}, where the (u, v) represent the pixels of a discrete subset Ω of a regular square 2D-grid5 . Solving the discrete integration problem requires estimating a finite set of values, i.e. the |Ω| unknown depth values zu,v , (u, v) ∈ Ω (| · | denotes the cardinality), which are stacked columnwise in a vector z ∈ R|Ω| . 2 + Ωu Proof: by developing the terms inside the integral in (7), and integrating by parts, Theorem 6.2.5 in [3] applies with f := −∇ · g and g := g · η. 3 Proof: by developing the terms inside the integral in (7) and integrating by parts, Theorem 6.2.2-(ii) in [3] applies with f := −∇ · g + λz 0 and g := g · η. 4 This condition makes the matrix of the associated discrete problem strictly diagonally dominant, see Section 3.2. 5 To ease the comparison between the variational and the discrete problems, we will use the same notation Ω for both the open set of R2 and the discrete subset of the grid. − Ωu +/− ∼ N (0, σ 2 ). Hence, rather than considering where u that we are given |Ω| observations p, our discretization handles these data as |Ωu+ |+|Ωu− | observations, some of them being interpreted in terms of forward differences, some in terms of backward differences, some in terms of both forward and backward differences, the points without any neighbor in the u-direction being excluded. 6 In 3D-reconstruction applications such as photometric stereo [55], the assumption on the noise should rather be formulated on the images. This will be discussed in more details in Subsection 4.4. 7 The assumptions of equal variance σ 2 for both components and of a diagonal covariance matrix are introduced only for consistency with the least-squares problem (7). They are discussed with more care in Subsection 4.4. 8 The u-axis points “downwards”, the v-axis points “to the right” and the z-axis points from the surface to the camera, see Figure 1. Variational Methods for Normal Integration 5 Symmetrically, the second component q of g corresponds either to two, one or zero observations: ∂ + zu,v qu,v z v}| { = zu,v+1 − zu,v ++ v (u, v), ∀(u, v) ∈ {(u, v) ∈ Ω | (u, v + 1) ∈ Ω} (13) | {z } ∂v− zu,v instance, the i-th line of D+ u reads:  D+ u i,· = h i  −1 , |{z} 1 , 0, . . . , 0  0, . . . , 0, |{z} Position i Position i+1  >  0 otherwise if m(i) ∈ Ωu+ (17) Ωv+ where m is the mapping associating linear indices i with the pixel coordinates (u, v): z }| { qu,v = zu,v − zu,v−1 +− v (u, v), ∀(u, v) ∈ {(u, v) ∈ Ω | (u, v − 1) ∈ Ω} (14) {z } | Ωv− +/− where v ∼ N (0, σ 2 ). Given the Gaussianity of the +/− noises u/v , their independence, and the fact that they all share the same standard deviation σ and mean 0, the joint likelihood of the observed gradients {gu,v }(u,v) is: L({gu,v , (u, v) ∈ Ω} | {zu,v , (u, v) ∈ Ω}) ( ) 2 Y 1 [∂u+ zu,v − pu,v ] √ exp − = 2σ 2 2πσ 2 + (u,v)∈Ωu ( ) 2 Y [∂u− zu,v − pu,v ] 1 √ × exp − 2σ 2 2πσ 2 − (u,v)∈Ωu ) ( 2 Y 1 [∂v+ zu,v − qu,v ] √ × exp − 2σ 2 2πσ 2 (u,v)∈Ωv+ ( ) 2 Y [∂v− zu,v − qu,v ] 1 √ exp − × 2σ 2 2πσ 2 − m : {1, . . . , |Ω|} → Ω i 7→ m(i) = (u, v) Once these matrices are defined, (16) is equal to:  1 + 2 2 FL2 (z) = Du z − p + D− uz−p 2  1 + 2 2 + Dv z − q + D− vz−q  2 X X X X 1 pu,v 2  −  pu,v 2 + 2 − + (u,v)∈Ω\Ωu (u,v)∈Ω\Ωu  XX 1  XX − qu,v 2 + qu,v 2  (19) 2 + − (u,v)∈Ω\Ωv (15) (u,v)∈Ωv (18) (u,v)∈Ω\Ωv The terms in both the last rows of (19) being independent from the z-values, they do not influence the actual minimization and will thus be omitted from now on. The regularization term (6) is discretized as: XX  2  2 0 R(z) = λu,v zu,v − zu,v = Λ z − z0 (20) (u,v)∈Ω and hence the maximum-likelihood estimate for the depth with Λ a |Ω|×|Ω| diagonal matrix containing the values p values is obtained by minimizing: λu,v , (u, v) ∈ Ω. Putting it altogether, our quadratic integration method 2 1 XX  + reads as the minimization of the discrete functional: ∂u zu,v − pu,v FL2 (z) =  2 1 + 2 2 + − ! (u,v)∈Ωu + D z − p D z − p E (z) = L u u 2 XX  2 2  + ∂u− zu,v − pu,v  2 1 + 2 2 − − + D z − q + D z − q + Λ z − z0 (21) v v (u,v)∈Ωu 2 2 1 XX  + + ∂v zu,v − qu,v 2 3.2 Numerical Solution ! (u,v)∈Ωv+ X X  2 − + ∂v zu,v − qu,v (16) The optimality condition associated with the discrete − (u,v)∈Ωv functional (21) is a linear equation in z: where the 21 coefficients are meant to ease the continuous interpretation: the integral of the fidelity term in (7) is approximated by FL2 (z), expressed in (16) as the mean of the forward and the backward discretizations. To obtain a more concise representation of this fidelity term, let us stack the data in two vectors p ∈ R|Ω| and q ∈ R|Ω| . In addition, let us introduce four |Ω|×|Ω| − + − differentiation matrices D+ u , Du , Dv and Dv , asso+/− ciated with the finite differences operators ∂u/v . For Az = b (22) where A is a |Ω| × |Ω| symmetric matrix9 : L z }| { i 1 h +> + −> − +> + −> − A = Du Du + Du Du + Dv Dv + Dv Dv 2 + Λ2 (23) 9 A and b are purposely divided by two in order to ease the continuous interpretation of Subsection 3.3. 6 Yvain Quéau et al. and b is a |Ω| × 1 vector: D D z z }|u { }|v { i i h 1 h +> 1 > > − −> + p + Dv + Dv q b = Du + Du 2 2 + Λ2 z0 (24) The matrix A is sparse: it contains at most five nonzero entries per row. In addition, it is diagonal dominant: if (Λ)i,i = 0, the value (A)i,i of a diagonal entry is equal to the opposite of the sum of the other entries (A)i,j , i 6= j, from the same row i. It becomes strictly superior as soon as (Λ)i,i is strictly positive. Let us also remark that, when Ω describes a rectangular domain and the regularization weights are uniform (λ(u, v) ≡ λ), A is a Toeplitz matrix. Yet, this structure is lost in the general case where it can only be said that A is a sparse, symmetric, diagonal dominant (SDD) matrix with at most 5|Ω| non-zero elements. It is positive semi-definite when Λ = 0, and positive definite as soon as one of the λu,v is non-zero. System (22) can be solved by means of the conjugate gradient algorithm. Initialization will not influence the actual solution, but it may influence the number of iterations required to reach convergence. In our experiments, we used z 0 as initial guess, yet more elaborate initialization strategies may yield faster convergence [6]. To ensure PFast , we used the multigrid preconditioning technique [35], which has a negligible cost of computation and still bounds the computational complexity required to reach a  relative accuracy10 by: O (5n log(n) log(1/)) (25) where n = |Ω|11 . This complexity is inbetween the complexities of the approaches based on Sylvester equations [26] (O(n1.5 )) and on DCT [53] (O(n log(n))). Besides, these competing methods explicitly require that Ω is rectangular, while ours does not. By construction, the integration method consisting in minimizing (21) satisfies the PRobust property (it is the maximum-likelihood estimate in the presence of zero-mean Gaussian noise). The discretization we introduced does not assume any particular shape for Ω, neither treats the boundary in a specific manner, hence PFreeB and PNoRect are also satisfied. We also showed that PFast could be satisfied, using a solving method 10 In our experiments, the threshold of the stopping criterion is set to  = 10−4 . 11 In (25), the factor 5n is nothing else than the number of non-zero elements in A. Therefore, exploiting sparsity is not as “fruitless” as argued in [26] when it comes to solving large linear systems faster than using Gaussian elimination (complexity O(n3 )). based on the preconditioned conjugate gradient algorithm. Eventually, let us recall that tuning λ and/or manually fixing the values of the prior z0 is necessary only to introduce a prior, but not in general. Hence, PNoPar is also enforced. In conclusion, all the desired properties are satisfied, except PDisc . Let us now provide additional remarks on the connections between the proposed discrete approach and a fully variational one. 3.3 Continuous Interpretation System (22) is nothing else than a discrete analogue of the continuous optimality conditions (8) and (9): 2 0 Lz + |{z} Λ2 z = Du p + Dv q + Λ z |{z} | {z } | {z } ≈−∆z ≈λz ≈−∇·g (26) ≈λz 0 where the matrix-vector products are easily interpreted in terms of the differential operators in the continuous formula (8). One major advantage when reasoning from the beginning in the discrete setting is that one does not need to find out how to discretize the natural 12 boundary condition (9), which was already emphasized in [20, 26]. Yet, the identifications in (26) show that both the discrete and continuous approaches are equivalent, provided that an appropriate discretization of the continuous optimality condition is used. It is thus possible to derive O(5n log(n) log(1/)) algorithms based on the discretization of the Euler-Lagrange equation, contrarily to what is stated in [26]. The real drawback of such approaches does not lie in complexity, but in the difficult discretization of the boundary condition. This is further explored in the next subsection. 3.4 Example To clarify the proposed discretization of the integration problem, let us consider a non-rectangular domain Ω inside a 3 × 3 grid, like the one depicted in Figure 1. The vectorized unknown depth z and the vectorized components p and q of the gradient write in this case:       z1,1 p1,1 q1,1 z2,1  p2,1  q2,1        z3,1  p3,1  q3,1        z1,2  p1,2  q1,2        z= (27)  p = p2,2  q = q2,2  z2,2      z3,2  p3,2  q3,2        z1,3  p1,3  q1,3  z2,3 p2,3 q2,3 12 As stated in [26], homogeneous Neumann boundary conditions of the type ∇z · η = 0, used e.g. in [1], should be avoided. Variational Methods for Normal Integration 7 One can observe that this matrix describes the connectivity of the graph representing the discrete domain Ω: the diagonal elements (L)i,i are the numbers of neighbors connected to the i-th point, and the off-diagonals elements (L)i,j are worth −1 if the i-th and j-th points are connected, 0 otherwise. Eventually, the matrices Du and Dv defined in (24) are equal to: v u (1, 1) (1, 2) (1, 3) (2, 1) (2, 2) (2, 3) (3, 1) (3, 2) Fig. 1 Example of non-rectangular domain Ω (solid dots) inside a 3 × 3 grid. When invoking the continuous optimality condition, the discrete approximations of the Laplacian and of the divergence near the boundary involve several points inside ∂Ω (circles) for which no data is available. First-order approximation of the natural boundary condition (9) is thus required. Relying only on discrete optimization simplifies a lot the boundary handling. +/− The sets Ωu/v all contain five pixels: Ωu+ = {(1, 1) , (2, 1) , (1, 2) , (2, 2) , (1, 3)} (28) Ωu− Ωv+ Ωv− = {(2, 1) , (3, 1) , (2, 2) , (3, 2) , (2, 3)} (29) = {(1, 1) , (2, 1) , (3, 1) , (1, 2) , (2, 2)} (30) = {(1, 2) , (2, 2) , (3, 2) , (1, 3) , (2, 3)} (31) +/− so that the differentiation matrices Du/v have five nonzero rows according to their definition (17). For instance, the matrix associated with the forward finite differences operator ∂u+ reads:   −1 1 0 0 0 0 0 0  0 −1 1 0 0 0 0 0    0 0 0 0 0 0 0 0    0 0 0 −1 1 0 0 0 +   Du =  (32)   0 0 0 0 −1 1 0 0  0 0 0 0 0 0 0 0    0 0 0 0 0 0 −1 1 0 0 0 0 0 0 0 0 The negative Laplacian matrix L defined in (23) is worth:   2 −1 0 −1 0 0 0 0 −1 3 −1 0 −1 0 0 0     0 −1 2 0 0 −1 0 0    −1 0 0 3 −1 0 −1 0    L= (33)   0 −1 0 −1 4 −1 0 −1  0 0 −1 0 −1 2 0 0     0 0 0 −1 0 0 2 −1 0 0 0 0 −1 0 −1 2   −1 −1 0 0 0 0 0 0  1 0 −1 0 0 0 0 0    0 1 1 0 0 0 0 0   1 0 0 0 −1 −1 0 0 0    Du =  2  0 0 0 1 0 −1 0 0   0 0 0 0 1 1 0 0    0 0 0 0 0 0 −1 −1 0 0 0 0 0 0 1 1   −1 0 0 −1 0 0 0 0  0 −1 0 0 −1 0 0 0     0 0 −1 0 0 −1 0 0    1 1 0 0 0 0 0 −1 0    Dv =  2  0 1 0 0 0 0 0 −1  0 0 1 0 0 1 0 0   0 0 0 1 0 0 1 0 0 0 0 0 1 0 1 1 (34) (35) Let us now show how these matrices relate to the discretization of the continuous optimality condition (8). Using second-order central finite differences approximations of the Laplacian (∆zu,v ≈ zu,v−1 + zu−1,v + zu+1,v + zu,v+1 − 4zu,v ) and of the divergence operator (∇ · gu,v ≈ 21 (pu+1,v − pu−1,v ) + 12 (qu,v+1 − qu,v−1 )), we obtain: [4zu,v −zu,v−1 −zu−1,v −zu+1,v −zu,v+1 ]+λu,v zu,v = 1 1 0 [pu−1,v − pu+1,v ]+ [qu,v−1 − qu,v+1 ]+λu,v zu,v (36) 2 2 The pixel (u, v) = (2, 2) is the only one whose four neighbors are inside Ω. In that case, (36) becomes: [4z2,2 − z2,1 − z1,2 − z3,2 − z2,3 ] + λ2,2 z2,2 | {z } | {z } =(L)5,· z = =(Λ2 )5,· z 1 1 0 [p1,2 − p3,2 ] + [q2,1 − q2,3 ] + λ2,2 z2,2 2 2 | {z } {z } | {z } | =(Du )5,· p =(Dv )5,· q (37) =(Λ2 )5,· z0 where we recognize the fifth equation of the discrete optimality condition (26). This shows that, for pixels having all four neighbors inside Ω, both the continuous and the discrete variational formulations yield the same discretizations. 8 Yvain Quéau et al. Now, let us consider a pixel near the boundary, for instance pixel (1, 1). Using the same second-order differences, (36) reads: [4z1,1 − z1,0 − z0,1 − z2,1 − z1,2 ] + λ1,1 z1,1 1 1 0 = [p0,1 − p2,1 ] + [q1,0 − q1,2 ] + λ1,1 z1,1 2 2 (38) which involves the values z1,0 and z0,1 of the depth map, which we are not willing to estimate, and the values p0,1 and q1,0 of the gradient field, which are not provided as data. To eliminate these four values, we need to resort to boundary conditions on z, p and q. The discretizations, using first order forward finite differences, of the natural boundary condition (9), at locations (1, 0) and (0, 1), read: z1,1 − z1,0 = q1,0 (39) z1,1 − z0,1 = p0,1 (40) hence the unknown depth values z1,0 and z0,1 can be eliminated from Equation (38): [2z1,1 − z2,1 − z1,2 ] + λ1,1 z1,1 1 1 0 = [−p0,1 − p2,1 ] + [−q1,0 − q1,2 ] + λ1,1 z1,1 (41) 2 2 Eventually, the unknown values p0,1 and q1,0 need to be approximated. Since we have no information at all about the values of g outside Ω, we use homogeneous Neumann boundary conditions13 : ∇p · η = 0 over ∂Ω (42) ∇q · η = 0 over ∂Ω (43) Discretizing these boundary conditions using first order forward finite differences, we obtain: p0,1 = p1,1 (44) q1,0 = q1,1 (45) Using these identifications, the discretized optimality condition (41) is given by: [2z1,1 − z2,1 − z1,2 ] + λ1,1 z1,1 | {z } | {z } =(L)1,· z = =(Dv )1,· q 3.5 Empirical Evaluation We first consider the smooth surface from Figure 2, whose normals are analytically known [26], and compare three discrete least-squares methods which all satisfy PFast , PRobust and PFreeB : the DCT solution [53], the Sylvester equations method [26], and the proposed one. As shown in Figures 2 and 3, our solution is slightly more accurate. Indeed, the bias near the boundary induced by the DCT method is corrected. On the other hand, we believe the reason why our method is more accurate than that from [26] is because we use a combination of forward and backward finite differences, while [26] relies on central differences. Indeed, when using central differences to discretize the gradient, the secondorder operator (Laplacian) appearing in the Sylvester equations from [26] involves none of the direct neighbors, which may be non-robust for noisy data (see, for instance, Appendix 3 in [4]). For instance, let us consider a 1D domain Ω with 7 pixels. Then, the following differentiation matrix is advocated in [26]:   −3 4 −1 0 0 0 0 −1 0 1 0 0 0 0    0 −1 0 1 0 0 0   1 Du =  0 0 −1 0 1 0 0 (47)   2  0 0 0 −1 0 1 0    0 0 0 0 −1 0 1 0 =(Λ2 )1,· z 1 1 0 [−p1,1 − p2,1 ] + [−q1,1 − q1,2 ] + λ1,1 z1,1 2 2 | {z } | {z } | {z } =(Du )1,· p Using a similar rationale, we obtain equivalence of both formulations for the eight points inside Ω. Yet, let us emphasize that discretizing the continuous optimality condition requires treating, on this example with a rather “simple” shape for Ω, not less than seven different cases (only pixels (3, 2) and (2, 3) are similar). More general shapes bring out to play even more particular cases (points having only one neighbor inside Ω). Furthermore, boundary conditions must be invoked in order to approximate the depth values and the data outside Ω. On the other hand, the discrete functional provides exactly the same optimality condition, but without these drawbacks. The boundary conditions can be viewed as implicitly enforced, hence PFreeB is satisfied. (46) =(Λ2 )1,· z0 which is exactly the first equation of the discrete optimality condition (26). 13 This assumption is weaker than the homogeneous Neumann boundary condition ∇z · η = 0 used by Agrawal et al. in [1]. 0 0 0 1 −4 3 The optimality condition (Sylvester equation) in [26] involves the following second-order operator Du > Du :   10 −12 2 0 0 0 0 −12 17 −4 −1 0 0 0     2 −4 3 0 −1 0 0    1 0 -1 0 2 0 -1 0  Du > Du =  (48)  4  0  0 −1 0 3 −4 2    0 0 0 −1 −4 17 −12 0 0 0 0 2 −12 10 Variational Methods for Normal Integration 9 20 20 −20 −20 20 20 60 40 60 x 60 40 20 y Simchony et al. [53] 20 20 −20 −20 20 60 20 60 40 40 60 20 60 x y Ground-truth x 40 40 20 y Harker and O’Leary [26] 40 40 x 20 60 y Proposed Fig. 2 Qualitative evaluation of the PRobust property. An additive, zero-mean, Gaussian noise with standard deviation 0.1kgk∞ was added to the (analytically known) gradient of the ground-truth surface, before integrating this gradient by three least-squares methods. Ours qualitatively provides better results than the Sylvester equations method from Harker and O’Leary [26]. It seems to provide similar robustness as the DCT solution from Simchony et al. [53], but the quantitative evaluation from Figure 3 shows that our method is actually more accurate. The bolded values of this matrix indicate that computation of the second-order derivatives for the fourth pixel does not involve the third and fifth pixels. On the other hand, with the proposed operator defined in Equation (24), the second-order operator always involves the “correct” neighborhood:   1 −1 0 0 0 0 0 −1 2 −1 0 0 0 0     0 −1 2 −1 0 0 0     Du > Du =  (49)  0 0 -1 2 -1 0 0   0 0 0 −1 2 −1 0     0 0 0 0 −1 2 −1 0 0 0 0 0 −1 1 In addition, as predicted by the complexity analysis in Subsection 3.2, our solution relying on preconditioned conjugate gradient iterations has an asymptotic complexity (O(5n log(n) log(1/))) which is inbetween that of the Sylvester equations approach [26] (O(n1.5 )) and of DCT [53] (O(n log(n))). The CPU times of our method and of the DCT solution, measured using Matlab codes running on a recent i7 processor, actually seem proportional: according to this complexity analysis, we guess the proportionality factor is around 5 log(1/). Indeed, with  = 10−4 , which is the value we used in our experiments, 5 log(1/) ≈ 46, which is consistent with the second graph in Figure 3. 10 Yvain Quéau et al. 2 Simchony et al. Harker and O’Leary Proposed RMSE (px) 1.5 1 RMSE = 0.11 0.5 0 0 0.05 0.1 0.15 0.2 0.25 σ Simchony et al. Harker and O’Leary Proposed 2 CPU (s) 10 RMSE = 4.66 0 10 −2 09 6 6x 4 40 9 04 8 8x 2 20 4 10 24 10 24 x 51 2 51 2x 25 6 25 6x 12 8x 12 8 10 Fig. 4 3D-reconstruction of surface Svase (see Figure 3 in [48]) from its (analytically known) normals, using the proposed discrete least-squares method. Top: when Ω is restricted to the image of the vase. Bottom: when Ω is the whole rectangular grid. Quadratic integration smooths the depth discontinuities and produces Gibbs phenomena near the kinks. |Ω| Fig. 3 Quantitative evaluation of the PRobust (top) and PFast (bottom) properties. Top: RMSE between the depth ground-truth and the ones reconstructed from noisy gradients (adding a zero-mean Gaussian noise with standard deviation σkgk∞ , for several values of σ). Bottom: Computation time as a function of the size |Ω| of the reconstruction domain Ω. The method we put forward has a complexity which is inbetween those of the methods of Simchony et al. [53] (based on DCT) and of Harker and O’Leary [26] (based on Sylvester equations), while being slightly more accurate than both of them. 4 Piecewise Smooth Surfaces We now tackle the problem of recovering a surface which is smooth only almost everywhere, i.e. everywhere except on a “small” set where discontinuities and kinks are allowed. Since all the methods discussed hereafter rely on the same discretization as in Section 3, they inherit its PFreeB and PNoRect properties, which will not be discussed in this section. Instead, we focus on the PFast , PRobust , PNoPar , and of course PDisc properties. 4.1 Recovering Discontinuities and Kinks Besides its improved accuracy, the major advantage of our method over [26,53] is its ability to handle non-rectangular domains (PNoRect ). This makes possible the 3D-reconstruction of piecewise-smooth surfaces, provided that a user segments the domain into pieces where z is smooth beforehand (see Figure 4). Yet, if the segmentation is not performed a priori , artifacts are visible near the discontinuities, which get smoothed, and Gibbs phenomena appear near the continuous, yet non-differentiable kinks. We will discuss in the next section several strategies for removing such artifacts. In order to clarify which variational formulations may provide robustness to discontinuities, let us first consider the 1D-example of Figure 5, with Dirichlet boundary conditions. As illustrated in this example, leastsquares integration of a noisy normal field will provide a smooth surface. Replacing the least-squares estimator ΦL2 (s) = s2 by the sparsity one ΦL0 (s) = 1 − δ(s) will minimize the cardinality of the difference between g and ∇z, which provides a surface whose gradient is almost everywhere equal to g. As a consequence, robustness to noise is lost, yet discontinuities may be preserved. Variational Methods for Normal Integration 11 10 Ground truth 9 Least-squares 8 Sparsity ΦL0 (s) ΦL1 (s) ΦL2 (s) Φ1 (s) Φ2 (s) 7 Φ(s) 6 5 4 Fig. 5 1D-illustration of integration of a noisy normal field (arrows) over a regular grid (circles), in the presence of discontinuities. The least-squares approach is robust to noise, but smooths the discontinuities. The sparsity approach preserves the discontinuities, but is not robust to noise. An ideal integration method would inherit robustness from least-squares, and the ability to preserve discontinuities from sparsity. 3 2 1 0 −4 These estimators can be interpreted as follows: leastsquares assume that all residuals defined by k∇z(u, v)− g(u, v)k are “low”, while sparsity assumes that most of them are “zero”. The former is commonly used for “noise”, and the latter for “outliers”. In the case of normal integration, outliers may occur when: 1) ∇z(u, v) exists but its estimate g(u, v) is not reliable; 2) ∇z(u, v) is not defined because (u, v) lies within the vicinity of a discontinuity or a kink. Considering that situation 1) should rather be handled by robust estimation of the gradient [31], we deal only with the second one, and use the terminology “discontinuity” instead of “outlier”, although this also covers the concept of “kink”. We are looking for an estimator which combines the robustness of least-squares to noise, and that of sparsity to discontinuities. These abilities are actually due to their asymptotic behaviors. Robustness of leastsquares to noise comes from the quadratic behavior around 0, which ensures that “low” residuals are considered as “good” estimates, while this quadratic behavior becomes problematic in ±∞: discontinuities yield “high” residuals, which are over-penalized. The sparsity estimator has the opposite behavior: treating the high residuals (discontinuities) exactly as the low ones ensures that discontinuities are not over-penalized, yet low residuals (noise) are. A good estimator would thus be quadratic around zero, but sub-linear around ±∞. Obviously, only non-convex estimators hold both these properties. We will discuss several choices “inbetween” the quadratic estimator ΦL2 and the sparsity one ΦL0 (see Figure 6): the convex compromise ΦL1 (s) = |s| is studied in Subsection 4.2, and the non-convex estima2 tors Φ1 (s) = log(s2 + β 2 ) and Φ2 (s) = s2s+γ 2 , where β and γ are hyper-parameters, in Subsection 4.3. −2 0 s 2 4 Fig. 6 Graph of some robust estimators. The ability of ΦL2 to handle noise (small residuals) comes from its over-linear behavior around zero, while that of ΦL0 to preserve discontinuities (large residuals) is induced by its sub-linear behavior in +∞. An estimator holding both these properties is necessarily non-convex (e.g., Φ1 and Φ2 , whose graphs are shown with β = γ = 1), although ΦL1 may be an acceptable convex compromise. Another strategy consists in keeping least-squares as basis, but using it in a non-uniform manner. The simplest way would be to remove the discontinuity points from the integration domain Ω, and then to apply our quadratic method from the previous section, since it is able to manage non-rectangular domains. Yet, this would require detecting the discontinuities beforehand, which might be tedious. It is actually more convenient to introduce weights in the least-squares functionals, which are inversely proportional to the probability of lying on a discontinuity [47,50]. We discuss this weighted least-squares approach in Subsection 4.4, where a statistical interpretation of the Perona and Malik’s anisotropic diffusion model [44] is also exhibited. Eventually, an extreme case of weighted least-squares consists in using binary weights, where the weights indicate the presence of discontinuities. This is closely related to Mumford and Shah’s segmentation method [37], which simultaneously estimates the discontinuity set and the surface. We show in Subsection 4.5 that this approach is the one which is actually the most adapted to the problem of integrating a noisy normal field in the presence of discontinuities. 12 Yvain Quéau et al. 4.2 Total Variation-like Integration The discrete functional to minimize is thus given by: The problem of handling outliers in a noisy normal field has been tackled by Du, Robles-Kelly and Lu, who compare in [18] the performances of several M-estimators. They conclude that regularizers based on the L1 norm are the most effective ones. We provide in this subsection several numerical considerations regarding the discretization of the L1 fidelity term: ETV (z) = X X q + 2  2 ∂u+ zu,v −pu,v + ∂v− zu,v −qu,v 2  2 ∂u− zu,v −pu,v + ∂v+ zu,v −qu,v (u,v)∈Ω −+ ! X X q 2  − 2 − ∂u zu,v −pu,v + ∂v zu,v −qu,v + (u,v)∈Ω −− (u,v)∈Ω + n |∂u z(u, v) − p(u, v)| = (u,v)∈Ω ++ (u,v)∈Ω +− k∇z(u, v) − g(u, v)k1 du dv ZZ X X q 2  2 ∂u+ zu,v −pu,v + ∂v+ zu,v −qu,v X X q + ZZ FL1 (z) = 1 4 XX  2 0 λu,v zu,v − zu,v (53) (u,v)∈Ω (u,v)∈Ω o + |∂v z(u, v) − q(u, v)| du dv (50) When p(u, v) ≡ 0 and q(u, v) ≡ 0, (50) is the socalled “anisotropic total variation” (anisotropic TV) regularizer, which tends to favor piecewise-constant solutions while allowing discontinuity jumps. Considering the discontinuities and kinks as the equivalent of edges in image restoration, it seems natural to believe that the fidelity term (50) may be useful for discontinuitypreserving integration. This fidelity term is not only convex, but also decouples the two directions u and v, which allows fast ADMM-based (Bregman iterations) numerical schemes involving shrinkages [24, 47]. On the other hand, it is not so natural to use such a decoupling: if the value of p is not reliable at some point (u, v), usually that of q is not reliable either. Hence, it may be wortwhile to use instead a regularizer adapted from the “isotropic TV”. This leads us to adapt the well-known model from Rudin, Osher and Fatemi [49] to the integration problem: Minimizing (53) comes down to solving the following constrained optimization problem: XX 1 XX V krU min u,v k 4 z,{rU V } (U,V )∈{+,−}2 (u,v)∈Ω U V XX  2 0 + λu,v zu,v − zu,v (u,v)∈Ω s.t. V rU u,v = ∇U V zu,v − gu,v where we denote ∇U V = [∂uU , ∂vV ]> , (U, V ) ∈ {+, −}2 , the discrete approximation of the gradient corresponding to domain Ω U V . Numerical Solution. We solve the constrained optimization problem (54) by the augmented Lagrangian method, through an ADMM algorithm [21] (see [9] for a recent overview of such algorithms). This algorithm reads: XX α XX z(k+1) = argmin ∇U Vzu,v 8 |Ω| z∈R (U,V )∈{+,−}2 (u,v)∈Ω U V   2 V (k) U V (k) − gu,v +rU u,v −bu,v XX  2 0 + λu,v zu,v − zu,v (55) ZZ ETV (z) = (u,v)∈Ω k∇z(u, v) − g(u, v)k V (k+1) rU = u,v (u,v)∈Ω argmin  2 + λ(u, v) z(u, v) − z 0 (u, v) du dv (51) Discretization. Since the term k∇z(u, v) − g(u, v)k can be interpreted in different manners, depending on the neighborhood of (u, v), we need to discretize it appropriately. Let us consider all four possible first-order discretizations of the gradient ∇z, associated to the four following sets of pixels: (52) r∈R2   α (k+1) V (k) r− ∇U Vzu,v −gu,v +bU u,v 8 + krk V (k+1) bU u,v Ω U V = ΩuU ∩ ΩvV , (U, V ) ∈ {+, −}2 (54) = V (k) bU u,v +∇ UV 2 (56) (k+1) zu,v − gu,v − V (k+1) rU u,v (57) where the bU V are the scaled dual variables, and α > 0 corresponds to a descent stepsize, which is supposed to be fixed beforehand. Note that the choice of this parameter influences only the convergence rate, not the actual minimizer. In our experiments, we used α = 1. The z-update (55) is a linear least-squares problem simimilar to the one which was tackled in Section 3. Variational Methods for Normal Integration σ = 0% - RMSE = 4.52 13 σ = 0.5% - RMSE = 4.62 σ = 1% - RMSE = 4.79 Fig. 7 Depth estimated after 1000 iterations of the TV-like approach, in the presence of additive, zero-mean, Gaussian noise with standard deviation equal to σkgk∞ . The indicated RMSE is computed on the whole domain. In the absence of noise, both discontinuities and kinks are restored, although staircasing artifacts appear. In the presence of noise, the discontinuities are smoothed. Yet, the 3D-reconstruction near the kinks is still more satisfactory than the least-squares one: Gibbs phenomena are not visible, unlike in the second row of Figure 4. Its solution z(k+1) is the solution of the following SDD linear system: (k) ATV z(k+1) = bTV (58) with : i α X Xh U> U > Du Du + DVv DVv +Λ2 (59) 8 (U,V )∈{+,−}2 i α X X h U > U V (k) > (k) (k) bTV = Du p + DVv qU V +Λ2 z0 (60) 8 2 ATV = (U,V )∈{+,−} U/V where the Du/v matrices are defined as in (17), the (k) Λ matrix as in (20), and where we denote pU V and (k) (k) (k) qU V the components of g + rU V − bU V . The solution of System (58) can be approximated by conjugate gradient iterations, choosing at each iteration the previous estimate z(k) as initial guess (setting z(0) , for instance, as the least-squares solution from Section 3). In addition, the matrix ATV is always the same: this allows computing the preconditioner only once. Eventually, the r-updates (56), (u, v) ∈ Ω, are basis pursuit problems [17], which admit the following closedform solution (generalized shrinkage): V rU u,v   U V (k+1) su,v 4 V (k+1) k − = max ksU , 0 (61) u,v V (k+1) k α ksU u,v (k+1) 4.3 Non-convex Regularization with: V sU u,v (k+1) can be improved rather simply [23]. We cannot consider that PFast is satisfied since, in comparison with the quadratic method from Section 3, yet the TV approach is “reasonably” fast. Possibly faster algorithms could be employed, as for instance the FISTA algorithm from Beck and Teboulle [7], or primal-dual algorithms [13], but we leave such improvements as future work. On the other hand, according to the results from Figure 7, discontinuities are recovered in the absence of noise, although staircasing artifacts appear (such artifacts are partly due to the non-differentiability of TV in zero [38]). Yet, the recovery of discontinuities is deceiving when the noise level increases. On noisy datasets, the only advantage of this approach over least-squares is thus that it removes the Gibbs phenomena around the kinks i.e., where the surface is continuous, but nondifferentiable (e.g., the sides of the vase). Because of the staircasing artifacts and of the lack of robustness to noise, we cannot find this first approach satisfactory. Yet, since turning the quadratic functional into a non-quadratic one seems to have positive influence on discontinuities recovery, we believe that exploring non-quadratic models is a promising route. Staircasing artifacts could probably be reduced by replacing total variation by total generalized variation [10], but we rather consider now non-convex models. (k+1) V = ∇U V zu,v − gu,v + bU u,v (k) (62) Discussion. This TV-like approach has two main advantages: apart from the stepsize α which controls the speed of convergence, it does not depend on the choice of a parameter, and it is convex. The initialization has influence only on the speed of convergence, and not on the actual minimizer: convergence towards the global minimum is guaranteed [51]. It can be shown that the convergence rate of this scheme is ergodic, and this rate Let us now consider non-convex estimators Φ in the fidelity term (5), which are often referred to as “Φfunctions” [4]. As discussed in Subsection 4.1, the choice of a specific Φ-function should be made according to several principles: • Φ should have a quadratic behavior around zero, in order to ensure that the integration is guided by the “good” data. The typical choice ensuring this property is ΦL2 (s) = s2 , which was discussed in Section 3; 14 Yvain Quéau et al. • Φ should have a sublinear behavior at infinity, so that outliers do not have a predominant influence, and also to preserve discontinuities and kinks. The typical choice is the sparsity estimator ΦL0 (s) = 0 if s = 0 and ΦL0 (s) = 1 otherwise; • Φ should ideally be a convex function. Introducing the notations: XX  1 XX Φ k∇U Vzu,v − gu,v k (66) f (z)= 4 2 UV (U,V )∈{+,−} (u,v)∈Ω g(z) = kΛ(z − z0 )k2 (67) the discrete functional (65) is rewritten: Obviously, it is not possible to simultaneously satisfy these three properties. The TV-like fidelity term introduced in Subsection 4.2 is a sort of “compromise”: it is the only convex function being (over-) linear in 0 and (sub-) linear in ±∞. Although it does not depend on the choice of any hyper-parameter, we saw that it has the drawback of yielding the so-called “staircase effect”, and that discontinuities were not recovered so well in the presence of noise. If we accept to lose the convexity of Φ, we can actually design estimators which better fit both other properties. Although there may then be several minimizers, such non-convex estimators were recently shown to be very effective for image restoration [36]. We will consider two classical Φ-functions, whose graphs are plotted in Figure 6:   2s Φ1 (s) = log(s2 + β 2 )  Φ01 (s) = 2 s + β2 ⇒ 2 s2 Φ2 (s) =  Φ02 (s) = 2 γ s s2 + γ 2 2 (s + γ 2 )2 (63) Let us remark that these estimators were initially introduced in [19] in this context, and that other nonconvex estimators can be considered, based for instance on Lp norms, with 0 < p < 1 [5]. Let us now show how to numerically minimize the resulting functionals: ZZ EΦ (z) = Φ (k∇z(u, v) − g(u, v)k) EΦ (z) = f (z) + g(z) (68) where f is smooth, but non-convex, and g is convex (and smooth, although non-smooth functions g could be handled). Numerical Solution. The problem of minimizing a discrete energy like (68), yielded by the sum of a convex term g and a non-convex, yet smooth term f , can be handled by forward-backward splitting. We use the “iPiano” iterative algorithm by Ochs et al. [41], which reads:    −1 z(k+1)= (I+α1 ∂g) z(k)−α1∇f (z(k) )+α2 z(k)−z(k−1) (69) where α1 and α2 are suitable descent stepsizes (in our implementation, α2 is fixed to 0.8, and α1 is chosen by the “lazy backtracking” procedure described in [41]), −1 (I + α1 ∂g) is the proximal operator of g, and ∇f (z(k) ) is the gradient of f evaluated at current estimate z(k) . We detail hereafter how to evaluate the proximal operator of g and the gradient of f . The proximal operator of g writes, using (67): (I + α1 ∂g) −1 bk kx − x + α1 g(x) (70) 2 x∈R|Ω| −1  b + 2α1 Λz0 (71) = I + 2α1 Λ2 x (b x) = argmin where the inversion is easy to compute, since the matrix involved is diagonal.  2 0 In order to obtain a closed-form expression of the + λ(u, v) z(u, v) − z (u, v) du dv (64) gradient of f defined in (66), let us rewrite this function in the following manner: Discretization. We consider the same discretization stratXX  1 XX V egy as in Subsection 4.2, aiming at minimizing the disf (z) = Φ kDU (72) u,v z − gu,v k 4 crete functional: 2 UV (u,v)∈Ω (U,V )∈{+,−} (u,v)∈Ω  XX  1 XX EΦ (z) = Φ ∇U Vzu,v − gu,v 4 (U,V )∈{+,−}2 (u,v)∈Ω U V XX  2 0 + λu,v zu,v − zu,v (65) V where DU u,v is a 2 × |Ω| finite differences matrix used for approximating the gradient at location (u, v), using the finite differences operator ∇U V , {U, V } ∈ {+, −}2 : (u,v)∈Ω " which resembles the TV functional defined in (53), and where ∇U V represents the finite differences approximation of the gradient used over the domain Ω U V , with {U, V } ∈ {+, −}2 . V DU u,v = #  DU u m−1 (u,v),·  DVv m−1 (u,v),· (73) where we recall that the mapping m associates linear indices with pixel coordinates (see Equation (18)). Variational Methods for Normal Integration 15 β = 0.1 - RMSE = 4.60 β = 0.5 - RMSE = 4.42 β = 1 - RMSE = 5.08 γ = 0.5 - RMSE = 4.51 γ = 1 - RMSE = 4.44 γ = 5 - RMSE = 4.67 Fig. 8 Non-convex 3D-reconstructions of surface Svase , using Φ1 (top) or Φ2 (bottom). An additive, zero-mean, Gaussian noise with standard deviation σkgk∞ , σ = 1%, was added to the gradient field. The non-convex approaches depend on the tuning of a parameter (β or γ), but they are able to reconstruct the discontinuities in the presence of noise, unlike the TV approach. Staircasing artifacts indicate the presence of local minima (we used as initial guess z (0) the least-squares solution). The gradient of f is thus given by: ( XX  1 XX V> V DU DU ∇f (z) = u,v u,v z − gu,v 4 (U,V )∈{+,−}2 (u,v)∈Ω U V ) V Φ0 kDU u,v z − gu,v k × (74) V kDU u,v z − gu,v k Given the choices (63) for the Φ-functions, this can be further simplified: of a “Canadian tent”-like surface, with additive, zeromean, Gaussian noise (σ = 10%), is presented. When using the least-squares solution as initial guess z (0) , the 3D-reconstruction is very close to the genuine surface. Yet, when using the trivial initialization z (0) ≡ 0, we obtain a surface whose slopes are “almost everywhere” equal to the real ones, but unexpected discontinuity jumps appear. Since only the initialization differs in these experiments, this clearly shows that the artifacts indicate the presence of local minima. Although local minima can sometimes be avoided by using the least-squares solution as initial guess (e.g., Figure 9), this is not always the case (e.g., Figure 8). (U,V )∈{+,−}2 (u,v)∈Ω Hence, the non-convex estimators perform overall bet(75)  ter than the TV-like approach, but they are still not V> V X X γ 2 DU DU 1 XX u,v u,v z − gu,v ∇f2 (z) =  optimal. We now follow other routes, which use leastUV 2 2 2 2 squares as basis estimator, yet in a non-uniform man(U,V )∈{+,−}2 (u,v)∈Ω U V kDu,v z − gu,v k + γ ner, in order to allow discontinuities. (76) 1 XX ∇f1 (z) = 2  V> V X X DU DU u,v u,v z − gu,v V 2 2 kDU u,v z − gu,v k + β UV Discussion. Contrarily to the TV-like approach (see Subsection 4.2), the non-convex estimators require setting one hyper-parameter (β or γ). As shown in Figure 8, the choice of this parameter is crucial: when it is too high, discontinuities are smoothed, while setting a too low value leads to strong staircasing artifacts. Inbetween, the values β = 0.5 and γ = 1 seem to preserve discontinuities, even in the presence of noise (which was not the case using the TV-like approach). Yet, staircasing artifacts are still present. Despite their non-convexity, the new estimators Φ1 and Φ2 are differentiable, hence these artifacts do not come from a lack of differentiability, as this was the case for TV. They rather indicate the presence of local minima. This is illustrated in Figure 9, where the 3D-reconstruction 4.4 Integration by Anisotropic Diffusion Both previous methods (total variation and non-convex estimators) replace the least-squares estimator by another one, assumed to be robust to discontinuities. Yet, it is possible to proceed differently: the 1D-graph in Figure 5 shows that most of data are corrupted only by noise, and that the discontinuity set is “small”. Hence, applying least-squares everywhere except on this set should provide an optimal 3D-reconstruction. To achieve this, a first possibility is to consider weighted least- 16 Yvain Quéau et al. Ground-truth z (0) = least-squares solution - RMSE = 0.78 z (0) ≡ 0 - RMSE = 13.16 Fig. 9 3D-reconstruction of a “Canadian tent”-like surface from its noisy gradient (σ = 1%), by the non-convex integrator Φ1 (β = 0.5, 12000 iterations), using two different initializations. The objective function being non-convex, the iterative scheme may converge towards a local minimum. (u,v)∈Ω (77) where W is a Ω → R2×2 tensor field, acting as a weight map designed to reduce the influence of discontinuity points. The weights can be computed beforehand according to the integrability of g [47], or by convolution of the components of g by a Gaussian kernel [1]. Yet, such approaches are of limited interest when g contains noise. In this case, the weights should rather be set as a function inversely proportional to k∇z(u, v)k, e.g.: 1 k∇z(u,v)k µ 2 I2 (79) > z W(u, v) = r  > 1 n(u, v) = p −∇z(u, v)> , 1 k∇z(u, v)k2 + 1 which implies that [− nn31 , − nn23 ]> = [∂u z, ∂v z]> = ∇z. If squares: ZZ 2 min kW(u, v) [∇z(u, v) − g(u, v)]k  2 + λ(u, v) z(u, v) − z 0 (u, v) du dv the continuous optimality condition associated to (77) is related to their “anisotropic diffusion model” 14 . Such tensor fields W : Ω → R2×2 are called “diffusion tensors”: we refer the reader to [54] for a complete overview. The use of diffusion tensors for the integration problem is not new [47], but we provide hereafter additional comments on the statistical interpretation of such tensors. Interestingly, the diffusion tensor (78) also appears when making different assumptions on the noise model than those we considered so far. Up to now, we assumed that the input gradient field g was equal to the gradient ∇z of the depth map z, up to an additive, zero-mean,   2  0 > σ Gaussian noise: g = ∇z + ,  ∼ N [0, 0] , . 0 σ2 This hypothesis may not always be realistic. For instance, in 3D-reconstruction scenarii such as photometric stereo [55], one estimates the normal field n : Ω → R3 pixelwise, rather than the gradient g : Ω → R2 , from a set of images. Hence, the Gaussian assumption should rather be made on these images. In this case, and provided that a maximum-likelihood for the normals is used, it may be assumed that the estimated normal field is the genuine one, up to an additive Gaussian noise. Yet, this does not imply that the noise in the gradient field g is Gaussian-distributed. Let us clarify this point. Assuming orthographic projection, the relationship > between n = [n1 , n2 , n3 ] and ∇z is written, in every point (u, v) where the depth map z is differentiable: (78) +1 with µ a user-defined hyper-parameter. The latter tensor is the one proposed by Perona and Malik in [44]: we denote n = [n1 , n2 , n3 ] the estimated normal field, it follows from (79) that [− nn13 , − nn23 ]> = [p, q]> = g. Let us assume that n and n differ according to an additive, zero-mean, Gaussian noise: n(u, v) = n(u, v) + (u, v) (80) where :  2  σ 0 0 (u, v) ∼ N [0, 0, 0]> ,  0 σ 2 0  0 0 σ2  (81) Since n3 is unlikely to take negative values (this would mean that the estimated surface is not oriented 14 Although (78) actually yields an isotropic diffusion model, since it “utilizes a scalar-valued diffusivity and not a diffusion tensor” [54]. Variational Methods for Normal Integration 17 towards the camera), the following Geary-Hinkley transforms:   n3 nn13 − n1 t1 = s  (82)   2 n 1 σ2 +1 n3 n3 t2 = s σ2  n2 n3   n2 n3 − n2 (83) 2 Discretization. Using the same discretization strategy as in Subsections 4.2 and 4.3 leads us to the following discrete functional: (  2 1 XX AU V (z) DU EPM (z) = u z−p 4 (U,V )∈{+,−}2 )  2 UV V + B (z) Dv z−q  + Λ z − z0 +1 both follow standard Gaussian distribution N (0, 1) [27]. After some algebra, this can be rewritten as: 1 p p [∂u z − p] ∼ N (0, 1) 2 σ 1+p k∇zk2 + 1 1 p p [∂v z − q] ∼ N (0, 1) σ 1 + q 2 k∇zk2 + 1 (85) V bU u,v = q (86) where W(u, v) is the following 2×2 anisotropic diffusion tensor field: " # √ 1 0 1 1+p(u,v)2 W(u, v) = p (87) √ 1 0 k∇z(u, v)k2 +1 1+q(u,v)2 Unfortunately, we experimentally found with the choice (87) for the diffusion tensor field, discontinuities were not always recovered. Instead, following the pioneering ideas from Perona and Malik [44], we introduce two parameters µ and ν to control the respective influences of the terms depending on the gradient of the unknown k∇zk and on the input gradient (p, q). The new tensor field is then given by:   1 q 0 p(u,v) 2 1 1+( ) ν   (88) W(u, v) = r 1 q 2 0 q(u,v) 2 k∇z(u,v)k 1+( ) ν +1 µ Replacing the matrix in (88) by I2 yields exactly the Perona-Malik diffusion tensor (78), which reduces the influence of the fidelity term on locations (u, v) where k∇z(u, v)k increases, which are likely to indicate discontinuities. Yet, our diffusion tensor (88) also reduces the influence of points where p or q is high, which are also likely to correspond to discontinuities. In our experiments, we found that ν = 10 could always be used, yet the choice of µ has more influence on the actual results. (89) 1 V aU u,v = q (u,v)∈Ω 2 where the AU V (z) and BU V (z) are |Ω| × |Ω| diagonal matrices containing the following values: (84) This rationale suggests the use of the following fidelity term: ZZ 2 FPM (z) = kW(u, v) [∇z(u, v) − g(u, v)]k du dv  1+ 1+ pu,v 2 ν q 2 2 Uz V (∂u u,v ) +(∂v zu,v ) µ2 1 q  U (∂ zu,v )2 +(∂ V zu,v )2 qu,v 2 u ν v µ2 (90) +1 (91) +1 with (U, V ) ∈ {+, −}2 . UV V Numerical Solution. Since the coefficients aU u,v and bu,v depend in a nonlinear way on the unknown values zu,v , it is difficult to derive a closed-form expression for the minimizer of (89). To deal with this issue, we use the following fixed point scheme, which iteratively updates the anisotropic diffusion tensors and the z-values: ( XX  2 1 z(k+1) = argmin AU V (z(k) ) DU u z−p z∈R|Ω| 4(U,V )∈{+,−}2 )  2 UV (k) V + B (z ) Dv z−q + Λ z − z0  2 (92) Now that the diffusion tensor coefficients are fixed, each optimization problem (92) is reduced to a simple linear least-squares problem. In our implementation, we solve the corresponding optimality condition using Cholesky factorization, which we experimentally found to provide more stable results than conjugate gradient iterations. Discussion. We first experimentally verify that the proposed anisotropic diffusion approach is indeed a statistically meaningful approach in the context of photometric stereo. As stated in [39], “in previous work on photometric stereo, noise is [wrongly] added to the gradient of the height function rather than camera images”. Hence, we consider the images from the “Cat” dataset presented in [52], and add a zero-mean, Gaussian noise with standard deviation σkIk∞ , σ = 5%, to the images, where kIk∞ is the maximum graylevel value. The normals were computed by photometric stereo [55] over 18 Yvain Quéau et al. 45 the part representing the cat. Then, since only the normals ground-truth is provided in [52], and not the depth ground-truth, we a posteriori computed the final normal maps by central finite differences. This allows us to calculate the angular error, in degrees, between the real surface and the reconstructed one. The mean angular error (MAE) can eventually be computed over the set of pixels for which central finite differences make sense (boundary and background points are excluded). MAE (degrees) 40 35 Simchony et al. Harker and O’Leary Proposed (least-squares) Proposed (anisotropic diffusion) 30 25 20 15 10 0 0.05 0.1 0.15 0.2 σ Fig. 11 Mean angular error (in degrees) as a function of the standard deviation σkIk∞ of the noise which was added to the photometric stereo images. The anisotropic diffusion approach always outperforms least-squares. For the methods [26, 53], the gradient field was filled with zeros outside the reconstruction domain, which adds even more bias. Least-squares Anisotropic diffusion (MAE = 9.29 degrees) (MAE = 8.43 degrees) Fig. 10 Top row: three out of the 96 input images used for estimating the normals by photometric stereo [55]. Middle row, left: 3D-reconstruction by least-squares integration of the normals (see Section 3). Bottom row, left: angular error map (blue is 0 degree, red is 60 degrees). The estimation is biased around the occluded areas. Middle and bottom rows, right: same, using anisotropic diffusion integration with the tensor field defined in (87). The errors remain confined in the occluded parts, and do not propagate over the discontinuities. Figure 10 shows that the 3D-reconstruction obtained by anisotropic diffusion outperforms that obtained by least-square: discontinuities are partially recovered, and robustness to noise is improved (see Figure 11). However, although the diffusion tensor (87) does not require any parameter tuning, the restoration of discontinuities is not as sharp as with the non-convex integrators, and artifacts are visible along the discontinuities. Although the parameter-free diffusion tensor (87) seems able to recover discontinuities, this is not always the case. For instance, we did not succeed in recovering the discontinuities of the surface Svase . For this dataset, we had to use the tensor (88). The results from Figure 12 show that with an appropriate tuning of µ, discontinuities are recovered and Gibbs phenomena are removed, without staircasing artifact. Yet, as in the experiment of Figure 10, the discontinuities are not very sharp. Such artifacts were also observed by Badri et al. [5], when experimenting with the anisotropic diffusion tensor from Agrawal et al. [1]. Sharper discontinuities could be recovered by using binary weights: this is the spirit of the Mumford-Shah segmentation method, which we explore in the next subsection. 4.5 Adaptation of the Mumford and Shah Functional Let z 0 : Ω → R be a noisy image to restore. In order to estimate a denoised image z while perserving the discontinuities of the original image, Mumford and Shah suggested in [37] to minimize a quadratic functional only over a subset Ω\K of Ω, while automatically estimating the discontinuity set K according to some prior. A reasonable prior is that the length of K is “small”, which leads to the following optimization problem: ZZ Z min µ k∇z(u, v)k2 du dv + dσ z,K K (u,v)∈Ω\K ZZ +λ  2 z(u, v) − z 0 (u, v) du dv (93) (u,v)∈Ω\K R where λ and µ are positive constants, and K dσ is the length of the set K. See [4] for a detailed introduction to this model and its qualitative properties. Variational Methods for Normal Integration 19 We modify the above models, so that they fit our integration problem. Considering g as basis for leastsquares integration everywhere except on the discontinuity set K, we obtain the following energy: ZZ Z EMS (z, K) = µ k∇z(u, v) − g(u, v)k2 du dv + dσ K (u,v)∈Ω\K ZZ + µ = 0.02 - RMSE = 2.38  2 λ(u, v) z(u, v)−z 0 (u, v) du dv (95) (u,v)∈Ω\K for the Mumford-Shah functional, and the following Ambrosio-Tortorelli approximation: ZZ EAT (z, w) = µ w(u, v)2 k∇z(u, v) − g(u, v)k2 du dv (u,v)∈Ω   1  k∇w(u, v)k2 + [w(u, v) − 1]2 du dv 4 ZZ + µ = 0.2 - RMSE = 2.19 (u,v)∈Ω ZZ +  2 λ(u, v) z(u, v) − z 0 (u, v) du dv (96) (u,v)∈Ω where w : Ω → R is a smooth approximation of 1−χK . µ = 2 - RMSE = 5.09 Fig. 12 Integration of the noisy gradient of Svase (σ = 1%) by anisotropic diffusion. As long as µ is small enough, discontinuities are recovered. Besides, no staircasing artifact is visible. Yet, the restored discontinuities are not perfectly sharp. Several approaches have been proposed to numerically minimize the Mumford-Shah functional: finite differences scheme [12], piecewise constant approximation [14], primal-dual algorithms [46], etc. Another approach consists in using elliptic functionals. An auxiliary function w : Ω → R is introduced. This function stands for 1 − χK , where χK is the characteristic function of the set K. Ambrosio and Tortorelli have proposed in [2] to consider the following optimization problem: ZZ min µ w(u, v)2 k∇z(u, v)k2 du dv z,w (u,v)∈Ω ZZ +   1 2 2  k∇w(u, v)k + [w(u, v)−1] du dv 4 (u,v)∈Ω ZZ +λ  2 z(u, v) − z 0 (u, v) du dv (94) (u,v)∈Ω By using the theory of Γ -convergence, it is possible to show that (94) is a way to solve (93) when  → 0. Numerical Solution. We use the same strategy as in Section 3 for discretizing ∇z(u, v) inside Functional (96), i.e. all the possible first-order discrete approximations of the differential operators are summed. Since discontinuities are usually “thin” structures, it is possible that a forward discretization contains the discontinuity while a backward discretization does not. Hence, the definition of the weights w should be made accordingly to +/− that of ∇z. Thus, we define four fields wu/v : Ω → R, +/− associated with the finite differences operators ∂u/v . This leads to the following discrete analogue of Functional (96): EAT (z, wu+ , wu− , wv+ , wv− ) = µ 2  Wu+ D+ uz−p 2  + Wu− D− uz−p 2 ! + Wv+ D+ vz −q  2 + Wv− D− vz −q  2   + + 2 − 2 + 2 − 2 Du wu + D− + D+ + D− u wu v wv v wv 2  1 + 2 2 2 2 + wu −1 + wu− −1 + wv+ − v1 + wv− −1 8  2 + Λ z − z0 (97) + +/− where wu/v ∈ R|Ω| is a vector containing the values of +/− +/− +/− the discretized field wu/v , and Wu/v = Diag(wu/v ) is the |Ω|×|Ω| diagonal matrix containing these values. 20 Yvain Quéau et al. µ = 1 - RMSE = 4.94 µ = 45 - RMSE = 2.37 µ = 100 - RMSE = 4.14 Fig. 13 3D-reconstructions from the noisy gradient of Svase (σ = 1%), using the Mumford-Shah integrator. If µ is tuned appropriately, sharp discontinuities can be restored, without staircasing artifacts. We tackle the nonlinear problem (97) by an alternating optimization scheme: (k) (k) (k) z(k+1) = argmin EAT (z, wu+ ,wu− ,wv+ ,wv− (k) ) (98) z∈R|Ω| wu+ (k+1) (k) (k) = argmin EAT (z(k+1) , w,wu− ,wv+ ,wv− (k) ) (99) w∈R|Ω| and similar straightforward updates for the other indicator functions. We can choose as initial guess, for instance, the smooth solution from Section 3 for z(0) , (0) (0) (0) (0) and wu+ = wu− = wv+ = wv− ≡ 1. At each iteration (k), updating the surface and the indicator functions requires solving a series of linear least-squares problems. We achieve this by solving the resulting linear systems (normal equations) by means of the conjugate gradient algorithm. Contrarily to the approaches that we presented so far, the matrices involved in these systems are modified at each iteration. Hence, it is not possible to compute the preconditioner beforehand. In our experiments, we did not consider any preconditioning strategy at all. Thus, the proposed scheme could obviously be accelerated. Discussion. Let us now check experimentally, on the same noisy gradient of surface Svase as in previous experiments, whether the Mumford-Shah integrator satisfies the expected properties. In the experiment of Figure 13, we performed 50 iterations of the proposed alternating optimization scheme, with various choices for the hyper-parameter µ. The  parameter was set to  = 0.1 (this parameter is not critical: it only has to be “small enough”, in order for the Ambrosio-Tortorelli approximation to converge towards the Mumford-Shah functional). As it was already the case with other nonconvex regularizers (see Subsection 4.3), a bad tuning of the parameter leads either to over-smoothing (low values of µ) or to staircasing artifacts (high values of µ), which indicate the presence of local minima. Yet, by appropriately setting this parameter, we obtain a 3D-reconstruction which is very close to the genuine surface, without staircasing artifact. The Mumford-Shah functional being non-convex, local minima may exist. Yet, as shown in Figure 14, the choice of the initialization may not be as crucial as with the non-convex estimators from Subsection 4.3. Indeed, the 3D-reconstruction of the “Canadian tent” surface is similar using as initial guess the least-squares solution or the trivial initialization z (0) ≡ 0. z (0) = least-squares solution - RMSE = 0.74 z (0) ≡ 0 - RMSE = 1.84 Fig. 14 3D-reconstructions of the “Canadian tent” surface from its noisy gradient (σ = 1%), by the Mumford-Shah integrator (µ = 20), using two different initializations. The initialization matters, but not as much as with the non-convex estimators from Subsection 4.3. Hence, among all the variational integration methods we have studied, the adaptation of the MumfordShah model is the approach which provides the most satisfactory 3D-reconstructions in the presence of sharp features: it is possible to recover discontinuities and kinks, even in the presence of noise, and with limited artifacts. Nevertheless, local minima may theoretically arise, as well as staircasing if the parameter µ is not tuned appropriately. Variational Methods for Normal Integration 21 Table 1 Main features of the five methods of integration proposed in this paper. The quadratic method has all desirable properties, except PDisc . The others lose PFast but hold PDisc . Sharpest features are recovered by using non-convex regularization or the Mumford-Shah approach, yet staircasing artifacts and local minima may appear. In addition, all discontinuity-preserving methods except TV require tuning at least one hyper-parameter. Yet, TV is not able to recover discontinuities in the presence of noise. Overall, we recommend using: quadratic integration if speed is the most important issue; the Mumford-Shah approach if recovering discontinuities is the most important issue; and anisotropic diffusion if discontinuities are present, but limited. Method Quadratic Total variation Non-convex regularization Anisotropic diffusion Mumford-Shah PFast +++ + − − − PRobust + + + + + PFreeB + + + + + 5 Conclusion and Perspectives We proposed several new variational methods for solving the normal integration problem. These methods were designed to satisfy the largest subset of properties that were identified in a companion survey paper [48] entitled Normal Integration: A Survey. We first detailed in Section 3 a least-squares solution which is fast, robust and parameter-free, while assuming neither a particular shape for the integration domain nor a particular boundary condition. However, discontinuities in the surface can be handled only if the integration domain is first segmented into pieces without discontinuities. Therefore, we discussed in Section 4 several non-quadratic or non-convex variational formulations aiming at appropriately handling discontinuities. As we have seen, the latter property can be satisfied only if (slow) iterative schemes are used and / or one critical parameter is tuned. Therefore, there is still room for improvement: a fast, parameter-free integrator, able to handle discontinuities remains to be proposed. Table 1 summarizes the main features of the five new integration methods proposed in this article. Contrarily to Table 1 in [48], which recaps the features of state-of-the-art methods, this time we use a more nuanced evaluation than binary features +/−. Among the new methods, we believe that the least-squares method discussed in Section 3 is the best if speed is the most important criterion, while the Mumford-Shah approach discussed in Subsection 4.5 is the most appropriate one for recovering discontinuities and kinks. Inbetween, the anisotropic diffusion approach from Subsection 4.4 represents a good compromise. Future research directions may include accelerating the numerical schemes and proving their convergence when this is not trivial (e.g., for the non-convex integrators). We also believe that introducing additional smoothness terms inside the functionals may be useful for eliminating the artifacts in anisotropic diffusion PDisc − + +++ ++ +++ PNoRect + + + + + PNoPar + + − −− −− Local minima No No Yes No Yes Staircasing No Yes Yes No Yes integration. Quadratic (Tikhonov) smoothness terms were suggested in [26]: to enforce surface smoothness while preserving the discontinuities, we should rather consider non-quadratic ones. In this view, higher-order functionals (e.g., total generalized variation methods [10]) may reduce not only these artifacts, but also staircasing. Indeed, as shown in Figure 15, such artifacts may be visible when performing photometric stereo [55] without prior segmentation. Yet, this example also shows that the artifacts are visible only over the background, and do not seem to affect the relevant part. 3D-reconstruction is not the only application where efficient tools for gradient field integration are required. Although the assumption on the noise distribution may differ from one application to another, PDE-based imaging problems such as Laplace image compression [45] or Poisson image editing [43] also require an efficient integrator. In this view, the ability of our methods to handle control points may be useful. We illustrate in Figure 16 an interesting application. From an RGB image I, we selected the points where the norm of the gradient of the luminance (in the CIE-LAB color space) was the highest (conserving only 10% of the points). Then, we created a gradient field g equal to zero everywhere, except on the control points, where it was set to the gradient of the color levels. The prior z 0 was set to a null scalar field, except on the control points where we retained the original color data. Eventually, λ is set to an arbitrary small value (λ = 10−9 ) everywhere, except on the control points (λ = 10). The integration of each color channel gradient is performed independently, using the Mumford-Shah method to extrapolate the data from the control points to the whole grid. Using this approach, we obtain a nice piecewiseconstant approximation of the image, in the spirit of the “texture-flattening” application presented in [43]. Besides, by selecting the control points in a more optimal way [8, 28], this approach could easily be extended to image compression, reaching state-of-the-art lossy compression rates. In fact, existing PDE-based meth- 22 Yvain Quéau et al. (a) (b) (e) (c) (d) (f) Fig. 15 3D-reconstruction using photometric stereo. (a-c) All (real) input images. (d) 3D-reconstruction by least-squares on the whole grid. (e) 3D-reconstruction by least-squares on the non-rectangular reconstruction domain corresponding to the images of the bust. (f) 3D-reconstruction using the Mumford-Shah approach, on the whole grid. When discontinuities are handled, it is possible to perform photometric stereo without prior segmentation of the object. ods can already compete with the compression rate of the well-known JPEG 2000 algorithm [45]. We believe that the proposed edge-preserving framework may yield even better results. Eventually, some of the research directions already mentioned in the conclusion section of our survey paper [48] were ignored in this second paper, but they remain of important interest. One of the most appealing examples is multi-view normal field integration [15]. Indeed, discontinuities represent a difficulty in our case because they are induced by occlusions, yet more information would be obtained near the occluding contours by using additional views. References 1. Agrawal, A., Raskar, R., Chellappa, R.: What Is the Range of Surface Reconstructions from a Gradient Field? In: Proceedings of the 9th European Conference on Computer Vision (volume I), Lecture Notes in Computer Science, vol. 3951, pp. 578–591. Graz, Austria (2006) 6, 8, 16, 18 2. Ambrosio, L., Tortorelli, V.M.: Approximation of Functionals Depending on Jumps by Elliptic Functionals via Γ -convergence. Communications in Pure and Applied Mathematics 43, 999–1036 (1990) 19 3. Attouch, H., Buttazzo, G., Michaille, G.: Variational analysis in Sobolev and BV spaces: applications to PDEs and optimization. SIAM (2014) 4 4. Aubert, G., Kornprobst, P.: Mathematical Problems in Image Processing, Applied Mathematical Sciences, vol. 147. Springer-Verlag (2002) 2, 8, 13, 18 5. Badri, H., Yahia, H., Aboutajdine, D.: Robust Surface Reconstruction via Triple Sparsity. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2291–2298. Columbus, USA (2014) 14, 18 6. Bähr, M., Breuß, M., Quéau, Y., Bouroujerdi, A.S., Durou, J.D.: Fast and accurate surface normal integration on non-rectangular domains. Computational Visual Media 3, 107–129 (2017) 4, 6 7. Beck, A., Teboulle, M.: A Fast Iterative ShrinkageThresholding Algorithm for Linear Inverse Problems. SIAM Journal on Imaging Sciences 2(1), 183–202 (2009) 13 8. Belhachmi, B., Bucur, D., Burgeth, B., Weickert, J.: How to Choose Interpolation Data in Images. SIAM Journal on Applied Mathematics 70(1), 333–352 (2009) 21 9. Boyd, S., Parikh, N., Chu, E., Peleato, B., Eckstein, J.: Distributed Optimization and Statistical Learning via the Alternating Direction Method of Multipliers. Foundations and Trends in Machine Learning 3(1), 1–122 (2011) 12 10. Bredies, K., Holler, M.: A TGV-Based Framework for Variational Image Decompression, Zooming, and Reconstruction. Part I: Analytics. SIAM Journal on Imaging Sciences 8(4), 2814–2850 (2015) 13, 21 11. Catté, F., Lions, P.L., Morel, J.M., Coll, T.: Image Selective Smoothing and Edge Detection by Nonlinear Diffusion. SIAM Journal on Numerical Analysis 29(1), 182– 193 (1992) 2 Variational Methods for Normal Integration (a) 23 (b) (c) Fig. 16 Application to image compression/image editing. (a) Reference image. (b) Control points (where the RGB-values and their gradients are kept). (c) Restored image obtained by considering the proposed Mumford-Shah integrator as a piecewiseconstant interpolation method. A reasonable piecewise constant restoration of the initial image can be obtained from as few as 10% of the initial information. 12. Chambolle, A.: Image Segmentation by Variational Methods: Mumford and Shah Functional and the Discrete Approximation. SIAM Journal of Applied Mathematics 55(3), 827–863 (1995) 19 13. Chambolle, A., Pock, T.: A First-Order Primal-Dual Algorithm for Convex Problems with Applications to Imaging. Journal of Mathematical Imaging and Vision 40(1), 120–145 (2010) 2, 13 14. Chan, T.F., Vese, L.A.: Active Contours Without Edges. IEEE Transactions on Image Processing 10(2), 266–277 (2001) 19 15. Chang, J.Y., Lee, K.M., Lee, S.U.: Multiview Normal Field Integration Using Level Set Methods. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Workshop on Beyond Multiview Geometry: Robust Estimation and Organization of Shapes from Multiple Cues. Minneapolis, Minnesota, USA (2007) 22 16. Charbonnier, P., Blanc-Féraud, L., Aubert, G., Barlaud, M.: Deterministic Edge-Preserving Regularization in Computed Imaging. IEEE Transactions on Image Processing 6(2), 298–311 (1997) 2 17. Chen, S.S., Donoho, D.L., Saunders, M.A.: Atomic Decomposition by Basis Pursuit. SIAM Journal on Scientific Computing 20(1), 33–61 (1998) 13 18. Du, Z., Robles-Kelly, A., Lu, F.: Robust Surface Reconstruction from Gradient Field Using the L1 Norm. In: Proceedings of the 9th Biennial Conference of the Australian Pattern Recognition Society on Digital Image Computing Techniques and Applications, pp. 203–209. Glenelg, Australia (2007) 12 19. Durou, J.D., Aujol, J.F., Courteille, F.: Integration of a Normal Field in the Presence of Discontinuities. In: Proceedings of the 7th International Workshop on Energy Minimization Methods in Computer Vision and Pattern Recognition, Lecture Notes in Computer Science, vol. 5681, pp. 261–273. Bonn, Germany (2009) 1, 2, 14 20. Durou, J.D., Courteille, F.: Integration of a Normal Field without Boundary Condition. In: Proceedings of the 11th IEEE International Conference on Computer Vision, 1st Workshop on Photometric Analysis for Computer Vision. Rio de Janeiro, Brazil (2007) 1, 2, 3, 6 21. Gabay, D., Mercier, B.: A dual algorithm for the solution of nonlinear variational problems via finite element approximation. Computers & Mathematics with Applications 2(1), 17 – 40 (1976) 12 22. Geman, D., Reynolds, G.: Constrained Restoration and Recovery of Discontinuities. IEEE Transactions on Pattern Analysis and Machine Intelligence 14(3), 367–383 (1992) 2 23. Goldstein, T., O’Donoghue, B., Setzer, S., Baraniuk, R.: Fast Alternating Direction Optimization Methods. SIAM Journal on Imaging Sciences 7(3), 1588–1623 (2014) 2, 13 24. Goldstein, T., Osher, S.: The split Bregman method for L1-regularized problems. SIAM Journal on Imaging Sciences 2(2), 323–343 (2009) 12 25. Haque, S.M., Chatterjee, A., Govindu, V.M.: High Quality Photometric Reconstruction Using a Depth Camera. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2283–2290. Columbus, USA. (2014) 3 26. Harker, M., O’Leary, P.: Regularized Reconstruction of a Surface from its Measured Gradient Field. Journal of Mathematical Imaging and Vision 51(1), 46–70 (2015) 4, 6, 8, 9, 10, 18, 21 27. Hayya, J., Armstrong, D., Gressis, N.: A note on the ratio of two normally distributed variables. Management Science 21(11), 1338–1341 (1975) 17 28. Hoeltgen, L., Setzer, S., Weickert, J.: An Optimal Control Approach to Find Sparse Data for Laplace Interpolation. In: Proceedings of the 9th International Workshop on Energy Minimization Methods in Computer Vision and Pattern Recognition, Lecture Notes in Computer Science, vol. 8081, pp. 151–164. Lund, Sweden (2013) 21 29. Horn, B.K.P., Brooks, M.J.: The Variational Approach to Shape From Shading. Computer Vision, Graphics, and Image Processing 33(2), 174–208 (1986) 4 30. Horovitz, I., Kiryati, N.: Depth from Gradient Fields and Control Points: Bias Correction in Photometric Stereo. Image and Vision Computing 22(9), 681–694 (2004) 3 31. Ikehata, S., Wipf, D., Matsushita, Y., Aizawa, K.: Photometric Stereo Using Sparse Bayesian Regression for General Diffuse Surfaces. IEEE Transactions on Pattern Analysis and Machine Intelligence 36(9), 1816–1831 (2014) 11 32. Kadambi, A., Taamazyan, V., Shi, B., Raskar, R.: Polarized 3D: High-Quality Depth Sensing With Polarization Cues. In: Proceedings of the 15th IEEE International Conference on Computer Vision, pp. 3370–3378. Santiago, Chili (2015) 3 24 33. Kimmel, R., Yavneh, I.: An Algebraic Multigrid Approach for Image Analysis. SIAM Journal on Scientific Computing 24(4), 1218–1231 (2003) 3 34. Kornprobst, P., Aubert, G.: Image Sequence Analysis via Partial Differential Equations. Journal of Mathematical Imaging and Vision 11(1), 5–26 (1999) 2 35. Koutis, I., Miller, G.L., Peng, R.: A Nearly-m log n Time Solver for SDD Linear Systems. In: Proceedings of the IEEE Annual Symposium on Foundations of Computer Science, pp. 590–598. Palm Springs, USA (2011) 6 36. Lanza, A., Morigi, S., Sgallari, F.: Convex Image Denoising via Non-convex Regularization with Parameter Selection. Journal of Mathematical Imaging and Vision 56(2), 195–220 (2016) 2, 14 37. Mumford, D., Shah, J.: Optimal Approximations by Piecewise Smooth Functions and Associated Variational Problems. Communications in Pure and Applied Mathematics 42(5), 577–685 (1989) 2, 11, 18 38. Nikolova, M.: Local Strong Homogeneity of a Regularized Estimator. SIAM Journal on Applied Mathematics 61(2), 633–658 (2000) 2, 13 39. Noakes, L., Kozera, R.: Nonlinearities and Noise Reduction in 3-Source Photometric Stereo. Journal of Mathematical Imaging and Vision 18(2), 119–127 (2003) 17 40. Ochs, P., Brox, T., Pock, T.: iPiasco: Inertial proximal algorithm for strongly convex optimization. Journal of Mathematical Imaging and Vision 53(2), 171–181 (2015) 2 41. Ochs, P., Chen, Y., Brox, T., Pock, T.: iPiano: Inertial Proximal Algorithm for Nonconvex Optimization. SIAM Journal on Imaging Sciences 7(2), 1388–1419 (2014) 2, 14 42. Or-el, R., Rosman, G., Wetzler, A., Kimmel, R., Bruckstein, A.M.: RGBD-Fusion: Real-Time High Precision Depth Recovery. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 5407–5416. Boston, USA. (2015) 3 43. Pérez, P., Gangnet, M., Blake, A.: Poisson image editing. ACM Transactions on Graphics 22(3), 313–318 (2003) 21 44. Perona, P., Malik, J.: Scale-space and Edge Detection using Anisotropic Diffusion. IEEE Transactions on Pattern Analysis and Machine Intelligence 12(7), 629–639 (1990) 2, 11, 16, 17 45. Peter, P., Hoffmann, S., Nedwed, F., Hoeltgen, L., Weickert, J.: Evaluating the true potential of diffusion-based inpainting in a compression context. Signal Processing: Image Communication 46, 40 – 53 (2016) 21, 22 46. Pock, T., Cremers, D., Bischof, H., Chambolle, A.: An algorithm for minimizing the Mumford-Shah functional. In: Proceedings of the 12th IEEE International Conference on Computer Vision, pp. 1133–1140. Kyoto, Japan (2009) 19 47. Quéau, Y., Durou, J.D.: Edge-Preserving Integration of a Normal Field: Weighted Least Squares, TV and L1 Approaches. In: Proceedings of the 5th International Conference on Scale Space and Variational Methods in Computer Vision, Lecture Notes in Computer Science, vol. 9087, pp. 576–588. Lège Cap-Ferret, France (2015) 1, 2, 11, 12, 16 48. Quéau, Y., Durou, J.D., Aujol, J.F.: Normal Integration: A Survey. Journal of Mathematical Imaging and Vision (2017). (submitted, preprint available at https://hal. archives-ouvertes.fr/hal-01334349/) 1, 3, 10, 21, 22 49. Rudin, L.I., Osher, S., Fatemi, E.: Nonlinear total variation based noise removal algorithms. Physica D: Nonlinear Phenomena 60(1-4), 259–268 (1992) 12 Yvain Quéau et al. 50. Saracchini, R.F.V., Stolfi, J., Leitão, H.C.G., Atkinson, G.A., Smith, M.L.: A Robust Multi-Scale Integration Method to Obtain the Depth From Gradient Maps. Computer Vision and Image Understanding 116(8), 882–895 (2012) 11 51. Shefi, R., Teboulle, M.: Rate of Convergence Analysis of Decomposition Methods Based on the Proximal Method of Multipliers for Convex Minimization. SIAM Journal on Optimization 24(1), 269–297 (2014) 13 52. Shi, B., Wu, Z., Mo, Z., Duan, D., Yeung, S.K., Tan, P.: A Benchmark Dataset and Evaluation for Non-Lambertian and Uncalibrated Photometric Stereo. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition. Las Vegas, USA (2016) 17, 18 53. Simchony, T., Chellappa, R., Shao, M.: Direct Analytical Methods for Solving Poisson Equations in Computer Vision Problems. IEEE Transactions on Pattern Analysis and Machine Intelligence 12(5), 435–446 (1990) 6, 8, 9, 10, 18 54. Weickert, J.: Anisotropic diffusion in image processing. Teubner Stuttgart (1998) 16 55. Woodham, R.J.: Photometric Method for Determining Surface Orientation from Multiple Images. Optical Engineering 19(1), 139–144 (1980) 4, 16, 17, 18, 21
1cs.CV
Networks Routing Optimization Using Swarm Intelligence By Mohamed Hassan 1 © 2012 1- Introduction The aim of this paper is to highlight and explore a traditional problem, which is the minimum spanning tree, and finding the shortest-path in network routing, by using Swarm Intelligence. In other words this work to be considered as an investigation topic with combination between operations research, discrete mathematics, and evolutionary computing aiming to solve one of networking problems. Minimum spanning tree and path-finding (shortest one) in a graph mathematically have been around for a while, already there are many contribution, but a few searching to find a fast, new, and easy way especially to solve the multiple destination routing (MDR) problems. So we will try to explore this topic with an integration between traditional algorithm and particle swarm optimization (PSO) algorithm. The PSO algorithm is based on the sociological behavior associated with bird flocking or fishing school. The algorithm makes use of cognitive and social information among the individuals (particles) to find an optimal solution to an optimization problem. PSO is an important swarm intelligent algorithm with fast convergence speed and easy implementation. We start to discover what is the evolutionary computing, as well as what is the genetic algorithm; the concept of PSO (Particle Swarm Optimization) as a part of new methods in computation (Evolutionary Computing), in addition we will describe and analyze the spanning tree and network route optimization, to get the minimal spanning tree, and finally finding the shortest route using swarm intelligence represented in Particle Swarm Optimization (PSO). Let's now dig into the methods and explore the differences and advantages of each. A network consists of a set of nodes connected together. Here we study the network in generalized context. We will give a simple notation for our network which is (V, E), where V is the number of Vertices (nodes) and E is the set of Edges (Links/Cables). Example figure 2.1 2 V (Vertices/Nodes) 5 1 6 3 E (Edges/Links) 4 Figure 2.1 V = {1,2,3,4,5}, E={(1,2),(1,3),(2,3),(2,4),(2,5),(3,4),(3,5),(4,5)}. Each link (path) is assigned a capacity which may be flow, cost, distance, etc ... We define a path as a sequence of distinct links that join two nodes of the flow irrespective of the direction of flow in each link. If the path connects a node and itself we consider the path to be cyclic, as in figure 2.1 links (3,4), (4,5) and (5,3) form a closed loop (cycle). In particular, a directed cycle is a loop in which all links are directed in the same direction. Nodes which are connected without loop are a-cyclic. In other word a connected network means that any pair of distinct nodes can be connected by at least one path. A tree is connected network without loops. [1] 2 © 2012 2. A brief History About Evolutionary Inspired Computing Biological behavior has inspired researchers to adapt the natures in computing, their work is not mature enough, but it is pushing technology to its most interesting limits. (A) Genetic Programming (GP): Is an implementation of evolutionary programming, where the problem-solving domain is modeled on computer and the algorithm attempts to find a solution by the process of simulated evolution, employing the biological theory of genetics and the Darwinian principle of survival of the fittest. GP is distinct from other techniques because of its tree representation and manipulation of all solutions. (B) Particle Swarm Optimization (PSO): Similarly to Genetic Algorithms, PSO is a population-based technique, inspired by the social behavior of individuals (or particles) inside swarms in nature (for example, flocks of birds or schools of fish). PSO first proposed by Kennedy and Eberhart (1995). In addition PSO is a collection of particles or (agents) swarm through an N-dimensional space. The rules for how the particles move through the space are based on simple natural flocking rules that cause the particles to orbit around the best-found solution in the hope of finding a better one.[2] So particles will usually looking forward for the best (optimum) solution. PSO is a simple algorithm (method), as well as fast, effective, and can be used in many types of optimization problems. 3. Network optimization (spanning tree and shortest path) – and its Algorithms A network consists of a set of nodes (vertices) linked by arcs (edges) and a network optimization models actually are special types of linear programming problems. In the next few papers we only scratch the surface of the current network route overview. However, we proposed some basic ideas of how to solve them using PSO (without delving into issues of data structures that are so vital to successful large-scale implementations). The minimum spanning tree problem bears some similarities to the shortest-path problem. 7 1 4 2 6 3 4 2 6 5 3 (a) 1 n km/miles (length) 7 1 7 2 6 (b) 4 5 (c) Figure 3.1 Shows the spanning tree concept (a) Not a spanning tree, (b) Not a spanning tree, (c) A spanning tree 3 3 © 2012 5 A network with n nodes requires only (n – 1) links to provide a path between each pair of nodes. Figure 3.1 illustrates this concept of a spanning tree for the a sample network diagram. Thus, Fig. 3.1 (a) is not a spanning tree because nodes 6, 1, 2, and 3 are not connected with nodes 4, 5, and 7. It needs another link to make this connection. This network actually consists of two trees, one for each of these two sets of nodes. The links in Fig. 3.1 (b) do span (the network is connected), but it is not a tree because there are two cycles (6–1–2–3–6 and 4–7–5–4). It has too many links. Because this network problem sample has n = 7 nodes, and we already indicates that the network must have exactly n – 1 = 6 links, with no cycles, to qualify as a spanning tree. This condition is achieved in Fig. 3.1 (c), so this network is a feasible solution (with a value of n km/miles for the total length of the links) for the minimum spanning tree problem. In short a tree is a connected nodes without cycles.[3] 3.1 Algorithm for the Minimum Spanning Tree & Path-finding Objective of nth iteration: Find the nth nearest node to the origin (to be repeated for n = 1, 2, . . . until the nth nearest node is the destination. Input for nth iteration: (n – 1) nearest nodes to the origin (solved for at the previous iterations), including their shortest path and distance from the origin. (These nodes, plus the origin, will be called solved nodes; the others are unsolved nodes). Candidates for nth nearest node: Each solved node that is directly connected by a link to one or more unsolved nodes provides one candidate the unsolved node with the shortest connecting link. (Ties provide additional candidates). Calculation of nth nearest node: For each such solved node and its candidate, add the distance between them and the distance of the shortest path from the origin to this solved node. The candidate with the smallest such total distance is the nth nearest node (ties provide additional solved nodes), and its shortest path is the one generating this distance. 3.2 Traditional Algorithms for Minimum Spanning Tree & Path-finding 3.2.1 (Prim's Algorithm) Source [4] 4 © 2012 3.2.2 (Kruskal's Algorithm) Source [5] 3.3 Why minimum spanning trees? The standard application is to a problem like phone network design. You have a business with several offices; you want to lease phone lines to connect them up with each other; and the phone company charges different amounts of money to connect different pairs of cities. You want a set of lines that connects all your offices with a minimum total cost. It should be a spanning tree, since if a network isn't a tree you can always remove some edges and save money.[6] • They can be computed quickly and easily. • They provide a way to identify clusters in sets of points. Deleting the long edges from a minimum spanning tree leaves. • They can be used to design of telecommunication networks (fiver-optic networks, computer networks, telephone networks, television networks, etc..) • As an educational tool, minimum spanning tree algorithms provide graphic evidence that greedy algorithms can give provably optimal solutions. 3.4 Why using PSO?! While traditional method to solve such as above problems performs a limited exploration of search space and result in inferior solutions, some other traditional method are general purpose optimization that usually involve a large set of parameters that needs to be fine-tuned, thus PSO (particle swarm optimization) is an extremely simple algorithm that seems to be effective for optimizing a wide range of functions. We view it as a mid-level form a natural life or biologically derived algorithm, occupying the space in nature between evolutionary search, which requires eons, and neural processing, which occurs on the order of milliseconds. Social optimization occurs in the time frame of ordinary experience, in fact, it is ordinary experience. In addition to its ties with natural life, particle swarm optimization has obvious ties with evolutionary computation. Conceptually, it seems to lie somewhere between genetic algorithms and evolutionary programming. It is highly dependent on stochastic processes, like evolutionary programming. We summarize the advantage of using PSO as follow: 5 © 2012 • Insensitive to scaling of design variables • Simple implementation • Easily parallelized for concurrent processing • Derivative free • Very few algorithm parameters • Very efficient global search algorithm [7] 4. Using Paticle Swarm Optimization (PSO) for Network Optimization In addition of the above particle swarms have a nutral motivation. Two specific inspiration are influnce of PSO fish school, and bird flocks. Each involoves collection (groups) of elements (particles) that move together synchronously, diverge from one to another, and then re-group. Ultimately we just say particle swarms as a means to simulate social behavior by using computer-based model, hence we will refer to PSO in the next few papers as algorithm (PSO Algoritm). [8] 4.1 PSO Algorithm The PSO is a population-based algorithm in which individual particles work together to solve given problem. Now we will walk through the basic PSO algorithm and take a look at each of its elements. The most interesting thing about PSO algorithm is its pure simplicity. The PSO can be implemented in very little code using only primitive mathematical operators, making it ideal for limited-memory and computationally constrained environments.[9] 4.1.1 Basic PSO Flow The basic flow for the PSO algorithm: 1- As we begin by random particle(s) initialization (we call it population) within N-dimensional space. 2- Because it random population, so each particle will have a random location and velocity for each population dimension (space). 3- Then we will evaluate each particle's fitness for any given problem (objective function), if fitness is better than the personal particle best fitness (pbest), we will save the location vector for that particle as pbest. If the particle's fitness is better than the global best fitness (gbest), we save this particle's location vector as gbest. 4- Finally, we update the particle's velocity and position and look at the next particle in the population. If the global best fitness meets the exit criteria (satisfactory criteria – best fitness of all particle's), we end the run (loop) and provide the location vector as the solution to the given problem, each element of the solution vector represents the independent variable for given problem.[10] 6 © 2012 4.1.2 How it works? Each particle has a position (x, y) in the search space and a velocity (vx, vy) at which it is moving through that space (N-dimensional). Particles have a certain amount of inertia, which keeps them moving in the same direction they were moving previously. They also have acceleration (change in velocity), which depends on two main things. 1) Each particle is attracted toward the best location that it has personally found (personal best - pbest) previously in its history. 2) Each particle is attracted toward the best location that (any) particle has ever found (global best gbest) in the search space. The strength with which the particles are pulled in each of these directions is dependent on the parameters (pbest) and (gbest). As particles move farther away from these "best" locations, the force of attraction grows stronger, there is also a random factor about how much the particle is pulled toward each of these locations, the particle swarm is trying to optimize a function that is determined by the values in the discrete grid of cells, we will describe that in more details in the next sections. [11] 4.2 THINGS TO NOTICE You will often see particles traveling in paths that are roughly elliptical. Sometimes the swarm quickly finds the perfect solution, and other times it becomes stuck in the wrong area of the search space, and looks like it may never find the perfect solution. One variation of the PSO algorithm uses a repulsive force between particles to help keep them spread out in the space, and less likely to all gravitate to a sub-optimal value. 4.3 The Problem (Example) Consider an ISP network. At any given time, a packet sent by one computer typically traverses multiple routers before reaching its destination, and it may take a certain amount of time to traverse each path (due to congestion effects, switching delays, and so on), making communication performance depend on the flow of traffic. We consider the role of optimization in controlling the routing of traffic through the Internet. Assuming the following (Figure 4.1) network type, and we need to find the shortest path. In such a problem, you have a network with link weight on the edges and two special nodes: a start node (White) and a finish node (Green). 3 2 1 4 7 5 3 2 2 7 7 6 3 4 5 4 Figure 4.1 PSO is used to either maximize or minimize and objective function by updating the velocity (cost, weight, link) in every iteration. We will map (consider) all paths from Start (Origin) to Finish (Destination) as particles. 7 © 2012 Things to be considered : A) Parameters such as: Every particle is given a random position and velocity (Initialization). B) The pBest value is calculated depending on the value of fitness of each particle in every iteration. C) The fitness value depends upon the weight associated with the particles. Fitness = pBest StartWithShortest >> where n (number) and P (Particle) ∑ nP pBest or pbest will be considered our priority. 4.4 PSO Simple Algorithm to Optimize Network Routing 1- Calculate pbest and position of corresponding particle. 2- for(i=0; i<no_of_iteration; i++); 3- for(x=0; x<particle_count; x++); 4- Change weight of each link along the path of each particle randomly. 5- Calculate fitness and find pbest of nth iteration. 6- Find best pbest or gbest with the corresponding particle, which gives the shortest-path in terms of the weight associated with the links on the path (or particle). Figure 4.1 4.5.1 illustration of how it works Note: pbest (priority) is not the weight Figure 4.1. Node 1 2 3 Pbest (priority) 2 6 4 1 2 3 i 0 Node 6 Pbest (priority) i 1 2 2 Node Pbest (priority) i 8 3 6 9 5 7 k i=0,V p =(1) 4 5 6 3 4 5 6 9 5 7 k i=2, V p =(1,3,2) Pbest (priority) i 5 9 5 7 k i=1, V p =(1,3) 1 Node 4 1 2 3 4 9 5 6 7 k i=3, V p =(1,3,2,5) © 2012 Node 1 4 5 6 k p 4 Node 3 7 i=4,V =(1,3,2,5,4) Pbest (priority) i 2 1 2 3 4 5 6 Pbest (priority) i 5 k i=5,V p =(1,3,2,5,4,6) Particle priority vector updating to construct the path {1, 3, 2, 5, 4, 6}. 2 1 5 3 4 2 6 3 4 2 4 Figure 4.2 This example corresponds to the priority (particle position) vector to create a valid path from the same position vector and the corresponding final path is {1, 3, 2, 5, 4, 6}, where forces the algorithm to choose a valid node (although it has the highest priority) thereby avoiding an invalid path creation. This operation reduces the number of invalid paths (thereby, the computation time).[12] 5. Conclusion The purpose of this paper is to investigate and highlight a specific area in computer science with combination of the intelligence behavior of biological swarm and operations research trying to optimize network routing focusing on how to minimal spanning tree and solve the shortest path problem using Particle Swarm Optimization (PSO) techniques. PSO algorithm is simple and efficient method for optimization and discontinuous multidimensional problems. PSO in general can be used interchangeably with the genetic algorithm, and in some cases, can find solutions faster with less computational overhead. An endeavor was made to reduce the probability of invalid loop/backward path, as will as find the valid and near optimal path with PSO based search techniques with less iteration process. As each particle chooses explicitly its location based on its personal best (pbest) from the set of particle's global best (gbest) in the entire swarm, accordingly the near shortest-path should be chosen in less computation time and of-course with less code. Since this paper focus on highlighting of how pso can be used to solve optimization problem, so it should be further work to include codes/application and fine tuning to solve more network problem such as network flow. 9 © 2012 Bibliography 1: H.S. Kasana& K.D. Kumar, Introductory operations research (theory and applications), 2003 2: M. Tim Jones, Artificial intelligence application programming, 2nd edition, 2006 3: , Http://en.wikipedia.org/wiki/minimum_spanning_tree, 4: , Http://www.thestudentroom.co.uk/attachment.php?attachmentid=23572&d=1148396387, 5: , Http://www.thestudentroom.co.uk/attachment.php?attachmentid=23571&d=1148396387, 6: , Http://www.ics.uci.edu/~eppstein/161/960206.html, 7: , Http://www.swarmintelligence.org/tutorials.php, 8: Qi Shen, Jian-Hui Jiang, Chen-Xu Jiao, Shuang-Yan Huan, Guo-li Shen, and Ru-Qin Yu, Optimized partition of minimum spanning tree for piecewise modeling by particle swarm algorithm, 2004 9: , Http://en.wikipedia.org/wiki/particle_swarm_optimization, 10: Ammar W. Mohemmed, Nirod Chandra Sahoo& Tim Kim Geok, Solving shortest path problem using particle swarm optimization, 2008 11: James Kennedy & Russell Eberhart, Particle swarm optimization, 1995 12: Han Huang Z.H., Particle swarm optimization algorithm for transportation problems, 2009 10 © 2012
9cs.NE
A Space-Efficient Approach towards Distantly Homologous Protein Similarity Searches Akash Nag* Sunil Karforma Department of Computer Science The University of Burdwan Burdwan, West Bengal, India 713104 E-mail: [email protected] Department of Computer Science The University of Burdwan Burdwan, West Bengal, India 713104 E-mail: [email protected] Abstract: Protein similarity searches are a routine job for molecular biologists where a query sequence of amino acids needs to be compared and ranked against an ever-growing database of proteins. All available algorithms in this field can be grouped into two categories – either solving the problem using sequence alignment through dynamic programming, or, employing certain heuristic measures to perform an initial screening followed by applying an optimal sequence alignment algorithm to the closest matching candidates. While the first approach suffers from huge time and space demands, the latter approach might miss some protein sequences which are distantly related to the query sequence. In this paper, we propose a heuristic pair-wise sequence alignment algorithm that can be efficiently employed for protein database searches for moderately sized databases. The proposed algorithm is sufficiently fast to be applicable to database searches for short query sequences, has constant auxiliary space requirements, produces good alignments, and is sensitive enough to return even distantly related protein chains that might be of interest. Keywords: sequence alignment, protein similarity search, heuristic algorithm, protein database, bioinformatics I. INTRODUCTION During the past three decades, there has been a plethora of sequence alignment algorithms that have aimed at making the job of biologists easier by helping to identify homologies between two protein sequences, thus eventually establishing their phylogeny. Most of these algorithms can be divided into two categories based on the algorithmic approach adopted – those based on dynamic programming (DP); and those based on heuristics. Though sequence alignments are often quite useful, their primary usefulness stems from database searches. Often the purpose of a gene can be inferred from finding other genes (whose purpose is already known) which are similar to this gene, by searching through a genomic database [1]. The DP based approach is more accurate, but time consuming; and provides an optimal alignment between two sequences. However, they suffer from their huge demands of time and space, which often make them impractical for database searches. On the other hand, heuristic algorithms are blazingly fast and hence perfectly suited for database searches; however, heuristics do not produce optimal results and hence, often miss out on potential matches. In this paper, we propose a heuristic algorithm that strikes a balance between accuracy and rapid search, by reporting even distantly homologous sequences and finding out good alignments between two protein sequences. The algorithm is well suited for searching short query sequences in moderate sized databases like Swiss-Prot [2] within acceptable time limits. The novelty of the algorithm lies in its constant auxiliary space complexity. II. PRIOR WORK The first dynamic programming algorithm for optimal global sequence alignment was presented by Needleman and Wunsch [3] in their landmark paper in 1970. They introduced the notions of gap penalties and alignment scores – critical concepts for developments that were to come later. Since then, there has been several developments in this regard, the most popular being an improvement of their work by Smith and Waterman [4] that led to local alignments rather than global alignments, which were biologically more relevant. Both these algorithms were optimal, i.e. they return the best possible alignment between two sequences, dependent on the gap penalties used. The primary drawbacks of the Smith-Waterman algorithm are its space and time complexity, the latter being O(M2N), with M and N being the lengths of the two protein sequences being aligned. Osamu Gotoh [5] improved the algorithm by reducing its time complexity down to O(M.N), which, however, was still too slow to be effectively used for database searches. Altschul and Erickson [6] tweaked the algorithm further to incorporate affine gap costs which resulted in more meaningful alignments. They also suggested that the M × N dynamic programming matrix can be reduced to just two one-dimensional arrays to improve the space requirements of the algorithm. This latter idea was materialized by Myers and Miller [7] in 1988. Despite the various improvements to the Smith-Waterman dynamic programming algorithm, its time complexity was too high for it to be successfully used for database searches. Despite this, the algorithm was actually used by biologists for years before finally the heuristic algorithms took over. The first popular heuristic algorithm to be successfully used for database search was the FASTA algorithm by Lipman and Pearson [8] [9]. Unlike the Smith-Waterman algorithm which was a sequence alignment algorithm, the FASTA algorithm was tailor-made for database searches. It reduced search times by leaps and bounds, and quickly became extremely popular with the biological community, and is still being used by biologists through the EMBL-EBI web service. However, the most important development came with the advent of BLAST [10] that revolutionized database search. BLAST was not only faster than all its predecessors, it was blazingly fast and for the first time, protein database search was no longer a waiting game. However, BLAST is effective in finding only ungapped alignments; hence gapped-BLAST [11] was designed, which is three times faster than its predecessor. A decade later, BLAT [12] came on the scene promising even faster alignments and searches, but BLAST continued to be the de facto database search tool within the community, primarily due to two limitations of BLAT: its requirement of a huge index; and its inability to accurately search sequences with lower than 80% match. An excellent comparison between the Smith-Waterman, FASTA and BLAST algorithms were presented by Pearson [13], and Shpaer et al. [14]; the latter conclusively showed that BLAST, though being the fastest is not accurate enough and often missed out on distant similarity between protein sequences. c) MinFactor: It is the lower bound on the size of the sub-sequence chosen in each step, ranging between 0 and 1. III. THE PROPOSED ALGORITHM A. Introduction In this paper, we propose a randomized heuristic algorithm suitable for protein database searches that is extremely spaceefficient and sensitive enough to detect even distant similarity between sequences. The two primary advantages of our algorithm over BLAST are: a) It has a constant auxiliary space complexity as compared to BLAST’s O(M.N) auxiliary space complexity. b) It reports even distantly homologous proteins that BLAST misses out on. Our algorithm is highly customizable, with intuitive parameters that can be tweaked for best performance. It is driven by the BLOSUM62 scoring matrix, but can be made to work with any other matrix as well by appropriately changing gap penalties in accordance. B. The Algorithm The algorithm is primarily a pair-wise sequence alignment algorithm, and it will be discussed in the alignment context first. In Section B.3, we present the changes necessary for it to be adapted to database searches. B.1 Parameters Three types of gap penalties are used in this algorithm, which employs affine gap penalties: a) Periphery Gap Penalty (PGP): This refers to all leading and trailing gaps, and can be set to 0 for local alignments or can be set appropriately for global and semiglobal alignments. b) Gap Opening Penalty (GOP): This refers to the introduction or start of a new gap run. It is generally set higher as indel events are rare in nature, and even when they do occur, short insertions or deletions in protein chains are rarer than larger ones. c) Gap Extension Penalty (GEP): This refers to the extension of an already continuing gap run. Due to affine gap penalties being used, the algorithm penalizes short gap runs more than longer ones, in accordance with results seen in nature. The algorithm takes four other parameters as defined below: a) Rounds: The algorithm, being a randomized algorithm performs the same alignment several times, dictated by the Rounds parameter. E.g. If Rounds=10, each alignment is performed 10 times and the best scoring alignment is chosen from these 10 alignments. Increasing the number of rounds leads to better alignments at the cost of time. b) LFactor and SFactor: The algorithm, in each step, takes a sub-sequence of the sequences and tries to align them. The length of the sub-sequence chosen is dependent on these two factors, where L and S refer to “large” and “small” respectively after the length of the two sequences (If the sequences are of equal size, the distinction is arbitrary). Both these factors range between 0 and 1. For optimum results, SFactor must be less than LFactor (e.g. SFactor=0.5, LFactor=1). A lower SFactor leads to selection of smaller portions of the smaller sequence, and a large LFactor leads to alignment with a maximal portion of the larger sequence. B.2 Method The basic structure of the algorithm is presented in Fig. 1. The algorithm performs each alignment several times as dictated by the Rounds parameter. In each round, two random numbers, each between MinFactor and 1, are selected. These two values determine the sub-sequence size to be used for this round’s alignment. The alignment is then performed using these parameters and the alignment with the highest score is returned. The actual alignment has two sub-phases: a. Chopping up the sequence into sub-sequences b. Aligning each pair of sub-sequences (one from each sequence) against each other The first phase is performed by the Align procedure in the algorithm, which randomly selects a subsequence from each sequence based on the parameters. These are then passed onto the subsequence alignment procedure. When the best alignment is returned, the actual subsequence used up in the alignment is then discarded. It is to be noted that it may so happen that the whole subsequence may not be actually used in an alignment stage. Only the portion of the sequence actually used, is deleted from the original sequence. The process continues till either of the sequences is exhausted, following which the other sequence is appended normally to get the aligned pair. The subsequence alignment phase is performed by the getBestSubsequenceAlignment procedure in the algorithm. This is the heart of the algorithm where the actual alignment occurs. It slides one sequence against another sequence from one terminal to the other terminal with minimum overlap of 1 amino-acid. It then finds the alignment score (using the getVirtualAlignmentScore procedure) at each sliding-point, and then returns the shift at which the best score was obtained. The score is calculated based on the BLOSUM62 matrix. The process is illustrated in Fig. 2. Here we see two subsequences are being aligned with all possible shifts. The best shift occurs when the 2nd sub-sequence is shifted left 2 places. After the best alignment is selected, the used and unused portions are determined. From Fig. 2 we see that the last two amino-acids do not contribute to the alignment and hence remain unused. Therefore, these are returned back to the original sequences, while the preceding amino-acids are deleted from the original sequence. B.3 Optimizations for use in database search The proposed algorithm in its presented form is too slow to be used in database search. Several optimizations are necessary for it to be successfully used for searching protein databases. The following are the optimizations applied when the algorithm is used for searching: a) The Rounds parameter is set to 1, in the procedure AlignSequences b) In the procedure getBestAlignment, the start and end parameters are set as follows: start=length(small)-1, end=length(large)-1. This has the effect of grading only those alignments in which the larger subsequence does not have any gaps. B.4 Peformance The novelty of the proposed algorithm is in its constant auxiliary space complexity, and hence is very suitable for implementations under critical memory constraints. Since this is a randomized algorithm, its time complexity is dependent on the parameters used. The choice of parameters shall dictate the subsequence size used for the actual shifting alignment phase. Consider a pair-wise alignment where the larger peptide consists of M amino-acids. Let the average sub-sequence size chosen be L and the number of rounds is R. Then, the total time M  . 2 L2  . Hence, the time L  taken by the algorithm is: R.    complexity is of the order of O(R.M.L), and the time complexity for database search is O(N.M.L) where N is the total number of sequences in the database (and since R=1 when used for searching). A comparison between the complexities of the proposed algorithm with other well known sequence alignment algorithms, are presented in Table I. B.5 Scoring matrix, implementation and testing methodology The scoring matrix used in our algorithm was BLOSUM62. The protein database used for testing was UniProt-SwissProt containing 547,085 protein sequences in the standard FASTA file format. The algorithm was implemented in Java 8, under Windows/Intel-Dual-Core 2.3GHz. IV. RESULTS The algorithm was tested for short query sequences up to 30 amino acids in length, with Periphery_Gap_Penalty=0, Gap_Opening_Penalty=10, Gap_Extension_Penalty=5, LFactor=0.5, SFactor=1, and MinFactor=0.5. The database contained 547,085 sequences. On average, a 30-amino-acid long peptide, when searched against the SwissProt database, with appropriately set threshold score, was completed in 197 seconds. Although the algorithm may seem drastically slow with respect to BLAST, it returned a large number of matches which BLAST missed when the threshold score was set appropriately. The algorithm is however several times faster than the Smith-Waterman algorithm. Table I. Figure 1. The Proposed Algorithm Time Complexities of Sequence Alignment Algorithms Algorithm Time Complexity Auxiliary Space Complexity Needleman-Wunsch O(M.N) O(M.N) Smith-Waterman O(M.N) O(M.N) Smith-Waterman (with Hirschberg improvement) FASTA O(M.N) O(N) O(M.N) O(M.N) W BLAST O(M.N+N.20 ) O(M.N+20W) Proposed algorithm O(R.W.MAX(M,N)) O(1) Presented above is a comparison between the time and space complexities of various sequence alignment algorithms for aligning two protein sequences consisting of M and N amino acids respectively [15]. W refers to the length of short sequences selected from the input sequence for alignment, and R refers to the value of the user-parameter ROUNDS. Figure 2. A Sample Alignment V. CONCLUSIONS The algorithm we presented in this paper is a big step forward for implementations requiring a low memory footprint. The algorithm in its present form is suitable for searching small databases only like SwissProt. With implementations in SIMD environments and further optimizations, we believe that this algorithm can be successfully used for searching large databases as well, especially when distant relationships need to be uncovered and where space constraints are acute. BLAST and gapped BLAST fail when searching distantly homologous sequences, and both are also heavy on memory requirements. And even though, the proposed algorithm is a heuristic one, the randomization adequately compensates for the lack in accuracy, as was evident during our sequence alignment tests with number of rounds set to 20. It also has a very small memory footprint, and is orders of magnitude faster than the Smith-Waterman algorithm. For largely homologous sequences however, BLAST is still the best algorithm out there for database searching. VI. [5] [6] [7] [8] [9] [10] [11] REFERENCES Krane, Dan E., and Raymer, Michael L. “Fundamental Concepts of Bioinformatics”. Pearson. (2006): pp. 48. [2] Baxevanis, Andreas D., and Ouellette, B. F. Francis. “Bioinformatics: A Practical Guide to the Analysis of Genes and Proteins”. John Wiley & Sons Inc. (2006): pp. 18-19. [3] Needleman, Saul B., and Christian D. Wunsch. "A general method applicable to the search for similarities in the amino acid sequence of two proteins." Journal of molecular biology 48.3 (1970): 443-453. [1] [4] [12] [13] [14] [15] Smith, Temple F., and Michael S. Waterman. "Identification of common molecular subsequences." Journal of molecular biology 147.1 (1981): 195-197. Gotoh, Osamu. "An improved algorithm for matching biological sequences." Journal of molecular biology 162.3 (1982): 705-708. Altschul, Stephen F., and Bruce W. Erickson. "Optimal sequence alignment using affine gap costs." Bulletin of mathematical biology 48.5-6 (1986): 603-616. Myers, Eugene W., and Webb Miller. "Optimal alignments in linear space." Computer applications in the biosciences: CABIOS 4.1 (1988): 11-17. Lipman, David J., and William R. Pearson. "Rapid and sensitive protein similarity searches." Science 227.4693 (1985): 14351441. Pearson, William R., and David J. Lipman. "Improved tools for biological sequence comparison." Proceedings of the National Academy of Sciences 85.8 (1988): 2444-2448. Altschul, Stephen F., et al. "Basic local alignment search tool." Journal of molecular biology 215.3 (1990): 403-410. Zhang, Zheng, Webb Miller, and David J. Lipman. "Gapped BLAST and PSI-BLAST: a new generation of protein database search programs." Nucleic Acids Research 25.0 (1997): 17. Kent, W. James. "BLAT—the BLAST-like alignment tool." Genome research 12.4 (2002): 656-664. Pearson, William R. "Comparison of methods for searching protein sequence databases." Protein Science 4.6 (1995): 11451160. Shpaer, Eugene G., et al. "Sensitivity and selectivity in protein similarity searches: a comparison of Smith–Waterman in hardware to blast and fasta." Genomics 38.2 (1996): 179-191. Chan, Alexander. "An Analysis of Pairwise Sequence Alignment Algorithm Complexities: Needleman-Wunsch, Smith-Waterman, FASTA, BLAST and Gapped BLAST."
5cs.CE
arXiv:1511.03991v2 [math.AC] 2 Dec 2015 REALIZABILITY AND THE AVRUNIN-SCOTT THEOREM FOR HIGHER-ORDER SUPPORT VARIETIES PETTER ANDREAS BERGH & DAVID A. JORGENSEN Abstract. We introduce higher-order support varieties for pairs of modules over a commutative local complete intersection ring, and give a complete description of which varieties occur as such support varieties. In the context of a group algebra of a finite elementary abelian group, we also prove a higherorder Avrunin-Scott-type theorem, linking higher-order support varieties and higher-order rank varieties for pairs of modules. 1. Introduction Support varieties for modules over commutative local complete intersections were introduced in [A] and [AB], inspired by the cohomological varieties of modules over group algebras of finite groups. These geometric invariants encode several homological properties of the modules. For example, the dimension of the variety of a module equals its complexity. In particular, a module has finite projective dimension if and only if its support variety is trivial. In this paper, we define higher-order support varieties for pairs of modules over complete intersections. These varieties are defined in terms of Grassmann varieties of subspaces of the canonical vector space associated to the defining regular sequence of the complete intersection. Thus, for a fixed dimension d, the support varieties of order d are subsets of the Grassmann variety of d-dimensional subspaces of the c canonical vector space, under a Plücker embedding into P(d)−1 . For d = 1, we recover the classical support varieties: the varieties of order 1 are precisely the projectivizations of the support varieties defined in [AB]. We show that several of the results that hold for classical support varieties also hold for the higher-order varieties. Among these is the realizability result: we give a complete description of the closed subsets of the Grassmann variety that occur as higher-order support varieties. We also prove a higher-order AvruninScott result for group algebras of finite elementary abelian groups. Namely, we extend the notion of r-rank varieties from [CFP] to higher-order rank varieties of pairs of modules and show that these varieties are isomorphic to the higher-order support varieties. In Section 2 we give our definition of higher-order support varieties, and prove some of their elementary properties. In particular, we show that they are welldefined, independent of the choice of corresponding intermediate complete intersection, and are in fact closed subsets of the Grassmann variety. In Section 3 we discuss 2010 Mathematics Subject Classification. 13D02, 13D07, 16S34, 20C05. Key words and phrases. Complete intersections, support varieties. Part of this work was done while we were visiting the Mittag-Leffler Institute in February and March 2015. We would like to thank the organizers of the Representation Theory program. 1 2 PETTER ANDREAS BERGH & DAVID A. JORGENSEN the realizability question, and in Section 4 we prove the higher-order Avrunin-Scott result. 2. Higher-order support varieties In this section and the next, we fix a regular local ring (Q, n, k) and an ideal I generated by a regular sequence of length c contained in n2 . We denote by R the complete intersection ring R = Q/I, and by V the k-vector space V = I/ n I. For an element f ∈ I, we let f denote its image in V . If the codimension of the complete intersection R = Q/I is at least 2, then V has dimension at least 2, and it makes sense to consider subspaces W of V . Each such subspace has many corresponding complete intersections, in the following sense: if W is a subspace of V , then choosing preimages in I of a basis of W we obtain another regular sequence [BrH, Theorem 2.1.2(c,d)], and the ideal J ⊆ I it generates. We thus get natural projections of complete intersections Q → Q/J → R. We call Q/J a complete intersection intermediate to Q and R, or when the context is clear, simply an intermediate complete intersection. We now give our definition of higher-order support variety. We fix a basis of V , and let Gd (V ) denote the Grassmann variety of dth order subspaces of V under the c Plücker embedding into P(d)−1 with respect to the chosen basis of V . Definition 2.1. We set VRd (M, N ) = {pW ∈ Gd (V ) | ExtiQ/J (M, N ) 6= 0 for infinitely many i}, where W is a dth order subspace of V , pW is the corresponding point in the Grassmann variety Gd (V ), and Q/J is an intermediate complete intersection corresponding to W . We also define VdR (M ) = VdR (M, k). Remark. We note that V1R (M, N ) is the projectivization of the affine support variety VR (M, N ) defined in [AB]. There are two aspects of the definition which warrant further discussion. (1) The definition is independent of the chosen intermediate complete intersection Q/J corresponding to W , and (2) VdR (M, N ) is a closed set in Gd (V ). We next give proofs of these two statements. Let Q/J and Q/J ′ be two complete intersections intermediate to Q and R. The condition that (J + n I)/ n I = (J ′ + n I)/ n I in V defines an equivalence relation on the set of such intermediate complete intersections. The following result addresses (1) above. Proposition 2.2. Suppose that Q/J and Q/J ′ are equivalent complete intersections intermediate to Q and R, that is, (J + n I)/ n I = (J ′ + n I)/ n I in V . Then for all finitely generated R-modules M and N one has ExtiQ/J (M, N ) = 0 for all i ≫ 0 if and only if ExtiQ/J ′ (M, N ) = 0 for all i ≫ 0. HIGHER-ORDER SUPPORT VARIETIES 3 Proof. Let W = (J + n I)/ n I and consider the natural map of k-vector spaces ϕJ : J/ n J → W ⊆ V defined by f +n J 7→ f +n I. This is an isomorphism: it is onto by construction, and one-to-one since J ∩n I = n J. The condition that (J +n I)/ n I = (J ′ +n I)/ n I is equivalent to ϕJ (J/ n J) = ϕJ ′ (J ′ / n J ′ ). By [BeJ, Proposition 3.2], one has the equality ϕJ (VQ/J (M, N )) = ϕJ ′ (VQ/J ′ (M, N )), where VQ/J (M, N ) denotes the affine support variety of M and N over the complete intersection Q/J. By [AB, Proposition 2.4(1) and Theorem 2.5] one has that ExtiQ/J (M, N ) = 0 for all i ≫ 0 if and only if VQ/J (M, N ) = {0}. The same holds over Q/J ′ , and thus the result follows by the injectivity of ϕJ .  Next, we address the second point in the remark. Proposition 2.3. For all finitely generated R-modules M and N one has that VdR (M, N ) is a closed set in Gd (V ). Proof. This result follows from an incidence correspondence (see, for example, [Ha, Example 6.14]), as we now describe. Set Γ = {(pW , x) ∈ Gd (V ) × G1 (V ) | x ∈ W ∩ V1R (M, N )}. Since Γ is an incidence correspondence, it is a closed subset of the product space Gd (V ) × G1 (V ). We have the two natural projections Gd (V ) × G1 (V ) ❍❍ ✈ ❍❍ π′ π ✈✈✈ ❍❍ ✈ ❍❍ ✈ ✈ ❍## {{✈✈ Gd (V ) G1 (V ) Now by classical results from elimination theory (see, for example, [E, Theorem 14.1]), the image of Γ under π is closed in Gd (V ). It suffices now to show that π(Γ) = VdR (M, N ). We have pW ∈ π(Γ) if and only if x ∈ V1R (M, N ) for some x ∈ W . This is equivalent to ExtiQ/(f ) (M, N ) 6= 0 for infinitely many i and for some f ∈ I with f = x ∈ W . By [AB, Proposition 2.4(1) and Theorem 2.5], this condition is the same as ExtiQ/J (M, N ) 6= 0 for infinitely many i. By definition, this happens if and only if pW ∈ VdR (M, N ).  Remark. (1) Let T = {(pW , x) ∈ Gd (V ) × G1 (V ) | x ∈ W }. Then the map τ : T → Gd (V ) given by τ (pW , x) = pW is the tautological bundle over the Grassmann variety Gd (V ). For Γ as in the proof of Proposition 2.3, we have Γ ⊆ T , and τ (Γ) = VdR (M, N ). Thus VdR (M, N ) may be interpreted as the image under the tautological bundle of the fiber of V1R (M, N ) in T . (2) In the definition of VdR (M, N ), a specific basis of V was chosen. We remark that the definition is independent of the choice of basis, in the sense that if another basis of V is chosen, then the two higher-order support varieties are isomorphic. Indeed, this is true for the first order affine varieties VR (M, N ) by [AB, Remark 2.3]. It then follows that the same is true for the projectivizations V1R (M, N ), namely, there is an automorphism ξ : G1 (V ) → G1 (V ) such that if V1R (M, N ) is the support variety with respect to the first basis, and V1R (M, N )′ is the support variety with respect to the second, then ξ(V1R (M, N )) = V1R (M, N )′ . The general result for the higher-order support varieties follows from the incidence correspondence from the proof above. 4 PETTER ANDREAS BERGH & DAVID A. JORGENSEN We now give basic properties of higher-order support varieties, akin to those of the one-dimensional affine support varieties. Theorem 2.4. The following hold for finitely generated R-modules M and N . (1) VdR (k) = Gd (V ). (2) VdR (M, N ) = VdR (N, M ). For d = 1, we moreover have V1R (M, N ) = V1R (M ) ∩ V1R (N ). (3) VdR (M, M ) = VdR (k, M ) = VdR (M ). (4) If M ′ is a syzygy of M and N ′ is a syzygy of N , then VdR (M, N ) = VdR (M ′ , N ′ ). (5) If 0 → M1 → M2 → M3 → 0 and 0 → N1 → N2 → N3 → 0 are short exact sequences of finitely generated R-modules, then for {h, i, j} = {1, 2, 3} there are inclusions VdR (Mh , N ) ⊆ VdR (Mi , N ) ∪ VdR (Mj , N ); VdR (M, Nh ) ⊆ VdR (M, Ni ) ∪ VdR (M, Nj ). (6) If M is Cohen-Macaulay of codimension m, then VdR (M ) = VdR (Extm R (M, R)). In particular, if M is a maximal Cohen-Macaulay R-module, then VdR (M ) = VdR (HomR (M, R)). (7) If x1 , . . . , xd is an M -regular sequence, then VdR (M ) = VdR (M/(x1 , . . . , xd )M ). Proof. The proof of properties (1)–(7) for the affine one-dimensional support varieties VR (M, N ) are given in [AB] (see also [BeJ].) Since V1R (M, N ) is simply the projectivization of VR (M, N ), the same properties also hold for these varieties. Finally, properties (1)–(7) for d > 1 follow from the d = 1 case, as we now indicate. For a subset X of G1 (V ), we let Γ(X) = {(pW , x) ∈ Gd (V ) × G1 (V ) | x ∈ W ∩ X}. The proofs make repeated use of the fact that VdR (M, N ) = π(Γ(V1R (M, N ))), where π is as in the proof of Proposition 2.3. For example, for (1) we have VdR (k) = π(Γ(V1R (k))) = π(G1 (V )) = Gd (V ). 1 1 1 For (2), we use the fact that V1R (M, ) ∩ V R (N ) = VR (N, M ). N ) = VR (M d 1 1 d Therefore VR (M, N ) = π Γ VR (M, N ) = π Γ VR (N, M ) = VR (N, M ) To prove (3), we use the equalities VdR (M, M ) = π(Γ(V1R (M, M ))) = π(Γ(V1R (k, M ))) = VdR (k, M ). The remaining equality and (4) are proved similarly. To prove (5), we use the fact that for subsets X and Y of G1 (V ) one has Γ(X ∪ Y ) = Γ(X) ∪ Γ(Y ). (We also use the fact that π preserves unions, and both π and Γ preserve containment.) Therefore VdR (Mh , N ) = π(Γ(V1R (Mh , N ))) ⊆ π(Γ(V1R (Mi , N ) ∪ V1R (Mj , N ))) = π(Γ(V1R (Mi , N ))) ∪ π(Γ(VR1 (Mj , N ))) = VdR (Mi , N ) ∪ VdR (Mj , N ). HIGHER-ORDER SUPPORT VARIETIES 5 The proofs of (6) and (7) are analogous to the proofs of [AB, Theorem 5.6(10)] and [AI, 7.4] (see also [BeJ, Theorem 2.2(7) and (8)].)  We can extend Proposition 2.4(1) of [AB], to a sort of generalized Dade’s Lemma, in the projective context. Proposition 2.5. Fix 1 ≤ d ≤ c. Then ExtiR (M, N ) = 0 for all i ≫ 0 if and only if VdR (M, N ) = ∅. Proof. By [AB, Proposition 2.4(1) and Theorem 2.5], ExtiR (M, N ) = 0 for all i ≫ 0 if and only if V1R (M, N ) = ∅. The latter holds if and only if Γ = Γ(V1R (M, N )) = ∅, which in turn holds if and only if VdR (M, N ) = π(Γ) = ∅, where Γ and π are from the proof of Proposition 2.3.  3. Realizability In this section we give a complete description of which closed subsets of Gd (V ) can possibly occur as the dth order support variety VdR (M, N ) of a pair of finitely generated R-modules (M, N ). The basis of the description is the following result in the first order case. Theorem 3.1. Every closed subset of G1 (V ) is the support variety of some finitely generated R-module. Specifically, if Z is a closed subset of G1 (V ), then there exists a finitely generated R-module M such that Z = V1R (M, k). Proof. This is well-known in the affine case, see, for example, [Be]. Since every closed set in G1 (V ) is the projectivization of a cone in V , and V1R (M, N ) is the projectivization of VR (M, N ), the result follows.  The framework of the proof of Proposition 2.3 allows us to complete the description of realizable higher-order varieties. Recall that π denotes the projection map Gd (V ) × G1 (V ) → Gd (V ). Theorem 3.2. For a closed subset Z of G1 (V ), set Γ(Z) = {(pW , x) ∈ Gd (V ) × G1 (V ) | x ∈ W ∩ Z}. Let Y be a closed subset of Gd (V ). Then Y = VdR (M, N ) for a pair of finitely generated R-modules (M, N ) if and only if Y = π(Γ(Z)) for some closed subset Z of G1 (V ). Proof. Suppose that Y = VdR (M, N ) for a pair of finitely generated R-modules (M, N ). Then the proof of Proposition 2.3 shows that Y = π(Γ(V 1R (M, N ))). Conversely, suppose that Y = π(Γ(Z)) for some closed subset Z of G1 (V ). Then Theorem 3.1 shows that Z = V1R (M, N ) for some pair of finitely generated Rmodules (M, N ). Thus Y = π(Γ(V 1R (M, N ))) = VdR (M, N ), again from the proof of Proposition 2.3.  Theorem 3.2 shows that, in contrast to first order support varieties, the realizability of varieties in Gd (V ) for d > 1 as dth order support varieties of a pair of finitely generated R-modules is more restrictive. Indeed, consider a smallest nontrivial first order support variety V1R (M, N ), namely, one consisting of a single point x. Then VdR (M, N ) consists of all d-dimensional planes in V containing x. Changing the basis of V if necessary, we can assume that x = (1, 0, . . . , 0) ∈ G1 (V ). Then there is an obvious bijective correspondence between d-dimensional subspaces of V 6 PETTER ANDREAS BERGH & DAVID A. JORGENSEN containing x, and (d − 1)-dimensional subspaces of a (c − 1)-dimensional k-vector space. Thus dim VdR (M, N ) = dim Gd−1 (k c−1 ) = (d − 1)(c − d). In particular, we have dim Vc−1 R (M, N ) = c − 2, which is of codimension one in Gc−1 (V ), and this is when V1R (M, N ) is nontrivially as small as possible. The following example illustrates the previous discussion. Example. Let k be a field (of arbitrary characteristic), and Q = k[[x1 , . . . , xc ]]. Then Q is a regular local ring with maximal ideal n = (x1 , . . . , xc ). For I = (x21 , . . . , x2c ), the quotient ring R = Q/I is a codimension c complete intersection. Let M = R/(x1 ). Then it is not hard to show that relative to the basis x21 , . . . , x2c of V = I/ n I, the one-dimensional support variety of M is V1R (M, k) = {(1, 0, . . . , 0)}. Thus we have dim VdR (M, k) = (d − 1)(c − d), for 1 ≤ d ≤ c − 1. 4. Higher-order rank varieties and a higher-order Avrunin-Scott Theorem In this final section we consider complete intersections of a special form, namely, those which arise as the group algebra kE of a finite elementary abelian p-group E, where k has characteristic p. In this case one has p kE ∼ = k[x1 , . . . , xc ]/(x , . . . , xp ). 1 c Note that by assigning deg xi = 1 for 1 ≤ i ≤ c, the k-algebra kE is standardgraded. We let kE1 denote the degree-one component of kE; this is a k-vector space of dimension c. For any linear form u of kE1 one has up = 0, and thus the subalgebra k[u] of kE generated by u is isomorphic to k[x]/(xp ) (for x an indeterminate). Since k[u] is a principal ideal ring, every finitely generated k[u]module is a direct sum of a free module and a torsion module. Recall from [C] that the rank variety WE (M ) of a kE-module M is the set of those linear forms u ∈ kE1 such that the torsion part of M as a k[u]-module is nonzero. It was conjectured by Carlson [C] and subsequently proven by Avrunin and Scott [AvS] that the rank variety and the group cohomological support variety VkE (M ) of a kE-module agree. Recall that I denotes the ideal (xp1 , . . . , xpc ), and V the k-vector space I/ n I, where n is the maximal ideal (x1 , . . . , xc ). We now want to show that the classical Avrunin-Scott theorem mentioned above is a special case of a more general result involving the higher-order varieties. We generalize the definition of dth order rank varieties from [CFP] (which they call d-rank varieties) to dth order rank varieties WdE (M, N ) of pairs of modules (M, N ). Fix a basis of kE1 , and consider the Grassmann variety Gd (kE1 ) of d-dimensional subspaces of kE1 under the Plücker c embedding into P(d)−1 with respect to the chosen basis. Definition 4.1. We set WdE (M, N ) = {pW ∈ Gd (kE1 ) | Extik[W ] (M, N ) 6= 0 for infinitely many i} where Gd (kE1 ) is the Grassmann variety of d-dimensional subspaces of kE1 , pW is the point in Gd (kE1 ) corresponding to the d-dimensional subspace W , and k[W ] is the subalgebra of kE generated by W . Consider the Frobenius isomorphism Φ : k → k given by Φ(a) = ap . We have a Φ-equivariant isomorphism of k-vector spaces α : kE1 → V HIGHER-ORDER SUPPORT VARIETIES 7 defined as follows. For u ∈ kE1 , we choose a preimage u e in Q, and then we set α(u) = u ep + n I ∈ V . It is clear that α is a Φ-equivariant homomorphism of k-vector spaces, which is defined independent of the choice of preimage. Since k is algebraically closed, it contains pth roots, and therefore α is onto. Since dim kE1 = dim V , α is also one-to-one. Taking as a basis for V the image under α of the chosen basis of kE1 , we obtain an induced Φ-equivariant isomorphism of Grassmann varieties β : Gd (kE1 ) → Gd (V ) with respect to these bases. Specifically, let pW be a point in Gd (kE1 ), and W the f p denote the ideal of Q generated associated d-dimensional subspace of kE1 . Let W by the pth powers of linear preimages in Q of a basis of W . Then β(pW ) is the point in Gd (V ) (with respect to the chosen basis of V ) corresponding to the subspace f p + n I/ n I. W Theorem 4.2. Given finitely generated kE-modules M and N , one has β(WdE (M, N )) = VdkE (M, N ). The proof relies on the following lemma, which is a statement extracted from the proof of [A, Theorem (7.5)]. For completeness we include the proof here. For any non-zero linear form u ∈ kE1 we choose a preimage u e in Q = k[x1 , . . . , xc ], which is also a linear form, and define a homomorphism from µ : k[u] → Q/(e up ) by p p sending u to u e + (e u ). Note that Q/(e u ) is free when regarded as module over k[u] via µ. We have the commutative diagram of ring homomorphisms Q/(e up ) ;; ✇ µ ✇✇ ✇✇ ✇ ✇ ✇   // kE k[u] where the vertical map is the natural projection. In particular, the action of k[u] on a kE-module M factors through µ. Lemma 4.3. Let M be a finitely generated kE-module. Then M has finite projective dimension over k[u] if and only if it has finite projective dimension over Q/(e up ). Proof. The proof follows part of that of [A, Theorem (7.5)]. Suppose that M has finite projective dimension over Q/(e up ). Since Q/(e up ) is free over k[u] any free p resolution of M over Q/(e u ) is also one of M over k[u]. Thus M has a finite free resolution over k[u]. Conversely, suppose M is free as a k[u]-module. Let F be a minimal free resolution of M over Q/(e up ). Since F is also a free resolution of M over k[u] and k[u] Tori (M, k) = 0 for all i > 0, we see that F ⊗k[u] k is a minimal free resolution of M ⊗k[u] k over Q/(e up ) ⊗k[u] k ∼ u). Since Q/(e u) is regular and F ⊗k[u] k is a = Q/(e minimal, we must have that Fc ⊗k[u] k = 0, and this implies Fc = 0. Thus F is a finite free resolution, and so M has finite projective dimension over Q/(e u).  We now give a proof of Theorem 4.2. Proof. Suppose that pW ∈ WdE (M, N ). Then by definition there exist infinitely many nonzero Extik[W ] (M, N ). Therefore, by Dade’s Lemma, there exist infinitely 8 PETTER ANDREAS BERGH & DAVID A. JORGENSEN nonzero Extik[u] (M, N ) for some linear form u ∈ W . Thus both M and N have infinite projective dimension over k[u]. Therefore, by the lemma, both M and N have infinite projective dimension over Q/(e up ), and so it follows from [AB, Proposition 5.12] that there exist infinitely many nonzero ExtiQ/(eup ) (M, N ). This implies f p represents that there exist infinitely many nonzero Exti fp (M, N ), where W Q/(W ) the ideal generated by the pth powers of linear preimages in Q of a basis of W . This gives β(pW ) ∈ VdkE (M, N ). For the reverse containment we just retrace our steps, noting that any f ∈ I is √ equivalent mod n I to an element of the form a1 xp1 + · · · + ac xpc = ( p a1 x1 + · · · + √ p ac xc )p , ai ∈ k, and hence it is clear how to employ the previous lemma.  References [A] [AB] [AI] [AvS] [Be] [BeJ] [BrH] [C] [CFP] [E] [Ha] L.L. Avramov, Modules of finite virtual projective dimension, Invent. Math. 96 (1989), no. 1, 71–101. L.L. Avramov, R.-O. Buchweitz, Support varieties and cohomology over complete intersections, Invent. Math. 142 (2000), no. 2, 285–318. L.L. Avramov, S. B. Iyengar, Constructing modules with prescribed cohomological support, Illinois J. Math. 51 (2007), no. 1, 1–20. G.S. Avrunin, L.L. Scott Quillen stratification for modules, Invent. Math. 66 (1982), no. 2, 277–286. P.A. Bergh On support varieties for modules over complete intersections, Proc. Amer. Math. Soc. 135 (2007), no. 12, 3795–3803. P.A. Bergh, D.A. Jorgensen Support varieties over complete intersections made easy, preprint. W. Bruns, J. Herzog Cohen-Macaulay Rings, Cambridge studies in advanced mathematics 39, Cambridge University Press, Cambridge, 1993. J.F. Carlson, The varieties and the cohomology ring of a module, J. Algebra 85 (1983), no. 1, 104–143. J.F. Carlson, E.M. Friedlander, J. Pevtsova Representations of elementary abelian p-groups and bundles on Grassmannians, Adv. Math. 229 (2012), no. 5, 2985–3051. D. Eisenbud, Commutative algebra, with a view toward algebraic geometry, Graduate Texts in Mathematics 150, Springer-Verlag, New York, 1995. J. Harris, Algebraic Geometry, a First Course Graduate Texts in Mathematics 133, Springer-Verlag, New York, 1992. Petter Andreas Bergh, Institutt for matematiske fag, NTNU, N-7491 Trondheim, Norway E-mail address: [email protected] David A. Jorgensen, Department of mathematics, University of Texas at Arlington, Arlington, TX 76019, USA E-mail address: [email protected]
0math.AC
CHOPtrey: contextual online polynomial extrapolation for enhanced multi-core co-simulation of complex systems∗ arXiv:1610.09261v2 [cs.SY] 5 Feb 2017 Abir Ben Khaled-El Feki1 , Laurent Duval1,2 , Cyril Faure3 , Daniel Simon4 , and Mongi Ben Gaid1 1 IFP Energies nouvelles, 1 et 4 avenue de Bois-Préau, 92852 Rueil-Malmaison, France 2 University Paris-Est, LIGM, ESIEE Paris, 93162 Noisy-le-Grand, France 3 CEA List, Nano-INNOV, 8 avenue de la Vauve, 91120 Palaiseau, France 4 INRIA and LIRMM - CAMIN team, 860 Rue Saint Priest, 34095 Montpellier Cedex 5, France February 7, 2017 Abstract The growing complexity of Cyber-Physical Systems (CPS), together with increasingly available parallelism provided by multi-core chips, fosters the parallelization of simulation. Simulation speed-ups are expected from co-simulation and parallelization based on model splitting into weak-coupled sub-models, as for instance in the framework of Functional Mockup Interface (FMI). However, slackened synchronization between sub-models and their associated solvers running in parallel introduces integration errors, which must be kept inside acceptable bounds. CHOPtrey denotes a forecasting framework enhancing the performance of complex system co-simulation, with a trivalent articulation. First, we consider the framework of a Computationally Hasty Online Prediction system (CHOPred). It allows to improve the trade-off between integration speed-ups, needing large communication steps, and simulation precision, needing frequent updates for model inputs. Second, smoothed adaptive forward prediction improves co-simulation accuracy. It is obtained by past-weighted extrapolation based on Causal Hopping Oblivious Polynomials (CHOPoly). And third, signal behavior is segmented to handle the discontinuities of the exchanged signals: the segmentation is performed in a Contextual & Hierarchical Ontology of Patterns (CHOPatt). Implementation strategies and simulation results demonstrate the framework ability to adaptively relax data communication constraints beyond synchronization points which sensibly accelerate simulation. The CHOPtrey framework extends the range of applications of standard Lagrange-type methods, often deemed unstable. The embedding of predictions in lag-dependent smoothing and discontinuity handling demonstrates its practical efficiency. Keywords: parallel simulation; Functional Mockup Interface; smoothed online prediction; causal polynomial extrapolation; context-based decision; internal combustion engine. ∗ Published in Simulation: Transactions of the Society for Modeling and Simulation International, 2017, http://dx.doi.org/ 10.1177/0037549716684026 1 1 Introduction Intricacy in engineered systems increases simulator complexity. However, most existing simulation softwares are currently unable to exploit multi-core platforms, as they rely on sequential Ordinary Differential Equations (ODE) and Differential Algebraic Equations (DAE) solvers. Co-simulation approaches can provide significant improvements by allowing to jointly simulate models coming from different areas, and to validate both individual behaviors and their interactions [1]. Different simulators may be exported from original authoring tools, for instance as Functional Mock-up Units (FMUs), and then imported in a cosimulation environment. Hence, they cooperate at run-time, thanks to Functional Mockup Interface (FMI) definitions [2] for their interfaces, and to the master algorithms of these environments. Co-simulation has shown an important potential for parallelization (see [3] for a review). Meanwhile, synchronization between the different sub-models is required due to their mutual dependencies. It avoids the propagation of numerical errors in simulation results and guarantees their correctness. Unfortunately, synchronization constraints also lead some processors into waiting periods and idle time. This decreases the potential efficiency of the threaded parallelism existing in multi-core platforms. To overcome this limitation and exploit the available parallelism more efficiently, the dependencies constraints between parallel sub-models should be relaxed as far as possible while preserving an acceptable accuracy of the simulation results. This can be performed by a well-grounded system decomposition, tailored to data dependency reduction between the sub-models. For instance, the method proposed in [4] for distributed simulation uses transmission line modeling (TLM) based on bilateral delay lines: decoupling points are chosen when variables change slowly and the time-step of the solver is relatively small. Unfortunately, perfect decoupling cannot often be reached and data dependencies still exist between the different blocks. Thus, tight synchronization is required between blocks using small communication steps. This greatly limits the possibilities to accelerate the simulation and eventually reach the real-time. We propose in this work a Computationally Hasty Online Prediction framework (CHOPred) to stretch out synchronization steps with negligible precision changes in the simulation, at low-complexity. It is based on a Contextual & Hierarchical Ontology of Patterns (CHOPatt) that selects appropriate Causal Hopping Oblivious Polynomials (CHOPoly) for signal forecasting, allowing data exchange between sub-models beyond synchronization points. This paper is organized as follows. We first review challenges as well as related work and summarize contributions in Section 2. Section 3 presents a formal model of a hybrid dynamical system and the motivations for twined parallel simulation and extrapolation. The background on prediction and the proposed Causal Hopping Oblivious Polynomials (CHOPoly) are developed in Section 4, with details in A. Then, the principles of the Contextual & Hierarchical Ontology of Patterns (CHOPatt) for the management of hybrid models are exposed in Section 5. Finally, the methodology’s performance is assessed in Section 7 using an internal combustion engine model described in Section 6. 2 Related work and contributions The continuous systems usually attain high integration speeds with variable-step solvers. The major challenge for hybrid systems resides in their numerous discontinuities that prevent similar performance. Since we are especially interested in modular co-simulation [3], it is shown in [5] that integrating each sub-system with its own solver allows to avoid interrupts coming from unrelated events. Moreover event detection and location inside a sub-system can be processed faster because they involve a smaller set of variables. However, partitioning the original complex model into several lesser complex models may add virtual algebraic loops, therefore involving delayed outputs, even with an efficient execution order. 2 To take advantage of the model splitting without adding useless delays, we propose in [6] a new cosimulation method based on a refined scheduling approach. This technique, denoted “RCosim”, retains the speed-up advantage of modular co-simulation thanks to the parallel execution of the system’s components. Besides, it improves the accuracy of the simulation results through an offline scheduling of operations that takes care of model input/output dynamics. However, in practical applications, current co-simulation set-ups use a constant communication grid shared by all the models. In fact, the size of communication steps has a direct impact on simulation errors, and effective communication step control should rely on online estimations of the errors induced by slackened exchange rates. Schierz et al. [7] propose the use of adaptive communication step sizes to better handle the various changes in model dynamics. Meanwhile, the stability of multi-rate simulators with adaptive steps needs to be carefully assessed, for example based on errors propagation inside modular co-simulations [8]. Data extrapolation over steps is also expected to enhance the simulation precision over large communication steps. Nevertheless, actual complex systems (CPS) usually present non-linearities and discontinuities, making hard to predict their future behavior from past observations only. Moreover, the considered models are generated using the Simulink Coder target or the FMI for Model Exchange framework, which does not provide input derivatives (in contrast with the FMI for Co-Simulation architecture). Hence polynomial prediction cannot always correctly extrapolate. For example, [9] uses a constant, linear or quadratic extrapolation and a linear interpolation to improve the accuracy of the modular time integration. This method is successful for non-stiff systems but fails in the stiff case. In the purpose of defining a method for the parallel simulation of hybrid dynamical systems, our previous work on a single-level context-based extrapolation [10] accounts for steps, stiffness, discontinuities or weird behaviors. It uses adapted extrapolation to limit excessively wrong prediction. It shows that properly-chosen context-based extrapolation, combined with model splitting and parallel integration, can potentially improve the speed vs. precision trade-off needed to reach real-time simulation. In [10], context-based extrapolation is exclusively intended for FMU models and extrapolation is performed on integration steps only. This paper improves upon the preceding results with a better-grounded methodology, by: • adding oblivion to past samples through a weighting factor in polynomial prediction; • increasing the computational efficiency via a novel matrix formulation; • adding an online error evaluation at each communication step to select the best context and weighting factor at the forthcoming step, further minimizing extrapolation errors; • adding a hierarchy of decisional and functional contexts to improve prediction strategy. 3 3.1 Problem formalization and motivation Model definition Complex physical systems are generally modeled by hybrid non-linear ODEs or DAEs. The hybrid behavior is due to the discontinuities, raised by events triggered off by the crossing of a given threshold (zerocrossing). It plays a key role in the simulation complexity and speed. Indeed, more events slow down numerical integration. 3 Let us provide a formal model, considering a hybrid dynamic system Σ whose continuous state evolution is governed by a set of non-linear differential equations: Ẋ Yext = = f (t, X, D, Uext ) for g(t, X, D, Uext ) , tn ≤ t < tn+1 , where X ∈ RnX is the continuous state vector, D ∈ RnD is the discrete state vector, Uext ∈ RnUext is the external input vector, Yext ∈ RnY is the external output vector and t ∈ R+ denotes the time. The sequence (tn )n≥0 of strictly increasing time instants represents discontinuity points called state events, which are the roots of the equation: h(t, X, D, Uext ) = 0 . The function h is usually called zero-crossing function or event indicator, used for event detection and location [11]. At each time instant tn , a new continuous state vector can be computed as a result of the event handling: X(tn ) = I(tn , X, D, Uext ) , and a new discrete state vector can be computed as a result of a discrete state update: D(tn ) = J (tn−1 , X, D, Uext ) . If no discontinuity affects a component of X(tn ), the right limit of this component will be equal to its value at tn . This hybrid system model is adopted by several modeling and simulation environments and is underlying the FMI specification [2]. We assume that Σ is well-posed, in the sense that a unique solution exists for each admissible initial conditions X(t0 ) and D(t0 ) and that consequently X, D, Uext , and Yext are piece-wise continuous functions, i.e. continuous on each sub-interval ]tn , tn+1 [. 3.2 Model parallelization with modular co-simulation Figure 1: System splitting for parallelization. To execute the system in parallel, the model must be split into several sub-models. For simplicity, assume that the system is decomposed into two separate blocks denoted Model 1 and Model 2, in Figure 1 with X = [X [1] X [2] ]T and D = [D [1] D [2] ]T , where T denotes the matrix transpose. Therefore, the 4 sub-systems can be written as: ( Ẋ [1] = f [1] (t, X [1] , D [1] , U [1] , Uext ) , Y [1] = g [1] (t, X [1] , D [1] , U [1] , Uext ) , ( Ẋ [2] = f [2] (t, X [2] , D [2] , U [2] , Uext ) , Y [2] = g [2] (t, X [2] , D [2] , U [2] , Uext ) . Here, U [1] are the inputs needed for Model 1 (Σ1 ), directly provided by the outputs Y [2] produced by Model 2 (Σ2 ). Similarly, U [2] are the inputs needed for Model 2 directly provided by the outputs Y [1] produced by Model 1. Our approach generalizes to any decomposition of the system Σ into B blocks, where each block is indexed by b ∈ {1, . . . , B}. 3.3 Model of computation To perform the numerical integration of the whole multi-variable system, each of these simulators needs to exchange, at communication (or synchronization) points t sb (b = 1 or b = 2), the data needed by the other (see Figure 2). To speed up integration, the parallel branches must be as independent as possible, so that they are synchronized at a rate H [b] = t sb +1 − t sb , by far slower than their internal integration step hn[b]b (H [b]  h[b] nb ). Therefore, between communication points, each simulator integrates at its own rate (assuming a variable-step solver), and considers that data incoming from others simulators is held constant. Σ Integration step h[1] n1 Communication step H[1] ts1tn1 tn1+1 ts1+1 Initialization ts1+2 Exchange 1 Exchange 2 Σ2 Communication step H[2] Integration step h[2] n2 ts2 tn2 tn2+1 Σ1 ts2+2 ts2+1 Special case: H[1]=H[2]=H ts1=ts2=ts H = ts+1 - ts Figure 2: Σ split into Σ1 and Σ2 for parallel simulation. Besides, when H [b1 ] , H [b2 ] , data incoming from other slower simulators are held constant. For instance in Figure 3, Model 1 needs to communicate with an external model two times faster than Model 2). Data incoming from Model 2 is held constant during 2H [1] , potentially causing aliasing. It is likely that large and multi-rate communication intervals allow to speed up the numerical integration, but may result in integration errors and poor confidence in the final result. 5 Communication step H[ex] tsex Init tsex+2 tsex+1 External model tsex+4 tsex+3 Σ Exchange 1 Exchange 2 Exchange 3 Integration step h[1] n1 Communication step H ts1tn1 tn1+1ts1+1 ts1+2 Exchange 1 Integration step h[2] n2 Communication step H[2] Exchange 2 Σ2 ts2+2 ts2+1 H[2]=2.H[1] Σ1 ts1+4 ts1+3 Initialization ts2 tn2 tn2+1 [1] ts2+1=ts1+2 , ts2+2=ts1+4 , etc. Figure 3: Parallel multi-rate simulation. 3.4 Motivation for extrapolation Modeling the errors induced by slackened synchronization is a first direction in improving the trade-off between integration speed and accuracy. 3.4.1 Integration errors and parallelism Error evaluation and convergence analysis were performed in [3, Chapter 9] for different schemes (sequential and parallel modular co-simulation, models with real and artificial loops, mono-rate and multi-rate cosimulation, etc.). Assuming that the bth sub-model is connected to Bc − 1 other sub-models, its global error on states (1) and outputs (2) are bounded in Landau-Bachmann O() notation. Errors are functions is function of the communication step (or synchronization interval) H = max H [b] , b ∈ {1, . . . , Bc }, the integration time-step h and the order of accuracy p of the used numerical solver [3, Chapter 4]: [b] X [b] (tn+1 ) − Xn+1 Y [b] (tn ) − Yn[b] ≤ O(h p ) + O(H) , (1) ≤ O(h ) + O(H) . (2) p Both global errors are clearly bounded by two terms. The first term is related to the applied numerical solver, more specifically the time-step and the order. The worst case scenario on the bounding would be the maximum used integration step h and order p. The second term is related to the size of the communication step H. However, the weight of each term on the error is deeply related to the size of the communication step relatively to the integration step. Based on the same approach as in [9], it is clear that the communication step H dominates the error when H  h. 6 Therefore, considering a split model and a parallel execution, a trade-off must be found between acceptable simulation errors, thanks to tight enough synchronization, and simulation speed-up thanks to decoupling between sub-models. 3.4.2 Contribution of the extrapolation To add a degree of freedom to this trade-off achievement, we propose to extrapolate model inputs to compensate the stretching out of communication steps between sub-models. In fact, it was proven previously that numerical solutions are first order accurate, O(H), when choosing larger communication steps H. Holding inputs constant between two synchronization intervals plays the role of a zeroth-order hold  (ZOH,  constant extrapolation). To generalize the error bound, the O(H) term can then be replaced with O H δ+1 , where δ is the extrapolation degree. Using for example linear (δ = 1) or quadratic (δ = 2, A.1) extrapolation instead of constant update (δ = 0) has the potential to reduce the bound of simulation errors, as proven in [9, p. 238 sq.]. However, the difficulty with extrapolation is that it could be sensitive for different reasons: • there exists no universal prediction scheme, efficient for every signal; • prediction should be efficient: causal, sufficiently fast and reliable; • standard polynomial prediction may fail in stiff cases [12] (cf. Section 5 for details). We choose to base our extrapolation on polynomial prediction, which allows fast and causal calculations. In this situation, the rationale is that the computing cost of a low-order polynomial predictor would be by far smaller than the extra model computations needed by shorter communication steps. Since such predictions would be accurate neither for any signal (for instance, blocky versus smooth signals) nor for any signal behavior (slow variations versus steep onsets), we borrow the context-based approach from lossless image encoders [13], such as GIF (Graphics interchange format) or PNG (Portable Network Graphics) compression formats. The general aim of these image coders is to predict a pixel value based on a pattern of causal neighboring pixels. Compression is achieved when the prediction residues possess smaller intensity values, and more generally a sparser distribution (concentrated around close-to-zero values) than that of pixels in the original image. They may therefore be coded on smaller “bytes”, using entropy coding techniques. In images, one distinguishes basic “objects” (smooth-intensity varying regions, edges with different orientations). Based on simple calculations over prediction patterns, different behaviors are inferred (e.g. flat, smooth, +45o or −45o edges, etc.). Look-up table predictors are then used, depending on the context. In the proposed approach, we build a heuristic table of contexts (Section 5) based on a short frame of past samples, and affect pre-computed polynomial predictors to obtain context-dependent extrapolated values. We now review the principles of extrapolation. 4 4.1 CHOPoly: Causal Hopping Oblivious Polynomials for low-complexity extrapolation Background on prediction, real-time constraints and extrapolation strategies The CHOPtrey framework requires a dedicated instance of forecasting for discrete time series. The neighboring topics of prediction, interpolation or extrapolation represent a large body of knowledge in signal processing [14, 15], econometrics [16], control [17, 18] and numerical analysis [19]. They are paramount in complex systems that live, sample and communicate at different rates. Their use in simulation might be 7 milder. There exists a natural and common belief that signal extrapolation may introduce additional error terms and cause numerical instability [20, 21]. Building upon our previous work [10], two additions diminish the importance of extrapolation caveats: past sample weighting (oblivious polynomials) and a hierarchy of contexts defined by a pattern ontology. As we operate under real-time conditions, implying strong causality, only a tiny fraction of time series extrapolation methods are practically applicable. For instance, the theory of multi-rate filter banks bears formal similarities with distributed simulation or co-simulation, and have long been deployed for interpolation, extrapolation, and reduction of computational needs [22]. Such systems allow optimized noise handling at variable redundancy rates [23]. The overall propagation delay is harmless in traditional signal and image processing (for compression or signal restoration). However, it prevents their use in distributed simulation. Additionally, the decomposition of signals into frequency bands is not adapted to simulation data, that sometimes exhibit stiff behavior, preventing the use of band-limited extrapolation [24]. We alternatively propose to feed a bank of weighted smoothing polynomials, whose outputs are selected upon both simulation and real-time behaviors, organized in a Contextual & Hierarchical Ontology of Patterns (CHOPatt, Section5). ZOH (zeroth-order hold) or nearest-neighbor extrapolation is probably the most natural, the less hypothetical, and the less computationally expensive forecasting method. It consists in using the latest known sample as the predicted value. It possesses small (cumulative) errors when the time series is relatively flat or when its sampling rate is sufficiently high, with respect to the signal dynamics. In other words, it is efficient when the time series is sampled fast enough to ensure small variations between two consecutive sampling times. However, it indirectly leads to under-sampling or aliasing related disturbances [25]. They affect the signal information content, including its derivatives, and consequently its processing, for instance through differential equation systems. They appear as quantization-like noise [26, p. 609 sq.], delay induction, offset or bump flattening. As a remedy, higher order extrapolation schemes can be used. They consist in fitting a δ-degree polynomial through δ + 1 supporting points [27, p. 15 sq.]. The most commons are the predictive first-order [28, 29] or the second-order hold (FOH or SOH) [25]. They result in linear or parabolic extrapolation. Polynomial parameters are obtained in a standard way with Lagrange polynomials. Hermite polynomials can be used when one is interested in extrapolating derivatives as well, and their relative stability has been studied [31, p. 61 sq.]. Both, although being exact at synchronization points, tend to oscillate amidst them. To avoid introducing discontinuities, extrapolation can be smoothed with splines [32] or additional interpolation [33]. In our co-simulation framework, communication intervals are not chosen arbitrarily small for computational efficiency. Thus, the slow variation of inputs and outputs cannot be ensured in practice. Provided a cost vs. error trade-off is met, borrowing additional samples from past data and using higher-order extrapolation schemes could be beneficial. Different forecasting methods of various accuracy and complexity may be efficiently evaluated. We focus here on online extrapolation with causal polynomials, for simplicity and ease of implementation, following initial work in [34, Chap. 16]. Their main feature is that they are obtained in a least-squares fashion: we do not impose that they pass exactly through supporting points. However, they do so when the degree δ and the number of supporting points δ + 1 is set as above. We improve on [10] by adding a time-depending oblivion faculty to polynomial extrapolation with an independent power weighting on past samples. It accounts for memory depth changes required to adapt to sudden variations. Computations are performed on frames of samples hopping at synchronization steps, allowing a low-complexity matrix formulation. The resulting Causal Hopping Oblivious Polynomials (CHOPoly) are described next, evaluated on the case study described in Section 6 and tested in Section 7. 8 4.2 Notations The first convention abstracts a sampling framework independent of the actual sampling period H and the running time index. This amounts to considering a unit communication step for any signal u(t), i.e. H = 1, and to using a zero-reindexing convention: the last available sample is indexed by 0 (u0 ), and the previous samples are thus indexed backwards: u−1 , u−2 , u−3 ,. . . This simplification possesses two main traits: 1. local indices hop at each communication step and become independent of the actual timing and communication rate; 2. some intermediate computations may thus be performed only once, reducing the risk of cumulative numerical errors [35]. We can either use a recursive formulation with infinite memory, or a finite prediction frame. The first option is used for instance in adaptive filtering or Kalman estimation. It generally includes oblivion, implemented for instance using a scalar forgetting factor wl , l ∈] − ∞, . . . , −1, 0], assigning a decreasing weight, often exponential [36], to older error samples. We instead consider the second option with a finite frame of the λ last consecutive past samples {u1−λ , u2−λ , . . . , u0 }. Limited-sized buffers are more natural for polynomial forecasting, and they also appear beneficial to reset computations in the case of sudden changes in the data, as discussed in Section 5.2. To emulate a variable memory depth weight, we choose a piece-wise power weighting with order ω ≥ 0. It can be expressed as follows, without λ and ω indices to lighten notations:    if l < 1 − λ ,  0 !ω  (3) wl =  λ + l   1 − λ ≤ l ≤ 0.   λ Their behavior for different powers ω is illustrated in Figure 4. For ω = 0, all samples in the frame are assigned the same importance. The higher the power, the smaller the influence of older samples. 4.3 CHOPoly: Type I, symbolic and Type II implementations Although the forthcoming derivations are elementary, they are rarely exposed with their complexity evaluated. We consider polynomial predictors, performed in the least-squares sense [26, p. 227 sq.]. We denote by Pδ,λ,ω the least-squares polynomial predictor of degree δ ∈ N, frame length λ ∈ N∗ and weighting factor ω. Its stable estimation requires that λ > δ. The polynomial Pδ,λ,ω is defined by the vector of length δ + 1, with coefficients aδ ; hence u(t) = aδ + aδ−1 t + · · · + a0 tδ . A causal prediction consists in the estimation of unknown data at a future and relative time τ ≥ 0. Generally τ ∈]0, 1[, i.e., inside the time interval between the last known sample u0 and the forthcoming communication step. The predicted value at time τ is loosely denoted by uPδ,λ,ω (τ), or simply u(τ) when the context is self-explanatory. We refer to A.1 for an introductory example on constant weighting, degree-two or parabolic prediction (P2,λ,0 ). In the more generic context, we minimize the least-squares prediction error:  δ 2 !ω  0 X  X δ−d  λ+l e(aδ ) = × ul −  ad l  . λ l=1−λ d=0 (4) If one chooses ω = 0, and λ = δ + 1, one recovers the Lagrange polynomials, and the error e(aδ ) is exactly zero. Consequently, CHOPoly encompasses standard extrapolation used in co-simulation (e.g. ZOH, FOH, SOH or higher-order). Choosing λ > δ + 1 induces a form of smoothing, that reduces oscillations. 9 1 λ = 2, ω = 1/8 λ = 2, ω = 1/2 0.9 λ = 2, ω = 1 λ = 2, ω = 2 0.8 0.7 λ = 3, ω = 1/8 λ = 3, ω = 1/2 λ = 3, ω = 1 0.6 λ = 3, ω = 2 λ = 5, ω = 0 0.5 λ = 5, ω = 1/8 λ = 5, ω = 1/2 0.4 λ = 5, ω = 1 λ = 5, ω = 2 0.3 λ = 7, ω = 5 0.2 0.1 0 −6 −5 −4 −3 −2 −1 0 Figure 4: Effect of the weighting power ω with different choices of λ on the memory depth. Choosing ω > 0 generally promotes a better extrapolation near the last know sample, making smoothing lag-dependent. Both parameters take into account the possibility that the signal values at communication steps could be imperfect, due to jitter in the actual sampling or round-off errors for instance. As λω is a non-null constant, the derivation of (4) with respect to ai yields δ + 1 equations, for each i ∈ {0, . . . , δ}:  0  0 δ X X X   ω δ−i ω 2δ−d−i   ad . (λ + l) l ul = (λ + l) l   l=1−λ We define the sums of powers zd,λ = They can be rewritten, if ω ∈ N: d=0 l=1−λ Pλ−1 l=0 l (see A.1) and the weighted sums of powers zd,λ,ω = d zd,λ,ω ω X Pλ−1 l=0 (λ − l)ω ld . ! o ω−o (−1) λ zo+d,λ , = ω o=0 o   where ωo denotes the binomial coefficient. The associated weighted moments write, accordingly, md,λ,ω = Pλ−1 Pλ−1 d ω d l=0 (λ − l) l u−l . We refer to A.1 for additional information on power sums zd,λ = l=0 l and moments. 10 The generic extrapolation pattern takes the first following matrix form (Type I): u(τ) = h 1 τ ···    i  τδ    −z1,λ,ω . .. z0,λ,ω −z1,λ,ω .. . . .. ··· (−1)δ zδ,λ,ω (−1)δ zδ,λ,ω .. . .. . .. . ··· z2δ,λ,ω ··· . .. −1    m0,λ,ω     −m1,λ,ω   ..   .   (−1)δ mδ,λ,ω      .   (5) We note τδ = [1, τ, · · · , τδ ]T the vector of τ powers, and h iT mδ,λ,ω = m0,λ,ω , −m1,λ,ω , · · · , (−1)δ mδ,λ,ω . The inverse of the (δ + 1) × (δ + 1) Hankel matrix Z δ,λ,ω in (5):         z0,λ,ω −z1,λ,ω .. . (−1)δ zδ,λ,ω −z1,λ,ω . .. . .. ··· · · · (−1)δ zδ,λ,ω .. . .. . .. . .. . ··· z2δ,λ,ω         is denoted by Z −δ,λ,ω . Hence, the Type-I formula for CHOPoly writes: u(τ) = τδT Z −δ,λ,ω mδ,λ,ω . (6) The generic matrix formulation in (6) is compact. The matrix Z −δ,λ,ω may be computed beforehand, as a look-up table. A polynomial of degree δ involves terms of degree 2δ. We note that this could lead to huge values computed from large sample indices for long simulation signals. This situation is avoided by the frame-hopping zero-reindexing convention, which thus limits round-off errors and subsequent issues in the inversion of matrices that could become defective [37]. The moment-based formulation conceals more direct symbolic formulae, linear in past samples and polynomial in τ. Some examples are given in A.2. They can be implemented with Ruffini-Horner’s rule [39] for higher extrapolation orders. However, symbolic polynomial evaluations are not always handy to implement. We note uλ = [u0 , u−1 , . . . , u2−λ , u1−λ ]T . Then (6) can be rewritten in a Type II form. For instance, since T τ0 = 1, extrapolation with polynomial P0,λ,1 (17) rewrites as a matrix product with Π0,λ,1 : u(τ) = h 2 λ λ(λ + 1) λ−1 ··· 1 i uλ = τ0T Π0,λ,1 uλ , (7) The general Type-II formula for predictor matrices Πδ,λ,ω of size (δ + 1) × λ implements (6) as: u(τ) = τδT Πδ,λ,ω uλ . (8) Such a formulation allows an efficient storage of matrices Πλ,δ,ω with different weighting factors. Examples are provided in Table 5 in A.4. Estimates of the generic number of elementary operations required for each extrapolated τ are compared in Table 4 in A.3. Type I and Type II are roughly quadratic in (δ, λ). Although the rectangular matrix Πδ,λ,ω is larger than Z δ,λ,ω , since λ > δ, the economy in lazy matrix addressing combined with the number of elementary operations make Type II implementation more practical and efficient. 11 5 5.1 CHOPatt: Contextual & Hierarchical Ontology of Patterns Pattern representation and two-level context hierarchy definitions We now introduce the pattern-based approach, borrowed from common lossless image encoders (Section 3.4.2), by providing a contextual and hierarchical framework for CHOPoly extrapolation. To this aim, the role of contexts is to cover all possible scenarios (an ontology) of signal’s evolution for a hybrid dynamical system. For instance, slow and steep variations must be included, the same goes for blocky and smooth signals. On the first level, we define a functional context that differentiates a set of typical patterns, represented in Figure 5. We are interested in the dynamics of the most recent samples, depicted with red links, with respect to the past behavior (black links). It defines six mutually exclusive entities, illustrated by a short name: “flat”, “calm”, “move”, “rest”, “take” and “jump”. flat calm move rest take jump Figure 5: Pattern representation for the functional context in Table 1. “Flat” addresses steady signals. “Calm” represents a sufficiently sampled situation, where value increments over time remain below fixed thresholds. “Move” defines a formerly “calm” signal whose novel value changes rapidly, above a pre-defined threshold. “Rest” handles signals previously varying above a threshold and becoming “calm”. The “take” context addresses signals with constantly high variations. The “jump” pattern is a “take” with a sign change as for bumps and dips. They are detected in practice by comparing consecutive differences on past samples (di , cf. (9)), indexed by i, to thresholds (γi , cf. (10)). Their formal definition is provided in Table 1 and their adaptive selection in Section 5.2. On the second level, we define a meta- or decisional context that determines if extrapolation would be beneficial or detrimental. Indeed, a major difficulty for hybrid complex systems resides in sharp and fast variations in signal patterns induced by stiffness and discontinuities. We thus detect if the signal can be characterized by a seventh “cliff” pattern, for which functional CHOPoly prediction would fail, by taking into account the importance of the signal’s amplitude. This decision context is detected by comparing a ratio ρ of differences based on past samples (12) to a threshold (denoted by Γ, cf. (13)). The above seven patterns define a hierarchical context selection, composed of the decisional context embedding the functional context on a second level, summarized in Figure 6. 12 CHOPatt Decisional context selection compute ratio ρ and compare it to threshold Γ Keep zeroth-order hold or extrapolate? Zeroth-order hold Extrapolate Functional context selection compute differences di and compare them to thresholds γi Keep zeroth-order hold or extrapolate? Zeroth-order hold Extrapolate Select degree δ and frame length λ for CHOPoly Continue with the weighting factor selection Figure 6: Hierarchical and functional context selection flowchart. 5.2 Functional context selection As a concrete example, used in the remaining of our work, we propose two simple measures of variation based on the last three samples only: u0 , u−1 and u−2 (with the zero-reindexing convention from Section 4.2), the last and previous differences: d0 = u0 − u−1 and d−1 = u−1 − u−2 . (9) Their absolute values are compared with thresholds γ0 and γ−1 , respectively, defined in (10). To build 13 the different contexts, three complementary conditions are defined: • O if |di | = 0; • Ci if 0 < |di | ≤ γi ; • Ci if |di | > γi . Table 1 formally defines the six entities from the functional context and presents examples of “default” ω-parametrized CHOPoly families. Since the “flat” context addresses steady signals, a mere ZOH suffices, n(ame) # |d−1 | |d0 | d−1 .d0 (δ, λ, ω) f(lat) 0 O O O (0, 1, .) c(alm) 1 C1 C2 any (2, 5, .) m(ove) 2 C1 C2 any (0, 1, .) r(est) 3 C1 C2 any (0, 2, .) t(ake) 4 C1 C2 >0 (1, 3, .) j(ump) 5 C1 C2 <0 (0, 1, .) Table 1: Functional context: entities definition and associated prediction. hence P0,1,ω . The “calm” context represents smooth signals, in this case, it could be approximated by a quadratic polynomial, for instance P2,5,ω . For the “flat” and “jump” contexts, an additional procedure consists in resetting the extrapolation to prevent inaccurate prediction. For example, when context 1 is chosen just after context 4, the quadratic extrapolation P2,5,ω requires 5 valid samples, whereas the last 3 only are relevant, justifying our finite-length frames option. The choice of thresholds γ0 and γ−1 is potentially crucial. For instance, fixed values may reveal inefficient under important amplitude or scale variation in signals. Hence, we have chosen to update them adaptively, based on the statistics of a past frame {u1−Λ , . . . , u−3 } (Λ denotes the maximum frame size). With excessively low thresholds, high-order extrapolations would rarely be chosen, losing the benefits of prediction. Overly high thresholds would in contrast suffer from any unexpected jump or noise. As contexts are based on backward derivatives, we have used in the simulations presented here the mid-range statistical estimator of their absolute values. This amounts to set: γ0 = γ−1 = 1 max (|ui − ui+1 |) , 2 i∈[1−Λ,...,−3] (10) which appeared to be sufficiently robust in our test-cases. 5.3 Next communication period: weighting factor and decisional context selection To further improve our algorithm in [10] and to decrease even more prediction induced integration errors, the oblivious weighting factor from (3) makes the algorithm more subtly aware of data freshness. Decisions for the next communication period are taken with respect to the new updated input value u0 , compared to past predictions. It is gauged with two error measures, illustrated in Figure 7. They assess, a posteriori, what 14 would have been the best prediction. First, ∆worst denotes the worst case scenario without extrapolation, the predicted value being held constant and equal to u−1 : ∆worst = |u0 − u−1 |. Second, we estimate the best prediction pattern in retrospect, obtained by optimizing the free parameter ω in the prediction polynomial defined by the last selected context. We choose here a subset of weighting factors n o in Ω = 0, 18 , 14 , 12 , 1, 2 (see A.4 for details): ∆best = min |u0 − ûω−1 |. ω∈Ω The best weighting factor ωbest defined in (11) is then selected during the next communication interval: ∆best = |u0 − ûω−1best |. (11) u0 ûω1 -1 ω2 û -1 ûω3 -1 u-1 Δbest Δworst Figure 7: Illustration of two error measures: ∆worst when there is no extrapolation and ∆best for the best prediction pattern. Regarding the selection of the decisional context called “cliff”, we first define a ratio: ρ= ∆best . ∆worst (12) It specifies if there is a sharp fast variation or not by comparing it to a pre-defined threshold and then decides to extrapolate or not. The threshold denoted Γ is defined as follow: 0.7 ≤ Γ < 1. (13) In fact, when ρ > Γ (e.g. with Γ = 90 %), it means that the input value is only enhanced by 1 − Γ (e.g. 10 %) regarding the “true” value. This is the case when there is a sharp and fast variation or a weird behavior. The decisional context “cliff” is then selected and activated with its associated heuristic polynomial predictor Pδ,λ,ω = P0,1,ω . On the other hand, when ρ ≤ Γ, the conventional functional context table introduced in Section 5.2 is used. 15 6 Case study 6.1 Engine simulator In this study, a Spark Ignition (SI) RENAULT F4RT engine has been modeled with 3 gases (air, fuel and burned gas). It is a four-cylinder, in-line Port Fuel Injector (PFI), engine in which the engine displacement is 2000 cm3 . The combustion is considered as homogeneous. The air path (AP) consists in a turbocharger with a mono-scroll turbine controlled by a waste-gate, an intake throttle and a downstream-compressor heat exchanger. This engine is equipped with two Variable Valve Timing (VVT) devices, for intake and exhaust valves, to improve the engine efficiency (performance, fuel and emissions). The maximum power is about 136 kW at 5000 rpm. The F4RT engine model was developed using the ModEngine library [40]. ModEngine is a Modelica [41] library that allows the modeling of a complete engine with diesel and gasoline combustion models. Requirements for the ModEngine library were defined and based on the already existing IFP-Engine library. The development of the IFP-Engine library was performed several years ago at “IFP Energies nouvelles” and it is currently used in the AMESim1 tool. ModEngine contains more than 250 sub-models. It has been developed to allow the simulation of a complete virtual engine using a characteristic time-scale based on the crankshaft angle. A variety of elements are available to build representative models for engine components, such as turbocharger, wastegate, gasoline or diesel injectors, valve, air path, Exhaust Gas Recirculation (EGR) loop etc. ModEngine is currently functional in Dymola2 . The engine model and the split parts were imported into xMOD model integration and virtual experimentation tool [42], using the FMI export features of Dymola. This cyber-physical system has 118 state variables and 312 event indicators (of discontinuities). 6.2 Decomposition approach The partitioning of the engine model is performed by separating the four-cylinder from the air path, then by isolating the cylinders (Ci , for i ∈ {1, . . . , 4}) from each other. This kind of splitting allows for the reduction of the number of events acting on each sub-system. In fact, the combustion phase raises most of the events, which are located in the firing cylinder. The solver can process them locally during the combustion cycle of the isolated cylinder, and then enlarge its integration time-step until the next cycle. From a thermodynamic point of view, the cylinders are weakly coupled, but a mutual data exchange does still exist between them and the air path. The dynamics of the air path is slow (it produces slowly varying outputs to the cylinders, e.g. temperature) compared to those of the cylinders (they produce fast outputs to the air path, e.g. torque). Besides, unlike cylinders outputs, most air path outputs are not a direct function of the air path inputs (they are called Non Direct Feedthrough (NDF) outputs). This results in choosing the execution order of the split model from the air path to the cylinders (in accordance with the analysis of the behavior of NDF to Direct Feedthrough (DF) in [3, Chapter 9]). The model is split into 5 components and governed by a basic controller denoted CTRL. It gathers 91 inputs and 98 outputs. 1 www.lmsintl.com/imagine-amesim-1-d-multi-domain-system-simulation 2 www.3ds.com/products/catia/portfolio/dymola 16 7 Tests and results Tests are performed on a platform with 16 GB RAM and an “Intel Core i7” 64-bit processor, running 4 cores (8 threads) at 2.70 GHz. 7.1 Reference simulation The model validation is based on the observation of some quantities of interest as the pressure, the gas mass fraction, the enthalpy flow rate, the torque, etc. These outputs are computed using LSODAR 3 , a variable time-step solver with a root-finding capability that detects the events occurring during the simulation. It also has the ability to adapt the integration method depending on the observed system stiffness. The simulation reference Yref is built from the integration of the entire engine model, the solver tolerance (tol) being decreased until reaching stable results, which is reached for tol = 10−7 (at the cost of an unacceptable slow simulation speed). Then, to explore the trade-offs between the simulation speed and precision, simulations are run with increasing values of the solver tolerance until reaching a desired relative integration error Er, defined by (14) N−1 Er(%) = 100 X Yref (i) − Y(i) . , N i=0 Yref (i) (14) with N the number of saved points during 1 s of simulation. Iterative runs showed that the relative error converge to a desired error (Er ≤ 1 %) for tol = 10−4 . The single-thread simulation of the whole engine with LSODAR and tol = 10−4 provides the simulation execution time reference, to which the parallel version is compared. When using the split model, each of its 5 components is assigned to a dedicated core and integrated by LSODAR with tol = 10−4 . 7.2 Automatic detection of fast and sharp variations Adding a hierarchy of decisional and functional contexts overcomes previous limitation in [10]. We illustrate with two signals denoted “Out1” and “Out2”. They are built in Matlab/Simulink as shown in Figure 8a. They exhibit different variations over time, as illustrated in Figure 8b. From Figure 9, extrapolation of “Out1” fails around t = 8 s at the sharp variation. Here extrapolation is detrimental since it increases errors instead of minimizing them. To fix this limitation on high jumps, we apply hierarchical contexts’ selection to detect the “cliff” context. Using the ratio ρ (12) and comparing it to a threshold Γ (13) equal to 90 %, the improvement of extrapolation at this step is found lesser than 10 %. The “cliff” context is then activated to avoid extrapolation. As a result, the decisional context prevents additional errors of prediction and the result of the simulation is improved as it is shown in Figure 10. 7.3 Automatic selection of the weighting factor To determine the best weighting factor regarding error minimization, we first test them separately on “Out1” and “Out2”. This first test is quite simple since there is no interaction between blocks, which means that 3 Short for Livermore Solver for Ordinary Differential equations with Automatic method switching for stiff and nonstiff problems, and with Root-finding [43]. 17 (a) Construction of Out1 and Out2 in Matlab/Simulink. 5 4 Out1 3 2 1 0 −1 0 1 2 3 4 5 6 7 8 9 10 6 7 8 9 10 time(s) 12 10 Out2 8 6 4 2 0 0 1 2 3 4 5 time(s) (b) Illustration of Out1 and Out2. Figure 8: A test sample. there is no effect of the action/reaction of extrapolated signals on each other. The purpose here is to show the difference between all weighting factors. Figure 11 shows the absolute error, which is the absolute value of the difference between the reference in Figure 8b built with a small communication step H = 10 µs and signals simulated with a larger communication step H = 100 µs, extrapolated or not. It can be inferred that the higher the weighting factor, the smaller the error. Table 2 shows the cumulative absolute error on a long simulation run (during 10 s). It confirms that the weighting factor ω = 2 is the best regarding error reduction. In fact, the extrapolation is enhanced from ω = 0 to ω = 2 by reducing the error of prediction by 20.10 % for “Out1” and by 11.39 % for “Out2”. The same experience is now applied on the F4RT engine model and extrapolation with different weighting factors is applied separately on all engine inputs. Figure 12 represents one of the cylinder 1 outputs, “the enthalpy flow rate”, for the different extrapolation modes. We notice more clearly in Figure 13 that for each communication step, there is a different best weighting factor that minimizes the absolute error. Besides, the computation of the cumulative integration error, during a long simulation run, shows that there is no unique best weighting factor. The weighting factor ω is then chosen dynamically during the simulation as described in Section 5.3. 18 5 ZOH reference ω=0 4 3 Out1 2 1 0 −1 −2 7.7 7.8 7.9 8 8.1 8.2 time (s) Figure 9: Failure of the old extrapolation. 5 ZOH reference ω=0 4 Out1 3 2 1 0 −1 7.7 7.8 7.9 8 time (s) 8.1 8.2 Figure 10: Success of the new extrapolation. At each communication step, the weighting factor that minimizes the last error is selected and used for the current step. Thanks to dynamic error evaluation and weighting factor selection, the cumulative integration error is almost always the lowest one for the different outputs as shown in Figures 14a and 14b. However, the worst enhancement of the error depends on the output, for instance it is obtained with ω = 21 for the air mass fraction of the cylinder 1 and with ω = 2 for the fuel mass fraction of the cylinder 1. This confirms that for complex coupled systems, there is no unique best weighting factor, hence the necessity and the usefulness of combining different ones. Besides, for the “burned gas mass fraction” of cylinder 1 (see Figure 15), the dynamic weighting factor 19 Absolute error for Out1 Absolute error for Out2 ZOH ω =0 ω = 1/8 ω = 1/4 ω = 1/2 ω =1 ω =2 0.15 0.1 0.05 0 2.14 2.16 2.18 2.2 2.22 2.24 2.26 2.28 2.3 2.32 time (s) ZOH ω =0 ω = 1/8 ω = 1/4 ω = 1/2 ω =1 ω =2 0.1 0.05 0 2.14 2.16 2.18 2.2 2.22 2.24 2.26 2.28 2.3 2.32 time (s) Figure 11: Behavior of the absolute error at each communication step. Type Error Improvement Out1 Out2 Out1 Out2 0.572 0.399 — — ω=0 0.204 0.158 64.34 % 60.40 % ω = 1/8 0.201 0.157 64.86 % 60.65 % ω = 1/4 0.198 0.155 65.38 % 61.15 % ω = 1/2 0.193 0.153 66.27 % 61.65 % ω=1 0.182 0.148 68.18 % 62.91 % ω=2 0.163 0.140 71.50 % 64.91 % ZOH Table 2: Cumulative absolute error during 10 s and relative improvement. selection decreases the error of prediction by 32 % compared to the previous work (with ω = 0, in [10]) as well as the simulation error by 40 % compared to the non-extrapolated signal. Regarding now the achievement on the simulation speed-up, Table 3 shows the acceleration compared with the single-threaded reference. Firstly, the speed-up is supra-linear w.r.t. the number of cores when the model is split into 5 threads integrated in parallel on 5 cores. Indeed, the containment of events detection and handling inside small sub-systems allows for solvers accelerations, enough to over-compensate the multithreading costs. Secondly, model splitting combined with enlarged communication steps, from H = 100 µs to H = 250 µs, allows around +12.50 % extra speed-up. Unfortunately this extra speed-up is obtained at the 20 4 5 x 10 4 x 10 Enthalpy flow rate of cylinder 1 (W) 4 2.4 3 2.2 2 2 0.042 0.043 0.044 0.045 1 0 ZOH ω=0 ω = 1/8 ω = 1/4 ω = 1/2 ω=1 ω=2 reference −1 −2 −3 −4 −5 0.04 0.05 0.06 time (s) 0.07 0.08 Absolute error of enthalpy flow rate of cylinder 1 Figure 12: Enthalpy flow rate output of cylinder 1. 3000 ZOH ω=0 ω = 1/8 ω = 1/4 ω = 1/2 ω=1 ω=2 2500 2000 1500 1000 500 0 0.176 0.178 0.18 0.182 0.184 0.186 0.188 0.19 0.192 0.194 0.196 time (s) Figure 13: Absolute error of enthalpy flow rate output of cylinder 1. 21 Air mass fraction of cylinder1 (Kg/m3) Fuel mass fraction of cylinder1 (Kg/m3) ZOH ZOH ZOH ZOH ω = 0 w=0 ω = 0 w=0 ω = 1/8 w=1/8 w=1/8 ω = 1/8 ω = 1/4 w=1/4 ω = 1/4 w=1/4 ω = 1/2 w=1/2 ω = w=1/2 1/2 ω = 1 w=1 ω = 1 w=1 ω = 2 w=2 ω = 2 w=2 ω w=auto = dyn. ω w=auto = dyn. 0 0.5 1 1.5 2 2.5 3 3.5 4 Absolute error 4.5 0 5 0.5 1 1.5 2 Absolute error −3 x 10 2.5 −5 x 10 (b) Fuel mass fraction. (a) Air mass fraction. Figure 14: Absolute error in cylinder 1. Burned gas mass fraction of cylinder1 (Kg/m3) ZOH ZOH ω =0 \omega=0 w=1/8 ω = 1/8 ω = 1/4 w=1/4 w=1/2 ω = 1/2 ω = 1 w=1 ω = 2 w=2 ω w=auto = dyn. 0 0.1 0.2 0.3 0.4 0.5 0.6 Absolute error 0.7 0.8 0.9 1 −4 x 10 Figure 15: Absolute error of the burned gas mass fraction of cylinder 1. cost of relative error increase (e.g. +341 % for the fuel density). Thirdly, the combination of model splitting with expanded communication steps (use of H = 250 µs) as well as CHOPtrey allows to keep the same extra speed-up while decreasing the relative error to values close to, or below, those measured with H = 100 µs and ZOH. We can conclude that the enhancement brought with CHOPtrey allows for improved performance on both sides: simulation time and results’ accuracy. 8 Summary and perspectives The main objective of CHOPtrey is to provide a framework for hybrid dynamical systems co-simulation speed-up [44] based on extrapolation. Cheaper slackened synchronization intervals are allowed by a combination of prediction and multi-level context selection. It aims at reaching real-time simulation while pre22 Communication time Prediction 100 µs 250 µs Relative error variation Speed-up factor Burned gas density Fuel density ZOH 8.9 – – ZOH 10.01 +7 % +341 % CHOPtrey 10.07 −26 % +21 % Table 3: CHOPtrey performance: speed-up vs. accuracy. The speed-up factor is compared with singlethreaded reference. The relative error variation is compared with ZOH at 100 µs. serving result accuracy. It is implemented in combination with model splitting and parallel simulation on a hybrid dynamical engine model. It results in effective simulation speed-up with negligible computational overheads. In addition, sustained or even improved simulation precision is obtained without noticeable instability. This work can be extended in different directions. Keeping with data extrapolation, simulated signals can be cleaned from long range trends [45], to better detect subtle behavioral modifications, and subsequently adapt detection thresholds. They can be processed on different time grids [46] with multi-scale techniques [47]. Acting as local pseudo-derivatives, the latter can decompose signals into morphological components such as polynomials trends, singularities and oscillations. This would allow improvements in context assignment by measuring sharp variations and spurious events with data-relative sparsity metrics [48]. Moreover, the discrimination of cliff behaviors could be further improved by using knowledge of the plant model, allowing to discard out-of-bound values, e.g., non-negative variables. Finally, simulation results suggest that widening the communication steps is an important source for integration acceleration. Beyond equidistant communication grids, adaptive, context and/or error-based closed-loop control of communication steps [49, 50] is a promising research objective. 9 Acknowledgments This work was supported by the ITEA2 project MODRIO4 , and funded in part by the “Direction Générale des Entreprises” of the French Ministry of Industry. A Complements on extrapolation A.1 Toy parabolic CHOPoly extrapolation formulae We estimate the best fitting parabola (i.e. δ = 2) with a uniform weighting (ω = 0): u(t) = aδ + aδ−1 t + aδ−2 t2 to approximate the set of discrete samples {u1−λ , u2−λ , . . . , u0 }. We consider here “uniform” weighting wl = 1 for 1 − λ ≤ l ≤ 0 (i.e. with weighting factor ω = 0). The prediction polynomial P2,λ,0 is defined by the 4 Model Driven Physical Systems Operation 23 vector of polynomial coefficients: a2 = [a2 , a1 , a0 ]T .These coefficients are determined, in the least-squares sense [51], by minimizing the squared or quadratic prediction error (4): e(a2 ) = 0 X  2 1 × ul − (a2 + a1 l + a0 l2 ) . l=1−λ Here indices l are non-positive, i.e. between 1 − λ and 0. The minimum error is obtained by solving the following system of equations (zeroing the derivatives with respect to each of the free variables ai ): ∂e(a2 ) = 0, ∂ai ∀i ∈ {0, 1, 2}, namely:  0 X        l0 ul − (a2 l0 + a1 l1 + a0 l2 ) = 0 ,      l=1−λ    0     X 1 l ul − (a2 l0 + a1 l1 + a0 l2 ) = 0 ,      l=1−λ    0  X       l2 ul − (a2 l0 + a1 l1 + a0 l2 ) = 0 .    (15) l=1−λ System (15) may be rewritten as:  0 0 0 0 X X X X    0 1   u = a l + a l + a l2 , l 2 1 0      1−λ 1−λ 1−λ 1−λ    0 0 0 0  X X X   X 1 2 lu = a l + a l + a l3 ,  l 2 1 0     1−λ 1−λ 1−λ 1−λ    0 0 0 0  X X X X    2 2 3  l ul = a2 l + a1 l + a0 l4 .    1−λ 1−λ 1−λ 1−λ Closed-form expressions exist for the sum of powers zd,λ , involving Bernoulli sequences [52]. For instance, up to the 4th power: • z0,λ = λ; • z1,λ = (λ − 1)λ/2; • z2,λ = (λ − 1)λ(2λ − 1)/6; • z3,λ = (λ − 1)2 λ2 /4; • z4,λ = (λ − 1)λ(2λ − 1)(3λ2 − 3λ − 1)/30. P d th 5 Let md,λ = md,λ,0 = λ−1 l=0 l u−l (here indices l are positive) denote the d moment of the samples ui , and m2,λ the vector of moments [m0,λ , −m1,λ , m2,λ ]T . We now form the Hankel matrix Z2,λ of sums of powers R∞ the dth moment of a real function f (t) about a constant c is usually defined as: Md = −∞ (t − c)d f (t)dt. The md s may be interpreted as discrete versions of one-sided moments about t = 0 of the discrete function u(t); alternatively — cf. definitions for zd,λ — the moments are sort of weighted (by ul ) sum-of-powers. 5 Definition: 24 (depending on δ = 2 and λ): Z2,λ   z0,λ  =  −z1,λ  z2,λ −z1,λ z2,λ −z3,λ z2,λ −z3,λ z4,λ     . The system in (15) rewrites:   m0,λ   −m1,λ m2,λ     z0,λ    =  −z1,λ z2,λ −z1,λ z2,λ −z3,λ z2,λ −z3,λ z4,λ      a2      ×  a1  a0 or m = Z2,λ × a . We now want to find the value predicted by P2,λ,0 at time τ. Let τ2 = [1, τ, τ2 ]T be the vector of τ powers. Then u(τ) is equal to a2 + a1 τ + a0 τ2 = τ2T × a2 . This system might be solved with standard pseudo-inverse techniques [53], by premultiplying by the transpose of Z2,λ . This is not required, as Z2,λ is always invertible, provided that λ > δ. Its inverse is denoted Z−2,λ . It thus does not need to be updated in real-time. It may be computed offline, numerically or even symbolically. Hence:   u(τ) = τ2T × Z−2,λ × m2,λ . The vector τ2 and Z−2,λ are fixed, and the product τ2T ×Z−2,λ may be stored at once. Thus, for each prediction, the only computations required are the update of vector m2,λ and its product with the aforementioned stored matrix. A.2 CHOPoly symbolic formulation When only one polynomial predictor is required, actual computations do not require genuine matrix calculus, especially for small degrees δ. With δ = 0 and ω = 0 (or P0,λ,0 ), one easily sees that: u(τ) = m0 u0 + · · · + u1−λ = , z0,λ λ (16) that is, the running average of past frame values. It reduces to standard ZOH, u(τ) = u0 , when λ = 1. For δ = 0 and ω = 1, one gets a weighted average giving more importance to the most recent samples: u(τ) = 2 λu0 + · · · + 2u2−λ + u1−λ . λ(λ + 1) (17) With λ = 2, δ = 1 and ω = 0, P1,2,1 (τ) = u0 + (u0 − u−1 )τ yields the simplest 2-point linear prediction or standard FOH. P1,3,0 yields the simple estimator form: u(τ) = τ 1 (5u0 + 2u−1 − u−2 ) + (u0 − u−2 ) . 6 2 (18) For P2,5,1 , we tediously get: u(τ) = 1 τ (65u0 + 12u−1 − 6u−2 − 4u−3 + 3u−4 ) + (25u0 − 12u−1 − 16u−2 − 4u−3 + 7u−4 ) 70 28 τ2 + (5u0 − 4u−1 − 4u−2 + 3u−4 ) 28 25 (19) or with the Ruffini-Horner’s method for polynomial evaluation, to slightly reduce the number of operations: u(τ) = (((25u0 − 20u−1 − 20u−2 + 15u−4 ) τ + (25u0 − 12u−1 − 16u−2 − 4u−3 + 7u−4 )) τ + (130u0 + 24u−1 − 12u−2 − 8u−3 + 6u−4 )) /140 . (20) One easily remarks that, when the weighting exponent ω is an integer, prediction polynomials have rational coefficients, which limits floating-point round-off errors, especially when prediction times and variables (for instance quantized ones) are integer or rational as well. A.3 CHOPoly Type I and II computational complexity The computational complexity of a single extrapolation is given in Table 4. They are evaluated by a number of elementary operations. They are only meant to provide rough intuitions and guidelines on the actual implemented complexity. Their expressions for Type I (6) and Type II (8) Causal Hopping Oblivious Polynomials implementations are given terms of δ, λ (and ω). Type I direct implementation is not efficient: unoptimized moments computations yield a cubic complexity in (δ, λ, ω). Recurring results can be evaluated using call-by-need or lazy evaluation. For md,λ,ω , the factors (λ − l)ω yield λ − 2 powers (the λ − 1 adds are unnecessary), since 0ω and 1ω are direct. For 2 ≤ l ≤ λ, the ld are gathered in a (δ + 1) × λ array, with Pδ δ(δ+1) ω d d=2 d = 2 − 1 products. The (λ − l) l terms can be stored in a (δ + 1) × λ matrix, involving (λ − 2)(δ − 1) products. These estimates are stored in the top-half of Table 4, above the dashed line. Upon hopping frame update and τ determination, using the simplification τd+1 = ττd , τδ requires δ − 1 products. The evaluation of the weighted moments entails only δ(λ − 1) adds, and (λ − 2)δ + 1 products, since the lazy matrix storing (λ − l)ω ld contains some zeroes and ones (Table 4, bottom-half). Both Type I and II are thusroughly quadratic in (δ, λ). Both are competitive with respect to Lagrange extrapolation, which  2 requires O δ or O(δ) with δ = λ + 1 depending on the implementation. If we precisely compute the operation excess from Type I to II, we obtain Ξ(δ, λ) = 2δ2 + δ + 3 − 2λ. For the parameters given in A.4, we have for instance Ξ(0, 2) = −1, Ξ(1, 3) = 0, Ξ(2, 5) = 3. Operations (λ−l)ω ld (λ−l)ω ld τδ mδ,λ,ω Z −δ,λ,ω mδ,λ,ω /Πδ,λ,ω uλ τδ × · · · Leading orders + × power λ−2 δ(δ−1)/2 (λ−2)(δ−1) δ−1 δ(λ−1) (λ−2)δ+1 δ(δ+1) (δ+1)2 δ δ Type I: 2(δλ+δ2 ) + × δ−1 (δ+1)(λ−1) (δ+1)λ δ δ Type II: 2δλ Table 4: Elementary operations required for u(τ) in Type I and II implementations. Top: lazy evaluation (computed once). Bottom: required for each hopping frame. A.4 Examples for Type II CHOPoly implementation Table 5 provides examples of predictor matriceso Πδ,λ,ω (cf. (8)) of fixed degree δ and length λ, for different n 1 1 1 integers and rational powers ω ∈ 0, 8 , 4 , 2 , 1, 2 . 26 ω Π0,2,ω 0 1 2 1 8 h 1 4 h 1 2 h h 11 Π1,3,ω i 1 6    5 2 −1    3 0 −3  0.52 0.48 i    0.84 0.31 −0.16    0.51 −0.02 −0.49  0.54 0.46 i    0.85 0.30 −0.15    0.52 −0.05 −0.48  0.59 0.41 i    0.87 0.26 −0.13    0.55 −0.10 −0.45  1 1 3 h 2 1 5 h 21 i 41 i 1 10 1 38 Π2,5,ω    62 18 −6 −10 6   1   54 −13 −40 −27 26  70    10 −5 −10 −5 10    9 2 −1    6 −2 −4     36 4 −2    27 −16 −11     0.89 0.25 −0.09 −0.13 0.08     0.79 −0.21 −0.58 −0.35 0.36    0.15 −0.08 −0.14 −0.06 0.14    0.90 0.23 −0.09 −0.12 0.07     0.80 −0.24 −0.58 −0.32 0.34    0.15 −0.09 −0.14 −0.05 0.13    0.91 0.21 −0.09 −0.09 0.06     0.83 −0.30 −0.58 −0.26 0.31    0.16 −0.10 −0.15 −0.04 0.13    130 24 −12 −8 6   1   125 −60 −80 −20 35  140    25 −20 −20 0 15    9750 1056 −684 −144 186    1   10375 −7216 −5028 368 1501  10164    2275 −2464 −1176 644 721 nTable 5: Typeo II matrices Π0,2,ω , Π1,3,ω and Π2,5,ω , with integer and rational weighting powers ω ∈ 0, 18 , 14 , 12 , 1, 2 . 27 References [1] M. Valášek, Modeling, simulation and control of mechatronical systems, in: Arnold and Schiehlen [12], pp. 75–140. 2 [2] T. Blochwitz et al., The Functional Mockup Interface for tool independent exchange of simulation models, in: C. Clauß (Ed.), Proc. Int. Modelica Conf., Linköping Electronic Conference Proceedings, Linköping Univ. Electronic Press, Dresden, Germany, 2011. doi:10.3384/ecp11063105. 2, 4 [3] A. Ben Khaled-El Feki, Distributed real-time simulation of numerical models: application to powertrain, Ph.D. thesis, Université de Grenoble (May 2014). URL https://tel.archives-ouvertes.fr/tel-01144469 2, 6, 16 [4] M. Sjölund et al., Towards efficient distributed simulation in Modelica using Transmission Line Modeling, in: 3rd Int. Workshop on Equation-Based Object-Oriented Languages and Tools EOOLT, Linköping Univ. Electronic Press, Oslo, Norway, 2010, pp. 71–80. 2 [5] A. Ben Khaled et al., Multicore simulation of powertrains using weakly synchronized model partitioning, in: IFAC Workshop on Engine and Powertrain Control Simulation and Modeling ECOSM, Rueil-Malmaison, France, 2012, pp. 448–455. doi:10.3182/20121023-3-FR-4025.00018. 2 [6] A. Ben Khaled et al., Fast multi-core co-simulation of cyber-physical systems: Application to internal combustion engines, Simul. Model. Pract. Theory 47 (2014) (2014) 79–91. doi:http://dx.doi. org/10.1016/j.simpat.2014.05.002. URL http://www.sciencedirect.com/science/article/pii/S1569190X14000665 3 [7] T. Schierz, M. Arnold, C. Clauß, Co-simulation with communication step size control in an FMI compatible master algorithm, in: Proc. Int. Modelica Conf., Linköping Electronic Conference Proceedings, Linköping University Electronic Press, Munich, Germany, 2012, pp. 205–214. doi: 10.3384/ecp12076205. 3 [8] M. Arnold, Stability of sequential modular time integration methods for coupled multibody system models, J. Comput. Nonlinear Dynam. 5 (3) (2010). doi:10.1115/1.4001389. 3 [9] M. Arnold, Numerical methods for simulation in applied dynamics, in: Arnold and Schiehlen [12], pp. 191–246. 3, 6, 7 [10] A. Ben Khaled et al., Context-based polynomial extrapolation and slackened synchronization for fast multi-core simulation using FMI, in: H. Tummescheit, K.-E. Årzén (Eds.), Proc. Int. Modelica Conf., Linköping Electronic Conference Proceedings, Linköping University Electronic Press, Lund, Sweden, 2014, pp. 225–234. 3, 8, 14, 17, 20 [11] F. Zhang, M. Yeddanapudi, P. Mosterman, Zero-crossing location and detection algorithms for hybrid system simulation, in: M. J. Chung, P. Misra (Eds.), 17th IFAC World Congress, Seoul, South Korea, 2008, pp. 7967–7972. doi:10.3182/20080706-5-KR-1001.01346. 4 [12] M. Arnold, W. Schiehlen (Eds.), Simulation Techniques for Applied Dynamics, Vol. 507 of CISM Courses and Lectures, Springer, 2008. 7, 28 28 [13] M. J. Weinberger, G. Seroussi, G. Sapiro, The LOCO-I lossless image compression algorithm: principles and standardization into JPEG-LS, IEEE Trans. Image Process. 9 (8) (Aug. 2000) (2000) 1309– 1324. doi:10.1109/83.855427. URL http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=855427 7 [14] N. Wiener, Extrapolation, interpolation, and smoothing of stationary time series, MIT Press, 1949. 7 [15] E. Meijering, A chronology of interpolation: from ancient astronomy to modern signal and image processing, Proc. IEEE 90 (3) (Mar. 2002) (2002) 319–342. doi:10.1109/5.993400. 7 [16] R. G. Brown, Smoothing, Forecasting and Prediction of Discrete Time Series, Prentice-Hall, 1962. 7 [17] G. E. P. Box, G. M. Jenkins, G. C. Reinsel, Time Series Analysis: Forecasting and Control, Probability and Statistics, Wiley, 2008. 7 [18] S. Väliviita, S. Ovaska, O. Vainio, Polynomial predictive filtering in control instrumentation: a review, IEEE Trans Ind. Electron. 46 (5) (Oct. 1999) (1999) 876–888. doi:10.1109/41.793335. 7 [19] L. F. Richardson, The approximate arithmetical solution by finite differences of physical problems involving differential equations, with an application to the stresses in a masonry dam, Phil. Trans. R. Soc. A 210 (459-470) (Jan. 1911) (1911) 307–357. doi:10.1098/rsta.1911.0009. URL http://dx.doi.org/10.1098/rsta.1911.0009 7 [20] M. Arnold, C. Clauß, T. Schierz, Error analysis and error estimates for co-simulation in FMI for model exchange and co-simulation V2.0, Arch. Mech. Eng. LX (1) (Jan. 2013). doi:10.2478/ meceng-2013-0005. URL http://dx.doi.org/10.2478/meceng-2013-0005 8 [21] G. Stettinger et al., A model-based approach for prediction-based interconnection of dynamic systems, in: Proc. IEEE Conf. Decision Control, Los Angeles, CA, USA, 2014, pp. 3286–3291. doi:10.1109/ cdc.2014.7039897. URL http://dx.doi.org/10.1109/CDC.2014.7039897 8 [22] M. G. Bellanger, J. L. Daguet, G. P. Lepagnol, Interpolation, extrapolation, and reduction of computation speed in digital filters, IEEE Trans. Acous., Speech Signal Process. 22 (4) (Aug. 1974) (1974) 231–235. doi:10.1109/TASSP.1974.1162581. URL http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=1162581 8 [23] J. Gauthier, L. Duval, J.-C. Pesquet, Optimization of synthesis oversampled complex filter banks, IEEE Trans. Signal Process. 57 (10) (Oct. 2009) (2009) 3827–3843. doi:10.1109/TSP.2009.2023947. 8 [24] V. C. Liu, P. P. Vaidyanathan, Finite length band-limited extrapolation of discrete signals, in: Proc. Int. Symp. Circuits Syst., Vol. 2, Portland, OR, USA, 1989, pp. 1037–1040. doi:10.1109/iscas.1989. 100529. URL http://dx.doi.org/10.1109/ISCAS.1989.100529 8 [25] M. Benedikt, D. Watzenig, A. Hofer, Modelling and analysis of the non-iterative coupling process for co-simulation, Math. Comp. Model. Dyn. Syst. 19 (5) (Oct. 2013) (2013) 451–470. doi:10.1080/ 13873954.2013.784340. URL http://dx.doi.org/10.1080/13873954.2013.784340 8 29 [26] R. W. Hamming, Numerical methods for scientists and engineers, Dover publications, 1973. 8, 9 [27] M. Friedrich, Parallel co-simulation for mechatronic systems, Ph.D. thesis, Technischen Universität München (2011). 8 [28] M. Arnold, Multi-rate time integration for large scale multibody system models, in: IUTAM Symposium on Multiscale Problems in Multibody System Contacts, 2007, pp. 1–10. doi:10.1007/ 978-1-4020-5981-0_1. URL http://dx.doi.org/10.1007/978-1-4020-5981-0_1 8 [29] S. Hoher, S. Röck, A contribution to the real-time simulation of coupled finite element models of machine tools — a numerical comparison, Simul. Model. Pract. Theory 19 (7) (aug 2011) (2011) 1627–1639. doi:10.1016/j.simpat.2011.03.002. URL http://dx.doi.org/10.1016/j.simpat.2011.03.002 8 [30] J. Nutaro et al., The split system approach to managing time in simulations of hybrid systems having continuous and discrete event components, Simul. T. Soc. Mod. Sim. 88 (3) (May 2012) (2012) 281– 298. doi:10.1177/0037549711401000. URL http://dx.doi.org/10.1177/0037549711401000 [31] M. Busch, Zur effizienten Kopplung von Simulationsprogrammen, Ph.D. thesis, Universität Kassel (2012). 8 [32] S. Oh, S. Chae, A co-simulation framework for power system analysis, Energies 9 (3) (feb 2016) (2016) 131. doi:10.3390/en9030131. URL http://dx.doi.org/10.3390/en9030131 8 [33] M. Busch, Continuous approximation techniques for co-simulation methods: Analysis of numerical stability and local error, ZAMM (2016). doi:10.1002/zamm.201500196. URL http://dx.doi.org/10.1002/zamm.201500196 8 [34] C. Faure, Real-time simulation of physical models toward hardware-in-the-loop validation, Ph.D. thesis, Université Paris-Est, France (Oct. 17, 2011). 8 [35] B. Beckermann, E. B. Saff, The sensitivity of least squares polynomial approximation, in: Applications and Computation of Orthogonal Polynomials, Vol. 131 of Int. Ser. of Num. Math., Birkhäuser, 1999, pp. 1–19, conference at the Mathematical Research Institute Oberwolfach, Germany. 9 [36] E. S. Gardner, Jr., Exponential smoothing: The state of the art — part II, Int. J. Forecast. 22 (4) (2006) (2006) 637–666. doi:DOI:10.1016/j.ijforecast.2006.03.005. URL http://www.sciencedirect.com/science/article/pii/S0169207006000392 9 [37] E. L. Kaltofen, W.-S. Lee, Z. Yang, Fast estimates of Hankel matrix condition numbers and numeric sparse interpolation, in: Proc. Int. Workshop Symbolic-Numeric Computation, San Jose, California, USA, 2011, pp. 130–136. doi:10.1145/2331684.2331704. URL http://dx.doi.org/10.1145/2331684.2331704 11 [38] H. Wang, L. Chen, Y. Hu, A state event detecting algorithm for hybrid dynamic systems, Simul. T. Soc. Mod. Sim. 91 (11) (Nov. 2015) (2015) 959–969. doi:10.1177/0037549715606968. URL http://dx.doi.org/10.1177/0037549715606968 30 [39] J. M. Peña, T. Sauer, On the multivariate Horner scheme, SIAM J. Numer. Anal. 37 (4) (2000) (2000) 1186–1197. doi:10.1137/s0036142997324150. URL http://dx.doi.org/10.1137/S0036142997324150 11 [40] Z. Benjelloun-Touimi et al., From physical modeling to real-time simulation: Feedback on the use of Modelica in the engine control development toolchain, in: Proc. Int. Modelica Conf., Linköping Electronic Conference Proceedings, Linköping Univ. Electronic Press, Dresden, Germany, 2011. doi: 10.3384/ecp11063. 16 [41] P. Fritzson, Principles of object-oriented modeling and simulation with Modelica 2.1, Wiley, 2010. 16 [42] M. Ben Gaı̈d et al., Heterogeneous model integration and virtual experimentation using xMOD: Application to hybrid powertrain design and validation, in: 7th EUROSIM Congress on Modeling and Simulation, Prague, Czech Republic, 2010. 16 [43] A. C. Hindmarsh, L. R. Petzold, Algorithms and software for Ordinary Differential Equations and Differential-Algebraic Equations, part II: Higher-order methods and software packages, Comput. Phys. 9 (1995) (1995) 148–155. 17 [44] D. Broman et al., Requirements for hybrid cosimulation, Tech. Rep. UCB/EECS-2014-157, Electrical Engineering and Computer Sciences, University of California at Berkeley (Aug. 16, 2014). URL http://www.eecs.berkeley.edu/Pubs/TechRpts/2014/EECS-2014-157.html 22 [45] X. Ning, I. W. Selesnick, L. Duval, Chromatogram baseline estimation and denoising using sparsity (BEADS), Chemometr. Intell. Lab. Syst. 139 (Dec. 2014) (2014) 156–167. doi:10.1016/j. chemolab.2014.09.014. 23 [46] F. González et al., On the effect of multirate co-simulation techniques in the efficiency and accuracy of multibody system dynamics, Multibody Syst. Dyn. 25 (4) (Dec. 2010) (2010) 461–483. doi: 10.1007/s11044-010-9234-7. URL http://dx.doi.org/10.1007/s11044-010-9234-7 23 [47] C. Chaux, J.-C. Pesquet, L. Duval, Noise covariance properties in dual-tree wavelet decompositions, IEEE Trans. Inform. Theory 53 (12) (Dec. 2007) (2007) 4680–4700. doi:10.1109/TIT.2007. 909104. 23 [48] A. Repetti et al., Euclid in a taxicab: Sparse blind deconvolution with smoothed `1 /`2 regularization, IEEE Signal Process. Lett. 22 (5) (May 2015) (2015) 539–543. arXiv:1407.5465, doi:10.1109/ LSP.2014.2362861. URL http://dx.doi.org/10.1109/LSP.2014.2362861 23 [49] T. Schierz, M. Arnold, C. Clauß, Co-simulation with communication step size control in an FMI compatible master algorithm, in: Proc. Int. Modelica Conf., Linköping Electronic Conference Proceedings, Munich, Germany, 2012, pp. 205–214. doi:10.3384/ecp12076205. 23 [50] S. Sadjina et al., Energy conservation and power bonds in co-simulations: Non-iterative adaptive step size control and error estimation, PREPRINT (Feb. 2016). 23 [51] S. M. Stigler, Gauss and the invention of least squares, Ann. Statist. 9 (3) (1981) (1981) 465–474. URL http://projecteuclid.org/euclid.aos/1176345451 24 31 [52] G. F. C. de Bruyn, J. M. de Villiers, Formulas for 1 + 2 p + 3 p + . . . + n p , Fibonacci Q. 32 (3) (1994) (1994) 271–276. 24 [53] T. N. E. Greville, Some applications of the pseudoinverse of a matrix, SIAM Rev. 2 (1) (Jan. 1960) (1960) 15–22. doi:10.1137/1002004. URL http://dx.doi.org/10.1137/1002004 25 32
5cs.CE
arXiv:1709.02478v1 [math.GR] 7 Sep 2017 Closure Properties in the Class of Multiple Context Free Groups. Robert P. Kropholler and Davide Spriano September 11, 2017 Abstract We show that the class of groups with k-multiple context free word problem is closed under amalgamated free products over finite subgroups. We also show that the intersection of two context free languages need not be multiple context free. 1 Introduction Multiple context free languages (MCFLs) are a generalizations of context free languages introduced by linguists to better model natural languages [Pol84], but they can be used as a tool to better understand some classes of groups. Given a presentation for a group G, it is a natural question to ask whether two words represents the same element in G. Using the elementary fact that g = h ↔ gh−1 = 1, this is equivalent to establish whether a given product of generators represents the identity element. One of the most successful strategy to tackle this question is to consider the set of all words that represents the trivial element, the so-called word problem, and study it via language theoretical instruments. A remarkable result of Muller-Schupp [MS81], which relies on results of Stallings and Dunwoody [Sta71, Dun85] shows that the class of groups that have context free word problem coincides with the class of virtually free groups. This motivates the study of groups whose word problem is multiple context free (MCF groups), hoping that the weakened restrictions on the word problem will encode a larger and more interesting class of groups. The class of MCFLs is strictly larger than the class of CF languages, for example the language {an bn cn : n ∈ N} is MCF but not CF. However, it wasn’t clear until [Sal15], where it is proved that Z2 is MCF, that the difference can be seen on the level of groups, namely that there are groups with a word problem that is MCF, but not CF. A recent result of Ho [Ho17] shows that the word problem for Zn is MCF, generalizing the result of Salvati [Sal15]. This leads to some natural questions about the closure properties of MCF groups: is the class of MCF groups closed under direct product, free product 1 or subgroups? Seki et al. [SMFK91] gives us the closure under subgroups and supergroups of finite index. Gilman, Kropholler and Schleimer [GKS17] showed that F2 × F2 is not an MCF group, thus showing that the class is not closed under direct product. In this paper we will prove the following result. Theorem 1.1. Let G1 and G2 be groups whose word problem with multiple context free. Let Hi be a finite subgroup of Gi , such that H1 ∼ = H2 ∼ = H. Then G = G1 ∗H G2 has a multiple context free word problem. Since the class groups with regular word problem coincides with the class of finite groups, one could rephrase this result as saying that the class of MCF groups is closed under amalgamation over regular groups. This result is not true substituting regular groups with CF groups. Indeed, F2 × F2 = (Z2 ∗Z Z2 ) ∗F2 (Z2 ∗Z Z2 ). Acknowledgements We greatly thank Bob Gilman for introducing us to the subject and making this project possible. This work was started at MSRI, Berkeley, where research is supported by the National Science Foundation under Grant No. DMS-1440140. The second author would like to thank UC Berkeley for inviting him as a visiting scholar. The first author would like to thank Alessandro Sisto for inviting me to complete this work at the ETH. Finally, we would like to thank Neil Fullarton for his invaluable work with a stapler. 2 Background We are interested in the study of formal languages. In this section, we will give an introduction to formal languages and MCFLs. For a more comprehensive treatment, we refer to [HU69]. Definition 2.1. Given a finite set Σ, Σ∗ is the free monoid over S, i.e. the set of all finite words in Σ with the concatenation operation. We will denote with ε the trivial element of Σ∗ , namely the empty word. Definition 2.2. Given a finite set Σ, we say that a set L ⊆ Σ∗ is a language over Σ. Since the definition of language is very broad, we will restrict our attention to languages that have a nice description. The reader should think of this as the same meta-distinction between continuous functions R → R and continuous functions that can be phrased in terms of elementary functions. Hence we want to prescribe a general recipe that will allow us to produce languages. 2 Chomsky grammars and hierarchy. Definition 2.3. A Chomsky grammar G is a tuple (Σ, N, δ, S) where Σ and N are (disjoint) finite sets, S ∈ N and δ is a finite subset of (Σ ∪ N )∗ r Σ∗ × (Σ ∪ N )∗ . Namely, if (x, y) ∈ δ, then x contains at least one symbol of N . We call Σ the set of terminals of G, N the set of non terminals, S the starting symbol and δ the production rules. Notation. We will often use the following conventions: the elements of Σ will be denoted by lower case letters (ex. {a, b, c}), the elements of N by upper case letters (ex. {A, B, S}), and elements τ = (aB, BccA) of δ as τ : aB → BccA. Given a grammar G = (Σ, N, S, δ), it is always possible to associate a (possibly empty) language L(G) ⊂ Σ∗ . We will describe inductively the language L(G). Definition 2.4. Let G = (Σ, N, S, δ) be a grammar. We want to describe a subset D(G) ⊆ (Σ ∪ N )∗ of derivable words. · S is derivable, · for u, v, w ∈ (Σ ∪ N )∗ , if uvw is derivable and the rule v → x is an element of δ, then uxw is derivable. In particular, we say that uxw is derivable from uvw. We say that a derivation (for wk ) is a chain of words S = w1 , . . . , wk such that wi+1 is derivable from wi . The language associated to the grammar G is the intersection L(G) = D(G) ∩ Σ∗ , namely all the derivable words that consists only of terminals symbols. Example 2.5. Let G = ({a, b, c}, {A, B, S}, S, δ) be a grammar, where δ consist of the following rules: · τ1 : S → AB, · τ2 : A → aAb, · τ3 : B → ABc, · τ4 : A → ε, · τ5 : B → ε. To generate the language L(G), we will try to understand the derivable words. We start with the symbol S. The only rule we can apply at the first step is τ1 , yielding AB. Then we can substitute A with aAb, using rule τ2 , getting aAbB. Applying τ2 k more times gives ak Abk B. Rule τ4 gives ak bk B. Now, if we apply rule τ3 , we will get ak bk ABc. We can repeat the process above and get some word of the form ak1 bk1 · · · akn bkn Bcm . After applying rule τ5 , we would get ak1 bk1 · · · akn bkn cm , which is a string composed of non terminals only. We now give a classification of some grammars. Definition 2.6. A Chomsky grammar G = (Σ, N, δ, S) is called: 3 · regular if all the elements of δ have the form X → wY , where X ∈ N , Y ∈ N ∪ {ε}, and w ∈ Σ∗ ; · context free if all the elements of δ have the form X → w, where X ∈ N and w ∈ (Σ ∪ N )∗ ; · recursively enumerable otherwise. The language L(G) is regular (respectively context free or recursively enumerable) if G is. The intuitive idea that one should have about the above definition is the following: a derivation in a regular language consists of substituting the last letter of a word with a new string of letters. A derivation in a context free language consists of substituting a single letter (but not necessarily the last one) of a word with a new string of letters. The last case covers all other possibilities. The gap between being context free and being recursively enumerable seems (and in fact is) very big. The class of multiple context free languages (MCFLs) that we are going to describe, is one of the classes that properly lives in this gap, namely properly contains context free languages, and is properly contained in the class of recursively enumerable languages [SMFK91]. As before, we are going to describe a grammar that defines the class of MCFLs. It should be noted that this will not be a Chomsky grammar. We start with the definition of linear rewriting function. The idea is very simple, but the definition may look a bit convoluted. Intuitively, a linear rewriting function is a function that “paste words together”, possibly adding some string of letters. For instance, if a, b are letters and v, w words, a linear rewriting function is (v, w) 7→ waabvb. Definition 2.7. Fix a finite alphabet Σ, and let X = {x1 , . . . xn } be a finite (possibly empty) set of variables. A rewriting on the variables {x1 , . . . , xn } is a word w ∈ (X ∪ Σ)∗ . We say that a rewriting w is linear if each element of X occurs at most once. Given a rewriting w, we can associate to it the function fw : (Σ∗ )n → Σ∗ that associates to each tuple (u1 , . . . , un ) the word obtained substituting in w each occurrence of xi with ui . If n = 0, then (Σ∗ )0 = {ε} and fw is the constant function w. A rewriting function is linear if it comes from a linear rewriting. We say that a function f : (Σ∗ )n → (Σ∗ )m is a (multiple) rewriting function if it is a rewriting function in each component. A (multiple) rewriting function coming from rewritings w1 , . . . , wm is linear if w1 · · · wm is linear. Note that being linear in each component is not enough for a multiple rewriting function to be linear. In fact, the whole word w1 · · · wm must be linear, this implies that each variable xi appears in at most one of the wj . In order to simplify notation, from now on we will call multiple rewriting functions simply rewriting functions. Definition 2.8. A stratified set is a set N equipped with a function k · k : N → N r {0}. The function k · k is called a dimension. 4 Definition 2.9. A multiple context free grammar (MCFG) on an alphabet Σ is a tuple (Σ, N, S, F ) satisfying the following: · Σ is a finite set of terminals. · N is a finite stratified set of non terminals. · S ∈ N is the starting symbol such that kSk = 1. · F is a finite set of elements of the form (A, f, B1 , . . . , Bs ), where A, B1 , . . . , Bs are elements of N , and f : (Σ∗ )kB1 k+···+kBs k → (Σ∗ )kAk is a linear rewriting function. Given an element τ = (A, f, B1 , . . . , Bs ) of F , we will denote it by τ = A → f (B1 , . . . , Bs ). We say that the grammar is k-MCF if kAk ≤ k for all A ∈ N . As in the case of Chomsky grammars, given a MCFG H, we want to associate a language L(H) to it. Definition 2.10. Let H = (Σ, N, S, F ) be a MCFG, and let A ∈ N . We inductively define DH (A) ⊆ (Σ∗ )kAk as follows: for each τ ∈ F : · if τ = A → f (ε), then f (ε) ∈ DH (A); · if τ = A → f (B1 , . . . , Bs ) and y1 ∈ DH (B1 ), . . . , ys ∈ DH (Bs ), then f (y1 , . . . , ys ) ∈ DH (A). Definition 2.11. For a MCFG H = (Σ, N, S, F ), we define the language associated to H as DH (S). We say that a language L is a multiple context free language if there is a MCFG H such that L = DH (S). It is a well known fact that the class of context free language is not closed under intersection. However, it is natural to ask if intersection of context free languages are contained in a larger class. A possible guess is the class of multiple context free languages. We will show, however, that this is not the case. Proposition 2.12 ([SMFK91]). If L is a k-MCFL and R is a regular language, then L ∩ R is again a k-MCFL. Lemma 2.13 ([SMFK91] Lemma 3.3). The language {(an bn )k : n ∈ N} ⊆ {a, b}∗ is a k-MCFL, but not a (k − 1)-MCFL, for each k ∈ N. Proof. This is a consequence of the pumping lemma for MCF languages which is Lemma 3.2 in [SMFK91]. Proposition 2.14. The intersection of two context free languages need not be a MCFL. Proof. It is easily seen that the following two are CFL: · L1 = {an1 bn1 · · · ank bnk : n1 , . . . , nk , k ∈ N∗ } ⊆ {a, b}∗ ; · L2 = {an1 bn2 an2 · · · bnk : n1 , . . . , nk , k ∈ N∗ } ⊆ {a, b}∗ . 5 Intersecting these two languages, we get L = {(an bn )k : n, k ∈ N}. Consider the family {Rk } of regular languages defined as Rk = {(a∗ b∗ )k }. Intersecting L with each element of {Rk }, Lemma 2.13 gives that L is not k-MCFL for each k. 3 Grammars and automata The goal of this section is to explain the relation between grammars and automata. In what follows, an automaton should be thought as a “computer with limitations”, namely as a machine that can do some operations, but does not possess the power (usually memory) of a Turing machine. As in the case of grammars, an automaton is naturally associated to a language. The intuitive explanation for this is the following: an automaton is associated to an algorithm that, given a word, either “accepts” or “rejects” it. The language associated to an automaton is the set of all “accepted” words. In what follows, we fix a finite alphabet Σ, and all the definitions are understood to be dependent on Σ. Recall that a partial function f : A 99K B is a map of sets defined on a subset C ⊆ A, called the domain of f . Definition 3.1. A storage type is a tuple T = (C, P, F, CI ) satisfying the following: C is a set, called the set of storage configurations; P is a subset of the power set P(C), and the elements of P are called predicates; F is a set of partial functions f : C 99K C called instructions; and CI ⊆ C is a set of initial configurations. Definition 3.2. An automaton with storage is a tuple M = (Q, T, I, δ), where Q is a finite set of states, T = (C, P, F, CI ) is a storage type, I is a tuple I = (qI , cI , QF ) where qI ∈ Q is the initial state, QF ⊆ Q are the final states, and cI ∈ CI is the initial storage configuration. Finally δ ⊆ Q×(Σ∪{ε})×P ×F ×Q is a finite set of transitions. Definition 3.3. Given an automaton with storage M = (Q, T, I, δ), we define the graph realisation of M, denoted by Γ(M), as the following oriented labelled graph: · The vertices of Γ(M) are the elements of Q × C. · To each τ = (q1 , σ, p, f, q2 ) ∈ δ, we associate an oriented edge between the pair ((q1 , c1 ), (q2 , c2 )) if c1 ∈ p, f (c1 ) = c2 . In that case the label of this edge is σ. Note that f is a partial function, so with f (c1 ) = c2 we are also asking that c1 is in the domain of f . Definition 3.4. Let Σ be an alphabet, and let g : (Σ ∪ {ε})∗ → Σ∗ be the morphism of monoids that sends ε to the empty word, and is the identity on all the other generators. Given a word w ∈ Σ∗ we say that a word w0 ∈ (Σ ∪ {ε})∗ is an ε-expansion of w if g(w0 ) = w. 6 Definition 3.5. Given an automaton with storage M we define a language L(M) ⊆ Σ∗ as follows. A word w is in L(M) if and only if there is an oriented path γ in Γ(M) starting from (qI , cI ) and ending in a vertex (q, c) with q ∈ QF such that the word formed by the labels of γ is an ε-expansion of w. In order to improve the readability of the above definitions, we will provide a fairy tale example to clarify the role of the various entities above. Imagine there is a group of children playing a treasure hunt in a town. The town is finite (as towns tend to be) and each block of the town is one of the states Q. The children possess an extremely bad memory, but luckily each of them is equipped with a book to write notes. The set of all possible books open on all possible pages is the set of storage configurations C. The set P can contain a single element for instance, say the set of all books open on a blank page. Now suppose that there is a voice guiding the game in order to help the children find the treasure, and in particular every now and then is reading out loud some hint (the alphabet Σ). The voice represents the word w in the alphabet. When a hint (letter) is read, the children will perform an action, and the possible actions are encoded in the set δ. At the start of the game, the children will all be in the central block of the city (qI ), with an empty book open on the first page (cI ), and the treasure will be buried in some blocks (QF ) of the city. The typical turn (an element of δ) will work as follows: every child will check on which block they are standing on (element of Q), then listen to what the voice is saying (Σ), and look if there is something written on the book (P ). After doing that, they may write something on the book (F ), and go to a new block (Q). If at any time a child cannot perform an action, then he or she is disqualified from the game. When the voice stops giving hints, each child will start digging exactly where they stand and see if a treasure is found. If at least one child has found a treasure, then the instructions were correct (and hence the word w is accepted). Let’s start with some famous automata in order to familiarize with the above concepts. Definition 3.6. A trivial storage is a storage type T = (C, P, F, CI ) with C = {CI }, P = {C} and F = {id}. Definition 3.7. A finite state automaton (FSA) is an automaton with storage with trivial storage. It is a very easy exercise to see that a FSA is completely described by a finite oriented graph with edges labeled by elements of Σ (and not Σ ∪ {ε}). The following theorem forms a bridge between languages associated to grammars, and languages accepted by automata. Theorem 3.8. [HU69] For a language L ⊆ Σ∗ the following are equivalent: · L is associated to a regular grammar; 7 · L is accepted by a FSA. Definition 3.9. A push-down storage over a finite alphabet alphabet Ω is a storage type T = (C, P, F, CI ) where: • C = Ω∗ . • We define the set equalsω as the set of words in Ω∗ that end with ω (note that equalsε is the set {ε}). Then P = {equalsω : ω ∈ Ω ∪ {ε}}. • We define the function pushω : Ω∗ → Ω∗ that sends x to xω. We also define a partial function popω : equalsω → Ω∗ that sends xω to x. Then F = {Id} ∪ {popω , pushω : ω ∈ Ω}. • CI = {ε}. The intuitive idea behind the push-down storage is to have a stack of papers that can grow arbitrarily large, but the automaton can read only what is written on the top-most paper. This corresponds to the predicate equalsω . Then one can put another paper on top with the letter ω 0 (pushω0 ) or remove the old one (pullω ). Note that the alphabet Ω is, in general, not the same as Σ. Definition 3.10. A push-down automaton is an automaton with storage with push-down storage. Theorem 3.11. [Cho62] For a language L ⊂ Σ∗ the following are equivalent: · L is associated to a context-free grammar; · L is accepted by a push-down automaton. We now want to describe the last automaton we are interested in, namely the tree-stack automaton. Definition 3.12. Let S be a set. If uv ∈ S ∗ we say that u is a prefix for uv. Given a set D ⊆ S ∗ we say that D is prefix-closed if for each word w ∈ D, all the prefixes of w are in D. Similarly, we say that v is a suffix for uv. Definition 3.13. Given an alphabet Ω, an Ω-tree is a partial function T : N∗ 99K Ω ∪ {g} such that domain(T ) ⊆ N∗ is prefix-closed and T −1 (g) = {ε}. Note that, this corresponds to a rooted tree, in the usual graph-theory sense, where each edge is labeled by a natural number, the root is labeled by the symbol g and every other vertex is labeled by an element of Ω. Definition 3.14. An Ω-tree with a pointer is a pair (T, p) such that T is an Ω-tree and p ∈ domain(T ). One should think of the pointer as a selected vertex of the tree. Figure 1 may provide some clarification. 8 g 1 2 b b 1 1 a   ε     1    11    2 T:  21      22     23    231 3 2 c a a 1 7→ g 7→ b 7→ a 7→ b 7→ c 7→ a 7→ a 7→ c c Figure 1: Graphic representation of(T, 21) Notation. Let F : C 99K X be a partial function, and let c 6∈ domain(F ). Then we define F [c 7→ x] as the partial function defined on domain(F ) ∪ {c}, that agrees with F on domain(F ) and sends c to x. Definition 3.15. A tree-stack storage over a finite alphabet alphabet Ω is a storage type T = (C, P, F, CI ) where: • C = {(T, p) : (T, p) is an Ω-tree with pointer}. • For ω ∈ Ω ∪ {g}, we set equals(ω) = {(T, p) ∈ C : T (p) = ω} and notequals(ω) = {(T, p) ∈ C : T (p) 6= ω}. Then P = {equals(ω), notequals(ω) : ω ∈ Ω ∪ {g}} ∪ {C}. • For n ∈ N and γ ∈ Ω, we define the following partial functions: · pushn γ : {(T, p) : pn 6∈ domain(T )} → C as the map (T, p) 7→ (T [pn 7→ γ], pn). · upn : {(T, p) : pn ∈ domain(T )} → C as the map (T, p) 7→ (T, pn). · down : C − equalsg → C as the map that sends (T, pm) 7→ (T, p), for m ∈ N. · setγ : C − equalsg → C as the map that sends (T, p) to (T 0 , p), where T 0 is obtained by T changing the value of p to γ. Then F = {Id, pushn (γ), upn , down, setγ : γ ∈ Ω, n ∈ N}. • CI = {(ε 7→ g, ε)}. Notation. For a subset F of Ω, we will write notequals(F ) to indicate the finite union of {equals(ω) : ω ∈ Ω−F }. In particular, with (q, a, notequals(F ), f, q 0 ) we will indicate the finite set of rules {(q, a, equals(ω), f, q 0 ) : ω ∈ Ω − F }. Definition 3.16. A tree-stack automaton is an automaton with storage with tree-stack storage. 9 Definition 3.17. We say that a tree-stack automaton is k-restricted if for any p ∈ N∗ , n ∈ N and any path in the graph realisation Γ(M), starting at (qI , cI ) the following holds. There are at most k edges of the form (q1 , (T1 , p)) to (q2 , (T2 , pn)), where q1 , q2 ∈ Q and T1 , T2 are tree-stacks. Theorem 3.18. [Den16] For a language L ⊂ Σ∗ the following are equivalent: · L is associated to a k-MCFG; · L is accepted by a k-restricted tree-stack automaton. Definition 3.19. A tree-stack automata is cycle-free if for every non-trivial loop in the graph realisation Γ(M), there is at least one push, up or down command. Lemma 3.20. [Den16] Given a k-restricted tree-stack automaton M there exists a tree-stack k-restricted automaton M0 such that L(M) = L(M0 ) and M0 is cycle-free. 4 Closure under free products In this section we prove that the class of groups whose word problem is multiple context free is closed under free products. To do this we will show that given G1 and G2 with multiple context free word problem we can construct a tree-stack automaton which accepts the word problem for G1 ∗ G2 . Lemma 4.1. Let M be a tree-stack automaton accepting the language M . Then there exists a tree-stack automaton M0 such that L(M0 ) = L and M0 accepts a non-empty word only if the tree-stack storage is in the state (T, ε) for some Ω-tree T . Proof. We build a new automaton which accepts the same language as follows. Add two extra states qf , q̄f to our automaton. We add the following transitions to δ. (q, ε, C, Id, qf ), ∀q ∈ QF (qf , ε, C, down, qf ) (qf , ε, equalsg , q̄f ) We change the set of accept states to {q̄f }. The language accepted by this new automaton is the same language as before. It should be noted that the new automaton has a single accept state and if M was cycle-free, then so is M0 . It will also be useful to know that the amount of time spent at any vertex in the tree-stack is uniformly bounded. Definition 4.2. A run in a tree-stack automaton is a path in the graph realisation. This can be seen as a valid sequence of instructions. An accepted run is a run which ends in an accepted state. 10 Lemma 4.3. If M is a k-restricted cycle-free tree-stack automaton, then there is an n such that, for each p ∈ N∗ and each path in the graph realisation of M starting at (qI , cI ), there are at most n vertices in the run of the form (q, (T, p)), where q and T may vary. Proof. Consider the two possibilities for entering a vertex of the form (q, (T, p)), where p is fixed and q and T may vary. Either we have an edge (q1 , (T2 , pm)) → (q, (T, p)) or (q2 , (T2 , p̄)) → (q, (T, p)), where p̄l = p for some l. There are only k possibilities of the second instance since the automaton is k-restricted. In the first instance, there must have been an edge of the form (q 0 , (T 0 , p)) → 00 (q , (T 00 , pm)) previosuly in the path. There are at most k such edges by krestrictedness. Since δ is finite there can only be a finite number of instructions that contain a push command. Therefore, there are a bounded number of choices for m. We will not require the exact bound, however, it can be calculated. A good estimate is k(number of push commands)(length of the longest path in the automaton with no movement in the tree). Let G1 , G2 be groups with multiple context free word problem, we now create the automaton which will accept the word problem for G1 ∗ G2 . Ideally, one would like to take the “free product” of the automata. However, this will results in something infinite. The key idea is to do this at the level of the tree-stack storage only. Theorem 4.4. If G1 and G2 are groups with multiple context free word problem, then G1 ∗ G2 has multiple context free word problem. Proof. Let Wi be the word problem in Gi and W be the word problem in G1 ∗G2 . Let Mi = (Qi , Ti , Ii , δi ), where Ti is a tree-stack storage over the alphabet Ωi and Ii = (qIi , ciI , QiF = {qfi }) be an automaton recognising the language Wi . We will assume that these automata are k-restricted, cycle-free and accept a word if and only if the stack pointer is at the root. Let n be the maximum of the two bounds obtained from Lemma 4.3 applied to M1 and M2 . We now define the automaton M that will recognise the language W . The states of M are Q = Q1 t Q2 t {S, F }, the storage type T is the set of tree-stacks on the alphabet Ω = Ω1 t Ω2 t (Q × {1 , 2 }). The initial state is S, with empty initial tree and the final state is F . The transitions are δ = δ10 tδ20 tδ3 where δi0 is δi where any g symbol is replaced with a set of instructions one for 11 0 1 , equals((q , 1 )), down, q 0 ) (q f , ε ls((q tequa o n , ε (q , M1 0 , 1)), pushi ((q, 2 )) , q 2) I 1 (q , ε , note ), q I ) quals((q 0,  )), pushi((q,  1) 2 (S , M2 2) 0 (qf1, ε, ,qI ,q) 0 n ) e w qu o d al , )) s( (q  , 2 1 (q 1 pu , S) f ,ε sh (S n, w ,e 2 h o 1 (S qu d us , al )) , ,p 2 C s(( 1 ),  , ,ε S, qI 1 S, (S )  s(( l 1 )) ua ,d S eq ow , ε n, 2, S) (q f ε, C, (S, ε, equals(g), Id, F ) F Figure 2: A depiction of the automata accepting the language L1 ∗ L2 S each element of Q × {i } and δ3 = {(S, ε, equals(g), Id, F ), (S, ε, C, push1 (S, 1 ), qI1 ), (S, ε, C, push2 (S, 2 ), qI2 ), (qf1 , ε, equals((S, 1 )), down, S), (qf2 , ε, equals((S, 2 )), down, S)}∪ {(q, ε, notequals((q 0 , 1 )), pushi ((q, 2 )), qI2 ) : q ∈ Q1 , q 0 ∈ Q2 , i ∈ {−1, . . . , −n}}∪ {(q, ε, notequals((q 0 , 2 )), pushi ((q, 1 )), qI1 ) : q ∈ Q2 , q 0 ∈ Q1 , i ∈ {−1, . . . , −n}}∪ {(qf1 , ε, equals((q 0 , 1 )), down, q 0 ) : q 0 ∈ Q2 }∪ {(qf2 , ε, equals((q 0 , 2 )), down, q 0 ) : q 0 ∈ Q1 } The reader should note that tree-stacks were defined with N and negative labels have been used above. One should note that Z is countable so the labels 12 → → γ γ γ (q1 , 2 ) (q1 , 2 ) qI2 q1 q1 q1 qI2 qf2 Figure 3: The process of opening a new tree and returning to an old tree once the word is accepted. can be made positive. We want to show that W = L(M). The way the automaton above works is as follows. We start with our word and move to one of the automata M1 or M2 , say M1 . We then read a word in Σ1 and move in this automaton as usual. When we come to a letter from Σ2 we move to the automaton M2 recording the state q ∈ Q1 where we left M1 and opening a new branch on the tree. Later we will read a letter of Σ1 , if we do this at the final state of M2 then we move back to q, otherwise we open a new branch and move to qI1 and continue this process. An accepted run Λ of the automaton will have the pointer start and end at the root of the tree-stack. Let Tf be the final tree-stack for the run. We can colour the non-root vertices of Tf red and blue as follows. Colour a vertex red if the label is from Ω1 ∪ (Q2 × {1 }) and blue otherwise. Note that after each instruction there is a tree-stack which embeds, as a graph, into Tf . Since the only set commands are to be found in δ10 and δ20 , one could colour a vertex upon creation, the above embedding will then be colour preserving. There is a subtree Tc ⊂ Tf of a single colour whose complement is connected. For each instruction there are two possible pointers, these can be viewed as vertices of Tf . Let Θ be the instructions in Λ such that both pointers are in Tc . We claim that all the elements of Θ are consecutive. This is because there are no up commands with negative labels, so once we leave Tc there is no way to return. Note that Θ start at the initial state of one of the automaton and ends at the corresponding final state. In particular, it can be viewed as an accepted run in Mi and the subword v of the run Λ associated to Θ is an element of Wi . Using the above, Λ decomposes as Λ1 θ1 Θθ2 Λ2 , where θ1 ∈ δ3 is an instruction containing a push command and θ2 ∈ δ3 is an instruction containing a down command. However, to leave the tree Tc , θ1 and θ2 pair up, by which we mean that the state of the automaton and the pointer before θ1 and after θ2 are the 13 same. Also, the tree-stacks outside Tc remains unchanged. Thus, Λ1 Λ2 is an accepted run of M. As a consequence, we have that the word w corresponding to the run Λ decomposes as w1 vw2 , where v is an element of Wi and w1 w2 is accepted by M. By considering words that are trivial in G1 ∗ G2 , we have that if w1 w2 is an element of W , then so is w. For the base case, note that if Tc = Tf , then w ∈ Wi . Thus by induction on the number of maximal one-colored subtrees, L(M) is a subset of W . For the other direction, we will use induction on the free product length of the word w ∈ W . The free product length of w is the p such that w = w1 w2 . . . wp and if wi ∈ Wj , then wi+1 ∈ / Wj . It is clear that words of length 1 are in the language L(M). If w = w1 . . . wp has length p and is an element of W , then there is an i such that wi is an element of Wj . We will assume that wi ∈ W1 . The run the machine will take is as follows, make the run for the word w1 . . . wi−1 wi+1 . . . wp , which exists by induction hypothesis. At the point where the word wi is read we will open a new tree and move to the automaton M1 following a run for this word. This run will finish at the root of the new tree and then return to the automaton M2 to continue the run where it left off. To make sure that we can do this process we have to be able to push a new edge at the correct moment. This may not be possible if we have already pushed n edges at this vertex. However, we assumed that the automaton M1 can only spend a uniformly bounded amount of time at any vertex and we added more push commands than this bound. Thus, there will always be a run for the word w1 . . . wi−1 wi+1 . . . wp , where we can make a push at the desired moment. In fact in the proof we have shown a slightly stronger result. Corollary 4.5. If G1 and G2 are groups whose word problem is k-MCF, then the word problem in G1 ∗ G2 is k-MCF. Proof. It is clear from the proof of Theorem 4.4 that the automaton constructed is max{k1 , k2 }-restricted. Indeed, all the instruction that contains commands up are contained in δ10 ∪ δ20 . Applying instructions contained in δi0 will not move the pointer to a vertex of a different colour (where the colouring is defined as in the proof of Theorem 4.4). Thus, if a vertex is contained in the interior of a one-colored subtree, say the colour corresponding to W1 , then that vertex will satisfy the k1 -restriction condition. 5 Amalgamated Free Products In this section we generalise the previous result to show that the class of groups with multiple context free word problem is closed under amalgamation over finite subgroups. The idea is similar to the previous proof, there are however more details. We feel that the interested reader should understand the proof of Theorem 4.4 14 which encapsulates most of the details in an easier setting. The key idea is the following: Proposition 5.1. Let G be a group with multiple context free word problem. Let H be a finite subset of G. Then {w ∈ Σ∗ : w represents an element of H} is a multiple context free language. Proof. For each h ∈ H, let vh be a word representing h−1 in Σ. Let R = {vh : h ∈ H}. Since H is a finite set, so is R. Let R0 be the set of (possibly empty) suffixes of words in R. Let M = (Q, T, I, δ) be an automaton recognising the word problem in G with start state qI and a single final state qf , where T is the set of tree-stacks over the alphabet Ω. Assume that this automaton has been modified as in Lemma 4.1. The idea is the following: let w be the input word. We will build an automaton that will “guess” an element of H, say h, and then proceed to process the word vh w in M. The way this is done, is by adding a ”second variable” to the states. The second variable represents the new word that is inserted. If the second variable is empty, then the automaton acts exactly as before. Otherwise, if the automaton is in a state (q, v), where v = a1 · · · an is a (non trivial) word, the automaton acts as if it was in the state q and the first letter of v (that is, a1 ) is read. Then the second variable becomes a2 · · · an . More formally. We will build a new automaton M0 = (Q0 , T 0 , I 0 , δ 0 ) as follows. The set of states Q0 will be (Q × R0 ) t {S}. The storage T 0 will be tree-stacks over Ω. The set of transitions δ 0 will consist of four types of transformation: ∀v ∈ R, (S, ε, equals(g), Id, (qI , v)) 0 0 0 ∀v 0 ∈ R0 and (q, ε, p, f, q 0 ) ∈ δ, ((q, v ), ε, p, f, (q , v )) ((q, a1 . . . an ), ε, p, f, (q 0 , a2 . . . an )) ∀a1 . . . an ∈ R0 and (q, a1 , p, f, q 0 ) ∈ δ, ((q, ε), σ, p, f, (q 0 , ε)) ∀(q, σ, p, f, q 0 ) ∈ δ. The automaton will have start state S and final state (qf , ε). We stress once more that everything boils down to the fact that given an automaton M and a finite number of words wi ∈ Σ∗ , it is possible to insert a routine in the automaton that will mimic the behaviour of M when a word wi is read, that is, to ”insert” wi in the processed string of letters. The way it is done, is by adding the various suffixes of the wi as a ”second variable” to the states. If H is a normal subgroup G, then the word problem in G/H is exactly the set of words representing elements of H. Thus we immediately get the following corollary. Corollary 5.2. If G is a groups with multiple context free word problem and H is a finite normal subgroup of G, then G/H has a multiple context free word problem. We recalled the following result from [LS01] 15 Theorem 5.3 ([LS01] p.187, Theorem 2.6). Let G = G1 ∗H G2 be an amalgamated product and let c1 , . . . , cn be a sequence of elements of G such that: 1. n ≥ 2. 2. Each ci is in one of the factors G1 or G2 . 3. The words ci , ci+1 come form different factors. 4. No ci is in H. Then the product c1 · · · cn is non trivial in G. With Proposition 5.1 we can prove our main theorem, as previously stated the idea is similar to Theorem 4.4 with a few extra details. Theorem 5.4. Let G1 and G2 be groups whose word problem with multiple context free. Let Hi be a finite subgroup of Gi , such that H1 ∼ = H2 ∼ = H. Then G = G1 ∗H G2 has a multiple context free word problem. Proof. Let Wi be the word problem in Gi . Let Mi be an automaton accepting the language Wi . Let wih be a word in Σi representing the element h ∈ H. Let Fi = {wih : h ∈ H} with a bijection φ : F1 → F2 such that φ(w1h ) = w2h , let ψ = φ−1 . Let Fi0 be the set of suffixes of words in Fi . Let M0i be the automaton recognising words in Hi from Proposition 5.1 with states Qi × Fi0 t {Si }. Let W be the word problem in G. We build an automaton similar to Theorem 4.4 accepting the language W . The idea is the following: suppose that the word w = a1 · · · am is read. If all ai are contained in only one between Σ1 and Σ2 , then the automaton will proceed as in the case of the original groups. So suppose this doesn’t happen. We can subdivide the word w into (maximal) subwords that contain only elements of Σ1 or Σ2 . This will give a sequence c1 , . . . , cn of elements of G. Theorem 5.3 gives that w =G c1 · · · cn represents the trivial element only if there is an i such that ci represents an element of H. Let u be the subword of w associated to ci . Without loss of generality, we may assume that u ∈ Σ∗1 . By non-determinism, the automaton will guess the correct i and the element ci ∈ H. Then, using a procedure similar to Proposition 5.1, it will check if u really represents ci and, if this is the case, mimic the run that obtained substituting u with a word v ∈ Σ∗2 representing ci in G2 . Note that for this last step it is crucial that H is finite. It is clear that the word w will be accepted if and only if the automaton will accept the word obtained by w substituting u with v. By induction on the length of the sequence c1 , . . . , cn , we get the result. More formally: the states of M are Q1 × F10 t Q2 × F20 t {S1 , S2 , S, F }. The storage will be tree stacks over the alphabet Ω1 t Ω2 t (Q1 × F1 ) t (Q2 × F2 ) t {1 , 2 }. The transitions will consist the following:    1. S, ε, C, push1 (1 ) , qI1 , ε , S, ε, C, push2 (2 ) , qI2 , ε ∪ {(S, ε, equals(g), Id, F )} 16 2. n 3.      o qf1 , ε , ε, equals (1 ) , down, S , qf2 , ε , ε, equals (2 ) , down, S   −1 (q, ε) , ε, notequals ((Q2 × F2 )) , pushi ((q, w)) , qI2 , φ(w) : q ∈ Q1 , w ∈ F1 , i ∈ {−1, . . . , −n}    −1 (q, ε) , ε, notequals ((Q1 × F1 )) , pushi ((q, w)) , qI1 , ψ(w) : 4. q ∈ Q2 , w ∈ F2 , i ∈ {−1, . . . , −n} n   o 5. qf1 , ε , ε, equals ((q 0 , w)) , down, (q 0 , w) : q 0 ∈ Q2 , w ∈ F2 ∪ n   o qf2 , ε , ε, equals ((q 0 , w)) , down, (q 0 , w) : q 0 ∈ Q1 , w ∈ F1 . 6. The transitions of M0i except for those of the form (Si , ε, equals(g), Id, (QI , v). Before explaining in detail the rules, there is one key and central observation. If the automaton is in a state (q, w) with w = a1 · · · an 6= ε, then the only possible rules are of the form ((q, a1 . . . an ), ε, p, f, (q 0 , a2 . . . an )), where (q, a1 , p, f, q 0 ) was a rule of Mi or ((q, a1 . . . an ), ε, p, f, (q 0 , a1 . . . an )), where (q, ε, p, f, q 0 ) was a rule of Mi . That is, if there is a non empty word w at the second variable, the only possible rule that can be applied is one mimicking the behaviour of one of the original automata if the first letter of w was read. That is, the priority is always to deplete the second variable of the states. The elements of the group (1) consist of the very final instruction and the two instructions that starts processing letters in one of the two alphabets Σi . The elements of the group (2) consist of the final move for a sub-run representing a trivial (sub)word. Indeed, they are triggered when the automaton is in state qfi . The elements of the groups (3) and (4) consists of the same type of rules, with the roles of G1 and G2 interchanged. The rules describe the following instruction (say for the group (3)): ”At any moment where the stack pointer is not pointing an element of Q2 × F2 , and your state has empty second variable, you can guess that a sub-word that represents φ(w) is starting, for some w ∈ H. Then, you start a new branch and add φ(w)−1 at the second variable”. If the guess was correct, then eventually the automaton will return to the root of the new branch with state (q2 , ε). Thus, it successfully processed a sub-word that represented φ(w). In this case, the rules of group (5) apply. Indeed, remember that, at the beginning of the process, we pushed (q, w) in the stack, to remember the state at which the automaton was (as in Theorem 4.4) and the word we were checking. Then, we put w in the second variable. What happened, is that we effectively substituted the sub-word representing φ(w) with w. We will now give a precise proof of the Theorem. This automaton works similarly to the automaton in Theorem 4.4. Let Λ be an accepted run for the automaton. Let Tf be the final tree-stack for this run. We colour the non-root vertices of Tf red and blue as in the proof of Theorem 4.4. 17 There is a subtree Tc ⊂ Tf of a single colour whose complement is connected. Assume that Tc is a tree with labels from Ω1 . For each instruction there are two possible pointers, these can be viewed as vertices of Tf . Let Θ be the subset of the instruction in Λ such that both pointers are in Tc . It can be seen as in the proof of Theorem 4.4 that all these instructions are consecutive. Since Θ starts and ends at the root, the word read while performing the instructions in Θ represents an element v ∈ F1 . The run Λ decomposes as a concatenation Λ1 θ1 Θθ2 ΞΛ2 , where θ1 and θ2 correspond to entering and leaving the tree Tc and Ξ is the run from (q, φ(v)) to the first state (q 0 , ε). Since the tree Tc cannot be reentered we see that Λ is a valid run if and only if there is a valid run of the form Λ1 Θ0 Λ2 , where Θ0 is the same run as Ξ running through the states (q, ε) instead of (q, w), one could see this as a run in M2 corresponding to Ξ. The original decomposition Λ1 θ1 Θθ2 ΞΛ2 corresponds to a decomposition of w as u1 vu2 . The word corresponding to the run Λ1 Θ0 Λ2 is u1 φ(v)u2 . It should be noted that the final tree for the run Λ1 Θ0 Λ2 will have one fewer red subtree. For the base case note that if Tc = Tf , then we have a word in W1 ∪ W2 . Thus by induction on the number of maximal one-coloured subtrees, L(M) is a subset of W . We must now prove that this automaton accepts all words in W . We will use the free product length of a word once again. Let w = w1 . . . wk be a word of free product length k. If this word represents the trivial word, then there is a subword wj which represents and element of H. Let u be the corresponding element of F1 . We can assume this word is in Σ∗1 . Let v be an element of F2 representing the same element as wj . The automaton will leave the automaton M02 from the state (q, ε) to the automaton M01 starting at the state (qI1 , u). When the word wj is read the automaton will return to M02 at the state (q, v). The automaton will then make a run in M2 for the word v. Thus w is in L(M) if and only if w0 = w1 . . . wj−1 vwj+1 . . . wk is in L(M). Since w0 has shorter free product length and it is clear that words of free product length 1 are in L(M), we are done by induction. References [Cho62] Noam Chomsky. 1962. Context-free grammars and pushdown storage. [Den16] Tobias Denkinger. An Automata Characterisation for Multiple Context-Free Languages. In Developments in Language Theory, pages 138–150. Springer, Berlin, Heidelberg, July 2016. [Dun85] M. J. Dunwoody. The accessibility of finitely presented groups. Inventiones mathematicae, 81:449–458, 1985. 18 [GKS17] R. H. Gilman, R. P. Kropholler, and S. Schleimer. Groups Whose Word Problems are Not Semilinear. In Preparation, 2017. [Ho17] Meng-Che ”Turbo” Ho. The word problem of Zn is a multiple context-free language. arXiv:1702.02926, February 2017. [HU69] John E. Hopcroft and Jeffrey D. Ullman. Formal Languages and Their Relation to Automata. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 1969. [LS01] Roger C. Lyndon and Paul E. Schupp. Combinatorial group theory. Classics in Mathematics. Springer-Verlag, Berlin, 2001. Reprint of the 1977 edition. [MS81] David E. Muller and Paul E. Schupp. Context-free languages, groups, the theory of ends, second-order logic, tiling problems, cellular automata, and vector addition systems. Bull. Amer. Math. Soc. (N.S.), 4(3):331–334, May 1981. [Pol84] C. Pollard. Generalized Phrase Structure Grammars, Head Grammars, and Natural Language, 1984. [Sal15] Sylvain Salvati. MIX is a 2-MCFL and the word problem in Z2 is captured by the IO and the OI hierarchies. J. Comput. Syst. Sci., 81(7):1252–1277, November 2015. [SMFK91] Hiroyuki Seki, Takashi Matsumura, Mamoru Fujii, and Tadao Kasami. On multiple context-free grammars. Theor. Comput. Sci., 88(2):191–229, October 1991. [Sta71] John R. Stallings. Group Theory and Three-dimensional Manifolds. Yale University Press, New Haven, January 1971. 19
4math.GR